@storybook/tanstack-react 11.0.0-alpha.1 → 11.0.0-alpha.3

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.
@@ -1,4 +1,5 @@
1
1
  // src/routing/path-utils.ts
2
+ import { interpolatePath } from "@tanstack/react-router";
2
3
  var possiblyNestedRouteGroupPatternRegex = /\([^/]+\)\/?/g;
3
4
  function removeGroups(s) {
4
5
  return s.replace(possiblyNestedRouteGroupPatternRegex, "");
@@ -20,8 +21,15 @@ function isPathlessFileRouteId(id) {
20
21
  let segments = id.split("/").filter(Boolean), lastSegment = segments[segments.length - 1];
21
22
  return lastSegment != null && isPathlessSegment(lastSegment);
22
23
  }
24
+ function interpolateStoryPath(path, params) {
25
+ return interpolatePath.length >= 2 ? interpolatePath(path, toPathInterpolationSegments(path), params) : interpolatePath({ path, params }).interpolatedPath;
26
+ }
27
+ function toPathInterpolationSegments(path) {
28
+ return path.split("/").filter(Boolean).map((part) => part === "$" ? [2, "_splat", "/", void 0] : part.startsWith("$") ? [1, part.slice(1), "/", ""] : `/${part}`);
29
+ }
23
30
 
24
31
  export {
25
32
  normalizeFileRoutePath,
26
- isPathlessFileRouteId
33
+ isPathlessFileRouteId,
34
+ interpolateStoryPath
27
35
  };
@@ -1,6 +1,7 @@
1
1
  import {
2
+ interpolateStoryPath,
2
3
  normalizeFileRoutePath
3
- } from "./chunk-LTDGLEVR.js";
4
+ } from "./chunk-NGWBYAM4.js";
4
5
  import {
5
6
  __export
6
7
  } from "./chunk-4BE7D4DS.js";
@@ -23,7 +24,6 @@ import {
23
24
  createRoute as createRoute2,
24
25
  createRouter,
25
26
  defaultStringifySearch,
26
- interpolatePath as interpolatePath2,
27
27
  RouterProvider
28
28
  } from "@tanstack/react-router";
29
29
  import React from "react";
@@ -33,7 +33,6 @@ import {
33
33
  createRoute,
34
34
  RootRoute,
35
35
  createRootRouteWithContext,
36
- interpolatePath,
37
36
  joinPaths
38
37
  } from "@tanstack/react-router";
39
38
  var MAX_PARENT_WALK = 50;
