@ogygia/core 0.0.0 → 0.11.1

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 (548) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -1
  3. package/ambient.d.ts +194 -0
  4. package/dist/ClientBindingStub.svelte +6 -0
  5. package/dist/ClientBindingStub.svelte.d.ts +26 -0
  6. package/dist/KeepHost.svelte +19 -0
  7. package/dist/KeepHost.svelte.d.ts +10 -0
  8. package/dist/LakeBoundary.svelte +16 -0
  9. package/dist/LakeBoundary.svelte.d.ts +11 -0
  10. package/dist/LateIsland.svelte +22 -0
  11. package/dist/LateIsland.svelte.d.ts +15 -0
  12. package/dist/LateIslandAwait.svelte +17 -0
  13. package/dist/LateIslandAwait.svelte.d.ts +15 -0
  14. package/dist/LiveHost.svelte +19 -0
  15. package/dist/LiveHost.svelte.d.ts +10 -0
  16. package/dist/NestedProvider.svelte +13 -0
  17. package/dist/NestedProvider.svelte.d.ts +8 -0
  18. package/dist/OgygiaBoundary.svelte +5 -0
  19. package/dist/OgygiaBoundary.svelte.d.ts +17 -0
  20. package/dist/PromiseRegion.svelte +40 -0
  21. package/dist/PromiseRegion.svelte.d.ts +15 -0
  22. package/dist/PromiseRegionAwait.svelte +27 -0
  23. package/dist/PromiseRegionAwait.svelte.d.ts +15 -0
  24. package/dist/Provide.svelte +27 -0
  25. package/dist/Provide.svelte.d.ts +8 -0
  26. package/dist/RawHtml.svelte +9 -0
  27. package/dist/RawHtml.svelte.d.ts +6 -0
  28. package/dist/Region.svelte +1173 -0
  29. package/dist/Region.svelte.d.ts +68 -0
  30. package/dist/SlotBoundary.svelte +13 -0
  31. package/dist/SlotBoundary.svelte.d.ts +7 -0
  32. package/dist/app.d.ts +4 -0
  33. package/dist/app.js +3 -0
  34. package/dist/boundary.d.ts +35 -0
  35. package/dist/boundary.js +127 -0
  36. package/dist/build-cache.d.ts +13 -0
  37. package/dist/build-cache.js +77 -0
  38. package/dist/compiler/blank-styles.d.ts +1 -0
  39. package/dist/compiler/blank-styles.js +63 -0
  40. package/dist/compiler/bom.d.ts +2 -0
  41. package/dist/compiler/bom.js +15 -0
  42. package/dist/compiler/browser-full.d.ts +8 -0
  43. package/dist/compiler/browser-full.js +8 -0
  44. package/dist/compiler/browser.d.ts +11 -0
  45. package/dist/compiler/browser.js +11 -0
  46. package/dist/compiler/content/transportables.d.ts +26 -0
  47. package/dist/compiler/content/transportables.js +219 -0
  48. package/dist/compiler/ctx.d.ts +185 -0
  49. package/dist/compiler/ctx.js +203 -0
  50. package/dist/compiler/debarrel/barrel.d.ts +55 -0
  51. package/dist/compiler/debarrel/barrel.js +248 -0
  52. package/dist/compiler/debarrel/options.d.ts +67 -0
  53. package/dist/compiler/debarrel/options.js +31 -0
  54. package/dist/compiler/debarrel/parse.d.ts +65 -0
  55. package/dist/compiler/debarrel/parse.js +256 -0
  56. package/dist/compiler/debarrel/plugin.d.ts +31 -0
  57. package/dist/compiler/debarrel/plugin.js +190 -0
  58. package/dist/compiler/debarrel/rewrite.d.ts +27 -0
  59. package/dist/compiler/debarrel/rewrite.js +118 -0
  60. package/dist/compiler/debarrel/svelte.d.ts +13 -0
  61. package/dist/compiler/debarrel/svelte.js +56 -0
  62. package/dist/compiler/dev/css-scope.d.ts +16 -0
  63. package/dist/compiler/dev/css-scope.js +38 -0
  64. package/dist/compiler/dev/dev-hmr.d.ts +25 -0
  65. package/dist/compiler/dev/dev-hmr.js +29 -0
  66. package/dist/compiler/dev/hmr.d.ts +34 -0
  67. package/dist/compiler/dev/hmr.js +57 -0
  68. package/dist/compiler/dev/region-bytes.d.ts +34 -0
  69. package/dist/compiler/dev/region-bytes.js +126 -0
  70. package/dist/compiler/driver.d.ts +280 -0
  71. package/dist/compiler/driver.js +1352 -0
  72. package/dist/compiler/flags.d.ts +16 -0
  73. package/dist/compiler/flags.js +101 -0
  74. package/dist/compiler/fouc-css.d.ts +97 -0
  75. package/dist/compiler/fouc-css.js +335 -0
  76. package/dist/compiler/free-vars.d.ts +20 -0
  77. package/dist/compiler/free-vars.js +327 -0
  78. package/dist/compiler/host.d.ts +65 -0
  79. package/dist/compiler/host.js +51 -0
  80. package/dist/compiler/ids.d.ts +84 -0
  81. package/dist/compiler/ids.js +86 -0
  82. package/dist/compiler/index.d.ts +11 -0
  83. package/dist/compiler/index.js +11 -0
  84. package/dist/compiler/kit.d.ts +129 -0
  85. package/dist/compiler/kit.js +563 -0
  86. package/dist/compiler/link/build-output.d.ts +44 -0
  87. package/dist/compiler/link/build-output.js +147 -0
  88. package/dist/compiler/link/caps.d.ts +48 -0
  89. package/dist/compiler/link/caps.js +64 -0
  90. package/dist/compiler/link/context-detect.d.ts +23 -0
  91. package/dist/compiler/link/context-detect.js +137 -0
  92. package/dist/compiler/link/emit-gate.d.ts +11 -0
  93. package/dist/compiler/link/emit-gate.js +40 -0
  94. package/dist/compiler/link/entry-shim.d.ts +4 -0
  95. package/dist/compiler/link/entry-shim.js +29 -0
  96. package/dist/compiler/link/island-deps.d.ts +142 -0
  97. package/dist/compiler/link/island-deps.js +525 -0
  98. package/dist/compiler/link/manifest.d.ts +5 -0
  99. package/dist/compiler/link/manifest.js +9 -0
  100. package/dist/compiler/link/page-keys.d.ts +64 -0
  101. package/dist/compiler/link/page-keys.js +683 -0
  102. package/dist/compiler/link/registry-stub.d.ts +41 -0
  103. package/dist/compiler/link/registry-stub.js +212 -0
  104. package/dist/compiler/link/router-config.d.ts +11 -0
  105. package/dist/compiler/link/router-config.js +15 -0
  106. package/dist/compiler/link/router-css.d.ts +22 -0
  107. package/dist/compiler/link/router-css.js +142 -0
  108. package/dist/compiler/link/runtime-entry.d.ts +71 -0
  109. package/dist/compiler/link/runtime-entry.js +132 -0
  110. package/dist/compiler/link/server-manifest.d.ts +12 -0
  111. package/dist/compiler/link/server-manifest.js +45 -0
  112. package/dist/compiler/link/speculation.d.ts +17 -0
  113. package/dist/compiler/link/speculation.js +36 -0
  114. package/dist/compiler/link/transport.d.ts +31 -0
  115. package/dist/compiler/link/transport.js +67 -0
  116. package/dist/compiler/macros/bake.d.ts +20 -0
  117. package/dist/compiler/macros/bake.js +317 -0
  118. package/dist/compiler/macros/browser.d.ts +11 -0
  119. package/dist/compiler/macros/browser.js +69 -0
  120. package/dist/compiler/macros/dedent.d.ts +12 -0
  121. package/dist/compiler/macros/dedent.js +36 -0
  122. package/dist/compiler/macros/dollar.d.ts +15 -0
  123. package/dist/compiler/macros/dollar.js +387 -0
  124. package/dist/compiler/macros/pipeline.d.ts +31 -0
  125. package/dist/compiler/macros/pipeline.js +106 -0
  126. package/dist/compiler/macros/source.d.ts +6 -0
  127. package/dist/compiler/macros/source.js +127 -0
  128. package/dist/compiler/macros/store.d.ts +17 -0
  129. package/dist/compiler/macros/store.js +244 -0
  130. package/dist/compiler/macros/wire.d.ts +14 -0
  131. package/dist/compiler/macros/wire.js +160 -0
  132. package/dist/compiler/ownership-stamps.d.ts +6 -0
  133. package/dist/compiler/ownership-stamps.js +144 -0
  134. package/dist/compiler/parse/oxc.d.ts +34 -0
  135. package/dist/compiler/parse/oxc.js +59 -0
  136. package/dist/compiler/parse/scan.d.ts +43 -0
  137. package/dist/compiler/parse/scan.js +232 -0
  138. package/dist/compiler/program.d.ts +140 -0
  139. package/dist/compiler/program.js +242 -0
  140. package/dist/compiler/region/emit.d.ts +169 -0
  141. package/dist/compiler/region/emit.js +286 -0
  142. package/dist/compiler/region/identity.d.ts +28 -0
  143. package/dist/compiler/region/identity.js +75 -0
  144. package/dist/compiler/region/ir.d.ts +65 -0
  145. package/dist/compiler/region/ir.js +0 -0
  146. package/dist/compiler/region/transform.d.ts +178 -0
  147. package/dist/compiler/region/transform.js +1933 -0
  148. package/dist/compiler/script-request.d.ts +1 -0
  149. package/dist/compiler/script-request.js +43 -0
  150. package/dist/context-bridge.d.ts +65 -0
  151. package/dist/context-bridge.js +217 -0
  152. package/dist/context-registry.d.ts +40 -0
  153. package/dist/context-registry.js +15 -0
  154. package/dist/context.d.ts +72 -0
  155. package/dist/context.js +158 -0
  156. package/dist/current-region.d.ts +14 -0
  157. package/dist/current-region.js +36 -0
  158. package/dist/document.d.ts +41 -0
  159. package/dist/document.js +125 -0
  160. package/dist/entry-hydrate.d.ts +5 -0
  161. package/dist/entry-hydrate.js +42 -0
  162. package/dist/escape.d.ts +18 -0
  163. package/dist/escape.js +37 -0
  164. package/dist/events/bus.d.ts +33 -0
  165. package/dist/events/bus.js +153 -0
  166. package/dist/events/index.d.ts +4 -0
  167. package/dist/events/index.js +4 -0
  168. package/dist/events/schema.d.ts +389 -0
  169. package/dist/events/schema.js +23 -0
  170. package/dist/events/server-registry.d.ts +7 -0
  171. package/dist/events/server-registry.js +13 -0
  172. package/dist/events/sinks.d.ts +64 -0
  173. package/dist/events/sinks.js +85 -0
  174. package/dist/fn-transport.d.ts +33 -0
  175. package/dist/fn-transport.js +140 -0
  176. package/dist/frame.d.ts +20 -0
  177. package/dist/frame.js +19 -0
  178. package/dist/holes-record.d.ts +6 -0
  179. package/dist/holes-record.js +8 -0
  180. package/dist/hooks.d.ts +43 -0
  181. package/dist/hooks.js +1191 -0
  182. package/dist/hydration-info.d.ts +1 -0
  183. package/dist/hydration-info.js +31 -0
  184. package/dist/index.d.ts +21 -0
  185. package/dist/index.js +17 -0
  186. package/dist/insights/attr-rules.d.ts +15 -0
  187. package/dist/insights/attr-rules.js +27 -0
  188. package/dist/insights/cpu.d.ts +82 -0
  189. package/dist/insights/cpu.js +177 -0
  190. package/dist/insights/fp-drift.d.ts +28 -0
  191. package/dist/insights/fp-drift.js +148 -0
  192. package/dist/insights/hole-segments.d.ts +26 -0
  193. package/dist/insights/hole-segments.js +50 -0
  194. package/dist/insights/html-diff.d.ts +25 -0
  195. package/dist/insights/html-diff.js +157 -0
  196. package/dist/insights/hydration-hazards.d.ts +36 -0
  197. package/dist/insights/hydration-hazards.js +136 -0
  198. package/dist/insights/hydration-status.d.ts +2 -0
  199. package/dist/insights/hydration-status.js +0 -0
  200. package/dist/insights/index.d.ts +14 -0
  201. package/dist/insights/index.js +12 -0
  202. package/dist/insights/page-assets.d.ts +211 -0
  203. package/dist/insights/page-assets.js +608 -0
  204. package/dist/insights/page-insights.d.ts +749 -0
  205. package/dist/insights/page-insights.js +2157 -0
  206. package/dist/insights/session-data.d.ts +108 -0
  207. package/dist/insights/session-data.js +0 -0
  208. package/dist/insights/session-insights.d.ts +121 -0
  209. package/dist/insights/session-insights.js +548 -0
  210. package/dist/insights/switch.d.ts +53 -0
  211. package/dist/insights/switch.js +91 -0
  212. package/dist/insights/testing-version.d.ts +19 -0
  213. package/dist/insights/testing-version.js +21 -0
  214. package/dist/insights/third-party.d.ts +75 -0
  215. package/dist/insights/third-party.js +160 -0
  216. package/dist/internal-instruments.d.ts +13 -0
  217. package/dist/internal-instruments.js +12 -0
  218. package/dist/internal-reconcile.d.ts +3 -0
  219. package/dist/internal-reconcile.js +3 -0
  220. package/dist/internal-register.d.ts +7 -0
  221. package/dist/internal-register.js +7 -0
  222. package/dist/internal-server.d.ts +7 -0
  223. package/dist/internal-server.js +7 -0
  224. package/dist/internal.d.ts +13 -0
  225. package/dist/internal.js +13 -0
  226. package/dist/island-graph.d.ts +36 -0
  227. package/dist/island-graph.js +89 -0
  228. package/dist/keep-fallback-marker.d.ts +7 -0
  229. package/dist/keep-fallback-marker.js +9 -0
  230. package/dist/keep-fallback.d.ts +13 -0
  231. package/dist/keep-fallback.js +39 -0
  232. package/dist/kit-paths.d.ts +2 -0
  233. package/dist/kit-paths.js +39 -0
  234. package/dist/late-region-registry.d.ts +40 -0
  235. package/dist/late-region-registry.js +36 -0
  236. package/dist/live-transport.d.ts +57 -0
  237. package/dist/live-transport.js +145 -0
  238. package/dist/markup.d.ts +4 -0
  239. package/dist/markup.js +4 -0
  240. package/dist/own-package.d.ts +15 -0
  241. package/dist/own-package.js +20 -0
  242. package/dist/page-defer.d.ts +33 -0
  243. package/dist/page-defer.js +35 -0
  244. package/dist/page-facts-script.d.ts +7 -0
  245. package/dist/page-facts-script.js +9 -0
  246. package/dist/page-seed-registry.d.ts +72 -0
  247. package/dist/page-seed-registry.js +31 -0
  248. package/dist/plugin/capability.d.ts +14 -0
  249. package/dist/plugin/capability.js +44 -0
  250. package/dist/plugin/client.d.ts +39 -0
  251. package/dist/plugin/client.js +6 -0
  252. package/dist/plugin/css.d.ts +3 -0
  253. package/dist/plugin/css.js +54 -0
  254. package/dist/plugin/facts.d.ts +42 -0
  255. package/dist/plugin/facts.js +37 -0
  256. package/dist/plugin/hooks.d.ts +33 -0
  257. package/dist/plugin/hooks.js +38 -0
  258. package/dist/plugin/index.d.ts +127 -0
  259. package/dist/plugin/index.js +26 -0
  260. package/dist/plugin/routes.d.ts +32 -0
  261. package/dist/plugin/routes.js +35 -0
  262. package/dist/plugin/server.d.ts +27 -0
  263. package/dist/plugin/server.js +92 -0
  264. package/dist/plugin/standard-schema.d.ts +27 -0
  265. package/dist/plugin/standard-schema.js +0 -0
  266. package/dist/plugin/testing.d.ts +13 -0
  267. package/dist/plugin/testing.js +54 -0
  268. package/dist/plugin/utils.d.ts +13 -0
  269. package/dist/plugin/utils.js +19 -0
  270. package/dist/portable-form.d.ts +22 -0
  271. package/dist/portable-form.js +52 -0
  272. package/dist/preference.d.ts +35 -0
  273. package/dist/preference.js +84 -0
  274. package/dist/preload.d.ts +1 -0
  275. package/dist/preload.js +21 -0
  276. package/dist/ref-watch.d.ts +31 -0
  277. package/dist/ref-watch.js +66 -0
  278. package/dist/ref.d.ts +124 -0
  279. package/dist/ref.js +272 -0
  280. package/dist/region-brand.d.ts +8 -0
  281. package/dist/region-brand.js +10 -0
  282. package/dist/region-core.d.ts +2 -0
  283. package/dist/region-core.js +1 -0
  284. package/dist/region-snippet.d.ts +73 -0
  285. package/dist/region-snippet.js +351 -0
  286. package/dist/region.d.ts +127 -0
  287. package/dist/region.js +162 -0
  288. package/dist/request-event.d.ts +1 -0
  289. package/dist/request-event.js +37 -0
  290. package/dist/router-css.d.ts +39 -0
  291. package/dist/router-css.js +66 -0
  292. package/dist/runtime/app-transport.d.ts +2 -0
  293. package/dist/runtime/app-transport.js +13 -0
  294. package/dist/runtime/beacon.d.ts +271 -0
  295. package/dist/runtime/beacon.js +2190 -0
  296. package/dist/runtime/boot-link.d.ts +1 -0
  297. package/dist/runtime/boot-link.js +44 -0
  298. package/dist/runtime/client-hooks.d.ts +5 -0
  299. package/dist/runtime/client-hooks.js +22 -0
  300. package/dist/runtime/client-plugins.d.ts +8 -0
  301. package/dist/runtime/client-plugins.js +34 -0
  302. package/dist/runtime/concurrency.d.ts +12 -0
  303. package/dist/runtime/concurrency.js +29 -0
  304. package/dist/runtime/connected.d.ts +12 -0
  305. package/dist/runtime/connected.js +16 -0
  306. package/dist/runtime/context.d.ts +1 -0
  307. package/dist/runtime/context.js +19 -0
  308. package/dist/runtime/core.d.ts +15 -0
  309. package/dist/runtime/core.js +1173 -0
  310. package/dist/runtime/drift-watch.d.ts +9 -0
  311. package/dist/runtime/drift-watch.js +60 -0
  312. package/dist/runtime/entry-locations.d.ts +33 -0
  313. package/dist/runtime/entry-locations.js +119 -0
  314. package/dist/runtime/foreign-props.d.ts +8 -0
  315. package/dist/runtime/foreign-props.js +14 -0
  316. package/dist/runtime/form-continuity.d.ts +10 -0
  317. package/dist/runtime/form-continuity.js +107 -0
  318. package/dist/runtime/frame-nav.d.ts +36 -0
  319. package/dist/runtime/frame-nav.js +225 -0
  320. package/dist/runtime/frame-store.d.ts +62 -0
  321. package/dist/runtime/frame-store.js +214 -0
  322. package/dist/runtime/frames.d.ts +1 -0
  323. package/dist/runtime/frames.js +25 -0
  324. package/dist/runtime/full.d.ts +4 -0
  325. package/dist/runtime/full.js +32 -0
  326. package/dist/runtime/hash.d.ts +41 -0
  327. package/dist/runtime/hash.js +79 -0
  328. package/dist/runtime/hole-facts.d.ts +8 -0
  329. package/dist/runtime/hole-facts.js +57 -0
  330. package/dist/runtime/host-classes.d.ts +24 -0
  331. package/dist/runtime/host-classes.js +43 -0
  332. package/dist/runtime/hydrate-core.d.ts +101 -0
  333. package/dist/runtime/hydrate-core.js +605 -0
  334. package/dist/runtime/index.d.ts +2 -0
  335. package/dist/runtime/index.js +1 -0
  336. package/dist/runtime/interaction-replay.d.ts +11 -0
  337. package/dist/runtime/interaction-replay.js +70 -0
  338. package/dist/runtime/interaction.d.ts +33 -0
  339. package/dist/runtime/interaction.js +217 -0
  340. package/dist/runtime/island-graph-preload.d.ts +13 -0
  341. package/dist/runtime/island-graph-preload.js +99 -0
  342. package/dist/runtime/kit-boot.d.ts +29 -0
  343. package/dist/runtime/kit-boot.js +60 -0
  344. package/dist/runtime/kit-page-thread.svelte.d.ts +1 -0
  345. package/dist/runtime/kit-page-thread.svelte.js +116 -0
  346. package/dist/runtime/lake-anchors.d.ts +13 -0
  347. package/dist/runtime/lake-anchors.js +19 -0
  348. package/dist/runtime/lakes.d.ts +15 -0
  349. package/dist/runtime/lakes.js +212 -0
  350. package/dist/runtime/live.d.ts +3 -0
  351. package/dist/runtime/live.js +17 -0
  352. package/dist/runtime/load-scheduler.d.ts +53 -0
  353. package/dist/runtime/load-scheduler.js +317 -0
  354. package/dist/runtime/morph.d.ts +42 -0
  355. package/dist/runtime/morph.js +671 -0
  356. package/dist/runtime/nav-handle.d.ts +25 -0
  357. package/dist/runtime/nav-handle.js +71 -0
  358. package/dist/runtime/nav-hooks.d.ts +2 -0
  359. package/dist/runtime/nav-hooks.js +23 -0
  360. package/dist/runtime/nearest-attr.d.ts +4 -0
  361. package/dist/runtime/nearest-attr.js +16 -0
  362. package/dist/runtime/observe.d.ts +27 -0
  363. package/dist/runtime/observe.js +63 -0
  364. package/dist/runtime/own-cost.d.ts +9 -0
  365. package/dist/runtime/own-cost.js +35 -0
  366. package/dist/runtime/ownership.d.ts +101 -0
  367. package/dist/runtime/ownership.js +115 -0
  368. package/dist/runtime/page-cache.d.ts +23 -0
  369. package/dist/runtime/page-cache.js +74 -0
  370. package/dist/runtime/page-defer.d.ts +14 -0
  371. package/dist/runtime/page-defer.js +103 -0
  372. package/dist/runtime/parse-html.d.ts +40 -0
  373. package/dist/runtime/parse-html.js +81 -0
  374. package/dist/runtime/reconcile.d.ts +41 -0
  375. package/dist/runtime/reconcile.js +194 -0
  376. package/dist/runtime/region-attrs.d.ts +95 -0
  377. package/dist/runtime/region-attrs.js +153 -0
  378. package/dist/runtime/region-endpoint-url.d.ts +76 -0
  379. package/dist/runtime/region-endpoint-url.js +169 -0
  380. package/dist/runtime/region-ids.d.ts +8 -0
  381. package/dist/runtime/region-ids.js +33 -0
  382. package/dist/runtime/remote-seeds.d.ts +2 -0
  383. package/dist/runtime/remote-seeds.js +21 -0
  384. package/dist/runtime/render-blocking.d.ts +2 -0
  385. package/dist/runtime/render-blocking.js +30 -0
  386. package/dist/runtime/restore.d.ts +34 -0
  387. package/dist/runtime/restore.js +390 -0
  388. package/dist/runtime/router-nav.d.ts +63 -0
  389. package/dist/runtime/router-nav.js +740 -0
  390. package/dist/runtime/router.d.ts +201 -0
  391. package/dist/runtime/router.js +593 -0
  392. package/dist/runtime/schedule.d.ts +49 -0
  393. package/dist/runtime/schedule.js +256 -0
  394. package/dist/runtime/seeds.d.ts +50 -0
  395. package/dist/runtime/seeds.js +208 -0
  396. package/dist/runtime/session.d.ts +52 -0
  397. package/dist/runtime/session.js +130 -0
  398. package/dist/runtime/sidecar.d.ts +3 -0
  399. package/dist/runtime/sidecar.js +56 -0
  400. package/dist/runtime/slots.d.ts +183 -0
  401. package/dist/runtime/slots.js +44 -0
  402. package/dist/runtime/spa-cacheable.d.ts +7 -0
  403. package/dist/runtime/spa-cacheable.js +18 -0
  404. package/dist/runtime/speculate-hint.d.ts +1 -0
  405. package/dist/runtime/speculate-hint.js +35 -0
  406. package/dist/runtime/svelte-warnings.d.ts +28 -0
  407. package/dist/runtime/svelte-warnings.js +71 -0
  408. package/dist/runtime/wire-classes.d.ts +3 -0
  409. package/dist/runtime/wire-classes.js +69 -0
  410. package/dist/runtime/wire-format.d.ts +7 -0
  411. package/dist/runtime/wire-format.js +22 -0
  412. package/dist/script.d.ts +134 -0
  413. package/dist/script.js +184 -0
  414. package/dist/seed-refs.d.ts +105 -0
  415. package/dist/seed-refs.js +487 -0
  416. package/dist/server/capability-lifetime.d.ts +28 -0
  417. package/dist/server/capability-lifetime.js +31 -0
  418. package/dist/server/dead-kit-resolves.d.ts +1 -0
  419. package/dist/server/dead-kit-resolves.js +39 -0
  420. package/dist/server/document-assembly.d.ts +30 -0
  421. package/dist/server/document-assembly.js +26 -0
  422. package/dist/server/document-tail.d.ts +113 -0
  423. package/dist/server/document-tail.js +208 -0
  424. package/dist/server/endpoint.d.ts +51 -0
  425. package/dist/server/endpoint.js +90 -0
  426. package/dist/server/entry-location.d.ts +8 -0
  427. package/dist/server/entry-location.js +29 -0
  428. package/dist/server/fingerprint.d.ts +1 -0
  429. package/dist/server/fingerprint.js +25 -0
  430. package/dist/server/head-presence.d.ts +45 -0
  431. package/dist/server/head-presence.js +156 -0
  432. package/dist/server/hmac.d.ts +38 -0
  433. package/dist/server/hmac.js +89 -0
  434. package/dist/server/hole-graph.d.ts +7 -0
  435. package/dist/server/hole-graph.js +71 -0
  436. package/dist/server/hole-urls.d.ts +3 -0
  437. package/dist/server/hole-urls.js +76 -0
  438. package/dist/server/html-scan.d.ts +19 -0
  439. package/dist/server/html-scan.js +60 -0
  440. package/dist/server/kit-context.d.ts +78 -0
  441. package/dist/server/kit-context.js +110 -0
  442. package/dist/server/late-wire.d.ts +22 -0
  443. package/dist/server/late-wire.js +28 -0
  444. package/dist/server/page-facts.d.ts +25 -0
  445. package/dist/server/page-facts.js +138 -0
  446. package/dist/server/page-seed.d.ts +33 -0
  447. package/dist/server/page-seed.js +60 -0
  448. package/dist/server/page-stream.d.ts +55 -0
  449. package/dist/server/page-stream.js +121 -0
  450. package/dist/server/payload.d.ts +6 -0
  451. package/dist/server/payload.js +22 -0
  452. package/dist/server/personal-response.d.ts +6 -0
  453. package/dist/server/personal-response.js +13 -0
  454. package/dist/server/props-wire.d.ts +56 -0
  455. package/dist/server/props-wire.js +178 -0
  456. package/dist/server/rate-limit.d.ts +22 -0
  457. package/dist/server/rate-limit.js +63 -0
  458. package/dist/server/region-css.d.ts +5 -0
  459. package/dist/server/region-css.js +30 -0
  460. package/dist/server/region-endpoint.d.ts +35 -0
  461. package/dist/server/region-endpoint.js +142 -0
  462. package/dist/server/region-props.d.ts +6 -0
  463. package/dist/server/region-props.js +44 -0
  464. package/dist/server/remote-seed-gate.d.ts +50 -0
  465. package/dist/server/remote-seed-gate.js +66 -0
  466. package/dist/server/render-cache.d.ts +26 -0
  467. package/dist/server/render-cache.js +51 -0
  468. package/dist/server/render-page.d.ts +51 -0
  469. package/dist/server/render-page.js +176 -0
  470. package/dist/server/render-region-html.d.ts +2 -0
  471. package/dist/server/render-region-html.js +19 -0
  472. package/dist/server/request-stats.d.ts +174 -0
  473. package/dist/server/request-stats.js +54 -0
  474. package/dist/server/reversible.d.ts +83 -0
  475. package/dist/server/reversible.js +994 -0
  476. package/dist/server/seed-shape.d.ts +22 -0
  477. package/dist/server/seed-shape.js +24 -0
  478. package/dist/server/shared-cache.d.ts +35 -0
  479. package/dist/server/shared-cache.js +104 -0
  480. package/dist/server/signing-key.d.ts +11 -0
  481. package/dist/server/signing-key.js +47 -0
  482. package/dist/server/sized-lru.d.ts +20 -0
  483. package/dist/server/sized-lru.js +68 -0
  484. package/dist/server/split-regions.d.ts +81 -0
  485. package/dist/server/split-regions.js +368 -0
  486. package/dist/server/stream-regions.d.ts +5 -0
  487. package/dist/server/stream-regions.js +36 -0
  488. package/dist/shared-state.d.ts +7 -0
  489. package/dist/shared-state.js +152 -0
  490. package/dist/shims/app-environment.d.ts +4 -0
  491. package/dist/shims/app-environment.js +6 -0
  492. package/dist/shims/app-navigation.d.ts +33 -0
  493. package/dist/shims/app-navigation.js +119 -0
  494. package/dist/shims/app-paths.d.ts +6 -0
  495. package/dist/shims/app-paths.js +18 -0
  496. package/dist/shims/app-state.svelte.d.ts +23 -0
  497. package/dist/shims/app-state.svelte.js +50 -0
  498. package/dist/shims/app-stores.d.ts +21 -0
  499. package/dist/shims/app-stores.js +54 -0
  500. package/dist/shims/kit-bridge.d.ts +29 -0
  501. package/dist/shims/kit-bridge.js +7 -0
  502. package/dist/shims/kit-remote/client-stub.d.ts +27 -0
  503. package/dist/shims/kit-remote/client-stub.js +43 -0
  504. package/dist/shims/kit-remote/paths-internal-stub.d.ts +3 -0
  505. package/dist/shims/kit-remote/paths-internal-stub.js +5 -0
  506. package/dist/shims/kit-remote/remote-cache.d.ts +49 -0
  507. package/dist/shims/kit-remote/remote-cache.js +73 -0
  508. package/dist/shims/kit-remote/state-stub.d.ts +8 -0
  509. package/dist/shims/kit-remote/state-stub.js +8 -0
  510. package/dist/shims/page-store.svelte.d.ts +39 -0
  511. package/dist/shims/page-store.svelte.js +77 -0
  512. package/dist/source.d.ts +29 -0
  513. package/dist/source.js +87 -0
  514. package/dist/store-transport.d.ts +86 -0
  515. package/dist/store-transport.js +229 -0
  516. package/dist/tool-fetches.d.ts +5 -0
  517. package/dist/tool-fetches.js +41 -0
  518. package/dist/transport.d.ts +48 -0
  519. package/dist/transport.js +181 -0
  520. package/dist/unscoped-css.d.ts +26 -0
  521. package/dist/unscoped-css.js +53 -0
  522. package/dist/vite/dev-maps.d.ts +33 -0
  523. package/dist/vite/dev-maps.js +140 -0
  524. package/dist/vite/index.d.ts +19 -0
  525. package/dist/vite/index.js +820 -0
  526. package/dist/vite/kit-dirs.d.ts +7 -0
  527. package/dist/vite/kit-dirs.js +67 -0
  528. package/dist/vite/late-island.d.ts +25 -0
  529. package/dist/vite/late-island.js +33 -0
  530. package/dist/vite/module-map.d.ts +8 -0
  531. package/dist/vite/module-map.js +144 -0
  532. package/dist/vite/options.d.ts +208 -0
  533. package/dist/vite/options.js +74 -0
  534. package/dist/vite/package-files.d.ts +3 -0
  535. package/dist/vite/package-files.js +84 -0
  536. package/dist/vite/paths.d.ts +45 -0
  537. package/dist/vite/paths.js +112 -0
  538. package/dist/vite/plugin-api.d.ts +166 -0
  539. package/dist/vite/plugin-api.js +212 -0
  540. package/dist/vite/profiler-maps.d.ts +23 -0
  541. package/dist/vite/profiler-maps.js +178 -0
  542. package/dist/vite/server-sourcemaps.d.ts +8 -0
  543. package/dist/vite/server-sourcemaps.js +80 -0
  544. package/dist/vite/sourcemaps.d.ts +18 -0
  545. package/dist/vite/sourcemaps.js +80 -0
  546. package/dist/vite/style-preprocess.d.ts +2 -0
  547. package/dist/vite/style-preprocess.js +96 -0
  548. package/package.json +180 -6
