@real-router/react 0.27.2 → 0.27.4

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 (75) hide show
  1. package/dist/cjs/{Link-CyDwbrFA.js → Link-D4K4T0Ef.js} +2 -2
  2. package/dist/cjs/{Link-CyDwbrFA.js.map → Link-D4K4T0Ef.js.map} +1 -1
  3. package/dist/cjs/{RouterErrorBoundary-3UhUelqY.d.ts → RouterErrorBoundary-k17kf8Rr.d.ts} +3 -3
  4. package/dist/cjs/{RouterErrorBoundary-3UhUelqY.d.ts.map → RouterErrorBoundary-k17kf8Rr.d.ts.map} +1 -1
  5. package/dist/cjs/{RouterProvider-CPsCmrRw.js → RouterProvider-CAaKExt_.js} +2 -2
  6. package/dist/cjs/RouterProvider-CAaKExt_.js.map +1 -0
  7. package/dist/cjs/{RouterProvider-lgNarto1.d.ts → RouterProvider-xbLo90sc.d.ts} +2 -2
  8. package/dist/cjs/{RouterProvider-lgNarto1.d.ts.map → RouterProvider-xbLo90sc.d.ts.map} +1 -1
  9. package/dist/cjs/index.d.ts +3 -3
  10. package/dist/cjs/index.js +1 -1
  11. package/dist/cjs/index.react-server.d.ts +1 -1
  12. package/dist/cjs/ink.d.ts +2 -2
  13. package/dist/cjs/ink.js +1 -1
  14. package/dist/cjs/legacy.d.ts +3 -3
  15. package/dist/cjs/legacy.js +1 -1
  16. package/dist/cjs/{useRouterTransition-D5nwRENd.d.ts → useRouterTransition-CRFKfwuP.d.ts} +2 -2
  17. package/dist/cjs/{useRouterTransition-D5nwRENd.d.ts.map → useRouterTransition-CRFKfwuP.d.ts.map} +1 -1
  18. package/dist/esm/{Link-uERoM4yk.mjs → Link-PQIMnFd0.mjs} +2 -2
  19. package/dist/esm/{Link-uERoM4yk.mjs.map → Link-PQIMnFd0.mjs.map} +1 -1
  20. package/dist/esm/{RouterErrorBoundary-3UhUelqY.d.mts → RouterErrorBoundary-k17kf8Rr.d.mts} +3 -3
  21. package/dist/esm/{RouterErrorBoundary-3UhUelqY.d.mts.map → RouterErrorBoundary-k17kf8Rr.d.mts.map} +1 -1
  22. package/dist/esm/{RouterProvider-DCchvq4n.d.mts → RouterProvider-CG1cqrjE.d.mts} +2 -2
  23. package/dist/esm/{RouterProvider-DCchvq4n.d.mts.map → RouterProvider-CG1cqrjE.d.mts.map} +1 -1
  24. package/dist/esm/{RouterProvider-DgHypQTJ.mjs → RouterProvider-DhZoi6au.mjs} +2 -2
  25. package/dist/esm/RouterProvider-DhZoi6au.mjs.map +1 -0
  26. package/dist/esm/index.d.mts +3 -3
  27. package/dist/esm/index.mjs +1 -1
  28. package/dist/esm/index.react-server.d.mts +1 -1
  29. package/dist/esm/ink.d.mts +2 -2
  30. package/dist/esm/ink.mjs +1 -1
  31. package/dist/esm/legacy.d.mts +3 -3
  32. package/dist/esm/legacy.mjs +1 -1
  33. package/dist/esm/{useRouterTransition-PCwA_qj1.d.mts → useRouterTransition-C5Ubt7rP.d.mts} +2 -2
  34. package/dist/esm/{useRouterTransition-PCwA_qj1.d.mts.map → useRouterTransition-C5Ubt7rP.d.mts.map} +1 -1
  35. package/package.json +6 -7
  36. package/dist/cjs/RouterProvider-CPsCmrRw.js.map +0 -1
  37. package/dist/esm/RouterProvider-DgHypQTJ.mjs.map +0 -1
  38. package/src/RouterProvider.tsx +0 -148
  39. package/src/components/Await.tsx +0 -46
  40. package/src/components/ClientOnly.tsx +0 -25
  41. package/src/components/HttpStatusCode.tsx +0 -66
  42. package/src/components/HttpStatusProvider.tsx +0 -26
  43. package/src/components/InkLink.tsx +0 -134
  44. package/src/components/InkRouterProvider.tsx +0 -9
  45. package/src/components/Link.tsx +0 -117
  46. package/src/components/RouterErrorBoundary.tsx +0 -69
  47. package/src/components/ServerOnly.tsx +0 -26
  48. package/src/components/Streamed.tsx +0 -30
  49. package/src/components/modern/RouteView/RouteView.tsx +0 -69
  50. package/src/components/modern/RouteView/components.tsx +0 -19
  51. package/src/components/modern/RouteView/helpers.tsx +0 -231
  52. package/src/components/modern/RouteView/index.ts +0 -8
  53. package/src/components/modern/RouteView/types.ts +0 -38
  54. package/src/constants.ts +0 -10
  55. package/src/context.ts +0 -14
  56. package/src/hooks/useDeferred.tsx +0 -34
  57. package/src/hooks/useIsActiveRoute.tsx +0 -47
  58. package/src/hooks/useNavigator.tsx +0 -15
  59. package/src/hooks/useRoute.tsx +0 -32
  60. package/src/hooks/useRouteEnter.tsx +0 -148
  61. package/src/hooks/useRouteExit.tsx +0 -159
  62. package/src/hooks/useRouteNode.tsx +0 -37
  63. package/src/hooks/useRouteUtils.tsx +0 -35
  64. package/src/hooks/useRouter.tsx +0 -15
  65. package/src/hooks/useRouterTransition.tsx +0 -17
  66. package/src/index.react-server.ts +0 -33
  67. package/src/index.ts +0 -61
  68. package/src/ink-types.ts +0 -25
  69. package/src/ink.ts +0 -30
  70. package/src/legacy.ssr.ts +0 -35
  71. package/src/legacy.ts +0 -35
  72. package/src/ssr.react-server.ts +0 -21
  73. package/src/ssr.ts +0 -43
  74. package/src/types.ts +0 -40
  75. package/src/utils/createHttpStatusSink.ts +0 -27
