@ogygia/core 0.12.3 → 0.13.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.
Files changed (226) hide show
  1. package/dist/LateIsland.svelte +3 -2
  2. package/dist/LateIslandAwait.svelte +6 -2
  3. package/dist/Region.svelte +22 -33
  4. package/dist/boundary.d.ts +0 -2
  5. package/dist/boundary.js +8 -6
  6. package/dist/compiler/debarrel/barrel.d.ts +15 -8
  7. package/dist/compiler/debarrel/barrel.js +92 -45
  8. package/dist/compiler/debarrel/plugin.js +41 -17
  9. package/dist/compiler/dev/dev-hmr.d.ts +3 -0
  10. package/dist/compiler/dev/dev-hmr.js +3 -0
  11. package/dist/compiler/driver.js +11 -4
  12. package/dist/compiler/flags.js +21 -7
  13. package/dist/compiler/fouc-css.js +5 -1
  14. package/dist/compiler/kit.js +5 -1
  15. package/dist/compiler/link/build-output.js +12 -3
  16. package/dist/compiler/macros/bake.js +18 -4
  17. package/dist/compiler/macros/dollar.js +6 -1
  18. package/dist/compiler/macros/source.js +6 -1
  19. package/dist/compiler/macros/store.js +10 -2
  20. package/dist/compiler/macros/wire.js +6 -1
  21. package/dist/compiler/parse/scan.js +10 -3
  22. package/dist/compiler/region/transform.js +188 -74
  23. package/dist/context-bridge.js +13 -5
  24. package/dist/context.d.ts +9 -0
  25. package/dist/context.js +30 -1
  26. package/dist/document.d.ts +1 -1
  27. package/dist/document.js +7 -1
  28. package/dist/early-holes-head.d.ts +5 -0
  29. package/dist/early-holes-head.js +20 -0
  30. package/dist/early-holes.d.ts +34 -0
  31. package/dist/early-holes.js +51 -0
  32. package/dist/entry-hydrate.js +9 -12
  33. package/dist/events/bus.js +7 -2
  34. package/dist/events/schema.d.ts +2 -2
  35. package/dist/fn-transport.js +4 -3
  36. package/dist/hooks.js +94 -163
  37. package/dist/insights/page-assets.js +11 -3
  38. package/dist/insights/page-insights.d.ts +0 -2
  39. package/dist/insights/page-insights.js +14 -10
  40. package/dist/insights/session-insights.js +2 -2
  41. package/dist/internal-instruments.d.ts +3 -1
  42. package/dist/internal-instruments.js +3 -1
  43. package/dist/internal-server.d.ts +3 -2
  44. package/dist/internal-server.js +3 -2
  45. package/dist/internal.d.ts +1 -2
  46. package/dist/internal.js +1 -2
  47. package/dist/keep-fallback.d.ts +0 -2
  48. package/dist/keep-fallback.js +4 -5
  49. package/dist/live-transport.js +3 -2
  50. package/dist/messages/build.d.ts +585 -0
  51. package/dist/messages/build.js +800 -0
  52. package/dist/messages/core.d.ts +464 -0
  53. package/dist/messages/core.js +843 -0
  54. package/dist/messages/define.d.ts +62 -0
  55. package/dist/messages/define.js +49 -0
  56. package/dist/messages/index.d.ts +6 -0
  57. package/dist/messages/index.js +6 -0
  58. package/dist/messages/island.d.ts +4 -0
  59. package/dist/messages/island.js +34 -0
  60. package/dist/messages/lazy.d.ts +3 -0
  61. package/dist/messages/lazy.js +22 -0
  62. package/dist/messages/prose.d.ts +15 -0
  63. package/dist/messages/prose.js +43 -0
  64. package/dist/messages/server.d.ts +142 -0
  65. package/dist/messages/server.js +246 -0
  66. package/dist/nested.d.ts +3 -0
  67. package/dist/nested.js +8 -1
  68. package/dist/plugin/css.js +14 -13
  69. package/dist/plugin/facts.d.ts +2 -0
  70. package/dist/plugin/facts.js +10 -6
  71. package/dist/plugin/hooks.d.ts +7 -17
  72. package/dist/plugin/hooks.js +32 -4
  73. package/dist/plugin/index.d.ts +9 -2
  74. package/dist/plugin/request-scope.d.ts +20 -0
  75. package/dist/plugin/request-scope.js +149 -0
  76. package/dist/plugin/server.d.ts +20 -2
  77. package/dist/plugin/server.js +98 -28
  78. package/dist/plugin/testing.d.ts +6 -0
  79. package/dist/plugin/testing.js +14 -2
  80. package/dist/policies.d.ts +21 -0
  81. package/dist/policies.js +66 -0
  82. package/dist/preference.js +6 -1
  83. package/dist/preload.js +6 -9
  84. package/dist/ref-watch.d.ts +0 -10
  85. package/dist/ref-watch.js +14 -1
  86. package/dist/ref.js +17 -5
  87. package/dist/region-snippet.js +9 -3
  88. package/dist/region.js +2 -1
  89. package/dist/report-thrown.d.ts +9 -0
  90. package/dist/report-thrown.js +15 -0
  91. package/dist/rules.d.ts +17 -0
  92. package/dist/rules.js +57 -0
  93. package/dist/runtime/beacon.d.ts +0 -4
  94. package/dist/runtime/beacon.js +58 -43
  95. package/dist/runtime/boot-link.js +19 -2
  96. package/dist/runtime/client-hooks.js +2 -1
  97. package/dist/runtime/concurrency.d.ts +16 -5
  98. package/dist/runtime/concurrency.js +123 -7
  99. package/dist/runtime/core.d.ts +3 -1
  100. package/dist/runtime/core.js +718 -384
  101. package/dist/runtime/devalue-lane.d.ts +13 -0
  102. package/dist/runtime/devalue-lane.js +49 -0
  103. package/dist/runtime/disclose-version.d.ts +1 -0
  104. package/dist/runtime/disclose-version.js +14 -0
  105. package/dist/runtime/early-holes.d.ts +4 -0
  106. package/dist/runtime/early-holes.js +40 -0
  107. package/dist/runtime/entry-locations.js +40 -49
  108. package/dist/runtime/foreign-props.d.ts +0 -7
  109. package/dist/runtime/foreign-props.js +2 -1
  110. package/dist/runtime/form-continuity.d.ts +2 -2
  111. package/dist/runtime/form-continuity.js +30 -8
  112. package/dist/runtime/frame-nav.d.ts +7 -1
  113. package/dist/runtime/frame-nav.js +84 -18
  114. package/dist/runtime/frame-store.d.ts +25 -16
  115. package/dist/runtime/frame-store.js +124 -98
  116. package/dist/runtime/frames.js +8 -4
  117. package/dist/runtime/hole-facts.js +6 -7
  118. package/dist/runtime/hole-fetch.d.ts +17 -0
  119. package/dist/runtime/hole-fetch.js +47 -0
  120. package/dist/runtime/hydrate-core.d.ts +4 -4
  121. package/dist/runtime/hydrate-core.js +80 -64
  122. package/dist/runtime/import-again.d.ts +33 -0
  123. package/dist/runtime/import-again.js +217 -0
  124. package/dist/runtime/interaction-replay.d.ts +5 -3
  125. package/dist/runtime/interaction-replay.js +6 -6
  126. package/dist/runtime/interaction.d.ts +14 -3
  127. package/dist/runtime/interaction.js +46 -23
  128. package/dist/runtime/kit-page-thread.svelte.d.ts +2 -1
  129. package/dist/runtime/kit-page-thread.svelte.js +44 -20
  130. package/dist/runtime/lakes.d.ts +1 -1
  131. package/dist/runtime/lakes.js +18 -5
  132. package/dist/runtime/live.d.ts +1 -2
  133. package/dist/runtime/live.js +6 -8
  134. package/dist/runtime/load-scheduler.d.ts +29 -18
  135. package/dist/runtime/load-scheduler.js +236 -136
  136. package/dist/runtime/nav-handle.js +25 -6
  137. package/dist/runtime/navigation.d.ts +24 -0
  138. package/dist/runtime/navigation.js +24 -0
  139. package/dist/runtime/ownership.d.ts +1 -1
  140. package/dist/runtime/page-defer.js +3 -3
  141. package/dist/runtime/parse-html.d.ts +15 -4
  142. package/dist/runtime/parse-html.js +24 -5
  143. package/dist/runtime/pushable-props.svelte.d.ts +21 -0
  144. package/dist/runtime/pushable-props.svelte.js +37 -0
  145. package/dist/runtime/region-endpoint-url.js +4 -6
  146. package/dist/runtime/region-machines.d.ts +111 -0
  147. package/dist/runtime/region-machines.js +97 -0
  148. package/dist/runtime/region-sheets.d.ts +31 -0
  149. package/dist/runtime/region-sheets.js +49 -0
  150. package/dist/runtime/restore-report.d.ts +1 -0
  151. package/dist/runtime/restore-report.js +36 -0
  152. package/dist/runtime/restore.d.ts +5 -2
  153. package/dist/runtime/restore.js +33 -14
  154. package/dist/runtime/router-nav.d.ts +32 -12
  155. package/dist/runtime/router-nav.js +320 -228
  156. package/dist/runtime/router.d.ts +83 -19
  157. package/dist/runtime/router.js +297 -129
  158. package/dist/runtime/rules.d.ts +35 -0
  159. package/dist/runtime/rules.js +137 -0
  160. package/dist/runtime/schedule.d.ts +6 -3
  161. package/dist/runtime/schedule.js +172 -57
  162. package/dist/runtime/seeds.d.ts +5 -1
  163. package/dist/runtime/seeds.js +11 -5
  164. package/dist/runtime/session.d.ts +46 -7
  165. package/dist/runtime/session.js +78 -10
  166. package/dist/runtime/slots.d.ts +53 -20
  167. package/dist/runtime/slots.js +2 -3
  168. package/dist/runtime/soft-refresh.d.ts +16 -0
  169. package/dist/runtime/soft-refresh.js +14 -0
  170. package/dist/runtime/svelte-warnings.d.ts +4 -10
  171. package/dist/runtime/svelte-warnings.js +7 -4
  172. package/dist/runtime/wire-classes.js +21 -8
  173. package/dist/runtime/wire-format.js +6 -3
  174. package/dist/script.js +8 -7
  175. package/dist/seed-ref-reviver.d.ts +0 -9
  176. package/dist/seed-ref-reviver.js +2 -1
  177. package/dist/seed-refs.d.ts +46 -36
  178. package/dist/seed-refs.js +131 -92
  179. package/dist/server/document-tail.d.ts +6 -0
  180. package/dist/server/document-tail.js +7 -1
  181. package/dist/server/early-holes-csp.d.ts +14 -0
  182. package/dist/server/early-holes-csp.js +73 -0
  183. package/dist/server/page-facts.d.ts +4 -1
  184. package/dist/server/page-facts.js +4 -1
  185. package/dist/server/page-seed.d.ts +2 -2
  186. package/dist/server/page-seed.js +104 -11
  187. package/dist/server/page-stream.d.ts +14 -1
  188. package/dist/server/page-stream.js +119 -2
  189. package/dist/server/personal-response.d.ts +0 -5
  190. package/dist/server/personal-response.js +6 -2
  191. package/dist/server/props-wire.js +5 -1
  192. package/dist/server/region-endpoint.js +10 -2
  193. package/dist/server/render-cache.d.ts +24 -20
  194. package/dist/server/render-cache.js +99 -40
  195. package/dist/server/render-page.js +46 -15
  196. package/dist/server/request-stats.d.ts +10 -8
  197. package/dist/server/request-stats.js +20 -12
  198. package/dist/server/rules.d.ts +11 -0
  199. package/dist/server/rules.js +64 -0
  200. package/dist/server/signing-key.js +31 -18
  201. package/dist/server/stream-regions.d.ts +14 -1
  202. package/dist/server/stream-regions.js +38 -2
  203. package/dist/shared-state.js +5 -1
  204. package/dist/shims/app-navigation.js +3 -2
  205. package/dist/shims/page-store.svelte.js +16 -2
  206. package/dist/source.js +7 -2
  207. package/dist/store-transport.js +12 -5
  208. package/dist/transport.js +3 -2
  209. package/dist/vite/index.js +17 -10
  210. package/dist/vite/kit-dirs.js +7 -1
  211. package/dist/vite/options.d.ts +2 -1
  212. package/dist/vite/options.js +11 -20
  213. package/dist/vite/package-files.js +13 -3
  214. package/dist/vite/paths.d.ts +2 -0
  215. package/dist/vite/paths.js +4 -4
  216. package/dist/vite/plugin-api.js +42 -14
  217. package/dist/vite/style-preprocess.js +10 -3
  218. package/package.json +8 -1
  219. package/dist/KeepHost.svelte +0 -19
  220. package/dist/KeepHost.svelte.d.ts +0 -10
  221. package/dist/LiveHost.svelte +0 -19
  222. package/dist/LiveHost.svelte.d.ts +0 -10
  223. package/dist/NestedProvider.svelte +0 -13
  224. package/dist/NestedProvider.svelte.d.ts +0 -8
  225. package/dist/runtime/page-cache.d.ts +0 -23
  226. package/dist/runtime/page-cache.js +0 -74