@@ -0,0 +1,34 @@
1
+ import { IslandHazard } from "../../insights/hydration-hazards.js";
2
+ /** Structural shape of a Vite dev module-graph node (the fields the byte walk reads). */
3
+ export type ByteGraphModule = {
4
+ url?: string | null;
5
+ id?: string | null;
6
+ file?: string | null;
7
+ transformResult?: {
8
+ code?: string | null;
9
+ } | null;
10
+ importedModules?: Iterable<ByteGraphModule>;
11
+ };
12
+ /**
13
+ * `island id → { bytes, modules }` for every island entry present in the graph, where `bytes` is the
14
+ * summed served size of the entry's whole transitive import subgraph and `modules` the node count.
15
+ * When two graph nodes resolve to the same island id (e.g. `?v=` query variants), the larger wins.
16
+ */
17
+ export declare function island_subgraph_bytes(modules: Iterable<ByteGraphModule>, read?: (file: string) => string | undefined): Record<string, IslandBytes>;
18
+ /** An island's app code in dev: the total, its heaviest modules, and any barrel it pulls whole. */
19
+ export interface IslandBytes {
20
+ bytes: number;
21
+ modules: number;
22
+ /** the heaviest modules (served size, heaviest first): what to look at first */
23
+ top?: {
24
+ file: string;
25
+ bytes: number;
26
+ }[];
27
+ /** re-export barrels still in the island's graph, with how many app modules each drags in */
28
+ barrels?: {
29
+ file: string;
30
+ fanout: number;
31
+ }[];
32
+ /** its components' lines that draw differently in the browser (a top-level await, a browser-only value) */
33
+ hazards?: IslandHazard[];
34
+ }
@@ -0,0 +1,126 @@
1
+ import { hydration_hazards } from "../../insights/hydration-hazards.js";
2
+ import { OWN_FILE_RE } from "../../own-package.js";
3
+ // src/compiler/dev/region-bytes.ts
4
+ /**
5
+ * Dev-only per-island byte estimate — walks DOWN the Vite dev module graph from each island entry
6
+ * and sums the served (transformed) size of the APP modules it transitively imports: its wrapper,
7
+ * the component, and every child component / app util the component pulls in. Not just the wrapper
8
+ * chunk a `PerformanceResourceTiming` lookup sees — but also NOT the shared framework.
9
+ *
10
+ * The framework boundary is pruned (`node_modules`, Vite's `.vite/deps` prebundles): Svelte's runtime
11
+ * is loaded ONCE for the whole page, so folding it into every island makes them all read as ~2 MB and
12
+ * hides the real difference. Counting only app code surfaces the number that actually varies island to
13
+ * island — "what does THIS component cost on top of the shared runtime".
14
+ *
15
+ * Caveats (surfaced in the tab): dev code is unbundled + unminified, so the number is an ESTIMATE of
16
+ * relative cost, not the shipped byte count; and a still-cold island (one that hasn't woken, so its
17
+ * component was never loaded) has no subgraph in the graph yet — it simply doesn't appear here until
18
+ * it wakes. Pure over the nodes it's handed; reads, never mutates.
19
+ */
20
+ /** An island entry module — `virtual:ogygia/island/<id>.js` (dev url carries the id). */
21
+ const ISLAND_RE = /virtual:ogygia\/island\/([0-9a-f]+)\.js/;
22
+ /** Shared framework / prebundled deps — pruned so per-island totals reflect app code, not Svelte. */
23
+ function is_framework(mod) {
24
+ const s = (mod.file || "") + "\n" + (mod.url || mod.id || "");
25
+ const u = mod.url || mod.id || "";
26
+ return s.includes("node_modules") || s.includes("/.vite/deps/") || OWN_FILE_RE.test(s) || u.includes("virtual:ogygia/") && !u.includes("virtual:ogygia/island/");
27
+ }
28
+ /**
29
+ * The island's own entry glue (`virtual:ogygia/island/<id>.js`, its wrapper). Traversed THROUGH to
30
+ * reach the real component, but not COUNTED — it's the island's door, not the component's weight.
31
+ */
32
+ function is_glue(mod) {
33
+ return (mod.url || mod.id || "").includes("virtual:ogygia/island/");
34
+ }
35
+ /**
36
+ * `island id → { bytes, modules }` for every island entry present in the graph, where `bytes` is the
37
+ * summed served size of the entry's whole transitive import subgraph and `modules` the node count.
38
+ * When two graph nodes resolve to the same island id (e.g. `?v=` query variants), the larger wins.
39
+ */
40
+ function island_subgraph_bytes(modules, read) {
41
+ const out = {};
42
+ for (const mod of modules) {
43
+ const url = mod.url || mod.id || "";
44
+ const m = ISLAND_RE.exec(url);
45
+ if (!m) continue;
46
+ const iid = m[1];
47
+ const seen = /* @__PURE__ */ new Set();
48
+ const stack = [mod];
49
+ let bytes = 0;
50
+ let count = 0;
51
+ let steps = 0;
52
+ const each = [];
53
+ const barrels = [];
54
+ const hazards = [];
55
+ while (stack.length && steps++ < 2e4) {
56
+ const n = stack.pop();
57
+ if (seen.has(n)) continue;
58
+ seen.add(n);
59
+ if (is_framework(n)) {
60
+ const f = (n.file || "").split("\\").join("/");
61
+ const at = f.indexOf("/content/");
62
+ if (read && at !== -1 && OWN_FILE_RE.test(f) && f.endsWith(".svelte") && hazards.length < 5) {
63
+ const src = read(n.file);
64
+ if (src) {
65
+ for (const h of hydration_hazards(src).slice(0, 3)) if (hazards.length < 5) hazards.push({
66
+ file: `ogygia/${f.slice(at + 1)}`,
67
+ ...h
68
+ });
69
+ }
70
+ }
71
+ continue;
72
+ }
73
+ let fanout = 0;
74
+ for (const dep of n.importedModules ?? []) {
75
+ stack.push(dep);
76
+ if (!is_framework(dep)) fanout++;
77
+ }
78
+ if (is_glue(n)) continue;
79
+ const code = n.transformResult?.code;
80
+ if (typeof code === "string") {
81
+ bytes += code.length;
82
+ count++;
83
+ const file = short_url(n);
84
+ each.push({
85
+ file,
86
+ bytes: code.length
87
+ });
88
+ if (fanout >= BARREL_FANOUT && code.length <= fanout * BARREL_BYTES_PER_EXPORT && !file.endsWith(".svelte")) barrels.push({
89
+ file,
90
+ fanout
91
+ });
92
+ if (read && n.file && file.endsWith(".svelte") && hazards.length < 5) {
93
+ const src = read(n.file);
94
+ if (src) {
95
+ for (const h of hydration_hazards(src).slice(0, 3)) if (hazards.length < 5) hazards.push({
96
+ file,
97
+ ...h
98
+ });
99
+ }
100
+ }
101
+ }
102
+ }
103
+ if ((count > 0 || hazards.length) && (!out[iid] || out[iid].bytes < bytes)) {
104
+ each.sort((a, b) => b.bytes - a.bytes);
105
+ out[iid] = {
106
+ bytes,
107
+ modules: count,
108
+ top: each.slice(0, 5),
109
+ ...barrels.length ? { barrels: barrels.sort((a, b) => b.fanout - a.fanout).slice(0, 3) } : {},
110
+ ...hazards.length ? { hazards } : {}
111
+ };
112
+ }
113
+ }
114
+ return out;
115
+ }
116
+ /** a barrel re-exports at least this many app modules… */
117
+ const BARREL_FANOUT = 6;
118
+ /** …with about this much code of its own per module (an `export … from` line, transformed) */
119
+ const BARREL_BYTES_PER_EXPORT = 160;
120
+ /** A module's served path, query dropped; a file outside the root (`/@fs/…`) by its last parts. */
121
+ function short_url(n) {
122
+ const u = (n.url || n.id || "").split("?")[0];
123
+ if (u.startsWith("/@fs/")) return u.split("/").slice(-3).join("/");
124
+ return u.startsWith("/") ? u.slice(1) : u;
125
+ }
126
+ export { island_subgraph_bytes };
@@ -0,0 +1,280 @@
1
+ import { transformTsRegions } from "./region/transform.js";
2
+ import { Program } from "./program.js";
3
+ import { CompileCtx } from "./ctx.js";
4
+ /** The bundler's `emitFile` for an entry chunk, by `name` (the output pattern content-hashes it).
5
+ * Returns the reference id. */
6
+ export type EmitChunk = (chunk: {
7
+ type: "chunk";
8
+ id: string;
9
+ name: string;
10
+ }) => string;
11
+ /** Shared OGYGIA_PROFILE instrument — the adapter owns the maps/counters; the driver writes into
12
+ * them so the transform-phase metrics (and the determinism digest source) live with the transform. */
13
+ export interface Profiler {
14
+ prof: {
15
+ transformMs: number;
16
+ transformN: number;
17
+ transformHit: number;
18
+ prescanMs: number;
19
+ bakeMs: number;
20
+ bakeN: number;
21
+ resolveMs: number;
22
+ loadMs: number;
23
+ };
24
+ P: boolean;
25
+ outHash: Map<string, number>;
26
+ }
27
+ /**
28
+ * The island shim for an `$app/*` import, by specifier or by where Kit's alias sent it: Vite's alias
29
+ * plugin runs before any plugin's resolveId, so an import the transform did not rewrite (a module
30
+ * that joined the island graph late) arrives as `<kit>/src/runtime/app/state`, `…/state/index.js`.
31
+ */
32
+ export declare function app_shim_for(source: string, shims: Record<string, string>): string | null;
33
+ export declare class Compiler {
34
+ #private;
35
+ readonly program: Program;
36
+ readonly transform_cache: Map<string, {
37
+ code: string;
38
+ result: unknown;
39
+ }>;
40
+ readonly profiler: Profiler;
41
+ /** Every `import.meta.og.$` hoist collected across the build (tag → factory source). Filled by
42
+ * `macros()`; drained by the adapter's fn-manifest emit (dev load leg, renderChunk, writeBundle). */
43
+ readonly dollar_hoists: Map<string, string>;
44
+ /** True (once) when a server island registered since the last manifest emit — re-invalidate it. */
45
+ server_manifest_stale(): boolean;
46
+ constructor(program: Program, profiler: Profiler);
47
+ /** Bind the resolved compile context (called once the bundler has resolved the build). */
48
+ configure(ctx: CompileCtx): void;
49
+ /**
50
+ * Devtools: the `island id → component name` map, read at call time off the live registry (so a
51
+ * dev-server middleware serves a COMPLETE, current map — no stale virtual-module snapshot). Keys
52
+ * are the island id (`<hash>` in `virtual:ogygia/island/<hash>.js`); values the component's
53
+ * basename. A held/generated island with no source file is skipped (the tab keeps its short hash).
54
+ */
55
+ region_names(): Record<string, string>;
56
+ /**
57
+ * Run the module-macro passes (`wire`/`$`/`source`/`store`/auto-brand, the plugins' macros, then
58
+ * `bake`) over one module — the leg that must land before the island transform / svelte compile /
59
+ * ts-region minting sees it. `source` is the CURRENT text (a plugin's pre-transform may already have
60
+ * edited it). Returns `{ code, touched }`; the caller nulls its own sourcemap when `touched`.
61
+ */
62
+ macros(source: string, id: string): Promise<{
63
+ code: string;
64
+ touched: boolean;
65
+ }>;
66
+ /**
67
+ * Transform a content (`.svx`/`.md`) island source the markdown preprocessor hands back — always
68
+ * wrapper-linked (`linkVirtual: true`), because a preprocessor output is shared across the ssr/client
69
+ * legs and can't take the csr=false stub split; content files aren't routes, so they'd get wrappers
70
+ * anyway. Registers the descriptors and returns the rewritten code, or `null` when it has no islands.
71
+ * This is the transform the adapter installs on the content-island bridge.
72
+ */
73
+ transform_content_island(source: string, filename: string): string | null;
74
+ transform(source: string, id: string, opts?: {
75
+ ssr?: boolean;
76
+ linkVirtual?: boolean;
77
+ }): unknown;
78
+ /**
79
+ * Mint the `.ts` / `.js` regions in one module — `with { wake: … }` load/remote imports become
80
+ * island descriptors. The ts-region half of the front-end, sharing the driver's resolved context
81
+ * (so both the prescan and the transform hook mint identically). Not memoized — the caller gates it
82
+ * on the id + marker; the returned descriptors are the caller's to `register`.
83
+ */
84
+ ts_regions(source: string, id: string): ReturnType<typeof transformTsRegions>;
85
+ /**
86
+ * Discover every island up front — walk `src/`, transform each `.svelte` host and mint each
87
+ * `.ts`/`.js` region, register the descriptors, then complete `island_graph` TRANSITIVELY and
88
+ * finalize the runtime capability marks (so the sticky runtime entry bundles only what the app
89
+ * uses, and its immutable chunk name busts on a feature-set change). Once per session, so the
90
+ * adapter can call it from any hook. Populates the `Program`; the fs walk is the only side effect.
91
+ */
92
+ prescan(): void;
93
+ /** DEV: take the modules newly marked as island code since the last drain (see above). */
94
+ drain_closure_marks(): string[];
95
+ mark_island_closure(componentAbs: string): string[];
96
+ /**
97
+ * Scan ENTRIES for Vite's dep optimizer: every hydrate island's component file and the host file
98
+ * that places it — real, absolute, on-disk source paths. Under `csr = false` Kit ships no client
99
+ * entry and registers only `routes/**\/+*` as scan entries, so Vite's scanner reaches an island
100
+ * only when a route file imports it statically. An island behind a block registry, an
101
+ * `import.meta.og.regions()` glob or a `.remote.ts` mint is never crawled: its client deps are
102
+ * discovered LAZILY on its first wake, and every discovery re-optimizes, rotates the optimizer's
103
+ * browserHash and full-reloads — on a large app a reload storm that never settles. The adapter
104
+ * appends these to `optimizeDeps.entries` (dev) so Vite's OWN scanner crawls them at startup with
105
+ * the full plugin pipeline: its resolver, every plugin's `resolveId` (a `?client` import resolves
106
+ * through vite-plugin-iso-import), a linked workspace package followed as SOURCE and never
107
+ * pre-bundled, the app's `exclude` honoured.
108
+ *
109
+ * Deliberately NOT a self-computed `optimizeDeps.include` list. A resolver that is not Vite's
110
+ * mis-classifies something Vite knows — a plugin query, a workspace link, an `exports` map — and
111
+ * a wrong `include` hands rolldown an id it cannot load: `UNLOADABLE_DEPENDENCY`, a dead dev
112
+ * server (two field-reported regressions). An entry can only ever ADD a crawl root; what the
113
+ * crawl finds is Vite's call. A `defer` island renders on the server (its closure is not client
114
+ * code) and a lake ships no client JS, so neither is an entry; the host file covers a
115
+ * portable-snippet synth, which has no component file of its own. Needs `prescan()`; deduped,
116
+ * sorted, existing source files only.
117
+ */
118
+ island_scan_entries(): string[];
119
+ /** The feature-selected runtime chunk name (immutable-cached). Needs prescan to have run for a
120
+ * non-empty feature hash; both build legs prescan the same source → the same name. */
121
+ runtime_chunk_filename(): string;
122
+ /** Public URL of the runtime chunk (asset prefix + filename — honors a non-root base / assets CDN). */
123
+ runtime_chunk_url(): string;
124
+ /** The server-router component roots (link/router-css.ts). Build: prescan is complete before any
125
+ * consumer runs — memoized. Dev: modules appear lazily (HMR), recompute per call. */
126
+ router_css_roots(): string[];
127
+ /** Does the program hold ANY hydrate island? The runtime-emission gate needs this because
128
+ * `hasAnyCsrFalseRoute` only inspects Kit PAGE leaves — an app whose islands live solely in
129
+ * router-rendered components (a pure-router / fragment-only service has ZERO `+page` files)
130
+ * answers "no csr=false page" while its documents still `<script src>` the runtime. */
131
+ /**
132
+ * Server-only islands — `render: 'deferred'` with no client chunk — and the component file each
133
+ * renders. Nothing on any page links such a component's CSS (Kit collects stylesheets from the
134
+ * client graph; this subtree is never in it), so the client leg compiles each one's whole tree
135
+ * CSS into a dedicated asset the hole response links (vite/index.ts, `region_css_links`).
136
+ * Sorted for determinism; a component shared by several ids is emitted once (by `abs`).
137
+ */
138
+ server_island_css_roots(): Array<{
139
+ iid: string;
140
+ abs: string;
141
+ }>;
142
+ /** The public URL key a server island's CSS is handed off under (matches `island_url[id]`). */
143
+ island_public_url(iid: string): string;
144
+ has_hydrate_regions(): boolean;
145
+ /** The server leg's real module graph, for the client-leg handoff (link/emit-gate.ts). */
146
+ ssr_transformed_hosts(): string[];
147
+ /**
148
+ * Client leg: the runtime chunk + one deterministic chunk per deduped hydrate region. `loaded` —
149
+ * the server leg's transformed-module set (the handoff the plugin reads) — gates the emit to
150
+ * islands whose HOST the server bundle actually contains; `null` (no handoff: standalone, or a
151
+ * client-only build) keeps every prescanned island, as before. Returns how many were skipped.
152
+ */
153
+ emit_build_chunks(emitFile: EmitChunk, { emitRuntime, loaded }: {
154
+ emitRuntime: boolean;
155
+ loaded?: Set<string> | null;
156
+ }): number;
157
+ /** Client-build refs of each emitted island entry (by island id) and of the runtime entry: the
158
+ * bundle end turns them into the hashed file names the handoff maps the stable names to. */
159
+ readonly island_entry_refs: Map<string, string>;
160
+ runtime_entry_ref: string | null;
161
+ /**
162
+ * At the bundle's end (the names are final): each entry's IDENTITY → its LOCATION. `islands` maps
163
+ * an island entry's hashed file to its identity (the collector keys every map by identity);
164
+ * `locations` is what the handoff carries to the server (`entries`): identity → served path.
165
+ * `get_file_name` is the bundler's `this.getFileName`.
166
+ */
167
+ entry_locations(get_file_name: (ref: string) => string): {
168
+ islands: Map<string, string>;
169
+ runtime: string | null;
170
+ runtime_file: string | null;
171
+ locations: Record<string, string>;
172
+ };
173
+ /** One hydrate island's entry, content-hashed by the bundler (its stable-name shim is written at
174
+ * the bundle's end: `entry_shims`). */
175
+ emit_island_entry(emitFile: EmitChunk, rid: string, virtualPath: string): void;
176
+ /**
177
+ * The output file pattern for one of OUR entries (by the chunk name `emit_island_entry` / the
178
+ * runtime emit gave it), else null (the app's own naming applies). Readable and content-hashed:
179
+ * `<appDir>/immutable/og-region.<iid>.<hash>.js`, `…/og-runtime-<features>.<hash>.js` — the hash is the
180
+ * cache law, the name is for people (a network tab, a CDN rule, a profile). It never equals a
181
+ * stable name, which has no hash segment.
182
+ */
183
+ entry_file_pattern(chunk_name: string | undefined): string | null;
184
+ /**
185
+ * The stable-name shims (link/entry-shim.ts), for the bundle's end (the names are final): one per
186
+ * island entry, plus the runtime's — each a plain file at the old stable name re-exporting the
187
+ * hashed file. `get_file_name` is the bundler's `this.getFileName`.
188
+ */
189
+ entry_shims(get_file_name: (ref: string) => string): {
190
+ fileName: string;
191
+ source: string;
192
+ }[];
193
+ /**
194
+ * Emit one ogygia VIRTUAL module's source: the config/capability virtuals (secret / sign / rate-limit
195
+ * / router / session / ttl / manifests / runtime entry+url / transport / dev-hmr / request-event /
196
+ * region-endpoint), and the registered island/region sources (with the client leg's `$app/*`-shim +
197
+ * lake-placeholder rewrites). Returns the source string, or `null` if `id` is not an ogygia virtual —
198
+ * the adapter owns only the FOUC-css virtuals (they carry a Vite `moduleType`) and the Vite build
199
+ * value threaded in here (the `universalHooks` path).
200
+ */
201
+ emit(id: string, { ssr, universalHooks, resolve, kitCodec }: {
202
+ ssr: boolean;
203
+ universalHooks: string | null;
204
+ /** the bundler's resolver (the router-CSS tree walk: compiler/fouc-css.ts) */
205
+ resolve?: (spec: string, importer: string) => Promise<string | null>;
206
+ /** Kit 3's own codec module (`#app/internal/transport`), when the app's Kit has one */
207
+ kitCodec?: string | null;
208
+ }): string | Promise<string> | null;
209
+ /**
210
+ * Resolve an ogygia-owned import id: the virtual-module vocabulary (config/manifest virtuals + FOUC
211
+ * graph + client-binding stub), and the island CLIENT graph — `$app/*` shims for island importers,
212
+ * virtual island/wrapper ids, and relative imports of a generated island module resolved against its
213
+ * host (marking each resolved dep into `island_graph` so its own `$app/*` stays shimmed). `resolve` is
214
+ * the bundler's own resolver (Vite `this.resolve`), threaded in so the driver stays bundler-agnostic.
215
+ * Returns a resolved id / result, or `null` to defer to the bundler. The adapter handles the few
216
+ * package/Kit-specific ids first (ogygia injected imports, Kit's remote runtime, the kit-wire path).
217
+ */
218
+ resolve_id(source: string, importer: string | undefined, { ssr, resolve }: {
219
+ ssr: boolean;
220
+ resolve: (source: string, importer: string, opts: {
221
+ skipSelf: boolean;
222
+ }) => Promise<{
223
+ id: string;
224
+ } | null>;
225
+ }): Promise<string | {
226
+ id: string;
227
+ } | null>;
228
+ /**
229
+ * The per-file transform pass: content-preset tagging ▸ `import.meta.og.*` macros ▸ the host-island
230
+ * transform (`.svelte`) ▸ ts/js region minting (`.ts/.js`) ▸ the client `$app/*` shim. Registers the
231
+ * discovered descriptors into the `Program`, and (client build only) emits the deterministic chunk for
232
+ * any hydrate island a library component declares that the prescan couldn't see — via the `emitFile`
233
+ * callback (the one Vite primitive threaded in). Returns the Vite transform result, or `null` if the
234
+ * module was untouched. `prescan()` runs first so `island_graph` is complete before any module lowers.
235
+ */
236
+ transform_module(code: string, id: string, { ssr, emitFile }: {
237
+ ssr: boolean;
238
+ emitFile: EmitChunk;
239
+ }): Promise<{
240
+ code: string;
241
+ map: unknown;
242
+ } | null>;
243
+ /**
244
+ * Patch the fn-manifest placeholder in a finished chunk with the collected `og.$` factory
245
+ * registrations — every transform has run by renderChunk, so `dollar_hoists` is complete. Registrations
246
+ * go through the globalThis bridge the placeholder module installed (rename-proof under minification).
247
+ * Returns the patched chunk, or `null` if this chunk carries no placeholder.
248
+ */
249
+ patch_fn_manifest(code: string): {
250
+ code: string;
251
+ map: null;
252
+ } | null;
253
+ /**
254
+ * Patch the server manifest's page-data placeholder: per server island (a hole), does its SERVER
255
+ * tree — the component and everything it imports, statically or dynamically (a registry's blocks)
256
+ * — read `page.data`? The transform recorded each module's reads (`page_keys`, seed shaping); by
257
+ * renderChunk the graph is complete. A hole that never reads it never pays the page lookup
258
+ * (server/render-page.ts). One walk per hole, sharing what earlier walks proved: a walk that ends
259
+ * with no reader proves every module it visited reads nothing. `graph` is the bundler's module info.
260
+ */
261
+ patch_page_data_reads(code: string, graph: (id: string) => {
262
+ importedIds: readonly string[];
263
+ dynamicallyImportedIds: readonly string[];
264
+ } | null, module_ids: () => Iterable<string>): {
265
+ code: string;
266
+ map: null;
267
+ } | null;
268
+ /** True when `file` is a registered island HOST (a component that declares islands). */
269
+ is_registered_host(file: string): boolean;
270
+ /**
271
+ * Drop the cached virtual island modules + the registry rows for `file` — call when a HOST changes
272
+ * (an import-target rename keeps the same island id) or an ENTRY component is deleted (NOT on ordinary
273
+ * entry-component content edits — those are soft HMR). Mutates the Program; `invalidate` is the
274
+ * bundler's module-invalidation (Vite's moduleGraph), threaded in. Returns whether anything changed.
275
+ */
276
+ invalidate_for_file(file: string, { deleted, invalidate }: {
277
+ deleted?: boolean;
278
+ invalidate: (id: string) => void;
279
+ }): boolean;
280
+ }