// Snippets declared in page content render at the end of
(via PageScripts). // // One registry per render, keyed by the request object, so a render that never // reaches PageScripts (the .md and llms endpoints render page content too) // cannot leak its scripts into the next page the build produces. // // A string OR a promise of a string is registered: CaptureScript must register // itself SYNCHRONOUSLY in its frontmatter (before it first yields control via // await), because Astro renders siblings concurrently and PageScripts may drain // the registry before the asynchronous render of the slot completes. type Script = string | Promise