@storybook/react-vite 10.6.0-alpha.0 → 10.6.0-alpha.2
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/_node-chunks/{react-docgen-QLX5QVMQ.js → react-docgen-5L5UV7F2.js} +6 -6
- package/dist/chunk-CJ1Nc_eA.d.ts +56 -0
- package/dist/index.d.ts +4 -58
- package/dist/node/index.d.ts +4 -56
- package/dist/node/index.js +6 -6
- package/dist/preset.d.ts +6 -57
- package/dist/preset.js +7 -7
- package/package.json +5 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_21q9ylf2hkj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_21q9ylf2hkj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_21q9ylf2hkj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_21q9ylf2hkj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_21q9ylf2hkj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_21q9ylf2hkj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CompatibleString, StorybookConfig, TypescriptOptions } from "storybook/internal/types";
|
|
2
|
+
import { BuilderOptions, StorybookConfigVite } from "@storybook/builder-vite";
|
|
3
|
+
import docgenTypescript from "@joshwooding/vite-plugin-react-docgen-typescript";
|
|
4
|
+
|
|
5
|
+
//#region code/frameworks/react-vite/.dts-emit/code/frameworks/react-vite/src/types.d.ts
|
|
6
|
+
type FrameworkName = CompatibleString<'@storybook/react-vite'>;
|
|
7
|
+
type BuilderName = CompatibleString<'@storybook/builder-vite'>;
|
|
8
|
+
type FrameworkOptions = {
|
|
9
|
+
builder?: BuilderOptions;
|
|
10
|
+
strictMode?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Use React's legacy root API to mount components
|
|
13
|
+
*
|
|
14
|
+
* React has introduced a new root API with React 18.x to enable a whole set of new features (e.g.
|
|
15
|
+
* concurrent features) If this flag is true, the legacy Root API is used to mount components to
|
|
16
|
+
* make it easier to migrate step by step to React 18.
|
|
17
|
+
*
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
legacyRootApi?: boolean;
|
|
21
|
+
};
|
|
22
|
+
type StorybookConfigFramework = {
|
|
23
|
+
framework: FrameworkName | {
|
|
24
|
+
name: FrameworkName;
|
|
25
|
+
options: FrameworkOptions;
|
|
26
|
+
};
|
|
27
|
+
core?: StorybookConfig['core'] & {
|
|
28
|
+
builder?: BuilderName | {
|
|
29
|
+
name: BuilderName;
|
|
30
|
+
options: BuilderOptions;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
features?: StorybookConfig['features'] & {
|
|
34
|
+
/**
|
|
35
|
+
* Enable the experimental `.test` function in CSF Next
|
|
36
|
+
*
|
|
37
|
+
* @see https://storybook.js.org/docs/api/main-config/main-config-features#experimentaltestsyntax
|
|
38
|
+
*/
|
|
39
|
+
experimentalTestSyntax?: boolean;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
type TypescriptOptions$1 = TypescriptOptions & {
|
|
43
|
+
/**
|
|
44
|
+
* Sets the type of Docgen when working with React and TypeScript
|
|
45
|
+
*
|
|
46
|
+
* @default `'react-docgen'`
|
|
47
|
+
*/
|
|
48
|
+
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false; /** Configures `@joshwooding/vite-plugin-react-docgen-typescript` */
|
|
49
|
+
reactDocgenTypescriptOptions: Parameters<typeof docgenTypescript>[0];
|
|
50
|
+
};
|
|
51
|
+
/** The interface for Storybook configuration in `main.ts` files. */
|
|
52
|
+
type StorybookConfig$1 = Omit<StorybookConfig, keyof StorybookConfigVite | keyof StorybookConfigFramework | 'typescript'> & StorybookConfigVite & StorybookConfigFramework & {
|
|
53
|
+
typescript?: Partial<TypescriptOptions$1>;
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { StorybookConfig$1 as n, FrameworkOptions as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,58 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import docgenTypescript from '@joshwooding/vite-plugin-react-docgen-typescript';
|
|
6
|
-
|
|
7
|
-
type FrameworkName = CompatibleString<'@storybook/react-vite'>;
|
|
8
|
-
type BuilderName = CompatibleString<'@storybook/builder-vite'>;
|
|
9
|
-
type FrameworkOptions = {
|
|
10
|
-
builder?: BuilderOptions;
|
|
11
|
-
strictMode?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Use React's legacy root API to mount components
|
|
14
|
-
*
|
|
15
|
-
* React has introduced a new root API with React 18.x to enable a whole set of new features (e.g.
|
|
16
|
-
* concurrent features) If this flag is true, the legacy Root API is used to mount components to
|
|
17
|
-
* make it easier to migrate step by step to React 18.
|
|
18
|
-
*
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
legacyRootApi?: boolean;
|
|
22
|
-
};
|
|
23
|
-
type StorybookConfigFramework = {
|
|
24
|
-
framework: FrameworkName | {
|
|
25
|
-
name: FrameworkName;
|
|
26
|
-
options: FrameworkOptions;
|
|
27
|
-
};
|
|
28
|
-
core?: StorybookConfig$1['core'] & {
|
|
29
|
-
builder?: BuilderName | {
|
|
30
|
-
name: BuilderName;
|
|
31
|
-
options: BuilderOptions;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
features?: StorybookConfig$1['features'] & {
|
|
35
|
-
/**
|
|
36
|
-
* Enable the experimental `.test` function in CSF Next
|
|
37
|
-
*
|
|
38
|
-
* @see https://storybook.js.org/docs/api/main-config/main-config-features#experimentaltestsyntax
|
|
39
|
-
*/
|
|
40
|
-
experimentalTestSyntax?: boolean;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
type TypescriptOptions = TypescriptOptions$1 & {
|
|
44
|
-
/**
|
|
45
|
-
* Sets the type of Docgen when working with React and TypeScript
|
|
46
|
-
*
|
|
47
|
-
* @default `'react-docgen'`
|
|
48
|
-
*/
|
|
49
|
-
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
|
|
50
|
-
/** Configures `@joshwooding/vite-plugin-react-docgen-typescript` */
|
|
51
|
-
reactDocgenTypescriptOptions: Parameters<typeof docgenTypescript>[0];
|
|
52
|
-
};
|
|
53
|
-
/** The interface for Storybook configuration in `main.ts` files. */
|
|
54
|
-
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework | 'typescript'> & StorybookConfigVite & StorybookConfigFramework & {
|
|
55
|
-
typescript?: Partial<TypescriptOptions>;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export type { FrameworkOptions, StorybookConfig };
|
|
1
|
+
import { n as StorybookConfig, t as FrameworkOptions } from "./chunk-CJ1Nc_eA.js";
|
|
2
|
+
import { __definePreview as definePreview } from "@storybook/react";
|
|
3
|
+
export * from "@storybook/react";
|
|
4
|
+
export { FrameworkOptions, StorybookConfig, definePreview };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,58 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite';
|
|
3
|
-
import docgenTypescript from '@joshwooding/vite-plugin-react-docgen-typescript';
|
|
4
|
-
|
|
5
|
-
type FrameworkName = CompatibleString<'@storybook/react-vite'>;
|
|
6
|
-
type BuilderName = CompatibleString<'@storybook/builder-vite'>;
|
|
7
|
-
type FrameworkOptions = {
|
|
8
|
-
builder?: BuilderOptions;
|
|
9
|
-
strictMode?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Use React's legacy root API to mount components
|
|
12
|
-
*
|
|
13
|
-
* React has introduced a new root API with React 18.x to enable a whole set of new features (e.g.
|
|
14
|
-
* concurrent features) If this flag is true, the legacy Root API is used to mount components to
|
|
15
|
-
* make it easier to migrate step by step to React 18.
|
|
16
|
-
*
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
legacyRootApi?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type StorybookConfigFramework = {
|
|
22
|
-
framework: FrameworkName | {
|
|
23
|
-
name: FrameworkName;
|
|
24
|
-
options: FrameworkOptions;
|
|
25
|
-
};
|
|
26
|
-
core?: StorybookConfig$1['core'] & {
|
|
27
|
-
builder?: BuilderName | {
|
|
28
|
-
name: BuilderName;
|
|
29
|
-
options: BuilderOptions;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
features?: StorybookConfig$1['features'] & {
|
|
33
|
-
/**
|
|
34
|
-
* Enable the experimental `.test` function in CSF Next
|
|
35
|
-
*
|
|
36
|
-
* @see https://storybook.js.org/docs/api/main-config/main-config-features#experimentaltestsyntax
|
|
37
|
-
*/
|
|
38
|
-
experimentalTestSyntax?: boolean;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
type TypescriptOptions = TypescriptOptions$1 & {
|
|
42
|
-
/**
|
|
43
|
-
* Sets the type of Docgen when working with React and TypeScript
|
|
44
|
-
*
|
|
45
|
-
* @default `'react-docgen'`
|
|
46
|
-
*/
|
|
47
|
-
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
|
|
48
|
-
/** Configures `@joshwooding/vite-plugin-react-docgen-typescript` */
|
|
49
|
-
reactDocgenTypescriptOptions: Parameters<typeof docgenTypescript>[0];
|
|
50
|
-
};
|
|
51
|
-
/** The interface for Storybook configuration in `main.ts` files. */
|
|
52
|
-
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework | 'typescript'> & StorybookConfigVite & StorybookConfigFramework & {
|
|
53
|
-
typescript?: Partial<TypescriptOptions>;
|
|
54
|
-
};
|
|
1
|
+
import { n as StorybookConfig } from "../chunk-CJ1Nc_eA.js";
|
|
55
2
|
|
|
3
|
+
//#region code/frameworks/react-vite/.dts-emit/code/frameworks/react-vite/src/node/index.d.ts
|
|
56
4
|
declare function defineMain(config: StorybookConfig): StorybookConfig;
|
|
57
|
-
|
|
58
|
-
export { type StorybookConfig, defineMain };
|
|
5
|
+
//#endregion
|
|
6
|
+
export { type StorybookConfig, defineMain };
|
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_21q9ylf2hkj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_21q9ylf2hkj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_21q9ylf2hkj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_21q9ylf2hkj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_21q9ylf2hkj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_21q9ylf2hkj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preset.d.ts
CHANGED
|
@@ -1,59 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import docgenTypescript from '@joshwooding/vite-plugin-react-docgen-typescript';
|
|
4
|
-
|
|
5
|
-
type FrameworkName = CompatibleString<'@storybook/react-vite'>;
|
|
6
|
-
type BuilderName = CompatibleString<'@storybook/builder-vite'>;
|
|
7
|
-
type FrameworkOptions = {
|
|
8
|
-
builder?: BuilderOptions;
|
|
9
|
-
strictMode?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Use React's legacy root API to mount components
|
|
12
|
-
*
|
|
13
|
-
* React has introduced a new root API with React 18.x to enable a whole set of new features (e.g.
|
|
14
|
-
* concurrent features) If this flag is true, the legacy Root API is used to mount components to
|
|
15
|
-
* make it easier to migrate step by step to React 18.
|
|
16
|
-
*
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
legacyRootApi?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type StorybookConfigFramework = {
|
|
22
|
-
framework: FrameworkName | {
|
|
23
|
-
name: FrameworkName;
|
|
24
|
-
options: FrameworkOptions;
|
|
25
|
-
};
|
|
26
|
-
core?: StorybookConfig$1['core'] & {
|
|
27
|
-
builder?: BuilderName | {
|
|
28
|
-
name: BuilderName;
|
|
29
|
-
options: BuilderOptions;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
features?: StorybookConfig$1['features'] & {
|
|
33
|
-
/**
|
|
34
|
-
* Enable the experimental `.test` function in CSF Next
|
|
35
|
-
*
|
|
36
|
-
* @see https://storybook.js.org/docs/api/main-config/main-config-features#experimentaltestsyntax
|
|
37
|
-
*/
|
|
38
|
-
experimentalTestSyntax?: boolean;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
type TypescriptOptions = TypescriptOptions$1 & {
|
|
42
|
-
/**
|
|
43
|
-
* Sets the type of Docgen when working with React and TypeScript
|
|
44
|
-
*
|
|
45
|
-
* @default `'react-docgen'`
|
|
46
|
-
*/
|
|
47
|
-
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
|
|
48
|
-
/** Configures `@joshwooding/vite-plugin-react-docgen-typescript` */
|
|
49
|
-
reactDocgenTypescriptOptions: Parameters<typeof docgenTypescript>[0];
|
|
50
|
-
};
|
|
51
|
-
/** The interface for Storybook configuration in `main.ts` files. */
|
|
52
|
-
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigVite | keyof StorybookConfigFramework | 'typescript'> & StorybookConfigVite & StorybookConfigFramework & {
|
|
53
|
-
typescript?: Partial<TypescriptOptions>;
|
|
54
|
-
};
|
|
1
|
+
import { n as StorybookConfig$1 } from "./chunk-CJ1Nc_eA.js";
|
|
2
|
+
import { PresetProperty } from "storybook/internal/types";
|
|
55
3
|
|
|
4
|
+
//#region code/frameworks/react-vite/.dts-emit/code/frameworks/react-vite/src/preset.d.ts
|
|
56
5
|
declare const core: PresetProperty<'core'>;
|
|
57
|
-
declare const viteFinal: NonNullable<StorybookConfig['viteFinal']>;
|
|
58
|
-
|
|
59
|
-
export { core, viteFinal };
|
|
6
|
+
declare const viteFinal: NonNullable<StorybookConfig$1['viteFinal']>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { core, viteFinal };
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_21q9ylf2hkj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_21q9ylf2hkj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_21q9ylf2hkj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_21q9ylf2hkj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_21q9ylf2hkj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_21q9ylf2hkj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -33,7 +33,7 @@ var core = {
|
|
|
33
33
|
savePropValueAsString: !0
|
|
34
34
|
})
|
|
35
35
|
), typeof reactDocgenOption == "string") {
|
|
36
|
-
let { reactDocgen } = await import("./_node-chunks/react-docgen-
|
|
36
|
+
let { reactDocgen } = await import("./_node-chunks/react-docgen-5L5UV7F2.js");
|
|
37
37
|
plugins.unshift(
|
|
38
38
|
// If react-docgen is specified, use it for everything, otherwise only use it for non-typescript files
|
|
39
39
|
await reactDocgen({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-vite",
|
|
3
|
-
"version": "10.6.0-alpha.
|
|
3
|
+
"version": "10.6.0-alpha.2",
|
|
4
4
|
"description": "Storybook for React and Vite: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@joshwooding/vite-plugin-react-docgen-typescript": "^0.7.0",
|
|
56
56
|
"@rollup/pluginutils": "^5.0.2",
|
|
57
|
-
"@storybook/builder-vite": "10.6.0-alpha.
|
|
58
|
-
"@storybook/react": "10.6.0-alpha.
|
|
57
|
+
"@storybook/builder-vite": "10.6.0-alpha.2",
|
|
58
|
+
"@storybook/react": "10.6.0-alpha.2",
|
|
59
59
|
"empathic": "^2.0.0",
|
|
60
60
|
"magic-string": "^0.30.0",
|
|
61
61
|
"react-docgen": "^8.0.2",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@types/node": "^22.19.1",
|
|
67
|
-
"typescript": "^
|
|
67
|
+
"typescript": "^6.0.3",
|
|
68
68
|
"vite": "^7.0.4"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
72
72
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
73
|
-
"storybook": "^10.6.0-alpha.
|
|
73
|
+
"storybook": "^10.6.0-alpha.2",
|
|
74
74
|
"typescript": ">= 4.9.x",
|
|
75
75
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
76
76
|
},
|