@rshono/core 1.0.0-rc.12 → 1.0.0-rc.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/bin/rshono.mjs +3 -4
  2. package/dist/builder/env-shadow-loader.cjs +5 -5
  3. package/dist/builder/page-files.js +5 -5
  4. package/dist/builder/page-files.js.map +1 -1
  5. package/dist/builder/public-env.d.ts +5 -4
  6. package/dist/builder/public-env.d.ts.map +1 -1
  7. package/dist/builder/public-env.js +5 -4
  8. package/dist/builder/public-env.js.map +1 -1
  9. package/dist/builder/rspack-config.d.ts +5 -11
  10. package/dist/builder/rspack-config.d.ts.map +1 -1
  11. package/dist/builder/rspack-config.js +28 -50
  12. package/dist/builder/rspack-config.js.map +1 -1
  13. package/dist/cli/build.js +2 -2
  14. package/dist/cli/build.js.map +1 -1
  15. package/dist/cli/dev.d.ts.map +1 -1
  16. package/dist/cli/dev.js +30 -40
  17. package/dist/cli/dev.js.map +1 -1
  18. package/dist/cli/index.js +4 -4
  19. package/dist/cli/index.js.map +1 -1
  20. package/dist/cli/start.d.ts.map +1 -1
  21. package/dist/cli/start.js +2 -3
  22. package/dist/cli/start.js.map +1 -1
  23. package/dist/config.d.ts +28 -31
  24. package/dist/config.d.ts.map +1 -1
  25. package/dist/config.js +2 -2
  26. package/dist/config.js.map +1 -1
  27. package/dist/deploy/aws-lambda/runtime.d.ts +4 -6
  28. package/dist/deploy/aws-lambda/runtime.d.ts.map +1 -1
  29. package/dist/deploy/aws-lambda/runtime.js +5 -8
  30. package/dist/deploy/aws-lambda/runtime.js.map +1 -1
  31. package/dist/deploy/build-marker.d.ts +3 -5
  32. package/dist/deploy/build-marker.d.ts.map +1 -1
  33. package/dist/deploy/build-marker.js +3 -5
  34. package/dist/deploy/build-marker.js.map +1 -1
  35. package/dist/deploy/cloudflare/build.d.ts.map +1 -1
  36. package/dist/deploy/cloudflare/build.js +6 -10
  37. package/dist/deploy/cloudflare/build.js.map +1 -1
  38. package/dist/deploy/cloudflare/runtime.d.ts +2 -5
  39. package/dist/deploy/cloudflare/runtime.d.ts.map +1 -1
  40. package/dist/deploy/cloudflare/runtime.js +19 -32
  41. package/dist/deploy/cloudflare/runtime.js.map +1 -1
  42. package/dist/deploy/contract.d.ts +25 -42
  43. package/dist/deploy/contract.d.ts.map +1 -1
  44. package/dist/deploy/contract.js.map +1 -1
  45. package/dist/deploy/filesystem.d.ts +3 -5
  46. package/dist/deploy/filesystem.d.ts.map +1 -1
  47. package/dist/deploy/filesystem.js +7 -11
  48. package/dist/deploy/filesystem.js.map +1 -1
  49. package/dist/deploy/node/runtime.d.ts +4 -5
  50. package/dist/deploy/node/runtime.d.ts.map +1 -1
  51. package/dist/deploy/node/runtime.js +9 -15
  52. package/dist/deploy/node/runtime.js.map +1 -1
  53. package/dist/deploy/presets.d.ts +19 -29
  54. package/dist/deploy/presets.d.ts.map +1 -1
  55. package/dist/deploy/presets.js +18 -25
  56. package/dist/deploy/presets.js.map +1 -1
  57. package/dist/deploy/vercel/build.d.ts.map +1 -1
  58. package/dist/deploy/vercel/build.js +9 -12
  59. package/dist/deploy/vercel/build.js.map +1 -1
  60. package/dist/deploy/vercel/runtime.d.ts +4 -7
  61. package/dist/deploy/vercel/runtime.d.ts.map +1 -1
  62. package/dist/deploy/vercel/runtime.js +4 -7
  63. package/dist/deploy/vercel/runtime.js.map +1 -1
  64. package/dist/index.d.ts +13 -9
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +15 -12
  67. package/dist/index.js.map +1 -1
  68. package/dist/router.d.ts +65 -93
  69. package/dist/router.d.ts.map +1 -1
  70. package/dist/router.js +2 -5
  71. package/dist/router.js.map +1 -1
  72. package/dist/runtime/boundaries.d.ts +24 -30
  73. package/dist/runtime/boundaries.d.ts.map +1 -1
  74. package/dist/runtime/boundaries.js +15 -22
  75. package/dist/runtime/boundaries.js.map +1 -1
  76. package/dist/runtime/client.d.ts +16 -7
  77. package/dist/runtime/client.d.ts.map +1 -1
  78. package/dist/runtime/client.js +16 -7
  79. package/dist/runtime/client.js.map +1 -1
  80. package/dist/runtime/context.d.ts +89 -118
  81. package/dist/runtime/context.d.ts.map +1 -1
  82. package/dist/runtime/context.js +107 -167
  83. package/dist/runtime/context.js.map +1 -1
  84. package/dist/runtime/control.js +3 -3
  85. package/dist/runtime/control.js.map +1 -1
  86. package/dist/runtime/dev-protocol.d.ts +4 -8
  87. package/dist/runtime/dev-protocol.d.ts.map +1 -1
  88. package/dist/runtime/dev-protocol.js.map +1 -1
  89. package/dist/runtime/entry.client.js +69 -105
  90. package/dist/runtime/entry.client.js.map +1 -1
  91. package/dist/runtime/entry.rsc.d.ts +5 -6
  92. package/dist/runtime/entry.rsc.d.ts.map +1 -1
  93. package/dist/runtime/entry.rsc.js +67 -122
  94. package/dist/runtime/entry.rsc.js.map +1 -1
  95. package/dist/runtime/entry.ssr.d.ts +7 -12
  96. package/dist/runtime/entry.ssr.d.ts.map +1 -1
  97. package/dist/runtime/entry.ssr.js +13 -24
  98. package/dist/runtime/entry.ssr.js.map +1 -1
  99. package/dist/runtime/flight-inject.d.ts +10 -17
  100. package/dist/runtime/flight-inject.d.ts.map +1 -1
  101. package/dist/runtime/flight-inject.js +35 -53
  102. package/dist/runtime/flight-inject.js.map +1 -1
  103. package/dist/runtime/hot-update.d.ts +20 -27
  104. package/dist/runtime/hot-update.d.ts.map +1 -1
  105. package/dist/runtime/hot-update.js +17 -23
  106. package/dist/runtime/hot-update.js.map +1 -1
  107. package/dist/runtime/navigation.d.ts +14 -19
  108. package/dist/runtime/navigation.d.ts.map +1 -1
  109. package/dist/runtime/navigation.js +9 -13
  110. package/dist/runtime/navigation.js.map +1 -1
  111. package/dist/runtime/request.d.ts +4 -6
  112. package/dist/runtime/request.d.ts.map +1 -1
  113. package/dist/runtime/request.js +2 -3
  114. package/dist/runtime/request.js.map +1 -1
  115. package/dist/runtime/server.d.ts +18 -10
  116. package/dist/runtime/server.d.ts.map +1 -1
  117. package/dist/runtime/server.js +21 -19
  118. package/dist/runtime/server.js.map +1 -1
  119. package/dist/server/headers.d.ts +8 -15
  120. package/dist/server/headers.d.ts.map +1 -1
  121. package/dist/server/headers.js +8 -15
  122. package/dist/server/headers.js.map +1 -1
  123. package/dist/server/load-config.d.ts +2 -2
  124. package/dist/server/load-config.d.ts.map +1 -1
  125. package/dist/server/load-config.js +6 -9
  126. package/dist/server/load-config.js.map +1 -1
  127. package/dist/server/prerendered.d.ts +30 -43
  128. package/dist/server/prerendered.d.ts.map +1 -1
  129. package/dist/server/prerendered.js +20 -29
  130. package/dist/server/prerendered.js.map +1 -1
  131. package/dist/server/server-config.d.ts +13 -28
  132. package/dist/server/server-config.d.ts.map +1 -1
  133. package/dist/server/server-config.js +5 -10
  134. package/dist/server/server-config.js.map +1 -1
  135. package/dist/server/shutdown.d.ts +2 -3
  136. package/dist/server/shutdown.d.ts.map +1 -1
  137. package/dist/server/shutdown.js +2 -3
  138. package/dist/server/shutdown.js.map +1 -1
  139. package/dist/server/ssg.d.ts +3 -6
  140. package/dist/server/ssg.d.ts.map +1 -1
  141. package/dist/server/ssg.js +11 -20
  142. package/dist/server/ssg.js.map +1 -1
  143. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"boundaries.js","sourceRoot":"","sources":["../../src/runtime/boundaries.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;;GAKG;AACH,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,eAAe,CAAE,KAAqC,EAAE,MAAM,CAAC,CAAC;AACzE,CAAC;AAqCD,SAAS,WAAW,CAAC,CAAqB,EAAE,CAAqB;IAC/D,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,E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CAAC,CAAC,qDAAqD;YAC9F,OAAO,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QACjF,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAsB;IAChG,OAAO,CACL,KAAC,aAAa,IAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,YACpE,KAAC,QAAQ,IAAC,QAAQ,EAAE,OAAO,YAAG,QAAQ,GAAY,GACpC,CACjB,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport { Component, Suspense, type ReactNode } from 'react';\nimport { isControlDigest } from './control.js';\n\n/**\n * `redirect()` and `notFound()` reach the browser as a thrown error carrying a control digest.\n * They are navigation, not failure, so no boundary may absorb one — otherwise a `redirect()` from\n * a component inside a `<CatchBoundary>` would render \"something went wrong\" instead of navigating.\n * They're re-thrown to the root, where the runtime turns the digest into a real navigation.\n */\nfunction isControlError(error: unknown): boolean {\n return isControlDigest((error as { digest?: unknown } | null)?.digest);\n}\n\n/**\n * What a {@link CatchBoundary} / {@link AsyncBoundary} renders once a child throws.\n * Either a static node, or a render function that also gets a `reset` callback\n * to clear the error and re-render the children (e.g. a \"Try again\" button).\n *\n * The render-function form only works when the boundary is used from a `'use\n * client'` component — functions can't cross the server→client boundary. From a\n * server component, pass a `ReactNode`.\n */\nexport type ErrorFallback = ReactNode | ((error: Error, reset: () => void) => ReactNode);\n\n/** Props for {@link CatchBoundary}. */\nexport interface CatchBoundaryProps {\n /**\n * Rendered in place of the children after one of them throws. Omit it to\n * report the error via `onError` and re-throw to the next boundary out (or\n * the global error page) instead of handling it here.\n */\n fallback?: ErrorFallback;\n /** Called with the caught error (for logging / reporting). */\n onError?: (error: Error) => void;\n /**\n * When any value in this array changes while the boundary is showing its\n * fallback, the error is cleared automatically. Pass the current pathname to\n * recover when the user navigates away: `resetKeys={[useNavigation().url.pathname]}`.\n */\n resetKeys?: readonly unknown[];\n /** The subtree this boundary protects. */\n children: ReactNode;\n}\n\ninterface CatchBoundaryState {\n error: Error | null;\n}\n\nfunction keysChanged(a: readonly unknown[], b: readonly unknown[]): boolean {\n return a.length !== b.length || a.some((value, i) => !Object.is(value, b[i]));\n}\n\n/**\n * A general-purpose error boundary. Catches errors thrown while rendering its\n * children — a client island that blew up, or a server component that rejected\n * on a soft navigation — and renders `fallback` in their place instead of\n * tearing down the whole page.\n *\n * It's a `'use client'` component (React error boundaries must be), so drop it\n * anywhere in the tree from a server or client component. Use {@link AsyncBoundary}\n * when you also want a Suspense loading fallback in the same wrapper.\n *\n * @example\n * ```tsx\n * import { CatchBoundary } from '@rshono/core/client';\n *\n * <CatchBoundary fallback={(error, reset) => (\n * <div role=\"alert\">\n * <p>{error.message}</p>\n * <button onClick={reset}>Try again</button>\n * </div>\n * )}>\n * <RiskyWidget />\n * </CatchBoundary>\n * ```\n *\n * @see {@link https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary | React — error boundaries}\n * @see {@link https://www.rshono.com/docs/api#rshonocoreclient | Docs — `@rshono/core/client`}\n */\nexport class CatchBoundary extends Component<CatchBoundaryProps, CatchBoundaryState> {\n state: CatchBoundaryState = { error: null };\n\n static getDerivedStateFromError(error: Error): CatchBoundaryState {\n return { error };\n }\n\n componentDidCatch(error: Error): void {\n if (isControlError(error)) return; // a redirect isn't an error to report\n this.props.onError?.(error);\n }\n\n componentDidUpdate(prev: CatchBoundaryProps): void {\n const { resetKeys } = this.props;\n if (this.state.error && prev.resetKeys && resetKeys && keysChanged(prev.resetKeys, resetKeys)) {\n this.reset();\n }\n }\n\n reset = (): void => {\n this.setState({ error: null });\n };\n\n render(): ReactNode {\n const { error } = this.state;\n if (error !== null) {\n if (isControlError(error)) throw error; // navigation in flight — never show a fallback for it\n const { fallback } = this.props;\n if (fallback === undefined) throw error; // no local fallback → propagate to an outer boundary\n return typeof fallback === 'function' ? fallback(error, this.reset) : fallback;\n }\n return this.props.children;\n }\n}\n\n/** Props for {@link AsyncBoundary}. */\nexport interface AsyncBoundaryProps {\n /**\n * Suspense fallback, shown while the children (or their data) are still\n * loading. Required — a loading state is the reason to reach for this over\n * {@link CatchBoundary}, so showing nothing is an explicit `loading={null}`\n * rather than something you get by leaving the prop off.\n */\n loading: ReactNode;\n /** Error fallback, shown if a child throws. See {@link ErrorFallback}. */\n error?: ErrorFallback;\n /** Called with the caught error. */\n onError?: (error: Error) => void;\n /** Clears the error fallback when any value changes — see {@link CatchBoundaryProps.resetKeys}. */\n resetKeys?: readonly unknown[];\n /** The subtree this boundary suspends on and protects. */\n children: ReactNode;\n}\n\n/**\n * A loading + error boundary in one wrapper — the common case for an async\n * section of a page. It always renders the same shape:\n *\n * ```tsx\n * <CatchBoundary fallback={error}>\n * <Suspense fallback={loading}>{children}</Suspense>\n * </CatchBoundary>\n * ```\n *\n * so `error` catches anything the children throw (including while suspended) and\n * `loading` shows until they resolve. `error` is optional: omit it and thrown\n * errors propagate to the next boundary out (or the global error page) rather\n * than being caught here.\n *\n * @example\n * ```tsx\n * import { AsyncBoundary } from '@rshono/core/client';\n *\n * <AsyncBoundary loading={<Spinner />} error={(e, reset) => <Retry onClick={reset} />}>\n * <SlowServerComponent />\n * </AsyncBoundary>\n * ```\n *\n * @see {@link https://react.dev/reference/react/Suspense | React — `<Suspense>`}\n * @see {@link https://www.rshono.com/docs/api#rshonocoreclient | Docs — `@rshono/core/client`}\n */\nexport function AsyncBoundary({ loading, error, onError, resetKeys, children }: AsyncBoundaryProps): ReactNode {\n return (\n <CatchBoundary fallback={error} onError={onError} resetKeys={resetKeys}>\n <Suspense fallback={loading}>{children}</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E,SAAS,CAAC,EAAE,CAAC;YAC9F,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;IACH,CAAC;IAED,KAAK,GAAG,GAAS,EAAE;QACjB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC,CAAC;IAEF,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,IAAI,cAAc,CAAC,KAAK,CAAC;gBAAE,MAAM,KAAK,CAAC;YACvC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAChC,IAAI,QAAQ,KAAK,SAAS;gBAAE,MAAM,KAAK,CAAC,CAAC,iCAAiC;YAC1E,OAAO,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QACjF,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAsB;IAChG,OAAO,CACL,KAAC,aAAa,IAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,YACpE,KAAC,QAAQ,IAAC,QAAQ,EAAE,OAAO,YAAG,QAAQ,GAAY,GACpC,CACjB,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport { Component, Suspense, type ReactNode } from 'react';\nimport { isControlDigest } from './control.js';\n\n// `redirect()` and `notFound()` reach the browser as a thrown error carrying a control digest. They are\n// navigation, not failure, so no boundary absorbs one — they are re-thrown to the root, where the\n// runtime turns the digest into a real navigation.\nfunction isControlError(error: unknown): boolean {\n return isControlDigest((error as { digest?: unknown } | null)?.digest);\n}\n\n/**\n * What a {@link CatchBoundary} / {@link AsyncBoundary} renders once a child throws: either a static\n * node, or a render function given the error and a `reset` callback that clears it and re-renders the\n * children (a \"Try again\" button, say).\n *\n * The function form only works from a `'use client'` component — functions can't cross the\n * server→client boundary. From a server component, pass a `ReactNode`.\n */\nexport type ErrorFallback = ReactNode | ((error: Error, reset: () => void) => ReactNode);\n\n/** Props for {@link CatchBoundary}. */\nexport interface CatchBoundaryProps {\n /**\n * Rendered in place of the children after one of them throws. Omit it to report the error via\n * `onError` and re-throw to the next boundary out — or the app's `error` page — instead of handling it\n * here.\n */\n fallback?: ErrorFallback;\n /** Called with the caught error, for logging or reporting. */\n onError?: (error: Error) => void;\n /**\n * Clears the error automatically when any value in this array changes while the fallback is showing.\n * Pass the current pathname to recover when the user navigates away:\n * `resetKeys={[useNavigation().url.pathname]}`.\n */\n resetKeys?: readonly unknown[];\n /** The subtree this boundary protects. */\n children: ReactNode;\n}\n\ninterface CatchBoundaryState {\n error: Error | null;\n}\n\nfunction keysChanged(a: readonly unknown[], b: readonly unknown[]): boolean {\n return a.length !== b.length || a.some((value, i) => !Object.is(value, b[i]));\n}\n\n/**\n * A general-purpose error boundary: catches what its children throw — a client island that blew up, a\n * server component that rejected on a soft navigation — and renders `fallback` in their place rather\n * than tearing down the page.\n *\n * It is a `'use client'` component (React error boundaries must be), so a server component can render\n * it too. Reach for {@link AsyncBoundary} when you also want a Suspense loading fallback.\n *\n * @example\n * ```tsx\n * import { CatchBoundary } from '@rshono/core/client';\n *\n * <CatchBoundary fallback={(error, reset) => (\n * <div role=\"alert\">\n * <p>{error.message}</p>\n * <button onClick={reset}>Try again</button>\n * </div>\n * )}>\n * <RiskyWidget />\n * </CatchBoundary>\n * ```\n *\n * @see {@link https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary | React — error boundaries}\n * @see {@link https://www.rshono.com/docs/api#rshonocoreclient | Docs — `@rshono/core/client`}\n */\nexport class CatchBoundary extends Component<CatchBoundaryProps, CatchBoundaryState> {\n state: CatchBoundaryState = { error: null };\n\n static getDerivedStateFromError(error: Error): CatchBoundaryState {\n return { error };\n }\n\n componentDidCatch(error: Error): void {\n if (isControlError(error)) return;\n this.props.onError?.(error);\n }\n\n componentDidUpdate(prev: CatchBoundaryProps): void {\n const { resetKeys } = this.props;\n if (this.state.error && prev.resetKeys && resetKeys && keysChanged(prev.resetKeys, resetKeys)) {\n this.reset();\n }\n }\n\n reset = (): void => {\n this.setState({ error: null });\n };\n\n render(): ReactNode {\n const { error } = this.state;\n if (error !== null) {\n if (isControlError(error)) throw error;\n const { fallback } = this.props;\n if (fallback === undefined) throw error; // propagate to an outer boundary\n return typeof fallback === 'function' ? fallback(error, this.reset) : fallback;\n }\n return this.props.children;\n }\n}\n\n/** Props for {@link AsyncBoundary}. */\nexport interface AsyncBoundaryProps {\n /**\n * Suspense fallback, shown while the children or their data are still loading. Required — a loading\n * state is the reason to reach for this over {@link CatchBoundary}, so showing nothing is an explicit\n * `loading={null}`.\n */\n loading: ReactNode;\n /** Error fallback, shown if a child throws. See {@link ErrorFallback}. */\n error?: ErrorFallback;\n /** Called with the caught error. */\n onError?: (error: Error) => void;\n /** Clears the error fallback when any value changes — see {@link CatchBoundaryProps.resetKeys}. */\n resetKeys?: readonly unknown[];\n /** The subtree this boundary suspends on and protects. */\n children: ReactNode;\n}\n\n/**\n * A loading and error boundary in one wrapper — the common case for an async section of a page. It\n * always renders the same shape:\n *\n * ```tsx\n * <CatchBoundary fallback={error}>\n * <Suspense fallback={loading}>{children}</Suspense>\n * </CatchBoundary>\n * ```\n *\n * so `loading` shows until the children resolve and `error` catches whatever they throw, suspended or\n * not. `error` is optional: omit it and errors propagate to the next boundary out.\n *\n * @example\n * ```tsx\n * import { AsyncBoundary } from '@rshono/core/client';\n *\n * <AsyncBoundary loading={<Spinner />} error={(e, reset) => <Retry onClick={reset} />}>\n * <SlowServerComponent />\n * </AsyncBoundary>\n * ```\n *\n * @see {@link https://react.dev/reference/react/Suspense | React — `<Suspense>`}\n * @see {@link https://www.rshono.com/docs/api#rshonocoreclient | Docs — `@rshono/core/client`}\n */\nexport function AsyncBoundary({ loading, error, onError, resetKeys, children }: AsyncBoundaryProps): ReactNode {\n return (\n <CatchBoundary fallback={error} onError={onError} resetKeys={resetKeys}>\n <Suspense fallback={loading}>{children}</Suspense>\n </CatchBoundary>\n );\n}\n"]}
