@absolutejs/absolute 0.19.0-beta.999 → 0.20.0-beta.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 (341) hide show
  1. package/LICENSE +21 -13
  2. package/README.md +48 -2
  3. package/dist/angular/browser.js +82 -77
  4. package/dist/angular/browser.js.map +11 -11
  5. package/dist/angular/components/constants.js +43 -0
  6. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  7. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  8. package/dist/angular/hmrPreserveCore.ts +132 -134
  9. package/dist/angular/index.js +1719 -844
  10. package/dist/angular/index.js.map +34 -26
  11. package/dist/angular/server.js +1620 -768
  12. package/dist/angular/server.js.map +28 -20
  13. package/dist/build.js +4935 -2593
  14. package/dist/build.js.map +72 -57
  15. package/dist/cli/config/client.js +578 -0
  16. package/dist/cli/config/server.js +39587 -0
  17. package/dist/cli/htmx/htmx.min.js +1 -0
  18. package/dist/cli/index.js +16828 -3511
  19. package/dist/client/index.js +49 -46
  20. package/dist/client/index.js.map +12 -12
  21. package/dist/core/streamingSlotRegistrar.js +1 -19
  22. package/dist/core/streamingSlotRegistrar.js.map +2 -2
  23. package/dist/core/streamingSlotRegistry.js +1 -19
  24. package/dist/core/streamingSlotRegistry.js.map +2 -2
  25. package/dist/dev/client/cssUtils.ts +98 -41
  26. package/dist/dev/client/domState.ts +2 -0
  27. package/dist/dev/client/errorOverlay.ts +14 -13
  28. package/dist/dev/client/handlers/angularHmrShim.ts +20 -20
  29. package/dist/dev/client/handlers/angularRemount.ts +74 -55
  30. package/dist/dev/client/handlers/angularRemountWiring.ts +1 -2
  31. package/dist/dev/client/handlers/html.ts +144 -41
  32. package/dist/dev/client/handlers/htmx.ts +43 -8
  33. package/dist/dev/client/handlers/react.ts +114 -32
  34. package/dist/dev/client/handlers/rebuild.ts +28 -8
  35. package/dist/dev/client/handlers/svelte.ts +92 -51
  36. package/dist/dev/client/handlers/vue.ts +36 -45
  37. package/dist/dev/client/hmrClient.ts +101 -26
  38. package/dist/dev/client/hmrTiming.ts +141 -0
  39. package/dist/dev/client/hmrToast.ts +22 -24
  40. package/dist/dev/client/reactRefreshSetup.ts +4 -0
  41. package/dist/dev/client/vendor/reactRefreshRuntime.d.ts +12 -0
  42. package/dist/dev/client/vendor/reactRefreshRuntime.js +313 -0
  43. package/dist/dev/serverBootstrap.js +45 -0
  44. package/dist/index.js +7153 -3224
  45. package/dist/index.js.map +118 -86
  46. package/dist/islands/browser.js +1 -19
  47. package/dist/islands/browser.js.map +3 -3
  48. package/dist/islands/index.js +709 -120
  49. package/dist/islands/index.js.map +18 -13
  50. package/dist/mobile/browser.js +428 -0
  51. package/dist/mobile/browser.js.map +12 -0
  52. package/dist/mobile/index.js +3058 -0
  53. package/dist/mobile/index.js.map +35 -0
  54. package/dist/react/browser.js +13 -62
  55. package/dist/react/browser.js.map +5 -6
  56. package/dist/react/components/browser/index.js +23 -13
  57. package/dist/react/components/index.js +30 -34
  58. package/dist/react/components/index.js.map +8 -7
  59. package/dist/react/hooks/index.js +1 -19
  60. package/dist/react/hooks/index.js.map +3 -3
  61. package/dist/react/index.js +1643 -679
  62. package/dist/react/index.js.map +29 -20
  63. package/dist/react/jsxDevRuntimeCompat.js +22 -20
  64. package/dist/react/jsxDevRuntimeCompat.js.map +5 -4
  65. package/dist/react/jsxRuntimeCompat.js +90 -0
  66. package/dist/react/jsxRuntimeCompat.js.map +10 -0
  67. package/dist/react/router/browser.js +77 -0
  68. package/dist/react/router/browser.js.map +10 -0
  69. package/dist/react/router/index.js +77 -0
  70. package/dist/react/router/index.js.map +10 -0
  71. package/dist/react/server.js +950 -565
  72. package/dist/react/server.js.map +16 -11
  73. package/dist/src/angular/components/constants.d.ts +21 -0
  74. package/dist/src/angular/hmrPreserveCore.d.ts +7 -20
  75. package/dist/src/angular/islands.d.ts +1 -1
  76. package/dist/src/angular/pageHandler.d.ts +2 -0
  77. package/dist/src/angular/ssrRender.d.ts +4 -1
  78. package/dist/src/build/bunStringRawUnicodePlugin.d.ts +12 -0
  79. package/dist/src/build/chainInlineSourcemaps.d.ts +1 -0
  80. package/dist/src/build/compileAngular.d.ts +5 -7
  81. package/dist/src/build/compileSvelte.d.ts +3 -0
  82. package/dist/src/build/compileVue.d.ts +3 -1
  83. package/dist/src/build/generateReactIndexes.d.ts +1 -0
  84. package/dist/src/build/islandRegistryTransform.d.ts +17 -0
  85. package/dist/src/build/maskLiterals.d.ts +28 -0
  86. package/dist/src/build/parseVueSpaRoutes.d.ts +5 -0
  87. package/dist/src/build/resolveBuildMode.d.ts +7 -0
  88. package/dist/src/build/serverExternals.d.ts +14 -0
  89. package/dist/src/build/spaSideManifests.d.ts +16 -0
  90. package/dist/src/build/tailwindCompiler.d.ts +0 -1
  91. package/dist/src/cli/add/dependencies.d.ts +13 -0
  92. package/dist/src/cli/config/absolute/AbsoluteConfigPanel.d.ts +6 -0
  93. package/dist/src/cli/config/absolute/editAbsoluteConfig.d.ts +5 -0
  94. package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +19 -0
  95. package/dist/src/cli/config/auth/AuthPanel.d.ts +6 -0
  96. package/dist/src/cli/config/auth/authCatalog.d.ts +10 -0
  97. package/dist/src/cli/config/auth/authScaffolds.d.ts +16 -0
  98. package/dist/src/cli/config/auth/editAuthConfig.d.ts +5 -0
  99. package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +14 -0
  100. package/dist/src/cli/config/auth/resolveAuthState.d.ts +2 -0
  101. package/dist/src/cli/config/auth/scaffoldAuthFeature.d.ts +6 -0
  102. package/dist/src/cli/config/client.d.ts +1 -0
  103. package/dist/src/cli/config/configCert.d.ts +12 -0
  104. package/dist/src/cli/config/eslint/EslintPanel.d.ts +6 -0
  105. package/dist/src/cli/config/eslint/configAst.d.ts +18 -0
  106. package/dist/src/cli/config/eslint/editConfigRule.d.ts +6 -0
  107. package/dist/src/cli/config/eslint/eslintStyles.d.ts +1 -0
  108. package/dist/src/cli/config/eslint/resolveConfig.d.ts +3 -0
  109. package/dist/src/cli/config/eslint/serializeValue.d.ts +9 -0
  110. package/dist/src/cli/config/guards.d.ts +4 -0
  111. package/dist/src/cli/config/integrations/IntegrationsPanel.d.ts +6 -0
  112. package/dist/src/cli/config/packageJson/PackageJsonPanel.d.ts +6 -0
  113. package/dist/src/cli/config/packageJson/editPackageJson.d.ts +9 -0
  114. package/dist/src/cli/config/packageJson/resolvePackageJson.d.ts +8 -0
  115. package/dist/src/cli/config/page/ConfigShell.d.ts +6 -0
  116. package/dist/src/cli/config/page/FieldEditor.d.ts +9 -0
  117. package/dist/src/cli/config/page/PanelHost.d.ts +6 -0
  118. package/dist/src/cli/config/page/configStyles.d.ts +1 -0
  119. package/dist/src/cli/config/panels.d.ts +7 -0
  120. package/dist/src/cli/config/prettier/PrettierPanel.d.ts +6 -0
  121. package/dist/src/cli/config/prettier/editPrettier.d.ts +5 -0
  122. package/dist/src/cli/config/prettier/resolvePrettier.d.ts +11 -0
  123. package/dist/src/cli/config/schema/fromJsonSchema.d.ts +3 -0
  124. package/dist/src/cli/config/schema/fromType.d.ts +1 -0
  125. package/dist/src/cli/config/schema/serialize.d.ts +1 -0
  126. package/dist/src/cli/config/server.d.ts +527 -0
  127. package/dist/src/cli/config/tsconfig/TsconfigPanel.d.ts +6 -0
  128. package/dist/src/cli/config/tsconfig/editTsconfig.d.ts +5 -0
  129. package/dist/src/cli/config/tsconfig/resolveTsconfig.d.ts +8 -0
  130. package/dist/src/cli/config/tsconfig/tsconfigStyles.d.ts +1 -0
  131. package/dist/src/cli/discoverInstances.d.ts +5 -0
  132. package/dist/src/cli/elysiaOpenApiTypeboxPlugin.d.ts +8 -0
  133. package/dist/src/cli/generate/componentTemplates.d.ts +7 -0
  134. package/dist/src/cli/generate/context.d.ts +30 -0
  135. package/dist/src/cli/generate/cssStrategy.d.ts +20 -0
  136. package/dist/src/cli/generate/frameworkKey.d.ts +3 -0
  137. package/dist/src/cli/generate/frameworks.d.ts +40 -0
  138. package/dist/src/cli/generate/generateApi.d.ts +3 -0
  139. package/dist/src/cli/generate/generateComponent.d.ts +4 -0
  140. package/dist/src/cli/generate/generatePage.d.ts +4 -0
  141. package/dist/src/cli/generate/naming.d.ts +5 -0
  142. package/dist/src/cli/generate/navData.d.ts +10 -0
  143. package/dist/src/cli/generate/outcome.d.ts +17 -0
  144. package/dist/src/cli/generate/pageTemplates.d.ts +11 -0
  145. package/dist/src/cli/generate/routeWiring.d.ts +40 -0
  146. package/dist/src/cli/generate/staticNav.d.ts +5 -0
  147. package/dist/src/cli/heapDiff.d.ts +1 -0
  148. package/dist/src/cli/htmx/install.d.ts +6 -0
  149. package/dist/src/cli/inspectData.d.ts +12 -0
  150. package/dist/src/cli/inspectTui.d.ts +1 -0
  151. package/dist/src/cli/instanceStatus.d.ts +22 -0
  152. package/dist/src/cli/integrations/addPlugin.d.ts +8 -0
  153. package/dist/src/cli/integrations/catalog.d.ts +20 -0
  154. package/dist/src/cli/psTui.d.ts +1 -0
  155. package/dist/src/cli/scripts/add.d.ts +1 -0
  156. package/dist/src/cli/scripts/analyze.d.ts +1 -0
  157. package/dist/src/cli/scripts/api.d.ts +1 -0
  158. package/dist/src/cli/scripts/build.d.ts +1 -1
  159. package/dist/src/cli/scripts/db.d.ts +20 -0
  160. package/dist/src/cli/scripts/dev.d.ts +5 -1
  161. package/dist/src/cli/scripts/doctor.d.ts +1 -0
  162. package/dist/src/cli/scripts/env.d.ts +7 -0
  163. package/dist/src/cli/scripts/eslint.d.ts +37 -2
  164. package/dist/src/cli/scripts/eslintChunked.d.ts +37 -0
  165. package/dist/src/cli/scripts/generate.d.ts +1 -0
  166. package/dist/src/cli/scripts/htmx.d.ts +1 -0
  167. package/dist/src/cli/scripts/inspect.d.ts +1 -0
  168. package/dist/src/cli/scripts/islands.d.ts +1 -0
  169. package/dist/src/cli/scripts/lintProof.d.ts +42 -0
  170. package/dist/src/cli/scripts/logs.d.ts +1 -0
  171. package/dist/src/cli/scripts/ls.d.ts +1 -0
  172. package/dist/src/cli/scripts/mem.d.ts +1 -0
  173. package/dist/src/cli/scripts/mobile.d.ts +1 -0
  174. package/dist/src/cli/scripts/prettier.d.ts +2 -0
  175. package/dist/src/cli/scripts/ps.d.ts +1 -0
  176. package/dist/src/cli/scripts/remove.d.ts +1 -0
  177. package/dist/src/cli/scripts/routes.d.ts +1 -0
  178. package/dist/src/cli/scripts/start.d.ts +6 -1
  179. package/dist/src/cli/scripts/tunnelRelay.d.ts +9 -0
  180. package/dist/src/cli/scripts/workspace.d.ts +3 -1
  181. package/dist/src/cli/serverBundleExternals.d.ts +2 -0
  182. package/dist/src/cli/tuiPrimitives.d.ts +14 -0
  183. package/dist/src/cli/typeGraphCoherence.d.ts +32 -0
  184. package/dist/src/cli/utils.d.ts +3 -1
  185. package/dist/src/cli/workspaceTui.d.ts +2 -1
  186. package/dist/src/client/hydrators/react.d.ts +1 -1
  187. package/dist/src/client/hydrators/svelte.d.ts +1 -1
  188. package/dist/src/client/hydrators/vue.d.ts +1 -1
  189. package/dist/src/client/islandStore.d.ts +3 -3
  190. package/dist/src/client/preserveIslandMarkup.d.ts +4 -1
  191. package/dist/src/constants.d.ts +21 -0
  192. package/dist/src/core/angularServerModule.d.ts +1 -0
  193. package/dist/src/core/build.d.ts +11 -3
  194. package/dist/src/core/devRouteRegistrationCallsite.d.ts +1 -5
  195. package/dist/src/core/index.d.ts +1 -0
  196. package/dist/src/core/pageResponseCache.d.ts +23 -0
  197. package/dist/src/core/prepare.d.ts +192 -154
  198. package/dist/src/core/requestContext.d.ts +18 -0
  199. package/dist/src/dev/angular/fastHmrCompiler.d.ts +5 -3
  200. package/dist/src/dev/angular/hmrCompiler.d.ts +1 -1
  201. package/dist/src/dev/angular/resolveOwningComponents.d.ts +1 -1
  202. package/dist/src/dev/clientManager.d.ts +10 -1
  203. package/dist/src/dev/configResolver.d.ts +2 -0
  204. package/dist/src/dev/moduleMapper.d.ts +1 -1
  205. package/dist/src/dev/moduleServer.d.ts +2 -1
  206. package/dist/src/dev/pathUtils.d.ts +1 -1
  207. package/dist/src/dev/reactComponentClassifier.d.ts +1 -1
  208. package/dist/src/dev/rebuildTrigger.d.ts +4 -0
  209. package/dist/src/dev/requestInspector.d.ts +31 -0
  210. package/dist/src/dev/serverBootstrap.d.ts +1 -0
  211. package/dist/src/dev/serverEntryWatcher.d.ts +3 -3
  212. package/dist/src/dev/tunnel/client.d.ts +20 -0
  213. package/dist/src/dev/tunnel/protocol.d.ts +85 -0
  214. package/dist/src/dev/tunnel/relay.d.ts +28 -0
  215. package/dist/src/dev/webSocket.d.ts +1 -1
  216. package/dist/src/mobile/androidConformance.d.ts +42 -0
  217. package/dist/src/mobile/androidEmulatorController.d.ts +99 -0
  218. package/dist/src/mobile/androidNativeWatcher.d.ts +19 -0
  219. package/dist/src/mobile/androidRelease.d.ts +47 -0
  220. package/dist/src/mobile/androidWebView.d.ts +46 -0
  221. package/dist/src/mobile/artifactStore.d.ts +47 -0
  222. package/dist/src/mobile/associationFiles.d.ts +49 -0
  223. package/dist/src/mobile/browser.d.ts +2 -0
  224. package/dist/src/mobile/buildMetadata.d.ts +10 -0
  225. package/dist/src/mobile/buildPipeline.d.ts +8 -0
  226. package/dist/src/mobile/buildRelease.d.ts +24 -0
  227. package/dist/src/mobile/capacitorBundle.d.ts +28 -0
  228. package/dist/src/mobile/capacitorProject.d.ts +9 -0
  229. package/dist/src/mobile/client.d.ts +35 -0
  230. package/dist/src/mobile/compatibilityDispatcher.d.ts +26 -0
  231. package/dist/src/mobile/config.d.ts +16 -0
  232. package/dist/src/mobile/emulatorDoctor.d.ts +25 -0
  233. package/dist/src/mobile/emulatorInstaller.d.ts +41 -0
  234. package/dist/src/mobile/index.d.ts +19 -0
  235. package/dist/src/mobile/materializedBundle.d.ts +36 -0
  236. package/dist/src/mobile/nativeDeepLinks.d.ts +5 -0
  237. package/dist/src/mobile/pageProtocol.d.ts +89 -0
  238. package/dist/src/mobile/producerContext.d.ts +4 -0
  239. package/dist/src/mobile/producerContextState.d.ts +10 -0
  240. package/dist/src/mobile/releaseArtifact.d.ts +75 -0
  241. package/dist/src/mobile/releaseDoctor.d.ts +13 -0
  242. package/dist/src/mobile/routeMatcher.d.ts +3 -0
  243. package/dist/src/mobile/routeMetadataTransform.d.ts +13 -0
  244. package/dist/src/mobile/shellBootstrap.d.ts +1 -0
  245. package/dist/src/mobile/transport.d.ts +31 -0
  246. package/dist/src/plugins/devtoolsJson.d.ts +6 -47
  247. package/dist/src/plugins/hmr.d.ts +22 -96
  248. package/dist/src/plugins/imageOptimizer.d.ts +150 -62
  249. package/dist/src/plugins/networking.d.ts +2 -2
  250. package/dist/src/plugins/openApiPlugin.d.ts +4 -0
  251. package/dist/src/plugins/telemetryPlugin.d.ts +36 -0
  252. package/dist/src/react/browser.d.ts +0 -2
  253. package/dist/src/react/hooks/useMediaQuery.d.ts +1 -1
  254. package/dist/src/react/index.d.ts +0 -2
  255. package/dist/src/react/jsxDevRuntimeCompat.d.ts +1 -1
  256. package/dist/src/react/jsxRuntimeCompat.d.ts +7 -0
  257. package/dist/src/react/pageHandler.d.ts +8 -0
  258. package/dist/src/react/router/UniversalRouter.d.ts +43 -0
  259. package/dist/src/react/router/browser.d.ts +2 -0
  260. package/dist/src/react/router/index.d.ts +2 -0
  261. package/dist/src/svelte/pageHandler.d.ts +5 -0
  262. package/dist/src/svelte/router/hashMode.d.ts +1 -6
  263. package/dist/src/svelte/router/matchPath.d.ts +4 -24
  264. package/dist/src/svelte/router/page.svelte.d.ts +1 -10
  265. package/dist/src/svelte/router/prefetchCache.d.ts +2 -6
  266. package/dist/src/utils/cleanup.d.ts +1 -0
  267. package/dist/src/utils/defineConvention.d.ts +2 -2
  268. package/dist/src/utils/defineEnv.d.ts +4 -4
  269. package/dist/src/utils/formatBytes.d.ts +2 -0
  270. package/dist/src/utils/generatedDir.d.ts +1 -1
  271. package/dist/src/utils/iconVersion.d.ts +5 -0
  272. package/dist/src/utils/imageProcessing.d.ts +1 -1
  273. package/dist/src/utils/index.d.ts +2 -0
  274. package/dist/src/utils/inlinePageCss.d.ts +9 -0
  275. package/dist/src/utils/instanceRegistry.d.ts +13 -0
  276. package/dist/src/utils/isTestSourcePath.d.ts +1 -0
  277. package/dist/src/utils/jsonLd.d.ts +1 -1
  278. package/dist/src/utils/loadConfig.d.ts +11 -3
  279. package/dist/src/utils/logger.d.ts +2 -0
  280. package/dist/src/utils/portScan.d.ts +22 -0
  281. package/dist/src/utils/projectRoot.d.ts +17 -0
  282. package/dist/src/utils/resolveConvention.d.ts +1 -1
  283. package/dist/src/utils/resolveDevPort.d.ts +4 -1
  284. package/dist/src/utils/runtimeMode.d.ts +1 -1
  285. package/dist/src/utils/spaRouteCss.d.ts +10 -0
  286. package/dist/src/utils/spaRouteManifest.d.ts +8 -0
  287. package/dist/src/utils/stripStringsAndComments.d.ts +18 -0
  288. package/dist/src/utils/userAgentFunctions.d.ts +1 -1
  289. package/dist/src/utils/vueCompiler.d.ts +1 -0
  290. package/dist/src/vue/components/Image.d.ts +2 -2
  291. package/dist/src/vue/defineVuePage.d.ts +1 -11
  292. package/dist/src/vue/index.d.ts +3 -0
  293. package/dist/src/vue/pageHandler.d.ts +5 -0
  294. package/dist/src/vue/resolveGeneratedVueModulePath.d.ts +1 -0
  295. package/dist/src/vue/teleports.d.ts +2 -0
  296. package/dist/src/vue/useResource.d.ts +65 -0
  297. package/dist/svelte/browser.js +1 -19
  298. package/dist/svelte/browser.js.map +3 -3
  299. package/dist/svelte/components/Head.svelte +7 -1
  300. package/dist/svelte/index.js +1281 -543
  301. package/dist/svelte/index.js.map +27 -19
  302. package/dist/svelte/router/Link.svelte.d.ts +3 -3
  303. package/dist/svelte/router/Route.svelte.d.ts +5 -5
  304. package/dist/svelte/router/Router.svelte.d.ts +3 -3
  305. package/dist/svelte/router/hashMode.ts +6 -12
  306. package/dist/svelte/router/matchPath.ts +44 -61
  307. package/dist/svelte/router/page.d.ts +1 -10
  308. package/dist/svelte/router/page.js +6 -6
  309. package/dist/svelte/router/prefetchCache.ts +21 -23
  310. package/dist/svelte/router/viewTransitions.ts +22 -12
  311. package/dist/svelte/server.js +697 -565
  312. package/dist/svelte/server.js.map +14 -11
  313. package/dist/types/absoluteConfig.d.ts +22 -0
  314. package/dist/types/angular.d.ts +4 -1
  315. package/dist/types/authPanel.d.ts +62 -0
  316. package/dist/types/build.d.ts +116 -0
  317. package/dist/types/cli.d.ts +57 -0
  318. package/dist/types/config.d.ts +52 -0
  319. package/dist/types/eslintConfig.d.ts +68 -0
  320. package/dist/types/globals.d.ts +31 -10
  321. package/dist/types/image.d.ts +2 -0
  322. package/dist/types/index.d.ts +1 -0
  323. package/dist/types/integrationsPanel.d.ts +29 -0
  324. package/dist/types/messages.d.ts +12 -0
  325. package/dist/types/packageJson.d.ts +74 -0
  326. package/dist/types/packageJsonPanel.d.ts +29 -0
  327. package/dist/types/prettier.d.ts +26 -0
  328. package/dist/types/tsconfig.d.ts +31 -0
  329. package/dist/types/vue.d.ts +13 -15
  330. package/dist/vue/browser.js +14 -36
  331. package/dist/vue/browser.js.map +5 -5
  332. package/dist/vue/components/Image.js +3 -20
  333. package/dist/vue/components/Image.js.map +3 -3
  334. package/dist/vue/components/index.js +3 -20
  335. package/dist/vue/components/index.js.map +3 -3
  336. package/dist/vue/index.js +1573 -620
  337. package/dist/vue/index.js.map +34 -22
  338. package/dist/vue/server.js +800 -520
  339. package/dist/vue/server.js.map +17 -11
  340. package/package.json +145 -68
  341. package/dist/src/react/UniversalRouter.d.ts +0 -12
