void 1.12.2 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{account-cmd-CdJQba_Q.mjs → account-cmd-4fQiXYX7.mjs} +6 -6
- package/dist/{application-analysis-DVeN8yoi.mjs → application-analysis-BjEwHTV2.mjs} +19 -13
- package/dist/{application-routing-KKw4Y84h.mjs → application-routing-COCfD2yc.mjs} +1 -1
- package/dist/args-DrnTI35r.mjs +88 -0
- package/dist/args-MnQnqypt.mjs +1 -0
- package/dist/{auth-CqwJwItO.mjs → auth-CeBmolb-.mjs} +3 -3
- package/dist/{auth-A7cZ8aXA.mjs → auth-CvaDxOMi.mjs} +1 -1
- package/dist/{auth-link-D9MWA_dj.mjs → auth-link-I4omV0pL.mjs} +6 -6
- package/dist/{auth-router-FskgTU3B.mjs → auth-router-CXq4q7bb.mjs} +6 -5
- package/dist/{better-auth-shared-BS3pDQbT.d.mts → better-auth-shared-CrIkcN8I.d.mts} +2 -1
- package/dist/bindings-C7zOgxT3.d.mts +28 -0
- package/dist/browser-run-BKgZVwLk.mjs +124 -0
- package/dist/{build-cmd-B7OJ0U5R.mjs → build-cmd-Biz6u4rn.mjs} +6 -6
- package/dist/{cache-wSpi3aeM.mjs → cache-WkLMUrjQ.mjs} +6 -6
- package/dist/{cancel-deploy-DMWzkAlb.mjs → cancel-deploy-BRsrmyTk.mjs} +6 -5
- package/dist/{cf-access-DHklo7Rg.mjs → cf-access-B21j-nd6.mjs} +1 -1
- package/dist/{cf-build-output-Cso7Vh-t.mjs → cf-build-output-G-7Tdd8b.mjs} +6 -5
- package/dist/cf-build-output-Qc43LWzE.mjs +1 -0
- package/dist/{cf-command-values-5BPBRc9Z.mjs → cf-command-values-cUnJwCyG.mjs} +24 -1
- package/dist/{cf-config-migrate-D271BTiw.mjs → cf-config-migrate-CsbQGzMf.mjs} +200 -94
- package/dist/cf-user-agent-HHTRzfud.mjs +15 -0
- package/dist/cf-version-api-BWHMVtzw.mjs +1 -0
- package/dist/cf-version-api-XEEK2B9A.mjs +856 -0
- package/dist/cf-worker-settings-DJKdy97k.mjs +127 -0
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/cloudflare-operation-process.mjs +111 -47
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/cli/json-command-process.d.mts +6 -0
- package/dist/cli/json-command-process.mjs +91 -0
- package/dist/{cli-main-DaLrQfPS.mjs → cli-main-CJTGhcYN.mjs} +84 -113
- package/dist/{client-eLZwqkPH.mjs → client-0um7Lzze.mjs} +1 -1
- package/dist/{client-DE2m2ldh.mjs → client-BEHI4UWn.mjs} +14 -8
- package/dist/{cloudflare-auth-eWfhdZCk.mjs → cloudflare-auth-iOgRurWm.mjs} +1 -1
- package/dist/{cloudflare-cmd-SsFlJe2B.mjs → cloudflare-cmd-DsSlXbNy.mjs} +5 -5
- package/dist/{cloudflare-config-D9UFH_A5.mjs → cloudflare-config-KPHKf57C.mjs} +2 -2
- package/dist/{cloudflare-connect-BgpHcSg3.mjs → cloudflare-connect-bEtneBjT.mjs} +5 -4
- package/dist/{cloudflare-operations-ByjFGats.mjs → cloudflare-operations-BmICrRnm.mjs} +1 -1
- package/dist/{cloudflare-operations-BIRQkYwL.mjs → cloudflare-operations-D-9psgPQ.mjs} +19 -11
- package/dist/cloudflare-preview-8eLSQPdO.mjs +1 -0
- package/dist/cloudflare-preview-BaeU-m74.mjs +112 -0
- package/dist/{cloudflare-process-60r4Z2Zf.mjs → cloudflare-process-DFNpqV_m.mjs} +57 -29
- package/dist/cloudflare-user-output-DFbD0l4l.mjs +36 -0
- package/dist/collect-Aam0GwAU.mjs +1 -0
- package/dist/{collect-rNLybAnF.mjs → collect-KC4cizWM.mjs} +6 -1
- package/dist/{config-DA6ZbLXO.d.mts → config-BdmM5ZzP.d.mts} +12 -2
- package/dist/{config-BFX5ZB1J.mjs → config-CUYGZqdN.mjs} +2 -2
- package/dist/{config-BSoW3QCB.mjs → config-C_UjzkVS.mjs} +3 -3
- package/dist/{config-DtjrUtPo.mjs → config-Ge-MytMU.mjs} +1 -1
- package/dist/{config-Dv5jri1-.mjs → config-KZAiI3gG.mjs} +32 -6
- package/dist/config-entry.d.mts +1 -1
- package/dist/config-write-dKLINlm2.mjs +80 -0
- package/dist/{connect-WG4TcR_d.mjs → connect-Bqq3b9sX.mjs} +10 -9
- package/dist/{create-project-CbuDH5Hv.mjs → create-project-MXoP_rte.mjs} +1 -1
- package/dist/{create-project-8FdN6D2i.mjs → create-project-T-9AIQDe.mjs} +7 -6
- package/dist/{db-BSuWV1PI.mjs → db-B3eoVDNA.mjs} +50 -47
- package/dist/{db-args-CiQVg8SJ.mjs → db-args-BcvTZ8KE.mjs} +1 -1
- package/dist/db-args-Cx1y4vZn.mjs +1 -0
- package/dist/{db-types-B4Cf9dzR.mjs → db-types-BpgXVtQZ.mjs} +1 -1
- package/dist/{delete-WtLEfap2.mjs → delete-Cf6SroAw.mjs} +7 -6
- package/dist/deploy-DZ9j7MC4.mjs +2 -0
- package/dist/{deploy-DtJeunLF.mjs → deploy-UojYUEWr.mjs} +803 -1415
- package/dist/{deploy-managed-static-BWBsxOww.mjs → deploy-managed-static-DV_OmTWf.mjs} +54 -393
- package/dist/{deploy-security-notice-IRGy6Edf.mjs → deploy-security-notice-3jX71IeP.mjs} +6 -4
- package/dist/deploy-summary-Dkl0zvQy.mjs +377 -0
- package/dist/{deploy-transport-BKP_oV9q.mjs → deploy-transport-4ISWxx8n.mjs} +4 -3
- package/dist/deploy.mjs +14 -10
- package/dist/discover-BZWVWeQs.mjs +1 -0
- package/dist/{discover-IcspacCg.mjs → discover-BeFs7OPS.mjs} +1 -1
- package/dist/{dispatch-DIhDA3NI.mjs → dispatch-BUKbPdqb.mjs} +7 -7
- package/dist/{dist-Cr_xGE_K.mjs → dist-BngS28id.mjs} +6 -6
- package/dist/{dist-C47zy_kJ.mjs → dist-x99fIj4n.mjs} +1 -1
- package/dist/{domain-mweyYXSw.mjs → domain-BK6NWkWK.mjs} +7 -7
- package/dist/{drizzle-BJDMPrj7.mjs → drizzle-CnSbVeiZ.mjs} +12 -13
- package/dist/{drizzle-CQ5jWuDL.mjs → drizzle-CrkwVwK8.mjs} +1 -1
- package/dist/{email-DoDqRH6i.mjs → email-BBSDV0J5.mjs} +13 -12
- package/dist/{email-cloudflare-DeYH3Ke7.mjs → email-cloudflare-C-guKEbz.mjs} +10 -8
- package/dist/{env-DaAoYR2-.mjs → env-BVnKiGYJ.mjs} +8 -8
- package/dist/{env-EjHqc7m9.mjs → env-CU2tMDdO.mjs} +6 -1
- package/dist/{env-types-D2hBodXP.mjs → env-types-B33fEHRH.mjs} +1 -1
- package/dist/{env-validation-j9pjCDfA.mjs → env-validation-BnAsx6gz.mjs} +1 -1
- package/dist/{env-validation-D-v5_CWL.mjs → env-validation-SXsjd6-Z.mjs} +4 -4
- package/dist/{fetch-CiEsvjpP.mjs → fetch-DL7OCgwB.mjs} +1 -1
- package/dist/{fetch-stream-BIG5lHW6.mjs → fetch-stream-DEilLTCc.mjs} +2 -2
- package/dist/{gen-aOtHhZLD.mjs → gen-BxuIN1bz.mjs} +10 -9
- package/dist/gen-DaayFP9v.mjs +1 -0
- package/dist/{generate-Dq2Bgw75.mjs → generate-Ck-L3e0e.mjs} +1 -1
- package/dist/{generate-C3ZAqCy-.mjs → generate-t1dDUYZZ.mjs} +1 -1
- package/dist/{github-cmd-BR19Ffdz.mjs → github-cmd-B7U9Hjmi.mjs} +7 -6
- package/dist/{handler-DCrDLzw2.mjs → handler-2wAywJgj.mjs} +11 -9
- package/dist/{headers-DqBsjDxg.mjs → headers-DPI4MDGC.mjs} +1 -1
- package/dist/{help-DvClCzqL.mjs → help-Bgiu5PMX.mjs} +36 -4
- package/dist/help-DWGHmt_n.mjs +1 -0
- package/dist/html-5sfGLjiI.d.mts +3 -0
- package/dist/html-DPSOBDCh.mjs +1 -0
- package/dist/{index-Dn2mkPr2.d.mts → index-CqF8_p9C.d.mts} +5 -105
- package/dist/index-Cvqotnhc.d.mts +91 -0
- package/dist/{index-BQ5qYiAw.d.mts → index-DAinHkj8.d.mts} +1 -1
- package/dist/{index-8cAgNdb6.d.mts → index-lnEWwVAS.d.mts} +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +536 -170
- package/dist/{info-P6MBiVJi.mjs → info-7COlpAfY.mjs} +32 -20
- package/dist/{init-B2VZ2Hut.mjs → init-DftAx3L4.mjs} +237 -88
- package/dist/input-jcps6lAn.mjs +64 -0
- package/dist/interactive-prompts-EK0dilFu.mjs +43 -0
- package/dist/{limits-BCoQLpn3.mjs → limits-3I3VdX2E.mjs} +4 -1
- package/dist/{link-Dyz9IGcM.mjs → link-C3WMNFTG.mjs} +7 -7
- package/dist/{list-VGYBMjmx.mjs → list-K4EGVUZN.mjs} +9 -9
- package/dist/{load-user-env-B8qC0Q2Y.mjs → load-user-env-uMmQJ-Th.mjs} +1 -1
- package/dist/{local-d1-CYOYkVwO.mjs → local-d1-BtLCVC1p.mjs} +2 -2
- package/dist/login-BJwPhV_S.mjs +1 -0
- package/dist/{login-jUBgfvzk.mjs → login-DaugBfBG.mjs} +6 -5
- package/dist/{logs-kS1wuR4b.mjs → logs-BR2szdN5.mjs} +6 -6
- package/dist/migrate-BHD46A31.mjs +1 -0
- package/dist/{migrate-BNZL1hee.mjs → migrate-Dtlg8fC6.mjs} +7 -7
- package/dist/nitro.mjs +3 -3
- package/dist/{node-DVJWfV6s.mjs → node-BbKlLpHa.mjs} +5 -5
- package/dist/{operator-ai-logging-DD0n6zc2.mjs → operator-ai-logging-4Nvs6Ut3.mjs} +5 -5
- package/dist/{operator-args-nvetCWuz.mjs → operator-args-DWvqq3Ws.mjs} +31 -15
- package/dist/{operator-auth-DMvn-y9X.mjs → operator-auth-DtRMGXYY.mjs} +2 -2
- package/dist/{operator-client-dFNnXfyB.mjs → operator-client-BG0VIMMM.mjs} +2 -2
- package/dist/operator-cmd-CR3Q9k4c.mjs +1 -0
- package/dist/{operator-cmd-wML5HNfS.mjs → operator-cmd-D4YcMKO-.mjs} +9 -9
- package/dist/{operator-security-D5MToU0p.mjs → operator-security-nVLo8vDt.mjs} +11 -5
- package/dist/{output-BZLnu0z8.mjs → output-DhJgS6Ve.mjs} +1 -1
- package/dist/output-OYwcEwok.mjs +1 -0
- package/dist/pages/client.d.mts +34 -20
- package/dist/pages/client.mjs +172 -74
- package/dist/pages/index.d.mts +11 -4
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +2 -2
- package/dist/pages/islands-plugin.mjs +5 -3
- package/dist/pages/protocol.d.mts +3 -3
- package/dist/pages/protocol.mjs +3 -3
- package/dist/pages/serialize.d.mts +2 -2
- package/dist/pages/serialize.mjs +1 -1
- package/dist/parse-filename-DIPUjoCh.d.mts +2 -0
- package/dist/platform-C3Q44RJ8.mjs +250 -0
- package/dist/platform-args-BSyVZESg.mjs +1 -0
- package/dist/{platform-args-CvZSuhYS.mjs → platform-args-BnocJDC_.mjs} +1 -1
- package/dist/{platform-auth-config-Bv3oQ2gE.mjs → platform-auth-config-BbfNhjBc.mjs} +9 -9
- package/dist/{platform-auth-protection-OqzfhXwx.mjs → platform-auth-protection-BHPV4MUf.mjs} +9 -8
- package/dist/{platform-auth-recovery-rmIYjXST.mjs → platform-auth-recovery-DE0nArYy.mjs} +8 -7
- package/dist/{platform-cmd-D_4z2Ijv.mjs → platform-cmd-CLRU3BRb.mjs} +11 -10
- package/dist/{platform-cmd-B3rO4RhU.mjs → platform-cmd-Cs2LkT5L.mjs} +1 -1
- package/dist/{platform-discovery-CLxtixHJ.mjs → platform-discovery-CKeeeD82.mjs} +1 -1
- package/dist/{platform-domain-CUq9odbd.mjs → platform-domain-kn3WuKPG.mjs} +6 -5
- package/dist/{platform-lifecycle-DOSYo0UI.mjs → platform-lifecycle-BoCEYy2w.mjs} +1 -1
- package/dist/{platform-lifecycle-DuoVruij.mjs → platform-lifecycle-CKwOg8wz.mjs} +164 -72
- package/dist/{platform-management-D_gt3qLb.mjs → platform-management-CaSdFthX.mjs} +1 -1
- package/dist/{platform-management-MmO9IubR.mjs → platform-management-fyrsq2Ra.mjs} +27 -14
- package/dist/{platform-plans-config-DiydtNKY.mjs → platform-plans-config-BSI-6Inu.mjs} +11 -5
- package/dist/{platform-recovery-P_FVslfd.mjs → platform-recovery-PwJ54AIZ.mjs} +3 -3
- package/dist/{platform-registry-DHH6fivm.mjs → platform-registry-zHH3RiIm.mjs} +2 -1
- package/dist/{platform-setup-Lph9i-rh.mjs → platform-setup-DwYITHfY.mjs} +3 -3
- package/dist/{plugin-inference-COlq96WJ.mjs → plugin-inference-D5MjBVMB.mjs} +60 -142
- package/dist/prepare-CLl_TA_r.mjs +1 -0
- package/dist/{prepare-WvijE289.mjs → prepare-DZEs5AGr.mjs} +3 -3
- package/dist/{prepare-co1o1FFd.mjs → prepare-DhVzN7CB.mjs} +14 -12
- package/dist/{project-uXKua1it.mjs → project-BXpm-vgG.mjs} +1 -1
- package/dist/{project-dh9431bN.mjs → project-DC-BqHef.mjs} +1 -1
- package/dist/{project-cmd-BWJTplpc.mjs → project-cmd-BKN3qT4R.mjs} +31 -21
- package/dist/{project-paths-2ENfCCih.mjs → project-paths-BeAxxqGh.mjs} +1 -1
- package/dist/{project-security-BV1xfj1K.mjs → project-security-B-SHxprt.mjs} +1 -1
- package/dist/{project-security-CY_aahvW.mjs → project-security-BWTd6cTU.mjs} +87 -46
- package/dist/{project-team-BlIFXlmT.mjs → project-team-jcn9reIB.mjs} +6 -6
- package/dist/{project-token-CMsB7I1-.mjs → project-token-BHkBKtzt.mjs} +6 -6
- package/dist/{project-tsconfig-BOA4ym99.mjs → project-tsconfig-LjgxDdj_.mjs} +1 -1
- package/dist/{project-zero-trust-BI6pdpx4.mjs → project-zero-trust-2t_qI6xa.mjs} +4 -4
- package/dist/{protocol-4rEnumif.mjs → protocol-DhMbnxzy.mjs} +120 -35
- package/dist/{protocol-ERy-n3jf.d.mts → protocol-wG7JP5Mm.d.mts} +27 -4
- package/dist/{provision-DFv7SJDn.mjs → provision-C04aXE3a.mjs} +1 -1
- package/dist/{provision-Bh44omGA.mjs → provision-CQykn8gu.mjs} +8 -4
- package/dist/{redirect-Dyvuil0Q.mjs → redirect-DjyA_hx_.mjs} +1 -1
- package/dist/{requests-CfmJxNYg.mjs → requests-BznxnxTT.mjs} +5 -5
- package/dist/resolve-project-Bob_rEi2.mjs +1 -0
- package/dist/{resolve-project-8WZ3iVmr.mjs → resolve-project-s_FGWyr-.mjs} +2 -2
- package/dist/resource-binding-5nI30acw.mjs +20 -0
- package/dist/{resource-name-DlJ9QXzg.mjs → resource-name-D_gw36kh.mjs} +5 -1
- package/dist/{rollback-DL5HuAsM.mjs → rollback-CLiINtpt.mjs} +25 -14
- package/dist/{route-types-CSed9-Dp.mjs → route-types-DxvqN5bL.mjs} +59 -9
- package/dist/{route-url-B41eQ8QI.mjs → route-url-CRC8yR_2.mjs} +2 -3
- package/dist/{route-url-Bd6IX-JZ.d.mts → route-url-zDfC-7DD.d.mts} +33 -5
- package/dist/routes-stub.d.mts +18 -2
- package/dist/routes-stub.mjs +1 -1
- package/dist/{runner-CeguHWJx.mjs → runner-CnUrhc8H.mjs} +1 -1
- package/dist/{runner-mysql-DOjbj-N1.mjs → runner-mysql-CW6bFa67.mjs} +1 -1
- package/dist/{runner-mysql-D549vGGm.mjs → runner-mysql-DSLGFOlC.mjs} +1 -1
- package/dist/{runner-pg-Buzw17hl.mjs → runner-pg-BcGF7iBR.mjs} +1 -1
- package/dist/{runner-pg-DMJquR3d.mjs → runner-pg-OeP0JpEo.mjs} +1 -1
- package/dist/{runner-Bf94YVJK.mjs → runner-rnXCGa20.mjs} +1 -1
- package/dist/runtime/ai/index.mjs +1 -1
- package/dist/runtime/auth/better-auth-d1.d.mts +1 -1
- package/dist/runtime/auth/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/auth/better-auth-postgres.d.mts +1 -1
- package/dist/runtime/client/fetch-server.mjs +1 -1
- package/dist/runtime/client/fetch-stream.mjs +1 -1
- package/dist/runtime/client/fetch.mjs +1 -1
- package/dist/runtime/client/index.mjs +2 -2
- package/dist/runtime/client/react.mjs +2 -2
- package/dist/runtime/client/solid.mjs +2 -2
- package/dist/runtime/client/svelte.mjs +2 -2
- package/dist/runtime/client/vue.mjs +2 -2
- package/dist/runtime/durable/index.mjs +11 -26
- package/dist/runtime/env/runtime.d.mts +2 -10
- package/dist/runtime/handler/index.d.mts +3 -2
- package/dist/runtime/handler/index.mjs +2 -2
- package/dist/runtime/handler/validator.d.mts +1 -1
- package/dist/runtime/handler/validator.mjs +1 -1
- package/dist/runtime/html.d.mts +2 -0
- package/dist/runtime/html.mjs +1 -0
- package/dist/runtime/image/index.d.mts +103 -0
- package/dist/runtime/image/index.mjs +89 -0
- package/dist/runtime/jsx/index.d.mts +3 -0
- package/dist/runtime/jsx/index.mjs +2 -0
- package/dist/runtime/jsx/jsx-dev-runtime.d.mts +1 -0
- package/dist/runtime/jsx/jsx-dev-runtime.mjs +2 -0
- package/dist/runtime/jsx/jsx-runtime.d.mts +1 -0
- package/dist/runtime/jsx/jsx-runtime.mjs +2 -0
- package/dist/runtime/limits/index.mjs +1 -1
- package/dist/runtime/live/client.d.mts +2 -2
- package/dist/runtime/live/index.d.mts +1 -1
- package/dist/runtime/routing/index.d.mts +87 -4
- package/dist/runtime/routing/index.mjs +59 -20
- package/dist/runtime/routing/route-url.d.mts +2 -2
- package/dist/runtime/routing/route-url.mjs +1 -1
- package/dist/runtime/sandbox/index.mjs +1 -1
- package/dist/runtime/sse/client.d.mts +1 -1
- package/dist/runtime/workflows/entry.d.mts +8 -0
- package/dist/runtime/workflows/entry.mjs +49 -0
- package/dist/runtime/workflows/index.d.mts +3 -0
- package/dist/runtime/workflows/index.mjs +77 -0
- package/dist/runtime/ws/index.d.mts +1 -1
- package/dist/runtime/ws/index.mjs +2 -2
- package/dist/runtime/ws/room.d.mts +1 -1
- package/dist/runtime/ws/server.d.mts +2 -2
- package/dist/runtime-Db72hLY-.d.mts +11 -0
- package/dist/scan-BxhB4BA-.mjs +946 -0
- package/dist/scan-D2ISAobj.mjs +308 -0
- package/dist/{secret-C-WBaUSS.mjs → secret-Ck9N5xbU.mjs} +9 -8
- package/dist/{security-sarif-ClyYwtAW.mjs → security-sarif-DzTIqNwZ.mjs} +1 -1
- package/dist/{serialize-DN-envGQ.d.mts → serialize-Dr9B-0yV.d.mts} +10 -1
- package/dist/{serialize-BmB4BfKu.mjs → serialize-nW4IeEBI.mjs} +23 -2
- package/dist/{skills-C-csz78e.mjs → skills-BR7YHAF7.mjs} +1 -1
- package/dist/{scan-Ct_SEzH4.mjs → source-analysis-cache-Ccm_JSOl.mjs} +340 -902
- package/dist/standard-schema-DvMcZGMK.mjs +8 -0
- package/dist/{subcommand-prompt-B4LOLosl.mjs → subcommand-prompt-AFf2LcrC.mjs} +2 -2
- package/dist/{types-FDH6NuY1.d.mts → types-RYVujNS6.d.mts} +4 -2
- package/dist/{version-metadata-DqgLa6gc.mjs → untrusted-env-4oW0TdBP.mjs} +1 -23
- package/dist/{url-DBQluotE.mjs → url-DAQ1c3lh.mjs} +45 -1
- package/dist/{validate-CtBWCzez.mjs → validate-B1PsQ_mt.mjs} +1 -1
- package/dist/validate-p9b3r1k4.mjs +1 -0
- package/dist/{validation-error-CtcAvyI7.mjs → validation-error-EKI0wMWX.mjs} +2 -2
- package/dist/{validator-Dfh9kCDm.mjs → validator-JJcf9E48.mjs} +5 -8
- package/dist/version-metadata-CEla0kgi.mjs +23 -0
- package/dist/{wrangler-DVe5KV5G.mjs → wrangler-AyMfdVJK.mjs} +34 -69
- package/dist/wrangler-BT7qrzWc.mjs +1 -0
- package/dist/{wrapper-CcMYpOS8.mjs → wrapper-DPlTBVOx.mjs} +5 -5
- package/docs/guide/ai.md +1 -1
- package/docs/guide/app-types.md +6 -23
- package/docs/guide/auth.md +2 -4
- package/docs/guide/database/d1.md +21 -67
- package/docs/guide/database/mysql.md +8 -0
- package/docs/guide/database/postgresql.md +2 -2
- package/docs/guide/database.md +1 -1
- package/docs/guide/deployment.md +18 -0
- package/docs/guide/edge/prerendering.md +3 -7
- package/docs/guide/edge/redirects.md +1 -1
- package/docs/guide/edge/revalidation.md +8 -17
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/edge/static-assets.md +10 -22
- package/docs/guide/email/domains.md +3 -1
- package/docs/guide/email/receiving.md +2 -2
- package/docs/guide/email/sending.md +3 -1
- package/docs/guide/env-vars.md +2 -0
- package/docs/guide/image-generation.md +142 -0
- package/docs/guide/index.md +17 -15
- package/docs/guide/jobs.md +2 -4
- package/docs/guide/kv.md +1 -1
- package/docs/guide/og-images.md +83 -0
- package/docs/guide/pages-routing/actions-and-forms.md +6 -4
- package/docs/guide/pages-routing/errors.md +20 -4
- package/docs/guide/pages-routing/head.md +5 -5
- package/docs/guide/pages-routing/islands.md +4 -14
- package/docs/guide/pages-routing/markdown.md +2 -2
- package/docs/guide/pages-routing/overview.md +129 -15
- package/docs/guide/platform/administration/plans.md +47 -16
- package/docs/guide/platform/administration/projects.md +10 -0
- package/docs/guide/platform/administration/security-audits.md +76 -30
- package/docs/guide/platform/administration/zero-trust.md +1 -1
- package/docs/guide/platform/installation/ci.md +0 -4
- package/docs/guide/platform/installation/credentials.md +1 -1
- package/docs/guide/platform/installation/maintenance.md +10 -10
- package/docs/guide/platform/installation/prerequisites.md +3 -1
- package/docs/guide/platform/installation/setup.md +7 -15
- package/docs/guide/platform/installation/uninstall.md +6 -12
- package/docs/guide/project-collaboration.md +1 -4
- package/docs/guide/queues.md +6 -8
- package/docs/guide/quickstart.md +6 -8
- package/docs/guide/sandboxes.md +1 -1
- package/docs/guide/self-hosted-platform.md +4 -7
- package/docs/guide/server-routing.md +5 -3
- package/docs/guide/ssg.md +1 -1
- package/docs/guide/type-safety.md +74 -10
- package/docs/guide/websockets.md +5 -7
- package/docs/guide/workflows.md +122 -0
- package/docs/index.md +2 -3
- package/docs/integrations/agents.md +3 -16
- package/docs/integrations/cloudflare.md +98 -2
- package/docs/integrations/frameworks/analog.md +9 -11
- package/docs/integrations/frameworks/astro.md +16 -17
- package/docs/integrations/frameworks/nuxt.md +11 -13
- package/docs/integrations/frameworks/overview.md +18 -20
- package/docs/integrations/frameworks/react-router.md +55 -6
- package/docs/integrations/frameworks/sveltekit.md +8 -6
- package/docs/integrations/frameworks/tanstack-start.md +10 -6
- package/docs/integrations/hono.md +27 -12
- package/docs/integrations/nodejs-bun-deno.md +10 -2
- package/docs/reference/api/database.md +8 -10
- package/docs/reference/api/env.md +2 -2
- package/docs/reference/api/handlers.md +1 -1
- package/docs/reference/api/html.md +45 -0
- package/docs/reference/api/pages.md +118 -167
- package/docs/reference/api/rewrites.md +5 -5
- package/docs/reference/api/types.md +13 -6
- package/docs/reference/api/workflows.md +48 -0
- package/docs/reference/api.md +7 -1
- package/docs/reference/cli/database.md +22 -10
- package/docs/reference/cli/deploy.md +49 -4
- package/docs/reference/cli/domains.md +7 -3
- package/docs/reference/cli/email.md +3 -1
- package/docs/reference/cli/platform-installation.md +9 -53
- package/docs/reference/cli/platform-security.md +36 -8
- package/docs/reference/cli/platform-users.md +11 -1
- package/docs/reference/cli/platform-zero-trust.md +1 -1
- package/docs/reference/cli/project.md +52 -11
- package/docs/reference/cli/setup.md +8 -10
- package/docs/reference/cli.md +49 -47
- package/docs/reference/config.md +22 -8
- package/docs/reference/resource-inference.md +8 -1
- package/docs/reference/structure.md +5 -0
- package/package.json +52 -25
- package/schema.json +20 -1
- package/skills/void/SKILL.md +60 -54
- package/dist/cf-build-output-Wpk_e5CI.mjs +0 -1
- package/dist/cf-worker-settings-BBdlhm9U.mjs +0 -41
- package/dist/cli/db-execute-process.d.mts +0 -2
- package/dist/cli/db-execute-process.mjs +0 -57
- package/dist/cloudflare-user-output-CCR99eQY.mjs +0 -19
- package/dist/collect-B6nlSnsb.mjs +0 -1
- package/dist/db-args-BvMwAber.mjs +0 -1
- package/dist/deploy-GT4CW5fs.mjs +0 -2
- package/dist/discover-D2KGP3cR.mjs +0 -1
- package/dist/entry-Bwb9ev8K.mjs +0 -113
- package/dist/gen-vhBDHs3q.mjs +0 -1
- package/dist/help-fKPzcTJv.mjs +0 -1
- package/dist/isr-config-DiTnL9Tb.mjs +0 -115
- package/dist/login-BbSQTZ6d.mjs +0 -1
- package/dist/migrate-C9aoWLvY.mjs +0 -1
- package/dist/operator-cmd-jnjzuJKX.mjs +0 -1
- package/dist/output-D7K9TWIA.mjs +0 -1
- package/dist/platform-args-CMwMoiLp.mjs +0 -1
- package/dist/prepare-DcwigRUS.mjs +0 -1
- package/dist/providers-D5P8j_8D.d.mts +0 -5
- package/dist/resolve-project-YsTH-U9I.mjs +0 -1
- package/dist/static-exports-s7P86Ngp.mjs +0 -354
- package/dist/validate-CZYUIfR-.mjs +0 -1
- package/dist/wrangler-Dq269bjx.mjs +0 -1
- package/docs/guide/platform/development/local.md +0 -120
- package/docs/guide/platform/development/runtime.md +0 -115
- package/docs/guide/platform/development/schema-ci.md +0 -44
- package/docs/guide/platform-development.md +0 -16
package/dist/pages/client.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as PageObject } from "../protocol-
|
|
1
|
+
import { f as interpolateRouteParams, m as toUrlString } from "../route-url-zDfC-7DD.mjs";
|
|
2
|
+
import { t as PageObject } from "../protocol-wG7JP5Mm.mjs";
|
|
3
3
|
import { t as BoundaryManifest } from "../boundary-plans-CRmWH68v.mjs";
|
|
4
4
|
import { a as LinkPrefetchValue, i as LinkPrefetchStrategy, n as CacheForInput, r as CacheForResult } from "../prefetch-UINRrqL4.mjs";
|
|
5
|
-
import { n as ErrorPageProps, o as PageError } from "../types-
|
|
5
|
+
import { n as ErrorPageProps, o as PageError } from "../types-RYVujNS6.mjs";
|
|
6
6
|
import { UsageLimitData } from "@void/edge";
|
|
7
7
|
import { ActionUrl, Href, ResolveActionBody, ResolveActionParams, RouteUrl, RouteUrlInput } from "void/routes";
|
|
8
8
|
type ActionErrorHandlingScope = "callSite" | "boundary";
|
|
@@ -91,6 +91,8 @@ type PageNavigationEngineConfig<Component = unknown> = {
|
|
|
91
91
|
prefetchDefaultStrategy?: LinkPrefetchValue;
|
|
92
92
|
/** Reuse successful GET page shells on later visits, refreshing stale shells in the background. */
|
|
93
93
|
cacheVisitedPageData?: boolean;
|
|
94
|
+
/** Restore saved scroll positions on back/forward and reload. Defaults to `true`. */
|
|
95
|
+
scrollRestoration?: boolean;
|
|
94
96
|
};
|
|
95
97
|
type PageNavigationResult<Component = unknown> = {
|
|
96
98
|
pageData: PageData;
|
|
@@ -164,6 +166,12 @@ type BaseLinkProps = {
|
|
|
164
166
|
activeMatch?: LinkActiveMatch;
|
|
165
167
|
onNavigate?: (event: LinkNavigateEvent) => void;
|
|
166
168
|
};
|
|
169
|
+
type LinkStatusOptions = Pick<BaseLinkProps, "method" | "data" | "activeMatch">;
|
|
170
|
+
type LinkStatus = {
|
|
171
|
+
current: boolean;
|
|
172
|
+
active: boolean;
|
|
173
|
+
pending: boolean;
|
|
174
|
+
};
|
|
167
175
|
type ResolvedLink = {
|
|
168
176
|
method: NavigationMethod;
|
|
169
177
|
isGet: boolean;
|
|
@@ -179,23 +187,22 @@ export declare function resolveLink(props: Pick<BaseLinkProps, "href" | "method"
|
|
|
179
187
|
* `defaultStrategy`, but only when it is a GET link, the only kind that can prefetch.
|
|
180
188
|
*/
|
|
181
189
|
export declare function linkPrefetchStrategies(props: Pick<BaseLinkProps, "prefetch" | "reloadDocument">, link: Pick<ResolvedLink, "isGet">, defaultStrategy?: LinkPrefetchValue): ReadonlyArray<LinkPrefetchStrategy>;
|
|
190
|
+
/** Reads the same current, active and pending state used by a Link with these props. */
|
|
191
|
+
export declare function getLinkStatus(router: VoidRouter | null | undefined, navigation: NavigationState | null | undefined, href: Href, { method, data, activeMatch }?: LinkStatusOptions): LinkStatus;
|
|
192
|
+
/** Like getLinkStatus(), for a link an adapter has already resolved. */
|
|
193
|
+
export declare function getResolvedLinkStatus(router: VoidRouter | null | undefined, navigation: NavigationState | null | undefined, link: ResolvedLink, match?: LinkActiveMatch): LinkStatus;
|
|
194
|
+
/** Compares statuses by value so fine-grained adapters skip unchanged notifications. */
|
|
195
|
+
export declare function linkStatusEquals(a: LinkStatus, b: LinkStatus): boolean;
|
|
196
|
+
/** Returns true for the current page and, with prefix matching, its parent paths. */
|
|
197
|
+
export declare function isLinkActive(router: VoidRouter | null | undefined, href: Href, options?: LinkStatusOptions): boolean;
|
|
182
198
|
/**
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
* getPath. A link with a query also needs each of its params, with the same value,
|
|
186
|
-
* in the current URL, which may have more params in any order. GET data counts as
|
|
187
|
-
* query, and the hash is ignored. `prefix` also matches nested pages by whole
|
|
188
|
-
* segment, except for `/`, comparing only the path, but only an exact match is
|
|
189
|
-
* `aria-current`. Spread the result before the user's attributes so theirs win.
|
|
199
|
+
* Returns true during a visit with the link's method, path, full query and hash.
|
|
200
|
+
* Takes the same options as isLinkActive(); `activeMatch` doesn't change pending.
|
|
190
201
|
*/
|
|
202
|
+
export declare function isLinkPending(router: VoidRouter | null | undefined, navigation: NavigationState | null | undefined, href: Href, options?: LinkStatusOptions): boolean;
|
|
203
|
+
/** Spread before authored attributes so the user's values win. */
|
|
204
|
+
export declare function linkStatusAttributes(status: LinkStatus): LinkActiveAttributes & LinkPendingAttributes;
|
|
191
205
|
export declare function linkActiveAttributes(router: VoidRouter | null | undefined, link: ResolvedLink, match?: LinkActiveMatch): LinkActiveAttributes;
|
|
192
|
-
/**
|
|
193
|
-
* Marks a link while a visit to its destination is loading: the visit uses the link's
|
|
194
|
-
* method and goes to its path, query and hash. Unlike active links, the whole query and
|
|
195
|
-
* the hash count, so `?tab=open` isn't pending during a visit to `?tab=open&page=2`.
|
|
196
|
-
* Every link to the destination is marked, not only the one that was clicked.
|
|
197
|
-
* Spread the result before the user's attributes so theirs win.
|
|
198
|
-
*/
|
|
199
206
|
export declare function linkPendingAttributes(router: VoidRouter | null | undefined, navigation: NavigationState | null | undefined, link: ResolvedLink): LinkPendingAttributes;
|
|
200
207
|
/** Link's automatic prefetch. `router.prefetch()` called directly is not limited by the connection. */
|
|
201
208
|
export declare function prefetchLink(router: VoidRouter | null | undefined, href: Href, cacheFor: CacheForInput | undefined): void;
|
|
@@ -345,7 +352,10 @@ export type VoidRouter = {
|
|
|
345
352
|
_prefetchDefaultStrategy?: LinkPrefetchValue;
|
|
346
353
|
readonly url: URL;
|
|
347
354
|
readonly path: string;
|
|
355
|
+
/** Raw query string values of the current URL, unparsed. */
|
|
348
356
|
readonly query: URLSearchParams;
|
|
357
|
+
/** Parsed query of the rendered page, read by `usePageQuery()`. */
|
|
358
|
+
readonly _pageQuery?: Record<string, unknown>;
|
|
349
359
|
readonly params: Record<string, string>;
|
|
350
360
|
visit(url: RouteUrlInput, options?: VisitOptions): Promise<unknown>;
|
|
351
361
|
refresh(options?: VisitOptions): Promise<unknown>;
|
|
@@ -364,8 +374,12 @@ export type VoidRouterConfig = Omit<PageNavigationEngineConfig, "adapter"> & {
|
|
|
364
374
|
onNavigationChange?(navigation: NavigationState): void;
|
|
365
375
|
};
|
|
366
376
|
export declare function idleNavigationState(): NavigationState;
|
|
367
|
-
export declare function
|
|
368
|
-
|
|
377
|
+
export declare function readPageQuery(router: VoidRouter): Record<string, unknown>;
|
|
378
|
+
type PageQueryRecord = Record<PropertyKey, unknown>;
|
|
379
|
+
/** A stable query view for adapters that read reactive state through a getter. */
|
|
380
|
+
export declare function createLivePageQuery(getQuery: () => PageQueryRecord): PageQueryRecord;
|
|
381
|
+
export declare function createRouterFacade(router: VoidRouter, getCurrentUrl: () => string, getCurrentParams?: () => Record<string, string>, getCurrentQuery?: () => Record<string, unknown>): VoidRouter;
|
|
382
|
+
export declare function createSsrRouter(url?: string, params?: Record<string, string>, requestUrl?: string, pageQuery?: Record<string, unknown>): VoidRouter;
|
|
369
383
|
export declare const ssrProxy: VoidRouter;
|
|
370
384
|
/** Refetch the current page in place: same history entry, URL hash, state and scroll. */
|
|
371
385
|
export declare function refreshPage(router: Pick<VoidRouter, "visit">, options?: VisitOptions): Promise<unknown>;
|
|
@@ -399,4 +413,4 @@ export declare function createVoidRouter(config: VoidRouterConfig): Promise<{
|
|
|
399
413
|
}>;
|
|
400
414
|
export declare function scheduleHydration(el: Element, loader: () => Promise<unknown>, props: Record<string, unknown>, strategy: string, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>) => void | Promise<void>): void;
|
|
401
415
|
export declare function initIslands(islands: Record<string, () => Promise<unknown>>, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>, frontmatter: Record<string, unknown>) => void | Promise<void>): void;
|
|
402
|
-
export { type ActionErrorHandlingScope, type ActionResult, type BaseLinkProps, type BoundaryManifest, type ClientPageBoundary, type ErrorPageProps, type FormErrorPath, type FormErrors, type FormMethod, type FormModel, type FormResetOptions, type FormState, type FormSubmitOptions, type IslandActionResult, type IslandFormState, type LinkActiveAttributes, type LinkActiveMatch, type LinkNavigateEvent, type LinkPendingAttributes, type LinkPrefetchStrategy, type LinkPrefetchValue, type PageError, type PageNavigationEngine, type PageNavigationResource, type PageNavigationResult, type PrefetchOptions, type ResolvedLink, type VisitOptions, interpolateRouteParams, toUrlString };
|
|
416
|
+
export { type ActionErrorHandlingScope, type ActionResult, type BaseLinkProps, type BoundaryManifest, type ClientPageBoundary, type ErrorPageProps, type FormErrorPath, type FormErrors, type FormMethod, type FormModel, type FormResetOptions, type FormState, type FormSubmitOptions, type IslandActionResult, type IslandFormState, type LinkActiveAttributes, type LinkActiveMatch, type LinkNavigateEvent, type LinkPendingAttributes, type LinkPrefetchStrategy, type LinkPrefetchValue, type LinkStatus, type LinkStatusOptions, type PageError, type PageNavigationEngine, type PageNavigationResource, type PageNavigationResult, type PrefetchOptions, type ResolvedLink, type VisitOptions, interpolateRouteParams, toUrlString };
|
package/dist/pages/client.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as toUrlString, t as interpolateRouteParams } from "../route-url-
|
|
2
|
-
import {
|
|
1
|
+
import { r as toUrlString, t as interpolateRouteParams } from "../route-url-CRC8yR_2.mjs";
|
|
2
|
+
import { a as isPlainObject, d as searchWithoutActionKey, i as isEqualFormValue, n as isSameOrigin, o as PRESERVED_QUERY_HEADER, p as withPageQuery$1, r as pageUrlQuery, t as decodePagePath } from "../url-DAQ1c3lh.mjs";
|
|
3
3
|
import { n as pagesBuildId } from "../build-id-4IV4hC1-.mjs";
|
|
4
4
|
import { r as parseCacheFor, t as PrefetchCache } from "../prefetch-C_OUvg5g.mjs";
|
|
5
|
-
import { t as fetchPages } from "../redirect-
|
|
6
|
-
import {
|
|
5
|
+
import { t as fetchPages } from "../redirect-DjyA_hx_.mjs";
|
|
6
|
+
import { c as serializePageData, i as deserializePageData, r as decodePageData, t as ISLAND_FRONTMATTER_ID } from "../serialize-nW4IeEBI.mjs";
|
|
7
7
|
import { PAGES_BUILD_HEADER, PAGES_PROTOCOL_VERSION, buildHeaders, isStaleBuild, readUsageLimit } from "@void/edge";
|
|
8
8
|
// src/pages/action-result.ts
|
|
9
9
|
var VoidActionError = class extends Error {
|
|
@@ -223,11 +223,27 @@ function readPosition(value) {
|
|
|
223
223
|
function newKey() {
|
|
224
224
|
return crypto.getRandomValues(/* @__PURE__ */ new Uint32Array(4)).join("-");
|
|
225
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Whether this document was loaded by reload or back/forward. It covers an entry the
|
|
228
|
+
* client never keyed, such as a page reloaded before its client script ran.
|
|
229
|
+
*/
|
|
230
|
+
function revisitedDocument() {
|
|
231
|
+
try {
|
|
232
|
+
const type = performance.getEntriesByType("navigation")[0]?.type;
|
|
233
|
+
return type === "reload" || type === "back_forward";
|
|
234
|
+
} catch {
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
226
238
|
function currentUrl$1() {
|
|
227
239
|
return window.location.pathname + window.location.search + window.location.hash;
|
|
228
240
|
}
|
|
229
|
-
/**
|
|
230
|
-
|
|
241
|
+
/**
|
|
242
|
+
* Positions belong to the rendered entry, even after the browser starts a traversal.
|
|
243
|
+
* With `restore` off, entries keep their keys but no position is saved, and an entry
|
|
244
|
+
* shown before returns 'reset', so back/forward and reload scroll like a new visit.
|
|
245
|
+
*/
|
|
246
|
+
function createScrollRestoration(restore = true) {
|
|
231
247
|
const positions = /* @__PURE__ */ new Map();
|
|
232
248
|
let renderedKey = null;
|
|
233
249
|
let renderedUrl = currentUrl$1();
|
|
@@ -243,7 +259,7 @@ function createScrollRestoration() {
|
|
|
243
259
|
return null;
|
|
244
260
|
}
|
|
245
261
|
function save() {
|
|
246
|
-
if (!ready || !renderedKey) return;
|
|
262
|
+
if (!restore || !ready || !renderedKey) return;
|
|
247
263
|
const position = {
|
|
248
264
|
x: window.scrollX,
|
|
249
265
|
y: window.scrollY
|
|
@@ -259,6 +275,7 @@ function createScrollRestoration() {
|
|
|
259
275
|
},
|
|
260
276
|
start() {
|
|
261
277
|
renderedKey = readKey(history.state);
|
|
278
|
+
const returning = renderedKey !== null;
|
|
262
279
|
if (!renderedKey) {
|
|
263
280
|
renderedKey = newKey();
|
|
264
281
|
history.replaceState({
|
|
@@ -268,6 +285,7 @@ function createScrollRestoration() {
|
|
|
268
285
|
}
|
|
269
286
|
history.scrollRestoration = "manual";
|
|
270
287
|
window.addEventListener("pagehide", save);
|
|
288
|
+
if (!restore) return returning || revisitedDocument() ? "reset" : null;
|
|
271
289
|
return read(renderedKey);
|
|
272
290
|
},
|
|
273
291
|
save,
|
|
@@ -290,6 +308,7 @@ function createScrollRestoration() {
|
|
|
290
308
|
save();
|
|
291
309
|
const state = rawState;
|
|
292
310
|
let key = readKey(state);
|
|
311
|
+
const returning = key !== null;
|
|
293
312
|
const newFragment = key === renderedKey && currentUrl$1() !== renderedUrl;
|
|
294
313
|
if (!key || newFragment) {
|
|
295
314
|
key = newKey();
|
|
@@ -298,7 +317,9 @@ function createScrollRestoration() {
|
|
|
298
317
|
__voidScrollKey: key
|
|
299
318
|
}, "");
|
|
300
319
|
}
|
|
301
|
-
|
|
320
|
+
if (newFragment) return null;
|
|
321
|
+
if (!restore) return returning ? "reset" : null;
|
|
322
|
+
return read(key) ?? readPosition({
|
|
302
323
|
x: state?.scrollX,
|
|
303
324
|
y: state?.scrollY
|
|
304
325
|
});
|
|
@@ -348,6 +369,13 @@ function objectToFormData(source, form, parentKey) {
|
|
|
348
369
|
function clonePageData(pageData) {
|
|
349
370
|
return deserializePageData(serializePageData(pageData));
|
|
350
371
|
}
|
|
372
|
+
/** Derive raw values from the page URL when its loader publishes no validated query. */
|
|
373
|
+
function withPageQuery(pageData, requestUrl) {
|
|
374
|
+
return pageData.query === void 0 ? {
|
|
375
|
+
...pageData,
|
|
376
|
+
query: pageUrlQuery(pageData.url || requestUrl)
|
|
377
|
+
} : pageData;
|
|
378
|
+
}
|
|
351
379
|
function readInitialPageData() {
|
|
352
380
|
const scriptEl = document.getElementById(PAGE_DATA_SCRIPT_ID);
|
|
353
381
|
if (scriptEl?.textContent) return deserializePageData(scriptEl.textContent);
|
|
@@ -418,13 +446,22 @@ async function fetchPageResponse(fetchUrl, init) {
|
|
|
418
446
|
return null;
|
|
419
447
|
}
|
|
420
448
|
}
|
|
421
|
-
function
|
|
449
|
+
function findHashTarget(fragment, decodeFragment) {
|
|
450
|
+
const target = document.getElementById(fragment);
|
|
451
|
+
if (target || !decodeFragment || !fragment.includes("%")) return target;
|
|
452
|
+
try {
|
|
453
|
+
return document.getElementById(decodeURIComponent(fragment));
|
|
454
|
+
} catch {
|
|
455
|
+
return null;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
function restoreScroll(scrollPosition, hash, decodeFragment = false) {
|
|
422
459
|
if (scrollPosition) {
|
|
423
460
|
window.scrollTo(scrollPosition.x, scrollPosition.y);
|
|
424
461
|
return;
|
|
425
462
|
}
|
|
426
463
|
if (hash) {
|
|
427
|
-
const el =
|
|
464
|
+
const el = findHashTarget(hash.slice(1), decodeFragment);
|
|
428
465
|
if (el) {
|
|
429
466
|
el.scrollIntoView();
|
|
430
467
|
return;
|
|
@@ -438,7 +475,7 @@ function getStaticPageDataUrl(url) {
|
|
|
438
475
|
return `${STATIC_PAGE_DATA_PREFIX}/${filePath}${pathname !== "/" && pathname.endsWith("/") ? "index" : ""}.json`;
|
|
439
476
|
}
|
|
440
477
|
async function createPageNavigationEngine(config) {
|
|
441
|
-
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;
|
|
478
|
+
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, scrollRestoration: SCROLL_RESTORATION = true } = config;
|
|
442
479
|
const matchRoute = (url) => config.matchRoute(decodePagePath(new URL(url, "http://x").pathname));
|
|
443
480
|
const hasBoundaries = Object.keys(config.boundaryManifest?.plans ?? {}).length > 0;
|
|
444
481
|
const _prefetchCache = new PrefetchCache();
|
|
@@ -452,9 +489,9 @@ async function createPageNavigationEngine(config) {
|
|
|
452
489
|
let _htmlDeferredRegistry = null;
|
|
453
490
|
let _currentFetchUrl = window.location.pathname + window.location.search;
|
|
454
491
|
let popStateHandler = null;
|
|
455
|
-
let
|
|
492
|
+
let initialScroll = null;
|
|
456
493
|
const initialUrl = window.location.pathname + window.location.search + window.location.hash;
|
|
457
|
-
const scrollRestoration = createScrollRestoration();
|
|
494
|
+
const scrollRestoration = createScrollRestoration(SCROLL_RESTORATION);
|
|
458
495
|
async function resolveComponent(id) {
|
|
459
496
|
const loader = components[id];
|
|
460
497
|
if (!loader) throw new Error(`pages: Unknown page component '${id}'.`);
|
|
@@ -680,7 +717,7 @@ async function createPageNavigationEngine(config) {
|
|
|
680
717
|
if (writeHistory) scrollRestoration.writeHistory(effectiveFetchUrl + hash, !!options.replace);
|
|
681
718
|
_currentFetchUrl = effectiveFetchUrl;
|
|
682
719
|
scrollRestoration.commit();
|
|
683
|
-
restoreScroll(options._scrollPosition, hash);
|
|
720
|
+
restoreScroll(options._scrollPosition, hash, !SCROLL_RESTORATION && options._popstate === true);
|
|
684
721
|
}
|
|
685
722
|
async function loadNavigationShell(id, url, fetchUrl, method, options, signal, commitTarget, deferredRegistry) {
|
|
686
723
|
const target = new URL(url, window.location.origin);
|
|
@@ -849,6 +886,7 @@ async function createPageNavigationEngine(config) {
|
|
|
849
886
|
if (CACHE_VISITED_PAGE_DATA && method === "GET" && response?.ok && !/no-store/i.test(response.headers.get("Cache-Control") ?? "") && response.headers.get("X-VoidPages") && pageData?.component === matchRoute(fetchUrl) && !pageData.deferredKeys) _prefetchCache.set(fetchUrl, method, Promise.resolve(clonePageData(pageData)), PREFETCH_DEFAULT_CACHE_FOR);
|
|
850
887
|
}
|
|
851
888
|
if (!pageData) throw new Error("pages: Missing page payload.");
|
|
889
|
+
pageData = withPageQuery(pageData, commitTarget.fetchUrl);
|
|
852
890
|
if (method !== "GET") {
|
|
853
891
|
deferredRegistry.preserveValuesFrom(_committedDeferredRegistry, pageData);
|
|
854
892
|
commitTarget.fetchUrl = withoutActionKey(fetchUrl, pageData.url);
|
|
@@ -923,12 +961,12 @@ async function createPageNavigationEngine(config) {
|
|
|
923
961
|
_currentFetchUrl = commitTarget.fetchUrl;
|
|
924
962
|
scrollRestoration.commit();
|
|
925
963
|
requestAnimationFrame(() => {
|
|
926
|
-
if (!preserveScroll) restoreScroll(options._scrollPosition, commitTarget.hash);
|
|
964
|
+
if (!preserveScroll) restoreScroll(options._scrollPosition, commitTarget.hash, !SCROLL_RESTORATION && options._popstate === true);
|
|
927
965
|
});
|
|
928
966
|
return true;
|
|
929
967
|
};
|
|
930
968
|
}
|
|
931
|
-
let initialPageData = readInitialPageData();
|
|
969
|
+
let initialPageData = withPageQuery(readInitialPageData(), _currentFetchUrl);
|
|
932
970
|
let initialComponent;
|
|
933
971
|
let initialLayouts;
|
|
934
972
|
try {
|
|
@@ -1063,29 +1101,34 @@ async function createPageNavigationEngine(config) {
|
|
|
1063
1101
|
popStateHandler = handler;
|
|
1064
1102
|
},
|
|
1065
1103
|
commitInitialRender() {
|
|
1066
|
-
const saved =
|
|
1067
|
-
|
|
1104
|
+
const saved = initialScroll;
|
|
1105
|
+
initialScroll = null;
|
|
1068
1106
|
scrollRestoration.commit();
|
|
1069
|
-
if (saved && _nextNavigationId === 0)
|
|
1107
|
+
if (saved && _nextNavigationId === 0) restoreScroll(saved === "reset" ? null : saved, window.location.hash, saved === "reset");
|
|
1070
1108
|
},
|
|
1071
1109
|
start() {
|
|
1072
|
-
|
|
1110
|
+
initialScroll = scrollRestoration.start();
|
|
1073
1111
|
initClientHead(initialPageData.head);
|
|
1074
1112
|
if (deferredWindow.__deferredQueue) {
|
|
1075
1113
|
for (const entry of deferredWindow.__deferredQueue) if (entry.length === 3) _htmlDeferredRegistry?.resolve(entry[0], void 0, entry[2]);
|
|
1076
1114
|
else _htmlDeferredRegistry?.resolve(entry[0], entry.length === 4 ? decodePageData(entry[1]) : entry[1], void 0);
|
|
1077
1115
|
delete deferredWindow.__deferredQueue;
|
|
1078
1116
|
}
|
|
1117
|
+
if (!SCROLL_RESTORATION) window.addEventListener("pageshow", (e) => {
|
|
1118
|
+
if (!e.persisted) return;
|
|
1119
|
+
if (scrollRestoration.ready) restoreScroll(null, window.location.hash, true);
|
|
1120
|
+
else initialScroll = "reset";
|
|
1121
|
+
});
|
|
1079
1122
|
window.addEventListener("popstate", (e) => {
|
|
1080
1123
|
const url = window.location.pathname + window.location.search + window.location.hash;
|
|
1081
1124
|
const saved = scrollRestoration.pop(e.state);
|
|
1082
1125
|
if (!scrollRestoration.ready && url === initialUrl) {
|
|
1083
|
-
|
|
1126
|
+
initialScroll = SCROLL_RESTORATION ? saved : saved ?? initialScroll;
|
|
1084
1127
|
return;
|
|
1085
1128
|
}
|
|
1086
1129
|
const options = {
|
|
1087
1130
|
preserveState: true,
|
|
1088
|
-
_scrollPosition: saved,
|
|
1131
|
+
_scrollPosition: saved === "reset" ? null : saved,
|
|
1089
1132
|
_popstate: true
|
|
1090
1133
|
};
|
|
1091
1134
|
if (popStateHandler) popStateHandler(url, options);
|
|
@@ -1160,44 +1203,85 @@ function linkPrefetchStrategies(props, link, defaultStrategy = false) {
|
|
|
1160
1203
|
return prefetch;
|
|
1161
1204
|
}
|
|
1162
1205
|
/**
|
|
1163
|
-
*
|
|
1206
|
+
* Matches a GET link against the current page. Pathnames compare the way the server
|
|
1164
1207
|
* matches pages: case-sensitive, trailing slash significant, decoded like Hono's
|
|
1165
1208
|
* getPath. A link with a query also needs each of its params, with the same value,
|
|
1166
1209
|
* in the current URL, which may have more params in any order. GET data counts as
|
|
1167
1210
|
* query, and the hash is ignored. `prefix` also matches nested pages by whole
|
|
1168
1211
|
* segment, except for `/`, comparing only the path, but only an exact match is
|
|
1169
|
-
* `aria-current
|
|
1212
|
+
* current (`aria-current`).
|
|
1170
1213
|
*/
|
|
1171
|
-
function
|
|
1172
|
-
if (!router || !link.isGet) return {};
|
|
1173
|
-
const current = router.url;
|
|
1174
|
-
const target = resolveSameOrigin(link.href, current);
|
|
1175
|
-
if (!target) return {};
|
|
1214
|
+
function matchActive(current, target, match) {
|
|
1176
1215
|
const currentPath = decodePagePath(current.pathname);
|
|
1177
1216
|
const linkPath = decodePagePath(target.pathname);
|
|
1178
|
-
if (linkPath === currentPath) return hasQueryParams(current.searchParams, target.searchParams) ?
|
|
1179
|
-
"aria-current": "page",
|
|
1180
|
-
"data-void-active": ""
|
|
1181
|
-
} : {};
|
|
1217
|
+
if (linkPath === currentPath) return hasQueryParams(current.searchParams, target.searchParams) ? "current" : void 0;
|
|
1182
1218
|
if (match === "prefix" && linkPath !== "/") {
|
|
1183
1219
|
const parent = linkPath.endsWith("/") ? linkPath : `${linkPath}/`;
|
|
1184
|
-
if (currentPath.startsWith(parent)) return
|
|
1220
|
+
if (currentPath.startsWith(parent)) return "ancestor";
|
|
1185
1221
|
}
|
|
1186
|
-
return {};
|
|
1187
1222
|
}
|
|
1188
1223
|
/**
|
|
1189
|
-
*
|
|
1224
|
+
* Matches a visit that is loading the link's destination: the visit uses the link's
|
|
1190
1225
|
* method and goes to its path, query and hash. Unlike active links, the whole query and
|
|
1191
1226
|
* the hash count, so `?tab=open` isn't pending during a visit to `?tab=open&page=2`.
|
|
1192
|
-
* Every link to the destination is
|
|
1193
|
-
* Spread the result before the user's attributes so theirs win.
|
|
1227
|
+
* Every link to the destination is pending, not only the one that was clicked.
|
|
1194
1228
|
*/
|
|
1229
|
+
function matchPending(navigation, method, target) {
|
|
1230
|
+
const destination = navigation?.location;
|
|
1231
|
+
return Boolean(destination && navigation.state !== "idle" && navigation.method === method && target.host === destination.host && target.protocol === destination.protocol && decodePagePath(target.pathname) === decodePagePath(destination.pathname) && target.search === destination.search && target.hash === destination.hash);
|
|
1232
|
+
}
|
|
1233
|
+
/** Reads the same current, active and pending state used by a Link with these props. */
|
|
1234
|
+
function getLinkStatus(router, navigation, href, { method, data, activeMatch } = {}) {
|
|
1235
|
+
return getResolvedLinkStatus(router, navigation, resolveLink({
|
|
1236
|
+
href,
|
|
1237
|
+
method,
|
|
1238
|
+
data
|
|
1239
|
+
}), activeMatch);
|
|
1240
|
+
}
|
|
1241
|
+
/** Like getLinkStatus(), for a link an adapter has already resolved. */
|
|
1242
|
+
function getResolvedLinkStatus(router, navigation, link, match = "exact") {
|
|
1243
|
+
const current = router?.url;
|
|
1244
|
+
const target = current && resolveSameOrigin(link.href, current);
|
|
1245
|
+
if (!current || !target) return {
|
|
1246
|
+
current: false,
|
|
1247
|
+
active: false,
|
|
1248
|
+
pending: false
|
|
1249
|
+
};
|
|
1250
|
+
const active = link.isGet ? matchActive(current, target, match) : void 0;
|
|
1251
|
+
return {
|
|
1252
|
+
current: active === "current",
|
|
1253
|
+
active: active !== void 0,
|
|
1254
|
+
pending: matchPending(navigation, link.method, target)
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
/** Compares statuses by value so fine-grained adapters skip unchanged notifications. */
|
|
1258
|
+
function linkStatusEquals(a, b) {
|
|
1259
|
+
return a.current === b.current && a.active === b.active && a.pending === b.pending;
|
|
1260
|
+
}
|
|
1261
|
+
/** Returns true for the current page and, with prefix matching, its parent paths. */
|
|
1262
|
+
function isLinkActive(router, href, options) {
|
|
1263
|
+
return getLinkStatus(router, null, href, options).active;
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Returns true during a visit with the link's method, path, full query and hash.
|
|
1267
|
+
* Takes the same options as isLinkActive(); `activeMatch` doesn't change pending.
|
|
1268
|
+
*/
|
|
1269
|
+
function isLinkPending(router, navigation, href, options) {
|
|
1270
|
+
return getLinkStatus(router, navigation, href, options).pending;
|
|
1271
|
+
}
|
|
1272
|
+
/** Spread before authored attributes so the user's values win. */
|
|
1273
|
+
function linkStatusAttributes(status) {
|
|
1274
|
+
const attributes = {};
|
|
1275
|
+
if (status.current) attributes["aria-current"] = "page";
|
|
1276
|
+
if (status.active) attributes["data-void-active"] = "";
|
|
1277
|
+
if (status.pending) attributes["data-void-pending"] = "";
|
|
1278
|
+
return attributes;
|
|
1279
|
+
}
|
|
1280
|
+
function linkActiveAttributes(router, link, match) {
|
|
1281
|
+
return linkStatusAttributes(getResolvedLinkStatus(router, null, link, match));
|
|
1282
|
+
}
|
|
1195
1283
|
function linkPendingAttributes(router, navigation, link) {
|
|
1196
|
-
|
|
1197
|
-
const destination = navigation.location;
|
|
1198
|
-
const target = resolveSameOrigin(link.href, router.url);
|
|
1199
|
-
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": "" };
|
|
1200
|
-
return {};
|
|
1284
|
+
return getResolvedLinkStatus(router, navigation, link).pending ? { "data-void-pending": "" } : {};
|
|
1201
1285
|
}
|
|
1202
1286
|
/** Each of `params` has the same value in `current`. Extra params in `current` are allowed. */
|
|
1203
1287
|
function hasQueryParams(current, params) {
|
|
@@ -1306,28 +1390,6 @@ async function submitIslandAction(url, method, data) {
|
|
|
1306
1390
|
error
|
|
1307
1391
|
};
|
|
1308
1392
|
}
|
|
1309
|
-
// src/pages/form-value-equality.ts
|
|
1310
|
-
function isPlainObject(value) {
|
|
1311
|
-
if (value === null || typeof value !== "object") return false;
|
|
1312
|
-
const prototype = Object.getPrototypeOf(value);
|
|
1313
|
-
return prototype === Object.prototype || prototype === null;
|
|
1314
|
-
}
|
|
1315
|
-
function isEqualFormValue(a, b) {
|
|
1316
|
-
if (Object.is(a, b)) return true;
|
|
1317
|
-
if (Array.isArray(a) || Array.isArray(b)) {
|
|
1318
|
-
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
1319
|
-
for (let index = 0; index < a.length; index += 1) if (Object.hasOwn(a, index) !== Object.hasOwn(b, index) || !isEqualFormValue(a[index], b[index])) return false;
|
|
1320
|
-
return true;
|
|
1321
|
-
}
|
|
1322
|
-
if (isPlainObject(a) || isPlainObject(b)) {
|
|
1323
|
-
if (!isPlainObject(a) || !isPlainObject(b)) return false;
|
|
1324
|
-
const aKeys = Object.keys(a);
|
|
1325
|
-
const bKeys = Object.keys(b);
|
|
1326
|
-
if (aKeys.length !== bKeys.length) return false;
|
|
1327
|
-
return aKeys.every((key) => Object.hasOwn(b, key) && isEqualFormValue(a[key], b[key]));
|
|
1328
|
-
}
|
|
1329
|
-
return false;
|
|
1330
|
-
}
|
|
1331
1393
|
// src/pages/form-reset.ts
|
|
1332
1394
|
function isFormResetOptions(value) {
|
|
1333
1395
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -1477,7 +1539,31 @@ function idleNavigationState() {
|
|
|
1477
1539
|
method: null
|
|
1478
1540
|
};
|
|
1479
1541
|
}
|
|
1480
|
-
function
|
|
1542
|
+
function readPageQuery(router) {
|
|
1543
|
+
return router._pageQuery ?? pageUrlQuery(router.url.href);
|
|
1544
|
+
}
|
|
1545
|
+
/** A stable query view for adapters that read reactive state through a getter. */
|
|
1546
|
+
function createLivePageQuery(getQuery) {
|
|
1547
|
+
return new Proxy({}, {
|
|
1548
|
+
get: (_, key) => getQuery()[key],
|
|
1549
|
+
has: (_, key) => Reflect.has(getQuery(), key),
|
|
1550
|
+
ownKeys: () => Reflect.ownKeys(getQuery()),
|
|
1551
|
+
getPrototypeOf: () => Reflect.getPrototypeOf(getQuery()),
|
|
1552
|
+
getOwnPropertyDescriptor(_, key) {
|
|
1553
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(getQuery(), key);
|
|
1554
|
+
return descriptor && {
|
|
1555
|
+
...descriptor,
|
|
1556
|
+
configurable: true
|
|
1557
|
+
};
|
|
1558
|
+
},
|
|
1559
|
+
set: () => false,
|
|
1560
|
+
defineProperty: () => false,
|
|
1561
|
+
deleteProperty: () => false,
|
|
1562
|
+
preventExtensions: () => false,
|
|
1563
|
+
setPrototypeOf: () => false
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
function createRouterFacade(router, getCurrentUrl, getCurrentParams = () => router.params, getCurrentQuery = () => readPageQuery(router)) {
|
|
1481
1567
|
return {
|
|
1482
1568
|
get _hoverDelay() {
|
|
1483
1569
|
return router._hoverDelay;
|
|
@@ -1485,6 +1571,9 @@ function createRouterFacade(router, getCurrentUrl, getCurrentParams = () => rout
|
|
|
1485
1571
|
get _prefetchDefaultStrategy() {
|
|
1486
1572
|
return router._prefetchDefaultStrategy;
|
|
1487
1573
|
},
|
|
1574
|
+
get _pageQuery() {
|
|
1575
|
+
return getCurrentQuery();
|
|
1576
|
+
},
|
|
1488
1577
|
get url() {
|
|
1489
1578
|
return new URL(getCurrentUrl() || "/", router.url);
|
|
1490
1579
|
},
|
|
@@ -1514,7 +1603,7 @@ function createRouterFacade(router, getCurrentUrl, getCurrentParams = () => rout
|
|
|
1514
1603
|
}
|
|
1515
1604
|
};
|
|
1516
1605
|
}
|
|
1517
|
-
function createSsrRouter(url = "/", params = {}, requestUrl) {
|
|
1606
|
+
function createSsrRouter(url = "/", params = {}, requestUrl, pageQuery = pageUrlQuery(url)) {
|
|
1518
1607
|
return {
|
|
1519
1608
|
_hoverDelay: 75,
|
|
1520
1609
|
get url() {
|
|
@@ -1526,6 +1615,9 @@ function createSsrRouter(url = "/", params = {}, requestUrl) {
|
|
|
1526
1615
|
get query() {
|
|
1527
1616
|
return this.url.searchParams;
|
|
1528
1617
|
},
|
|
1618
|
+
get _pageQuery() {
|
|
1619
|
+
return pageQuery;
|
|
1620
|
+
},
|
|
1529
1621
|
get params() {
|
|
1530
1622
|
return params;
|
|
1531
1623
|
},
|
|
@@ -1559,7 +1651,7 @@ function refreshPage(router, options = {}) {
|
|
|
1559
1651
|
});
|
|
1560
1652
|
}
|
|
1561
1653
|
async function submitAction(router, url, options, errorOptions) {
|
|
1562
|
-
const page = withPageQuery(url, window.location);
|
|
1654
|
+
const page = withPageQuery$1(url, window.location);
|
|
1563
1655
|
if (page.preserved) {
|
|
1564
1656
|
url = page.url;
|
|
1565
1657
|
options = {
|
|
@@ -1620,6 +1712,7 @@ async function createVoidRouter(config) {
|
|
|
1620
1712
|
const engine = await createPageNavigationEngine(config);
|
|
1621
1713
|
let routeUrl = currentUrl();
|
|
1622
1714
|
let routeParams = engine.initialPageData.params ?? {};
|
|
1715
|
+
let routeQuery = engine.initialPageData.query ?? {};
|
|
1623
1716
|
let activeNavigationId = null;
|
|
1624
1717
|
let committedPage = {
|
|
1625
1718
|
pageData: engine.initialPageData,
|
|
@@ -1628,9 +1721,10 @@ async function createVoidRouter(config) {
|
|
|
1628
1721
|
};
|
|
1629
1722
|
let renderedPage = committedPage;
|
|
1630
1723
|
let failedRender = null;
|
|
1631
|
-
const setRouteState = (url, params = routeParams) => {
|
|
1724
|
+
const setRouteState = (url, params = routeParams, query = routeQuery) => {
|
|
1632
1725
|
routeUrl = url;
|
|
1633
1726
|
routeParams = params;
|
|
1727
|
+
routeQuery = query;
|
|
1634
1728
|
config.onRouteChange?.(url);
|
|
1635
1729
|
};
|
|
1636
1730
|
const setNavigation = (navigation) => {
|
|
@@ -1642,7 +1736,8 @@ async function createVoidRouter(config) {
|
|
|
1642
1736
|
try {
|
|
1643
1737
|
const result = await resource.shell;
|
|
1644
1738
|
if (!result) return;
|
|
1645
|
-
|
|
1739
|
+
const commitUrl = result.pageData.url || resource.fetchUrl + resource.hash;
|
|
1740
|
+
setRouteState(commitUrl, result.pageData.params ?? {}, result.pageData.query);
|
|
1646
1741
|
const preserveState = resource.options.preserveState ?? resource.method !== "GET";
|
|
1647
1742
|
const applyUpdate = () => {
|
|
1648
1743
|
renderedPage = result;
|
|
@@ -1668,7 +1763,7 @@ async function createVoidRouter(config) {
|
|
|
1668
1763
|
if (!committed) throw new DOMException("Navigation aborted", "AbortError");
|
|
1669
1764
|
committedPage = result;
|
|
1670
1765
|
if (renderedPage === result) failedRender = null;
|
|
1671
|
-
if (activeNavigationId === resource.id) setRouteState(currentUrl(), result.pageData.params ?? {});
|
|
1766
|
+
if (activeNavigationId === resource.id) setRouteState(currentUrl(), result.pageData.params ?? {}, result.pageData.query);
|
|
1672
1767
|
return result.pageData;
|
|
1673
1768
|
} catch (error) {
|
|
1674
1769
|
if (resource.method.toUpperCase() === "GET" && !resource.options._resolveOnShell && isAbortError(error)) return;
|
|
@@ -1691,9 +1786,9 @@ async function createVoidRouter(config) {
|
|
|
1691
1786
|
}
|
|
1692
1787
|
if (ownsNavigation && activeNavigationId === resource.id) {
|
|
1693
1788
|
activeNavigationId = null;
|
|
1694
|
-
setRouteState(currentUrl(), restored ? committedPage.pageData.params ?? {} : void 0);
|
|
1789
|
+
setRouteState(currentUrl(), restored ? committedPage.pageData.params ?? {} : void 0, restored ? committedPage.pageData.query : void 0);
|
|
1695
1790
|
setNavigation(idleNavigationState());
|
|
1696
|
-
} else if (restored && activeNavigationId === null) setRouteState(currentUrl(), committedPage.pageData.params ?? {});
|
|
1791
|
+
} else if (restored && activeNavigationId === null) setRouteState(currentUrl(), committedPage.pageData.params ?? {}, committedPage.pageData.query);
|
|
1697
1792
|
}
|
|
1698
1793
|
}
|
|
1699
1794
|
}
|
|
@@ -1712,6 +1807,9 @@ async function createVoidRouter(config) {
|
|
|
1712
1807
|
get params() {
|
|
1713
1808
|
return routeParams;
|
|
1714
1809
|
},
|
|
1810
|
+
get _pageQuery() {
|
|
1811
|
+
return routeQuery;
|
|
1812
|
+
},
|
|
1715
1813
|
visit(url, options = {}) {
|
|
1716
1814
|
return applyNavigationResource(engine.prepareVisit(normalizeUrl(url), options));
|
|
1717
1815
|
},
|
|
@@ -1778,4 +1876,4 @@ function initIslands(islands, hydrateFn) {
|
|
|
1778
1876
|
if (loader) scheduleHydration(el, loader, props, strategy, hydrate);
|
|
1779
1877
|
});
|
|
1780
1878
|
}
|
|
1781
|
-
export { VoidActionError, categorizeActionError, changedFormErrorKeys, clientPageError, cloneFormValue, createActionClient, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, formErrorKeysWithin, formErrorMessage, formRetryMessage, formSubmissionBlocked, getValidationErrors, handleLinkClick, hasFiles, idleNavigationState, initIslands, interpolateRouteParams, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, isFormResetOptions, isModifiedEvent, isVoidActionError, linkActiveAttributes, linkPendingAttributes, linkPrefetchStrategies, mergeDataIntoHref, objectToFormData, observeLinkVisible, omitFormErrors, pageBoundarySlots, parseFormResetArgs, prefetchLink, refreshPage, resolveLink, scheduleFormRetry, scheduleHydration, showTerminalPageError, ssrProxy, submitAction, submitIslandAction, toUrlString };
|
|
1879
|
+
export { VoidActionError, categorizeActionError, changedFormErrorKeys, clientPageError, cloneFormValue, createActionClient, createLivePageQuery, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, formErrorKeysWithin, formErrorMessage, formRetryMessage, formSubmissionBlocked, getLinkStatus, getResolvedLinkStatus, getValidationErrors, handleLinkClick, hasFiles, idleNavigationState, initIslands, interpolateRouteParams, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, isFormResetOptions, isLinkActive, isLinkPending, isModifiedEvent, isVoidActionError, linkActiveAttributes, linkPendingAttributes, linkPrefetchStrategies, linkStatusAttributes, linkStatusEquals, mergeDataIntoHref, objectToFormData, observeLinkVisible, omitFormErrors, pageBoundarySlots, parseFormResetArgs, prefetchLink, readPageQuery, refreshPage, resolveLink, scheduleFormRetry, scheduleHydration, showTerminalPageError, ssrProxy, submitAction, submitIslandAction, toUrlString };
|
package/dist/pages/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../config-
|
|
2
|
-
import {
|
|
1
|
+
import "../config-BdmM5ZzP.mjs";
|
|
2
|
+
import { t as RouteEnvironment } from "../parse-filename-DIPUjoCh.mjs";
|
|
3
|
+
import { a as PageDefinition, c as PageScanResult, i as NamedLayoutDefinition, n as ErrorPageProps, o as PageError, r as LayoutDefinition } from "../types-RYVujNS6.mjs";
|
|
3
4
|
import { a as renderHeadToString, i as renderBodyAttrs, n as HeadDescriptor, o as renderHtmlAttrs, s as resolveHead, t as HeadConfig } from "../head-fUp8n_QJ.mjs";
|
|
4
5
|
import { a as LinkPrefetchValue, n as CacheForInput } from "../prefetch-UINRrqL4.mjs";
|
|
5
|
-
import {
|
|
6
|
+
import { c as serializePageData } from "../serialize-Dr9B-0yV.mjs";
|
|
6
7
|
import { t as BoundaryManifest } from "../boundary-plans-CRmWH68v.mjs";
|
|
7
8
|
import { Plugin, UserConfig } from "vite";
|
|
8
9
|
type ProjectPaths = {
|
|
@@ -48,7 +49,8 @@ type PageScanOptions = {
|
|
|
48
49
|
/**
|
|
49
50
|
* The environment a file under pages/ is limited to, read from its name the way
|
|
50
51
|
* scanPages does: `home.dev.tsx`, `home.dev.island.vue` and `home.dev.server.ts`
|
|
51
|
-
* give 'dev'.
|
|
52
|
+
* give 'dev'. Boundary files count too: `_error.dev.tsx` and `_error.dev.server.ts`
|
|
53
|
+
* give 'dev'. Files the scanner skips (other `_` names, other extensions) give null.
|
|
52
54
|
*/
|
|
53
55
|
export declare function pageFileEnvironment(relativePath: string): RouteEnvironment | null;
|
|
54
56
|
export declare function scanPages(root: string, options?: PageScanOptions): Promise<PageScanResult>;
|
|
@@ -87,6 +89,11 @@ type PagesPluginOptions = {
|
|
|
87
89
|
root?: string;
|
|
88
90
|
viewTransitions?: boolean;
|
|
89
91
|
prefetch?: PrefetchConfig;
|
|
92
|
+
/**
|
|
93
|
+
* Restore the saved scroll position on back/forward and reload. Defaults to `true`.
|
|
94
|
+
* Turn it off to open those visits at the hash target or the top, like a new visit.
|
|
95
|
+
*/
|
|
96
|
+
scrollRestoration?: boolean;
|
|
90
97
|
/**
|
|
91
98
|
* Reload the destination when a tab navigates against a newer deployment.
|
|
92
99
|
* Defaults to `true`. Turn it off to keep error boundaries in charge.
|
package/dist/pages/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { l as resolveNamedLayout, n as scanPages, o as resolveEffectiveLayoutChain, r as generateComponentManifest, s as resolveLayoutChain, t as pageFileEnvironment } from "../scan-
|
|
1
|
+
import { l as resolveNamedLayout, n as scanPages, o as resolveEffectiveLayoutChain, r as generateComponentManifest, s as resolveLayoutChain, t as pageFileEnvironment } from "../scan-BxhB4BA-.mjs";
|
|
2
2
|
import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString } from "../head-BwQ5kgqt.mjs";
|
|
3
3
|
import { a as join, i as isAbsolute, n as dirname, o as normalize, s as relative } from "../dist-DMYe8CZJ.mjs";
|
|
4
4
|
import { n as findInstalledPackage } from "../installed-packages-tfmYd-cC.mjs";
|
|
5
5
|
import { t as PAGES_BUILD_ID_DEFINE } from "../build-id-4IV4hC1-.mjs";
|
|
6
6
|
import { n as assertLinkPrefetchValue } from "../prefetch-C_OUvg5g.mjs";
|
|
7
|
-
import { r as parseRedirectsFile } from "../headers-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { r as resolvePagesDir } from "../project-paths-
|
|
7
|
+
import { r as parseRedirectsFile } from "../headers-DPI4MDGC.mjs";
|
|
8
|
+
import { h as readConfig } from "../config-KZAiI3gG.mjs";
|
|
9
|
+
import { c as serializePageData } from "../serialize-nW4IeEBI.mjs";
|
|
10
|
+
import { r as resolvePagesDir } from "../project-paths-BeAxxqGh.mjs";
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { loadEnv, normalizePath, searchForWorkspaceRoot } from "vite";
|
|
13
13
|
import { createHash } from "node:crypto";
|