@ogygia/core 0.0.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +7 -1
- package/ambient.d.ts +194 -0
- package/dist/ClientBindingStub.svelte +6 -0
- package/dist/ClientBindingStub.svelte.d.ts +26 -0
- package/dist/KeepHost.svelte +19 -0
- package/dist/KeepHost.svelte.d.ts +10 -0
- package/dist/LakeBoundary.svelte +16 -0
- package/dist/LakeBoundary.svelte.d.ts +11 -0
- package/dist/LateIsland.svelte +22 -0
- package/dist/LateIsland.svelte.d.ts +15 -0
- package/dist/LateIslandAwait.svelte +17 -0
- package/dist/LateIslandAwait.svelte.d.ts +15 -0
- package/dist/LiveHost.svelte +19 -0
- package/dist/LiveHost.svelte.d.ts +10 -0
- package/dist/NestedProvider.svelte +13 -0
- package/dist/NestedProvider.svelte.d.ts +8 -0
- package/dist/OgygiaBoundary.svelte +5 -0
- package/dist/OgygiaBoundary.svelte.d.ts +17 -0
- package/dist/PromiseRegion.svelte +40 -0
- package/dist/PromiseRegion.svelte.d.ts +15 -0
- package/dist/PromiseRegionAwait.svelte +27 -0
- package/dist/PromiseRegionAwait.svelte.d.ts +15 -0
- package/dist/Provide.svelte +27 -0
- package/dist/Provide.svelte.d.ts +8 -0
- package/dist/RawHtml.svelte +9 -0
- package/dist/RawHtml.svelte.d.ts +6 -0
- package/dist/Region.svelte +1173 -0
- package/dist/Region.svelte.d.ts +68 -0
- package/dist/SlotBoundary.svelte +13 -0
- package/dist/SlotBoundary.svelte.d.ts +7 -0
- package/dist/app.d.ts +4 -0
- package/dist/app.js +3 -0
- package/dist/boundary.d.ts +35 -0
- package/dist/boundary.js +127 -0
- package/dist/build-cache.d.ts +13 -0
- package/dist/build-cache.js +77 -0
- package/dist/compiler/blank-styles.d.ts +1 -0
- package/dist/compiler/blank-styles.js +63 -0
- package/dist/compiler/bom.d.ts +2 -0
- package/dist/compiler/bom.js +15 -0
- package/dist/compiler/browser-full.d.ts +8 -0
- package/dist/compiler/browser-full.js +8 -0
- package/dist/compiler/browser.d.ts +11 -0
- package/dist/compiler/browser.js +11 -0
- package/dist/compiler/content/transportables.d.ts +26 -0
- package/dist/compiler/content/transportables.js +219 -0
- package/dist/compiler/ctx.d.ts +180 -0
- package/dist/compiler/ctx.js +183 -0
- package/dist/compiler/debarrel/barrel.d.ts +55 -0
- package/dist/compiler/debarrel/barrel.js +248 -0
- package/dist/compiler/debarrel/options.d.ts +67 -0
- package/dist/compiler/debarrel/options.js +31 -0
- package/dist/compiler/debarrel/parse.d.ts +65 -0
- package/dist/compiler/debarrel/parse.js +256 -0
- package/dist/compiler/debarrel/plugin.d.ts +31 -0
- package/dist/compiler/debarrel/plugin.js +190 -0
- package/dist/compiler/debarrel/rewrite.d.ts +27 -0
- package/dist/compiler/debarrel/rewrite.js +118 -0
- package/dist/compiler/debarrel/svelte.d.ts +13 -0
- package/dist/compiler/debarrel/svelte.js +56 -0
- package/dist/compiler/dev/css-scope.d.ts +16 -0
- package/dist/compiler/dev/css-scope.js +38 -0
- package/dist/compiler/dev/dev-hmr.d.ts +25 -0
- package/dist/compiler/dev/dev-hmr.js +29 -0
- package/dist/compiler/dev/hmr.d.ts +34 -0
- package/dist/compiler/dev/hmr.js +57 -0
- package/dist/compiler/dev/region-bytes.d.ts +34 -0
- package/dist/compiler/dev/region-bytes.js +126 -0
- package/dist/compiler/driver.d.ts +280 -0
- package/dist/compiler/driver.js +1352 -0
- package/dist/compiler/flags.d.ts +16 -0
- package/dist/compiler/flags.js +101 -0
- package/dist/compiler/fouc-css.d.ts +97 -0
- package/dist/compiler/fouc-css.js +335 -0
- package/dist/compiler/free-vars.d.ts +20 -0
- package/dist/compiler/free-vars.js +327 -0
- package/dist/compiler/host.d.ts +65 -0
- package/dist/compiler/host.js +51 -0
- package/dist/compiler/ids.d.ts +84 -0
- package/dist/compiler/ids.js +86 -0
- package/dist/compiler/index.d.ts +11 -0
- package/dist/compiler/index.js +11 -0
- package/dist/compiler/kit.d.ts +129 -0
- package/dist/compiler/kit.js +563 -0
- package/dist/compiler/link/build-output.d.ts +44 -0
- package/dist/compiler/link/build-output.js +147 -0
- package/dist/compiler/link/caps.d.ts +48 -0
- package/dist/compiler/link/caps.js +64 -0
- package/dist/compiler/link/context-detect.d.ts +23 -0
- package/dist/compiler/link/context-detect.js +137 -0
- package/dist/compiler/link/emit-gate.d.ts +11 -0
- package/dist/compiler/link/emit-gate.js +40 -0
- package/dist/compiler/link/entry-shim.d.ts +4 -0
- package/dist/compiler/link/entry-shim.js +29 -0
- package/dist/compiler/link/island-deps.d.ts +142 -0
- package/dist/compiler/link/island-deps.js +525 -0
- package/dist/compiler/link/manifest.d.ts +5 -0
- package/dist/compiler/link/manifest.js +9 -0
- package/dist/compiler/link/page-keys.d.ts +64 -0
- package/dist/compiler/link/page-keys.js +683 -0
- package/dist/compiler/link/registry-stub.d.ts +41 -0
- package/dist/compiler/link/registry-stub.js +212 -0
- package/dist/compiler/link/router-config.d.ts +11 -0
- package/dist/compiler/link/router-config.js +15 -0
- package/dist/compiler/link/router-css.d.ts +22 -0
- package/dist/compiler/link/router-css.js +142 -0
- package/dist/compiler/link/runtime-entry.d.ts +71 -0
- package/dist/compiler/link/runtime-entry.js +132 -0
- package/dist/compiler/link/server-manifest.d.ts +12 -0
- package/dist/compiler/link/server-manifest.js +45 -0
- package/dist/compiler/link/speculation.d.ts +17 -0
- package/dist/compiler/link/speculation.js +36 -0
- package/dist/compiler/link/transport.d.ts +31 -0
- package/dist/compiler/link/transport.js +67 -0
- package/dist/compiler/macros/bake.d.ts +20 -0
- package/dist/compiler/macros/bake.js +317 -0
- package/dist/compiler/macros/browser.d.ts +11 -0
- package/dist/compiler/macros/browser.js +69 -0
- package/dist/compiler/macros/dedent.d.ts +12 -0
- package/dist/compiler/macros/dedent.js +36 -0
- package/dist/compiler/macros/dollar.d.ts +15 -0
- package/dist/compiler/macros/dollar.js +387 -0
- package/dist/compiler/macros/pipeline.d.ts +31 -0
- package/dist/compiler/macros/pipeline.js +106 -0
- package/dist/compiler/macros/source.d.ts +6 -0
- package/dist/compiler/macros/source.js +127 -0
- package/dist/compiler/macros/store.d.ts +17 -0
- package/dist/compiler/macros/store.js +244 -0
- package/dist/compiler/macros/wire.d.ts +14 -0
- package/dist/compiler/macros/wire.js +160 -0
- package/dist/compiler/ownership-stamps.d.ts +6 -0
- package/dist/compiler/ownership-stamps.js +144 -0
- package/dist/compiler/parse/oxc.d.ts +34 -0
- package/dist/compiler/parse/oxc.js +59 -0
- package/dist/compiler/parse/scan.d.ts +43 -0
- package/dist/compiler/parse/scan.js +232 -0
- package/dist/compiler/program.d.ts +140 -0
- package/dist/compiler/program.js +242 -0
- package/dist/compiler/region/emit.d.ts +169 -0
- package/dist/compiler/region/emit.js +286 -0
- package/dist/compiler/region/identity.d.ts +28 -0
- package/dist/compiler/region/identity.js +75 -0
- package/dist/compiler/region/ir.d.ts +65 -0
- package/dist/compiler/region/ir.js +0 -0
- package/dist/compiler/region/transform.d.ts +178 -0
- package/dist/compiler/region/transform.js +1933 -0
- package/dist/compiler/script-request.d.ts +1 -0
- package/dist/compiler/script-request.js +43 -0
- package/dist/context-bridge.d.ts +65 -0
- package/dist/context-bridge.js +217 -0
- package/dist/context-registry.d.ts +40 -0
- package/dist/context-registry.js +15 -0
- package/dist/context.d.ts +72 -0
- package/dist/context.js +158 -0
- package/dist/current-region.d.ts +14 -0
- package/dist/current-region.js +36 -0
- package/dist/document.d.ts +41 -0
- package/dist/document.js +125 -0
- package/dist/entry-hydrate.d.ts +5 -0
- package/dist/entry-hydrate.js +42 -0
- package/dist/escape.d.ts +18 -0
- package/dist/escape.js +37 -0
- package/dist/events/bus.d.ts +33 -0
- package/dist/events/bus.js +153 -0
- package/dist/events/index.d.ts +4 -0
- package/dist/events/index.js +4 -0
- package/dist/events/schema.d.ts +389 -0
- package/dist/events/schema.js +23 -0
- package/dist/events/server-registry.d.ts +7 -0
- package/dist/events/server-registry.js +13 -0
- package/dist/events/sinks.d.ts +64 -0
- package/dist/events/sinks.js +85 -0
- package/dist/fn-transport.d.ts +33 -0
- package/dist/fn-transport.js +140 -0
- package/dist/frame.d.ts +20 -0
- package/dist/frame.js +19 -0
- package/dist/holes-record.d.ts +6 -0
- package/dist/holes-record.js +8 -0
- package/dist/hooks.d.ts +43 -0
- package/dist/hooks.js +1191 -0
- package/dist/hydration-info.d.ts +1 -0
- package/dist/hydration-info.js +31 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +17 -0
- package/dist/insights/attr-rules.d.ts +15 -0
- package/dist/insights/attr-rules.js +27 -0
- package/dist/insights/cpu.d.ts +82 -0
- package/dist/insights/cpu.js +177 -0
- package/dist/insights/fp-drift.d.ts +28 -0
- package/dist/insights/fp-drift.js +148 -0
- package/dist/insights/hole-segments.d.ts +26 -0
- package/dist/insights/hole-segments.js +50 -0
- package/dist/insights/html-diff.d.ts +25 -0
- package/dist/insights/html-diff.js +157 -0
- package/dist/insights/hydration-hazards.d.ts +36 -0
- package/dist/insights/hydration-hazards.js +136 -0
- package/dist/insights/hydration-status.d.ts +2 -0
- package/dist/insights/hydration-status.js +0 -0
- package/dist/insights/index.d.ts +14 -0
- package/dist/insights/index.js +12 -0
- package/dist/insights/page-assets.d.ts +211 -0
- package/dist/insights/page-assets.js +608 -0
- package/dist/insights/page-insights.d.ts +749 -0
- package/dist/insights/page-insights.js +2157 -0
- package/dist/insights/session-data.d.ts +108 -0
- package/dist/insights/session-data.js +0 -0
- package/dist/insights/session-insights.d.ts +121 -0
- package/dist/insights/session-insights.js +548 -0
- package/dist/insights/switch.d.ts +53 -0
- package/dist/insights/switch.js +91 -0
- package/dist/insights/testing-version.d.ts +19 -0
- package/dist/insights/testing-version.js +21 -0
- package/dist/insights/third-party.d.ts +75 -0
- package/dist/insights/third-party.js +160 -0
- package/dist/internal-instruments.d.ts +13 -0
- package/dist/internal-instruments.js +12 -0
- package/dist/internal-reconcile.d.ts +3 -0
- package/dist/internal-reconcile.js +3 -0
- package/dist/internal-register.d.ts +7 -0
- package/dist/internal-register.js +7 -0
- package/dist/internal-server.d.ts +7 -0
- package/dist/internal-server.js +7 -0
- package/dist/internal.d.ts +13 -0
- package/dist/internal.js +13 -0
- package/dist/island-graph.d.ts +36 -0
- package/dist/island-graph.js +89 -0
- package/dist/keep-fallback-marker.d.ts +7 -0
- package/dist/keep-fallback-marker.js +9 -0
- package/dist/keep-fallback.d.ts +13 -0
- package/dist/keep-fallback.js +39 -0
- package/dist/kit-paths.d.ts +2 -0
- package/dist/kit-paths.js +39 -0
- package/dist/late-region-registry.d.ts +40 -0
- package/dist/late-region-registry.js +36 -0
- package/dist/live-transport.d.ts +57 -0
- package/dist/live-transport.js +145 -0
- package/dist/markup.d.ts +4 -0
- package/dist/markup.js +4 -0
- package/dist/own-package.d.ts +15 -0
- package/dist/own-package.js +20 -0
- package/dist/page-defer.d.ts +33 -0
- package/dist/page-defer.js +35 -0
- package/dist/page-facts-script.d.ts +7 -0
- package/dist/page-facts-script.js +9 -0
- package/dist/page-seed-registry.d.ts +72 -0
- package/dist/page-seed-registry.js +31 -0
- package/dist/plugin/capability.d.ts +14 -0
- package/dist/plugin/capability.js +44 -0
- package/dist/plugin/client.d.ts +39 -0
- package/dist/plugin/client.js +6 -0
- package/dist/plugin/css.d.ts +3 -0
- package/dist/plugin/css.js +54 -0
- package/dist/plugin/facts.d.ts +42 -0
- package/dist/plugin/facts.js +37 -0
- package/dist/plugin/hooks.d.ts +33 -0
- package/dist/plugin/hooks.js +38 -0
- package/dist/plugin/index.d.ts +127 -0
- package/dist/plugin/index.js +26 -0
- package/dist/plugin/routes.d.ts +32 -0
- package/dist/plugin/routes.js +35 -0
- package/dist/plugin/server.d.ts +27 -0
- package/dist/plugin/server.js +92 -0
- package/dist/plugin/standard-schema.d.ts +27 -0
- package/dist/plugin/standard-schema.js +0 -0
- package/dist/plugin/testing.d.ts +13 -0
- package/dist/plugin/testing.js +54 -0
- package/dist/plugin/utils.d.ts +13 -0
- package/dist/plugin/utils.js +19 -0
- package/dist/portable-form.d.ts +22 -0
- package/dist/portable-form.js +52 -0
- package/dist/preference.d.ts +35 -0
- package/dist/preference.js +84 -0
- package/dist/preload.d.ts +1 -0
- package/dist/preload.js +21 -0
- package/dist/ref-watch.d.ts +31 -0
- package/dist/ref-watch.js +66 -0
- package/dist/ref.d.ts +124 -0
- package/dist/ref.js +272 -0
- package/dist/region-brand.d.ts +8 -0
- package/dist/region-brand.js +10 -0
- package/dist/region-core.d.ts +2 -0
- package/dist/region-core.js +1 -0
- package/dist/region-snippet.d.ts +73 -0
- package/dist/region-snippet.js +351 -0
- package/dist/region.d.ts +127 -0
- package/dist/region.js +162 -0
- package/dist/request-event.d.ts +1 -0
- package/dist/request-event.js +37 -0
- package/dist/router-css.d.ts +39 -0
- package/dist/router-css.js +66 -0
- package/dist/runtime/app-transport.d.ts +2 -0
- package/dist/runtime/app-transport.js +13 -0
- package/dist/runtime/beacon.d.ts +271 -0
- package/dist/runtime/beacon.js +2190 -0
- package/dist/runtime/boot-link.d.ts +1 -0
- package/dist/runtime/boot-link.js +44 -0
- package/dist/runtime/client-hooks.d.ts +5 -0
- package/dist/runtime/client-hooks.js +22 -0
- package/dist/runtime/client-plugins.d.ts +8 -0
- package/dist/runtime/client-plugins.js +34 -0
- package/dist/runtime/concurrency.d.ts +12 -0
- package/dist/runtime/concurrency.js +29 -0
- package/dist/runtime/connected.d.ts +12 -0
- package/dist/runtime/connected.js +16 -0
- package/dist/runtime/context.d.ts +1 -0
- package/dist/runtime/context.js +19 -0
- package/dist/runtime/core.d.ts +15 -0
- package/dist/runtime/core.js +1173 -0
- package/dist/runtime/drift-watch.d.ts +9 -0
- package/dist/runtime/drift-watch.js +60 -0
- package/dist/runtime/entry-locations.d.ts +33 -0
- package/dist/runtime/entry-locations.js +119 -0
- package/dist/runtime/foreign-props.d.ts +8 -0
- package/dist/runtime/foreign-props.js +14 -0
- package/dist/runtime/form-continuity.d.ts +10 -0
- package/dist/runtime/form-continuity.js +107 -0
- package/dist/runtime/frame-nav.d.ts +36 -0
- package/dist/runtime/frame-nav.js +225 -0
- package/dist/runtime/frame-store.d.ts +62 -0
- package/dist/runtime/frame-store.js +214 -0
- package/dist/runtime/frames.d.ts +1 -0
- package/dist/runtime/frames.js +25 -0
- package/dist/runtime/full.d.ts +4 -0
- package/dist/runtime/full.js +32 -0
- package/dist/runtime/hash.d.ts +41 -0
- package/dist/runtime/hash.js +79 -0
- package/dist/runtime/hole-facts.d.ts +8 -0
- package/dist/runtime/hole-facts.js +57 -0
- package/dist/runtime/host-classes.d.ts +24 -0
- package/dist/runtime/host-classes.js +43 -0
- package/dist/runtime/hydrate-core.d.ts +101 -0
- package/dist/runtime/hydrate-core.js +605 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/interaction-replay.d.ts +11 -0
- package/dist/runtime/interaction-replay.js +70 -0
- package/dist/runtime/interaction.d.ts +33 -0
- package/dist/runtime/interaction.js +217 -0
- package/dist/runtime/island-graph-preload.d.ts +13 -0
- package/dist/runtime/island-graph-preload.js +99 -0
- package/dist/runtime/kit-boot.d.ts +29 -0
- package/dist/runtime/kit-boot.js +60 -0
- package/dist/runtime/kit-page-thread.svelte.d.ts +1 -0
- package/dist/runtime/kit-page-thread.svelte.js +116 -0
- package/dist/runtime/lake-anchors.d.ts +13 -0
- package/dist/runtime/lake-anchors.js +19 -0
- package/dist/runtime/lakes.d.ts +15 -0
- package/dist/runtime/lakes.js +212 -0
- package/dist/runtime/live.d.ts +3 -0
- package/dist/runtime/live.js +17 -0
- package/dist/runtime/load-scheduler.d.ts +53 -0
- package/dist/runtime/load-scheduler.js +317 -0
- package/dist/runtime/morph.d.ts +42 -0
- package/dist/runtime/morph.js +671 -0
- package/dist/runtime/nav-handle.d.ts +25 -0
- package/dist/runtime/nav-handle.js +71 -0
- package/dist/runtime/nav-hooks.d.ts +2 -0
- package/dist/runtime/nav-hooks.js +23 -0
- package/dist/runtime/nearest-attr.d.ts +4 -0
- package/dist/runtime/nearest-attr.js +16 -0
- package/dist/runtime/observe.d.ts +27 -0
- package/dist/runtime/observe.js +63 -0
- package/dist/runtime/own-cost.d.ts +9 -0
- package/dist/runtime/own-cost.js +35 -0
- package/dist/runtime/ownership.d.ts +101 -0
- package/dist/runtime/ownership.js +115 -0
- package/dist/runtime/page-cache.d.ts +23 -0
- package/dist/runtime/page-cache.js +74 -0
- package/dist/runtime/page-defer.d.ts +14 -0
- package/dist/runtime/page-defer.js +103 -0
- package/dist/runtime/parse-html.d.ts +40 -0
- package/dist/runtime/parse-html.js +81 -0
- package/dist/runtime/reconcile.d.ts +41 -0
- package/dist/runtime/reconcile.js +194 -0
- package/dist/runtime/region-attrs.d.ts +95 -0
- package/dist/runtime/region-attrs.js +153 -0
- package/dist/runtime/region-endpoint-url.d.ts +76 -0
- package/dist/runtime/region-endpoint-url.js +169 -0
- package/dist/runtime/region-ids.d.ts +8 -0
- package/dist/runtime/region-ids.js +33 -0
- package/dist/runtime/remote-seeds.d.ts +2 -0
- package/dist/runtime/remote-seeds.js +21 -0
- package/dist/runtime/render-blocking.d.ts +2 -0
- package/dist/runtime/render-blocking.js +30 -0
- package/dist/runtime/restore.d.ts +34 -0
- package/dist/runtime/restore.js +390 -0
- package/dist/runtime/router-nav.d.ts +63 -0
- package/dist/runtime/router-nav.js +740 -0
- package/dist/runtime/router.d.ts +201 -0
- package/dist/runtime/router.js +593 -0
- package/dist/runtime/schedule.d.ts +49 -0
- package/dist/runtime/schedule.js +256 -0
- package/dist/runtime/seeds.d.ts +50 -0
- package/dist/runtime/seeds.js +208 -0
- package/dist/runtime/session.d.ts +52 -0
- package/dist/runtime/session.js +130 -0
- package/dist/runtime/sidecar.d.ts +3 -0
- package/dist/runtime/sidecar.js +56 -0
- package/dist/runtime/slots.d.ts +183 -0
- package/dist/runtime/slots.js +44 -0
- package/dist/runtime/spa-cacheable.d.ts +7 -0
- package/dist/runtime/spa-cacheable.js +18 -0
- package/dist/runtime/speculate-hint.d.ts +1 -0
- package/dist/runtime/speculate-hint.js +35 -0
- package/dist/runtime/svelte-warnings.d.ts +28 -0
- package/dist/runtime/svelte-warnings.js +71 -0
- package/dist/runtime/wire-classes.d.ts +3 -0
- package/dist/runtime/wire-classes.js +69 -0
- package/dist/runtime/wire-format.d.ts +7 -0
- package/dist/runtime/wire-format.js +22 -0
- package/dist/script.d.ts +134 -0
- package/dist/script.js +184 -0
- package/dist/seed-refs.d.ts +105 -0
- package/dist/seed-refs.js +487 -0
- package/dist/server/capability-lifetime.d.ts +28 -0
- package/dist/server/capability-lifetime.js +31 -0
- package/dist/server/dead-kit-resolves.d.ts +1 -0
- package/dist/server/dead-kit-resolves.js +39 -0
- package/dist/server/document-assembly.d.ts +30 -0
- package/dist/server/document-assembly.js +26 -0
- package/dist/server/document-tail.d.ts +113 -0
- package/dist/server/document-tail.js +208 -0
- package/dist/server/endpoint.d.ts +51 -0
- package/dist/server/endpoint.js +90 -0
- package/dist/server/entry-location.d.ts +8 -0
- package/dist/server/entry-location.js +29 -0
- package/dist/server/fingerprint.d.ts +1 -0
- package/dist/server/fingerprint.js +25 -0
- package/dist/server/head-presence.d.ts +45 -0
- package/dist/server/head-presence.js +156 -0
- package/dist/server/hmac.d.ts +38 -0
- package/dist/server/hmac.js +89 -0
- package/dist/server/hole-graph.d.ts +7 -0
- package/dist/server/hole-graph.js +71 -0
- package/dist/server/hole-urls.d.ts +3 -0
- package/dist/server/hole-urls.js +76 -0
- package/dist/server/html-scan.d.ts +19 -0
- package/dist/server/html-scan.js +60 -0
- package/dist/server/kit-context.d.ts +78 -0
- package/dist/server/kit-context.js +110 -0
- package/dist/server/late-wire.d.ts +22 -0
- package/dist/server/late-wire.js +28 -0
- package/dist/server/page-facts.d.ts +25 -0
- package/dist/server/page-facts.js +138 -0
- package/dist/server/page-seed.d.ts +33 -0
- package/dist/server/page-seed.js +60 -0
- package/dist/server/page-stream.d.ts +55 -0
- package/dist/server/page-stream.js +121 -0
- package/dist/server/payload.d.ts +6 -0
- package/dist/server/payload.js +22 -0
- package/dist/server/personal-response.d.ts +6 -0
- package/dist/server/personal-response.js +13 -0
- package/dist/server/props-wire.d.ts +56 -0
- package/dist/server/props-wire.js +178 -0
- package/dist/server/rate-limit.d.ts +22 -0
- package/dist/server/rate-limit.js +63 -0
- package/dist/server/region-css.d.ts +5 -0
- package/dist/server/region-css.js +30 -0
- package/dist/server/region-endpoint.d.ts +35 -0
- package/dist/server/region-endpoint.js +142 -0
- package/dist/server/region-props.d.ts +6 -0
- package/dist/server/region-props.js +44 -0
- package/dist/server/remote-seed-gate.d.ts +50 -0
- package/dist/server/remote-seed-gate.js +66 -0
- package/dist/server/render-cache.d.ts +26 -0
- package/dist/server/render-cache.js +51 -0
- package/dist/server/render-page.d.ts +51 -0
- package/dist/server/render-page.js +176 -0
- package/dist/server/render-region-html.d.ts +2 -0
- package/dist/server/render-region-html.js +19 -0
- package/dist/server/request-stats.d.ts +174 -0
- package/dist/server/request-stats.js +54 -0
- package/dist/server/reversible.d.ts +83 -0
- package/dist/server/reversible.js +994 -0
- package/dist/server/seed-shape.d.ts +22 -0
- package/dist/server/seed-shape.js +24 -0
- package/dist/server/shared-cache.d.ts +35 -0
- package/dist/server/shared-cache.js +104 -0
- package/dist/server/signing-key.d.ts +11 -0
- package/dist/server/signing-key.js +47 -0
- package/dist/server/sized-lru.d.ts +20 -0
- package/dist/server/sized-lru.js +68 -0
- package/dist/server/split-regions.d.ts +81 -0
- package/dist/server/split-regions.js +368 -0
- package/dist/server/stream-regions.d.ts +5 -0
- package/dist/server/stream-regions.js +36 -0
- package/dist/shared-state.d.ts +7 -0
- package/dist/shared-state.js +152 -0
- package/dist/shims/app-environment.d.ts +4 -0
- package/dist/shims/app-environment.js +6 -0
- package/dist/shims/app-navigation.d.ts +33 -0
- package/dist/shims/app-navigation.js +119 -0
- package/dist/shims/app-paths.d.ts +6 -0
- package/dist/shims/app-paths.js +18 -0
- package/dist/shims/app-state.svelte.d.ts +23 -0
- package/dist/shims/app-state.svelte.js +50 -0
- package/dist/shims/app-stores.d.ts +21 -0
- package/dist/shims/app-stores.js +54 -0
- package/dist/shims/kit-bridge.d.ts +29 -0
- package/dist/shims/kit-bridge.js +7 -0
- package/dist/shims/kit-remote/client-stub.d.ts +27 -0
- package/dist/shims/kit-remote/client-stub.js +43 -0
- package/dist/shims/kit-remote/paths-internal-stub.d.ts +3 -0
- package/dist/shims/kit-remote/paths-internal-stub.js +5 -0
- package/dist/shims/kit-remote/remote-cache.d.ts +49 -0
- package/dist/shims/kit-remote/remote-cache.js +73 -0
- package/dist/shims/kit-remote/state-stub.d.ts +8 -0
- package/dist/shims/kit-remote/state-stub.js +8 -0
- package/dist/shims/page-store.svelte.d.ts +39 -0
- package/dist/shims/page-store.svelte.js +77 -0
- package/dist/source.d.ts +29 -0
- package/dist/source.js +87 -0
- package/dist/store-transport.d.ts +86 -0
- package/dist/store-transport.js +229 -0
- package/dist/tool-fetches.d.ts +5 -0
- package/dist/tool-fetches.js +41 -0
- package/dist/transport.d.ts +48 -0
- package/dist/transport.js +181 -0
- package/dist/unscoped-css.d.ts +26 -0
- package/dist/unscoped-css.js +53 -0
- package/dist/vite/dev-maps.d.ts +33 -0
- package/dist/vite/dev-maps.js +140 -0
- package/dist/vite/index.d.ts +19 -0
- package/dist/vite/index.js +820 -0
- package/dist/vite/kit-dirs.d.ts +7 -0
- package/dist/vite/kit-dirs.js +67 -0
- package/dist/vite/late-island.d.ts +25 -0
- package/dist/vite/late-island.js +33 -0
- package/dist/vite/module-map.d.ts +8 -0
- package/dist/vite/module-map.js +144 -0
- package/dist/vite/options.d.ts +208 -0
- package/dist/vite/options.js +74 -0
- package/dist/vite/package-files.d.ts +3 -0
- package/dist/vite/package-files.js +84 -0
- package/dist/vite/paths.d.ts +45 -0
- package/dist/vite/paths.js +112 -0
- package/dist/vite/plugin-api.d.ts +166 -0
- package/dist/vite/plugin-api.js +212 -0
- package/dist/vite/profiler-maps.d.ts +23 -0
- package/dist/vite/profiler-maps.js +178 -0
- package/dist/vite/server-sourcemaps.d.ts +8 -0
- package/dist/vite/server-sourcemaps.js +80 -0
- package/dist/vite/sourcemaps.d.ts +18 -0
- package/dist/vite/sourcemaps.js +80 -0
- package/dist/vite/style-preprocess.d.ts +2 -0
- package/dist/vite/style-preprocess.js +96 -0
- package/package.json +180 -6
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { path } from "./host.js";
|
|
2
|
+
import { renderId } from "./region/identity.js";
|
|
3
|
+
// src/compiler/program.ts
|
|
4
|
+
/**
|
|
5
|
+
* The `Program` — the compiler's cross-file linker / island graph. It is the ONE long-lived,
|
|
6
|
+
* stateful phase: a deterministic reduction of every file's `IslandDescriptor[]` into a whole-program
|
|
7
|
+
* registry, deduped by content-hashed id. The blind, file-local front-end (parse ▸ analyze ▸ lower ▸
|
|
8
|
+
* emit) mints descriptors; the `Program` accumulates them — never their sources — and the linker's
|
|
9
|
+
* whole-program emitters read it.
|
|
10
|
+
*
|
|
11
|
+
* One instance per `Compiler` session, constructed in the plugin factory closure, never module-global
|
|
12
|
+
* — so Kit's throwaway plugin instance is a different `Program` and can't leak into the real build.
|
|
13
|
+
*
|
|
14
|
+
* State has an owner: the registry Maps + the feature-mark bag live here with the behavior over them
|
|
15
|
+
* (`register` / `unregister_host` / `note_runtime_mark`). Config-free by construction — it knows the
|
|
16
|
+
* descriptors, never the resolved build context (that is `CompileCtx`'s job).
|
|
17
|
+
*/
|
|
18
|
+
/** Strip a `?query` off a module id (host vs component vs Vite watch paths). */
|
|
19
|
+
const strip_id = (id) => id ? id.split("?")[0] : id;
|
|
20
|
+
/** Canonical absolute host key (query-stripped, resolved) — the registry's cross-host dedupe key. */
|
|
21
|
+
const host_key = (hostPath) => path.resolve(strip_id(hostPath));
|
|
22
|
+
var Program = class {
|
|
23
|
+
/** keyed by virtual path → the island's registry row (entry / wrapper / region binding) */
|
|
24
|
+
registry = /* @__PURE__ */ new Map();
|
|
25
|
+
/** Absolute module ids in an island's CLIENT dependency graph. `$app/*` resolves to shims
|
|
26
|
+
* for these importers (virtual island module AND its transitive component imports). */
|
|
27
|
+
island_graph = /* @__PURE__ */ new Set();
|
|
28
|
+
/** iid -> entry virtual path (hydrate / defer / swr-lake) */
|
|
29
|
+
by_id = /* @__PURE__ */ new Map();
|
|
30
|
+
/** every region id -> kind (server manifest / emit) */
|
|
31
|
+
region_kinds = /* @__PURE__ */ new Map();
|
|
32
|
+
/** host abs path → region ids + virtual paths discovered on last transform of that host */
|
|
33
|
+
host_index = /* @__PURE__ */ new Map();
|
|
34
|
+
/** region id → hosts still claiming it (cross-host dedupe: don't drop shared wrappers) */
|
|
35
|
+
id_hosts = /* @__PURE__ */ new Map();
|
|
36
|
+
/** Client-leg: hydrate island ids whose deterministic chunk has been emitFile'd (dedup across the
|
|
37
|
+
* buildStart prescan emit AND the transform-time emit that catches islands prescan can't see —
|
|
38
|
+
* those declared inside LIBRARY components, where the host lives outside the app's `src`). */
|
|
39
|
+
emitted_island_chunks = /* @__PURE__ */ new Set();
|
|
40
|
+
/** BUILD, server leg: every module id Vite actually transformed (`host_key`-normalised) — the
|
|
41
|
+
* server bundle's real graph. Handed to the client leg, which emits island chunks only for
|
|
42
|
+
* islands whose HOST is in it: the prescan registers every marked import under `src/`, but a
|
|
43
|
+
* host nothing imports (a second route tree's pages, a retired component) must not cost a
|
|
44
|
+
* chunk — or drag its imports into a client build whose server pass never saw them (a
|
|
45
|
+
* `.remote.ts` there fails Kit's "expected to find metadata" check). */
|
|
46
|
+
ssr_transformed = /* @__PURE__ */ new Set();
|
|
47
|
+
/** Absolute paths of app modules that define a transportable class (built during prescan). */
|
|
48
|
+
transportable_modules = /* @__PURE__ */ new Set();
|
|
49
|
+
/** PAGE MODULES (`b.pageModules()`: importers of a page specifier such as `'@ogygia/router'`, plus
|
|
50
|
+
* files named directly — server-router definition sites) + every walked
|
|
51
|
+
* module's import specifiers — the build data `virtual:ogygia/router-css` computes its
|
|
52
|
+
* component closure from (see link/router-css.ts). Filled during the prescan walk. */
|
|
53
|
+
router_modules = /* @__PURE__ */ new Set();
|
|
54
|
+
module_specs = /* @__PURE__ */ new Map();
|
|
55
|
+
/** flag()/experiment() call sites the prescan OBSERVED (modules importing 'ogygia' only) —
|
|
56
|
+
* written to node_modules/.ogygia/flags-manifest.json at build for CI flag-debt diffs. */
|
|
57
|
+
flag_sites = [];
|
|
58
|
+
/** SEED SHAPING: per module (query-less id, forward slashes), the top-level `page.data` keys its
|
|
59
|
+
* code reads — `'all'` when a read could not be pinned to a literal key. Recorded by the driver's
|
|
60
|
+
* transform for every module that imports Kit's page store (link/page-keys.ts); the client
|
|
61
|
+
* `writeBundle` unions them over each island's chunk closure (link/island-deps.ts), and the
|
|
62
|
+
* handle ships only those keys of `page.data`. */
|
|
63
|
+
page_keys = /* @__PURE__ */ new Map();
|
|
64
|
+
/** Per module that answered `'all'`: why, and on which line — the build report names it, so a
|
|
65
|
+
* developer sees the one read that makes a page ship its whole `page.data`. */
|
|
66
|
+
page_key_reasons = /* @__PURE__ */ new Map();
|
|
67
|
+
/** Per module: the `helper(page)` calls into IMPORTED helpers the build follows at `writeBundle`
|
|
68
|
+
* (resolve the specifier, summarize the export, fold the answer into `page_keys`). */
|
|
69
|
+
page_pending = /* @__PURE__ */ new Map();
|
|
70
|
+
/** App crosses a held region / transportable value through Kit's `transport` hook — a `.remote.*`
|
|
71
|
+
* file, or a `region`/`site`/content import (loads & remotes that carry regions or wired values).
|
|
72
|
+
* Set during the prescan walk; with `runtime_marks.wire` it decides whether `ogygia.transport`
|
|
73
|
+
* (the generated `virtual:ogygia/kit-transport`) carries the codec cluster or is an empty map. */
|
|
74
|
+
crosses_wire = false;
|
|
75
|
+
/** Build-time capability marks for the sticky runtime entry. Incomplete → kitchen-sink. */
|
|
76
|
+
runtime_marks;
|
|
77
|
+
/** The resolved feature set folded into the runtime chunk name (busts the immutable URL when the
|
|
78
|
+
* app's feature set changes, not only when ogygia's source does). Filled by the driver's prescan;
|
|
79
|
+
* empty until then (dev serves the package entry). Both build legs prescan the same source → same
|
|
80
|
+
* hash → the server↔client filename handoff holds. */
|
|
81
|
+
runtime_feature_hash = "";
|
|
82
|
+
constructor(init) {
|
|
83
|
+
this.runtime_marks = {
|
|
84
|
+
complete: false,
|
|
85
|
+
forms: init.forms,
|
|
86
|
+
wire: false,
|
|
87
|
+
remoteSeeds: true,
|
|
88
|
+
hydrate: [],
|
|
89
|
+
defer: [],
|
|
90
|
+
persistKeys: [],
|
|
91
|
+
router: init.router,
|
|
92
|
+
live: false,
|
|
93
|
+
lakes: false
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
note_runtime_mark(patch) {
|
|
97
|
+
const runtime_marks = this.runtime_marks;
|
|
98
|
+
if (patch.hydrate) runtime_marks.hydrate = [.../* @__PURE__ */ new Set([...runtime_marks.hydrate || [], ...patch.hydrate])];
|
|
99
|
+
if (patch.defer) runtime_marks.defer = [.../* @__PURE__ */ new Set([...runtime_marks.defer || [], ...patch.defer])];
|
|
100
|
+
if (patch.persistKeys) runtime_marks.persistKeys = [.../* @__PURE__ */ new Set([...runtime_marks.persistKeys || [], ...patch.persistKeys])];
|
|
101
|
+
if (patch.router) runtime_marks.router = true;
|
|
102
|
+
if (patch.live) runtime_marks.live = true;
|
|
103
|
+
if (patch.persist) runtime_marks.persist = true;
|
|
104
|
+
if (patch.morph) runtime_marks.morph = true;
|
|
105
|
+
if (patch.lakes) runtime_marks.lakes = true;
|
|
106
|
+
if (patch.wire) runtime_marks.wire = true;
|
|
107
|
+
}
|
|
108
|
+
/** Drop this host's claims; shared region ids (cross-host dedupe) stay until unused. */
|
|
109
|
+
unregister_host(hostPath) {
|
|
110
|
+
const { registry, island_graph, by_id, region_kinds, host_index, id_hosts } = this;
|
|
111
|
+
const key = host_key(hostPath);
|
|
112
|
+
const prev = host_index.get(key);
|
|
113
|
+
if (prev) {
|
|
114
|
+
for (const id of prev.ids) {
|
|
115
|
+
const holders = id_hosts.get(id);
|
|
116
|
+
if (holders) {
|
|
117
|
+
holders.delete(key);
|
|
118
|
+
if (holders.size === 0) {
|
|
119
|
+
id_hosts.delete(id);
|
|
120
|
+
region_kinds.delete(id);
|
|
121
|
+
by_id.delete(id);
|
|
122
|
+
}
|
|
123
|
+
} else {
|
|
124
|
+
region_kinds.delete(id);
|
|
125
|
+
by_id.delete(id);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
for (const vpath of prev.vpaths) {
|
|
129
|
+
const entry = registry.get(vpath);
|
|
130
|
+
if (entry) {
|
|
131
|
+
const holders = id_hosts.get(entry.id);
|
|
132
|
+
if (!holders || holders.size === 0) {
|
|
133
|
+
registry.delete(vpath);
|
|
134
|
+
island_graph.delete(vpath);
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
registry.delete(vpath);
|
|
138
|
+
island_graph.delete(vpath);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
host_index.delete(key);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/** Replace this host's claims; shared ids keep one registry entry (path+strategy dedupe). */
|
|
145
|
+
register(result, hostId) {
|
|
146
|
+
const { registry, island_graph, by_id, region_kinds, host_index, id_hosts } = this;
|
|
147
|
+
this.unregister_host(hostId);
|
|
148
|
+
const key = host_key(hostId);
|
|
149
|
+
if (result.hasWireCrossing) this.note_runtime_mark({ wire: true });
|
|
150
|
+
const idx = {
|
|
151
|
+
ids: /* @__PURE__ */ new Set(),
|
|
152
|
+
vpaths: /* @__PURE__ */ new Set()
|
|
153
|
+
};
|
|
154
|
+
for (const isl of result.islands ?? []) {
|
|
155
|
+
region_kinds.set(isl.id, isl.kind ?? (isl.server ? "defer" : "hydrate"));
|
|
156
|
+
idx.ids.add(isl.id);
|
|
157
|
+
const kind = isl.kind ?? (isl.server ? "defer" : "hydrate");
|
|
158
|
+
if (kind === "defer") this.note_runtime_mark({ defer: [isl.fetchWhen || "load"] });
|
|
159
|
+
if (kind === "hydrate") this.note_runtime_mark({ hydrate: [isl.strategy || "load"] });
|
|
160
|
+
if (isl.wakeAfter) this.note_runtime_mark({ hydrate: [isl.wakeAfter] });
|
|
161
|
+
if (kind === "lake") this.note_runtime_mark({
|
|
162
|
+
lakes: true,
|
|
163
|
+
hydrate: ["none"]
|
|
164
|
+
});
|
|
165
|
+
if (isl.held) this.note_runtime_mark({
|
|
166
|
+
live: true,
|
|
167
|
+
morph: true
|
|
168
|
+
});
|
|
169
|
+
if (isl.lakes?.length) this.note_runtime_mark({ lakes: true });
|
|
170
|
+
if (isl.keep) this.note_runtime_mark({
|
|
171
|
+
persist: true,
|
|
172
|
+
persistKeys: [isl.keep]
|
|
173
|
+
});
|
|
174
|
+
let holders = id_hosts.get(isl.id);
|
|
175
|
+
if (!holders) {
|
|
176
|
+
holders = /* @__PURE__ */ new Set();
|
|
177
|
+
id_hosts.set(isl.id, holders);
|
|
178
|
+
}
|
|
179
|
+
holders.add(key);
|
|
180
|
+
if (isl.wrapperPath && isl.wrapperSource) {
|
|
181
|
+
registry.set(isl.wrapperPath, {
|
|
182
|
+
source: isl.wrapperSource,
|
|
183
|
+
clientSource: isl.wrapperClientSource,
|
|
184
|
+
hostPath: isl.hostPath,
|
|
185
|
+
id: isl.id,
|
|
186
|
+
server: false,
|
|
187
|
+
lakes: isl.lakes ?? [],
|
|
188
|
+
componentPath: isl.componentPath ?? null,
|
|
189
|
+
role: "wrapper"
|
|
190
|
+
});
|
|
191
|
+
idx.vpaths.add(isl.wrapperPath);
|
|
192
|
+
island_graph.add(isl.wrapperPath);
|
|
193
|
+
}
|
|
194
|
+
if (isl.lazyPath && isl.lazySource) {
|
|
195
|
+
registry.set(isl.lazyPath, {
|
|
196
|
+
source: isl.lazySource,
|
|
197
|
+
hostPath: isl.hostPath,
|
|
198
|
+
id: isl.id,
|
|
199
|
+
server: false,
|
|
200
|
+
lakes: [],
|
|
201
|
+
componentPath: isl.componentPath ?? null,
|
|
202
|
+
role: "lazy"
|
|
203
|
+
});
|
|
204
|
+
idx.vpaths.add(isl.lazyPath);
|
|
205
|
+
island_graph.add(isl.lazyPath);
|
|
206
|
+
}
|
|
207
|
+
if (isl.bindingPath && isl.bindingSsrSource) {
|
|
208
|
+
registry.set(isl.bindingPath, {
|
|
209
|
+
ssrSource: isl.bindingSsrSource,
|
|
210
|
+
clientSource: isl.bindingClientSource ?? isl.bindingSsrSource,
|
|
211
|
+
hostPath: isl.hostPath,
|
|
212
|
+
id: isl.id,
|
|
213
|
+
server: false,
|
|
214
|
+
lakes: [],
|
|
215
|
+
componentPath: isl.componentPath ?? null,
|
|
216
|
+
role: "region"
|
|
217
|
+
});
|
|
218
|
+
idx.vpaths.add(isl.bindingPath);
|
|
219
|
+
island_graph.add(isl.bindingPath);
|
|
220
|
+
}
|
|
221
|
+
if (isl.virtualPath && isl.source) {
|
|
222
|
+
registry.set(isl.virtualPath, {
|
|
223
|
+
source: isl.source,
|
|
224
|
+
hostPath: isl.hostPath,
|
|
225
|
+
id: isl.id,
|
|
226
|
+
server: !!isl.server,
|
|
227
|
+
lakes: [],
|
|
228
|
+
componentPath: isl.componentPath ?? null,
|
|
229
|
+
role: "entry",
|
|
230
|
+
portable: isl.portable === true,
|
|
231
|
+
...isl.server && isl.identity ? { renderId: renderId(isl.identity) } : {}
|
|
232
|
+
});
|
|
233
|
+
by_id.set(isl.id, isl.virtualPath);
|
|
234
|
+
idx.vpaths.add(isl.virtualPath);
|
|
235
|
+
island_graph.add(isl.virtualPath);
|
|
236
|
+
} else if (isl.virtualPath) by_id.set(isl.id, isl.virtualPath);
|
|
237
|
+
if (isl.componentPath) island_graph.add(isl.componentPath);
|
|
238
|
+
}
|
|
239
|
+
host_index.set(key, idx);
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
export { Program, host_key, strip_id };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The component-import line for a generated module — a NAMED export (`import { Header as X } from
|
|
3
|
+
* '@barrel'`, the asRegion/barrel escape hatch) or a plain default (`import X from './X.svelte'`, a
|
|
4
|
+
* `.svelte` file or a package default). `exportName` is undefined/`'default'` for the default case.
|
|
5
|
+
*/
|
|
6
|
+
export declare function component_import_line(local: string, spec: string, exportName?: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* The island ENTRY module — a JS re-export of the real component, loaded on both client hydrate and
|
|
9
|
+
* server render. The transportables import registers every `[ogygia.wire]` codec before props decode,
|
|
10
|
+
* so an island receiving a transportable prop never needs to import the class itself. Shared by the
|
|
11
|
+
* `.svelte` host and the `.ts` registry (a `wake:` mark) so a mountable binding is built the same way
|
|
12
|
+
* from either.
|
|
13
|
+
*/
|
|
14
|
+
export declare function island_entry_source(componentPath: string, iid: string, exportName?: string): string;
|
|
15
|
+
/** Where an island entry's foreign-hydrate exports begin (compiler/driver.ts cuts from here). */
|
|
16
|
+
export declare const FOREIGN_HYDRATE_MARK = "// og:foreign-hydrate\n";
|
|
17
|
+
/**
|
|
18
|
+
* The island WRAPPER (`.svelte`) — a MOUNTABLE component that renders `<ogygia-region>` on its wake
|
|
19
|
+
* schedule. Placing it (`<C/>`, `<svelte:component this={C}/>`) emits the shell; the island's JS is
|
|
20
|
+
* fetched only when the shell wakes (e.g. `wake: 'visible'` → on scroll-into-view). Shared by the
|
|
21
|
+
* `.svelte` host and the `.ts` registry. `entry_url` is the resolved client/dev module URL the caller
|
|
22
|
+
* computes (ctx-dependent); `lang` is the `<script>` lang attribute (`''` for plain JS).
|
|
23
|
+
*/
|
|
24
|
+
export declare function island_wrapper_source(iid: string, componentPath: string, entryPath: string, strategy: string, options: Record<string, unknown> | undefined, exportName: string | undefined, entry_url: string, lang: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* The island wrapper's CLIENT leg (a csr=true-capable host imports it; Kit hydrates the island
|
|
27
|
+
* inline as a normal component). The SSR wrapper imports the component statically — it must
|
|
28
|
+
* render. The client wrapper must NOT: Kit links a route's `node.stylesheets` and preloads from the
|
|
29
|
+
* page's STATIC client graph, so a registry of N marked blocks imported by a csr=true route linked
|
|
30
|
+
* every block's CSS + chunk on every page (a newsroom page: 172 stylesheets for 4 islands). The
|
|
31
|
+
* component therefore comes through `lazy_entry_source` — a top-level-await module that imports
|
|
32
|
+
* the real entry only for the islands this document RENDERED (the SSR stamped a
|
|
33
|
+
* `<meta name="ogygia-kit-island">` per rendered island), so Kit still hydrates them in place with
|
|
34
|
+
* the component in hand, and a block nobody rendered costs nothing. Mounted fresh on a Kit
|
|
35
|
+
* client-side navigation (no SSR, no stamp), the wrapper loads the entry on demand and renders once
|
|
36
|
+
* it lands — a client render, so no hydration to mismatch.
|
|
37
|
+
*/
|
|
38
|
+
export declare function island_wrapper_client_source(iid: string, lazyPath: string, strategy: string, options: Record<string, unknown> | undefined, entry_url: string, lang: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* The client wrapper's component source (`lazyEntryVirtualId`). Decides ONCE, at module
|
|
41
|
+
* evaluation — before Kit hydrates, because Kit awaits the page node's import and a top-level
|
|
42
|
+
* await holds it. The two facts it reads are the document's own: `documentIsCsrTrue()` (the ONE
|
|
43
|
+
* csr fact Region reads on both legs) and the `<meta name="ogygia-kit-island">` stamp Region
|
|
44
|
+
* emits per rendered inline island (context.ts `claim_kit_island`).
|
|
45
|
+
* - not a Kit-hydrated document (the runtime woke this island's parent; no stamp exists there):
|
|
46
|
+
* import the entry now — a nested island must be in hand when its parent hydrates;
|
|
47
|
+
* - a Kit document that rendered this island: import the entry now, Kit hydrates it in place;
|
|
48
|
+
* - a Kit document that did NOT render it (an unrendered registry block): `undefined`, nothing
|
|
49
|
+
* fetched, nothing linked — `load()` is the on-demand path a client-side navigation takes.
|
|
50
|
+
* `entry_url` is the same string Region bakes into the stamp (`__entry`), on both legs.
|
|
51
|
+
*/
|
|
52
|
+
export declare function lazy_entry_source(entryPath: string, entry_url: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Build the held-region descriptor shared by the `.svelte` and `.ts` paths. It ALWAYS carries a
|
|
55
|
+
* client chunk + `__module` (the region MIGHT be woken); when used statically the chunk is simply
|
|
56
|
+
* never fetched (HTML only at runtime). Two marker flavors feed it:
|
|
57
|
+
* - `wake: 'x'` → bakes `__hydrate: 'x'` — `region(C, props)` wakes on that schedule.
|
|
58
|
+
* - `region: 'raw'` → bakes NO schedule — `region(C, props, { wake })` sets it at the call.
|
|
59
|
+
* `region()` reads `opts.wake ?? binding.__hydrate`, so a baked schedule is the default and the call
|
|
60
|
+
* can override. `kind` is always `'hydrate'` so the chunk is emitted; `server:true` — the endpoint
|
|
61
|
+
* renders the HTML either way.
|
|
62
|
+
*/
|
|
63
|
+
export declare function make_region_binding(opts: {
|
|
64
|
+
iid: string;
|
|
65
|
+
componentPath: string;
|
|
66
|
+
entryPath: string;
|
|
67
|
+
hostPath: string;
|
|
68
|
+
moduleUrl: string;
|
|
69
|
+
/** baked wake schedule from a `wake:` mark; absent for `region: 'raw'` (schedule set at the call) */
|
|
70
|
+
hydrate?: string;
|
|
71
|
+
/** rootMargin baked when `hydrate` is `'visible'` */
|
|
72
|
+
hydrateMargin?: string;
|
|
73
|
+
/** named export to pull (asRegion/barrel); undefined → default import */
|
|
74
|
+
exportName?: string;
|
|
75
|
+
identity: string;
|
|
76
|
+
}): {
|
|
77
|
+
id: string;
|
|
78
|
+
virtualPath: string;
|
|
79
|
+
source: string;
|
|
80
|
+
bindingPath: string;
|
|
81
|
+
bindingSsrSource: string;
|
|
82
|
+
bindingClientSource: string;
|
|
83
|
+
hostPath: string;
|
|
84
|
+
componentPath: string;
|
|
85
|
+
server: boolean;
|
|
86
|
+
kind: string;
|
|
87
|
+
held: boolean;
|
|
88
|
+
lakes: never[];
|
|
89
|
+
identity: string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* The complete island record for a `wake:` mark — the ONE emitter shared by the `.svelte` host (a
|
|
93
|
+
* placed `import X with { wake }`) and the `.ts` registry (a `wake:` mark handed to a renderer). The
|
|
94
|
+
* binding it produces is BOTH mountable (placing it, incl. via `<svelte:component>`, renders the
|
|
95
|
+
* `<ogygia-region>` shell that fetches the island JS only on its schedule) AND holdable (the descriptor
|
|
96
|
+
* fields ride on the wrapper, so `region(C)` still works). Threading both paths through here is what
|
|
97
|
+
* keeps `.svelte` and `.ts` `wake:` byte-identical — a `.ts` `wake: 'visible'` is exactly a `.svelte`
|
|
98
|
+
* `wake: 'visible'`. Callers own the host-specific import rewrite; this owns the record.
|
|
99
|
+
* `moduleUrl` is the resolved client/dev module URL; `lang` is the wrapper `<script>` lang (`''` = JS).
|
|
100
|
+
*/
|
|
101
|
+
export declare function make_wake_island(opts: {
|
|
102
|
+
iid: string;
|
|
103
|
+
componentPath: string;
|
|
104
|
+
entryPath: string;
|
|
105
|
+
wrapperPath: string;
|
|
106
|
+
moduleUrl: string;
|
|
107
|
+
strategy: string;
|
|
108
|
+
options?: Record<string, unknown>;
|
|
109
|
+
exportName?: string;
|
|
110
|
+
hostPath: string;
|
|
111
|
+
identity: string;
|
|
112
|
+
lang: string;
|
|
113
|
+
/**
|
|
114
|
+
* A `.ts` registry / remote binding, which may be handed to `region()` and CROSS the wire (a live
|
|
115
|
+
* or remote region): it needs a server-manifest entry (`server`) so its endpoint can render it, and
|
|
116
|
+
* the `held` mark that pulls in the live/morph runtime. A `.svelte` placed island never crosses, so
|
|
117
|
+
* it stays `server:false`. Either way the binding is the SAME mountable wrapper — only the manifest
|
|
118
|
+
* flags differ, which is also why the two carry distinct identities (an endpoint vs none).
|
|
119
|
+
*/
|
|
120
|
+
held?: boolean;
|
|
121
|
+
}): {
|
|
122
|
+
kind: string;
|
|
123
|
+
lakes: never[];
|
|
124
|
+
identity: string;
|
|
125
|
+
strategy: string;
|
|
126
|
+
keep: unknown;
|
|
127
|
+
held?: boolean;
|
|
128
|
+
id: string;
|
|
129
|
+
virtualPath: string;
|
|
130
|
+
wrapperPath: string;
|
|
131
|
+
wrapperSource: string;
|
|
132
|
+
wrapperClientSource: string;
|
|
133
|
+
lazyPath: string;
|
|
134
|
+
lazySource: string;
|
|
135
|
+
bindingPath: string;
|
|
136
|
+
bindingSsrSource: string;
|
|
137
|
+
bindingClientSource: string;
|
|
138
|
+
source: string;
|
|
139
|
+
hostPath: string;
|
|
140
|
+
componentPath: string;
|
|
141
|
+
server: boolean;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* The SERVER-island wrapper (`.svelte`) — `render: 'deferred'`: a hole whose HTML is fetched on the
|
|
145
|
+
* `wake` schedule. `__defer` carries the fetch schedule; `__cacheTtl` (when signed) sets the hole's
|
|
146
|
+
* response cache; a deferred island that ALSO hydrates carries `__hydrate` + `__module` (its client
|
|
147
|
+
* entry URL). `module_url` is the resolved client/dev entry URL (used only when it hydrates); `lang`
|
|
148
|
+
* is the wrapper `<script>` lang.
|
|
149
|
+
*/
|
|
150
|
+
export declare function server_wrapper_source(iid: string, componentPath: string, entryPath: string, options: Record<string, unknown> | undefined, exportName: string | undefined, module_url: string, lang: string, component?: boolean): string;
|
|
151
|
+
/**
|
|
152
|
+
* The LAKE wrapper (`.svelte`) — `render: page, wake: none`: a frozen region inside a hydrated island.
|
|
153
|
+
* A `swr` lake carries an endpoint (`__when` + `__props`) to remount on its schedule; `cache`/`empty`
|
|
154
|
+
* are wrapper-only. Static `<OgygiaLakeInner>` (not dynamic) preserves the LAKE-ENVELOPE; the client
|
|
155
|
+
* build swaps that import for the render-nothing stub. `lang` is the wrapper `<script>` lang.
|
|
156
|
+
*/
|
|
157
|
+
export declare function lake_wrapper_source(iid: string, componentPath: string, options: Record<string, unknown> | undefined, exportName: string | undefined, lang: string): string;
|
|
158
|
+
/** Map a hydrate strategy (+ options) to the Island wrapper attribute markup. */
|
|
159
|
+
export declare function strategy_to_attr(strategy: string, options?: Record<string, unknown>): string;
|
|
160
|
+
/** Rewrite `$app/{state,stores,navigation}` string literals to absolute shim paths. */
|
|
161
|
+
export declare const APP_SHIM_IMPORT: RegExp;
|
|
162
|
+
/**
|
|
163
|
+
* Rewrite a lake binding's import to the render-nothing placeholder (client island modules only).
|
|
164
|
+
* Default imports are repointed; named imports drop that specifier (and keep siblings) then add a
|
|
165
|
+
* default import of the placeholder under the same local name.
|
|
166
|
+
*
|
|
167
|
+
* @internal Used by the plugin client emit and unit tests.
|
|
168
|
+
*/
|
|
169
|
+
export declare function rewrite_lake_import_to_placeholder(src: string, local: string, placeholder: string): string;
|