void 1.7.0 → 1.9.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/dist/{account-cmd-BfkJ_1PC.mjs → account-cmd-BEMOdwtl.mjs} +5 -5
- package/dist/{application-analysis-OV0CBJ80.mjs → application-analysis-3VVsflWZ.mjs} +28 -8
- package/dist/{application-routing-QpyC5G8z.mjs → application-routing-CJRlXCc2.mjs} +1 -1
- package/dist/{auth-CZrthGxs.d.mts → auth-CV9kXHKe.d.mts} +4 -2
- package/dist/{auth-DyWp-fSo.mjs → auth-aMuFOZeI.mjs} +8 -2
- package/dist/{auth-link-CW1Zh6FM.mjs → auth-link-B1IynRW5.mjs} +5 -5
- package/dist/{auth-router-CNBKnEZi.mjs → auth-router-DVaWJdRB.mjs} +3 -3
- package/dist/{better-auth-shared-CdVyCUou.mjs → better-auth-shared-C7LHvF4L.mjs} +1 -1
- package/dist/{better-auth-shared-C-0uZg8-.d.mts → better-auth-shared-ajs3LNrY.d.mts} +2 -2
- package/dist/boundary-plans-CRmWH68v.d.mts +25 -0
- package/dist/{build-cmd-C9qOKW9W.mjs → build-cmd-Dq8tdqQG.mjs} +4 -4
- package/dist/{cache-DVBBbWQL.mjs → cache-DGMnskX7.mjs} +4 -4
- package/dist/{cancel-deploy-COavnjud.mjs → cancel-deploy-96S5hD1E.mjs} +3 -3
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/cloudflare-operation-process.mjs +92 -19
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/{cli-main-DFteHrJI.mjs → cli-main-CQRLxZAu.mjs} +32 -32
- package/dist/client-66c0RLDM.mjs +1 -0
- package/dist/{client-BEZmTP6p.mjs → client-D6w5x7hM.mjs} +7 -7
- package/dist/{cloudflare-auth-DGIivpTb.mjs → cloudflare-auth-pNvmT6kL.mjs} +1 -1
- package/dist/{cloudflare-cmd-DJaxC-bc.mjs → cloudflare-cmd-BuuHUM4z.mjs} +5 -5
- package/dist/{cloudflare-config-DtOGAbeB.mjs → cloudflare-config-PxbinLLE.mjs} +2 -2
- package/dist/{cloudflare-connect-BjpWmglw.mjs → cloudflare-connect-D1QOosLd.mjs} +3 -3
- package/dist/{cloudflare-operations-k7wYUv56.mjs → cloudflare-operations-G5AObYzF.mjs} +6 -6
- package/dist/{cloudflare-operations-CZkjFrzH.mjs → cloudflare-operations-I4t3mt4R.mjs} +1 -1
- package/dist/{cloudflare-process-BcPvlMFd.mjs → cloudflare-process-wcnaQ5JG.mjs} +2 -2
- package/dist/{config-wo2EaH0X.mjs → config-C1DPf8EK.mjs} +1 -1
- package/dist/{config-CTlUaXWZ.d.mts → config-CCWVY7DY.d.mts} +1 -1
- package/dist/{config-5oSQhZNj.mjs → config-CzFdJYNA.mjs} +1 -1
- package/dist/{config-DcqUBGCb.mjs → config-DlWQ_hIJ.mjs} +3 -3
- package/dist/{config-eeDzKBS9.mjs → config-Do7gJI3T.mjs} +2 -2
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-j1F1C_rW.mjs → connect-4uImOwut.mjs} +6 -6
- package/dist/{create-project-CE3jOmd5.mjs → create-project-BaUzZnLZ.mjs} +4 -4
- package/dist/{create-project-DZH3aYGQ.mjs → create-project-CQMyzTvK.mjs} +1 -1
- package/dist/{db-DyLzzxvM.mjs → db-DEpDeDsi.mjs} +22 -22
- package/dist/{db-types-DdHHUVPy.mjs → db-types-BpPYAx0B.mjs} +4 -2
- package/dist/{delete-Dey6YoMA.mjs → delete-BVD2kI82.mjs} +4 -4
- package/dist/deploy-Dr_Qamzw.mjs +2 -0
- package/dist/{deploy-Ccw2D2lw.mjs → deploy-Dyeo5soA.mjs} +40 -81
- package/dist/{deploy-managed-static-BBVtpuGv.mjs → deploy-managed-static-Kn73R83A.mjs} +22 -22
- package/dist/{deploy-transport-Dt0IvSVW.mjs → deploy-transport-BpKBs_KR.mjs} +3 -3
- package/dist/deploy.mjs +6 -6
- package/dist/discover-Diq0l6TZ.mjs +1 -0
- package/dist/{discover-CVFCWU7W.mjs → discover-Vd18lHsj.mjs} +1 -1
- package/dist/{dispatch-pYaww76u.mjs → dispatch-BBfb519j.mjs} +8 -8
- package/dist/{dist-DeTdhbZc.mjs → dist-Cp4b1_T9.mjs} +1 -1
- package/dist/{dist-BQdgCVQF.mjs → dist-STQXl8ck.mjs} +86 -138
- package/dist/{domain-Dh3mG8Vs.mjs → domain-BTIdyUVk.mjs} +5 -5
- package/dist/{drizzle-C8MPqt5m.mjs → drizzle-D4V_06-B.mjs} +1 -1
- package/dist/{drizzle-lFdzSEa9.mjs → drizzle-DBSpPpU1.mjs} +34 -8
- package/dist/{email-DKyMjOYM.mjs → email-DvrS-I0U.mjs} +10 -10
- package/dist/{email-cloudflare-CTt2n_W2.mjs → email-cloudflare-DAGpgzY1.mjs} +16 -11
- package/dist/{entry-Bw-G1VVx.mjs → entry-DMgR7XOf.mjs} +2 -2
- package/dist/{env-DkZzh_Dd.mjs → env-D7vORwpn.mjs} +6 -6
- package/dist/{env-CuzZZyjB.mjs → env-UqS-21xi.mjs} +8 -1
- package/dist/{env-public-CeNeO_AT.d.mts → env-public-DtJL_hZq.d.mts} +8 -7
- package/dist/{env-types-Dz9qkiOn.mjs → env-types-WEZw5D-r.mjs} +1 -1
- package/dist/{env-validation-C8NL3lEH.mjs → env-validation-DKDcpxbt.mjs} +1 -1
- package/dist/{env-validation-1snjKtDX.mjs → env-validation-DeYNRp1d.mjs} +5 -5
- package/dist/{gen-BZmFOGDQ.mjs → gen-DimkGNve.mjs} +6 -6
- package/dist/gen-DmEeVEs4.mjs +1 -0
- package/dist/{github-cmd-7Oky9qgH.mjs → github-cmd-D-zs6VQr.mjs} +4 -4
- package/dist/{handler-DjqciiDc.d.mts → handler-6fzr_ikp.d.mts} +5 -4
- package/dist/{head-MeF_5M_3.d.mts → head-CVO92KEx.d.mts} +14 -3
- package/dist/{head-5XPcnG-j.mjs → head-CWJhfUwV.mjs} +62 -3
- package/dist/{headers-CimYIfQI.mjs → headers-Q0kZDpk8.mjs} +11 -2
- package/dist/{help-CNuUb47C.mjs → help-Cgdcd-SG.mjs} +6 -6
- package/dist/help-Cp3K5m1w.mjs +1 -0
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +257 -188
- package/dist/{info-DwB8IWIx.mjs → info-BbxQ34kk.mjs} +4 -4
- package/dist/{init-CUGSmcED.mjs → init-zyRj3QRw.mjs} +19 -20
- package/dist/{link-BlRTGHan.mjs → link-DAFXuIER.mjs} +5 -5
- package/dist/{list-iCg7d5Pa.mjs → list-BTIcC3W9.mjs} +5 -5
- package/dist/{live-zKGbRT4h.d.mts → live-DBybyDt0.d.mts} +2 -2
- package/dist/{live-CYJ4KGoR.mjs → live-Dw7NF1t2.mjs} +1 -1
- package/dist/load-user-env-ztmIyiLx.mjs +34 -0
- package/dist/{local-d1-CFcH9Bx3.mjs → local-d1-BnVb7Fem.mjs} +1 -1
- package/dist/login-DBs8JuSl.mjs +1 -0
- package/dist/{login-TA51e5Fw.mjs → login-DOE-MkeK.mjs} +4 -4
- package/dist/{logs-BlyAxlvx.mjs → logs-CUsjihc3.mjs} +4 -4
- package/dist/migrate-BYhoIK9R.mjs +1 -0
- package/dist/{migrate-BH6LCr00.mjs → migrate-DtoKdGas.mjs} +6 -6
- package/dist/nitro.mjs +3 -3
- package/dist/{node-B0otYjDv.mjs → node-D9dPyUr0.mjs} +4 -4
- package/dist/operator-ai-logging-DFTEp81Z.mjs +121 -0
- package/dist/{operator-args-DuKAQ3Ks.mjs → operator-args-BCCohcz3.mjs} +10 -1
- package/dist/{operator-cmd-CoHlJjcT.mjs → operator-cmd-CQOQrUiO.mjs} +27 -7
- package/dist/operator-cmd-xCACDtT1.mjs +1 -0
- package/dist/output-BsdnNpxa.mjs +1 -0
- package/dist/{output-CXJTIAtF.mjs → output-DNVILSz2.mjs} +1 -1
- package/dist/pages/client.d.mts +28 -3
- package/dist/pages/client.mjs +146 -27
- package/dist/pages/head.d.mts +2 -2
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +5 -4
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +6 -2
- package/dist/pages/islands-plugin.mjs +18 -3
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/platform-args-DSi4_M8n.mjs +1 -0
- package/dist/{platform-args-DfT8yQBF.mjs → platform-args-DtpHS_75.mjs} +1 -1
- package/dist/{platform-auth-config-MO0VdVs9.mjs → platform-auth-config-fLwIS5VG.mjs} +6 -6
- package/dist/{platform-auth-protection-Dv208eyL.mjs → platform-auth-protection-BTRI_YwD.mjs} +4 -4
- package/dist/{platform-auth-recovery-DvAQ674F.mjs → platform-auth-recovery-DPK2Mvmo.mjs} +4 -4
- package/dist/{platform-cmd-BpUA19r_.mjs → platform-cmd-BLy5uCa-.mjs} +1 -1
- package/dist/{platform-cmd-dlSxrcQ7.mjs → platform-cmd-HS_FSthn.mjs} +7 -7
- package/dist/{platform-domain-DSO4eUEw.mjs → platform-domain-CHpcq_qg.mjs} +4 -4
- package/dist/{platform-lifecycle-CfcFygHb.mjs → platform-lifecycle-B6LUBwjS.mjs} +1 -1
- package/dist/{platform-lifecycle-BSvsyB_x.mjs → platform-lifecycle-D2RS7DE0.mjs} +239 -29
- package/dist/{platform-management-BMdyt667.mjs → platform-management-C-T0ch4y.mjs} +1 -1
- package/dist/{platform-management-CrP1XhVd.mjs → platform-management-d3ETv3Dw.mjs} +15 -15
- package/dist/{platform-plans-config-CgDiwflR.mjs → platform-plans-config-B7yJQKf7.mjs} +116 -32
- package/dist/{platform-recovery-CHWwXVZ6.mjs → platform-recovery-DS5CAsly.mjs} +2 -2
- package/dist/{platform-setup-BTQVbnTC.mjs → platform-setup-Casiffqj.mjs} +2 -2
- package/dist/{plugin-inference-g66Q1Mx9.mjs → plugin-inference-DZHmVe1f.mjs} +4 -4
- package/dist/{prepare-DXduEwQp.mjs → prepare-AVM4Hj3T.mjs} +10 -10
- package/dist/prepare-BSXKz6m8.mjs +1 -0
- package/dist/{prepare-DJYHjpzq.mjs → prepare-DMk8NAO-.mjs} +3 -3
- package/dist/{prerender-render-BN9Lmebs.mjs → prerender-render-BAdYhivW.mjs} +15 -2
- package/dist/prerender-render.d.mts +2 -0
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-Dfb1Sg8w.mjs → project-cmd-TQKAOTMV.mjs} +17 -17
- package/dist/{project-paths-G0yut6Zz.mjs → project-paths-CUhCPMpK.mjs} +33 -2
- package/dist/{project-team-BO2dyc7S.mjs → project-team-B1OKeb-T.mjs} +4 -4
- package/dist/{project-token-ByO2mEI2.mjs → project-token-RW_wpmN-.mjs} +4 -4
- package/dist/{project-tsconfig-nhnTWO_Y.mjs → project-tsconfig-MyRJgufB.mjs} +1 -1
- package/dist/{project-zero-trust-CoQfwRBR.mjs → project-zero-trust-TNc66p0_.mjs} +4 -4
- package/dist/{protocol-yxdHxFLN.mjs → protocol-IPSWHolJ.mjs} +233 -76
- package/dist/{protocol-xZMvWsrg.d.mts → protocol-YS3tbxWE.d.mts} +10 -3
- package/dist/{provision-CMH4-8ri.mjs → provision-BLdkpFT4.mjs} +1 -1
- package/dist/{provision-D5q-ptD3.mjs → provision-bgQTi5QZ.mjs} +2 -2
- package/dist/redirect-Dqb4fEc5.mjs +80 -0
- package/dist/{requests-CPOiDkjh.mjs → requests-Cj15-yrI.mjs} +3 -3
- package/dist/resolve-project-C5wC-Hoi.mjs +1 -0
- package/dist/{resolve-project-ClvLMTI9.mjs → resolve-project-Da3OgCU1.mjs} +1 -1
- package/dist/{rollback-BfCs2la4.mjs → rollback-CYnkng7B.mjs} +4 -4
- package/dist/{route-types-Cl3x0Q8B.mjs → route-types-C6eAOmOj.mjs} +4 -3
- package/dist/routes-stub.d.mts +4 -3
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/auth.mjs +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.d.mts +1 -1
- package/dist/runtime/client-solid.d.mts +1 -1
- package/dist/runtime/client-svelte.d.mts +1 -1
- package/dist/runtime/client-vue.d.mts +1 -1
- package/dist/runtime/client.d.mts +1 -1
- package/dist/runtime/db.d.mts +6 -3
- package/dist/runtime/db.mjs +2 -2
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +53 -39
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/routing.d.mts +8 -3
- package/dist/runtime/routing.mjs +164 -23
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws-server.mjs +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-L8OSv1f7.mjs → scan-4YOxDaw2.mjs} +230 -29
- package/dist/{secret-CuI6LTpD.mjs → secret-BSf7dgg_.mjs} +6 -6
- package/dist/{skills-BBO9wMjB.mjs → skills-CoBB9_Ao.mjs} +1 -1
- package/dist/{ast-bindings-BkivMJIo.mjs → static-exports-DFkzL-NX.mjs} +96 -33
- package/dist/{subcommand-prompt-BZMnCA8T.mjs → subcommand-prompt-0yIARXf2.mjs} +2 -2
- package/dist/{types-agfx0alu.d.mts → types-IPut3_Yx.d.mts} +15 -1
- package/dist/url-DaehRGKR.mjs +106 -0
- package/dist/{version-metadata-eUd6Ar_U.mjs → version-metadata-CeftH0fQ.mjs} +1 -1
- package/dist/{wrangler-k40T7XTQ.mjs → wrangler-B1gkT_wC.mjs} +3 -3
- package/dist/wrangler-fNGvPTlO.mjs +1 -0
- package/dist/{wrapper-BGsi_uHs.mjs → wrapper-xJ4LP5A7.mjs} +3 -3
- package/dist/{ws-DB8Feytg.d.mts → ws-C2zy0QBf.d.mts} +2 -2
- package/docs/guide/ai.md +2 -1
- package/docs/guide/app-types.md +1 -0
- package/docs/guide/auth.md +23 -27
- package/docs/guide/database/d1.md +18 -1
- package/docs/guide/database/mysql.md +1 -0
- package/docs/guide/database/postgresql.md +1 -0
- package/docs/guide/database.md +30 -27
- package/docs/guide/deployment.md +3 -2
- package/docs/guide/durable-state.md +1 -0
- package/docs/guide/edge/headers.md +4 -3
- package/docs/guide/edge/prerendering.md +6 -5
- package/docs/guide/edge/redirects.md +2 -1
- package/docs/guide/edge/revalidation.md +6 -1
- package/docs/guide/edge/rewrites.md +2 -1
- package/docs/guide/edge/static-assets.md +5 -0
- package/docs/guide/email/domains.md +1 -0
- package/docs/guide/email/receiving.md +3 -2
- package/docs/guide/email/sending.md +7 -4
- package/docs/guide/email.md +1 -0
- package/docs/guide/env-vars.md +4 -0
- package/docs/guide/index.md +1 -0
- package/docs/guide/jobs.md +1 -0
- package/docs/guide/kv.md +1 -0
- package/docs/guide/live.md +2 -1
- package/docs/guide/pages-routing/actions-and-forms.md +58 -22
- package/docs/guide/pages-routing/errors.md +109 -0
- package/docs/guide/pages-routing/head.md +45 -1
- package/docs/guide/pages-routing/islands.md +4 -1
- package/docs/guide/pages-routing/layouts.md +4 -1
- package/docs/guide/pages-routing/loaders.md +4 -1
- package/docs/guide/pages-routing/markdown.md +6 -4
- package/docs/guide/pages-routing/overview.md +16 -20
- package/docs/guide/pages-routing/view-transitions.md +1 -0
- package/docs/guide/platform/administration/access.md +1 -0
- package/docs/guide/platform/administration/connected-apps.md +13 -2
- package/docs/guide/platform/administration/email.md +1 -0
- package/docs/guide/platform/administration/operations.md +1 -0
- package/docs/guide/platform/administration/plans.md +35 -1
- package/docs/guide/platform/administration/projects.md +16 -1
- package/docs/guide/platform/administration/zero-trust.md +1 -0
- package/docs/guide/platform/development/local.md +1 -0
- package/docs/guide/platform/development/runtime.md +1 -0
- package/docs/guide/platform/development/schema-ci.md +1 -0
- package/docs/guide/platform/installation/ci.md +1 -0
- package/docs/guide/platform/installation/credentials.md +12 -9
- package/docs/guide/platform/installation/domains.md +1 -0
- package/docs/guide/platform/installation/first-deployment.md +1 -0
- package/docs/guide/platform/installation/maintenance.md +8 -1
- package/docs/guide/platform/installation/prerequisites.md +1 -0
- package/docs/guide/platform/installation/setup.md +9 -7
- package/docs/guide/platform/installation/uninstall.md +1 -0
- package/docs/guide/platform-administration.md +1 -0
- package/docs/guide/platform-development.md +1 -0
- package/docs/guide/project-collaboration.md +1 -0
- package/docs/guide/queues.md +3 -0
- package/docs/guide/quickstart.md +3 -2
- package/docs/guide/remote-dev.md +1 -0
- package/docs/guide/sandboxes.md +1 -0
- package/docs/guide/self-hosted-platform.md +1 -0
- package/docs/guide/server-routing.md +3 -2
- package/docs/guide/sse.md +2 -1
- package/docs/guide/ssg.md +18 -6
- package/docs/guide/ssr.md +1 -0
- package/docs/guide/storage.md +2 -1
- package/docs/guide/testing.md +64 -0
- package/docs/guide/type-safety.md +24 -21
- package/docs/guide/typed-fetch.md +1 -0
- package/docs/guide/websockets.md +1 -0
- package/docs/index.md +1 -0
- package/docs/integrations/agents.md +1 -0
- package/docs/integrations/cloudflare.md +7 -2
- package/docs/integrations/frameworks/analog.md +1 -0
- package/docs/integrations/frameworks/astro.md +1 -0
- package/docs/integrations/frameworks/nuxt.md +2 -1
- package/docs/integrations/frameworks/overview.md +1 -0
- package/docs/integrations/frameworks/react-router.md +1 -0
- package/docs/integrations/frameworks/sveltekit.md +1 -0
- package/docs/integrations/frameworks/tanstack-start.md +1 -0
- package/docs/integrations/hono.md +22 -0
- package/docs/integrations/nodejs-bun-deno.md +5 -4
- package/docs/reference/api/auth.md +23 -4
- package/docs/reference/api/client.md +1 -0
- package/docs/reference/api/database.md +24 -1
- package/docs/reference/api/deploy.md +4 -0
- package/docs/reference/api/durable.md +1 -0
- package/docs/reference/api/env.md +1 -0
- package/docs/reference/api/handlers.md +1 -0
- package/docs/reference/api/pages.md +38 -16
- package/docs/reference/api/plugin.md +1 -0
- package/docs/reference/api/resources.md +2 -1
- package/docs/reference/api/rewrites.md +9 -4
- package/docs/reference/api/types.md +1 -0
- package/docs/reference/api.md +2 -1
- package/docs/reference/cli/auth.md +1 -0
- package/docs/reference/cli/database.md +1 -0
- package/docs/reference/cli/deploy.md +5 -2
- package/docs/reference/cli/domains.md +1 -0
- package/docs/reference/cli/email.md +1 -0
- package/docs/reference/cli/generate.md +1 -0
- package/docs/reference/cli/github.md +1 -0
- package/docs/reference/cli/platform-config.md +4 -3
- package/docs/reference/cli/platform-email.md +1 -0
- package/docs/reference/cli/platform-installation.md +1 -0
- package/docs/reference/cli/platform-operations.md +1 -0
- package/docs/reference/cli/platform-users.md +71 -1
- package/docs/reference/cli/platform-zero-trust.md +1 -0
- package/docs/reference/cli/platform.md +1 -0
- package/docs/reference/cli/project.md +1 -0
- package/docs/reference/cli/secrets.md +1 -0
- package/docs/reference/cli/setup.md +1 -0
- package/docs/reference/cli.md +3 -0
- package/docs/reference/config.md +8 -3
- package/docs/reference/resource-inference.md +1 -0
- package/docs/reference/structure.md +1 -0
- package/package.json +25 -25
- package/skills/void/SKILL.md +3 -1
- package/dist/action-key-XtKKbbsi.mjs +0 -25
- package/dist/client-BAxLpSKv.mjs +0 -1
- package/dist/deploy-DEZkUS77.mjs +0 -2
- package/dist/discover-1DJD4YXD.mjs +0 -1
- package/dist/gen-C6iknRdI.mjs +0 -1
- package/dist/help-C_cqTByy.mjs +0 -1
- package/dist/load-user-env-CSwdofj0.mjs +0 -48
- package/dist/login-C4q1S-5b.mjs +0 -1
- package/dist/migrate-CVBsSFhC.mjs +0 -1
- package/dist/operator-cmd-DnaCnCSP.mjs +0 -1
- package/dist/output-CNsMDEd2.mjs +0 -1
- package/dist/platform-args-B7-wQ0_B.mjs +0 -1
- package/dist/prepare-Bx4a8cb1.mjs +0 -1
- package/dist/resolve-project-BALVa9q0.mjs +0 -1
- package/dist/url-CuoEn0o3.mjs +0 -43
- package/dist/wrangler-R3kMdJfw.mjs +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Send transactional email with sendEmail. Void captures messages in a local inbox during development.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -91,7 +92,7 @@ On your own Cloudflare account, `from` defaults to `email.from` from `void.confi
|
|
|
91
92
|
|
|
92
93
|
## Reply later {#reply-later}
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
To reply from a queue job or another later task, save the incoming message's thread IDs and pass them to `sendEmail`:
|
|
95
96
|
|
|
96
97
|
```ts
|
|
97
98
|
// email/support.ts
|
|
@@ -116,7 +117,9 @@ await sendEmail({
|
|
|
116
117
|
});
|
|
117
118
|
```
|
|
118
119
|
|
|
119
|
-
|
|
120
|
+
Mail clients use `threading` to show the reply in the same conversation. Set `inReplyTo` to the parent's `Message-ID`. For a longer thread, set `references` to the earlier IDs in order, ending with the parent; otherwise it defaults to `inReplyTo`.
|
|
121
|
+
|
|
122
|
+
Use `threading` rather than custom `In-Reply-To` or `References` headers. Invalid thread IDs are omitted without stopping the send. For an immediate reply inside the inbound handler, use [`replyEmail()`](./receiving.md#threaded-replies).
|
|
120
123
|
|
|
121
124
|
## Attachments {#attachments}
|
|
122
125
|
|
|
@@ -232,7 +235,7 @@ Remove the deprecated `sendInDev` option to use the local inbox. Deploy the app
|
|
|
232
235
|
Use the test harness to assert on outgoing messages without mocking the binding:
|
|
233
236
|
|
|
234
237
|
```ts
|
|
235
|
-
import { describe, it, expect } from '
|
|
238
|
+
import { describe, it, expect } from 'vite-plus/test';
|
|
236
239
|
import { sendEmail } from 'void/email';
|
|
237
240
|
import { createEmailTestHarness } from 'void/email/testing';
|
|
238
241
|
|
|
@@ -254,6 +257,6 @@ describe('signup flow', () => {
|
|
|
254
257
|
});
|
|
255
258
|
```
|
|
256
259
|
|
|
257
|
-
The harness intercepts every `sendEmail` call until `dispose()` is called. `clear()` empties the captured list without releasing the sink.
|
|
260
|
+
The harness intercepts every `sendEmail` call until `dispose()` is called. `clear()` empties the captured list without releasing the sink. [Testing](../testing.md) explains how to run tests and how to test code that uses other bindings.
|
|
258
261
|
|
|
259
262
|
To handle incoming messages, see [Receiving Email](./receiving.md).
|
package/docs/guide/email.md
CHANGED
package/docs/guide/env-vars.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Declare environment variables in env.ts and read the typed values from void/env. Use .env locally and secrets in production.'
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Environment variables
|
|
2
6
|
|
|
3
7
|
Declare your environment variables in `env.ts`, then read them through `env` from `void/env`. Use `.env` for local values and `void secret put` for production server values.
|
package/docs/guide/index.md
CHANGED
package/docs/guide/jobs.md
CHANGED
package/docs/guide/kv.md
CHANGED
package/docs/guide/live.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Subscribe a browser to several topics over one SSE connection, and publish events from routes, jobs, or queues.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -77,7 +78,7 @@ stream.close();
|
|
|
77
78
|
|
|
78
79
|
Subscription IDs are scoped to a connection. Reusing an ID replaces its subscription. After reconnecting, the helper restores active subscriptions and sends their latest `eventId` as `lastEventId`.
|
|
79
80
|
|
|
80
|
-
With [`routing.typedRoutes`](../reference/config.md#routing-typedroutes), the URL
|
|
81
|
+
With [`routing.typedRoutes`](../reference/config.md#routing-typedroutes), TypeScript checks the URL against your routes. External `http://` and `https://` URLs also work. For a URL you validate at runtime, use `as RouteUrl` from `void/routes` to skip the type check.
|
|
81
82
|
|
|
82
83
|
## Publish
|
|
83
84
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Change server data from a form or button with a page action. Actions accept POST, PUT, PATCH, and DELETE.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -149,21 +150,22 @@ The types are inferred from your action's `withValidator()` schema in the compan
|
|
|
149
150
|
|
|
150
151
|
`useForm` returns a reactive object with:
|
|
151
152
|
|
|
152
|
-
| Property / Method | Purpose
|
|
153
|
-
| -------------------------------- |
|
|
154
|
-
| `data` / `setData` | Current form values, typed to match the action's body schema.
|
|
155
|
-
| `errors` | Field-level validation errors, keys typed to body field names.
|
|
156
|
-
| `error` | Action error, or `null`.
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
159
|
-
| `
|
|
160
|
-
| `
|
|
161
|
-
| `
|
|
162
|
-
| `
|
|
163
|
-
| `
|
|
164
|
-
| `
|
|
165
|
-
| `
|
|
166
|
-
| `
|
|
153
|
+
| Property / Method | Purpose |
|
|
154
|
+
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| `data` / `setData` | Current form values, typed to match the action's body schema. |
|
|
156
|
+
| `errors` | Field-level validation errors, keys typed to body field names. |
|
|
157
|
+
| `error` | Action error, or `null`. |
|
|
158
|
+
| `throwOnError` (option) | Set to `false` to keep authentication and server failures in `form.error` instead of throwing them. |
|
|
159
|
+
| `post`, `put`, `patch`, `delete` | Submit the form with that method. In React these are native form action callbacks. |
|
|
160
|
+
| `pending` | `true` while the submission is in flight. |
|
|
161
|
+
| `hasChanges` | `true` if form data differs from the current defaults. After a successful submit, defaults update to the submitted values, so `hasChanges` becomes `false` unless the form was edited during the submit. |
|
|
162
|
+
| `wasSuccessful` | `true` after a successful submission. Stays `true` until the next submission. |
|
|
163
|
+
| `recentlySuccessful` | `true` for 2 seconds after a successful submission. Useful for flash messages. |
|
|
164
|
+
| `reset(...fields)` | Reset form data to the current defaults (last submitted values after success). Field names autocomplete. Pass `{ initial: true }` first to reset to the values passed to `useForm`. |
|
|
165
|
+
| `resetOnSuccess` (option) | When `true`, a successful submit resets defaults to the mount-time values, and form data too unless it was edited during the submit. Useful for create forms that should clear after save. |
|
|
166
|
+
| `setError(field, message)` | Set a client-side validation error on a field. |
|
|
167
|
+
| `clearErrors(...fields)` | Clear validation errors. Field names autocomplete. |
|
|
168
|
+
| `clearError()` | Clear `error`. |
|
|
167
169
|
|
|
168
170
|
Use `setError()` for client-side validation. Editing a field clears its error automatically.
|
|
169
171
|
|
|
@@ -198,10 +200,28 @@ const form = useForm(
|
|
|
198
200
|
|
|
199
201
|
`onError` receives a field-error map or a `VoidActionError`. Callbacks can be async; `form.pending` stays true until they finish, and thrown errors reach the nearest React error boundary. Callbacks run before React commits the updated UI, so use an effect or ref callback to focus an element that appears after submission.
|
|
200
202
|
|
|
201
|
-
|
|
203
|
+
When awaiting `router.visit()` or `router.refresh()` inside a callback, pass `{ resolveOn: 'data' }`. The callback can then finish before React commits the navigation. See [React navigation completion](../../reference/api/pages.md#react-navigation-completion).
|
|
202
204
|
|
|
203
205
|
Vue, Svelte, and Solid submissions return a promise instead; use `await form.post()` to run work after a submission.
|
|
204
206
|
|
|
207
|
+
### Query parameters after submission
|
|
208
|
+
|
|
209
|
+
Actions and forms keep the current page's query parameters when submitting to that page. For example, from `/items?page=2&search=foo`:
|
|
210
|
+
|
|
211
|
+
```ts
|
|
212
|
+
import { action } from '@void/react'; // or "@void/vue", "@void/svelte", "@void/solid"
|
|
213
|
+
|
|
214
|
+
// The action and loader receive page=2 and search=foo.
|
|
215
|
+
await action('/items?vote');
|
|
216
|
+
|
|
217
|
+
// An explicit parameter overrides the current page's value.
|
|
218
|
+
await action('/items?vote&page=1');
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
The page URL, scroll position, and history entry stay unchanged.
|
|
222
|
+
|
|
223
|
+
A redirect from the action does not receive the page's query parameters. To clear them after an action, return `c.redirect('/items')`.
|
|
224
|
+
|
|
205
225
|
### Scroll after submission
|
|
206
226
|
|
|
207
227
|
Actions and forms keep the current scroll position when updating the page in place. Redirects and submissions that open another page scroll to the top, or to the destination's hash target.
|
|
@@ -247,7 +267,7 @@ export const actions = {
|
|
|
247
267
|
};
|
|
248
268
|
```
|
|
249
269
|
|
|
250
|
-
Named actions use a `?actionName` suffix, such as `/users/42?update`. `useForm` and `action()` handle this automatically. After a POST action renders the page or uses a default `c.redirect()`, the page URL keeps ordinary query parameters: `/users/42?update&tab=profile` becomes `/users/42?tab=profile`. See [redirect query parameters](../../reference/api/rewrites.md#c-rewrite-destination) for redirects that preserve the request method.
|
|
270
|
+
Named actions use a `?actionName` suffix, such as `/users/42?update`. `useForm` and `action()` handle this automatically. After a POST action renders the page or uses a default `c.redirect()`, the page URL keeps the action URL's ordinary query parameters: `/users/42?update&tab=profile` becomes `/users/42?tab=profile`. See [redirect query parameters](../../reference/api/rewrites.md#c-rewrite-destination) for redirects that preserve the request method.
|
|
251
271
|
|
|
252
272
|
Use `action` or `actions` in a file, not both.
|
|
253
273
|
|
|
@@ -293,7 +313,9 @@ if (!result.ok) {
|
|
|
293
313
|
|
|
294
314
|
`action()` defaults to `POST`. Pass `data`, `params`, and `method` to set the body, route parameters, or HTTP method.
|
|
295
315
|
|
|
296
|
-
A successful call returns `{ ok: true, pageData }`. Expected errors, such as validation failures or conflicts, return `{ ok: false, error }`.
|
|
316
|
+
A successful call returns `{ ok: true, pageData }`. Expected errors, such as validation failures or conflicts, return `{ ok: false, error }`.
|
|
317
|
+
|
|
318
|
+
For `4xx` errors, `error.message` uses the [`HTTPException`](../../integrations/hono.md#utilities) message or the body of a plain-text response. Other response formats use a status summary, such as `Action failed with 404 Not Found`.
|
|
297
319
|
|
|
298
320
|
## Validation Errors
|
|
299
321
|
|
|
@@ -301,9 +323,21 @@ A successful call returns `{ ok: true, pageData }`. Expected errors, such as val
|
|
|
301
323
|
|
|
302
324
|
Expected errors such as `400`, `404`, `409`, `422`, and `429` stay with the form or action call. `useForm` stores them in `form.errors` or `form.error`; `action()` returns `{ ok: false, error }`.
|
|
303
325
|
|
|
304
|
-
|
|
326
|
+
By default, authentication errors (`401`, `403`) and server errors (`500`, `502`) are thrown. Handle them with your framework's error boundary or error handling.
|
|
305
327
|
|
|
306
|
-
|
|
328
|
+
To keep the form visible when a request fails, pass `throwOnError: false`:
|
|
329
|
+
|
|
330
|
+
```ts
|
|
331
|
+
import { useForm } from '@void/react'; // or "@void/vue", "@void/svelte", "@void/solid"
|
|
332
|
+
|
|
333
|
+
const form = useForm('/users', { name: '', email: '' }, { throwOnError: false });
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Validation errors appear in `form.errors`; other HTTP failures appear in `form.error`. `Form` displays the error for you. In React, `onError` also receives it.
|
|
337
|
+
|
|
338
|
+
Network errors and other unexpected failures still throw. Cancelled submissions don't set a form error.
|
|
339
|
+
|
|
340
|
+
Use `isVoidActionError()` to read an action error's `status` and `message`, including thrown errors:
|
|
307
341
|
|
|
308
342
|
```ts
|
|
309
343
|
import { isVoidActionError } from '@void/react'; // or "@void/vue", "@void/svelte", "@void/solid"
|
|
@@ -317,6 +351,8 @@ function describeError(error: unknown) {
|
|
|
317
351
|
}
|
|
318
352
|
```
|
|
319
353
|
|
|
354
|
+
Use `isCallSiteActionError()` to recognize only the expected errors returned by `action()`.
|
|
355
|
+
|
|
320
356
|
Actions can throw `ValidationError` for custom validation logic:
|
|
321
357
|
|
|
322
358
|
```ts
|
|
@@ -363,8 +399,8 @@ export default function Upload() {
|
|
|
363
399
|
|
|
364
400
|
```vue [Vue]
|
|
365
401
|
<script setup lang="ts">
|
|
366
|
-
import { ref } from 'vue';
|
|
367
402
|
import { Form, useForm } from '@void/vue';
|
|
403
|
+
import { ref } from 'vue';
|
|
368
404
|
|
|
369
405
|
const form = useForm('/photos', { title: '', photo: null as File | null });
|
|
370
406
|
const fileInput = ref<HTMLInputElement>();
|
|
@@ -443,7 +479,7 @@ export const action = defineHandler(async (c) => {
|
|
|
443
479
|
});
|
|
444
480
|
```
|
|
445
481
|
|
|
446
|
-
`withValidator({ body })` accepts
|
|
482
|
+
`withValidator({ body })` also accepts uploads. Nested field names such as `profile[name]`, `tags[0]`, and `tags[]` become objects and arrays. Coerce other values in your schema: booleans arrive as `'1'` or `'0'`, numbers and dates as strings, and `null` as `''`.
|
|
447
483
|
|
|
448
484
|
Pick the storage key on the server and allow only the file types you expect. See [Serving Files](../storage.md#serving-files) to send them back safely.
|
|
449
485
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Show not-found and error states inside your layouts with _not-found and _error components.'
|
|
3
|
+
outline: deep
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Not Found & Errors
|
|
7
|
+
|
|
8
|
+
Keep your app's navigation and layout visible when a page is missing or fails. Add `_not-found` and `_error` components to `pages/`; both receive an `error` prop with `status` and `message`:
|
|
9
|
+
|
|
10
|
+
::: code-group
|
|
11
|
+
|
|
12
|
+
```tsx [React]
|
|
13
|
+
// pages/_error.tsx (or pages/_not-found.tsx)
|
|
14
|
+
import type { ErrorPageProps } from '@void/react';
|
|
15
|
+
|
|
16
|
+
export default function ErrorPage({ error }: ErrorPageProps) {
|
|
17
|
+
return (
|
|
18
|
+
<main>
|
|
19
|
+
<h1>{error.status}</h1>
|
|
20
|
+
<p>{error.message}</p>
|
|
21
|
+
<a href="/">Go home</a>
|
|
22
|
+
</main>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```vue [Vue]
|
|
28
|
+
<!-- pages/_error.vue (or pages/_not-found.vue) -->
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import type { ErrorPageProps } from '@void/vue';
|
|
31
|
+
|
|
32
|
+
defineProps<ErrorPageProps>();
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<main>
|
|
37
|
+
<h1>{{ error.status }}</h1>
|
|
38
|
+
<p>{{ error.message }}</p>
|
|
39
|
+
<a href="/">Go home</a>
|
|
40
|
+
</main>
|
|
41
|
+
</template>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```svelte [Svelte]
|
|
45
|
+
<!-- pages/_error.svelte (or pages/_not-found.svelte) -->
|
|
46
|
+
<script lang="ts">
|
|
47
|
+
import type { ErrorPageProps } from '@void/svelte';
|
|
48
|
+
|
|
49
|
+
let { error }: ErrorPageProps = $props();
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<main><h1>{error.status}</h1><p>{error.message}</p><a href="/">Go home</a></main>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```tsx [Solid]
|
|
56
|
+
// pages/_error.tsx (or pages/_not-found.tsx)
|
|
57
|
+
import type { ErrorPageProps } from '@void/solid';
|
|
58
|
+
|
|
59
|
+
export default function ErrorPage(props: ErrorPageProps) {
|
|
60
|
+
return (
|
|
61
|
+
<main>
|
|
62
|
+
<h1>{props.error.status}</h1>
|
|
63
|
+
<p>{props.error.message}</p>
|
|
64
|
+
<a href="/">Go home</a>
|
|
65
|
+
</main>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
:::
|
|
71
|
+
|
|
72
|
+
## Missing pages
|
|
73
|
+
|
|
74
|
+
To show `_not-found` when a product doesn't exist, return a 404 from its loader. This works the same way in all four adapters:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
// pages/products/[id].server.ts
|
|
78
|
+
import { defineHandler } from 'void/handler';
|
|
79
|
+
|
|
80
|
+
export const loader = defineHandler((c) => c.notFound());
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Throwing `HTTPException(404)` also shows `_not-found`. A root `pages/_not-found` handles URLs that don't match any page or API route.
|
|
84
|
+
|
|
85
|
+
In middleware, `c.notFound()` shows the root `_not-found` without running a page loader. To send a custom response instead, return `c.text('Not Found', 404)`.
|
|
86
|
+
|
|
87
|
+
## Failed pages
|
|
88
|
+
|
|
89
|
+
`_error` handles unexpected loader and rendering failures. In production, visitors see a generic message and error details stay in your server logs. Development shows the error message.
|
|
90
|
+
|
|
91
|
+
Action errors that reach a client boundary keep their HTTP status and public message. Redirects, authentication responses, and API errors keep their usual behavior.
|
|
92
|
+
|
|
93
|
+
## Nested errors
|
|
94
|
+
|
|
95
|
+
Put an error component in a subdirectory to customize that section. Void uses the closest one and keeps its surrounding layouts. If a layout fails, an error component outside that layout handles it. If an error component fails, Void tries an outer one, then its built-in error page.
|
|
96
|
+
|
|
97
|
+
Boundary components don't have `.server` companions, actions, or their own `layout` export. They aren't routes: `/error` and `/not-found` remain available for ordinary pages. `.dev` and `.prod` variants work like other Pages components.
|
|
98
|
+
|
|
99
|
+
## Recovery
|
|
100
|
+
|
|
101
|
+
Call `useRouter().refresh()` from an interactive error component to retry the page's loader. It fetches fresh data without repeating a form submission. A regular link or document reload also works. Error responses aren't cached by the client router.
|
|
102
|
+
|
|
103
|
+
Client rendering errors use your framework's error boundaries. Event handlers, detached async tasks, and independent islands keep the framework's usual error handling. For deferred data, React can throw rejected promises during rendering; Vue, Svelte, and Solid expose an error state your component can display.
|
|
104
|
+
|
|
105
|
+
## Rendering modes
|
|
106
|
+
|
|
107
|
+
With `ssr = false`, the error component renders in the browser. Island pages render errors on the server without a client router. Error components receive the shared context of the page they replace.
|
|
108
|
+
|
|
109
|
+
With `output: 'static'`, a root `_not-found` produces `404.html` unless you provide one. It renders at build time with empty shared data and parameters, without request middleware or hydration. Keep it and its layouts usable without a signed-in user. Your static host sets the response status for unknown URLs.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Set a page title and metadata with head(), middleware, or site-wide defaults.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -79,19 +80,62 @@ export default defineMiddleware(async (c, next) => {
|
|
|
79
80
|
});
|
|
80
81
|
```
|
|
81
82
|
|
|
83
|
+
`headDefaults` also accepts `titleTemplate`, which replaces the config's template for the requests the middleware runs on. Use it to give one section of the site its own title suffix:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
// middleware/admin.ts
|
|
87
|
+
import { defineMiddleware } from 'void';
|
|
88
|
+
|
|
89
|
+
export default defineMiddleware(async (c, next) => {
|
|
90
|
+
if (c.req.path.startsWith('/admin')) {
|
|
91
|
+
c.set('headDefaults', { ...c.get('headDefaults'), titleTemplate: '%s | Admin' });
|
|
92
|
+
}
|
|
93
|
+
await next();
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
A page returning `{ title: "Users" }` under `/admin` produces `<title>Users | Admin</title>`. Other pages keep the config's template.
|
|
98
|
+
|
|
99
|
+
To drop the suffix entirely for a section, including the config's, set the template to an empty string: `c.set('headDefaults', { ...c.get('headDefaults'), titleTemplate: '' })`. A page returning `{ title: "Users" }` under `/admin` then produces `<title>Users</title>`.
|
|
100
|
+
|
|
82
101
|
## Precedence
|
|
83
102
|
|
|
84
103
|
When multiple layers provide head data, they merge with this precedence:
|
|
85
104
|
|
|
86
105
|
| Field | Behavior |
|
|
87
106
|
| ----------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
88
|
-
| `title` | Page wins. `titleTemplate` from config wraps the winning title.
|
|
107
|
+
| `title` | Page wins. `titleTemplate` from middleware, or else from config, wraps the winning title. |
|
|
89
108
|
| `meta` | Deduplicates by `name` or `property`. Page entries override matching keys, and non-conflicting entries are appended. |
|
|
90
109
|
| `link` | Concatenated: config first, then middleware, then page. |
|
|
91
110
|
| `script` | Concatenated: config first, then middleware, then page. |
|
|
92
111
|
| `htmlAttrs` | Shallow merge, page wins conflicts. |
|
|
93
112
|
| `bodyAttrs` | Shallow merge, page wins conflicts. |
|
|
94
113
|
|
|
114
|
+
## Absolute crawler URLs
|
|
115
|
+
|
|
116
|
+
Social crawlers and link previews only read an absolute URL. These meta tags are resolved against the request URL when their `content` is a relative path, so you can write them without knowing the origin:
|
|
117
|
+
|
|
118
|
+
- `og:image`, `og:image:url`, `og:image:secure_url`
|
|
119
|
+
- `og:video`, `og:video:url`, `og:video:secure_url`
|
|
120
|
+
- `og:audio`, `og:audio:url`, `og:audio:secure_url`
|
|
121
|
+
- `og:url`
|
|
122
|
+
- `twitter:image`
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
// void.config.ts
|
|
126
|
+
import { defineConfig } from 'void/config';
|
|
127
|
+
|
|
128
|
+
export default defineConfig({
|
|
129
|
+
head: {
|
|
130
|
+
meta: [{ property: 'og:image', content: '/og-image.jpg' }], // [!code highlight]
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
A request to `https://example.com/posts/hello` renders `<meta property="og:image" content="https://example.com/og-image.jpg">`. Values that are already absolute, and every other tag, are left as written. Config, middleware and page values resolve the same way, and the client receives the same absolute value on navigation.
|
|
136
|
+
|
|
137
|
+
Prerendered pages keep the value relative, because the build does not know the site's origin.
|
|
138
|
+
|
|
95
139
|
## HeadDescriptor
|
|
96
140
|
|
|
97
141
|
```ts
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Add interactive components to a server-rendered page. Only those islands send JavaScript to the browser.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -344,7 +345,9 @@ export default function PostForm() {
|
|
|
344
345
|
|
|
345
346
|
:::
|
|
346
347
|
|
|
347
|
-
`useIslandForm` provides the same form state as [`useForm`](./actions-and-forms#useform). Pass the action URL to `post`, `put`, `patch`, or `delete` to submit.
|
|
348
|
+
`useIslandForm` provides the same form state as [`useForm`](./actions-and-forms#useform). Pass the action URL to `post`, `put`, `patch`, or `delete` to submit.
|
|
349
|
+
|
|
350
|
+
With [`routing.typedRoutes`](../type-safety.md#checked-url-strings), the URL must match one of your routes. Use `routeUrl()` to build it, or `as RouteUrl` for a URL you validate at runtime. See [Checked URL strings](../type-safety.md#checked-url-strings).
|
|
348
351
|
|
|
349
352
|
Successful submissions reload the page; redirects navigate to their destination. A `422` response populates `errors` from `{ errors: { field: "message" } }`. Submit helpers return `Promise<void>`.
|
|
350
353
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Share navigation and other UI across pages. Layouts nest with your directories and keep their state during navigation.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -216,6 +217,8 @@ A named layout replaces the deepest default layout: in `[root, docs/layout]`, it
|
|
|
216
217
|
|
|
217
218
|
Void uses the closest matching `_layouts/` file in the page's directory or an ancestor. A missing named layout fails the build.
|
|
218
219
|
|
|
220
|
+
Export `layout` directly from the page as a string literal or `false`. Computed values and re-exports are ignored with a warning.
|
|
221
|
+
|
|
219
222
|
## Shared Data
|
|
220
223
|
|
|
221
224
|
Middleware can inject data available on every page via `c.set("shared", {...})`. Augment `CloudContextVariables` to type the shared data, and `useShared()` will infer the type automatically:
|
|
@@ -252,4 +255,4 @@ export const action = defineHandler(async (c) => {
|
|
|
252
255
|
});
|
|
253
256
|
```
|
|
254
257
|
|
|
255
|
-
|
|
258
|
+
If an action changes the user's profile, update shared data there too, as above. Middleware won't run again until the next page request. You can also redirect with `c.redirect()` to load the page and shared data again.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: "Load a page's data in a companion .server.ts file. The component receives that data as typed props."
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -26,7 +27,9 @@ export const loader = defineHandler(async (c) => {
|
|
|
26
27
|
|
|
27
28
|
`InferProps` infers the loader’s return type, so page props stay in sync with the data it returns.
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
Return data directly to preserve values such as `Date`, `Map`, `Set`, `bigint`, `RegExp`, `URL`, and `undefined`. Page props and shared data keep these types across rendering, hydration, navigation, and deferred loading, including repeated or cyclic references.
|
|
31
|
+
|
|
32
|
+
Returning `Response.json()` uses JSON conversion instead. Functions and custom class instances can't be sent as page data.
|
|
30
33
|
|
|
31
34
|
## Using the Data in Page Components
|
|
32
35
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Add Markdown files in pages/ as routes. They inherit layouts and ship JavaScript only for islands and client scripts.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -194,7 +195,6 @@ export default function DocsLayout({ children }) {
|
|
|
194
195
|
import { useFrontmatter } from '@void/md';
|
|
195
196
|
|
|
196
197
|
const fm = useFrontmatter();
|
|
197
|
-
// fm.title, fm.description, etc.
|
|
198
198
|
</script>
|
|
199
199
|
|
|
200
200
|
<template>
|
|
@@ -453,12 +453,14 @@ voidMarkdown({
|
|
|
453
453
|
shiki: {
|
|
454
454
|
themes: { light: 'github-light', dark: 'github-dark' },
|
|
455
455
|
},
|
|
456
|
+
copyLabel: 'Copy Code',
|
|
456
457
|
});
|
|
457
458
|
```
|
|
458
459
|
|
|
459
|
-
| Option | Type | Default | Description
|
|
460
|
-
| -------------- | -------------------------------- | ------------------------------------------------ |
|
|
461
|
-
| `shiki.themes` | `{ light: string; dark: string}` | `{ light: "github-light", dark: "github-dark" }` | Shiki color themes
|
|
460
|
+
| Option | Type | Default | Description |
|
|
461
|
+
| -------------- | -------------------------------- | ------------------------------------------------ | --------------------------------------------------------- |
|
|
462
|
+
| `shiki.themes` | `{ light: string; dark: string}` | `{ light: "github-light", dark: "github-dark" }` | Shiki color themes |
|
|
463
|
+
| `copyLabel` | `string` | `"Copy Code"` | Title of the code block copy button, for translated sites |
|
|
462
464
|
|
|
463
465
|
Code block languages load on demand from Shiki's bundled languages.
|
|
464
466
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Turn files in pages/ into routes. A server loader returns data, and the page component receives it as props.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -153,6 +154,8 @@ Render and prerender flags combine like this:
|
|
|
153
154
|
| Island page + `ssr = false` | Invalid. Island pages already use the island renderer. |
|
|
154
155
|
| `output: "static"` + `prerender` unset | Auto-prerender pages that have known paths, including client-only shells. |
|
|
155
156
|
|
|
157
|
+
Export `ssr` and `prerender` directly from `.server.ts` as `true` or `false`. Computed values and re-exports are ignored with a warning.
|
|
158
|
+
|
|
156
159
|
### Typed navigation
|
|
157
160
|
|
|
158
161
|
Use the `Link` component for SPA navigation between pages. Build dynamic URLs with [`routeUrl()`](../type-safety.md#typed-urls-and-navigation) to check the route pattern and its parameters:
|
|
@@ -199,7 +202,7 @@ import { routeUrl } from 'void/routes';
|
|
|
199
202
|
|
|
200
203
|
:::
|
|
201
204
|
|
|
202
|
-
|
|
205
|
+
Enable [`routing.typedRoutes`](../type-safety.md#checked-url-strings) to catch misspelled URLs in links and router calls. Apps created with `void init` already have it enabled.
|
|
203
206
|
|
|
204
207
|
`Link` also supports query data, history replacement, full-page navigation, and cancellation:
|
|
205
208
|
|
|
@@ -305,7 +308,7 @@ import { Link } from '@void/solid';
|
|
|
305
308
|
|
|
306
309
|
`prefetch` and `reloadDocument` work only with GET links. GET `data` becomes query parameters; use scalar values or arrays.
|
|
307
310
|
|
|
308
|
-
|
|
311
|
+
After an update that changes the page-data format, open tabs reload on their next navigation.
|
|
309
312
|
|
|
310
313
|
For programmatic navigation, use `useRouter()`. Pass a typed destination object to `visit()`, `prefetch()`, or `flush()`:
|
|
311
314
|
|
|
@@ -440,7 +443,7 @@ A link is active only on its own path by default. Set `activeMatch="prefix"` to
|
|
|
440
443
|
|
|
441
444
|
`aria-current="page"` marks only the exact page, so select `[aria-current="page"]` to style it differently from its section. A link to `/` is active only on the home page.
|
|
442
445
|
|
|
443
|
-
|
|
446
|
+
Query parameters let you distinguish pagination links from filter tabs. A link is active when the current URL contains all of its query parameters with the same values. Extra parameters and their order don't matter, and a GET link's `data` counts as part of its query:
|
|
444
447
|
|
|
445
448
|
| Current URL | Link | Active |
|
|
446
449
|
| ---------------------------- | ------------------------------ | --------------- |
|
|
@@ -451,7 +454,9 @@ A link without a query ignores the current query, as `/users?page=2` shows above
|
|
|
451
454
|
|
|
452
455
|
On nested pages, `activeMatch="prefix"` compares only the path, so `href="/reports?range=30d"` has `data-void-active` on `/reports/42`.
|
|
453
456
|
|
|
454
|
-
Paths
|
|
457
|
+
Paths are case-sensitive and respect trailing slashes; hashes are ignored. External and non-GET links are never active.
|
|
458
|
+
|
|
459
|
+
To mark a default filter such as an "All" tab, set `aria-current` or `data-void-active` yourself. Your value overrides the computed one.
|
|
455
460
|
|
|
456
461
|
### Pending links
|
|
457
462
|
|
|
@@ -465,32 +470,23 @@ a[data-void-pending] {
|
|
|
465
470
|
}
|
|
466
471
|
```
|
|
467
472
|
|
|
468
|
-
A
|
|
473
|
+
A pending link matches the destination's path, query, and hash. A link to `/users?page=2` won't show as pending while page 3 loads. Non-GET links also match the request method. During `router.refresh()`, links to the current page are pending.
|
|
469
474
|
|
|
470
475
|
A `data-void-pending` you pass to `Link` replaces the computed value. For a loading indicator that covers the whole page, use [`useNavigation()`](../../reference/api/pages.md).
|
|
471
476
|
|
|
472
477
|
### Prefetching
|
|
473
478
|
|
|
474
|
-
Add `prefetch` to a `Link` to load its page before the user clicks
|
|
479
|
+
Add `prefetch` to a `Link` to load its page before the user clicks. This markup works in all four adapters:
|
|
475
480
|
|
|
476
|
-
```
|
|
477
|
-
<Link href="/dashboard" prefetch>
|
|
478
|
-
Dashboard
|
|
479
|
-
</Link>
|
|
481
|
+
```html
|
|
482
|
+
<Link href="/dashboard" prefetch>Dashboard</Link>
|
|
480
483
|
```
|
|
481
484
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
To give every `Link` a prefetch strategy, set `prefetch.defaultStrategy` in the adapter plugin. A `Link` that sets its own `prefetch` keeps it:
|
|
485
|
-
|
|
486
|
-
```ts
|
|
487
|
-
// vite.config.ts
|
|
488
|
-
voidReact({ prefetch: { defaultStrategy: 'hover' } });
|
|
489
|
-
```
|
|
485
|
+
The page loads on hover, keyboard focus, or touch. The next visit can use the cached data. Use `cacheFor` to choose how long to reuse it.
|
|
490
486
|
|
|
491
|
-
|
|
487
|
+
For an app-wide default, set `prefetch.defaultStrategy` in your [adapter plugin](../../reference/api/pages.md#prefetching). A link's own `prefetch` value overrides it. Prefer `'hover'` or `'click'`; `'mount'` and `'visible'` can load many pages in a long list.
|
|
492
488
|
|
|
493
|
-
`Link`
|
|
489
|
+
`Link` skips prefetching when the browser reports data saver or a 2G connection. Only Chromium-based browsers report these settings. See [Prefetching](../../reference/api/pages.md#prefetching) for all strategies and cache options.
|
|
494
490
|
|
|
495
491
|
Prefetching runs the destination's loader, so keep loaders free of side effects such as counting views.
|
|
496
492
|
|