@@ -1,12 +1,21 @@
1
1
  /**
2
- * `@rshono/core/client` — the browser-side surface, for use from `'use client'`
3
- * modules: `useNavigation()` for the current URL and soft navigation, and
4
- * `<AsyncBoundary>` / `<CatchBoundary>` as components.
2
+ * `@rshono/core/client` — the browser-side surface: `useNavigation()` for the current URL and soft
3
+ * navigation, plus the `<AsyncBoundary>` and `<CatchBoundary>` components.
5
4
  *
6
- * Every export is itself a `'use client'` module, so a server component can
7
- * render `<AsyncBoundary>` directly — but the hook needs a client component. In a
8
- * server component, read the same request data from `getRequestContext()` in
9
- * `@rshono/core/server`.
5
+ * Every export is itself a `'use client'` module, so a server component can render `<AsyncBoundary>`
6
+ * directly — but the hook needs a client component. In a server component, read the same request data
7
+ * from `getRequestContext()` in `@rshono/core/server`.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * 'use client';
12
+ * import { useNavigation } from '@rshono/core/client';
13
+ *
14
+ * export function Tab() {
15
+ * const { url, router } = useNavigation();
16
+ * return <button onClick={() => router.push(`${url.pathname}?tab=details`)}>Details</button>;
17
+ * }
18
+ * ```
10
19
  *
11
20
  * @see {@link https://www.rshono.com/docs/api#rshonocoreclient | Docs — `@rshono/core/client`}
12
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/runtime/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/runtime/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,12 +1,21 @@
1
1
  /**
2
- * `@rshono/core/client` — the browser-side surface, for use from `'use client'`
3
- * modules: `useNavigation()` for the current URL and soft navigation, and
4
- * `<AsyncBoundary>` / `<CatchBoundary>` as components.
2
+ * `@rshono/core/client` — the browser-side surface: `useNavigation()` for the current URL and soft
3
+ * navigation, plus the `<AsyncBoundary>` and `<CatchBoundary>` components.
5
4
  *
6
- * Every export is itself a `'use client'` module, so a server component can
7
- * render `<AsyncBoundary>` directly — but the hook needs a client component. In a
8
- * server component, read the same request data from `getRequestContext()` in
9
- * `@rshono/core/server`.
5
+ * Every export is itself a `'use client'` module, so a server component can render `<AsyncBoundary>`
6
+ * directly — but the hook needs a client component. In a server component, read the same request data
7
+ * from `getRequestContext()` in `@rshono/core/server`.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * 'use client';
12
+ * import { useNavigation } from '@rshono/core/client';
13
+ *
14
+ * export function Tab() {
15
+ * const { url, router } = useNavigation();
16
+ * return <button onClick={() => router.push(`${url.pathname}?tab=details`)}>Details</button>;
17
+ * }
18
+ * ```
10
19
  *
11
20
  * @see {@link https://www.rshono.com/docs/api#rshonocoreclient | Docs — `@rshono/core/client`}
12
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/runtime/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAA+C,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,aAAa,EAAwE,MAAM,iBAAiB,CAAC","sourcesContent":["/**\n * `@rshono/core/client` — the browser-side surface, for use from `'use client'`\n * modules: `useNavigation()` for the current URL and soft navigation, and\n * `<AsyncBoundary>` / `<CatchBoundary>` as components.\n *\n * Every export is itself a `'use client'` module, so a server component can\n * render `<AsyncBoundary>` directly — but the hook needs a client component. In a\n * server component, read the same request data from `getRequestContext()` in\n * `@rshono/core/server`.\n *\n * @see {@link https://www.rshono.com/docs/api#rshonocoreclient | Docs — `@rshono/core/client`}\n *\n * @packageDocumentation\n */\n\nexport { useNavigation, type NavigationRouter, type NavigationState } from './navigation.js';\nexport { AsyncBoundary, CatchBoundary, type AsyncBoundaryProps, type CatchBoundaryProps, type ErrorFallback } from './boundaries.js';\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/runtime/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,aAAa,EAA+C,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,aAAa,EAAwE,MAAM,iBAAiB,CAAC","sourcesContent":["/**\n * `@rshono/core/client` — the browser-side surface: `useNavigation()` for the current URL and soft\n * navigation, plus the `<AsyncBoundary>` and `<CatchBoundary>` components.\n *\n * Every export is itself a `'use client'` module, so a server component can render `<AsyncBoundary>`\n * directly — but the hook needs a client component. In a server component, read the same request data\n * from `getRequestContext()` in `@rshono/core/server`.\n *\n * @example\n * ```tsx\n * 'use client';\n * import { useNavigation } from '@rshono/core/client';\n *\n * export function Tab() {\n * const { url, router } = useNavigation();\n * return <button onClick={() => router.push(`${url.pathname}?tab=details`)}>Details</button>;\n * }\n * ```\n *\n * @see {@link https://www.rshono.com/docs/api#rshonocoreclient | Docs — `@rshono/core/client`}\n *\n * @packageDocumentation\n */\n\nexport { useNavigation, type NavigationRouter, type NavigationState } from './navigation.js';\nexport { AsyncBoundary, CatchBoundary, type AsyncBoundaryProps, type CatchBoundaryProps, type ErrorFallback } from './boundaries.js';\n"]}
@@ -1,13 +1,10 @@
1
1
  /**
2
- * The request context: {@link getRequestContext} and the {@link RequestContext} wrapper it returns,
3
- * the {@link redirect} / {@link notFound} control-flow helpers, and the
4
- * {@link onServerError} reporting funnel — plus the `@internal` plumbing that binds
5
- * a request to the async context in the first place.
6
- *
7
- * The public half of this module is re-exported by `runtime/server.ts`, which is
8
- * what the `@rshono/core/server` subpath resolves to; import *that* from an app. Nothing
9
- * here is safe in a `'use client'` module — those run in the browser, with no bound
10
- * request context.
2
+ * The request context: {@link getRequestContext} and the {@link RequestContext} it returns, the
3
+ * {@link redirect} / {@link notFound} control-flow helpers, and the {@link onServerError} reporting
4
+ * funnel — plus the `@internal` plumbing that binds a request to the async context.
5
+ *
6
+ * The public half is re-exported by `runtime/server.ts`, which is what `@rshono/core/server` resolves
7
+ * to; an app imports that.
11
8
  */
