@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.
- package/dist/cjs/{Link-CyDwbrFA.js → Link-D4K4T0Ef.js} +2 -2
- package/dist/cjs/{Link-CyDwbrFA.js.map → Link-D4K4T0Ef.js.map} +1 -1
- package/dist/cjs/{RouterErrorBoundary-3UhUelqY.d.ts → RouterErrorBoundary-k17kf8Rr.d.ts} +3 -3
- package/dist/cjs/{RouterErrorBoundary-3UhUelqY.d.ts.map → RouterErrorBoundary-k17kf8Rr.d.ts.map} +1 -1
- package/dist/cjs/{RouterProvider-CPsCmrRw.js → RouterProvider-CAaKExt_.js} +2 -2
- package/dist/cjs/RouterProvider-CAaKExt_.js.map +1 -0
- package/dist/cjs/{RouterProvider-lgNarto1.d.ts → RouterProvider-xbLo90sc.d.ts} +2 -2
- package/dist/cjs/{RouterProvider-lgNarto1.d.ts.map → RouterProvider-xbLo90sc.d.ts.map} +1 -1
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.react-server.d.ts +1 -1
- package/dist/cjs/ink.d.ts +2 -2
- package/dist/cjs/ink.js +1 -1
- package/dist/cjs/legacy.d.ts +3 -3
- package/dist/cjs/legacy.js +1 -1
- package/dist/cjs/{useRouterTransition-D5nwRENd.d.ts → useRouterTransition-CRFKfwuP.d.ts} +2 -2
- package/dist/cjs/{useRouterTransition-D5nwRENd.d.ts.map → useRouterTransition-CRFKfwuP.d.ts.map} +1 -1
- package/dist/esm/{Link-uERoM4yk.mjs → Link-PQIMnFd0.mjs} +2 -2
- package/dist/esm/{Link-uERoM4yk.mjs.map → Link-PQIMnFd0.mjs.map} +1 -1
- package/dist/esm/{RouterErrorBoundary-3UhUelqY.d.mts → RouterErrorBoundary-k17kf8Rr.d.mts} +3 -3
- package/dist/esm/{RouterErrorBoundary-3UhUelqY.d.mts.map → RouterErrorBoundary-k17kf8Rr.d.mts.map} +1 -1
- package/dist/esm/{RouterProvider-DCchvq4n.d.mts → RouterProvider-CG1cqrjE.d.mts} +2 -2
- package/dist/esm/{RouterProvider-DCchvq4n.d.mts.map → RouterProvider-CG1cqrjE.d.mts.map} +1 -1
- package/dist/esm/{RouterProvider-DgHypQTJ.mjs → RouterProvider-DhZoi6au.mjs} +2 -2
- package/dist/esm/RouterProvider-DhZoi6au.mjs.map +1 -0
- package/dist/esm/index.d.mts +3 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.react-server.d.mts +1 -1
- package/dist/esm/ink.d.mts +2 -2
- package/dist/esm/ink.mjs +1 -1
- package/dist/esm/legacy.d.mts +3 -3
- package/dist/esm/legacy.mjs +1 -1
- package/dist/esm/{useRouterTransition-PCwA_qj1.d.mts → useRouterTransition-C5Ubt7rP.d.mts} +2 -2
- package/dist/esm/{useRouterTransition-PCwA_qj1.d.mts.map → useRouterTransition-C5Ubt7rP.d.mts.map} +1 -1
- package/package.json +6 -7
- package/dist/cjs/RouterProvider-CPsCmrRw.js.map +0 -1
- package/dist/esm/RouterProvider-DgHypQTJ.mjs.map +0 -1
- package/src/RouterProvider.tsx +0 -148
- package/src/components/Await.tsx +0 -46
- package/src/components/ClientOnly.tsx +0 -25
- package/src/components/HttpStatusCode.tsx +0 -66
- package/src/components/HttpStatusProvider.tsx +0 -26
- package/src/components/InkLink.tsx +0 -134
- package/src/components/InkRouterProvider.tsx +0 -9
- package/src/components/Link.tsx +0 -117
- package/src/components/RouterErrorBoundary.tsx +0 -69
- package/src/components/ServerOnly.tsx +0 -26
- package/src/components/Streamed.tsx +0 -30
- package/src/components/modern/RouteView/RouteView.tsx +0 -69
- package/src/components/modern/RouteView/components.tsx +0 -19
- package/src/components/modern/RouteView/helpers.tsx +0 -231
- package/src/components/modern/RouteView/index.ts +0 -8
- package/src/components/modern/RouteView/types.ts +0 -38
- package/src/constants.ts +0 -10
- package/src/context.ts +0 -14
- package/src/hooks/useDeferred.tsx +0 -34
- package/src/hooks/useIsActiveRoute.tsx +0 -47
- package/src/hooks/useNavigator.tsx +0 -15
- package/src/hooks/useRoute.tsx +0 -32
- package/src/hooks/useRouteEnter.tsx +0 -148
- package/src/hooks/useRouteExit.tsx +0 -159
- package/src/hooks/useRouteNode.tsx +0 -37
- package/src/hooks/useRouteUtils.tsx +0 -35
- package/src/hooks/useRouter.tsx +0 -15
- package/src/hooks/useRouterTransition.tsx +0 -17
- package/src/index.react-server.ts +0 -33
- package/src/index.ts +0 -61
- package/src/ink-types.ts +0 -25
- package/src/ink.ts +0 -30
- package/src/legacy.ssr.ts +0 -35
- package/src/legacy.ts +0 -35
- package/src/ssr.react-server.ts +0 -21
- package/src/ssr.ts +0 -43
- package/src/types.ts +0 -40
- 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
|
-
}
|