void 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{account-cmd-HP8bixYo.mjs → account-cmd-DRhmCWcm.mjs} +7 -8
- package/dist/{action-key-XZ9HkWAO.mjs → action-key-XtKKbbsi.mjs} +1 -2
- package/dist/{agents-CuNtT0D_.mjs → agents-DRo8gzni.mjs} +2 -3
- package/dist/{application-analysis-DDOQwiXk.mjs → application-analysis-HRFsZOv3.mjs} +18 -24
- package/dist/{application-routing-4719u_kf.mjs → application-routing-P4TggvWp.mjs} +2 -3
- package/dist/{ast-CsZ_q_gc.mjs → ast-Cv0JwXqb.mjs} +1 -2
- package/dist/{ast-bindings-C3yaPs1y.mjs → ast-bindings-BkivMJIo.mjs} +6 -11
- package/dist/{atomic-write-Dq6R0BPN.mjs → atomic-write-DA6eD1Kp.mjs} +1 -2
- package/dist/{auth-g2TQbDLD.d.mts → auth-CH4PLAX1.d.mts} +0 -2
- package/dist/{auth-Cbqi1iVX.mjs → auth-CL-p_rqV.mjs} +1 -1
- package/dist/{auth-B6iOCjKI.mjs → auth-Dy8svcqQ.mjs} +6 -7
- package/dist/{auth-3sGB0zJ1.mjs → auth-YVjBX5NY.mjs} +1 -2
- package/dist/{auth-client-Bawdj38n.d.mts → auth-client-6-Ft9i9T.d.mts} +0 -2
- package/dist/{auth-client-BWBT8HLp.mjs → auth-client-DwCdwKbw.mjs} +1 -2
- package/dist/{auth-client-react-CMLwT2xI.mjs → auth-client-react-CJdeErvM.mjs} +1 -2
- package/dist/{auth-client-react-7GFffu8R.d.mts → auth-client-react-DvQLe5Zb.d.mts} +0 -2
- package/dist/{auth-client-solid-UoreJWZG.mjs → auth-client-solid-BRvgvp6h.mjs} +1 -2
- package/dist/{auth-client-solid-DyTFL4cq.d.mts → auth-client-solid-P9pEtKGp.d.mts} +0 -2
- package/dist/{auth-client-svelte-zetW0KIH.d.mts → auth-client-svelte-B5j8irT6.d.mts} +0 -2
- package/dist/{auth-client-svelte-Cv_WvrRk.mjs → auth-client-svelte-BSqUCEed.mjs} +1 -2
- package/dist/{auth-client-vue-bChShbQP.d.mts → auth-client-vue-BEiAfavk.d.mts} +0 -2
- package/dist/{auth-client-vue-CFk7Xbv3.mjs → auth-client-vue-CPkbRtOO.mjs} +1 -2
- package/dist/{auth-link-CedYpDCy.mjs → auth-link-CVXP1G6G.mjs} +7 -8
- package/dist/{auth-migrations-BO27GDNr.mjs → auth-migrations-DDeifS3v.mjs} +1 -2
- package/dist/{auth-router-vafo7x8w.mjs → auth-router-D1pGdbvB.mjs} +6 -7
- package/dist/{base64-DVrOndmI.mjs → base64-ikl9yBy3.mjs} +1 -2
- package/dist/{better-auth-shared-BHB8kiTE.d.mts → better-auth-shared-BJyG2mH0.d.mts} +2 -6
- package/dist/{better-auth-shared-7FM3Uk2N.mjs → better-auth-shared-C958aM7W.mjs} +31 -7
- package/dist/{build-cmd-9vUAQ1_V.mjs → build-cmd-DmjbuT6d.mjs} +7 -8
- package/dist/{cache-jvwLNb0h.mjs → cache-2khBO1MR.mjs} +7 -8
- package/dist/{cancel-deploy-Dw0UmWKO.mjs → cancel-deploy-_itbbvY3.mjs} +6 -7
- package/dist/{cf-access-CWP4avfP.mjs → cf-access-BmBT2h8_.mjs} +3 -4
- package/dist/{cf-access-BM9G0lhO.mjs → cf-access-pejlJmuy.mjs} +1 -2
- package/dist/{cf-build-output-XpNR9zoh.mjs → cf-build-output-B1C8U83u.mjs} +41 -314
- package/dist/cf-build-output-CmDOcA7K.mjs +1 -0
- package/dist/{cf-command-values-ByHk0xg4.mjs → cf-command-values-Ccl-zRhl.mjs} +10 -7
- package/dist/cf-config-migrate-Dy8MrKgF.mjs +326 -0
- package/dist/{cf-worker-settings-Dg27RzyT.mjs → cf-worker-settings-CARs4Wy9.mjs} +3 -5
- package/dist/cli/cli.mjs +66 -76
- package/dist/cli/cloudflare-operation-process.mjs +14 -18
- package/dist/cli/env-schema-probe.d.mts +1 -5
- package/dist/cli/env-schema-probe.mjs +4 -5
- package/dist/client-CEtr5UOR.mjs +1 -0
- package/dist/{client-B3LnB_bE.mjs → client-CoxPEhJq.mjs} +15 -13
- package/dist/{cloudflare-auth-DyD_kVFr.mjs → cloudflare-auth-CEu-1Ps_.mjs} +2 -3
- package/dist/{cloudflare-cmd-D-b_u3T4.mjs → cloudflare-cmd-fZ6AMSWk.mjs} +7 -8
- package/dist/{cloudflare-config-CH1AylZT.mjs → cloudflare-config-eQunqX6A.mjs} +22 -17
- package/dist/{cloudflare-connect-zTJh8UnN.mjs → cloudflare-connect-9OZe4XVQ.mjs} +5 -6
- package/dist/{cloudflare-operations-Bc-7fN44.mjs → cloudflare-operations-CrskD4_O.mjs} +8 -9
- package/dist/{cloudflare-operations-BtulCNOg.mjs → cloudflare-operations-oLvAd9Nd.mjs} +1 -1
- package/dist/{cloudflare-process-8jEYIeim.mjs → cloudflare-process-DjJ638A-.mjs} +7 -9
- package/dist/{cloudflare-user-output-Q-k0QoNQ.mjs → cloudflare-user-output-zEwuGrEJ.mjs} +1 -2
- package/dist/collect-8i0wU63d.mjs +1 -0
- package/dist/{collect-Dew86qce.mjs → collect-C6Blu9yw.mjs} +2 -3
- package/dist/{config-tqMM6DwY.mjs → config-BBlVXZCU.mjs} +5 -6
- package/dist/{config-OFOAimzt.mjs → config-BITKQ3O6.mjs} +5 -5
- package/dist/{config-BV2ASlpn.mjs → config-BgysUhnm.mjs} +1 -1
- package/dist/{config-CAdZVTLN.d.mts → config-CPxJmt4M.d.mts} +4 -6
- package/dist/{config-D-6q7EBH.mjs → config-WlvEcL82.mjs} +3 -4
- package/dist/config-entry.d.mts +1 -3
- package/dist/config-entry.mjs +1 -2
- package/dist/{connect-BOM6zvFX.mjs → connect-CKvmkl2R.mjs} +10 -11
- package/dist/{create-project-C2K0DN2O.mjs → create-project-BiMmR5wA.mjs} +1 -1
- package/dist/{create-project-Bxd02EHN.mjs → create-project-Bq0M8MtO.mjs} +9 -11
- package/dist/{database-provider-Cx525bwX.mjs → database-provider-DkZo4VwN.mjs} +1 -2
- package/dist/database-provider.d.mts +1 -3
- package/dist/database-provider.mjs +1 -1
- package/dist/{db-Cdvr3zwG.mjs → db-cq5RW4Vy.mjs} +52 -54
- package/dist/{db-types-0eCiqYb1.mjs → db-types-C_8amnB0.mjs} +3 -4
- package/dist/{delete-lETE6Tpt.mjs → delete-CY4L8fi2.mjs} +7 -8
- package/dist/deploy-B029oHlE.mjs +2 -0
- package/dist/{deploy-CdM-LAxX.mjs → deploy-D_gEojD2.mjs} +144 -136
- package/dist/{deploy-managed-static-DjeBFG2c.mjs → deploy-managed-static-BHVbB_-A.mjs} +33 -40
- package/dist/{deploy-transport-DIq_gFTP.mjs → deploy-transport-DEyOUfac.mjs} +6 -7
- package/dist/deploy.d.mts +1 -3
- package/dist/deploy.mjs +11 -11
- package/dist/{dev-inbox-D0jxye_D.mjs → dev-inbox-CUUS6iUg.mjs} +3 -4
- package/dist/discover-D4mQthao.mjs +1 -0
- package/dist/{discover-LaV0tbIu.mjs → discover-Dhkzxgdt.mjs} +3 -4
- package/dist/{dispatch-CLa2LThw.mjs → dispatch-BNLB5_Gm.mjs} +12 -15
- package/dist/{dist-Cegxq8gs.mjs → dist-B6eN80gc.mjs} +199 -118
- package/dist/{dist-D15hFhP0.mjs → dist-BWNkVq50.mjs} +8 -15
- package/dist/{dist-Cor9XGoz.mjs → dist-D23AAMxT.mjs} +9 -16
- package/dist/{dist-ipQi0Q8y.mjs → dist-DMYe8CZJ.mjs} +1 -2
- package/dist/{dist-B1PLt4_8.mjs → dist-eV_Ep60B.mjs} +1 -1
- package/dist/{domain-DyhNtdYf.mjs → domain-BlH90Ods.mjs} +8 -9
- package/dist/{dotenv-CNazY3-w.mjs → dotenv-CEI8hapP.mjs} +1 -2
- package/dist/{drizzle-9TubSZvI.mjs → drizzle-C8MPqt5m.mjs} +1 -1
- package/dist/{drizzle-BQfyvQKX.mjs → drizzle-lFdzSEa9.mjs} +2 -3
- package/dist/{email-B9ayYQEG.mjs → email-BHY72ixO.mjs} +3 -4
- package/dist/{email-DM2wDcBN.mjs → email-Bkq8ZL1p.mjs} +14 -15
- package/dist/{email-cloudflare-PMbAev9Q.mjs → email-cloudflare-MvJIxrwx.mjs} +18 -123
- package/dist/{email-protocol-D9nTvhCp.mjs → email-protocol-DTs_TjCS.mjs} +1 -2
- package/dist/{entry-BEM8ZuGP.mjs → entry-CBZsCy3O.mjs} +5 -6
- package/dist/{env-78hbN-oI.mjs → env-AvuCSeCH.mjs} +10 -11
- package/dist/{env-BaMz0j7H.mjs → env-CuzZZyjB.mjs} +3 -4
- package/dist/{env-0jrMQJI_.mjs → env-DtKg5G26.mjs} +2 -3
- package/dist/{env-helpers--wFmQ_5Q.mjs → env-helpers-Dj_SIwPu.mjs} +1 -2
- package/dist/{env-helpers-CyKtOBpj.d.mts → env-helpers-U56xuFgL.d.mts} +1 -3
- package/dist/{env-public-6lqiSD2b.d.mts → env-public-CeNeO_AT.d.mts} +2 -4
- package/dist/{env-raw-D74P4ebM.mjs → env-raw-e8qgqAzQ.mjs} +1 -2
- package/dist/{env-types-BicfKBhV.mjs → env-types-DqzVBKnS.mjs} +4 -5
- package/dist/{env-validation-BUfFZ6bt.mjs → env-validation-C8Cmvas0.mjs} +1 -1
- package/dist/{env-validation-B3VobvXm.mjs → env-validation-GV1oD4EV.mjs} +9 -10
- package/dist/{error-pages-CLIJ7aYq.mjs → error-pages-COVBnzK7.mjs} +6 -12
- package/dist/{fetch-CUX0tB78.d.mts → fetch-B-gLGYVl.d.mts} +0 -4
- package/dist/{fetch-CtESUYWd.mjs → fetch-C8yhLoF3.mjs} +3 -4
- package/dist/{fetch-error-Bw0n-IY-.mjs → fetch-error-DmlRM6e4.mjs} +2 -4
- package/dist/{fetch-stream-BspOeTAI.mjs → fetch-stream-DafNtVJC.mjs} +4 -5
- package/dist/{fetch-stream-DfkAzZf-.d.mts → fetch-stream-DuwxWmBM.d.mts} +1 -3
- package/dist/{gen-CFmsUsW1.mjs → gen-BD-dfjxY.mjs} +12 -13
- package/dist/gen-CIHXh9I8.mjs +1 -0
- package/dist/{generate-DkEb9rL-.mjs → generate-BOp1g1H_.mjs} +1 -1
- package/dist/{generate-B1m4Cm4n.mjs → generate-CWb8aOsm.mjs} +4 -5
- package/dist/{generated-wrangler-config-DeWj5F9Y.mjs → generated-wrangler-config-CoDaaFsA.mjs} +1 -2
- package/dist/{git-metadata-D-gurjzG.mjs → git-metadata-Cukp5kV5.mjs} +1 -2
- package/dist/{github-cmd-De-_IWbM.mjs → github-cmd-CA-lBdkn.mjs} +8 -9
- package/dist/{handler-BHktmuTL.d.mts → handler-BR6Tvjkp.d.mts} +18 -26
- package/dist/{handler-BZ1t7-Rv.mjs → handler-CKeTtYID.mjs} +6 -17
- package/dist/{head-D2VF4ApL.mjs → head-5XPcnG-j.mjs} +1 -2
- package/dist/{head-C8K_iGe6.d.mts → head-MeF_5M_3.d.mts} +0 -2
- package/dist/headers-CuTEdP9C.mjs +445 -0
- package/dist/{help-CKbrhZha.mjs → help-1OCFDsRr.mjs} +28 -12
- package/dist/help-Ba8Dq5-r.mjs +1 -0
- package/dist/{inbound-Da7XsjH3.d.mts → inbound-BHt4dIlL.d.mts} +16 -9
- package/dist/{inbound-VrOLqwZY.mjs → inbound-CdO-qY0w.mjs} +6 -81
- package/dist/index.d.mts +23 -13
- package/dist/index.mjs +495 -223
- package/dist/{info-Yg0-V5Rs.mjs → info-CJxua_db.mjs} +6 -7
- package/dist/{init-CDiJQycf.mjs → init-B-4CluYx.mjs} +43 -59
- package/dist/{isr-config-fZaJJ8t7.mjs → isr-config-Czzb4mIq.mjs} +5 -55
- package/dist/{limits-D0vD1M9A.mjs → limits-CrHLm5Tk.mjs} +1 -2
- package/dist/{limits-CFsDKQvU.d.mts → limits-_xIf5z_P.d.mts} +0 -2
- package/dist/{link-Dllip08S.mjs → link-DAXOT-G_.mjs} +8 -9
- package/dist/{list-BYRP6am0.mjs → list-BYSOo9fm.mjs} +8 -9
- package/dist/{live-BllfDuzA.d.mts → live-0xrcVpyq.d.mts} +2 -4
- package/dist/{live-BcHoTDFe.mjs → live-DF4HUl2m.mjs} +5 -7
- package/dist/{load-user-env-DD5qveNU.mjs → load-user-env-CSwdofj0.mjs} +1 -2
- package/dist/{local-d1-CAwAs9GH.mjs → local-d1-BLgsNUj9.mjs} +4 -5
- package/dist/{log-BMwmN5Ae.mjs → log-D9hwSySP.mjs} +3 -4
- package/dist/login-BpbYeu-n.mjs +1 -0
- package/dist/{login-PcFy5mlC.mjs → login-CJopTWX4.mjs} +6 -7
- package/dist/{logs-DmJTBhed.mjs → logs-DE0weBsR.mjs} +19 -18
- package/dist/{migrate-B8S2xTcb.mjs → migrate-ChHHZBTi.mjs} +20 -16
- package/dist/migrate-HdA6Kh2p.mjs +1 -0
- package/dist/{migration-handler-CwlEQUoo.d.mts → migration-handler-D8mDx3Ew.d.mts} +0 -4
- package/dist/{migration-handler-Cg0Y4EPu.mjs → migration-handler-DCehTlWs.mjs} +1 -2
- package/dist/{mime-BAyHPskU.mjs → mime-CtP6-qAF.mjs} +145 -18
- package/dist/{mysql-migration-sql-BIS5vbNk.mjs → mysql-migration-sql-CI9VTwjt.mjs} +3 -5
- package/dist/{neon-DTZr7Bu7.mjs → neon-CJzQSycr.mjs} +2 -3
- package/dist/nitro.d.mts +0 -2
- package/dist/nitro.mjs +5 -6
- package/dist/{node-CDOPrGSl.mjs → node-CZ6lGNLn.mjs} +8 -9
- package/dist/{operator-args-BsJIYXaT.mjs → operator-args-D79WQP70.mjs} +2 -3
- package/dist/{operator-auth-Cr2zCc-J.mjs → operator-auth-CfDcmzpo.mjs} +2 -3
- package/dist/{operator-client-C-ROjk1I.mjs → operator-client-BIY4-N_6.mjs} +3 -4
- package/dist/{operator-cmd-DmkmS2wL.mjs → operator-cmd-BUqsdk2K.mjs} +32 -15
- package/dist/operator-cmd-wBYyp8iQ.mjs +1 -0
- package/dist/{output-BpgYODYx.mjs → output-BCdLioKP.mjs} +4 -5
- package/dist/output-E6gecbbV.mjs +1 -0
- package/dist/{package-json-BjYqR-So.mjs → package-json-DvS6IFRv.mjs} +2 -3
- package/dist/pages/client.d.mts +147 -31
- package/dist/pages/client.mjs +199 -43
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +25 -18
- package/dist/pages/index.mjs +24 -12
- package/dist/pages/islands-plugin.d.mts +75 -13
- package/dist/pages/islands-plugin.mjs +92 -7
- package/dist/pages/prefetch.d.mts +2 -2
- package/dist/pages/prefetch.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/pages/serialize.d.mts +1 -1
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{pg-J2HbZIkX.mjs → pg-DoyPxa_X.mjs} +1 -2
- package/dist/{picocolors-BsDfhxIw.mjs → picocolors-D1NxSLw-.mjs} +2 -3
- package/dist/{plan-BhLO2p4w.mjs → plan-BOD70XGS.mjs} +1 -2
- package/dist/plan-CQ-N4gws.mjs +1 -0
- package/dist/platform-args-C7XUw9mw.mjs +1 -0
- package/dist/{platform-args-BMD2gjc_.mjs → platform-args-Cx1M-7bq.mjs} +22 -11
- package/dist/{platform-auth-config-CImnfohz.mjs → platform-auth-config-K4m_LE8b.mjs} +10 -11
- package/dist/{platform-auth-protection-BogLhtHi.mjs → platform-auth-protection-KF5Vo-1I.mjs} +10 -11
- package/dist/{platform-auth-recovery-B-mEaWEi.mjs → platform-auth-recovery-BOdFrl7R.mjs} +9 -11
- package/dist/{platform-cmd-CV8NxIIn.mjs → platform-cmd-DpCHawGF.mjs} +1 -1
- package/dist/{platform-cmd-DZK2ixMl.mjs → platform-cmd-Ds3EAV5t.mjs} +13 -13
- package/dist/{platform-discovery-CHhNs8Nn.mjs → platform-discovery-B0eZjZ3B.mjs} +2 -3
- package/dist/{platform-domain-CRvelPGE.mjs → platform-domain-rWJshybd.mjs} +7 -8
- package/dist/{platform-lifecycle-DwXq7kZt.mjs → platform-lifecycle-BH34I0rh.mjs} +1 -1
- package/dist/{platform-lifecycle-CPYY7E9B.mjs → platform-lifecycle-D9RdGub1.mjs} +110 -110
- package/dist/{platform-management-BOnGbMSM.mjs → platform-management-BRefdHGD.mjs} +27 -11
- package/dist/{platform-management-lXdgGgAM.mjs → platform-management-BfLW0Zlo.mjs} +1 -1
- package/dist/{platform-plans-config-CeydDSj0.mjs → platform-plans-config-Dx1agneU.mjs} +5 -6
- package/dist/{platform-recovery-noaALXnE.mjs → platform-recovery-DZuZGJtt.mjs} +5 -6
- package/dist/{platform-registry-B9mWX9LO.mjs → platform-registry-DZ_2Xuqd.mjs} +4 -6
- package/dist/platform-runtime-logs-CdJGnk3f.mjs +68 -0
- package/dist/{platform-setup-Ca53gtt0.mjs → platform-setup-Vw1AaUN8.mjs} +19 -7
- package/dist/{plugin-inference-CeiB6BG5.mjs → plugin-inference-CdLbxZL_.mjs} +16 -24
- package/dist/{prefetch-Bsc_Pb6c.mjs → prefetch-Dx2jIbtg.mjs} +20 -3
- package/dist/{prefetch-Ce6la4EI.d.mts → prefetch-NdNeubbH.d.mts} +7 -3
- package/dist/{prepare-D604Yiyr.mjs → prepare-BJW-f1f1.mjs} +13 -14
- package/dist/{prepare-BuOS18AM.mjs → prepare-BMGeKL16.mjs} +4 -5
- package/dist/prepare-BdxJJCMv.mjs +1 -0
- package/dist/{prerender-render-CaShbHJ3.mjs → prerender-render-RlAj6hh8.mjs} +2 -3
- package/dist/prerender-render.d.mts +1 -3
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-rqDnVsJN.mjs → project-CLwxcEdq.mjs} +3 -4
- package/dist/{project-zdB3fs9G.mjs → project-DVsTAWFh.mjs} +1 -1
- package/dist/{project-cmd-DBYqAIbe.mjs → project-cmd-B_bUyZ3J.mjs} +21 -23
- package/dist/{project-paths-DGu_QZ_Q.mjs → project-paths-CdGv9Tmi.mjs} +3 -5
- package/dist/project-slug-BUy0lmyR.mjs +1 -0
- package/dist/{project-slug-23TpquG4.mjs → project-slug-CO6ci9XG.mjs} +0 -1
- package/dist/{project-team-BjCLgTRC.mjs → project-team-MjT5K4rQ.mjs} +7 -8
- package/dist/{project-token-BB6PwaA9.mjs → project-token-BKHGwY3k.mjs} +7 -8
- package/dist/{project-tsconfig-CVvk6Z_e.mjs → project-tsconfig-Cf2NFjlM.mjs} +4 -6
- package/dist/{project-zero-trust-CWDh1P_t.mjs → project-zero-trust-Bzdd05-h.mjs} +7 -8
- package/dist/{protocol-DimNxVRr.mjs → protocol-COyySMki.mjs} +135 -113
- package/dist/{protocol-D5XDySYu.d.mts → protocol-CkwjASep.d.mts} +4 -6
- package/dist/{providers-BNKRacMr.d.mts → providers-D5P8j_8D.d.mts} +0 -2
- package/dist/{providers-BUHwJlmM.mjs → providers-ZARwX2cL.mjs} +1 -2
- package/dist/{provision-DztLJ97X.mjs → provision-BbCzpbXs.mjs} +6 -7
- package/dist/{provision-DfxLCg-d.mjs → provision-DQF6Kw-6.mjs} +1 -1
- package/dist/{queues-BWKt1Xo4.d.mts → queues-DdM42xXW.d.mts} +0 -2
- package/dist/{r2-conditions-B8xUgJRc.mjs → r2-conditions-BqkQNt2n.mjs} +1 -2
- package/dist/{requests-D_pbzDyz.mjs → requests-daJmVpjk.mjs} +6 -7
- package/dist/resolve-project-CgfjtOwz.mjs +1 -0
- package/dist/{resolve-project-Xoi6eTWY.mjs → resolve-project-D0YNnJfm.mjs} +4 -5
- package/dist/{resource-name-C7LVpcRm.mjs → resource-name-DlJ9QXzg.mjs} +1 -2
- package/dist/{response-Tn7rU0MV.mjs → response-HmNjB30w.mjs} +1 -2
- package/dist/{rollback-CjfIYsJx.mjs → rollback-BgL0wY1J.mjs} +7 -8
- package/dist/{rolldown-runtime-3h0WiCiA.mjs → rolldown-runtime-uD8oG6U2.mjs} +1 -2
- package/dist/{route-types-DvEGmPif.mjs → route-types-CZc1YXjF.mjs} +80 -9
- package/dist/route-url-CRDF-I0I.mjs +57 -0
- package/dist/route-url-C_YIH_zO.d.mts +37 -0
- package/dist/routes-stub.d.mts +8 -3
- package/dist/routes-stub.mjs +1 -1
- package/dist/{routing-assets-DdSFxoLp.mjs → routing-assets-DJIVOrCh.mjs} +1 -2
- package/dist/{runner-3uGC-oLF.mjs → runner-5MCSimKx.mjs} +5 -6
- package/dist/{runner-WCdfeI0q.mjs → runner-QMeOpScZ.mjs} +1 -1
- package/dist/{runner-mysql-BcHnLUuM.mjs → runner-mysql-0zVmB1JW.mjs} +1 -1
- package/dist/{runner-mysql-BWmbk5IE.mjs → runner-mysql-Bdmsp_x4.mjs} +3 -4
- package/dist/{runner-pg-Cgp-cr_p.mjs → runner-pg-2pjltt0t.mjs} +1 -1
- package/dist/{runner-pg-Cr3qrqi4.mjs → runner-pg-mYc75KfH.mjs} +2 -3
- package/dist/runtime/ai.d.mts +0 -4
- package/dist/runtime/ai.mjs +6 -8
- package/dist/runtime/auth-client-react.d.mts +1 -1
- package/dist/runtime/auth-client-react.mjs +1 -1
- package/dist/runtime/auth-client-solid.d.mts +1 -1
- package/dist/runtime/auth-client-solid.mjs +1 -1
- package/dist/runtime/auth-client-svelte.d.mts +1 -1
- package/dist/runtime/auth-client-svelte.mjs +1 -1
- package/dist/runtime/auth-client-vue.d.mts +1 -1
- package/dist/runtime/auth-client-vue.mjs +1 -1
- package/dist/runtime/auth-client.d.mts +1 -1
- package/dist/runtime/auth-client.mjs +1 -1
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/auth.mjs +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +2 -4
- package/dist/runtime/better-auth-mysql.mjs +3 -4
- package/dist/runtime/better-auth-pg.d.mts +2 -4
- package/dist/runtime/better-auth-pg.mjs +4 -5
- package/dist/runtime/better-auth.d.mts +2 -4
- package/dist/runtime/better-auth.mjs +3 -4
- package/dist/runtime/client-react.d.mts +4 -4
- package/dist/runtime/client-react.mjs +4 -4
- package/dist/runtime/client-solid.d.mts +4 -4
- package/dist/runtime/client-solid.mjs +4 -4
- package/dist/runtime/client-svelte.d.mts +4 -4
- package/dist/runtime/client-svelte.mjs +4 -4
- package/dist/runtime/client-vue.d.mts +4 -4
- package/dist/runtime/client-vue.mjs +4 -4
- package/dist/runtime/client.d.mts +4 -4
- package/dist/runtime/client.mjs +4 -4
- package/dist/runtime/db.d.mts +0 -2
- package/dist/runtime/db.mjs +2 -3
- package/dist/runtime/durable.d.mts +0 -2
- package/dist/runtime/durable.mjs +3 -4
- package/dist/runtime/email/testing.d.mts +1 -5
- package/dist/runtime/email/testing.mjs +5 -6
- package/dist/runtime/email-protocol.d.mts +0 -2
- package/dist/runtime/email-protocol.mjs +1 -1
- package/dist/runtime/email.d.mts +1 -5
- package/dist/runtime/email.mjs +6 -7
- package/dist/runtime/env-public-client.d.mts +1 -3
- package/dist/runtime/env-public-client.mjs +2 -3
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +5 -7
- package/dist/runtime/env.d.mts +0 -4
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-server.d.mts +1 -3
- package/dist/runtime/fetch-server.mjs +3 -4
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +2 -2
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +2 -2
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +2 -2
- package/dist/runtime/isr.d.mts +1 -3
- package/dist/runtime/isr.mjs +2 -3
- package/dist/runtime/kv.d.mts +1 -3
- package/dist/runtime/kv.mjs +2 -3
- package/dist/runtime/limits.d.mts +1 -1
- package/dist/runtime/limits.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -3
- package/dist/runtime/live-client.mjs +1 -2
- package/dist/runtime/live-server.d.mts +0 -2
- package/dist/runtime/live-server.mjs +3 -4
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/log.d.mts +3 -3
- package/dist/runtime/log.mjs +26 -18
- package/dist/runtime/migration-handler-mysql.d.mts +2 -4
- package/dist/runtime/migration-handler-mysql.mjs +2 -3
- package/dist/runtime/migration-handler-pg.d.mts +2 -4
- package/dist/runtime/migration-handler-pg.mjs +2 -3
- package/dist/runtime/migration-handler.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +1 -1
- package/dist/runtime/queues.d.mts +1 -1
- package/dist/runtime/queues.mjs +2 -3
- package/dist/runtime/remote/binding-handler.d.mts +1 -3
- package/dist/runtime/remote/binding-handler.mjs +3 -4
- package/dist/runtime/remote/index.d.mts +1 -3
- package/dist/runtime/remote/index.mjs +8 -13
- package/dist/runtime/response.d.mts +1 -3
- package/dist/runtime/response.mjs +1 -1
- package/dist/runtime/route-url.d.mts +2 -2
- package/dist/runtime/route-url.mjs +1 -1
- package/dist/runtime/routing.d.mts +8 -11
- package/dist/runtime/routing.mjs +52 -32
- package/dist/runtime/sandbox-container.d.mts +1 -1
- package/dist/runtime/sandbox-container.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +2 -2
- package/dist/runtime/sandbox.mjs +5 -6
- package/dist/runtime/seed.d.mts +0 -2
- package/dist/runtime/seed.mjs +1 -2
- package/dist/runtime/sse-client.d.mts +1 -3
- package/dist/runtime/sse-client.mjs +1 -2
- package/dist/runtime/sse.d.mts +1 -3
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/storage.d.mts +1 -3
- package/dist/runtime/storage.mjs +2 -3
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -1
- package/dist/runtime/ws-server.d.mts +3 -5
- package/dist/runtime/ws-server.mjs +3 -4
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +3 -4
- package/dist/{sandbox-q3waMc2T.d.mts → sandbox-DE1WsxuB.d.mts} +2 -4
- package/dist/{sandbox-container-a9LRUtii.mjs → sandbox-container-BuxhwCgt.mjs} +1 -2
- package/dist/{sandbox-container-ChQRum-j.d.mts → sandbox-container-CZFZdMso.d.mts} +0 -2
- package/dist/{scan-N9WzdcAl.mjs → scan-X2rDDRNa.mjs} +49 -35
- package/dist/{secret-3X0PxmuX.mjs → secret-CPq-B_vp.mjs} +17 -15
- package/dist/{serialize-YHvlcG3Q.mjs → serialize-DUuYuaY3.mjs} +2 -4
- package/dist/{serialize-DtR8Vwa_.d.mts → serialize-I4EmS-Wf.d.mts} +0 -2
- package/dist/{skills-CrUO3PJ0.mjs → skills-D393E4lB.mjs} +4 -5
- package/dist/{sqlite-validation-BzKMWnO4.mjs → sqlite-validation-CLJXXN93.mjs} +1 -2
- package/dist/{sse-CMvCgjNk.mjs → sse-CxR30yMF.mjs} +1 -2
- package/dist/{standard-schema-Fo_vCAZh.d.mts → standard-schema-CuDawHOC.d.mts} +0 -2
- package/dist/{static-asset-marker-Btf-6oCD.mjs → static-asset-marker-DsQKz6lt.mjs} +9 -3
- package/dist/{subcommand-prompt-D9OhhbGG.mjs → subcommand-prompt-CxJXporl.mjs} +3 -4
- package/dist/sveltekit.d.mts +0 -2
- package/dist/sveltekit.mjs +2 -3
- package/dist/{terminal-log-text-D9ACPOuG.mjs → terminal-log-text-DNsWJREL.mjs} +1 -2
- package/dist/{types-w72dljaA.d.mts → types-agfx0alu.d.mts} +0 -4
- package/dist/validate-DY1U9rET.mjs +1 -0
- package/dist/{validate-CnZPMq4q.mjs → validate-Ddzl-IwT.mjs} +4 -5
- package/dist/validation-error-uAAjlsiW.mjs +82 -0
- package/dist/{validator-BTOu0fB0.mjs → validator-CTfmzZYb.mjs} +2 -5
- package/dist/{version-metadata-D2vfMQzv.mjs → version-metadata-C8hLzQkv.mjs} +4 -6
- package/dist/{worker-conditions-AWFRcFxR.mjs → worker-conditions-CBZ0RYsZ.mjs} +1 -2
- package/dist/{wrangler-I-scB_1t.mjs → wrangler-DESSbN8L.mjs} +6 -8
- package/dist/wrangler-DUB3MGHV.mjs +1 -0
- package/dist/{wrapper-BBl1rC32.mjs → wrapper-C9SUxoj7.mjs} +17 -14
- package/dist/{ws-B3ClMVDh.d.mts → ws-Dmjg5NH2.d.mts} +3 -5
- package/dist/{yarn-pnp-DLbEFMT0.mjs → yarn-pnp-DgWbE7z5.mjs} +2 -3
- package/docs/guide/database.md +4 -4
- package/docs/guide/deployment.md +1 -1
- package/docs/guide/edge/headers.md +4 -6
- package/docs/guide/edge/redirects.md +4 -4
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/edge/static-assets.md +0 -10
- package/docs/guide/email/domains.md +3 -1
- package/docs/guide/email/receiving.md +4 -4
- package/docs/guide/email/sending.md +43 -13
- package/docs/guide/pages-routing/actions-and-forms.md +26 -9
- package/docs/guide/pages-routing/islands.md +5 -5
- package/docs/guide/pages-routing/layouts.md +16 -2
- package/docs/guide/pages-routing/loaders.md +5 -5
- package/docs/guide/pages-routing/markdown.md +7 -7
- package/docs/guide/pages-routing/overview.md +137 -27
- package/docs/guide/platform/administration/connected-apps.md +4 -2
- package/docs/guide/platform/administration/email.md +6 -8
- package/docs/guide/platform/installation/credentials.md +12 -10
- package/docs/guide/platform/installation/maintenance.md +18 -21
- package/docs/guide/platform/installation/prerequisites.md +1 -1
- package/docs/guide/platform/installation/setup.md +23 -2
- package/docs/guide/platform/installation/uninstall.md +1 -1
- package/docs/guide/queues.md +4 -8
- package/docs/guide/self-hosted-platform.md +3 -3
- package/docs/guide/server-routing.md +7 -7
- package/docs/guide/ssg.md +3 -3
- package/docs/guide/type-safety.md +84 -1
- package/docs/guide/typed-fetch.md +1 -1
- package/docs/guide/websockets.md +1 -1
- package/docs/integrations/cloudflare.md +2 -2
- package/docs/integrations/frameworks/analog.md +1 -1
- package/docs/integrations/frameworks/astro.md +17 -12
- package/docs/integrations/frameworks/nuxt.md +1 -1
- package/docs/integrations/frameworks/overview.md +2 -2
- package/docs/integrations/frameworks/sveltekit.md +1 -1
- package/docs/integrations/frameworks/tanstack-start.md +1 -1
- package/docs/integrations/hono.md +5 -5
- package/docs/reference/api/auth.md +1 -1
- package/docs/reference/api/deploy.md +6 -6
- package/docs/reference/api/pages.md +109 -50
- package/docs/reference/api/plugin.md +4 -4
- package/docs/reference/api/resources.md +4 -1
- package/docs/reference/api/rewrites.md +24 -3
- package/docs/reference/api/types.md +45 -0
- package/docs/reference/api.md +2 -2
- package/docs/reference/cli/database.md +15 -9
- package/docs/reference/cli/email.md +4 -2
- package/docs/reference/cli/platform-installation.md +6 -3
- package/docs/reference/cli/project.md +2 -2
- package/docs/reference/cli/secrets.md +3 -1
- package/docs/reference/cli/setup.md +4 -4
- package/docs/reference/cli.md +1 -1
- package/docs/reference/config.md +12 -2
- package/package.json +36 -32
- package/sandbox.Dockerfile +1 -1
- package/schema.json +4 -0
- package/skills/void/SKILL.md +5 -0
- package/dist/cf-build-output-bd8Uwv1P.mjs +0 -1
- package/dist/client-BZb9j66F.mjs +0 -1
- package/dist/collect-BWhkgtAn.mjs +0 -1
- package/dist/deploy-CX94CmKa.mjs +0 -2
- package/dist/discover-D4TPKo57.mjs +0 -1
- package/dist/gen-BhWBT4iu.mjs +0 -1
- package/dist/headers--vaK_chu.mjs +0 -226
- package/dist/help-qOZr3wng.mjs +0 -1
- package/dist/login-BAPmYnb7.mjs +0 -1
- package/dist/migrate-BIYTPQE6.mjs +0 -1
- package/dist/operator-cmd-CjazwOyb.mjs +0 -1
- package/dist/output-BW9uK099.mjs +0 -1
- package/dist/plan-CKX_jWnD.mjs +0 -1
- package/dist/platform-args-BC8_hsDj.mjs +0 -1
- package/dist/prepare-DU-tOpS5.mjs +0 -1
- package/dist/project-slug-6cyz8E7k.mjs +0 -1
- package/dist/resolve-project-DD1vu8s9.mjs +0 -1
- package/dist/route-url-BgPja1GS.d.mts +0 -5
- package/dist/route-url-BjGv_KKY.mjs +0 -28
- package/dist/validate-D7Wn8PUX.mjs +0 -1
- package/dist/validation-error-Dg9Recn1.mjs +0 -49
- package/dist/wrangler-UnwdISay.mjs +0 -1
package/dist/pages/client.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { i as searchWithoutActionKey } from "../action-key-
|
|
2
|
-
import { t as ISLAND_FRONTMATTER_ID } from "../serialize-
|
|
3
|
-
import { t as interpolateRouteParams } from "../route-url-
|
|
4
|
-
import {
|
|
1
|
+
import { i as searchWithoutActionKey } from "../action-key-XtKKbbsi.mjs";
|
|
2
|
+
import { t as ISLAND_FRONTMATTER_ID } from "../serialize-DUuYuaY3.mjs";
|
|
3
|
+
import { r as toUrlString, t as interpolateRouteParams } from "../route-url-CRDF-I0I.mjs";
|
|
4
|
+
import { r as parseCacheFor, t as PrefetchCache } from "../prefetch-Dx2jIbtg.mjs";
|
|
5
5
|
import { readUsageLimit } from "@void/edge";
|
|
6
|
-
|
|
6
|
+
// src/pages/action-result.ts
|
|
7
7
|
var VoidActionError = class extends Error {
|
|
8
8
|
body;
|
|
9
9
|
limit;
|
|
10
10
|
status;
|
|
11
11
|
statusText;
|
|
12
12
|
url;
|
|
13
|
-
constructor({ body, status, statusText, url }) {
|
|
13
|
+
constructor({ body, message, status, statusText, url }) {
|
|
14
14
|
const limit = status === 429 ? readUsageLimit(body) : null;
|
|
15
|
-
super(limit?.message ?? (statusText ? `Action failed with ${status} ${statusText}` : `Action failed with ${status}`));
|
|
15
|
+
super(message ?? limit?.message ?? (statusText ? `Action failed with ${status} ${statusText}` : `Action failed with ${status}`));
|
|
16
16
|
this.name = "VoidActionError";
|
|
17
17
|
this.body = body;
|
|
18
18
|
this.limit = limit;
|
|
@@ -52,16 +52,22 @@ async function readActionErrorBody(response) {
|
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
function readActionErrorMessage(response, body) {
|
|
56
|
+
if (response.status < 400 || response.status >= 500) return;
|
|
57
|
+
if (!response.headers.get("content-type")?.includes("text/plain")) return;
|
|
58
|
+
return typeof body === "string" && body.trim() ? body : void 0;
|
|
59
|
+
}
|
|
55
60
|
async function createActionErrorFromResponse(response, url) {
|
|
61
|
+
const body = await readActionErrorBody(response);
|
|
56
62
|
return new VoidActionError({
|
|
57
|
-
body
|
|
63
|
+
body,
|
|
64
|
+
message: readActionErrorMessage(response, body),
|
|
58
65
|
status: response.status,
|
|
59
66
|
statusText: response.statusText,
|
|
60
67
|
url
|
|
61
68
|
});
|
|
62
69
|
}
|
|
63
|
-
|
|
64
|
-
//#region src/pages/head-client.ts
|
|
70
|
+
// src/pages/head-client.ts
|
|
65
71
|
const ATTR = "data-void-head";
|
|
66
72
|
function elementDescriptorSignature(descriptor) {
|
|
67
73
|
const attrs = Object.entries(descriptor.attrs).sort(([a], [b]) => a.localeCompare(b));
|
|
@@ -149,8 +155,7 @@ function applyClientHead(head) {
|
|
|
149
155
|
}
|
|
150
156
|
if (head?.title !== void 0) document.title = head.title;
|
|
151
157
|
}
|
|
152
|
-
|
|
153
|
-
//#region src/pages/scroll-restoration.ts
|
|
158
|
+
// src/pages/scroll-restoration.ts
|
|
154
159
|
const STORAGE_PREFIX = "void:scroll:";
|
|
155
160
|
function readKey(state) {
|
|
156
161
|
return typeof state?.__voidScrollKey === "string" ? state.__voidScrollKey : null;
|
|
@@ -247,8 +252,7 @@ function createScrollRestoration() {
|
|
|
247
252
|
}
|
|
248
253
|
};
|
|
249
254
|
}
|
|
250
|
-
|
|
251
|
-
//#region src/pages/url.ts
|
|
255
|
+
// src/pages/url.ts
|
|
252
256
|
function isSameOrigin(url, origin) {
|
|
253
257
|
if (url.protocol === "capacitor:") {
|
|
254
258
|
const current = new URL(origin);
|
|
@@ -290,8 +294,7 @@ function decodePagePath(path) {
|
|
|
290
294
|
}
|
|
291
295
|
return decoded;
|
|
292
296
|
}
|
|
293
|
-
|
|
294
|
-
//#region src/pages/navigation-engine.ts
|
|
297
|
+
// src/pages/navigation-engine.ts
|
|
295
298
|
/**
|
|
296
299
|
* The server leaves a named action's key out of the page URL. When the page URL
|
|
297
300
|
* shows that, drop the key from the URL written to history as well.
|
|
@@ -366,7 +369,7 @@ async function fetchPageResponse(fetchUrl, init) {
|
|
|
366
369
|
}
|
|
367
370
|
}
|
|
368
371
|
async function createPageNavigationEngine(config) {
|
|
369
|
-
const { adapter, components, layoutTree, routeMeta, staticPageData: STATIC_PAGE_DATA_ENABLED = false, staticPageDataFastPath: STATIC_PAGE_DATA_FAST_PATH = STATIC_PAGE_DATA_ENABLED, prefetchHoverDelay: PREFETCH_HOVER_DELAY, prefetchDefaultCacheFor: PREFETCH_DEFAULT_CACHE_FOR, cacheVisitedPageData: CACHE_VISITED_PAGE_DATA = false } = config;
|
|
372
|
+
const { adapter, components, layoutTree, routeMeta, staticPageData: STATIC_PAGE_DATA_ENABLED = false, staticPageDataFastPath: STATIC_PAGE_DATA_FAST_PATH = STATIC_PAGE_DATA_ENABLED, prefetchHoverDelay: PREFETCH_HOVER_DELAY, prefetchDefaultCacheFor: PREFETCH_DEFAULT_CACHE_FOR, prefetchDefaultStrategy: PREFETCH_DEFAULT_STRATEGY = false, cacheVisitedPageData: CACHE_VISITED_PAGE_DATA = false } = config;
|
|
370
373
|
const matchRoute = (url) => config.matchRoute(decodePagePath(new URL(url, "http://x").pathname));
|
|
371
374
|
const _prefetchCache = new PrefetchCache();
|
|
372
375
|
let _nextNavigationId = 0;
|
|
@@ -603,6 +606,9 @@ async function createPageNavigationEngine(config) {
|
|
|
603
606
|
return;
|
|
604
607
|
}
|
|
605
608
|
if (method !== "GET") _prefetchCache.flushAll();
|
|
609
|
+
const matchedComponentId = method === "GET" ? matchRoute(fetchUrl) : null;
|
|
610
|
+
const preloadComponentPromise = matchedComponentId && !routeMeta[matchedComponentId]?.island && components[matchedComponentId] ? Promise.all([resolveComponent(matchedComponentId), resolveLayouts(matchedComponentId)]) : null;
|
|
611
|
+
preloadComponentPromise?.catch(() => {});
|
|
606
612
|
const headers = {
|
|
607
613
|
"X-VoidPages": "true",
|
|
608
614
|
Accept: "application/json"
|
|
@@ -660,6 +666,7 @@ async function createPageNavigationEngine(config) {
|
|
|
660
666
|
url = fetchUrl + redirectUrl.hash;
|
|
661
667
|
commitTarget.fetchUrl = fetchUrl;
|
|
662
668
|
commitTarget.hash = redirectUrl.hash;
|
|
669
|
+
commitTarget.method = method;
|
|
663
670
|
}
|
|
664
671
|
if (response && method !== "GET" && !response.ok) throw await createActionErrorFromResponse(response, fetchUrl);
|
|
665
672
|
if (response && !response.headers.get("X-VoidPages")) {
|
|
@@ -728,7 +735,7 @@ async function createPageNavigationEngine(config) {
|
|
|
728
735
|
deferredRegistry.preserveValuesFrom(_committedDeferredRegistry, pageData);
|
|
729
736
|
commitTarget.fetchUrl = withoutActionKey(fetchUrl, pageData.url);
|
|
730
737
|
}
|
|
731
|
-
const [component, layouts] = await Promise.race([Promise.all([resolveComponent(pageData.component), resolveLayouts(pageData.component)]), abortSignalPromise(signal)]);
|
|
738
|
+
const [component, layouts] = await Promise.race([matchedComponentId === pageData.component && preloadComponentPromise ? preloadComponentPromise : Promise.all([resolveComponent(pageData.component), resolveLayouts(pageData.component)]), abortSignalPromise(signal)]);
|
|
732
739
|
if (id !== _nextNavigationId && signal.aborted) throw abortError();
|
|
733
740
|
return {
|
|
734
741
|
pageData,
|
|
@@ -744,6 +751,7 @@ async function createPageNavigationEngine(config) {
|
|
|
744
751
|
const result = await shell;
|
|
745
752
|
if (!result) return false;
|
|
746
753
|
if (resourceId < _urlNavigationId) return false;
|
|
754
|
+
const preserveScroll = options.preserveScroll ?? (commitTarget.method !== "GET" && commitTarget.fetchUrl === window.location.pathname + window.location.search);
|
|
747
755
|
if (!options._popstate) {
|
|
748
756
|
const historyUrl = commitTarget.fetchUrl + commitTarget.hash;
|
|
749
757
|
const resource = getResource();
|
|
@@ -778,7 +786,7 @@ async function createPageNavigationEngine(config) {
|
|
|
778
786
|
_currentFetchUrl = commitTarget.fetchUrl;
|
|
779
787
|
scrollRestoration.commit();
|
|
780
788
|
requestAnimationFrame(() => {
|
|
781
|
-
if (!
|
|
789
|
+
if (!preserveScroll) restoreScroll(options._scrollPosition, commitTarget.hash);
|
|
782
790
|
});
|
|
783
791
|
return true;
|
|
784
792
|
};
|
|
@@ -792,6 +800,7 @@ async function createPageNavigationEngine(config) {
|
|
|
792
800
|
_htmlDeferredRegistry = initialDeferredRegistry;
|
|
793
801
|
return {
|
|
794
802
|
_hoverDelay: PREFETCH_HOVER_DELAY,
|
|
803
|
+
_prefetchDefaultStrategy: PREFETCH_DEFAULT_STRATEGY,
|
|
795
804
|
initialPageData,
|
|
796
805
|
initialComponent,
|
|
797
806
|
initialLayouts,
|
|
@@ -835,7 +844,8 @@ async function createPageNavigationEngine(config) {
|
|
|
835
844
|
const deferredRegistry = new DeferredRegistry();
|
|
836
845
|
const commitTarget = {
|
|
837
846
|
fetchUrl: effectiveFetchUrl,
|
|
838
|
-
hash
|
|
847
|
+
hash,
|
|
848
|
+
method
|
|
839
849
|
};
|
|
840
850
|
const shell = loadNavigationShell(id, url, effectiveFetchUrl, method, options, controller.signal, commitTarget, deferredRegistry);
|
|
841
851
|
let commitResource = async () => false;
|
|
@@ -891,7 +901,8 @@ async function createPageNavigationEngine(config) {
|
|
|
891
901
|
return fetchPromise;
|
|
892
902
|
},
|
|
893
903
|
flush(url, method = "GET") {
|
|
894
|
-
|
|
904
|
+
const hashIdx = url.indexOf("#");
|
|
905
|
+
_prefetchCache.flush(hashIdx !== -1 ? url.slice(0, hashIdx) : url, method);
|
|
895
906
|
},
|
|
896
907
|
flushAll() {
|
|
897
908
|
_prefetchCache.flushAll();
|
|
@@ -930,8 +941,7 @@ async function createPageNavigationEngine(config) {
|
|
|
930
941
|
}
|
|
931
942
|
};
|
|
932
943
|
}
|
|
933
|
-
|
|
934
|
-
//#region src/pages/adapter-helpers.ts
|
|
944
|
+
// src/pages/adapter-helpers.ts
|
|
935
945
|
function getValidationErrors(body) {
|
|
936
946
|
if (body && typeof body === "object" && "errors" in body && body.errors && typeof body.errors === "object" && !Array.isArray(body.errors)) return body.errors;
|
|
937
947
|
return null;
|
|
@@ -972,8 +982,148 @@ function isModifiedEvent(e) {
|
|
|
972
982
|
const target = e.currentTarget.getAttribute("target");
|
|
973
983
|
return target !== null && target !== "_self" || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || e.button !== 0;
|
|
974
984
|
}
|
|
975
|
-
|
|
976
|
-
|
|
985
|
+
// src/pages/link.ts
|
|
986
|
+
/** Normalizes the method and destination, rejecting options that only GET links support. */
|
|
987
|
+
function resolveLink(props) {
|
|
988
|
+
const method = (props.method ?? "GET").toUpperCase();
|
|
989
|
+
const isGet = method === "GET";
|
|
990
|
+
if (props.prefetch !== void 0 && props.prefetch !== false && !isGet) throw new Error("Link: prefetch only supports GET links. Remove `prefetch` or use method=\"GET\".");
|
|
991
|
+
if (props.reloadDocument && !isGet) throw new Error("Link: reloadDocument only supports GET links.");
|
|
992
|
+
return {
|
|
993
|
+
method,
|
|
994
|
+
isGet,
|
|
995
|
+
href: isGet ? mergeDataIntoHref(props.href, props.data) : props.href
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* The events that prefetch a Link. A Link without a `prefetch` prop uses the app's
|
|
1000
|
+
* `defaultStrategy`, but only when it is a GET link, the only kind that can prefetch.
|
|
1001
|
+
*/
|
|
1002
|
+
function linkPrefetchStrategies(props, link, defaultStrategy = false) {
|
|
1003
|
+
if (props.reloadDocument) return [];
|
|
1004
|
+
const prefetch = props.prefetch ?? (link.isGet ? defaultStrategy : false);
|
|
1005
|
+
if (prefetch === false) return [];
|
|
1006
|
+
if (prefetch === true) return ["hover"];
|
|
1007
|
+
if (typeof prefetch === "string") return [prefetch];
|
|
1008
|
+
return prefetch;
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Marks a GET link to the current page. Pathnames compare the way the server
|
|
1012
|
+
* matches pages: case-sensitive, trailing slash significant, decoded like Hono's
|
|
1013
|
+
* getPath. The query and hash are ignored. `prefix` also matches nested pages by
|
|
1014
|
+
* whole segment, except for `/`, but only an exact match is `aria-current`.
|
|
1015
|
+
* Spread the result before the user's attributes so theirs win.
|
|
1016
|
+
*/
|
|
1017
|
+
function linkActiveAttributes(router, link, match = "exact") {
|
|
1018
|
+
if (!router || !link.isGet) return {};
|
|
1019
|
+
const current = router.url;
|
|
1020
|
+
const target = resolveSameOrigin(link.href, current);
|
|
1021
|
+
if (!target) return {};
|
|
1022
|
+
const currentPath = decodePagePath(current.pathname);
|
|
1023
|
+
const linkPath = decodePagePath(target.pathname);
|
|
1024
|
+
if (linkPath === currentPath) return {
|
|
1025
|
+
"aria-current": "page",
|
|
1026
|
+
"data-void-active": ""
|
|
1027
|
+
};
|
|
1028
|
+
if (match === "prefix" && linkPath !== "/") {
|
|
1029
|
+
const parent = linkPath.endsWith("/") ? linkPath : `${linkPath}/`;
|
|
1030
|
+
if (currentPath.startsWith(parent)) return { "data-void-active": "" };
|
|
1031
|
+
}
|
|
1032
|
+
return {};
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Marks a link while a visit to its destination is loading: the visit uses the link's
|
|
1036
|
+
* method and goes to its path, query and hash. Unlike active links, the query counts,
|
|
1037
|
+
* so `?page=2` isn't pending during a visit to `?page=3`. Every link to the destination
|
|
1038
|
+
* is marked, not only the one that was clicked.
|
|
1039
|
+
* Spread the result before the user's attributes so theirs win.
|
|
1040
|
+
*/
|
|
1041
|
+
function linkPendingAttributes(router, navigation, link) {
|
|
1042
|
+
if (!router || !navigation?.location || navigation.state === "idle" || navigation.method !== link.method) return {};
|
|
1043
|
+
const destination = navigation.location;
|
|
1044
|
+
const target = resolveSameOrigin(link.href, router.url);
|
|
1045
|
+
if (target && target.host === destination.host && target.protocol === destination.protocol && decodePagePath(target.pathname) === decodePagePath(destination.pathname) && target.search === destination.search && target.hash === destination.hash) return { "data-void-pending": "" };
|
|
1046
|
+
return {};
|
|
1047
|
+
}
|
|
1048
|
+
/** Resolves `href` against `base`, or returns `null` for a malformed or other-origin href. */
|
|
1049
|
+
function resolveSameOrigin(href, base) {
|
|
1050
|
+
let target;
|
|
1051
|
+
try {
|
|
1052
|
+
target = new URL(href, base);
|
|
1053
|
+
} catch {
|
|
1054
|
+
return null;
|
|
1055
|
+
}
|
|
1056
|
+
if (target.protocol !== base.protocol || target.host !== base.host) return null;
|
|
1057
|
+
return target;
|
|
1058
|
+
}
|
|
1059
|
+
/** Data saver is on, or the connection is 2G-class. Read per call: both change while the page is open. */
|
|
1060
|
+
function isConstrainedConnection() {
|
|
1061
|
+
const connection = navigator.connection;
|
|
1062
|
+
return connection?.saveData === true || connection?.effectiveType === "2g" || connection?.effectiveType === "slow-2g";
|
|
1063
|
+
}
|
|
1064
|
+
/** Link's automatic prefetch. `router.prefetch()` called directly is not limited by the connection. */
|
|
1065
|
+
function prefetchLink(router, href, cacheFor) {
|
|
1066
|
+
if (!router?.prefetch || isConstrainedConnection()) return;
|
|
1067
|
+
if (new URL(href, window.location.href).origin !== window.location.origin) return;
|
|
1068
|
+
if (href === window.location.pathname + window.location.search) return;
|
|
1069
|
+
const options = {};
|
|
1070
|
+
if (cacheFor !== void 0) options.cacheFor = cacheFor;
|
|
1071
|
+
router.prefetch(href, options);
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* Runs a client-side visit for a plain same-origin click. Modified clicks, downloads,
|
|
1075
|
+
* cross-origin destinations and `reloadDocument` links are left to the browser.
|
|
1076
|
+
* Call it after the user's own click handler so its `preventDefault()` is respected.
|
|
1077
|
+
*/
|
|
1078
|
+
function handleLinkClick(event, router, link, props) {
|
|
1079
|
+
if (props.reloadDocument || !router || event.defaultPrevented || isModifiedEvent(event)) return;
|
|
1080
|
+
if (event.currentTarget.hasAttribute("download")) return;
|
|
1081
|
+
if (new URL(link.href, window.location.href).origin !== window.location.origin) return;
|
|
1082
|
+
let navigatePrevented = false;
|
|
1083
|
+
props.onNavigate?.({ preventDefault() {
|
|
1084
|
+
navigatePrevented = true;
|
|
1085
|
+
} });
|
|
1086
|
+
event.preventDefault();
|
|
1087
|
+
if (navigatePrevented) return;
|
|
1088
|
+
router.visit(link.href, {
|
|
1089
|
+
method: link.method,
|
|
1090
|
+
data: link.isGet ? void 0 : props.data,
|
|
1091
|
+
preserveScroll: props.preserveScroll,
|
|
1092
|
+
preserveState: props.preserveState,
|
|
1093
|
+
replace: props.replace,
|
|
1094
|
+
viewTransition: props.viewTransition
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
/**
|
|
1098
|
+
* Calls `onVisible` once, after `element` has stayed in the viewport for
|
|
1099
|
+
* `LINK_VISIBLE_PREFETCH_DELAY` ms. Leaving the viewport cancels the wait and entering
|
|
1100
|
+
* again restarts it. Returns a cleanup that also cancels a pending wait.
|
|
1101
|
+
*/
|
|
1102
|
+
function observeLinkVisible(element, onVisible) {
|
|
1103
|
+
let timer;
|
|
1104
|
+
let done = false;
|
|
1105
|
+
const stop = () => {
|
|
1106
|
+
done = true;
|
|
1107
|
+
clearTimeout(timer);
|
|
1108
|
+
timer = void 0;
|
|
1109
|
+
observer.disconnect();
|
|
1110
|
+
};
|
|
1111
|
+
const observer = new IntersectionObserver((entries) => {
|
|
1112
|
+
if (done) return;
|
|
1113
|
+
if (entries.some((entry) => !entry.isIntersecting)) {
|
|
1114
|
+
clearTimeout(timer);
|
|
1115
|
+
timer = void 0;
|
|
1116
|
+
}
|
|
1117
|
+
if (!entries.at(-1)?.isIntersecting) return;
|
|
1118
|
+
timer ??= setTimeout(() => {
|
|
1119
|
+
stop();
|
|
1120
|
+
onVisible();
|
|
1121
|
+
}, 300);
|
|
1122
|
+
}, { rootMargin: "0px" });
|
|
1123
|
+
observer.observe(element);
|
|
1124
|
+
return stop;
|
|
1125
|
+
}
|
|
1126
|
+
// src/pages/island-action.ts
|
|
977
1127
|
async function submitIslandAction(url, method, data) {
|
|
978
1128
|
const response = await fetch(url, {
|
|
979
1129
|
method,
|
|
@@ -997,8 +1147,7 @@ async function submitIslandAction(url, method, data) {
|
|
|
997
1147
|
error
|
|
998
1148
|
};
|
|
999
1149
|
}
|
|
1000
|
-
|
|
1001
|
-
//#region src/pages/form-value-equality.ts
|
|
1150
|
+
// src/pages/form-value-equality.ts
|
|
1002
1151
|
function isPlainObject(value) {
|
|
1003
1152
|
if (value === null || typeof value !== "object") return false;
|
|
1004
1153
|
const prototype = Object.getPrototypeOf(value);
|
|
@@ -1019,8 +1168,7 @@ function isEqualFormValue(a, b) {
|
|
|
1019
1168
|
}
|
|
1020
1169
|
return false;
|
|
1021
1170
|
}
|
|
1022
|
-
|
|
1023
|
-
//#region src/pages/form-reset.ts
|
|
1171
|
+
// src/pages/form-reset.ts
|
|
1024
1172
|
function isFormResetOptions(value) {
|
|
1025
1173
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1026
1174
|
}
|
|
@@ -1052,8 +1200,7 @@ function parseFormResetArgs(args) {
|
|
|
1052
1200
|
fields: args
|
|
1053
1201
|
};
|
|
1054
1202
|
}
|
|
1055
|
-
|
|
1056
|
-
//#region src/pages/form-presentation.ts
|
|
1203
|
+
// src/pages/form-presentation.ts
|
|
1057
1204
|
function formErrorMessage(form) {
|
|
1058
1205
|
return form.error?.message ?? (Object.values(form.errors).filter(Boolean).join(". ") || null);
|
|
1059
1206
|
}
|
|
@@ -1079,20 +1226,24 @@ function scheduleFormRetry(error, ready) {
|
|
|
1079
1226
|
schedule();
|
|
1080
1227
|
return () => clearTimeout(timer);
|
|
1081
1228
|
}
|
|
1082
|
-
|
|
1083
|
-
//#region src/pages/client.ts
|
|
1229
|
+
// src/pages/client.ts
|
|
1084
1230
|
function currentUrl() {
|
|
1085
1231
|
return window.location.pathname + window.location.search + window.location.hash;
|
|
1086
1232
|
}
|
|
1087
1233
|
function getUrlOrigin() {
|
|
1088
1234
|
return typeof window === "undefined" ? "http://localhost" : window.location.origin;
|
|
1089
1235
|
}
|
|
1236
|
+
/** Relative URLs such as `?page=2` resolve against the current page, as in an anchor. */
|
|
1237
|
+
function getUrlBase() {
|
|
1238
|
+
return typeof window === "undefined" ? "http://localhost/" : getUrlOrigin() + currentUrl();
|
|
1239
|
+
}
|
|
1090
1240
|
function toUrl(value) {
|
|
1091
|
-
return value instanceof URL ? new URL(value.href) : new URL(value || "/",
|
|
1241
|
+
return value instanceof URL ? new URL(value.href) : new URL(value || "/", getUrlBase());
|
|
1092
1242
|
}
|
|
1093
1243
|
function normalizeUrl(value) {
|
|
1094
|
-
|
|
1095
|
-
|
|
1244
|
+
const urlString = toUrlString(value);
|
|
1245
|
+
if (urlString.startsWith("#")) return urlString;
|
|
1246
|
+
const url = toUrl(urlString);
|
|
1096
1247
|
return isSameOrigin(url, getUrlOrigin()) ? url.pathname + url.search + url.hash : url.href;
|
|
1097
1248
|
}
|
|
1098
1249
|
function navigationMethod(method) {
|
|
@@ -1120,8 +1271,11 @@ function createRouterFacade(router, getCurrentUrl, getCurrentParams = () => rout
|
|
|
1120
1271
|
get _hoverDelay() {
|
|
1121
1272
|
return router._hoverDelay;
|
|
1122
1273
|
},
|
|
1274
|
+
get _prefetchDefaultStrategy() {
|
|
1275
|
+
return router._prefetchDefaultStrategy;
|
|
1276
|
+
},
|
|
1123
1277
|
get url() {
|
|
1124
|
-
return
|
|
1278
|
+
return new URL(getCurrentUrl() || "/", router.url);
|
|
1125
1279
|
},
|
|
1126
1280
|
get path() {
|
|
1127
1281
|
return this.url.pathname;
|
|
@@ -1149,11 +1303,11 @@ function createRouterFacade(router, getCurrentUrl, getCurrentParams = () => rout
|
|
|
1149
1303
|
}
|
|
1150
1304
|
};
|
|
1151
1305
|
}
|
|
1152
|
-
function createSsrRouter(url = "/", params = {}) {
|
|
1306
|
+
function createSsrRouter(url = "/", params = {}, requestUrl) {
|
|
1153
1307
|
return {
|
|
1154
1308
|
_hoverDelay: 75,
|
|
1155
1309
|
get url() {
|
|
1156
|
-
return
|
|
1310
|
+
return new URL(url || "/", requestUrl ?? getUrlBase());
|
|
1157
1311
|
},
|
|
1158
1312
|
get path() {
|
|
1159
1313
|
return this.url.pathname;
|
|
@@ -1218,7 +1372,7 @@ async function submitAction(router, url, options) {
|
|
|
1218
1372
|
}
|
|
1219
1373
|
}
|
|
1220
1374
|
/** Creates an action client with its own router for each framework adapter. */
|
|
1221
|
-
function createActionClient() {
|
|
1375
|
+
function createActionClient(defaults = {}) {
|
|
1222
1376
|
let _router = null;
|
|
1223
1377
|
/** Called during app initialization to store the router instance */
|
|
1224
1378
|
function setActionRouter(router) {
|
|
@@ -1233,7 +1387,9 @@ function createActionClient() {
|
|
|
1233
1387
|
const resolvedUrl = interpolateRouteParams(url, options?.params);
|
|
1234
1388
|
return submitAction(_router, resolvedUrl, {
|
|
1235
1389
|
method,
|
|
1236
|
-
data
|
|
1390
|
+
data,
|
|
1391
|
+
preserveScroll: options?.preserveScroll,
|
|
1392
|
+
...defaults
|
|
1237
1393
|
});
|
|
1238
1394
|
}
|
|
1239
1395
|
return {
|
|
@@ -1324,6 +1480,7 @@ async function createVoidRouter(config) {
|
|
|
1324
1480
|
}
|
|
1325
1481
|
const router = {
|
|
1326
1482
|
_hoverDelay: engine._hoverDelay,
|
|
1483
|
+
_prefetchDefaultStrategy: engine._prefetchDefaultStrategy,
|
|
1327
1484
|
get url() {
|
|
1328
1485
|
return toUrl(routeUrl);
|
|
1329
1486
|
},
|
|
@@ -1401,5 +1558,4 @@ function initIslands(islands, hydrateFn) {
|
|
|
1401
1558
|
if (loader) scheduleHydration(el, loader, props, strategy, hydrate);
|
|
1402
1559
|
});
|
|
1403
1560
|
}
|
|
1404
|
-
|
|
1405
|
-
export { VoidActionError, categorizeActionError, cloneFormValue, createActionClient, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, formErrorMessage, formRetryMessage, formSubmissionBlocked, getValidationErrors, hasFiles, idleNavigationState, initIslands, interpolateRouteParams, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, isFormResetOptions, isModifiedEvent, mergeDataIntoHref, objectToFormData, parseFormResetArgs, refreshPage, scheduleFormRetry, scheduleHydration, ssrProxy, submitAction, submitIslandAction };
|
|
1561
|
+
export { VoidActionError, categorizeActionError, cloneFormValue, createActionClient, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, formErrorMessage, formRetryMessage, formSubmissionBlocked, getValidationErrors, handleLinkClick, hasFiles, idleNavigationState, initIslands, interpolateRouteParams, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, isFormResetOptions, isModifiedEvent, linkActiveAttributes, linkPendingAttributes, linkPrefetchStrategies, mergeDataIntoHref, objectToFormData, observeLinkVisible, parseFormResetArgs, prefetchLink, refreshPage, resolveLink, scheduleFormRetry, scheduleHydration, ssrProxy, submitAction, submitIslandAction, toUrlString };
|
package/dist/pages/head.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-
|
|
1
|
+
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-MeF_5M_3.mjs";
|
|
2
2
|
export { HeadConfig, HeadDescriptor, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead };
|
package/dist/pages/head.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as renderBodyAttrs, n as renderHeadToString, r as renderHtmlAttrs, i as resolveHead } from "../head-
|
|
1
|
+
export { t as renderBodyAttrs, n as renderHeadToString, r as renderHtmlAttrs, i as resolveHead } from "../head-5XPcnG-j.mjs";
|
package/dist/pages/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-
|
|
2
|
-
import "../config-
|
|
3
|
-
import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition, s as RouteEnvironment } from "../types-
|
|
4
|
-
import {
|
|
1
|
+
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-MeF_5M_3.mjs";
|
|
2
|
+
import "../config-CPxJmt4M.mjs";
|
|
3
|
+
import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition, s as RouteEnvironment } from "../types-agfx0alu.mjs";
|
|
4
|
+
import { a as LinkPrefetchValue, n as CacheForInput } from "../prefetch-NdNeubbH.mjs";
|
|
5
|
+
import { r as serializePageData } from "../serialize-I4EmS-Wf.mjs";
|
|
5
6
|
import { Plugin, UserConfig } from "vite";
|
|
6
|
-
//#region src/project-paths.d.ts
|
|
7
7
|
type ProjectPaths = {
|
|
8
8
|
root: string;
|
|
9
9
|
sourceDir: string;
|
|
@@ -24,8 +24,6 @@ type ProjectPaths = {
|
|
|
24
24
|
envFileCandidates: ReadonlyArray<string>;
|
|
25
25
|
};
|
|
26
26
|
export declare function resolvePagesDir(root?: string): string;
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/pages/layout-resolution.d.ts
|
|
29
27
|
/** Resolve the layout chain for a component (innermost last) */
|
|
30
28
|
export declare function resolveLayoutChain(componentId: string, layouts: Array<LayoutDefinition>, componentPath?: string): Array<LayoutDefinition>;
|
|
31
29
|
/** Walk up directory tree to find closest _layouts/<name> */
|
|
@@ -36,8 +34,6 @@ export declare function resolveEffectiveLayoutChain(page: {
|
|
|
36
34
|
componentPath?: string;
|
|
37
35
|
layout?: string | false;
|
|
38
36
|
}, layouts: Array<LayoutDefinition>, namedLayouts: Array<NamedLayoutDefinition>): Array<LayoutDefinition | NamedLayoutDefinition>;
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/pages/scan.d.ts
|
|
41
37
|
type PageScanOptions = {
|
|
42
38
|
output?: "server" | "static";
|
|
43
39
|
paths?: ProjectPaths;
|
|
@@ -54,8 +50,6 @@ type PageScanOptions = {
|
|
|
54
50
|
*/
|
|
55
51
|
export declare function pageFileEnvironment(relativePath: string): RouteEnvironment | null;
|
|
56
52
|
export declare function scanPages(root: string, options?: PageScanOptions): Promise<PageScanResult>;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/pages/manifest.d.ts
|
|
59
53
|
/**
|
|
60
54
|
* Generates the component import map and layout tree as code strings.
|
|
61
55
|
* Used by both SSR renderer and client entry virtual modules.
|
|
@@ -67,8 +61,6 @@ export declare function scanPages(root: string, options?: PageScanOptions): Prom
|
|
|
67
61
|
* `matchRoute` takes a decoded pathname (see `decodePagePath`).
|
|
68
62
|
*/
|
|
69
63
|
export declare function generateComponentManifest(scan: PageScanResult, pagesDir: string): string;
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region src/pages/static-data.d.ts
|
|
72
64
|
type StaticPageDataBuildOptions = {
|
|
73
65
|
enabled: boolean;
|
|
74
66
|
fastPath: boolean;
|
|
@@ -77,13 +69,29 @@ type ResolveStaticPageDataBuildOptionsInput = {
|
|
|
77
69
|
publicDir?: string | false;
|
|
78
70
|
};
|
|
79
71
|
export declare function resolveStaticPageDataBuildOptions(root: string, options?: ResolveStaticPageDataBuildOptionsInput): StaticPageDataBuildOptions;
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/pages/plugin.d.ts
|
|
82
72
|
type PagesPluginContext = {
|
|
83
73
|
isDev: boolean;
|
|
84
74
|
scan: () => Promise<PageScanResult | null>;
|
|
85
75
|
};
|
|
76
|
+
/** The `prefetch` option of a framework adapter plugin. */
|
|
77
|
+
type PrefetchConfig = {
|
|
78
|
+
/** How a Link without its own `prefetch` prop prefetches. Accepts the same values. */
|
|
79
|
+
defaultStrategy?: LinkPrefetchValue;
|
|
80
|
+
hoverDelay?: number;
|
|
81
|
+
cacheFor?: CacheForInput;
|
|
82
|
+
};
|
|
83
|
+
/** Options of a framework adapter's pages plugin. */
|
|
86
84
|
type PagesPluginOptions = {
|
|
85
|
+
root?: string;
|
|
86
|
+
viewTransitions?: boolean;
|
|
87
|
+
prefetch?: PrefetchConfig;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* `prefetch` with its defaults: Links prefetch only when they ask to, with a 75 ms
|
|
91
|
+
* hover delay and a 30 second cache.
|
|
92
|
+
*/
|
|
93
|
+
export declare function resolvePrefetchConfig(prefetch: PrefetchConfig | undefined): Required<PrefetchConfig>;
|
|
94
|
+
type CreatePagesPluginOptions = {
|
|
87
95
|
name: string;
|
|
88
96
|
root?: string;
|
|
89
97
|
generateRenderer: (scan: PageScanResult, isDev: boolean) => string;
|
|
@@ -91,6 +99,5 @@ type PagesPluginOptions = {
|
|
|
91
99
|
config: (context: PagesPluginContext) => UserConfig | void | Promise<UserConfig | void>;
|
|
92
100
|
};
|
|
93
101
|
/** Shared Vite lifecycle; adapters own their generated code and environment configuration. */
|
|
94
|
-
export declare function createPagesPlugin(pagesDir: string, options:
|
|
95
|
-
|
|
96
|
-
export { type HeadConfig, type HeadDescriptor, type LayoutDefinition, type NamedLayoutDefinition, type PageDefinition, type PageScanResult, type StaticPageDataBuildOptions, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead, serializePageData };
|
|
102
|
+
export declare function createPagesPlugin(pagesDir: string, options: CreatePagesPluginOptions): Plugin;
|
|
103
|
+
export { type HeadConfig, type HeadDescriptor, type LayoutDefinition, type NamedLayoutDefinition, type PageDefinition, type PageScanResult, type PagesPluginOptions, type PrefetchConfig, type StaticPageDataBuildOptions, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead, serializePageData };
|
package/dist/pages/index.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "../dist-
|
|
2
|
-
import { r as resolvePagesDir } from "../project-paths-
|
|
3
|
-
import { p as readConfig } from "../config-
|
|
4
|
-
import { a as resolveLayoutChain, i as resolveEffectiveLayoutChain, n as scanPages, r as generateComponentManifest, s as resolveNamedLayout, t as pageFileEnvironment } from "../scan-
|
|
5
|
-
import { r as parseRedirectsFile } from "../headers
|
|
6
|
-
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-
|
|
7
|
-
import { r as serializePageData } from "../serialize-
|
|
1
|
+
import { a as join, n as dirname } from "../dist-DMYe8CZJ.mjs";
|
|
2
|
+
import { r as resolvePagesDir } from "../project-paths-CdGv9Tmi.mjs";
|
|
3
|
+
import { p as readConfig } from "../config-BITKQ3O6.mjs";
|
|
4
|
+
import { a as resolveLayoutChain, i as resolveEffectiveLayoutChain, n as scanPages, r as generateComponentManifest, s as resolveNamedLayout, t as pageFileEnvironment } from "../scan-X2rDDRNa.mjs";
|
|
5
|
+
import { r as parseRedirectsFile } from "../headers-CuTEdP9C.mjs";
|
|
6
|
+
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-5XPcnG-j.mjs";
|
|
7
|
+
import { r as serializePageData } from "../serialize-DUuYuaY3.mjs";
|
|
8
|
+
import { n as assertLinkPrefetchValue } from "../prefetch-Dx2jIbtg.mjs";
|
|
8
9
|
import { existsSync } from "node:fs";
|
|
9
10
|
import { normalizePath } from "vite";
|
|
10
|
-
|
|
11
|
+
// src/pages/static-data.ts
|
|
11
12
|
function resolveStaticPageDataBuildOptions(root, options = {}) {
|
|
12
13
|
const config = readConfig(root);
|
|
13
14
|
const enabled = config.output === "static";
|
|
@@ -24,10 +25,22 @@ function resolveStaticPageDataBuildOptions(root, options = {}) {
|
|
|
24
25
|
fastPath: enabled && !hasConfigRouting && !hasRedirectsFile
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
//#region src/pages/plugin.ts
|
|
28
|
+
// src/pages/plugin.ts
|
|
29
29
|
const RENDERER_ID = "virtual:void-pages-renderer";
|
|
30
30
|
const CLIENT_ENTRY_ID = "virtual:void-pages-client";
|
|
31
|
+
/**
|
|
32
|
+
* `prefetch` with its defaults: Links prefetch only when they ask to, with a 75 ms
|
|
33
|
+
* hover delay and a 30 second cache.
|
|
34
|
+
*/
|
|
35
|
+
function resolvePrefetchConfig(prefetch) {
|
|
36
|
+
const defaultStrategy = prefetch?.defaultStrategy ?? false;
|
|
37
|
+
assertLinkPrefetchValue(defaultStrategy, "prefetch.defaultStrategy");
|
|
38
|
+
return {
|
|
39
|
+
defaultStrategy,
|
|
40
|
+
hoverDelay: prefetch?.hoverDelay ?? 75,
|
|
41
|
+
cacheFor: prefetch?.cacheFor ?? "30s"
|
|
42
|
+
};
|
|
43
|
+
}
|
|
31
44
|
/** Shared Vite lifecycle; adapters own their generated code and environment configuration. */
|
|
32
45
|
function createPagesPlugin(pagesDir, options) {
|
|
33
46
|
let pageScan = null;
|
|
@@ -113,5 +126,4 @@ function createPagesPlugin(pagesDir, options) {
|
|
|
113
126
|
}
|
|
114
127
|
};
|
|
115
128
|
}
|
|
116
|
-
|
|
117
|
-
export { createPagesPlugin, generateComponentManifest, pageFileEnvironment, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveEffectiveLayoutChain, resolveHead, resolveLayoutChain, resolveNamedLayout, resolvePagesDir, resolveStaticPageDataBuildOptions, scanPages, serializePageData };
|
|
129
|
+
export { createPagesPlugin, generateComponentManifest, pageFileEnvironment, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveEffectiveLayoutChain, resolveHead, resolveLayoutChain, resolveNamedLayout, resolvePagesDir, resolvePrefetchConfig, resolveStaticPageDataBuildOptions, scanPages, serializePageData };
|