12
9
  import type { Context, Env } from 'hono';
13
10
  import type { CookieOptions } from 'hono/utils/cookie';
@@ -16,8 +13,8 @@ import type { CookieOptions } from 'hono/utils/cookie';
16
13
  *
17
14
  * - `301` Moved Permanently, `308` Permanent Redirect — cacheable, permanent.
18
15
  * - `302` Found, `307` Temporary Redirect — temporary.
19
- * - `303` See Other — the default; forces a `GET` on the target, which is what
20
- * you almost always want after a form action (post/redirect/get).
16
+ * - `303` See Other — the default; forces a `GET` on the target, which is what you almost always want
17
+ * after a form action (post/redirect/get).
21
18
  *
22
19
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status#redirection_messages | MDN — redirection status codes}
23
20
  */
@@ -26,19 +23,12 @@ export type RedirectStatus = 301 | 302 | 303 | 307 | 308;
26
23
  * Marks the request as having entered its page render, which is what makes
27
24
  * {@link RequestContext.setHeader} and `ctx.cookies.set()` start throwing.
28
25
  *
29
- * Framework internal — `renderComponent` calls this immediately before handing the page to React.
30
- * Everything that legitimately writes to the response (middleware, a `'use server'` action, an
31
- * endpoint route) has already run by then, so none of them are affected.
32
- *
33
26
  * @internal
