{
  "id": "@typed/template#DomRenderTemplate",
  "canonicalId": "@typed/template#DomRenderTemplate",
  "symbol": {
    "id": "@typed/template#DomRenderTemplate",
    "packageName": "@typed/template",
    "moduleName": ".",
    "exportName": "DomRenderTemplate",
    "kind": "constant",
    "signatures": [
      "export declare const DomRenderTemplate: Layer.Layer<RenderTemplate, never, never> & {\n    readonly using: (document: Document) => Layer.Layer<RenderTemplate, never, never>;\n};"
    ],
    "summary": "A Layer that provides the `RenderTemplate` service implemented for DOM rendering.\n\nThis layer enables templates to be rendered as actual DOM nodes. It handles:\n- Parsing templates into DOM fragments.\n- Caching parsed templates.\n- Hydrating from existing DOM (if applicable).\n- Setting up event listeners.\n- Managing fine-grained updates to DOM nodes via `Fx` streams.",
    "sections": {
      "Why": "The Layer is the DOM implementation of the same `RenderTemplate` service used\nby SSR. It compiles a literal once, clones namespace-correct fragments, and\nconnects each captured part directly to its producer—there is no virtual DOM\nor component-specific event state. Delegated handlers receive EventSource's\ndocumented native-event Proxy so `currentTarget` can identify their target.",
      "Ownership and lifetime": "Template and fragment caches live with the Layer service. Each emitted DOM\nrange keeps its mounted subscriptions, delegated native listeners, queued\ncallbacks, and ref finalizers in the surrounding event Scope. Replaceable\nspread parts use child Scopes so replacement still releases their resources.\nOnly nodes and attributes represented by that range are changed; external\nclasses and unowned siblings remain intact.",
      "Cost model and moves": "Captured scalar text, attribute, property, boolean, comment, and ref parts\nupdate their retained target in O(1) with respect to the surrounding tree.\nStructural changes diff only the local dynamic range. Moving an already\nconnected node prefers `ParentNode.moveBefore` and falls back to\n`insertBefore`, preserving DOM identity and browser state.",
      "Web standards": "HTML, SVG, MathML, and foreign-content namespace boundaries are compiled with\nnative DOM APIs. Dialog, popover, anchor positioning, custom elements, and\nbrowser event behavior remains available through EventSource's forwarding\nProxy because the renderer does not replace the platform event model."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Layer } from \"effect\"\nimport { html } from \"@typed/template\"\nimport { DomRenderTemplate, render } from \"@typed/template/Render\"\nimport { Fx } from \"@typed/fx\"\n\nconst program = Effect.gen(function* () {\n  const template = html`<div>Hello, world!</div>`\n\n  return yield* render(template, document.body).pipe(\n    Fx.drainLayer,\n    Layer.provide(DomRenderTemplate),\n    Layer.launch\n  )\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/template/src/Render.ts",
      "line": 229
    },
    "since": "1.0.0",
    "category": "DOM template interpretation"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/template#DomRenderTemplate",
    "packageName": "@typed/template",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/template",
    "exportName": "DomRenderTemplate",
    "qualifiedName": "DomRenderTemplate",
    "declarationKey": "declaration:e4ea8bc57e3749e059e2bfc4",
    "family": "variable",
    "signatures": [
      "export declare const DomRenderTemplate: Layer.Layer<RenderTemplate, never, never> & {\n    readonly using: (document: Document) => Layer.Layer<RenderTemplate, never, never>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/Render.ts",
        "start": {
          "line": 229,
          "column": 14
        },
        "end": {
          "line": 356,
          "column": 2
        }
      },
      {
        "file": "packages/template/dist/Render.d.ts",
        "start": {
          "line": 175,
          "column": 5
        },
        "end": {
          "line": 175,
          "column": 87
        }
      }
    ],
    "aliases": [
      "@typed/template/Render#DomRenderTemplate"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:e4ea8bc57e3749e059e2bfc4",
    "name": "DomRenderTemplate",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const DomRenderTemplate: Layer.Layer<RenderTemplate, never, never> & {\n    readonly using: (document: Document) => Layer.Layer<RenderTemplate, never, never>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/Render.ts",
            "start": {
              "line": 229,
              "column": 14
            },
            "end": {
              "line": 356,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly using: (document: Document) => Layer.Layer<RenderTemplate, never, never>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/dist/Render.d.ts",
            "start": {
              "line": 175,
              "column": 5
            },
            "end": {
              "line": 175,
              "column": 87
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const DomRenderTemplate: Layer.Layer<RenderTemplate, never, never> & {\n    readonly using: (document: Document) => Layer.Layer<RenderTemplate, never, never>;\n};"
    ],
    "typeParameters": [],
    "summary": "A Layer that provides the `RenderTemplate` service implemented for DOM rendering.\n\nThis layer enables templates to be rendered as actual DOM nodes. It handles:\n- Parsing templates into DOM fragments.\n- Caching parsed templates.\n- Hydrating from existing DOM (if applicable).\n- Setting up event listeners.\n- Managing fine-grained updates to DOM nodes via `Fx` streams.",
    "sections": {
      "Why": "The Layer is the DOM implementation of the same `RenderTemplate` service used\nby SSR. It compiles a literal once, clones namespace-correct fragments, and\nconnects each captured part directly to its producer—there is no virtual DOM\nor component-specific event state. Delegated handlers receive EventSource's\ndocumented native-event Proxy so `currentTarget` can identify their target.",
      "Ownership and lifetime": "Template and fragment caches live with the Layer service. Each emitted DOM\nrange keeps its mounted subscriptions, delegated native listeners, queued\ncallbacks, and ref finalizers in the surrounding event Scope. Replaceable\nspread parts use child Scopes so replacement still releases their resources.\nOnly nodes and attributes represented by that range are changed; external\nclasses and unowned siblings remain intact.",
      "Cost model and moves": "Captured scalar text, attribute, property, boolean, comment, and ref parts\nupdate their retained target in O(1) with respect to the surrounding tree.\nStructural changes diff only the local dynamic range. Moving an already\nconnected node prefers `ParentNode.moveBefore` and falls back to\n`insertBefore`, preserving DOM identity and browser state.",
      "Web standards": "HTML, SVG, MathML, and foreign-content namespace boundaries are compiled with\nnative DOM APIs. Dialog, popover, anchor positioning, custom elements, and\nbrowser event behavior remains available through EventSource's forwarding\nProxy because the renderer does not replace the platform event model."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Layer } from \"effect\"\nimport { html } from \"@typed/template\"\nimport { DomRenderTemplate, render } from \"@typed/template/Render\"\nimport { Fx } from \"@typed/fx\"\n\nconst program = Effect.gen(function* () {\n  const template = html`<div>Hello, world!</div>`\n\n  return yield* render(template, document.body).pipe(\n    Fx.drainLayer,\n    Layer.provide(DomRenderTemplate),\n    Layer.launch\n  )\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/Render.ts",
        "start": {
          "line": 229,
          "column": 14
        },
        "end": {
          "line": 356,
          "column": 2
        }
      },
      {
        "file": "packages/template/dist/Render.d.ts",
        "start": {
          "line": 175,
          "column": 5
        },
        "end": {
          "line": 175,
          "column": 87
        }
      }
    ],
    "since": "1.0.0",
    "category": "DOM template interpretation"
  }
}
