{
  "id": "@typed/ui/HttpRouter#ssrForHttp",
  "canonicalId": "@typed/ui#ssrForHttp",
  "symbol": {
    "id": "@typed/ui/HttpRouter#ssrForHttp",
    "packageName": "@typed/ui",
    "moduleName": "HttpRouter",
    "exportName": "ssrForHttp",
    "kind": "constant",
    "signatures": [
      "export declare const ssrForHttp: {\n    <E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;\n    <E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;\n};"
    ],
    "summary": "Registers buffered, GET-only HTML routes for a matcher.\n\nPath captures take precedence over same-named query parameters. Rendering\ncompletes before the response is created; this adapter does not stream.",
    "sections": {
      "Why": "Typed route matchers already describe decoding, guards, parent prefixes, and\nrender output. `ssrForHttp` installs that same model in Effect's HttpRouter\nand buffers one complete HTML document for runtimes that require a known body.",
      "Ownership and lifetime": "Registration adds GET routes to the supplied Effect HttpRouter. Each request\ncreates request-local memory navigation and current-route services; the\nrequest Effect owns rendering and all finalizers. Buffered rendering must\ncomplete before the response is returned. Rendering HTML does not mount or\nhydrate a browser client.",
      "Routing behavior": "Matcher cases sharing a path are tried in their compiled order. Path params\noverwrite same-named query params. Decode/guard failures continue candidate\nselection; a matched renderer failure stays in the typed request error channel."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { ssrForHttp } from \"@typed/ui/HttpRouter\"\nimport { Effect } from \"effect\"\nimport * as HttpRouter from \"effect/unstable/http/HttpRouter\"\nimport { Parse, match } from \"@typed/router\"\nimport { html } from \"@typed/template\"\n\nconst pages = match(Parse(\"/\"), html`<h1>Home</h1>`)\nconst routes = Effect.gen(function* () {\n  const router = yield* HttpRouter.make\n  yield* ssrForHttp(router, pages)\n  return router\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/ui/src/HttpRouter.ts",
      "line": 167
    },
    "since": "1.0.0",
    "category": "Buffered server rendering"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/ui/HttpRouter#ssrForHttp",
    "packageName": "@typed/ui",
    "packageVersion": "1.0.0-beta.13",
    "moduleName": "HttpRouter",
    "consumerSpecifier": "@typed/ui/HttpRouter",
    "exportName": "ssrForHttp",
    "qualifiedName": "ssrForHttp",
    "declarationKey": "declaration:71d4a4247b23a44bba90c95b",
    "family": "variable",
    "signatures": [
      "export declare const ssrForHttp: {\n    <E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;\n    <E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 167,
          "column": 14
        },
        "end": {
          "line": 170,
          "column": 39
        }
      },
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 168,
          "column": 3
        },
        "end": {
          "line": 168,
          "column": 93
        }
      },
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 169,
          "column": 3
        },
        "end": {
          "line": 169,
          "column": 89
        }
      }
    ],
    "aliases": [
      "@typed/ui#ssrForHttp",
      "@typed/ui/index#ssrForHttp"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:71d4a4247b23a44bba90c95b",
    "name": "ssrForHttp",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const ssrForHttp: {\n    <E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;\n    <E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/ui/src/HttpRouter.ts",
            "start": {
              "line": 167,
              "column": 14
            },
            "end": {
              "line": 170,
              "column": 39
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;",
          "<E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;"
        ],
        "typeParameters": [
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/ui/src/HttpRouter.ts",
            "start": {
              "line": 168,
              "column": 3
            },
            "end": {
              "line": 168,
              "column": 93
            }
          },
          {
            "file": "packages/ui/src/HttpRouter.ts",
            "start": {
              "line": 169,
              "column": 3
            },
            "end": {
              "line": 169,
              "column": 89
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const ssrForHttp: {\n    <E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;\n    <E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;\n};"
    ],
    "typeParameters": [
      "E",
      "R"
    ],
    "summary": "Registers buffered, GET-only HTML routes for a matcher.\n\nPath captures take precedence over same-named query parameters. Rendering\ncompletes before the response is created; this adapter does not stream.",
    "sections": {
      "Why": "Typed route matchers already describe decoding, guards, parent prefixes, and\nrender output. `ssrForHttp` installs that same model in Effect's HttpRouter\nand buffers one complete HTML document for runtimes that require a known body.",
      "Ownership and lifetime": "Registration adds GET routes to the supplied Effect HttpRouter. Each request\ncreates request-local memory navigation and current-route services; the\nrequest Effect owns rendering and all finalizers. Buffered rendering must\ncomplete before the response is returned. Rendering HTML does not mount or\nhydrate a browser client.",
      "Routing behavior": "Matcher cases sharing a path are tried in their compiled order. Path params\noverwrite same-named query params. Decode/guard failures continue candidate\nselection; a matched renderer failure stays in the typed request error channel."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { ssrForHttp } from \"@typed/ui/HttpRouter\"\nimport { Effect } from \"effect\"\nimport * as HttpRouter from \"effect/unstable/http/HttpRouter\"\nimport { Parse, match } from \"@typed/router\"\nimport { html } from \"@typed/template\"\n\nconst pages = match(Parse(\"/\"), html`<h1>Home</h1>`)\nconst routes = Effect.gen(function* () {\n  const router = yield* HttpRouter.make\n  yield* ssrForHttp(router, pages)\n  return router\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 167,
          "column": 14
        },
        "end": {
          "line": 170,
          "column": 39
        }
      },
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 168,
          "column": 3
        },
        "end": {
          "line": 168,
          "column": 93
        }
      },
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 169,
          "column": 3
        },
        "end": {
          "line": 169,
          "column": 89
        }
      }
    ],
    "since": "1.0.0",
    "category": "Buffered server rendering"
  }
}