34
27
  */
35
28
  export declare function beginPageRender(c: Context): void;
36
29
  /**
37
- * Runs `fn` with the given Hono {@link Context} bound as the ambient request
38
- * context, so that {@link getRequestContext} resolves to it anywhere in the call tree.
39
- *
40
- * Framework internal — the request handler wraps every render and action in
41
- * this. Application code should reach for {@link getRequestContext} instead.
30
+ * Runs `fn` with `c` bound as the ambient request context, so {@link getRequestContext} resolves to it
31
+ * anywhere in the call tree.
42
32
  *
43
33
  * @internal
44
34
  */
@@ -46,27 +36,24 @@ export declare function runWithContext<T>(c: Context, fn: () => T): T;
46
36
  /**
47
37
  * The matched route params, or an empty object when there is no active match.
48
38
  *
49
- * Framework internal — the request renderer calls this to build a page's `params` prop, and
50
- * {@link RequestContext.params} caches it. Read them from that prop, or from `ctx.params`.
51
- *
52
39
  * @internal
53
40
  */
54
41
  export declare function readParams(c: Context): Record<string, string>;
55
42
  /**
56
- * Resolves the browser-facing {@link URL} for a request, from a Hono {@link Context}.
43
+ * The browser-facing {@link URL} for a request, resolved from Hono's {@link Context} — a fresh
44
+ * instance per call.
57
45
  *
58
- * `c.req.url` reflects the internal address the server was reached on, which is wrong behind a proxy.
59
- * `X-Forwarded-Host` / `X-Forwarded-Proto` fix that up — **but only when `trustProxy` is enabled in
60
- * `rshono.config.ts`** (always so under `rshono dev`). They are client-supplied, so honouring them
61
- * unconditionally would let anyone who can reach the server dictate the origin of every absolute URL
62
- * the app builds, and poison a shared cache with it.
46
+ * `c.req.url` is the internal address the server was reached on, which is wrong behind a proxy;
47
+ * `X-Forwarded-Host` / `-Proto` correct it, but only when `trustProxy` is enabled in
48
+ * `rshono.config.ts` — they are client-supplied, so trusting them unconditionally would let anyone
49
+ * dictate the origin of every absolute URL the app builds.
63
50
  *
64
- * This is the form for **middleware**, which is handed `c` and runs outside the request context. In
65
- * a server component or a `'use server'` action prefer {@link RequestContext.url}, which is this same
66
- * value cached per request.
51
+ * This is the form for **middleware**, which is handed `c` and runs outside the request context — and
52
+ * so the way to give Hono's own middleware the origin the browser actually used. In a server component
53
+ * or action, prefer {@link RequestContext.url}, the same value cached per request.
67
54
  *
68
- * Its main use is giving Hono's own middleware the origin the browser actually used, since they all
69
- * read `c.req.url` on their own and so see the internal one:
55
+ * @param c - The Hono {@link Context} for the request.
56
+ * @returns The browser-facing URL — proxy-corrected under `trustProxy`, `c.req.url` otherwise.
70
57
  *
71
58
  * @example
72
59
  * ```ts
@@ -77,33 +64,25 @@ export declare function readParams(c: Context): Record<string, string>;
77
64
  * server.use(csrf({ origin: (origin, c) => origin === publicUrl(c).origin }));
78
65
  * ```
79
66
  *
80
- * A fresh instance per call, so mutating it disturbs nothing else.
81
- *
82
- * @param c - The Hono {@link Context} for the request.
83
- * @returns The browser-facing URL — proxy-corrected under `trustProxy`, `c.req.url` otherwise.
84
- *
85
67
  * @see {@link https://www.rshono.com/docs/configuration#proxy-headers | Docs — proxy headers}
86
68
  */