package/src/ssr.ts DELETED
@@ -1,43 +0,0 @@
1
- // SSR-feature entry — React 19.2+
2
- //
3
- // Server-side and SSR-aware client components/hooks. Importing from this
4
- // subpath instead of the main entry signals "this code path is part of
5
- // the SSR pipeline" and makes server-only types stay out of the client
6
- // TypeScript context for app code that doesn't touch SSR.
7
- //
8
- // Trigger for the split: ≥3 SSR-feature exports (#604 + #610 = 5 exports).
9
- // See `.claude/SSR_FEATURE_GAPS_RU.md` §8 for the architectural rationale.
10
-
11
- // Components
12
- export { ClientOnly } from "./components/ClientOnly";
13
-
14
- export { ServerOnly } from "./components/ServerOnly";
15
-
16
- export { Await } from "./components/Await";
17
-
18
- export { Streamed } from "./components/Streamed";
19
-
20
- export { HttpStatusCode } from "./components/HttpStatusCode";
21
-
22
- export { HttpStatusProvider } from "./components/HttpStatusProvider";
23
-
24
- // Hooks
25
- export { useDeferred } from "./hooks/useDeferred";
26
-
27
- // Utilities
28
- export { createHttpStatusSink } from "./utils/createHttpStatusSink";
29
-
30
- // Types
31
- export type { ClientOnlyProps } from "./components/ClientOnly";
32
-
33
- export type { ServerOnlyProps } from "./components/ServerOnly";
34
-
35
- export type { AwaitProps } from "./components/Await";
36
-
37
- export type { StreamedProps } from "./components/Streamed";
38
-
39
- export type { HttpStatusCodeProps } from "./components/HttpStatusCode";
40
-
41
- export type { HttpStatusProviderProps } from "./components/HttpStatusProvider";
42
-
43
- export type { HttpStatusSink } from "./utils/createHttpStatusSink";
package/src/types.ts DELETED
@@ -1,40 +0,0 @@
1
- import type {
2
- NavigationOptions,
3
- Params,
4
- Navigator,
5
- State,
6
- } from "@real-router/core";
7
- import type { HTMLAttributes, MouseEventHandler } from "react";
8
-
9
- export interface RouteState<P extends Params = Params> {
10
- route: State<P> | undefined;
11
- previousRoute?: State | undefined;
12
- }
13
-
14
- export type RouteContext<P extends Params = Params> = {
15
- navigator: Navigator;
16
- } & RouteState<P>;
17
-
18
- export interface LinkProps<
19
- P extends Params = Params,
20
- > extends HTMLAttributes<HTMLAnchorElement> {
21
- routeName: string;
22
- routeParams?: P;
23
- routeOptions?: NavigationOptions;
24
- activeClassName?: string;
25
- activeStrict?: boolean;
26
- ignoreQueryParams?: boolean;
27
- /**
28
- * URL fragment (decoded form, no leading "#") (#532).
29
- * - omitted/`undefined` → preserve current fragment on same-route navigation
30
- * - `""` → clear fragment
31
- * - non-empty → set fragment
32
- *
33
- * Requires a URL plugin (browser-plugin or navigation-plugin) for full
34
- * round-trip; hash-plugin ignores the prop with a one-time dev warning.
35
- */
36
- hash?: string;
37
- target?: string;
38
- onClick?: MouseEventHandler<HTMLAnchorElement>;
39
- onMouseOver?: MouseEventHandler<HTMLAnchorElement>;
40
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * Render-scoped HTTP status sink. Created per request on the server, passed to
3
- * `<HttpStatusProvider sink={...}>`, and read after `renderToString` /
4
- * `renderToReadableStream` to apply the value to the HTTP response.
5
- *
6
- * Last write wins: if the rendered tree mounts more than one
7
- * `<HttpStatusCode />`, the value reflects the last component that ran during
8
- * the render pass.
9
- *
10
- * No-op on the client — `<HttpStatusCode />` reads the optional context and
11
- * skips the write when no provider is mounted, so the same component tree can
12
- * be hydrated without changing behaviour.
13
- *
14
- * Constraints:
15
- * - **Per-request only.** Don't share a sink across requests; the rendered
16
- * tree mutates `code` in place. Module-level singletons leak status
17
- * between concurrent requests.
18
- * - **Don't `Object.freeze` the sink.** The component writes to `.code`;
19
- * freezing makes the assignment throw under ESM strict mode.
20
- */
21
- export interface HttpStatusSink {
22
- code: number | undefined;
23
- }
24
-
25
- export function createHttpStatusSink(): HttpStatusSink {
26
- return { code: undefined };
27
- }