@storybook/react-vite 11.0.0-alpha.4 → 11.0.0-alpha.6
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-GY4M6NF5.js → react-docgen-OBZ6TIET.js} +6 -6
- package/dist/{chunk-JjNtH-UF.d.ts → chunk--ndSXwBc.d.ts} +7 -1
- package/dist/index.d.ts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js +6 -6
- package/dist/preset.d.ts +1 -1
- package/dist/preset.js +12 -9
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_fnhvdq62cuv from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_fnhvdq62cuv from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_fnhvdq62cuv from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_fnhvdq62cuv.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_fnhvdq62cuv.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_fnhvdq62cuv.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -34,8 +34,14 @@ type TypescriptOptions$1 = TypescriptOptions & {
|
|
|
34
34
|
* Sets the type of Docgen when working with React and TypeScript
|
|
35
35
|
*
|
|
36
36
|
* @default `'react-docgen'`
|
|
37
|
+
* @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
|
|
38
|
+
*/
|
|
39
|
+
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false;
|
|
40
|
+
/**
|
|
41
|
+
* Configures `@joshwooding/vite-plugin-react-docgen-typescript`
|
|
42
|
+
*
|
|
43
|
+
* @deprecated Builder docgen is removed in Storybook 12. Use `features.docgenServer`.
|
|
37
44
|
*/
|
|
38
|
-
reactDocgen: 'react-docgen-typescript' | 'react-docgen' | false; /** Configures `@joshwooding/vite-plugin-react-docgen-typescript` */
|
|
39
45
|
reactDocgenTypescriptOptions: Parameters<typeof docgenTypescript>[0];
|
|
40
46
|
};
|
|
41
47
|
/** The interface for Storybook configuration in `main.ts` files. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as StorybookConfig, t as FrameworkOptions } from "./chunk
|
|
1
|
+
import { n as StorybookConfig, t as FrameworkOptions } from "./chunk--ndSXwBc.js";
|
|
2
2
|
import { __definePreview as definePreview } from "@storybook/react";
|
|
3
3
|
export * from "@storybook/react";
|
|
4
4
|
export { FrameworkOptions, StorybookConfig, definePreview };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as StorybookConfig } from "../chunk
|
|
1
|
+
import { n as StorybookConfig } from "../chunk--ndSXwBc.js";
|
|
2
2
|
|
|
3
3
|
//#region code/frameworks/react-vite/.dts-emit/code/frameworks/react-vite/src/node/index.d.ts
|
|
4
4
|
declare function defineMain(config: StorybookConfig): StorybookConfig;
|
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_fnhvdq62cuv from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_fnhvdq62cuv from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_fnhvdq62cuv from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_fnhvdq62cuv.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_fnhvdq62cuv.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_fnhvdq62cuv.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,4 +1,4 @@
|
|
|
1
|
-
import { n as StorybookConfig$1 } from "./chunk
|
|
1
|
+
import { n as StorybookConfig$1 } from "./chunk--ndSXwBc.js";
|
|
2
2
|
import { PresetProperty } from "storybook/internal/types";
|
|
3
3
|
|
|
4
4
|
//#region code/frameworks/react-vite/.dts-emit/code/frameworks/react-vite/src/preset.d.ts
|
package/dist/preset.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_fnhvdq62cuv from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_fnhvdq62cuv from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_fnhvdq62cuv from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_fnhvdq62cuv.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_fnhvdq62cuv.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_fnhvdq62cuv.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
|
|
13
13
|
// src/preset.ts
|
|
14
|
+
import { deprecate } from "storybook/internal/node-logger";
|
|
14
15
|
var core = {
|
|
15
16
|
builder: import.meta.resolve("@storybook/builder-vite"),
|
|
16
17
|
renderer: import.meta.resolve("@storybook/react/preset")
|
|
17
18
|
}, viteFinal = async (config, { presets }) => {
|
|
18
|
-
if ((await presets.apply("features", {}))?.
|
|
19
|
+
if ((await presets.apply("features", {}))?.docgenServer)
|
|
19
20
|
return config;
|
|
20
21
|
let plugins = [...config?.plugins ?? []], { reactDocgen: reactDocgenOption, reactDocgenTypescriptOptions } = await presets.apply(
|
|
21
22
|
"typescript",
|
|
@@ -26,14 +27,16 @@ var core = {
|
|
|
26
27
|
} catch {
|
|
27
28
|
typescriptPresent = !1;
|
|
28
29
|
}
|
|
29
|
-
if (reactDocgenOption
|
|
30
|
+
if (typeof reactDocgenOption == "string" && deprecate(
|
|
31
|
+
`Builder docgen (\`typescript.reactDocgen: '${reactDocgenOption}'\`) is deprecated and will be removed in Storybook 12. It runs because \`features.docgenServer\` is off. Server-side docgen needs the \`typescript\` package: install it and remove any \`docgenServer: false\` from your \`.storybook/main.ts\`.`
|
|
32
|
+
), reactDocgenOption === "react-docgen-typescript" && typescriptPresent && plugins.push(
|
|
30
33
|
(await import("@joshwooding/vite-plugin-react-docgen-typescript")).default({
|
|
31
34
|
...reactDocgenTypescriptOptions,
|
|
32
35
|
// We *need* this set so that RDT returns default values in the same format as react-docgen
|
|
33
36
|
savePropValueAsString: !0
|
|
34
37
|
})
|
|
35
38
|
), typeof reactDocgenOption == "string") {
|
|
36
|
-
let { reactDocgen } = await import("./_node-chunks/react-docgen-
|
|
39
|
+
let { reactDocgen } = await import("./_node-chunks/react-docgen-OBZ6TIET.js");
|
|
37
40
|
plugins.unshift(
|
|
38
41
|
// If react-docgen is specified, use it for everything, otherwise only use it for non-typescript files
|
|
39
42
|
await reactDocgen({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-vite",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.6",
|
|
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": "11.0.0-alpha.
|
|
58
|
-
"@storybook/react": "11.0.0-alpha.
|
|
57
|
+
"@storybook/builder-vite": "11.0.0-alpha.6",
|
|
58
|
+
"@storybook/react": "11.0.0-alpha.6",
|
|
59
59
|
"empathic": "^2.0.0",
|
|
60
60
|
"magic-string": "^1.1.0",
|
|
61
61
|
"react-docgen": "^8.0.2",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"react": "^18.0.0 || ^19.0.0",
|
|
72
72
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
73
|
-
"storybook": "^11.0.0-alpha.
|
|
73
|
+
"storybook": "^11.0.0-alpha.6",
|
|
74
74
|
"typescript": "^5.9.0 || ^6.0.0",
|
|
75
75
|
"vite": "^6.3.0 || ^7.0.0 || ^8.0.0"
|
|
76
76
|
},
|