87
69
  export declare function publicUrl(c: Context): URL;
88
70
  /**
89
- * The environment available to a request: Cloudflare/Workers `Bindings` merged
90
- * with process env vars. Values not declared in `Bindings` are typed as
91
- * `string | undefined`. See {@link RequestContext.env}.
71
+ * The environment available to a request: Workers `Bindings` merged with process env vars. Values not
72
+ * declared in `Bindings` are typed as `string | undefined`. See {@link RequestContext.env}.
92
73
  *
93
74
  * @see {@link https://hono.dev/docs/getting-started/cloudflare-workers#bindings | Hono — bindings}
94
75
  */
95
76
  export type EnvVars<E extends Env> = E['Bindings'] & Record<string, string | undefined>;
96
77
  /**
97
- * Ergonomic, read-mostly wrapper around Hono's {@link Context} for use inside
98
- * server components and server actions.
78
+ * Read-mostly wrapper around Hono's {@link Context}, for server components and server actions.
99
79
  *
100
- * Obtain one with {@link getRequestContext}, or — in a page component — take it straight
101
- * off the `ctx` prop, which is this same object. Never construct it yourself. One
102
- * instance is reused for the lifetime of a request, so its lazy getters
80
+ * Obtain one with {@link getRequestContext}, or take it off a page's `ctx` prop — the same object.
81
+ * Never construct it yourself. One instance is reused for the whole request, so its lazy getters
103
82
  * ({@link RequestContext.url}, {@link RequestContext.env}) are computed at most once.
104
83
  *
105
- * @typeParam E - The Hono {@link Env} describing this app's `Bindings` and
106
- * `Variables`, so {@link RequestContext.var} and {@link RequestContext.env} stay typed.
84
+ * @typeParam E - The Hono {@link Env} describing this app's `Bindings` and `Variables`, so
85
+ * {@link RequestContext.var} and {@link RequestContext.env} stay typed.
107
86
  *
108
87
  * @example
109
88
  * ```tsx
@@ -122,19 +101,19 @@ export type EnvVars<E extends Env> = E['Bindings'] & Record<string, string | und
122
101
  export declare class RequestContext<E extends Env = Env> {
123
102
  #private;
124
103
  /**
125
- * Framework internal — one instance is created per request and handed to you by
126
- * {@link getRequestContext} or the `ctx` page prop. Application code never calls this.
104
+ * One instance is created per request and handed out by {@link getRequestContext} or the `ctx` page
105
+ * prop. Application code never calls this.
127
106
  *
128
107
  * @internal
129
108
  */
