Limits
What the runtime does not do, and behaviour worth knowing before you rely on it.
- HTML only. No PDF or PNG output, no CSS inlining for email, no server or router. The channels
pdfandogare context labels. - Experimental Astro API. Rendering goes through
experimental_AstroContainer. Astro may change it; the package declaresastro >= 4.0.0as a peer dependency, and the repository itself is developed against Astro 6. - Scoped styles. A rendered string contains the component’s markup with Astro’s
data-astro-cid-*attributes, not its<style>block. Use thestylesfield of a registry entry, or a stylesheet on the page that receives the fragment. - Context as a prop. The context reaches components as
Astro.props.__context. It is not available asAstro.localsor through any other Astro mechanism. renderToResponsehas no context parameter. UsebaseContextorrenderComponent.- Shared component cache. Loaded registry components are cached by ID in a module-level map, across runtime instances. Re-registering an ID with a different loader after its first render keeps serving the first component.
- Services are singletons per runtime. The factory runs once per name until the name is registered again.
- Error matching by message. Adapters answer 404 when the error message contains
not found. - Presets store options, not behaviour. The email preset’s
providerandinlineStyles, and the AHA preset’shtmxHeaders, are written to the context; the preset code does not act on them. - No benchmarks. The repository contains unit tests with a mocked container
(
src/runtime.test.ts) and example projects, but no performance measurements.