/** * Phase 1 Ember page handler. * * The compiled `pagePath` is a self-contained server bundle produced by * `compileEmber`. It exports `renderToHTML(props): string` — a one-call * entry that wires up simple-dom + the Glimmer renderer + the page * component, then returns serialized HTML. The handler's job is just: * * 1. Auto-inject `request.url` pathname into props as `url` (mirrors * React/Svelte/Vue handlers — the convention all four adapters now * share for native router cooperation). * 2. Polyfill `globalThis.Element` / `globalThis.Node` if missing. The * Ember server bundle also installs the polyfill defensively, but * installing here too means the polyfill is in place before the * bundle's module body evaluates (any top-level Element refs). * 3. Dynamic-import the bundle, call `renderToHTML(props)`, wrap the * result in a `
` + `` shell with `__INITIAL_PROPS__` * and the page index module load. * * Phase 1 doesn't ship: streaming, slots, islands, HMR cache dirty, * convention error rendering. Those layer on in phases 2 and 3. */ export type EmberPageRequestInput = { indexPath: string; pagePath: string; headTag?: `${string}`; props?: Record