130
109
  constructor(c: Context<E>);
131
110
  /**
132
- * The underlying Hono {@link Context} — the escape hatch for what this wrapper does not expose,
133
- * such as `executionCtx.waitUntil()` on Workers.
111
+ * The underlying Hono {@link Context} — the escape hatch for what this wrapper does not expose, such
112
+ * as `executionCtx.waitUntil()` on Workers.
134
113
  *
135
- * Its response builders (`redirect`, `notFound`, `json`, `body`, `status`, …) still do nothing from
136
- * inside a page, for the reason the stubs on this class explain: reaching them through here
137
- * bypasses the error, it does not make them work.
114
+ * Its response builders (`redirect`, `json`, `body`, `status`, …) still do nothing from inside a
115
+ * page: reaching them through here bypasses the errors the stubs on this class throw, it does not
116
+ * make them work.
138
117
  *
139
118
  * @example
140
119
  * ```ts
@@ -149,9 +128,8 @@ export declare class RequestContext<E extends Env = Env> {
149
128
  * {@link Context.req}, unwrapped, so `ctx.req.header('authorization')` rather than
150
129
  * `ctx.hono.req.header(…)`.
151
130
  *
152
- * Reads only. Setting a *response* header is {@link RequestContext.setHeader}, deliberately in a
153
- * different place — Hono's `c.header()` writing the response while `c.req.header()` reads the
154
- * request is a well-worn source of confusion.
131
+ * Reads only; setting a *response* header is {@link RequestContext.setHeader}, deliberately spelled
132
+ * differently.
155
133
  *
156
134
  * @example
157
135
  * ```ts
@@ -165,28 +143,29 @@ export declare class RequestContext<E extends Env = Env> {
165
143
  */
166
144
  get req(): Context<E>['req'];
