{
  "id": "@typed/template#HtmlChunksBuilder",
  "canonicalId": "@typed/template#HtmlChunksBuilder",
  "symbol": {
    "id": "@typed/template#HtmlChunksBuilder",
    "packageName": "@typed/template",
    "moduleName": ".",
    "exportName": "HtmlChunksBuilder",
    "kind": "class",
    "signatures": [
      "export declare class HtmlChunksBuilder {\n    text(text: string): HtmlChunksBuilder;\n    part(node: Template.PartNode, render: (value: unknown) => string): HtmlChunksBuilder;\n    sparsePart(node: Template.SparsePartNode, render: (value: unknown) => string): HtmlChunksBuilder;\n    build(): ReadonlyArray<HtmlChunk>;\n}"
    ],
    "summary": "Advanced mutable builder used by the published template-to-chunk compiler.",
    "sections": {
      "Why": "Adjacent static strings are coalesced during compilation so runtime streaming\nperforms fewer writes. This is published renderer-author infrastructure, not\na raw-HTML application API.",
      "Ownership and lifetime": "One builder exclusively owns its mutable buffer. `build` transfers the\ncurrent array and resets the builder for reuse; it acquires no Scope.",
      "Method: build": "Transfers the accumulated chunks and resets the builder.",
      "Method: build: Why": "Allows one compiler-local builder to create independent chunk arrays.",
      "Method: build: Ownership and lifetime": "The caller receives the prior array; the builder starts a new empty buffer.",
      "Method: part": "Appends one dynamic part and its context-specific serializer.",
      "Method: part: Why": "Keeps escaping behavior adjacent to the parsed part.",
      "Method: part: Ownership and lifetime": "Retains the node and pure function until `build` transfers the buffer.",
      "Method: sparsePart": "Appends one sparse dynamic part and serializer.",
      "Method: sparsePart: Why": "Preserves literal/dynamic ordering under one escaping context.",
      "Method: sparsePart: Ownership and lifetime": "Retains the node and function until `build` transfers the buffer.",
      "Method: text": "Appends static text and coalesces it with the preceding text chunk.",
      "Method: text: Why": "Coalescing reduces output writes before runtime rendering begins.",
      "Method: text: Ownership and lifetime": "Mutates only this builder's private buffer."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { HtmlChunksBuilder } from \"@typed/template/HtmlChunk\"\n\nconst chunks = new HtmlChunksBuilder().text(\"<p>hello</p>\").build()"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/template/src/HtmlChunk.ts",
      "line": 269
    },
    "since": "1.0.0",
    "category": "HTML chunk assembly"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/template#HtmlChunksBuilder",
    "packageName": "@typed/template",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/template",
    "exportName": "HtmlChunksBuilder",
    "qualifiedName": "HtmlChunksBuilder",
    "declarationKey": "declaration:e9e011eca0e4c2d9352d1892",
    "family": "class",
    "signatures": [
      "export declare class HtmlChunksBuilder {\n    text(text: string): HtmlChunksBuilder;\n    part(node: Template.PartNode, render: (value: unknown) => string): HtmlChunksBuilder;\n    sparsePart(node: Template.SparsePartNode, render: (value: unknown) => string): HtmlChunksBuilder;\n    build(): ReadonlyArray<HtmlChunk>;\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 269,
          "column": 1
        },
        "end": {
          "line": 346,
          "column": 2
        }
      },
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 341,
          "column": 3
        },
        "end": {
          "line": 345,
          "column": 4
        }
      },
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 307,
          "column": 3
        },
        "end": {
          "line": 310,
          "column": 4
        }
      },
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 324,
          "column": 3
        },
        "end": {
          "line": 327,
          "column": 4
        }
      },
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 284,
          "column": 3
        },
        "end": {
          "line": 293,
          "column": 4
        }
      }
    ],
    "aliases": [
      "@typed/template/HtmlChunk#HtmlChunksBuilder"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:e9e011eca0e4c2d9352d1892",
    "name": "HtmlChunksBuilder",
    "family": "class",
    "facets": [
      {
        "family": "class",
        "syntaxKind": "ClassDeclaration",
        "signatures": [
          "export declare class HtmlChunksBuilder {\n    text(text: string): HtmlChunksBuilder;\n    part(node: Template.PartNode, render: (value: unknown) => string): HtmlChunksBuilder;\n    sparsePart(node: Template.SparsePartNode, render: (value: unknown) => string): HtmlChunksBuilder;\n    build(): ReadonlyArray<HtmlChunk>;\n}"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/HtmlChunk.ts",
            "start": {
              "line": 269,
              "column": 1
            },
            "end": {
              "line": 346,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "method",
        "syntaxKind": "MethodDeclaration",
        "signatures": [
          "build(): ReadonlyArray<HtmlChunk>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/HtmlChunk.ts",
            "start": {
              "line": 341,
              "column": 3
            },
            "end": {
              "line": 345,
              "column": 4
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "method",
        "syntaxKind": "MethodDeclaration",
        "signatures": [
          "part(node: Template.PartNode, render: (value: unknown) => string): HtmlChunksBuilder;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/HtmlChunk.ts",
            "start": {
              "line": 307,
              "column": 3
            },
            "end": {
              "line": 310,
              "column": 4
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "method",
        "syntaxKind": "MethodDeclaration",
        "signatures": [
          "sparsePart(node: Template.SparsePartNode, render: (value: unknown) => string): HtmlChunksBuilder;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/HtmlChunk.ts",
            "start": {
              "line": 324,
              "column": 3
            },
            "end": {
              "line": 327,
              "column": 4
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "method",
        "syntaxKind": "MethodDeclaration",
        "signatures": [
          "text(text: string): HtmlChunksBuilder;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/HtmlChunk.ts",
            "start": {
              "line": 284,
              "column": 3
            },
            "end": {
              "line": 293,
              "column": 4
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare class HtmlChunksBuilder {\n    text(text: string): HtmlChunksBuilder;\n    part(node: Template.PartNode, render: (value: unknown) => string): HtmlChunksBuilder;\n    sparsePart(node: Template.SparsePartNode, render: (value: unknown) => string): HtmlChunksBuilder;\n    build(): ReadonlyArray<HtmlChunk>;\n}"
    ],
    "typeParameters": [],
    "summary": "Advanced mutable builder used by the published template-to-chunk compiler.",
    "sections": {
      "Why": "Adjacent static strings are coalesced during compilation so runtime streaming\nperforms fewer writes. This is published renderer-author infrastructure, not\na raw-HTML application API.",
      "Ownership and lifetime": "One builder exclusively owns its mutable buffer. `build` transfers the\ncurrent array and resets the builder for reuse; it acquires no Scope.",
      "Method: build": "Transfers the accumulated chunks and resets the builder.",
      "Method: build: Why": "Allows one compiler-local builder to create independent chunk arrays.",
      "Method: build: Ownership and lifetime": "The caller receives the prior array; the builder starts a new empty buffer.",
      "Method: part": "Appends one dynamic part and its context-specific serializer.",
      "Method: part: Why": "Keeps escaping behavior adjacent to the parsed part.",
      "Method: part: Ownership and lifetime": "Retains the node and pure function until `build` transfers the buffer.",
      "Method: sparsePart": "Appends one sparse dynamic part and serializer.",
      "Method: sparsePart: Why": "Preserves literal/dynamic ordering under one escaping context.",
      "Method: sparsePart: Ownership and lifetime": "Retains the node and function until `build` transfers the buffer.",
      "Method: text": "Appends static text and coalesces it with the preceding text chunk.",
      "Method: text: Why": "Coalescing reduces output writes before runtime rendering begins.",
      "Method: text: Ownership and lifetime": "Mutates only this builder's private buffer."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { HtmlChunksBuilder } from \"@typed/template/HtmlChunk\"\n\nconst chunks = new HtmlChunksBuilder().text(\"<p>hello</p>\").build()"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 269,
          "column": 1
        },
        "end": {
          "line": 346,
          "column": 2
        }
      },
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 341,
          "column": 3
        },
        "end": {
          "line": 345,
          "column": 4
        }
      },
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 307,
          "column": 3
        },
        "end": {
          "line": 310,
          "column": 4
        }
      },
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 324,
          "column": 3
        },
        "end": {
          "line": 327,
          "column": 4
        }
      },
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 284,
          "column": 3
        },
        "end": {
          "line": 293,
          "column": 4
        }
      }
    ],
    "since": "1.0.0",
    "category": "HTML chunk assembly",
    "stability": "internal-but-published"
  }
}