@@ -1,5 +1,7 @@
1
1
  import { beacon_page, beacon_record_cpu, hole_request_times, is_headless } from "./runtime/beacon.js";
2
2
  import { props_sidecar_of } from "./runtime/sidecar.js";
3
+ import { import_again } from "./runtime/import-again.js";
4
+ import { download } from "./policies.js";
3
5
  import { PAGE_SEED_SELECTOR } from "./runtime/seeds.js";
4
6
  import { paint_blocker } from "./runtime/render-blocking.js";
5
7
  import { charge, own_cost } from "./runtime/own-cost.js";
@@ -9,4 +11,4 @@ import { tool_fetch, tool_made } from "./tool-fetches.js";
9
11
  import { PAGE_DEFER_GLOBAL, PAGE_DEFER_KEY, PAGE_DEFER_REGISTRY_KEY } from "./page-defer.js";
10
12
  import { ISLAND_GRAPH_ATTR, decode_island_graph } from "./island-graph.js";
11
13
  import { find_unscoped, unscoped_finding, unscoped_marker } from "./unscoped-css.js";
12
- export { ISLAND_GRAPH_ATTR, PAGE_DEFER_GLOBAL, PAGE_DEFER_KEY, PAGE_DEFER_REGISTRY_KEY, PAGE_SEED_SELECTOR, REGION_RENDER_CONCURRENCY, beacon_page, beacon_record_cpu, charge, decode_island_graph, find_unscoped, hole_request_times, is_headless, nearest_attr, own_cost, paint_blocker, props_sidecar_of, tool_fetch, tool_made, unscoped_finding, unscoped_marker };
14
+ export { ISLAND_GRAPH_ATTR, PAGE_DEFER_GLOBAL, PAGE_DEFER_KEY, PAGE_DEFER_REGISTRY_KEY, PAGE_SEED_SELECTOR, REGION_RENDER_CONCURRENCY, beacon_page, beacon_record_cpu, charge, decode_island_graph, download, find_unscoped, hole_request_times, import_again, is_headless, nearest_attr, own_cost, paint_blocker, props_sidecar_of, tool_fetch, tool_made, unscoped_finding, unscoped_marker };
@@ -1,7 +1,8 @@
1
1
  import { makeRegionEndpoint } from "./server/region-endpoint.js";