@@ -1,3 +1,3 @@
1
1
  import type { RenderErrorPage, RenderNotFoundPage } from '../../types/conventions';
2
- export declare const defineRenderErrorPage: (fn: RenderErrorPage) => RenderErrorPage;
3
- export declare const defineRenderNotFoundPage: (fn: RenderNotFoundPage) => RenderNotFoundPage;
2
+ export declare const defineRenderErrorPage: (renderErrorPage: RenderErrorPage) => RenderErrorPage;
3
+ export declare const defineRenderNotFoundPage: (renderNotFoundPage: RenderNotFoundPage) => RenderNotFoundPage;
@@ -1,10 +1,10 @@
1
1
  import { type TProperties } from '@sinclair/typebox';
2
2
  export declare const defineEnv: <T extends TProperties>(properties: T) => Readonly<import("@sinclair/typebox").Evaluate<Readonly<Partial<Pick<import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_1 extends TProperties ? { [K in keyof T_1]: (T_1[K] & {
3
3
  params: P;
4
- })["static"]; } : never, (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_2 extends TProperties ? { [K_1 in keyof T_2]: T_2[K_1] extends import("@sinclair/typebox").TReadonly<import("elysia").TSchema> ? T_2[K_1] extends import("@sinclair/typebox").TOptional<T_2[K_1]> ? K_1 : never : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>]>>> & Readonly<Pick<import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_3 extends TProperties ? { [K in keyof T_3]: (T_3[K] & {
4
+ })["static"]; } : never, (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_2 extends TProperties ? { [K_1 in keyof T_2]: T_2[K_1] extends import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TSchema> ? T_2[K_1] extends import("@sinclair/typebox").TOptional<T_2[K_1]> ? K_1 : never : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>]>>> & Readonly<Pick<import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_3 extends TProperties ? { [K in keyof T_3]: (T_3[K] & {
5
5
  params: P;
6
- })["static"]; } : never, (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_4 extends TProperties ? { [K_2 in keyof T_4]: T_4[K_2] extends import("@sinclair/typebox").TReadonly<import("elysia").TSchema> ? T_4[K_2] extends import("@sinclair/typebox").TOptional<T_4[K_2]> ? never : K_2 : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>]>> & Partial<Pick<import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_5 extends TProperties ? { [K in keyof T_5]: (T_5[K] & {
6
+ })["static"]; } : never, (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_4 extends TProperties ? { [K_2 in keyof T_4]: T_4[K_2] extends import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TSchema> ? T_4[K_2] extends import("@sinclair/typebox").TOptional<T_4[K_2]> ? never : K_2 : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>]>> & Partial<Pick<import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_5 extends TProperties ? { [K in keyof T_5]: (T_5[K] & {
7
7
  params: P;
8
- })["static"]; } : never, (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_6 extends TProperties ? { [K_3 in keyof T_6]: T_6[K_3] extends import("@sinclair/typebox").TOptional<import("elysia").TSchema> ? T_6[K_3] extends import("@sinclair/typebox").TReadonly<T_6[K_3]> ? never : K_3 : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>]>> & Required<Pick<import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_7 extends TProperties ? { [K in keyof T_7]: (T_7[K] & {
8
+ })["static"]; } : never, (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_6 extends TProperties ? { [K_3 in keyof T_6]: T_6[K_3] extends import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TSchema> ? T_6[K_3] extends import("@sinclair/typebox").TReadonly<T_6[K_3]> ? never : K_3 : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>]>> & Required<Pick<import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_7 extends TProperties ? { [K in keyof T_7]: (T_7[K] & {
9
9
  params: P;
10
- })["static"]; } : never, Exclude<keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>, (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_8 extends TProperties ? { [K_1 in keyof T_8]: T_8[K_1] extends import("@sinclair/typebox").TReadonly<import("elysia").TSchema> ? T_8[K_1] extends import("@sinclair/typebox").TOptional<T_8[K_1]> ? K_1 : never : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>] | (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_9 extends TProperties ? { [K_2 in keyof T_9]: T_9[K_2] extends import("@sinclair/typebox").TReadonly<import("elysia").TSchema> ? T_9[K_2] extends import("@sinclair/typebox").TOptional<T_9[K_2]> ? never : K_2 : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>] | (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_10 extends TProperties ? { [K_3 in keyof T_10]: T_10[K_3] extends import("@sinclair/typebox").TOptional<import("elysia").TSchema> ? T_10[K_3] extends import("@sinclair/typebox").TReadonly<T_10[K_3]> ? never : K_3 : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>]>>>>>;
10
+ })["static"]; } : never, Exclude<keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>, (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_8 extends TProperties ? { [K_1 in keyof T_8]: T_8[K_1] extends import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TSchema> ? T_8[K_1] extends import("@sinclair/typebox").TOptional<T_8[K_1]> ? K_1 : never : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>] | (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_9 extends TProperties ? { [K_2 in keyof T_9]: T_9[K_2] extends import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TSchema> ? T_9[K_2] extends import("@sinclair/typebox").TOptional<T_9[K_2]> ? never : K_2 : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>] | (import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }> extends infer T_10 extends TProperties ? { [K_3 in keyof T_10]: T_10[K_3] extends import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TSchema> ? T_10[K_3] extends import("@sinclair/typebox").TReadonly<T_10[K_3]> ? never : K_3 : never; } : never)[keyof import("@sinclair/typebox").Evaluate<{ [Key in keyof T]: import("@sinclair/typebox").TDecodeType<T[Key]>; }>]>>>>>;
@@ -0,0 +1,2 @@
1
+ /** Human-readable RSS for the `ps` table; `-` for unknown/zero. */
2
+ export declare const formatBytes: (bytes: number | null) => string;
@@ -1,3 +1,3 @@
1
1
  export type GeneratedFramework = 'angular' | 'vue' | 'svelte' | 'react' | 'ember';
2
- export declare const getGeneratedRoot: (projectRoot?: string) => string;
3
2
  export declare const getFrameworkGeneratedDir: (framework: GeneratedFramework, projectRoot?: string) => string;
3
+ export declare const getGeneratedRoot: (projectRoot?: string) => string;
@@ -0,0 +1,5 @@
1
+ type IconVersionResolver = (href: string) => string;
2
+ export declare const iconMimeType: (icon: string) => "image/x-icon" | "image/png" | "image/svg+xml";
3
+ export declare const applyIconVersion: (href: string) => string;
4
+ export declare const setIconVersionResolver: (resolverFn: IconVersionResolver | undefined) => void;
5
+ export {};
@@ -19,7 +19,7 @@ export declare const generateSrcSet: (src: string, width: number | undefined, si
19
19
  width: number;
20
20
  }) => string) => string;
21
21
  export declare const getAllSizes: (config?: ImageConfig) => number[];
22
- export declare const getCacheDir: (buildDir: string) => string;
22
+ export declare const getCacheDir: (buildDir: string, cacheDirectory?: string) => string;
23
23
  export declare const getCacheKey: (url: string, width: number, quality: number, format: string) => string;
24
24
  export declare const isCacheStale: (meta: CacheMeta) => boolean;
25
25
  export declare const matchRemotePattern: (urlString: string, patterns: RemotePattern[]) => boolean;
@@ -1,10 +1,12 @@
1
1
  export * from './defineConfig';
2
2
  export * from './defineConvention';
3
3
  export * from './generateHeadElement';
4
+ export * from './iconVersion';
4
5
  export * from './jsonLd';
5
6
  export * from './defineEnv';
6
7
  export * from './getEnv';
7
8
  export * from './networking';
9
+ export * from './projectRoot';
8
10
  export * from './registerClientScript';
9
11
  export * from './streamingSlotMetricSink';
10
12
  export * from './streamingSlots';
@@ -0,0 +1,9 @@
1
+ /** Drop every memoised sibling-CSS read (including cached misses). The dev
2
+ * server calls this after rebuilding page bundles: a request landing
3
+ * mid-rebuild can otherwise cache '' for a freshly hashed path whose
4
+ * sidecar hasn't been copied yet, and that page then SSRs unstyled for the
5
+ * rest of the process. Prod never needs this — hashed artifacts are
6
+ * immutable there. */
7
+ export declare const clearSiblingCssCache: () => void;
8
+ export declare const injectInlineCss: (headTag: string, css: string) => string;
9
+ export declare const readSiblingCss: (siblingJsPath: string | undefined) => Promise<string>;
@@ -0,0 +1,13 @@
1
+ import type { InstanceRecord } from '../../types/cli';
2
+ export declare const instanceFilePath: (pid: number) => string;
3
+ export declare const instanceLogPath: (pid: number) => string;
4
+ export declare const instanceRegistryDir: () => string;
5
+ export declare const deregisterInstance: (pid: number) => void;
6
+ /** Read every registered instance, pruning any whose process has died, and
7
+ * return the survivors sorted by port then name. */
8
+ export declare const listLiveInstances: () => InstanceRecord[];
9
+ export declare const registerInstance: (record: InstanceRecord) => InstanceRecord;
10
+ /** Read the project label without a config flag: package.json `name`, falling
11
+ * back to the directory name. */
12
+ export declare const resolveProjectName: (cwd: string) => any;
13
+ export declare const updateInstance: (pid: number, updates: Partial<InstanceRecord>) => void;
@@ -0,0 +1 @@
1
+ export declare const isTestSourcePath: (file: string) => boolean;
@@ -1,3 +1,3 @@
1
1
  import type { JsonLdSchema } from '../../types/jsonLd';
2
- export declare const serializeJsonLd: (schema: JsonLdSchema | JsonLdSchema[]) => string;
3
2
  export declare const jsonLd: (schema: JsonLdSchema | JsonLdSchema[]) => string;
3
+ export declare const serializeJsonLd: (schema: JsonLdSchema | JsonLdSchema[]) => string;
@@ -1,6 +1,6 @@
1
1
  import type { ConfigInput, WorkspaceConfig } from '../../types/build';
2
- declare const isWorkspaceConfig: (config: ConfigInput) => config is WorkspaceConfig;
3
- declare const getWorkspaceServices: (config: ConfigInput) => WorkspaceConfig;
2
+ export declare const isWorkspaceConfig: (config: ConfigInput) => config is WorkspaceConfig;
3
+ export declare const getWorkspaceServices: (config: ConfigInput) => WorkspaceConfig;
4
4
  export declare const loadConfig: (configPath?: string) => Promise<{
5
5
  buildDirectory?: string;
6
6
  assetsDirectory?: string;
@@ -20,6 +20,7 @@ export declare const loadConfig: (configPath?: string) => Promise<{
20
20
  emberDirectory?: string;
21
21
  htmlDirectory?: string;
22
22
  htmxDirectory?: string;
23
+ mobile?: import("..").MobileConfig;
23
24
  stylesConfig?: string | import("..").StylesConfig;
24
25
  stylePreprocessors?: import("..").StylePreprocessorConfig;
25
26
  postcss?: import("..").PostCSSConfig;
@@ -35,6 +36,10 @@ export declare const loadConfig: (configPath?: string) => Promise<{
35
36
  host?: string;
36
37
  https?: boolean;
37
38
  watchDirs?: string[];
39
+ tunnel?: {
40
+ relay?: string;
41
+ token?: string;
42
+ };
38
43
  devtools?: {
39
44
  projectRoot?: string;
40
45
  uuid?: string;
@@ -43,10 +48,13 @@ export declare const loadConfig: (configPath?: string) => Promise<{
43
48
  };
44
49
  };
45
50
  static?: import("..").StaticConfig;
51
+ compile?: import("..").CompileConfig;
46
52
  images?: import("..").ImageConfig;
47
53
  sitemap?: import("..").SitemapConfig;
54
+ openapi?: boolean | import("..").OpenApiConfig;
55
+ telemetry?: boolean | import("..").OtelConfig;
56
+ sourcemaps?: "external" | "inline" | boolean;
48
57
  entry?: string;
49
58
  shutdown?: import("..").ServiceShutdownConfig;
50
59
  }>;
51
60
  export declare const loadRawConfig: (configPath?: string) => Promise<ConfigInput>;
52
- export { getWorkspaceServices, isWorkspaceConfig };
@@ -3,6 +3,7 @@
3
3
  * Provides formatted output with ANSI colors and timestamps
4
4
  */
5
5
  import { formatTimestamp } from './startupBanner';
6
+ import type { HMRApplyKind, HMRApplyOutcome, HMRClientTarget } from '../../types/messages';
6
7
  export { formatTimestamp };
7
8
  /**
8
9
  * Startup banner
@@ -30,6 +31,7 @@ export declare const logError: (message: string, error?: Error | string) => void
30
31
  * HMR update message
31
32
  * Format: "10:30:45 AM [hmr] hmr update /pages/App.tsx"
32
33
  */
34
+ export declare const logHmrClientUpdate: (path: string, framework: string | undefined, duration: number, target: HMRClientTarget, serverMs?: number, clientMs?: number, outcome?: HMRApplyOutcome, kind?: HMRApplyKind) => void;
33
35
  export declare const logHmrUpdate: (path: string, framework?: string, duration?: number) => void;
34
36
  /**
35
37
  * Generic info message
@@ -0,0 +1,22 @@
1
+ /** Process/port discovery for `absolute ps`, used to surface running servers
2
+ * the file-based instance registry can miss — orphans whose controller died,
3
+ * hand-run `bun dist/server.js` builds, anything that never registered.
4
+ *
5
+ * Shells out via Bun's `$` to the platform's socket lister (lsof, falling
6
+ * back to ss on Linux) rather than trusting a registry file, so a live
7
+ * listener is discoverable for as long as its process is alive. */
8
+ export type PortListener = {
9
+ command: string;
10
+ etimes: number;
11
+ pid: number;
12
+ port: number;
13
+ };
14
+ /** Listening TCP servers on the machine, each annotated with the owning
15
+ * process's full command and uptime. Skips this process and any listener
16
+ * whose owner we can't describe. */
17
+ export declare const scanListeners: () => Promise<{
18
+ command: string;
19
+ etimes: number;
20
+ pid: number;
21
+ port: number;
22
+ }[]>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Absolute path to the project root — the directory holding your
3
+ * `absolute.config.*` (falling back to the nearest `package.json`, then
4
+ * `process.cwd()`). Resolved once at import.
5
+ *
6
+ * Anchor runtime and data paths to this instead of `import.meta.dir` /
7
+ * `import.meta.url`. Those resolve the *current module's* location, which is
8
+ * your `src/` tree under `absolute dev` but the bundled `dist/` under
9
+ * `absolute start` — so module-relative paths silently point somewhere else in
10
+ * production. `projectRoot` is identical in both modes because the CLI runs
11
+ * from the project root in both.
12
+ *
13
+ * @example
14
+ * import { projectRoot } from '@absolutejs/absolute';
15
+ * const dbPath = resolve(projectRoot, '.data', 'app.sqlite');
16
+ */
17
+ export declare const projectRoot: string;
@@ -1,9 +1,9 @@
1
1
  import type { ConventionsMap } from '../../types/conventions';
2
2
  export declare const derivePageName: (pagePath: string) => string;
3
3
  export declare const getConventions: () => ConventionsMap;
4
+ export declare const hasErrorConvention: (framework: keyof ConventionsMap) => boolean;
4
5
  export declare const resolveErrorConventionPath: (framework: keyof ConventionsMap, pageName: string) => string | undefined;
5
6
  export declare const resolveNotFoundConventionPath: (framework: keyof ConventionsMap) => string | undefined;
6
- export declare const hasErrorConvention: (framework: keyof ConventionsMap) => boolean;
7
7
  export declare const setConventions: (map: ConventionsMap) => void;
8
8
  export declare const renderConventionError: (framework: keyof ConventionsMap, pageName: string, error: unknown) => Promise<Response | null>;
9
9
  export declare const renderConventionNotFound: (framework: keyof ConventionsMap) => Promise<Response | null>;
@@ -18,4 +18,7 @@ export type ResolveDevPortResult = {
18
18
  port: number;
19
19
  fellBack: boolean;
20
20
  };
21
- export declare const resolveDevPort: (requestedPort: number, options?: ResolveDevPortOptions) => Promise<ResolveDevPortResult>;
21
+ export declare const resolveDevPort: (requestedPort: number, options?: ResolveDevPortOptions) => Promise<{
22
+ fellBack: boolean;
23
+ port: number;
24
+ }>;
@@ -1,3 +1,3 @@
1
1
  export declare const getNodeEnv: () => string | undefined;
2
- export declare const isProductionRuntime: () => boolean;
3
2
  export declare const isDevelopmentRuntime: () => boolean;
3
+ export declare const isProductionRuntime: () => boolean;
@@ -0,0 +1,10 @@
1
+ /** Drop every cached side manifest and child-CSS blob. The dev server calls
2
+ * this after rebuilding Vue bundles — the caches are keyed by path and
3
+ * never re-validated (correct in prod where artifacts are immutable), so
4
+ * without this a scoped-style edit under an SPA route kept serving the
5
+ * boot-time CSS in SSR until the process restarted. */
6
+ export declare const clearSpaRouteCssCaches: () => void;
7
+ /** Resolve SPA child route compiled CSS for a request.
8
+ * Returns the CSS text (possibly empty) so the page handler can
9
+ * inline it alongside the parent page's own sibling CSS. */
10
+ export declare const resolveSpaChildCss: (siblingJsPath: string | undefined, requestUrl: string | undefined) => Promise<string>;
@@ -0,0 +1,8 @@
1
+ import type { SpaHost } from './spaRouteTypes';
2
+ import type { ConventionsMap } from '../../types/conventions';
3
+ export type RuntimeSpaHost = SpaHost & {
4
+ framework: keyof ConventionsMap;
5
+ };
6
+ export declare const setSpaRouteManifest: (hosts: RuntimeSpaHost[]) => void;
7
+ export declare const isKnownSpaRoute: (framework: keyof ConventionsMap, pageName: string, request: Request | undefined) => boolean;
8
+ export declare const renderSpaNotFound: (framework: keyof ConventionsMap, pageName: string, request: Request | undefined) => Promise<Response | null>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Strip string literals (single-quote, double-quote, and template — including
3
+ * `${}` interpolations and nested templates) plus comments (line and block)
4
+ * from TypeScript/JavaScript source, returning only the code that lives
5
+ * outside those contexts.
6
+ *
7
+ * Heuristic content checks — e.g. "is this a real Angular `@Component`
8
+ * source?" — must run against the result, not the raw text. A naive regex
9
+ * strip mis-pairs quotes whenever a quote or backtick appears inside a
10
+ * differently-quoted string or a comment (inline-code backticks in JSDoc, an
11
+ * apostrophe in a comment, a backtick inside a single-quoted string), leaving
12
+ * the matched text behind and producing false positives.
13
+ *
14
+ * Regex literals are intentionally left intact: telling `/` division apart
15
+ * from a regex needs a full parser, and their contents have never mattered for
16
+ * the checks this supports.
17
+ */
18
+ export declare const stripStringsAndComments: (source: string) => string;
@@ -1 +1 @@
1
- export declare const getUserAgentType: (userAgent: string) => "bot" | "phone" | "tablet" | "tv" | "console" | "car" | "iot" | "desktop" | "other";
1
+ export declare const getUserAgentType: (userAgent: string) => "console" | "other" | "bot" | "phone" | "tablet" | "tv" | "car" | "iot" | "desktop";
@@ -0,0 +1 @@
1
+ export declare const loadVueCompiler: () => Promise<typeof import("@vue/compiler-sfc")>;
@@ -62,13 +62,13 @@ export declare const Image: import("vue").DefineComponent<{
62
62
  className: string;
63
63
  quality: number;
64
64
  sizes: string;
65
- priority: boolean;
66
65
  unoptimized: boolean;
66
+ placeholder: string;
67
67
  crossOrigin: string;
68
68
  overrideSrc: string;
69
- placeholder: string;
70
69
  blurDataURL: string;
71
70
  fetchPriority: string;
71
+ priority: boolean;
72
72
  referrerPolicy: string;
73
73
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
74
74
  export {};
@@ -2,15 +2,5 @@ import type { VueRoutes, VueSetupApp } from '../../types/vue';
2
2
  /** Identity helper that types a Vue page's `setupApp` export without
3
3
  * forcing the user to `import type { VueSetupApp }` every time. Use as
4
4
  * `export const setupApp = defineVueSetupApp(async (app, ctx) => { ... });` */
5
- export declare const defineVueSetupApp: (hook: VueSetupApp) => VueSetupApp;
6
- /** Identity helper that signals — to humans and to TypeScript — that a
7
- * Vue page's `routes` export is the input to AbsoluteJS's auto-generated
8
- * vue-router. Without this, `export const routes = [...]` reads as an
9
- * ordinary const that nobody references locally; the import + call make
10
- * the contract explicit (mirroring Vue's `defineProps` convention).
11
- *
12
- * At runtime this is identity (`(routes) => routes`); the actual
13
- * router-creation code lives in the compile-time transform applied to
14
- * the page's `<script>` block. Use as
15
- * `export const routes = defineRoutes([{ path: '/foo', component: Foo }]);` */
16
5
  export declare const defineRoutes: <T extends VueRoutes>(routes: T) => T;
6
+ export declare const defineVueSetupApp: (hook: VueSetupApp) => VueSetupApp;
@@ -7,3 +7,6 @@ export { createTypedIsland } from './createIsland';
7
7
  export { useIslandStore } from './useIslandStore';
8
8
  export { Image } from './components/Image';
9
9
  export { StreamSlot, SuspenseSlot } from './components';
10
+ export { useResource } from './useResource';
11
+ export { ABSOLUTE_TELEPORT_TARGET, ABSOLUTE_TELEPORT_TARGET_ID } from './teleports';
12
+ export type { Resource, ResourceFetcher, ResourceMutator, ResourceOptions, ResourceStart } from './useResource';
@@ -3,6 +3,11 @@ import type { VuePropsOf } from '../../types/vue';
3
3
  import { type StreamingSlotEnhancerOptions } from '../core/responseEnhancers';
4
4
  type VuePageRenderOptions = StreamingSlotEnhancerOptions & {
5
5
  collectStreamingSlots?: boolean;
6
+ /** Buffer this page's stream so it can carry a content-hash `ETag` and
7
+ * serve a `304` on repeat visits, at the cost of streaming's fast first
8
+ * byte. Only worth it on pages static enough that the 304 beats the
9
+ * stream. See {@link PageCacheOptions.bufferStreamForEtag}. */
10
+ bufferStreamForEtag?: boolean;
6
11
  };
7
12
  /** Hydration mode for the page bundle.
8
13
  * - `'auto'` (default): emit `<script>window.__INITIAL_PROPS__=…</script>`
@@ -0,0 +1 @@
1
+ export declare const resolveGeneratedVueModulePath: (pagePath: string) => Promise<string>;
@@ -0,0 +1,2 @@
1
+ export declare const ABSOLUTE_TELEPORT_TARGET_ID = "absolute-teleports";
2
+ export declare const ABSOLUTE_TELEPORT_TARGET = "#absolute-teleports";
@@ -0,0 +1,65 @@
1
+ import { type Ref } from 'vue';
2
+ export type ResourceFetcher<T> = (signal: AbortSignal) => Promise<T>;
3
+ /** Controls the resource's startup behavior.
4
+ *
5
+ * - `'immediate'` (default) — fire the fetcher synchronously at creation;
6
+ * `loading.value` starts `true`.
7
+ * - `'pending'` — don't fire the fetcher yet, but render as if a fetch is
8
+ * coming: `loading.value` starts `true`. Pair with a manual `refresh()`
9
+ * call from `onMounted` (or wherever the dependencies become available).
10
+ * Use this when the fetcher depends on state set after setup runs (e.g. a
11
+ * route param resolved asynchronously) — it avoids the blank-frame flash
12
+ * you'd get from `'idle'`.
13
+ * - `'idle'` — don't fire the fetcher and don't pretend you will:
14
+ * `loading.value` starts `false`. The resource is dormant until
15
+ * `refresh()` or `mutate()` is called.
16
+ */
17
+ export type ResourceStart = 'immediate' | 'pending' | 'idle';
18
+ export type ResourceOptions = {
19
+ /** When and how the fetcher fires on creation. Default: `'immediate'`. */
20
+ start?: ResourceStart;
21
+ };
22
+ export type ResourceMutator<T> = T | null | ((prev: T | null) => T | null);
23
+ export type Resource<T> = {
24
+ /** Latest resolved value, or `null` before the first successful load. */
25
+ data: Ref<T | null>;
26
+ /** Latest rejection reason, or `null` when the resource is healthy. */
27
+ error: Ref<unknown>;
28
+ /** True while a fetch is in flight, or when `start: 'pending'` was set
29
+ * and `refresh()` hasn't been called yet. */
30
+ loading: Ref<boolean>;
31
+ /** Re-runs the fetcher. Any in-flight request is aborted first. */
32
+ refresh: () => Promise<void>;
33
+ /** Aborts the in-flight request, if any. No-op otherwise. */
34
+ cancel: () => void;
35
+ /** Imperatively write the data ref without re-fetching. Accepts a new
36
+ * value or an updater function. Use after an edit action returns the new
37
+ * entity, so you avoid a wasteful re-fetch. Pending fetches are aborted
38
+ * so a slower response can't clobber the mutation. */
39
+ mutate: (next: ResourceMutator<T>) => void;
40
+ };
41
+ /** Ref-backed async data composable for AbsoluteJS Vue pages. Replaces the
42
+ * hand-rolled `onMounted(() => { loading.value = true; data.value = await
43
+ * fetch(); })` + `ref` boilerplate with a single call that also handles
44
+ * abort-on-teardown, refresh, and optimistic mutation.
45
+ *
46
+ * This is a per-component LOADER, not a cross-component cache — every call
47
+ * owns its own state and refetches on creation. For data that should survive
48
+ * navigation / be shared across components (so revisiting a route doesn't
49
+ * refetch), use a cache layer (e.g. TanStack Query) or `@absolutejs/sync`
50
+ * instead. Reach for `useResource` when a one-shot, component-scoped fetch is
51
+ * exactly what you want.
52
+ *
53
+ * ```ts
54
+ * const profile = useResource((signal) => api.profile.me.get({ signal }));
55
+ *
56
+ * // in template:
57
+ * // <Spinner v-if="profile.loading.value" />
58
+ * // <h1 v-else-if="profile.data.value">{{ profile.data.value.name }}</h1>
59
+ * ```
60
+ *
61
+ * The fetcher receives an `AbortSignal` it can pass to `fetch` — the signal
62
+ * aborts when the owning effect scope is disposed (component unmount) or on a
63
+ * new `refresh()` call. Call it during `setup()` so an effect scope is
64
+ * active; teardown won't be wired up otherwise. */
65
+ export declare const useResource: <T>(fetcher: ResourceFetcher<T>, options?: ResourceOptions) => Resource<T>;
@@ -3,7 +3,6 @@ var __create = Object.create;
3
3
  var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
7
  function __accessProp(key) {
9
8
  return this[key];
@@ -30,23 +29,6 @@ var __toESM = (mod, isNodeMode, target) => {
30
29
  cache.set(mod, to);
31
30
  return to;
32
31
  };
33
- var __toCommonJS = (from) => {
34
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
35
- if (entry)
36
- return entry;
37
- entry = __defProp({}, "__esModule", { value: true });
38
- if (from && typeof from === "object" || typeof from === "function") {
39
- for (var key of __getOwnPropNames(from))
40
- if (!__hasOwnProp.call(entry, key))
41
- __defProp(entry, key, {
42
- get: __accessProp.bind(from, key),
43
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
44
- });
45
- }
46
- __moduleCache.set(from, entry);
47
- return entry;
48
- };
49
- var __moduleCache;
50
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
51
33
  var __returnValue = (v) => v;
52
34
  function __exportSetter(name, newValue) {
@@ -305,5 +287,5 @@ export {
305
287
  createTypedIsland
306
288
  };
307
289
 
308
- //# debugId=88293D5FFE17C75E64756E2164756E21
290
+ //# debugId=5801DC3CA876DA0F64756E2164756E21
309
291
  //# sourceMappingURL=browser.js.map
@@ -9,11 +9,11 @@
9
9
  "import type { RuntimeIslandRenderProps } from '../../types/island';\nimport {\n\tgetIslandMarkerAttributes,\n\tserializeIslandAttributes\n} from '../core/islandMarkupAttributes';\n\nconst getIslandSnapshot = (slotId: string) => {\n\tif (typeof window === 'undefined') {\n\t\treturn null;\n\t}\n\n\tconst snapshot = window.__ABS_SVELTE_ISLAND_HTML__;\n\tif (!snapshot || typeof snapshot !== 'object') {\n\t\treturn null;\n\t}\n\n\tconst value = snapshot[slotId];\n\n\treturn typeof value === 'string' ? value : null;\n};\n\nconst buildFallbackMarkup = (props: RuntimeIslandRenderProps) =>\n\t`<div ${serializeIslandAttributes(getIslandMarkerAttributes(props))}></div>`;\n\nexport const resolveIslandHtml = (\n\tslotId: string,\n\tprops: RuntimeIslandRenderProps\n) => {\n\tconst snapshot = getIslandSnapshot(slotId);\n\tif (snapshot !== null) {\n\t\treturn snapshot;\n\t}\n\n\tif (typeof document === 'undefined') {\n\t\treturn buildFallbackMarkup(props);\n\t}\n\n\tconst slot = document.querySelector<HTMLElement>(\n\t\t`[data-absolute-island-slot=\"${slotId}\"]`\n\t);\n\n\treturn slot?.innerHTML ?? buildFallbackMarkup(props);\n};\n",
10
10
  "const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n",
11
11
  "const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst findCallerName = (stack) => {\n var _a, _b;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return (_b = /.+ (.+) .+/.exec(callerLine)) == null ? void 0 : _b[1];\n};\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n",
12
- "import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nconst ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nconst ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\t| Map<string, Set<IslandStoreInstance>>\n\t\t| undefined;\n}\n\nconst getIslandStoreSnapshot = () => {\n\tglobalThis.__ABS_ISLAND_STATE__ ??= {};\n\n\treturn globalThis.__ABS_ISLAND_STATE__;\n};\n\nconst getIslandStores = () => {\n\tglobalThis.__ABS_ISLAND_STORES__ ??= new Map();\n\n\treturn globalThis.__ABS_ISLAND_STORES__;\n};\n\nconst isSerializableValue = (value: unknown) =>\n\ttypeof value !== 'function' && value !== undefined;\n\nconst toSerializableState = <T extends object>(state: T) =>\n\tObject.fromEntries(\n\t\tObject.entries(state).filter(([, value]) => isSerializableValue(value))\n\t);\n\nconst applySnapshot = <T extends object>(\n\tstore: StoreApi<T>,\n\tsnapshot: IslandStoreSnapshot | undefined\n) => {\n\tif (!snapshot) {\n\t\treturn;\n\t}\n\n\tstore.setState({\n\t\t...store.getState(),\n\t\t...snapshot\n\t});\n};\n\nconst getPeerStores = (\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => [...storeInstances].filter((peer) => peer.store !== ownerStore);\n\nconst syncIslandSnapshot = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tstate: IslandStoreShape<TState, TActions>,\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => {\n\tconst nextSnapshot = toSerializableState(state);\n\tgetIslandStoreSnapshot()[storeId] = nextSnapshot;\n\n\tfor (const peerStore of getPeerStores(storeInstances, ownerStore)) {\n\t\tpeerStore.applyExternalSnapshot(nextSnapshot);\n\t}\n};\n\nexport const createIslandStore = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tinitialState: TState,\n\tcreateState: StateCreator<TState, [], [], TActions>\n) => {\n\tconst store = createStore(combine(initialState, createState));\n\tconst stores = getIslandStores();\n\tconst storeInstances =\n\t\tstores.get(storeId) ?? new Set<IslandStoreInstance>();\n\tconst initialSnapshot = getIslandStoreSnapshot()[storeId];\n\tapplySnapshot(store, initialSnapshot);\n\tlet isApplyingExternalSnapshot = false;\n\n\tconst applyExternalSnapshot = (snapshot: IslandStoreSnapshot) => {\n\t\tisApplyingExternalSnapshot = true;\n\t\tapplySnapshot(store, snapshot);\n\t};\n\n\tstoreInstances.add({\n\t\tapplyExternalSnapshot,\n\t\tstore\n\t});\n\tstores.set(storeId, storeInstances);\n\n\tsyncIslandSnapshot(storeId, store.getState(), storeInstances, store);\n\tstore.subscribe((state) => {\n\t\tif (isApplyingExternalSnapshot) {\n\t\t\tisApplyingExternalSnapshot = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tsyncIslandSnapshot(storeId, state, storeInstances, store);\n\t});\n\n\treturn store;\n};\nexport const getIslandStoreServerSnapshot = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getInitialState());\nconst applySnapshotToStoreInstances = (\n\tstoreId: string,\n\tinstances: Set<IslandStoreInstance>,\n\tsnapshot: IslandStateSnapshot\n) => {\n\tfor (const instance of instances) {\n\t\tinstance.applyExternalSnapshot(snapshot[storeId] ?? {});\n\t}\n};\n\nexport const initializeIslandStores = (state: IslandStateSnapshot) => {\n\tconst currentSnapshot = getIslandStoreSnapshot();\n\tconst nextSnapshot: IslandStateSnapshot = {\n\t\t...state,\n\t\t...currentSnapshot\n\t};\n\n\tglobalThis.__ABS_ISLAND_STATE__ = nextSnapshot;\n\n\tfor (const [storeId, store] of getIslandStores()) {\n\t\tapplySnapshotToStoreInstances(storeId, store, nextSnapshot);\n\t}\n};\nexport const readIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getState());\nexport const resetIslandStoreForTesting = () => {\n\tdelete globalThis.__ABS_ISLAND_STATE__;\n\tdelete globalThis.__ABS_ISLAND_STORES__;\n};\nexport const subscribeIslandStore = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected,\n\tlistener: (value: TSelected) => void\n) => {\n\tlet currentSelection = selector(store.getState());\n\n\treturn store.subscribe((state) => {\n\t\tconst nextSelection = selector(state);\n\t\tif (Object.is(nextSelection, currentSelection)) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentSelection = nextSelection;\n\t\tlistener(nextSelection);\n\t});\n};\n\nexport { ABSOLUTE_ISLAND_STATE, ABSOLUTE_ISLAND_STORES };\n",
12
+ "import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nexport const ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nexport const ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\t| Map<string, Set<IslandStoreInstance>>\n\t\t| undefined;\n}\n\nconst getIslandStoreSnapshot = () => {\n\tglobalThis.__ABS_ISLAND_STATE__ ??= {};\n\n\treturn globalThis.__ABS_ISLAND_STATE__;\n};\n\nconst getIslandStores = () => {\n\tglobalThis.__ABS_ISLAND_STORES__ ??= new Map();\n\n\treturn globalThis.__ABS_ISLAND_STORES__;\n};\n\nconst isSerializableValue = (value: unknown) =>\n\ttypeof value !== 'function' && value !== undefined;\n\nconst toSerializableState = <T extends object>(state: T) =>\n\tObject.fromEntries(\n\t\tObject.entries(state).filter(([, value]) => isSerializableValue(value))\n\t);\n\nconst applySnapshot = <T extends object>(\n\tstore: StoreApi<T>,\n\tsnapshot: IslandStoreSnapshot | undefined\n) => {\n\tif (!snapshot) {\n\t\treturn;\n\t}\n\n\tstore.setState({\n\t\t...store.getState(),\n\t\t...snapshot\n\t});\n};\n\nconst getPeerStores = (\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => [...storeInstances].filter((peer) => peer.store !== ownerStore);\n\nconst syncIslandSnapshot = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tstate: IslandStoreShape<TState, TActions>,\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => {\n\tconst nextSnapshot = toSerializableState(state);\n\tgetIslandStoreSnapshot()[storeId] = nextSnapshot;\n\n\tfor (const peerStore of getPeerStores(storeInstances, ownerStore)) {\n\t\tpeerStore.applyExternalSnapshot(nextSnapshot);\n\t}\n};\n\nexport const createIslandStore = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tinitialState: TState,\n\tcreateState: StateCreator<TState, [], [], TActions>\n) => {\n\tconst store = createStore(combine(initialState, createState));\n\tconst stores = getIslandStores();\n\tconst storeInstances =\n\t\tstores.get(storeId) ?? new Set<IslandStoreInstance>();\n\tconst initialSnapshot = getIslandStoreSnapshot()[storeId];\n\tapplySnapshot(store, initialSnapshot);\n\tlet isApplyingExternalSnapshot = false;\n\n\tconst applyExternalSnapshot = (snapshot: IslandStoreSnapshot) => {\n\t\tisApplyingExternalSnapshot = true;\n\t\tapplySnapshot(store, snapshot);\n\t};\n\n\tstoreInstances.add({\n\t\tapplyExternalSnapshot,\n\t\tstore\n\t});\n\tstores.set(storeId, storeInstances);\n\n\tsyncIslandSnapshot(storeId, store.getState(), storeInstances, store);\n\tstore.subscribe((state) => {\n\t\tif (isApplyingExternalSnapshot) {\n\t\t\tisApplyingExternalSnapshot = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tsyncIslandSnapshot(storeId, state, storeInstances, store);\n\t});\n\n\treturn store;\n};\nexport const getIslandStoreServerSnapshot = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getInitialState());\nconst applySnapshotToStoreInstances = (\n\tstoreId: string,\n\tinstances: Set<IslandStoreInstance>,\n\tsnapshot: IslandStateSnapshot\n) => {\n\tfor (const instance of instances) {\n\t\tinstance.applyExternalSnapshot(snapshot[storeId] ?? {});\n\t}\n};\n\nexport const initializeIslandStores = (state: IslandStateSnapshot) => {\n\tconst currentSnapshot = getIslandStoreSnapshot();\n\tconst nextSnapshot: IslandStateSnapshot = {\n\t\t...state,\n\t\t...currentSnapshot\n\t};\n\n\tglobalThis.__ABS_ISLAND_STATE__ = nextSnapshot;\n\n\tfor (const [storeId, store] of getIslandStores()) {\n\t\tapplySnapshotToStoreInstances(storeId, store, nextSnapshot);\n\t}\n};\nexport const readIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getState());\nexport const resetIslandStoreForTesting = () => {\n\tdelete globalThis.__ABS_ISLAND_STATE__;\n\tdelete globalThis.__ABS_ISLAND_STORES__;\n};\nexport const subscribeIslandStore = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected,\n\tlistener: (value: TSelected) => void\n) => {\n\tlet currentSelection = selector(store.getState());\n\n\treturn store.subscribe((state) => {\n\t\tconst nextSelection = selector(state);\n\t\tif (Object.is(nextSelection, currentSelection)) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentSelection = nextSelection;\n\t\tlistener(nextSelection);\n\t});\n};\n",
13
13
  "import type { StoreApi } from 'zustand/vanilla';\nimport {\n\treadIslandStore,\n\tsubscribeIslandStore,\n\ttype IslandStoreState\n} from '../client/islandStore';\n\nexport const useIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => ({\n\tsubscribe(listener: (value: TSelected) => void) {\n\t\tlistener(readIslandStore(store, selector));\n\n\t\treturn subscribeIslandStore(store, selector, listener);\n\t}\n});\n",
14
14
  "export { createTypedIsland } from './createIsland.browser';\nexport { resolveIslandHtml } from './resolveIslandHtml.browser';\nexport { useIslandStore } from './islandStore';\n\nexport const renderIsland = async () => {\n\tthrow new Error(\n\t\t'renderIsland is server-only. Use it during SSR, not in the browser.'\n\t);\n};\n"
15
15
  ],
16
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEM,2BAA2B,CAAC,cACjC,UAAU,IAAI,YAAY,IAAI,UAAU,MAAM,CAAC,GAE1C,0BAA0B,CAC/B,UACA,WACI;AAAA,EACJ,MAAM,UAAkC,CAAC;AAAA,EACzC,IAAI,QAAQ;AAAA,EAEZ,YAAY,KAAK,UAAU,OAAO,QAAQ,QAAQ,GAAG;AAAA,IACpD,IAAI,CAAC,IAAI,WAAW,MAAM;AAAA,MAAG;AAAA,IAE7B,MAAM,YAAY,IAAI,MAAM,OAAO,MAAM;AAAA,IACzC,IAAI,CAAC;AAAA,MAAW;AAAA,IAEhB,QAAQ,aAAa;AAAA,IACrB,QAAQ;AAAA,EACT;AAAA,EAEA,OAAO,QAAQ,UAAU;AAAA,GAGb,2BAA2B,CAAC,aAAqC;AAAA,EAC7E,MAAM,UACL,CAAC;AAAA,EACF,MAAM,aAAgC,CAAC,SAAS,UAAU,OAAO,SAAS;AAAA,EAE1E,WAAW,aAAa,YAAY;AAAA,IACnC,MAAM,SAAS,SAAS,yBAAyB,SAAS;AAAA,IAC1D,MAAM,UAAU,wBAAwB,UAAU,MAAM;AAAA,IACxD,IAAI;AAAA,MAAS,QAAQ,aAAa;AAAA,EACnC;AAAA,EAEA,OAAO;AAAA,GAEK,uBAAuB,CACnC,WACA,cACI,SAAS,yBAAyB,SAAS,IAAI;;;ACK7C,SAAS,kBAA6B,CAC5C,WACC;AAAA,EACD,IAAI,4BAA4B,SAAS,GAAG;AAAA,IAC3C,OAAO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EACD;AAAA;",
17
+ "debugId": "5801DC3CA876DA0F64756E2164756E21",
18
18
  "names": []
19
19
  }
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import type { Metadata, RobotsDirective } from '../../../types/metadata';
3
+ import { applyIconVersion, iconMimeType } from '../../utils/iconVersion';
3
4
 
4
5
  export let title: Metadata['title'] = 'AbsoluteJS';
5
6
  export let description: Metadata['description'] =
@@ -32,6 +33,7 @@
32
33
  };
33
34
 
34
35
  $: cssPaths = cssPath ? (Array.isArray(cssPath) ? cssPath : [cssPath]) : [];
36
+ $: resolvedIcon = icon ?? '/assets/ico/favicon.ico';
35
37
  </script>
36
38
 
37
39
  <svelte:head>
@@ -39,7 +41,11 @@
39
41
  <title>{title}</title>
40
42
  <meta name="description" content={description} />
41
43
  <meta name="viewport" content="width=device-width, initial-scale=1" />
42
- <link rel="icon" href={icon} />
44
+ <link
45
+ rel="icon"
46
+ href={applyIconVersion(resolvedIcon)}
47
+ type={iconMimeType(resolvedIcon)}
48
+ />
43
49
 
44
50
  {#if canonical}
45
51
  <link rel="canonical" href={canonical} />