{"version":3,"sources":["../src/ui/internal/inject-style.ts","../src/ui/internal/base-reset.ts"],"names":[],"mappings":";;;AAKO,SAAS,WAAA,CAAY,IAAY,GAAA,EAAmB;AACzD,EAAA,IAAI,OAAO,aAAa,WAAA,EAAa;AACrC,EAAA,IAAI,QAAA,CAAS,cAAA,CAAe,EAAE,CAAA,EAAG;AACjC,EAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,aAAA,CAAc,OAAO,CAAA;AAC5C,EAAA,KAAA,CAAM,EAAA,GAAK,EAAA;AACX,EAAA,KAAA,CAAM,WAAA,GAAc,GAAA;AACpB,EAAA,QAAA,CAAS,IAAA,CAAK,YAAY,KAAK,CAAA;AACjC;;;ACUA,IAAM,QAAA,GAAW,iBAAA;AACjB,IAAM,KAAA,GAAQ,yDAAA;AAOP,SAAS,eAAA,GAAwB;AACtC,EAAA,WAAA,CAAY,UAAU,KAAK,CAAA;AAC7B","file":"chunk-RX6XCLFF.cjs","sourcesContent":["/**\n * Inject a stylesheet into the document exactly once, keyed by `id`. Used for\n * the few things inline styles can't express — `@keyframes` and `:hover`/\n * `:focus` pseudo-states. SSR-safe (no-ops without `document`) and idempotent.\n */\nexport function ensureStyle(id: string, css: string): void {\n  if (typeof document === \"undefined\") return;\n  if (document.getElementById(id)) return;\n  const style = document.createElement(\"style\");\n  style.id = id;\n  style.textContent = css;\n  document.head.appendChild(style);\n}\n","/**\n * The root-height chain every full-pane Synapse app needs, as a plain function\n * (no side effect on import — so a component can call it on render without the\n * mere act of importing injecting anything). The side-effect entry point is\n * `../base.ts` (`@nimblebrain/synapse/ui/base`).\n *\n * `AppFrame` sizes the app shell with `height: 100%`, which only resolves if its\n * ancestor chain (`#root` → `body` → `html`) has a definite height. Each app\n * iframe is its own bare document, so without this chain the shell collapses to\n * content height — full width, short height — inside the host pane.\n *\n * Percentages resolve against the actual pane box, which is correct whether the\n * app is sandboxed in an iframe or mounted into a host panel. A viewport unit\n * (`vh`/`dvh`) would instead assume the pane equals the viewport — wrong on\n * hosts that allocate a pane shorter than the viewport (it overflows with a\n * second scrollbar). The `#root` rule targets the conventional mount id and\n * harmlessly matches nothing if an app mounts elsewhere; `html, body` still\n * apply. `body { margin: 0 }` removes the UA default so the pane has no gap.\n */\n\nimport { ensureStyle } from \"./inject-style.js\";\n\nconst STYLE_ID = \"nb-synapse-base\";\nconst RULES = \"html, body, #root { height: 100%; } body { margin: 0; }\";\n\n/**\n * Inject the root-height + body-margin reset once. Idempotent (keyed by a\n * single style id) and SSR-safe (no-ops when `document` is unavailable, via\n * `ensureStyle`).\n */\nexport function injectBaseReset(): void {\n  ensureStyle(STYLE_ID, RULES);\n}\n"]}