2
2
  import { render_region_html } from "./server/render-region-html.js";
3
- import { BatchHoleStats, HoleRequestStats, HoleStat, IslandInteractivity, IslandStat, OgygiaRequestStats, SeedKeyStat, hole_stats_of, record_request_stats, request_stats_of, set_batch_hole_listener, set_request_stats_detail, want_request_stats } from "./server/request-stats.js";
3
+ import { BatchHoleStats, HoleRequestStats, HoleStat, IslandInteractivity, IslandStat, OgygiaRequestStats, SeedKeyStat, hold_request_stats_detail, hole_stats_of, record_request_stats, request_stats_of, set_batch_hole_listener, want_request_stats } from "./server/request-stats.js";
4
4
  import { mark_personal } from "./server/personal-response.js";
5
+ import { cleanup_failed, current_request_scope, request_local, request_scope } from "./plugin/request-scope.js";
5
6
  import { islands_endpoint } from "./server/endpoint.js";
6
7
  import { scanRegions } from "./server/split-regions.js";
7
- export { type BatchHoleStats, type HoleRequestStats, type HoleStat, type IslandInteractivity, type IslandStat, type OgygiaRequestStats, type SeedKeyStat, hole_stats_of, islands_endpoint, makeRegionEndpoint, mark_personal, record_request_stats, render_region_html, request_stats_of, scanRegions, set_batch_hole_listener, set_request_stats_detail, want_request_stats };
8
+ export { type BatchHoleStats, type HoleRequestStats, type HoleStat, type IslandInteractivity, type IslandStat, type OgygiaRequestStats, type SeedKeyStat, cleanup_failed, current_request_scope, hold_request_stats_detail, hole_stats_of, islands_endpoint, makeRegionEndpoint, mark_personal, record_request_stats, render_region_html, request_local, request_scope, request_stats_of, scanRegions, set_batch_hole_listener, want_request_stats };
@@ -1,7 +1,8 @@
1
1
  import { makeRegionEndpoint } from "./server/region-endpoint.js";