167
145
  /**
168
- * Matched route params for this request, e.g. `{ id: '42' }` for `/profile/:id`. Empty when there
169
- * is no active route match.
146
+ * Matched route params for this request, e.g. `{ id: '42' }` for `/profile/:id`. Empty when no route
147
+ * matched.
170
148
  *
171
- * A **page** is handed the same record as its `params` prop, typed key-by-key from its route path,
172
- * and that is the better read where it is available. This is for everywhere else — a nested server
173
- * component, or a `'use server'` action — which get no props from the framework.
149
+ * A page is handed the same record as its `params` prop, typed key-by-key from its route path, and
150
+ * that is the better read where it exists. This is for everywhere else — a nested server component,
151
+ * or a `'use server'` action.
174
152
  */
175
153
  get params(): Record<string, string>;
176
154
  /**
177
- * The browser-facing request URL — read `url.pathname`, `url.searchParams` and the
178
- * rest off it. Parsed once and cached, so the same instance comes back on every
179
- * read within a request; treat it as read-only for that reason.
155
+ * The browser-facing request URL. Parsed once and cached, so every read within a request returns the
156
+ * same instance — treat it as read-only.
180
157
  *
181
158
  * `X-Forwarded-Host` / `-Proto` are honoured only when `trustProxy` is enabled in
182
159
  * `rshono.config.ts`, since any client can send them.
183
160
  *
161
+ * @example `const tab = getRequestContext().url.searchParams.get('tab');`
162
+ *
184
163
  * @see {@link https://www.rshono.com/docs/configuration#proxy-headers | Docs — proxy headers}
185
164
  */
186
165
  get url(): URL;
187
166
  /**
188
- * Typed variables set by middleware via `c.set('user', …)`, read here as
189
- * `ctx.var.user`. Type them by parameterising this class's {@link Env}.
167
+ * Typed variables set by middleware via `c.set('user', …)`, read here as `ctx.var.user`. Type them by
168
+ * parameterising this class's {@link Env}.
190
169
  *
191
170
  * @example
192
171
  * ```ts
@@ -199,8 +178,8 @@ export declare class RequestContext<E extends Env = Env> {
199
178
  */
200
179
  get var(): Readonly<E['Variables']>;
201
180
  /**
202
- * Environment for the request: process env vars merged with runtime bindings
203
- * (bindings win on conflict). Computed once and cached.
181
+ * Environment for the request: process env vars merged with runtime bindings, which win on conflict.
182
+ * Computed once and cached.
204
183
  *
205
184
  * @example `const key = getRequestContext().env.STRIPE_SECRET_KEY;`
206
185
  *
@@ -227,12 +206,12 @@ export declare class RequestContext<E extends Env = Env> {
227
206
  /** Reads every cookie as a `{ name: value }` record. Safe anywhere, a page included. */
228
207
  all: () => Record<string, string>;
229
208
  /**
230
- * Sets a cookie on the response. See Hono's {@link CookieOptions} for `path`, `httpOnly`,
231
- * `maxAge`, etc.
209
+ * Sets a cookie on the response. See Hono's {@link CookieOptions} for `path`, `httpOnly`, `maxAge`
210
+ * and the rest.
232
211
  *
233
- * **Throws inside a page render** — see {@link RequestContext.setHeader}, of which a `Set-Cookie`
234
- * is a special case. Set cookies from a `'use server'` action, or with Hono's `setCookie(c, …)`
235
- * in middleware and endpoint routes.
212
+ * **Throws inside a page render** — a `Set-Cookie` is a special case of
213
+ * {@link RequestContext.setHeader}. Set cookies from a `'use server'` action, or with Hono's
214
+ * `setCookie(c, …)` in middleware and endpoint routes.
236
215
  *
237
216
  * @throws If called while a page is rendering, where it could not reach the browser reliably.
238
217
  *
@@ -251,14 +230,12 @@ export declare class RequestContext<E extends Env = Env> {
251
230
  * Sets a header on the response — from a `'use server'` action, which is the one place a request
252
231
  * context exists *and* the response is still open.
253
232
  *
254
- * From inside a page it throws: a page streams, so by then the response head is committed. Hono's
255
- * `c.header()` fails there silently and inconsistently — landing on a full page load, vanishing on
256
- * a soft navigation — so this refuses rather than doing it half the time.
233
+ * From inside a page it throws: a page streams, so its response head is already committed by then,
234
+ * and the write would land on a full page load but vanish on a soft navigation.
257
235
  *
258
- * Middleware and `{ type: 'endpoint' }` routes run outside the request context but are handed
259
- * Hono's `c` directly, so they use `c.header(…)`. That is also where a header belonging to the
260
- * *page* rather than to one action goes — `Cache-Control`, `X-Robots-Tag` — since middleware runs
261
- * before the render.
236
+ * Middleware and `{ type: 'endpoint' }` routes are handed Hono's `c` directly and use `c.header(…)`.
237
+ * That is also where a header belonging to the *page* goes — `Cache-Control`, `X-Robots-Tag` — since
238
+ * middleware runs before the render.
262
239
  *
263
240
  * @param name - Header name, case-insensitive.
264
241
  * @param value - Header value.
@@ -280,29 +257,29 @@ export declare class RequestContext<E extends Env = Env> {
280
257
  append?: boolean;
281
258
  }): void;
282
259
  /** @deprecated Not available on a page's context — use `redirect()` from `@rshono/core/server`. */
283
- redirect(...args: unknown[]): never;
260
+ redirect(..._args: unknown[]): never;
284
261
  /** @deprecated Not available on a page's context — use `notFound()` from `@rshono/core/server`. */
285
- notFound(...args: unknown[]): never;
262
+ notFound(..._args: unknown[]): never;
286
263
  /** @deprecated A page renders JSX. For a JSON response, use an `{ type: 'endpoint' }` route. */
287
- json(...args: unknown[]): never;
264
+ json(..._args: unknown[]): never;
288
265
  /** @deprecated A page renders JSX. For a text response, use an `{ type: 'endpoint' }` route. */
289
- text(...args: unknown[]): never;
266
+ text(..._args: unknown[]): never;
290
267
  /** @deprecated A page renders JSX, which the framework turns into HTML for you. */
291
- html(...args: unknown[]): never;
268
+ html(..._args: unknown[]): never;
292
269
  /** @deprecated Not available on a page's context. To read the request body, use `ctx.req`. */
