@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,37 @@
|
|
|
1
|
+
import { KIT_REQUEST_CONTEXT, kit_request_event } from "./server/kit-context.js";
|
|
2
|
+
import { getContext } from "svelte";
|
|
3
|
+
// src/request-event.ts
|
|
4
|
+
/**
|
|
5
|
+
* `requestEvent()` — the request a server island is rendering for.
|
|
6
|
+
*
|
|
7
|
+
* A `render: 'deferred'` island renders on the origin, under the app's hooks, in the request that
|
|
8
|
+
* fetches it: the visitor's cookies, `locals`, `url` are all there. Kit's own `getRequestEvent()`
|
|
9
|
+
* (`$app/server`) would hand them over — but a component may not import `$app/server`, or any
|
|
10
|
+
* `$lib/server/*` module: the moment a csr=true page shares the layout, that component is in the
|
|
11
|
+
* CLIENT module graph and Kit's guard fails the build. Remote functions were the other channel;
|
|
12
|
+
* an app that has not adopted them has none.
|
|
13
|
+
*
|
|
14
|
+
* This is that channel, isomorphic by construction: on the server every render root ogygia starts
|
|
15
|
+
* carries the live event in Kit's `__request__` context (server/kit-context.ts), and under KIT'S own
|
|
16
|
+
* page render — whose `__request__` holds only `{ page }` — the event comes from the reader the
|
|
17
|
+
* handle installs (hooks.ts, Kit's request store). So a layout, or anything a page renders outside an
|
|
18
|
+
* island or hole, gets the event too. On the client neither exists and the call answers `null`.
|
|
19
|
+
* Read it during component init, like `getContext`.
|
|
20
|
+
*
|
|
21
|
+
* ```svelte
|
|
22
|
+
* <script lang="ts">
|
|
23
|
+
* import { requestEvent } from 'ogygia';
|
|
24
|
+
* import type { RequestEvent } from '@sveltejs/kit';
|
|
25
|
+
* const event = requestEvent<RequestEvent>();
|
|
26
|
+
* const user = event?.locals.user ?? null; // what hooks.server.ts resolved from the cookie
|
|
27
|
+
* <\/script>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
function requestEvent() {
|
|
31
|
+
try {
|
|
32
|
+
return getContext(KIT_REQUEST_CONTEXT)?.event ?? kit_request_event();
|
|
33
|
+
} catch {
|
|
34
|
+
return kit_request_event();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export { requestEvent };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component → CSS registry for the SERVER router (`@ogygia/router`, any page module).
|
|
3
|
+
*
|
|
4
|
+
* A router page/layout/error component is a runtime VALUE (`r.page(Home)`), so unlike a Kit route
|
|
5
|
+
* there is no file-derived place to link its stylesheets from — historically its `<style>` never
|
|
6
|
+
* reached the page (see link/router-css.ts for the whole story). The fix is Kit's association done
|
|
7
|
+
* value-wise: the build emits `virtual:ogygia/router-css`, a generated module (never user code) that
|
|
8
|
+
* imports each component the app's router modules can reach and registers it HERE with a thunk
|
|
9
|
+
* yielding its stylesheet entries. `componentCssHead()` (plugin/css.ts) then looks up exactly the
|
|
10
|
+
* components a render places and links them through `document()`'s head.
|
|
11
|
+
*
|
|
12
|
+
* The thunk shape covers both modes:
|
|
13
|
+
* - prod: `{ key, href }` — `<link rel="stylesheet">` to the emitted asset (key = the raw handoff
|
|
14
|
+
* href, so `claim_region_css` dedupes against a held region linking the same sheet).
|
|
15
|
+
* - dev: `{ key, css }` — inline `<style>` text compiled at emit time (Vite dev has no built
|
|
16
|
+
* asset to link; Kit inlines dev styles the same way).
|
|
17
|
+
*
|
|
18
|
+
* WeakMap: components registered but never rendered cost one entry, GC'd with the module graph.
|
|
19
|
+
*/
|
|
20
|
+
export interface RouterCssEntry {
|
|
21
|
+
/** Per-request dedupe key (claimed via `claim_region_css`, shared with region CSS claims). */
|
|
22
|
+
key: string;
|
|
23
|
+
/** Prod: stylesheet URL (base applied by the generated virtual). */
|
|
24
|
+
href?: string;
|
|
25
|
+
/** Dev: inline CSS text. */
|
|
26
|
+
css?: string;
|
|
27
|
+
}
|
|
28
|
+
/** True once the build's page-module registry has registered at least one component. */
|
|
29
|
+
export declare function router_css_active(): boolean;
|
|
30
|
+
/** Called by the generated `virtual:ogygia/router-css` — one registration per reachable component. */
|
|
31
|
+
export declare function register_router_css(component: unknown, entries: () => RouterCssEntry[]): void;
|
|
32
|
+
/** Dev-mode registration: `abs posix source path → entries`, no component identity needed. */
|
|
33
|
+
export declare function register_router_css_paths(map: Record<string, RouterCssEntry[]>): void;
|
|
34
|
+
/** The stylesheet entries for one rendered component — [] when unregistered (no styles, or the
|
|
35
|
+
* component reached the router outside its modules' import graph; dev warns on that case). */
|
|
36
|
+
export declare function router_css_of(component: unknown): RouterCssEntry[];
|
|
37
|
+
/** Dev-only: was this component registered at all? Lets the router warn when a STYLED component
|
|
38
|
+
* reached it from outside the detected import closure (the `makeRoutes(Comp)` injection pattern). */
|
|
39
|
+
export declare function router_css_known(component: unknown): boolean;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// src/router-css.ts
|
|
2
|
+
const registry = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
/** Did the generated registry register anything? It is empty only when no plugin declared page
|
|
4
|
+
* modules (`b.pageModules()`) — then a programmatic page renders without its CSS. */
|
|
5
|
+
let any_registered = false;
|
|
6
|
+
/** True once the build's page-module registry has registered at least one component. */
|
|
7
|
+
function router_css_active() {
|
|
8
|
+
return any_registered;
|
|
9
|
+
}
|
|
10
|
+
/** DEV registrations, keyed by the component's source path — pure DATA, no component imports.
|
|
11
|
+
*
|
|
12
|
+
* Structural constraint (learned the hard way): the generated dev virtual must not `import` the
|
|
13
|
+
* components it registers. The virtual is reachable from `ogygia/plugin/css` — which the profiler's
|
|
14
|
+
* handle welds into the graph territory SvelteKit's dev "inline all styles" collector can crawl
|
|
15
|
+
* from ANY page (via Kit's generated internal.js → hooks). Component imports would drag every
|
|
16
|
+
* router page's whole tree — scoped styles, plain `.css` imports — into that crawl, leaking a
|
|
17
|
+
* router page's stylesheets into unrelated app pages. So dev registers `path → entries` data and
|
|
18
|
+
* the lookup matches through Svelte's own dev metadata instead (see `filename_of`). */
|
|
19
|
+
const path_registry = /* @__PURE__ */ new Map();
|
|
20
|
+
/** Called by the generated `virtual:ogygia/router-css` — one registration per reachable component. */
|
|
21
|
+
function register_router_css(component, entries) {
|
|
22
|
+
any_registered = true;
|
|
23
|
+
if ((typeof component === "function" || typeof component === "object" && component !== null) && !registry.has(component)) registry.set(component, entries);
|
|
24
|
+
}
|
|
25
|
+
/** Dev-mode registration: `abs posix source path → entries`, no component identity needed. */
|
|
26
|
+
function register_router_css_paths(map) {
|
|
27
|
+
any_registered = true;
|
|
28
|
+
for (const key in map) path_registry.set(key, map[key]);
|
|
29
|
+
}
|
|
30
|
+
/** A dev-compiled Svelte 5 component carries its source path under svelte's `Symbol(filename)`
|
|
31
|
+
* (`Comp[$.FILENAME] = '/abs/….svelte'` — dev only). Read it by symbol DESCRIPTION rather than
|
|
32
|
+
* importing `svelte/internal/*`: this module is realm-shared, and pulling either internal entry
|
|
33
|
+
* would drag the wrong svelte runtime into the other realm's bundle. */
|
|
34
|
+
function filename_of(component) {
|
|
35
|
+
const sym = Object.getOwnPropertySymbols(component).find((s) => s.description === "filename");
|
|
36
|
+
const v = sym ? component[sym] : void 0;
|
|
37
|
+
return typeof v === "string" ? v : void 0;
|
|
38
|
+
}
|
|
39
|
+
/** The stylesheet entries for one rendered component — [] when unregistered (no styles, or the
|
|
40
|
+
* component reached the router outside its modules' import graph; dev warns on that case). */
|
|
41
|
+
function router_css_of(component) {
|
|
42
|
+
if (typeof component !== "function" && (typeof component !== "object" || component === null)) return [];
|
|
43
|
+
const thunk = registry.get(component);
|
|
44
|
+
if (thunk) try {
|
|
45
|
+
return thunk() ?? [];
|
|
46
|
+
} catch {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
if (path_registry.size) {
|
|
50
|
+
const file = filename_of(component);
|
|
51
|
+
if (file) return path_registry.get(file) ?? [];
|
|
52
|
+
}
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
/** Dev-only: was this component registered at all? Lets the router warn when a STYLED component
|
|
56
|
+
* reached it from outside the detected import closure (the `makeRoutes(Comp)` injection pattern). */
|
|
57
|
+
function router_css_known(component) {
|
|
58
|
+
if (typeof component !== "function" && (typeof component !== "object" || component === null)) return false;
|
|
59
|
+
if (registry.has(component)) return true;
|
|
60
|
+
if (path_registry.size) {
|
|
61
|
+
const file = filename_of(component);
|
|
62
|
+
if (file) return path_registry.has(file);
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
export { register_router_css, register_router_css_paths, router_css_active, router_css_known, router_css_of };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { decoders } from "virtual:ogygia/transport";
|
|
2
|
+
// src/runtime/app-transport.ts
|
|
3
|
+
/**
|
|
4
|
+
* The app's universal `transport` DECODERS, for the client page seed + streamed resolves — so a load's
|
|
5
|
+
* CUSTOM types (a class the app teaches Kit via `hooks.transport`) round-trip into islands, not just
|
|
6
|
+
* built-in devalue types. Isolated in its own module so the low-level `page-defer.ts` (imported by unit
|
|
7
|
+
* tests WITHOUT the vite plugin) never pulls `virtual:ogygia/transport`; `core.ts` imports this and
|
|
8
|
+
* injects the decoders. Universal hooks are isomorphic, so this is client-safe. Built once, in the
|
|
9
|
+
* virtual (compiler/link/transport.ts), with every other reader of the app codec.
|
|
10
|
+
*/
|
|
11
|
+
/** `{ [typeName]: decode }` from the app's `hooks.transport`; empty when the app defines none. */
|
|
12
|
+
const transport_decoders = decoders;
|
|
13
|
+
export { transport_decoders };
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { RegionRefusal } from "./region-endpoint-url.js";
|
|
2
|
+
export declare function beacon_mark(name: string, ms: number, attrs?: Record<string, string | number | boolean>, t0?: number): void;
|
|
3
|
+
interface Vitals {
|
|
4
|
+
ttfb?: number;
|
|
5
|
+
fcp?: number;
|
|
6
|
+
lcp?: number;
|
|
7
|
+
cls?: number;
|
|
8
|
+
inp?: number;
|
|
9
|
+
}
|
|
10
|
+
interface VisitIslandRec {
|
|
11
|
+
fp: string;
|
|
12
|
+
entry?: string;
|
|
13
|
+
t0: number;
|
|
14
|
+
loaded: number;
|
|
15
|
+
/** when its scheduler turn began (after the module load and the queue behind other islands):
|
|
16
|
+
* `done - turn` is the hydrate step alone, `turn - loaded` the wait for its turn */
|
|
17
|
+
turn?: number;
|
|
18
|
+
done: number;
|
|
19
|
+
/** when its effects had run (Svelte runs them in a microtask after `hydrate()`), when 1 ms or
|
|
20
|
+
* more after `done`: the end of the island's own work */
|
|
21
|
+
fx?: number;
|
|
22
|
+
recovered?: boolean;
|
|
23
|
+
changed?: boolean;
|
|
24
|
+
/** a change only in attributes (same elements, same text): each one, as `attr_changes` tells them —
|
|
25
|
+
* often a custom element setting its own (`tabindex`, `aria-*`) as it upgrades, not the app
|
|
26
|
+
* rendering differently. Absent when text or elements differ too. */
|
|
27
|
+
attrs?: AttrChange[];
|
|
28
|
+
/** input landed on it between its wake and its hydrate (a pointer over it, a key, focus): its DOM
|
|
29
|
+
* may have answered that input, so a change is not only the render */
|
|
30
|
+
input?: string;
|
|
31
|
+
/** another script edited it before it woke; the runtime put the server markup back */
|
|
32
|
+
healed?: boolean;
|
|
33
|
+
ssr_bytes?: number;
|
|
34
|
+
/** a recovered island whose markup ARRIVED with Svelte's block markers unpaired (`<!--[` openers
|
|
35
|
+
* against `<!--]` closers): something rewrote them on the way — a render always pairs them */
|
|
36
|
+
markers?: [number, number];
|
|
37
|
+
}
|
|
38
|
+
interface Shift {
|
|
39
|
+
t: number;
|
|
40
|
+
value: number;
|
|
41
|
+
fp?: string;
|
|
42
|
+
/** the element that moved, told briefly */
|
|
43
|
+
tag?: string;
|
|
44
|
+
from?: [number, number, number, number];
|
|
45
|
+
to?: [number, number, number, number];
|
|
46
|
+
}
|
|
47
|
+
/** One attribute that differs between the server's markup and the island's after hydrate. */
|
|
48
|
+
export interface AttrChange {
|
|
49
|
+
tag: string;
|
|
50
|
+
name: string;
|
|
51
|
+
from: string | null;
|
|
52
|
+
to: string | null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* When two markups (comments out) differ ONLY in attributes — the same elements in the same order, the
|
|
56
|
+
* same text — each attribute that differs (at most 20); `null` when text or elements differ. A walk of
|
|
57
|
+
* both strings tag by tag, no regex: it runs once per changed island.
|
|
58
|
+
*/
|
|
59
|
+
export declare function attr_changes(a: string, b: string): AttrChange[] | null;
|
|
60
|
+
export declare function beacon_warning(w: {
|
|
61
|
+
code: string;
|
|
62
|
+
message: string;
|
|
63
|
+
file?: string;
|
|
64
|
+
fp?: string;
|
|
65
|
+
t: number;
|
|
66
|
+
}): void;
|
|
67
|
+
/** holes whose answer never came (no retry after): the profiler names them like the devtools do */
|
|
68
|
+
export interface HoleFailed {
|
|
69
|
+
/** the hole's island id (its endpoint's `?id=`): the report's hole rows name it */
|
|
70
|
+
id: string;
|
|
71
|
+
reason: RegionRefusal | "error";
|
|
72
|
+
/** what answered instead, as a path (a refused answer) */
|
|
73
|
+
final_path?: string;
|
|
74
|
+
/** the error's first line (a failed request), or the server's reason (a refused capability) */
|
|
75
|
+
message?: string;
|
|
76
|
+
attempts: number;
|
|
77
|
+
t: number;
|
|
78
|
+
}
|
|
79
|
+
export declare function beacon_hole_failed(h: HoleFailed): void;
|
|
80
|
+
/**
|
|
81
|
+
* A file's type, for the byte counts and the lanes: its extension first, then the `<link>` that
|
|
82
|
+
* fetched it (`as`), then what started it. A `link` initiator is NOT a stylesheet by itself: a
|
|
83
|
+
* `<link rel=preload>` fetches whatever its `as` says — a hole's preload fetches HTML, from a URL
|
|
84
|
+
* with no extension, and every first-screen hole answer landed in the CSS column (and One clock's
|
|
85
|
+
* CSS lane). (Chromium reports a modulepreload's initiator as `other`; its `.js` decides anyway.)
|
|
86
|
+
*/
|
|
87
|
+
export declare function resource_type(ext: string, initiator: string, link_as?: string): string;
|
|
88
|
+
export interface HoleAnswered {
|
|
89
|
+
/** the hole's island id (its endpoint's `?id=`) */
|
|
90
|
+
id: string;
|
|
91
|
+
/** its place in the visit's list (copies of one component share the id) */
|
|
92
|
+
n: number;
|
|
93
|
+
/** when its fetch started, and when its answer replaced the fallback (page time, ms) */
|
|
94
|
+
start: number;
|
|
95
|
+
t: number;
|
|
96
|
+
/** below the first screen when it swapped: its fallback was not what the visitor looked at */
|
|
97
|
+
below_fold: boolean;
|
|
98
|
+
/** its request, as the browser timed it (page time): left, first byte back, last byte */
|
|
99
|
+
left?: number;
|
|
100
|
+
first?: number;
|
|
101
|
+
end?: number;
|
|
102
|
+
/** the server's split (Server-Timing): its wait for a render slot, and the render */
|
|
103
|
+
queue?: number;
|
|
104
|
+
render?: number;
|
|
105
|
+
/** it came in ONE batch request with this many holes (`left` the batch's, `first`/`end` its
|
|
106
|
+
* own part's landing, out of order) — no request of its own */
|
|
107
|
+
batch?: number;
|
|
108
|
+
/** which copy (runtime/hash.ts `hole_copy_of` its endpoint): copies of one component share the id */
|
|
109
|
+
p?: string;
|
|
110
|
+
}
|
|
111
|
+
/** A batch request that carried fewer holes than it was sent for (runtime/frame-nav.ts). */
|
|
112
|
+
export interface HoleBatchMiss {
|
|
113
|
+
sent: number;
|
|
114
|
+
delivered: number;
|
|
115
|
+
status: number;
|
|
116
|
+
refused?: "redirected" | "document";
|
|
117
|
+
final_url?: string;
|
|
118
|
+
/** the holes' island ids */
|
|
119
|
+
ids: string[];
|
|
120
|
+
}
|
|
121
|
+
export declare function beacon_hole_batch_missed(m: Omit<HoleBatchMiss, "ids"> & {
|
|
122
|
+
endpoints: string[];
|
|
123
|
+
}): void;
|
|
124
|
+
/** The browser's timing of the request that answered a hole: the latest one for its URL done by
|
|
125
|
+
* `by` (the swap). It may predate the runtime (the document preloads first-screen holes). `left`
|
|
126
|
+
* is when it went on the wire (`requestStart`: after any wait for a connection), not when it was
|
|
127
|
+
* asked for. Null when the resource buffer has none (full, or no Resource Timing). */
|
|
128
|
+
export declare function hole_request_times(endpoint: string, by: number): {
|
|
129
|
+
left: number;
|
|
130
|
+
first: number;
|
|
131
|
+
end: number;
|
|
132
|
+
queue?: number;
|
|
133
|
+
render?: number;
|
|
134
|
+
} | null;
|
|
135
|
+
/** An island whose LOCATION failed to load and fell back to its identity fetched fresh
|
|
136
|
+
* (runtime/entry-locations.ts): the page came from a build whose files are gone. */
|
|
137
|
+
export interface EntryFallback {
|
|
138
|
+
/** the identity (the stable URL) */
|
|
139
|
+
entry: string;
|
|
140
|
+
/** the location that failed */
|
|
141
|
+
src: string;
|
|
142
|
+
/** the fresh identity loaded (false: that failed too) */
|
|
143
|
+
recovered: boolean;
|
|
144
|
+
}
|
|
145
|
+
export declare function beacon_entry_fallback(f: EntryFallback): void;
|
|
146
|
+
/** The runtime asks for a hole's HTML (each ask, retries and re-asks included): what lets a
|
|
147
|
+
* preload followed by a download read as used-then-asked-again, not as a preload the browser could
|
|
148
|
+
* not use. */
|
|
149
|
+
export declare function beacon_hole_fetched(endpoint: string): void;
|
|
150
|
+
/** A hole's first answer landed: the profiler weighs how long its fallback held the first screen.
|
|
151
|
+
* The element is read (id, place) only while measuring. */
|
|
152
|
+
export declare function beacon_hole_answered(el: Element, start: number, batch?: {
|
|
153
|
+
left: number;
|
|
154
|
+
at: number;
|
|
155
|
+
size: number;
|
|
156
|
+
}): void;
|
|
157
|
+
/** An island's markup as the server sent it, after it hydrated, and at the visit's end. A big
|
|
158
|
+
* island keeps only the window around where the two first differ, without comments (`from`: where
|
|
159
|
+
* the window starts in that text) — its first 24 KB would quote the cut, not the change. */
|
|
160
|
+
export interface Snapshot {
|
|
161
|
+
fp: string;
|
|
162
|
+
ssr: string;
|
|
163
|
+
hydrated: string;
|
|
164
|
+
final?: string;
|
|
165
|
+
from?: number;
|
|
166
|
+
}
|
|
167
|
+
/** `slim`: the same message without what earlier messages already delivered, for a page going
|
|
168
|
+
* away with a body too big to leave (the server keeps the longest file list and merges regions).
|
|
169
|
+
* A page with ~300 islands sent 100 KB: refused by both, and the fetch's rejection went unhandled,
|
|
170
|
+
* so the profiler never got that page's browser side at all. */
|
|
171
|
+
declare function send(body: string, slim?: () => string): void;
|
|
172
|
+
/** a kept trace; an interaction's carries its spans (the wait, the handlers) */
|
|
173
|
+
export interface CpuKept {
|
|
174
|
+
trace: unknown;
|
|
175
|
+
from: number;
|
|
176
|
+
to: number;
|
|
177
|
+
label: string;
|
|
178
|
+
spans?: {
|
|
179
|
+
t: number;
|
|
180
|
+
wait: [number, number];
|
|
181
|
+
handler: [number, number];
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
/** THE IN-APP NAVIGATIONS (the router's body swaps), each on the page's clock: its start, the page
|
|
185
|
+
* fetched, its stylesheets in, the swap committed. A slow one is a cost the document's own timing
|
|
186
|
+
* never shows; the islands the new page woke are in the visit's island list, after `swapped`. */
|
|
187
|
+
interface NavRec {
|
|
188
|
+
from: string;
|
|
189
|
+
to: string;
|
|
190
|
+
type: string;
|
|
191
|
+
t: number;
|
|
192
|
+
fetched: number;
|
|
193
|
+
styled: number;
|
|
194
|
+
swapped: number;
|
|
195
|
+
/** the page's address as fetched: its resource timing splits the fetch */
|
|
196
|
+
href?: string;
|
|
197
|
+
}
|
|
198
|
+
export declare function beacon_nav(n: NavRec): void;
|
|
199
|
+
export declare function beacon_failed(el: Element, message?: string, since?: number, turn?: number): void;
|
|
200
|
+
/**
|
|
201
|
+
* Record one island's hydration. `t0` is when the wake began (before the module load), `t_loaded`
|
|
202
|
+
* when its modules were in hand, `t_done` when `data-hydrated` was set; `ssr_html` is the markup
|
|
203
|
+
* the server sent (the runtime's own copy), compared with what the island shows now. No-op
|
|
204
|
+
* without the tag.
|
|
205
|
+
*/
|
|
206
|
+
export declare function beacon_hydrated(el: Element, t0: number, t_loaded: number, t_done: number, ssr_html?: string | null, t_turn?: number): void;
|
|
207
|
+
/** `html` without the runtime's own marks (string search, no regex: it runs per changed hydration) */
|
|
208
|
+
export declare function without_runtime_marks(html: string): string;
|
|
209
|
+
/** A HEADLESS island: it renders nothing meant to be seen — no text of its own, and every element
|
|
210
|
+
* child marked `hidden` (a marker its effects hang on) — so it exists for its effects, and the
|
|
211
|
+
* screen sizes that would show it are no question. */
|
|
212
|
+
export declare function is_headless(el: Element): boolean;
|
|
213
|
+
/** `html` with every `<!-- … -->` removed (string search, no regex: it runs per hydration). */
|
|
214
|
+
export declare function without_comments(html: string): string;
|
|
215
|
+
/** Start watching the page's paints, shifts, long tasks and first interactions now (the devtools
|
|
216
|
+
* boot calls this, so a page whose islands never wake is still measured). Idempotent. */
|
|
217
|
+
export declare function beacon_watch(): void;
|
|
218
|
+
/** Devtools: sample the main thread for `ms` from now (a click, a scroll, a nav) and keep the trace
|
|
219
|
+
* in the page. Resolves when it is kept; false when the browser cannot sample here. */
|
|
220
|
+
export declare function beacon_record_cpu(ms: number, label: string): Promise<boolean>;
|
|
221
|
+
/** What the browser saw of this document so far, for the devtools Page tab: the vitals, the visit
|
|
222
|
+
* (navigation, paints, resources, long tasks, islands, first interactions, shifts, marks) and the
|
|
223
|
+
* islands' markup before and after hydration. A fresh copy each call; null off a devtools build
|
|
224
|
+
* without the tag. */
|
|
225
|
+
export interface BeaconPage {
|
|
226
|
+
vitals: Vitals;
|
|
227
|
+
visit: Record<string, unknown> | null;
|
|
228
|
+
islands: VisitIslandRec[];
|
|
229
|
+
firsts: {
|
|
230
|
+
fp: string;
|
|
231
|
+
t: number;
|
|
232
|
+
type: string;
|
|
233
|
+
}[];
|
|
234
|
+
shifts: Shift[];
|
|
235
|
+
longtasks: {
|
|
236
|
+
t: number;
|
|
237
|
+
ms: number;
|
|
238
|
+
}[];
|
|
239
|
+
/** `frames`: this browser has no long-task timing; they are frames drawn late */
|
|
240
|
+
longtasks_from?: "frames";
|
|
241
|
+
/** `boxes`: this browser has no layout-shift timing; the shifts are islands' boxes changing as they woke */
|
|
242
|
+
shifts_from?: "boxes";
|
|
243
|
+
marks: {
|
|
244
|
+
name: string;
|
|
245
|
+
ms: number;
|
|
246
|
+
t0?: number;
|
|
247
|
+
}[];
|
|
248
|
+
snapshots: Snapshot[];
|
|
249
|
+
/** the main thread, sampled (JS Self-Profiling): the load trace and recordings, newest first */
|
|
250
|
+
cpu: {
|
|
251
|
+
state: "recording" | "done" | "off";
|
|
252
|
+
off?: string | null;
|
|
253
|
+
traces: CpuKept[];
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
export declare function beacon_page(): BeaconPage | null;
|
|
257
|
+
/** @internal tests */
|
|
258
|
+
export declare function _reset_beacon(): void;
|
|
259
|
+
/** @internal tests */
|
|
260
|
+
export declare function _beacon_state(): {
|
|
261
|
+
target: string | null | undefined;
|
|
262
|
+
queued: number;
|
|
263
|
+
marks: number;
|
|
264
|
+
scheduled: boolean;
|
|
265
|
+
snapshots: number;
|
|
266
|
+
};
|
|
267
|
+
/** @internal tests: the size-aware send */
|
|
268
|
+
export declare const _beacon_send: typeof send;
|
|
269
|
+
/** @internal tests: a send from inside the hide (a page leaving while it still reads "visible") */
|
|
270
|
+
export declare function _beacon_send_leaving(body: string, slim?: () => string): void;
|
|
271
|
+
export {};
|