@octanejs/tanstack-router 0.1.54 → 0.1.55
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/package.json +3 -3
- package/src/Match.tsrx +3 -3
- package/src/Matches.tsrx +3 -3
- package/src/RouterProvider.tsrx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/tanstack-router",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.55",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"isbot": "^5.1.22"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"octane": "^0.1.51 || ^0.2.0"
|
|
61
|
+
"octane": "^0.1.51 || ^0.2.0 || ^0.3.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@tanstack/react-router": "1.170.18",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"react": "19.2.7",
|
|
68
68
|
"react-dom": "19.2.7",
|
|
69
69
|
"vitest": "^4.1.10",
|
|
70
|
-
"octane": "0.
|
|
70
|
+
"octane": "0.3.0"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"test": "vitest run"
|
package/src/Match.tsrx
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import type { NotFoundError, ParsedLocation, RootRouteOptions } from '@tanstack/router-core';
|
|
28
28
|
import type { ErrorInfo, ErrorRouteComponent } from './route.ts';
|
|
29
29
|
import { useStore } from './useStore.ts';
|
|
30
|
-
import { useRouter, matchContext } from './context.ts';
|
|
30
|
+
import { useRouter, matchContext as MatchContext } from './context.ts';
|
|
31
31
|
import { Outlet } from './Outlet.tsrx';
|
|
32
32
|
import { RouteNotFound } from './RouteNotFound.tsrx';
|
|
33
33
|
import { CatchBoundary, ErrorComponent } from './CatchBoundary.tsrx';
|
|
@@ -83,7 +83,7 @@ export function Match(props: { matchId: string }) @{
|
|
|
83
83
|
const parentRouteId = route.parentRoute?.id;
|
|
84
84
|
|
|
85
85
|
<ShellComponent>
|
|
86
|
-
<
|
|
86
|
+
<MatchContext value={props.matchId}>
|
|
87
87
|
<SuspenseWrap fallback={pendingElement}>
|
|
88
88
|
<CatchWrap
|
|
89
89
|
getResetKey={() => resetKey}
|
|
@@ -119,7 +119,7 @@ export function Match(props: { matchId: string }) @{
|
|
|
119
119
|
</NotFoundWrap>
|
|
120
120
|
</CatchWrap>
|
|
121
121
|
</SuspenseWrap>
|
|
122
|
-
</
|
|
122
|
+
</MatchContext>
|
|
123
123
|
@if (parentRouteId === rootRouteId) {
|
|
124
124
|
<>
|
|
125
125
|
<OnRendered />
|
package/src/Matches.tsrx
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { useLayoutEffect, createElement, Suspense } from 'octane';
|
|
14
14
|
import { setupScrollRestoration, rootRouteId } from '@tanstack/router-core';
|
|
15
15
|
import { useStore } from './useStore.ts';
|
|
16
|
-
import { useRouter, matchContext } from './context.ts';
|
|
16
|
+
import { useRouter, matchContext as MatchContext } from './context.ts';
|
|
17
17
|
import { useTransitioner } from './Transitioner.tsrx';
|
|
18
18
|
import { Match } from './Match.tsrx';
|
|
19
19
|
import { CatchBoundary, ErrorComponent } from './CatchBoundary.tsrx';
|
|
@@ -48,11 +48,11 @@ function MatchesInner() @{
|
|
|
48
48
|
const resetKey = useStore(router.stores.loadedAt, (l: any) => l as number | string);
|
|
49
49
|
const CatchWrap = router.options.disableGlobalCatchBoundary ? SafeFragment : CatchBoundary;
|
|
50
50
|
|
|
51
|
-
<
|
|
51
|
+
<MatchContext value={matchId}>
|
|
52
52
|
<CatchWrap getResetKey={() => resetKey} errorComponent={ErrorComponent}>
|
|
53
53
|
@if (matchId) {
|
|
54
54
|
<Match matchId={matchId} />
|
|
55
55
|
}
|
|
56
56
|
</CatchWrap>
|
|
57
|
-
</
|
|
57
|
+
</MatchContext>
|
|
58
58
|
}
|
package/src/RouterProvider.tsrx
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { hasKeys } from '@tanstack/router-core';
|
|
8
8
|
import type { AnyRouter } from '@tanstack/router-core';
|
|
9
9
|
import type { OctaneNode } from 'octane';
|
|
10
|
-
import { routerContext } from './context.ts';
|
|
10
|
+
import { routerContext as RouterContext } from './context.ts';
|
|
11
11
|
import { Matches } from './Matches.tsrx';
|
|
12
12
|
import { SafeFragment } from './SafeFragment.tsrx';
|
|
13
13
|
|
|
@@ -35,7 +35,7 @@ export function RouterContextProvider(props: RouterProps & { children?: OctaneNo
|
|
|
35
35
|
const Wrap = router.options.Wrap ?? SafeFragment;
|
|
36
36
|
|
|
37
37
|
<Wrap>
|
|
38
|
-
<
|
|
38
|
+
<RouterContext value={router}>{children}</RouterContext>
|
|
39
39
|
</Wrap>
|
|
40
40
|
}
|
|
41
41
|
|