2
2
  import { render_region_html } from "./server/render-region-html.js";
3
- import { hole_stats_of, record_request_stats, request_stats_of, set_batch_hole_listener, set_request_stats_detail, want_request_stats } from "./server/request-stats.js";
3
+ import { hold_request_stats_detail, hole_stats_of, record_request_stats, request_stats_of, set_batch_hole_listener, want_request_stats } from "./server/request-stats.js";
4
4
  import { mark_personal } from "./server/personal-response.js";
5
+ import { cleanup_failed, current_request_scope, request_local, request_scope } from "./plugin/request-scope.js";
5
6
  import { islands_endpoint } from "./server/endpoint.js";
6
7
  import { scanRegions } from "./server/split-regions.js";
7
- export { hole_stats_of, islands_endpoint, makeRegionEndpoint, mark_personal, record_request_stats, render_region_html, request_stats_of, scanRegions, set_batch_hole_listener, set_request_stats_detail, want_request_stats };
8
+ export { cleanup_failed, current_request_scope, hold_request_stats_detail, hole_stats_of, islands_endpoint, makeRegionEndpoint, mark_personal, record_request_stats, render_region_html, request_local, request_scope, request_stats_of, scanRegions, set_batch_hole_listener, want_request_stats };
@@ -10,5 +10,4 @@ import { __tag_context } from "./context-bridge.js";
10
10
  import { og_portable } from "./region-snippet.js";
11
11
  import { og_html_region, prebaked_region } from "./region.js";
12
12
  import Region from "./Region.svelte";
13
- import NestedProvider from "./NestedProvider.svelte";
14
- export { NestedProvider, Region, __og_$, __og_boundary, __og_source, __og_store, __register_fn, __register_store_factory, __register_transportable, __tag_context, configure_boundary, documentIsCsrTrue, isNested, mark_store, og_entry_hydrate, og_entry_unmount, og_html_region, og_portable, prebaked_region, setNested };
13
+ export { Region, __og_$, __og_boundary, __og_source, __og_store, __register_fn, __register_store_factory, __register_transportable, __tag_context, configure_boundary, documentIsCsrTrue, isNested, mark_store, og_entry_hydrate, og_entry_unmount, og_html_region, og_portable, prebaked_region, setNested };
package/dist/internal.js CHANGED
@@ -10,5 +10,4 @@ import { __tag_context } from "./context-bridge.js";
10
10
  import { og_portable } from "./region-snippet.js";
11
11
  import { og_html_region, prebaked_region } from "./region.js";
12
12
  import Region from "./Region.svelte";
13
- import NestedProvider from "./NestedProvider.svelte";
14
- export { NestedProvider, Region, __og_$, __og_boundary, __og_source, __og_store, __register_fn, __register_store_factory, __register_transportable, __tag_context, configure_boundary, documentIsCsrTrue, isNested, mark_store, og_entry_hydrate, og_entry_unmount, og_html_region, og_portable, prebaked_region, setNested };
13
+ export { Region, __og_$, __og_boundary, __og_source, __og_store, __register_fn, __register_store_factory, __register_transportable, __tag_context, configure_boundary, documentIsCsrTrue, isNested, mark_store, og_entry_hydrate, og_entry_unmount, og_html_region, og_portable, prebaked_region, setNested };
@@ -1,6 +1,4 @@
1
1
  import { KEEP_FALLBACK_HTML } from "./keep-fallback-marker.js";