293
- body(...args: unknown[]): never;
270
+ body(..._args: unknown[]): never;
294
271
  /** @deprecated A page's status is set by the framework — use `notFound()`, or an endpoint route. */
295
- status(...args: unknown[]): never;
272
+ status(..._args: unknown[]): never;
296
273
  /** @deprecated Renamed — use `ctx.setHeader(name, value)`, which is valid from a `'use server'` action. */
297
- header(...args: unknown[]): never;
274
+ header(..._args: unknown[]): never;
298
275
  }
299
276
  /**
300
- * Returns the {@link RequestContext} for the current request — the URL, cookies, params, env and
301
- * middleware variables, read from a server component or a server action. Memoised per request, so
302
- * repeated calls return the same instance.
277
+ * The {@link RequestContext} for the current request — URL, cookies, params, env and middleware
278
+ * variables — read from a server component or a server action. Memoised per request, so repeated calls
279
+ * return the same instance.
303
280
  *
304
- * A **page** component is handed that same object as its `ctx` prop, so this import is for everywhere
305
- * else: a nested server component, or a `'use server'` action module.
281
+ * A page is handed that same object as its `ctx` prop, so this import is for everywhere else: a nested
282
+ * server component, or a `'use server'` action module.
306
283
  *
307
284
  * @typeParam E - The app's Hono {@link Env}, to type {@link RequestContext.var} and {@link RequestContext.env}.
308
285
  * @throws If called at module load, where there is no ambient context to resolve.
@@ -324,16 +301,15 @@ export declare class RequestContext<E extends Env = Env> {
324
301
  */
325
302
  export declare function getRequestContext<E extends Env = Env>(): RequestContext<E>;
326
303
  /**
327
- * Redirects the request to `location` by throwing a control signal that the
328
- * framework catches and turns into an HTTP redirect response.
304
+ * Redirects the request to `location`, by throwing a control signal the framework turns into an HTTP
305
+ * redirect.
329
306
  *
330
- * Because it throws, it never returns — TypeScript narrows away any code after
331
- * the call, and you do not need to `return` it. Do not wrap it in a `try/catch`
332
- * that swallows the signal.
307
+ * Because it throws it never returns, so TypeScript narrows away everything after the call and there
308
+ * is nothing to `return`. Don't wrap it in a `try/catch` that swallows the signal.
333
309
  *
334
310
  * @param location - Absolute path or URL to redirect to, e.g. `/dashboard`.
335
- * @param status - Redirect {@link RedirectStatus}; defaults to `303` (See Other),
336
- * the correct choice after a form action so the browser follows up with a `GET`.
311
+ * @param status - Redirect {@link RedirectStatus}; defaults to `303` (See Other), which is what makes
312
+ * the browser follow up with a `GET` after a form action.
337
313
  *
338
314
  * @example
339
315
  * ```ts
@@ -344,10 +320,10 @@ export declare function getRequestContext<E extends Env = Env>(): RequestContext
344
320
  */
345
321
  export declare function redirect(location: string, status?: RedirectStatus): never;
346
322
  /**
347
- * Aborts the current render with a 404, rendering the app's not-found page.
323
+ * Aborts the current render with a 404, rendering the app's `notFound` page.
348
324
  *
349
- * Like {@link redirect}, this throws a control signal and never returns, so
350
- * TypeScript narrows away everything after the call. Do not catch-and-swallow it.
325
+ * Like {@link redirect} it throws a control signal and never returns, so TypeScript narrows away
326
+ * everything after the call. Don't catch-and-swallow it.
351
327
  *
352
328
  * @example
353
329
  * ```tsx
@@ -360,13 +336,13 @@ export declare function redirect(location: string, status?: RedirectStatus): nev
360
336
  */
361
337
  export declare function notFound(): never;
362
338
  /**
363
- * Which stage of a request produced an error handed to an {@link ServerErrorHandler}.
339
+ * Which stage of a request produced an error handed to a {@link ServerErrorHandler}.
364
340
  *
365
341
  * - `action` — a `'use server'` function threw. React sends the client an opaque marker with no
366
342
  * message in production, so this is the only place the real error is visible.
367
343
  * - `render` — a server component threw while the flight payload was being produced.
368
344
  * - `ssr` — SSR failed before the HTML shell could be sent, so the `error` page was unreachable too.
369
- * - `request` — anything else that reached the top-level handler, including a thrown endpoint route.
345
+ * - `request` — anything else that reached the top-level handler, a thrown endpoint route included.
370
346
  */
371
347
  export type ServerErrorSource = 'action' | 'render' | 'ssr' | 'request';
372
348
  /** What an {@link ServerErrorHandler} is told about an error, beyond the error itself. */
@@ -382,12 +358,9 @@ export type ServerErrorHandler = (error: unknown, context: ServerErrorContext) =
382
358
  * Registers a handler for every error the framework catches, so they can reach an error tracker
383
359
  * (Sentry, Datadog, a log pipeline) instead of only `stderr`.
384
360
  *
385
- * Call it **once, at the top level of `src/server.ts`** — that module is imported as the server
386
- * starts, before any request is served. Registering again replaces the previous handler.
387
- *
388
- * Errors are still written to `stderr` either way, so a handler adds a destination rather than
389
- * replacing one. A handler that throws is caught and logged: reporting must never be able to fail
390
- * a request.
361
+ * Call it once, at the top level of `src/server.ts`, which is imported as the server starts.
362
+ * Registering again replaces the previous handler. Errors still go to `stderr` either way, and a
363
+ * handler that throws is caught and logged — reporting can never fail a request.
391
364
  *
392
365
  * @example
393
366
  * ```ts
@@ -404,10 +377,8 @@ export type ServerErrorHandler = (error: unknown, context: ServerErrorContext) =
404
377
  */
405
378
  export declare function onServerError(handler: ServerErrorHandler): void;
406
379
  /**
407
- * Logs an error and forwards it to the registered {@link ServerErrorHandler}.
408
- *
409
- * Framework internal — the single funnel every caught server-side error goes through, so that
410
- * adding a reporting destination is one registration rather than a hook per call site.
380
+ * Logs an error and forwards it to the registered {@link ServerErrorHandler} — the single funnel every
381
+ * caught server-side error goes through.
411
382
  *
412
383
  * @internal
413
384
  */
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/runtime/context.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvD;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAgBzD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAEhD;AAqDD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAE5D;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM7D;AAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,GAAG,GAAG,CAmBzC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAExF;;;;;;;;;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