@storybook/tanstack-react 10.5.8 → 10.5.9
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/_browser-chunks/{chunk-TR4QWDPU.js → chunk-AHXPC7UR.js} +4 -1
- package/dist/export-mocks/react-router.d.ts +0 -1
- package/dist/export-mocks/react-router.js +3 -4
- package/dist/index.js +1 -1
- package/dist/node/index.js +6 -6
- package/dist/preset.js +6 -6
- package/dist/preview.js +1 -1
- package/package.json +5 -5
|
@@ -55,9 +55,12 @@ function initSourceTree(route, counter) {
|
|
|
55
55
|
for (let child of children)
|
|
56
56
|
initSourceTree(child, counter);
|
|
57
57
|
}
|
|
58
|
+
function layoutIdFor(id) {
|
|
59
|
+
return id.length > 1 && id.endsWith("/") ? id.slice(0, -1) : id;
|
|
60
|
+
}
|
|
58
61
|
function cloneChild(oldRoute, parent, overrides, byId) {
|
|
59
62
|
let options = oldRoute.options ?? {}, { id: originalId, getParentRoute: _g, ...rest } = options, override = getOverrideFor(overrides, oldRoute.id), { id: overrideId, ...overrideRest } = override, merged = { ...rest, ...overrideRest }, explicitId = "id" in override ? overrideId : originalId, cloned = createRoute({
|
|
60
|
-
...!merged.path && explicitId != null ? { id: explicitId } : {},
|
|
63
|
+
...!merged.path && explicitId != null ? { id: layoutIdFor(explicitId) } : {},
|
|
61
64
|
...merged,
|
|
62
65
|
getParentRoute: () => parent
|
|
63
66
|
});
|
|
@@ -38,15 +38,14 @@ var useNavigate = fn(_useNavigate).mockName("@tanstack/react-router::useNavigate
|
|
|
38
38
|
children,
|
|
39
39
|
...props
|
|
40
40
|
}) => {
|
|
41
|
-
let location = useLocation();
|
|
41
|
+
let location = useLocation(), { onClick: _navigate, ...linkProps } = _useLinkProps({ to, ...props });
|
|
42
42
|
return React.createElement(
|
|
43
43
|
"a",
|
|
44
44
|
{
|
|
45
|
-
|
|
45
|
+
...linkProps,
|
|
46
46
|
onClick: (e) => {
|
|
47
47
|
e.preventDefault(), onNavigate({ to, from: location.href });
|
|
48
|
-
}
|
|
49
|
-
...props
|
|
48
|
+
}
|
|
50
49
|
},
|
|
51
50
|
children
|
|
52
51
|
);
|
package/dist/index.js
CHANGED
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_14lcqg6ogjz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_14lcqg6ogjz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_14lcqg6ogjz from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_14lcqg6ogjz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_14lcqg6ogjz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_14lcqg6ogjz.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_14lcqg6ogjz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_14lcqg6ogjz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_14lcqg6ogjz from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_14lcqg6ogjz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_14lcqg6ogjz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_14lcqg6ogjz.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preview.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/tanstack-react",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.9",
|
|
4
4
|
"description": "Storybook for TanStack (React, Vite): Router and Start ready Storybook framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"!src/**/*"
|
|
76
76
|
],
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@storybook/builder-vite": "10.5.
|
|
79
|
-
"@storybook/react": "10.5.
|
|
80
|
-
"@storybook/react-vite": "10.5.
|
|
78
|
+
"@storybook/builder-vite": "10.5.9",
|
|
79
|
+
"@storybook/react": "10.5.9",
|
|
80
|
+
"@storybook/react-vite": "10.5.9"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@tanstack/react-router": "^1.168.10",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@tanstack/start-client-core": "^1.167.9",
|
|
96
96
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
97
97
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
98
|
-
"storybook": "^10.5.
|
|
98
|
+
"storybook": "^10.5.9",
|
|
99
99
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
100
100
|
},
|
|
101
101
|
"peerDependenciesMeta": {
|