2
- /** The message a misplaced `keepFallback()` fails with (a real error, not the signal). */
3
- export declare const KEEP_FALLBACK_INLINE_MESSAGE: string;
4
2
  export declare class KeepFallbackSignal extends Error {
5
3
  constructor();
6
4
  }
@@ -1,4 +1,5 @@
1
1
  import { isHoleInline } from "./context.js";
2
+ import { OgygiaError, line } from "./messages/island.js";
2
3
  import { KEEP_FALLBACK_HTML } from "./keep-fallback-marker.js";
3
4
  // src/keep-fallback.ts
4
5
  /**
@@ -12,11 +13,9 @@ import { KEEP_FALLBACK_HTML } from "./keep-fallback-marker.js";
12
13
  * only: it throws a branded signal the handle recognises; in the browser a hole never renders.
13
14
  */
14
15
  const KEEP = Symbol.for("ogygia.keep-fallback");
15
- /** The message a misplaced `keepFallback()` fails with (a real error, not the signal). */
16
- const KEEP_FALLBACK_INLINE_MESSAGE = "[ogygia] keepFallback() ran inside the PAGE render: this server island is nested inside a `wake` island, where `render: \"deferred\"` is ignored and its component renders inline — nothing catches the signal there and its fallback never shows. Move the island out of the enclosing island (into the page, a layout, or a lake), or drop keepFallback() from a component that can render inline.";
17
16
  var KeepFallbackSignal = class extends Error {
18
17
  constructor() {
19
- super("[ogygia] keepFallback(): the page fallback stands");
18
+ super(line("keep_fallback_signal"));
20
19
  this.name = "KeepFallback";
21
20
  Object.defineProperty(this, KEEP, { value: true });
22
21
  }
@@ -29,11 +28,11 @@ function keepFallback() {
29
28
  try {
30
29
  inline = isHoleInline();
31
30
  } catch {}
32
- if (inline) throw new Error(KEEP_FALLBACK_INLINE_MESSAGE);
31
+ if (inline) throw new OgygiaError("keep_fallback_inline");
33
32
  throw new KeepFallbackSignal();
34
33
  }
35
34
  /** Did a hole render end with {@link keepFallback}? (the handle's catch reads this) */
36
35
  function is_keep_fallback(e) {
37
36
  return !!e && typeof e === "object" && e[KEEP] === true;
38
37
  }
39
- export { KEEP_FALLBACK_HTML, KEEP_FALLBACK_INLINE_MESSAGE, KeepFallbackSignal, is_keep_fallback, keepFallback };
38
+ export { KEEP_FALLBACK_HTML, KeepFallbackSignal, is_keep_fallback, keepFallback };
@@ -3,6 +3,7 @@ import { register_snippet_kind } from "./region-snippet.js";
3
3
  import { register_derived_kind, register_store_kind } from "./store-transport.js";
4
4
  import { register_fn_kind } from "./fn-transport.js";
5
5
  import { REF_WIRE_KEY, mint, register_kind, resolve } from "./ref.js";
6
+ import { OgygiaError } from "./messages/island.js";
6
7
  // src/live-transport.ts
7
8
  /**
8
9
  * Transportable objects — `static [import.meta.og.wire]` codecs, as the hub's WIRE kind.
@@ -78,7 +79,7 @@ function codec_of(cls) {
78
79
  }
79
80
  function class_for(tag) {
80
81
  const cls = tag === void 0 ? void 0 : wire_registry().classes.get(tag);
81
- if (cls === void 0) throw new Error(`[ogygia] cannot revive transportable "${tag}": its class is not loaded on this side. The island must import the class as a VALUE (not \`import type\`) so its codec travels with the island's bundle.`);
82
+ if (cls === void 0) throw new OgygiaError("transportable_class_missing", { tag: String(tag) });
82
83
  return cls;
83
84
  }
84
85
  /** The hub kind: `[og.wire]` class instances. Identity/reunify/Keep live in the hub. */
@@ -92,7 +93,7 @@ function register_wire_kind() {
92
93
  encode(value) {
93
94
  const cls = value.constructor;
94
95
  const tag = wire_registry().tags.get(cls);
95
- if (tag === void 0) throw new Error(`[ogygia] class "${cls.name ?? "?"}" has a [import.meta.og.wire] codec but was never registered. Transportable classes must be declared in a module the ogygia vite plugin transforms (an \`export class\` in your app source, not node_modules or a dynamic eval).`);
96
+ if (tag === void 0) throw new OgygiaError("transportable_unregistered", { name: cls.name ?? "?" });
96
97
  return {
97
98
  t: tag,
98
99
  d: codec_of(cls).encode(value)
@@ -0,0 +1,585 @@
1
+ import { MessagesOf } from "./define.js";
2
+ /** Retired `ogygia({ … })` keys, each with its new spelling: the config check throws
3
+ * `option_retired` for any of them (a legacy key that silently did nothing would un-tune real
4
+ * apps). */
5
+ export declare const RETIRED_OPTIONS: Record<string, string>;
6
+ /** The errors: `throw new OgygiaError(code, args)`. */
7
+ export declare const BUILD_ERRORS: {
8
+ macro_store_misuse: {
9
+ text: (a: {
10
+ file: string;
11
+ line: number;
12
+ problem: string;
13
+ }) => string;
14
+ details: () => string;
15
+ };
16
+ macro_dollar_misuse: {
17
+ text: (a: {
18
+ file: string;
19
+ line: number;
20
+ problem: string;
21
+ }) => string;
22
+ details: () => string;
23
+ };
24
+ macro_wire_misuse: {
25
+ text: (a: {
26
+ file: string;
27
+ line: number;
28
+ problem: string;
29
+ }) => string;
30
+ details: () => string;
31
+ };
32
+ macro_source_misuse: {
33
+ text: (a: {
34
+ file: string;
35
+ line: number;
36
+ problem: string;
37
+ }) => string;
38
+ details: () => string;
39
+ };
40
+ macro_bake_arity: {
41
+ text: (a: {
42
+ file: string;
43
+ line: number;
44
+ }) => string;
45
+ details: () => string;
46
+ };
47
+ macro_bake_not_function: {
48
+ text: (a: {
49
+ file: string;
50
+ line: number;
51
+ }) => string;
52
+ details: () => string;
53
+ };
54
+ macro_bake_eval_failed: {
55
+ text: (a: {
56
+ file: string;
57
+ reason: string;
58
+ }) => string;
59
+ details: () => string;
60
+ };
61
+ macro_bake_not_serializable: {
62
+ text: (a: {
63
+ file: string;
64
+ line: number;
65
+ reason: string;
66
+ }) => string;
67
+ details: () => string;
68
+ };
69
+ kit_config_not_literal: {
70
+ text: (a: {
71
+ file: string;
72
+ key: string;
73
+ }) => string;
74
+ details: () => string;
75
+ };
76
+ island_import_unresolved: {
77
+ text: (a: {
78
+ specifier: string;
79
+ host: string;
80
+ }) => string;
81
+ details: () => string;
82
+ };
83
+ call_arg_not_literal: {
84
+ text: (a: {
85
+ call: string;
86
+ got: string;
87
+ }) => string;
88
+ details: () => string;
89
+ };
90
+ call_arg_interpolated: {
91
+ text: (a: {
92
+ call: string;
93
+ }) => string;
94
+ details: () => string;
95
+ };
96
+ call_arg_in_expression: {
97
+ text: (a: {
98
+ call: string;
99
+ near: string;
100
+ }) => string;
101
+ details: () => string;
102
+ };
103
+ import_key_invalid: {
104
+ text: (a: {
105
+ role: string;
106
+ got: string;
107
+ }) => string;
108
+ details: () => string;
109
+ };
110
+ import_keys_not_distinct: {
111
+ text: () => string;
112
+ details: () => string;
113
+ };
114
+ region_value_not_raw: {
115
+ text: (a: {
116
+ host: string;
117
+ key: string;
118
+ }) => string;
119
+ details: () => string;
120
+ };
121
+ wake_strategy_unknown: {
122
+ text: (a: {
123
+ host: string;
124
+ key: string;
125
+ value: string;
126
+ }) => string;
127
+ details: () => string;
128
+ };
129
+ generated_module_relative_import: {
130
+ text: (a: {
131
+ host: string;
132
+ specifier: string;
133
+ }) => string;
134
+ details: () => string;
135
+ };
136
+ region_import_invalid: {
137
+ text: (a: {
138
+ host: string;
139
+ names: string;
140
+ problem: string;
141
+ }) => string;
142
+ details: () => string;
143
+ };
144
+ as_region_invalid: {
145
+ text: (a: {
146
+ host: string;
147
+ name: string;
148
+ problem: string;
149
+ }) => string;
150
+ details: () => string;
151
+ };
152
+ region_children_not_portable: {
153
+ text: (a: {
154
+ host: string;
155
+ tag: string;
156
+ server: boolean;
157
+ }) => string;
158
+ details: () => string;
159
+ };
160
+ region_dotted_tag: {
161
+ text: (a: {
162
+ host: string;
163
+ tag: string;
164
+ import: string;
165
+ }) => string;
166
+ details: () => string;
167
+ };
168
+ dynamic_region_import: {
169
+ text: (a: {
170
+ host: string;
171
+ keys: string;
172
+ wake_key: string;
173
+ render_key: string;
174
+ preset_key: string;
175
+ }) => string;
176
+ details: () => string;
177
+ };
178
+ region_import_no_specifier: {
179
+ text: (a: {
180
+ host: string;
181
+ name: string;
182
+ held: boolean;
183
+ }) => string;
184
+ details: () => string;
185
+ };
186
+ snippet_reads_dollar_props: {
187
+ text: (a: {
188
+ host: string;
189
+ snippet: string;
190
+ name: string;
191
+ }) => string;
192
+ details: () => string;
193
+ };
194
+ held_fetch_without_render: {
195
+ text: (a: {
196
+ host: string;
197
+ fetch_key: string;
198
+ render_key: string;
199
+ wake_key: string;
200
+ value: string;
201
+ }) => string;
202
+ details: () => string;
203
+ };
204
+ held_render_live: {
205
+ text: (a: {
206
+ host: string;
207
+ render_key: string;
208
+ }) => string;
209
+ details: () => string;
210
+ };
211
+ held_render_unknown: {
212
+ text: (a: {
213
+ host: string;
214
+ render_key: string;
215
+ value: string;
216
+ }) => string;
217
+ details: () => string;
218
+ };
219
+ held_hole_timed_twice: {
220
+ text: (a: {
221
+ host: string;
222
+ render_key: string;
223
+ fetch_key: string;
224
+ wake_key: string;
225
+ fetch: string;
226
+ wake: string;
227
+ }) => string;
228
+ details: () => string;
229
+ };
230
+ held_fetch_not_timing: {
231
+ text: (a: {
232
+ host: string;
233
+ fetch_key: string;
234
+ value: string;
235
+ }) => string;
236
+ details: () => string;
237
+ };
238
+ held_marker_mixed: {
239
+ text: (a: {
240
+ host: string;
241
+ name: string;
242
+ region_key: string;
243
+ wake_key: string;
244
+ render_key: string;
245
+ fetch_key: string;
246
+ }) => string;
247
+ details: () => string;
248
+ };
249
+ option_retired: {
250
+ text: (a: {
251
+ option: string;
252
+ }) => string;
253
+ details: () => string;
254
+ };
255
+ preset_empty: {
256
+ text: (a: {
257
+ name: string;
258
+ }) => string;
259
+ details: () => string;
260
+ };
261
+ preset_key_unknown: {
262
+ text: (a: {
263
+ name: string;
264
+ key: string;
265
+ allowed: string;
266
+ }) => string;
267
+ details: () => string;
268
+ };
269
+ max_page_age_invalid: {
270
+ text: (a: {
271
+ value: string;
272
+ }) => string;
273
+ details: () => string;
274
+ };
275
+ secret_too_short: {
276
+ text: (a: {
277
+ min_bytes: number;
278
+ }) => string;
279
+ details: () => string;
280
+ };
281
+ kit_remote_src_missing: {
282
+ text: () => string;
283
+ details: () => string;
284
+ };
285
+ package_files_not_array: {
286
+ text: (a: {
287
+ package: string;
288
+ got: string;
289
+ }) => string;
290
+ details: () => string;
291
+ };
292
+ package_files_escapes: {
293
+ text: (a: {
294
+ package: string;
295
+ entry: string;
296
+ }) => string;
297
+ details: () => string;
298
+ };
299
+ plugin_without_ogygia: {
300
+ text: (a: {
301
+ plugin: string;
302
+ }) => string;
303
+ details: () => string;
304
+ };
305
+ plugin_factory_not_called: {
306
+ text: () => string;
307
+ details: () => string;
308
+ };
309
+ plugin_after_sveltekit: {
310
+ text: (a: {
311
+ plugin: string;
312
+ }) => string;
313
+ details: () => string;
314
+ };
315
+ plugin_name_missing: {
316
+ text: () => string;
317
+ details: () => string;
318
+ };
319
+ plugin_listed_twice: {
320
+ text: (a: {
321
+ plugin: string;
322
+ }) => string;
323
+ details: () => string;
324
+ };
325
+ plugin_realm_not_location: {
326
+ text: (a: {
327
+ plugin: string;
328
+ realm: string;
329
+ }) => string;
330
+ details: () => string;
331
+ };
332
+ plugin_options_not_json: {
333
+ text: (a: {
334
+ plugin: string;
335
+ }) => string;
336
+ details: () => string;
337
+ };
338
+ plugin_realm_not_file: {
339
+ text: (a: {
340
+ plugin: string;
341
+ realm: string;
342
+ location: string;
343
+ }) => string;
344
+ details: () => string;
345
+ };
346
+ plugin_package_unresolved: {
347
+ text: (a: {
348
+ plugin: string;
349
+ root: string;
350
+ }) => string;
351
+ details: () => string;
352
+ };
353
+ route_config_key_invalid: {
354
+ text: (a: {
355
+ plugin: string;
356
+ key: string;
357
+ }) => string;
358
+ details: () => string;
359
+ };
360
+ route_config_key_claimed: {
361
+ text: (a: {
362
+ key: string;
363
+ owner: string;
364
+ plugin: string;
365
+ }) => string;
366
+ details: () => string;
367
+ };
368
+ plugin_macro_name_invalid: {
369
+ text: (a: {
370
+ plugin: string;
371
+ name: string;
372
+ }) => string;
373
+ details: () => string;
374
+ };
375
+ plugin_macro_claimed: {
376
+ text: (a: {
377
+ name: string;
378
+ owner: string;
379
+ plugin: string;
380
+ }) => string;
381
+ details: () => string;
382
+ };
383
+ page_modules_not_absolute: {
384
+ text: (a: {
385
+ plugin: string;
386
+ file: string;
387
+ }) => string;
388
+ details: () => string;
389
+ };
390
+ request_event_server_only: {
391
+ text: () => string;
392
+ details: () => string;
393
+ };
394
+ };
395
+ /** The warnings: `warn(code, args, ...rest)`; and, at its end, the build's reports, which print
396
+ * their `line(code, args)` at info level. */
397
+ export declare const BUILD_WARNINGS: {
398
+ macro_store_returns_non_store: {
399
+ text: (a: {
400
+ file: string;
401
+ line: number;
402
+ }) => string;
403
+ details: () => string;
404
+ };
405
+ scoped_css_failed: {
406
+ text: (a: {
407
+ file: string;
408
+ reason: string;
409
+ }) => string;
410
+ details: () => string;
411
+ };
412
+ package_marks_undeclared: {
413
+ text: (a: {
414
+ file: string;
415
+ }) => string;
416
+ details: () => string;
417
+ };
418
+ island_context_unprovided: {
419
+ text: (a: {
420
+ file: string;
421
+ key: string;
422
+ }) => string;
423
+ details: () => string;
424
+ };
425
+ content_leaked_to_client: {
426
+ text: (a: {
427
+ count: number;
428
+ chunk: string;
429
+ modules: string;
430
+ }) => string;
431
+ details: () => string;
432
+ };
433
+ region_host_skipped: {
434
+ text: (a: {
435
+ file: string;
436
+ reason: string;
437
+ at: string;
438
+ }) => string;
439
+ details: () => string;
440
+ };
441
+ hole_wake_deprecated: {
442
+ text: (a: {
443
+ host: string;
444
+ said?: string;
445
+ render_key: string;
446
+ wake_key: string;
447
+ fetch_key: string;
448
+ value: string;
449
+ }) => string;
450
+ details: () => string;
451
+ };
452
+ snippet_store_snapshot: {
453
+ text: (a: {
454
+ host: string;
455
+ snippet: string;
456
+ store: string;
457
+ at: string;
458
+ }) => string;
459
+ details: () => string;
460
+ };
461
+ snippet_store_unverified: {
462
+ text: (a: {
463
+ host: string;
464
+ snippet: string;
465
+ store: string;
466
+ at: string;
467
+ }) => string;
468
+ details: () => string;
469
+ };
470
+ snippet_captures_store: {
471
+ text: (a: {
472
+ host: string;
473
+ snippet: string;
474
+ store: string;
475
+ }) => string;
476
+ details: () => string;
477
+ };
478
+ barrels_component_skipped: {
479
+ text: (a: {
480
+ file: string;
481
+ reason: string;
482
+ at: string;
483
+ }) => string;
484
+ details: () => string;
485
+ };
486
+ sass_missing: {
487
+ text: () => string;
488
+ details: () => string;
489
+ };
490
+ scss_compile_failed: {
491
+ text: (a: {
492
+ file: string;
493
+ reason: string;
494
+ }) => string;
495
+ details: () => string;
496
+ };
497
+ ts_strip_failed: {
498
+ text: (a: {
499
+ file: string;
500
+ reason: string;
501
+ }) => string;
502
+ details: () => string;
503
+ };
504
+ optimize_deps_includes_ogygia: {
505
+ text: (a: {
506
+ specifiers: string;
507
+ count: number;
508
+ }) => string;
509
+ details: () => string;
510
+ };
511
+ island_handoff_write_failed: {
512
+ text: () => string;
513
+ details: () => string;
514
+ };
515
+ package_files_missing: {
516
+ text: (a: {
517
+ package: string;
518
+ entry: string;
519
+ }) => string;
520
+ details: () => string;
521
+ };
522
+ kit_config_unreadable: {
523
+ text: (a: {
524
+ file: string;
525
+ routes: string;
526
+ out: string;
527
+ reason: string;
528
+ }) => string;
529
+ details: () => string;
530
+ };
531
+ island_chunks_not_emitted: {
532
+ text: (a: {
533
+ count: number;
534
+ }) => string;
535
+ details: () => string;
536
+ };
537
+ flags_manifest_written: {
538
+ text: (a: {
539
+ count: number;
540
+ }) => string;
541
+ details: () => string;
542
+ };
543
+ page_seed_report: {
544
+ text: (a: {
545
+ islands: number;
546
+ pinned: number;
547
+ keys: number;
548
+ unpinned: number;
549
+ }) => string;
550
+ details: () => string;
551
+ };
552
+ barrels_report: {
553
+ text: (a: {
554
+ importers: string;
555
+ files: string;
556
+ imports: string;
557
+ names: string;
558
+ barrels: string;
559
+ seconds: string;
560
+ }) => string;
561
+ details: () => string;
562
+ };
563
+ barrels_report_none: {
564
+ text: (a: {
565
+ files: string;
566
+ seconds: string;
567
+ }) => string;
568
+ details: () => string;
569
+ };
570
+ barrels_rewrite: {
571
+ text: (a: {
572
+ file: string;
573
+ names: string;
574
+ barrel: string;
575
+ leaves: string;
576
+ }) => string;
577
+ details: () => string;
578
+ };
579
+ };
580
+ type Build = MessagesOf<typeof BUILD_ERRORS, typeof BUILD_WARNINGS>;
581
+ export declare const OgygiaError: Build["OgygiaError"];
582
+ export declare const warn: Build["warn"];
583
+ /** A code's line as a string, for a logger that takes one (Rollup's `this.warn`). */
584
+ export declare const line: Build["line"];
585
+ export {};