UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

28 lines • 1.39 kB
/** * Where the chunk-injected `<style>` elements live between plans. * * A chunk injects its CSS once per page, when it first evaluates * (`vite/per-chunk-css-injection.ts`), so the elements have to outlive every * plan: it registers each one on `window.__efpStyleElements`, and * `floorplan.loader` adopts the whole registry into each new container — * `appendChild` *moving* every element out of the previous, discarded one. * That migration is why a swap leaves the node count flat instead of stacking * a stylesheet set per generation, and it is why `resetGlobalVariables()` * deliberately skips this one key. * * It has one edge, though, and only on the destroy that no `load()` follows: * the registry still points at elements whose parent is the dead plan's * ShadowRoot. A node keeps its parent reachable, so a single adopted `<style>` * pins that root, its host and the ~7,200-node tree under it for the life of * the page. * * Parking cuts that edge without giving up re-adoption. */ /** * Moves every registered `<style>` out of the container being torn down and * into {@link parkingLot}, leaving `window.__efpStyleElements` itself intact — * the next `load()` adopts them out of the holder exactly as it would out of a * previous plan's container. */ export declare function parkRegisteredStyles(): void; //# sourceMappingURL=style-registry.d.ts.map