@@ -122,7 +121,7 @@ function resolveStoryLeaf(tree, {
122
121
  if (path) {
123
122
  let bound = boundRouteId ? byId.get(boundRouteId) : void 0;
124
123
  if (bound) {
125
- let boundCandidate = mountPathFor(bound), boundInterpolated = params ? interpolatePath({ path: boundCandidate, params }).interpolatedPath : boundCandidate;
124
+ let boundCandidate = mountPathFor(bound), boundInterpolated = params ? interpolateStoryPath(boundCandidate, params) : boundCandidate;
126
125
  if (boundCandidate === path || boundInterpolated === path)
127
126
  return bound;
128
127
  }
@@ -130,7 +129,7 @@ function resolveStoryLeaf(tree, {
130
129
  for (let route of byId.values()) {
131
130
  if (route === root)
132
131
  continue;
133
- let candidate = mountPathFor(route), isLiteral = candidate === path, interpolated = params ? interpolatePath({ path: candidate, params }).interpolatedPath : candidate;
132
+ let candidate = mountPathFor(route), isLiteral = candidate === path, interpolated = params ? interpolateStoryPath(candidate, params) : candidate;
134
133
  if (!isLiteral && interpolated !== path)
135
134
  continue;
136
135
  (isLiteral === bestLiteral ? candidate.length > bestMatchLength : isLiteral) && (bestMatch = route, bestLiteral = isLiteral, bestMatchLength = candidate.length);
@@ -178,10 +177,7 @@ function createStoryRouter({
178
177
  context,
179
178
  routerContext
180
179
  }) {
181
- let routerParameters = context.parameters.tanstack?.router ?? {}, { tree, leaf } = resolveTree(Story, context), routeTree = tree.root, inferredPath = routerParameters?.path || leaf.fullPath || (leaf.id ? normalizeFileRoutePath(leaf.id) : void 0) || mountPathFor(leaf), resolvedPath = interpolatePath2({
182
- path: inferredPath,
183
- params: routerParameters?.params ?? {}
184
- }).interpolatedPath, search = routerParameters?.query ? defaultStringifySearch(routerParameters.query) : "";
180
+ let routerParameters = context.parameters.tanstack?.router ?? {}, { tree, leaf } = resolveTree(Story, context), routeTree = tree.root, inferredPath = routerParameters?.path || leaf.fullPath || (leaf.id ? normalizeFileRoutePath(leaf.id) : void 0) || mountPathFor(leaf), resolvedPath = interpolateStoryPath(inferredPath, routerParameters?.params ?? {}), search = routerParameters?.query ? defaultStringifySearch(routerParameters.query) : "";
185
181
  search && (resolvedPath += search);
186
182
  let history = createMemoryHistory({
187
183
  initialEntries: [resolvedPath]
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isPathlessFileRouteId,
3
3
  normalizeFileRoutePath
4
- } from "../_browser-chunks/chunk-LTDGLEVR.js";
4
+ } from "../_browser-chunks/chunk-NGWBYAM4.js";
5
5
  import {
6
6
  onNavigate
7
7
  } from "../_browser-chunks/chunk-4CKCBIXI.js";
package/dist/index.d.ts CHANGED
@@ -1,201 +1,12 @@
1
1
  import { a as TanStackPreviewOptions, c as IsRoute, d as StoryRouteOptions, i as TanStackParameters, l as RouterParameters, n as FrameworkOptions, o as TanStackTypes, r as StorybookConfig, s as CreateStoryRouteOptions, t as DefaultStoryPath, u as StoryRouteFileOptions } from "./chunk-B0pqNVvJ.js";
2
2
  import { ComponentType } from "react";
3
- import { AddonTypes, InferTypes, PreviewAddon } from "storybook/internal/csf";
4
- import { Args, ArgsStoryFn, ComponentAnnotations, DecoratorFunction, Parameters, ProjectAnnotations, Renderer, StoryAnnotations } from "storybook/internal/types";
3
+ import { AddonTypes, InferTypes, MetaInput, MetaTypes, PreviewAddon } from "storybook/internal/csf";
4
+ import { Args, ArgsStoryFn, ComponentAnnotations, DecoratorFunction, Parameters, ProjectAnnotations, StoryAnnotations } from "storybook/internal/types";
5
5
  import { AnyRoute } from "@tanstack/react-router";
6
6
  import { Meta as Meta$1, ReactMeta, ReactPreview, ReactRenderer, ReactTypes, StoryObj as StoryObj$1 } from "@storybook/react";
7
7
  export * from "@storybook/react";
8
8
 
9
- //#region node_modules/type-fest/source/union-to-intersection.d.ts
10
- /**
11
- Convert a union type to an intersection type.
12
-
13
- Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153).
14
-
15
- @example
16
- ```
17
- import type {UnionToIntersection} from 'type-fest';
18
-
19
- type Union = {the(): void} | {great(arg: string): void} | {escape: boolean};
20
-
21
- type Intersection = UnionToIntersection<Union>;
22
- //=> {the(): void} & {great(arg: string): void} & {escape: boolean}
23
- ```
24
-
25
- @category Type
26
- */
27
- type UnionToIntersection<Union> = (// `extends unknown` is always going to be the case and is used to convert the
28
- // `Union` into a [distributive conditional
29
- // type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
30
- Union extends unknown // The union type is used as the only argument to a function since the union
31
- // of function arguments is an intersection.
32
- ? (distributedUnion: Union) => void // This won't happen.
33
- : never // Infer the `Intersection` type since TypeScript represents the positional
34
- // arguments of unions of functions as an intersection of the union.
35
- ) extends ((mergedIntersection: infer Intersection) => void) // The `& Union` is to ensure result of `UnionToIntersection<A | B>` is always assignable to `A | B`
36
- ? Intersection & Union : never;
37
- //#endregion
38
- //#region node_modules/type-fest/source/simplify.d.ts
39
- /**
40
- Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
41
-
42
- @example
43
- ```
44
- import type {Simplify} from 'type-fest';
45
-
46
- type PositionProps = {
47
- top: number;
48
- left: number;
49
- };
50
-
51
- type SizeProps = {
52
- width: number;
53
- height: number;
54
- };
55
-
56
- // In your editor, hovering over `Props` will show a flattened object with all the properties.
57
- type Props = Simplify<PositionProps & SizeProps>;
58
- ```
59
-
60
- Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface.
61
-
62
- If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`.
63
-
64
- @example
65
- ```
66
- import type {Simplify} from 'type-fest';
67
-
68
- interface SomeInterface {
69
- foo: number;
70
- bar?: string;
71
- baz: number | undefined;
72
- }
73
-
74
- type SomeType = {
75
- foo: number;
76
- bar?: string;
77
- baz: number | undefined;
78
- };
79
-
80
- const literal = {foo: 123, bar: 'hello', baz: 456};
81
- const someType: SomeType = literal;
82
- const someInterface: SomeInterface = literal;
83
-
84
- declare function fn(object: Record<string, unknown>): void;
85
-
86
- fn(literal); // Good: literal object type is sealed
87
- fn(someType); // Good: type is sealed
88
- // @ts-expect-error
89
- fn(someInterface); // Error: Index signature for type 'string' is missing in type 'someInterface'. Because `interface` can be re-opened
90
- fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface` into a `type`
91
- ```
92
-
93
- @link https://github.com/microsoft/TypeScript/issues/15300
94
- @see {@link SimplifyDeep}
95
- @category Object
96
- */
97
- type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
98
- //#endregion
99
- //#region node_modules/type-fest/source/omit-index-signature.d.ts
100
- /**
101
- Omit any index signatures from the given object type, leaving only explicitly defined properties.
102
-
103
- This is the counterpart of `PickIndexSignature`.
104
-
105
- Use-cases:
106
- - Remove overly permissive signatures from third-party types.
107
-
108
- This type was taken from this [StackOverflow answer](https://stackoverflow.com/a/68261113/420747).
109
-
110
- It relies on the fact that an empty object (`{}`) is assignable to an object with just an index signature, like `Record<string, unknown>`, but not to an object with explicitly defined keys, like `Record<'foo' | 'bar', unknown>`.
111
-
112
- (The actual value type, `unknown`, is irrelevant and could be any type. Only the key type matters.)
113
-
114
- ```
115
- const indexed: Record<string, unknown> = {}; // Allowed
116
-
117
- // @ts-expect-error
118
- const keyed: Record<'foo', unknown> = {}; // Error
119
- // TS2739: Type '{}' is missing the following properties from type 'Record<"foo" | "bar", unknown>': foo, bar
120
- ```
121
-
122
- Instead of causing a type error like the above, you can also use a [conditional type](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html) to test whether a type is assignable to another:
123
-
124
- ```
125
- type Indexed = {} extends Record<string, unknown>
126
- ? '✅ `{}` is assignable to `Record<string, unknown>`'
127
- : '❌ `{}` is NOT assignable to `Record<string, unknown>`';
128
-
129
- type IndexedResult = Indexed;
130
- //=> '✅ `{}` is assignable to `Record<string, unknown>`'
131
-
132
- type Keyed = {} extends Record<'foo' | 'bar', unknown>
133
- ? '✅ `{}` is assignable to `Record<\'foo\' | \'bar\', unknown>`'
134
- : '❌ `{}` is NOT assignable to `Record<\'foo\' | \'bar\', unknown>`';
135
-
136
- type KeyedResult = Keyed;
137
- //=> '❌ `{}` is NOT assignable to `Record<\'foo\' | \'bar\', unknown>`'
138
- ```
139
-
140
- Using a [mapped type](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#further-exploration), you can then check for each `KeyType` of `ObjectType`...
141
-
142
- ```
143
- type OmitIndexSignature<ObjectType> = {
144
- [KeyType in keyof ObjectType // Map each key of `ObjectType`...
145
- ]: ObjectType[KeyType]; // ...to its original value, i.e. `OmitIndexSignature<Foo> == Foo`.
146
- };
147
- ```
148
-
149
- ...whether an empty object (`{}`) would be assignable to an object with that `KeyType` (`Record<KeyType, unknown>`)...
150
-
151
- ```
152
- type OmitIndexSignature<ObjectType> = {
153
- [KeyType in keyof ObjectType
154
- // Is `{}` assignable to `Record<KeyType, unknown>`?
155
- as {} extends Record<KeyType, unknown>
156
- ? never // ✅ `{}` is assignable to `Record<KeyType, unknown>`
157
- : KeyType // ❌ `{}` is NOT assignable to `Record<KeyType, unknown>`
158
- ]: ObjectType[KeyType];
159
- };
160
- ```
161
-
162
- If `{}` is assignable, it means that `KeyType` is an index signature and we want to remove it. If it is not assignable, `KeyType` is a "real" key and we want to keep it.
163
-
164
- @example
165
- ```
166
- import type {OmitIndexSignature} from 'type-fest';
167
-
168
- type Example = {
169
- // These index signatures will be removed.
170
- [x: string]: any;
171
- [x: number]: any;
172
- [x: symbol]: any;
173
- [x: `head-${string}`]: string;
174
- [x: `${string}-tail`]: string;
175
- [x: `head-${string}-tail`]: string;
176
- [x: `${bigint}`]: string;
177
- [x: `embedded-${number}`]: string;
178
-
179
- // These explicitly defined keys will remain.
180
- foo: 'bar';
181
- qux?: 'baz';
182
- };
183
-
184
- type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
185
- //=> {foo: 'bar'; qux?: 'baz'}
186
- ```
187
-
188
- @see {@link PickIndexSignature}
189
- @category Object
190
- */
191
- type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
192
- //#endregion
193
9
  //#region code/frameworks/tanstack-react/.dts-emit/code/frameworks/tanstack-react/src/index.d.ts
194
- /** Extracts and unions all args types from an array of decorators. */
195
- type DecoratorsArgs<TRenderer extends Renderer, Decorators> = UnionToIntersection<Decorators extends DecoratorFunction<TRenderer, infer TArgs> ? TArgs : unknown>;
196
- type InferCombinedTypes<T, TArgs, Decorators> = ReactTypes & T & {
197
- args: Simplify<TArgs & Simplify<OmitIndexSignature<DecoratorsArgs<ReactTypes & T, Decorators>>>>;
198
- };
199
10
  type Preview<TRoute extends AnyRoute | undefined = undefined> = ProjectAnnotations<ReactTypes & TanStackTypes<TRoute>>;
200
11
  declare function definePreview<TRoute extends AnyRoute | undefined = undefined, const TPath extends DefaultStoryPath<TRoute> = DefaultStoryPath<TRoute>, Addons extends PreviewAddon<never>[] = []>(preview: {
201
12
  addons?: Addons;
@@ -218,24 +29,16 @@ type StoryObj<TMetaOrCmpOrArgs = unknown> = [TMetaOrCmpOrArgs] extends [{
218
29
  }] ? IsRoute<Component> extends true ? StoryAnnotations<ReactRenderer, Args, Partial<Args>> & Partial<TanStackTypes<Component>> : StoryObj$1<TMetaOrCmpOrArgs> & Partial<TanStackTypes> : IsRoute<TMetaOrCmpOrArgs> extends true ? StoryAnnotations<ReactRenderer, Args, Partial<Args>> & Partial<TanStackTypes<TMetaOrCmpOrArgs>> : StoryObj$1<TMetaOrCmpOrArgs> & Partial<TanStackTypes>;
219
30
  interface TanStackPreview<T extends AddonTypes, TRoute extends AnyRoute | undefined = undefined> extends ReactPreview<TanStackTypes<TRoute> & T> {
220
31
  type<R>(): TanStackPreview<T & R, TRoute>;
221
- meta<TMetaRoute extends AnyRoute, const TPath extends DefaultStoryPath<TMetaRoute> = DefaultStoryPath<TMetaRoute>, TArgs extends Args = Args, Decorators extends DecoratorFunction<ReactTypes & TanStackTypes<TMetaRoute, TPath> & T, any> = DecoratorFunction<ReactTypes & TanStackTypes<TMetaRoute, TPath> & T, any>, TMetaArgs extends Partial<TArgs & (TanStackTypes<TMetaRoute, TPath> & T)['args']> = Partial<TArgs & (TanStackTypes<TMetaRoute, TPath> & T)['args']>>(meta: {
32
+ meta<TMetaRoute extends AnyRoute, const TPath extends DefaultStoryPath<TMetaRoute> = DefaultStoryPath<TMetaRoute>, TArgs extends Args = Args, Decorators extends DecoratorFunction<ReactTypes & TanStackTypes<TMetaRoute, TPath> & T, any> = DecoratorFunction<ReactTypes & TanStackTypes<TMetaRoute, TPath> & T, any>, TMetaArgKeys extends PropertyKey = never>(meta: {
222
33
  render?: ArgsStoryFn<ReactTypes & TanStackTypes<TMetaRoute, TPath> & T, TArgs & (TanStackTypes<TMetaRoute, TPath> & T)['args']>;
223
34
  component?: ComponentType<TArgs>;
224
- decorators?: Decorators | Decorators[];
225
- args?: TMetaArgs;
226
35
  parameters?: TanStackParameters<TMetaRoute, TPath> & Parameters & (ReactTypes & T)['parameters'];
227
- } & Omit<ComponentAnnotations<ReactTypes & TanStackTypes<TMetaRoute, TPath> & T, TArgs>, 'decorators' | 'component' | 'args' | 'render' | 'parameters'>): ReactMeta<InferCombinedTypes<TanStackTypes<TMetaRoute, TPath> & T, TArgs, Decorators>, Omit<ComponentAnnotations<InferCombinedTypes<TanStackTypes<TMetaRoute, TPath> & T, TArgs, Decorators>>, 'args'> & {
228
- args: Partial<TArgs> extends TMetaArgs ? {} : TMetaArgs;
229
- }>;
230
- meta<const TPath extends DefaultStoryPath<TRoute> = DefaultStoryPath<TRoute>, TArgs extends Args = Args, Decorators extends DecoratorFunction<ReactTypes & TanStackTypes<TRoute, TPath> & T, any> = DecoratorFunction<ReactTypes & TanStackTypes<TRoute, TPath> & T, any>, TMetaArgs extends Partial<TArgs & (TanStackTypes<TRoute, TPath> & T)['args']> = Partial<TArgs & (TanStackTypes<TRoute, TPath> & T)['args']>>(meta: {
36
+ } & MetaInput<ReactTypes & TanStackTypes<TMetaRoute, TPath> & T, TArgs, Decorators, TMetaArgKeys>): ReactMeta<MetaTypes<ReactTypes & TanStackTypes<TMetaRoute, TPath> & T, TArgs, Decorators, TMetaArgKeys>, TMetaArgKeys>;
37
+ meta<const TPath extends DefaultStoryPath<TRoute> = DefaultStoryPath<TRoute>, TArgs extends Args = Args, Decorators extends DecoratorFunction<ReactTypes & TanStackTypes<TRoute, TPath> & T, any> = DecoratorFunction<ReactTypes & TanStackTypes<TRoute, TPath> & T, any>, TMetaArgKeys extends PropertyKey = never>(meta: {
231
38
  render?: ArgsStoryFn<ReactTypes & TanStackTypes<TRoute, TPath> & T, TArgs & (TanStackTypes<TRoute, TPath> & T)['args']>;
232
39
  component?: ComponentType<TArgs>;
233
- decorators?: Decorators | Decorators[];
234
- args?: TMetaArgs;
235
40
  parameters?: TanStackParameters<TRoute, TPath> & Parameters & (ReactTypes & T)['parameters'];
236
- } & Omit<ComponentAnnotations<ReactTypes & TanStackTypes<TRoute, TPath> & T, TArgs>, 'decorators' | 'component' | 'args' | 'render' | 'parameters'>): ReactMeta<InferCombinedTypes<TanStackTypes<TRoute, TPath> & T, TArgs, Decorators>, Omit<ComponentAnnotations<InferCombinedTypes<TanStackTypes<TRoute, TPath> & T, TArgs, Decorators>>, 'args'> & {
237
- args: Partial<TArgs> extends TMetaArgs ? {} : TMetaArgs;
238
- }>;
41
+ } & MetaInput<ReactTypes & TanStackTypes<TRoute, TPath> & T, TArgs, Decorators, TMetaArgKeys>): ReactMeta<MetaTypes<ReactTypes & TanStackTypes<TRoute, TPath> & T, TArgs, Decorators, TMetaArgKeys>, TMetaArgKeys>;
239
42
  }
240
43
  //#endregion
241
44
  export { type CreateStoryRouteOptions, DefaultStoryPath, FrameworkOptions, type IsRoute, Meta, Preview, type RouterParameters, StoryObj, type StoryRouteFileOptions, type StoryRouteOptions, StorybookConfig, TanStackParameters, TanStackPreview, TanStackPreviewOptions, TanStackTypes, definePreview };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  preview_exports
3
- } from "./_browser-chunks/chunk-HRV4LMK3.js";
4
- import "./_browser-chunks/chunk-LTDGLEVR.js";
3
+ } from "./_browser-chunks/chunk-O6D7CVOG.js";
4
+ import "./_browser-chunks/chunk-NGWBYAM4.js";
5
5
  import "./_browser-chunks/chunk-4BE7D4DS.js";
6
6
 
7
7
  // src/index.ts
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_jzz8z99qzrh from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_jzz8z99qzrh from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_jzz8z99qzrh from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8oq7tq91y0l from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8oq7tq91y0l from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8oq7tq91y0l from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_jzz8z99qzrh.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_jzz8z99qzrh.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_jzz8z99qzrh.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8oq7tq91y0l.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8oq7tq91y0l.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8oq7tq91y0l.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 CJS_COMPAT_NODE_URL_jzz8z99qzrh from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_jzz8z99qzrh from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_jzz8z99qzrh from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8oq7tq91y0l from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8oq7tq91y0l from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8oq7tq91y0l from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_jzz8z99qzrh.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_jzz8z99qzrh.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_jzz8z99qzrh.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8oq7tq91y0l.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8oq7tq91y0l.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8oq7tq91y0l.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
@@ -4,8 +4,8 @@ import {
4
4
  loaders,
5
5
  optimizeDeps,
6
6
  parameters
7
- } from "./_browser-chunks/chunk-HRV4LMK3.js";
8
- import "./_browser-chunks/chunk-LTDGLEVR.js";
7
+ } from "./_browser-chunks/chunk-O6D7CVOG.js";
8
+ import "./_browser-chunks/chunk-NGWBYAM4.js";
9
9
  import "./_browser-chunks/chunk-4BE7D4DS.js";
10
10
  export {
11
11
  applyDecorators,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/tanstack-react",
3
- "version": "11.0.0-alpha.1",
3
+ "version": "11.0.0-alpha.3",
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": "11.0.0-alpha.1",
79
- "@storybook/react": "11.0.0-alpha.1",
80
- "@storybook/react-vite": "11.0.0-alpha.1"
78
+ "@storybook/builder-vite": "11.0.0-alpha.3",
79
+ "@storybook/react": "11.0.0-alpha.3",
80
+ "@storybook/react-vite": "11.0.0-alpha.3"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@tanstack/react-router": "^1.168.10",
@@ -93,9 +93,9 @@
93
93
  "@tanstack/react-start": "^1.167.16",
94
94
  "@tanstack/router-core": "^1.168.9",
95
95
  "@tanstack/start-client-core": "^1.167.9",
96
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
97
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
98
- "storybook": "^11.0.0-alpha.1",
96
+ "react": "^18.0.0 || ^19.0.0",
97
+ "react-dom": "^18.0.0 || ^19.0.0",
98
+ "storybook": "^11.0.0-alpha.3",
99
99
  "vite": "^6.3.0 || ^7.0.0 || ^8.0.0"
100
100
  },
101
101
  "peerDependenciesMeta": {