@storybook/react-vite 10.0.0-beta.1 → 10.0.0-beta.11
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/{chunk-5SAYGJWO.js → chunk-DOP2HBXL.js} +6 -6
- package/dist/_node-chunks/{react-docgen-3XDJ5F7O.js → react-docgen-LOZ5OB76.js} +9 -9
- package/dist/index.d.ts +8 -0
- package/dist/node/index.d.ts +8 -0
- package/dist/node/index.js +7 -7
- package/dist/preset.d.ts +8 -0
- package/dist/preset.js +8 -8
- package/package.json +5 -5
- package/template/cli/js/Button.stories.js +1 -1
- package/template/cli/ts/Button.stories.ts +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vk8p6xowyfh from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vk8p6xowyfh from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vk8p6xowyfh from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vk8p6xowyfh.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vk8p6xowyfh.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vk8p6xowyfh.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vk8p6xowyfh from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vk8p6xowyfh from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vk8p6xowyfh from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vk8p6xowyfh.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vk8p6xowyfh.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vk8p6xowyfh.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
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DOP2HBXL.js";
|
|
15
15
|
|
|
16
16
|
// src/plugins/react-docgen.ts
|
|
17
17
|
import { existsSync } from "node:fs";
|
|
@@ -19,7 +19,7 @@ import { relative, sep } from "node:path";
|
|
|
19
19
|
import { getProjectRoot } from "storybook/internal/common";
|
|
20
20
|
import { logger } from "storybook/internal/node-logger";
|
|
21
21
|
import { createFilter } from "@rollup/pluginutils";
|
|
22
|
-
import
|
|
22
|
+
import * as find from "empathic/find";
|
|
23
23
|
import MagicString from "magic-string";
|
|
24
24
|
import {
|
|
25
25
|
ERROR_CODES,
|
|
@@ -135,7 +135,7 @@ async function reactDocgen({
|
|
|
135
135
|
} = {}) {
|
|
136
136
|
const cwd = process.cwd();
|
|
137
137
|
const filter = createFilter(include, exclude);
|
|
138
|
-
const tsconfigPath =
|
|
138
|
+
const tsconfigPath = find.up("tsconfig.json", { cwd, last: getProjectRoot() });
|
|
139
139
|
const tsconfig = TsconfigPaths.loadConfig(tsconfigPath);
|
|
140
140
|
let matchPath;
|
|
141
141
|
if (tsconfig.resultType === "success") {
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,14 @@ type StorybookConfigFramework = {
|
|
|
31
31
|
options: BuilderOptions;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
features?: StorybookConfig$1['features'] & {
|
|
35
|
+
/**
|
|
36
|
+
* Enable the experimental `.test` function in CSF Next
|
|
37
|
+
*
|
|
38
|
+
* @see https://storybook.js.org/docs/10/api/main-config/main-config-features#experimentalTestSyntax
|
|
39
|
+
*/
|
|
40
|
+
experimentalTestSyntax?: boolean;
|
|
41
|
+
};
|
|
34
42
|
};
|
|
35
43
|
type TypescriptOptions = TypescriptOptions$1 & {
|
|
36
44
|
/**
|
package/dist/node/index.d.ts
CHANGED
|
@@ -29,6 +29,14 @@ type StorybookConfigFramework = {
|
|
|
29
29
|
options: BuilderOptions;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
features?: StorybookConfig$1['features'] & {
|
|
33
|
+
/**
|
|
34
|
+
* Enable the experimental `.test` function in CSF Next
|
|
35
|
+
*
|
|
36
|
+
* @see https://storybook.js.org/docs/10/api/main-config/main-config-features#experimentalTestSyntax
|
|
37
|
+
*/
|
|
38
|
+
experimentalTestSyntax?: boolean;
|
|
39
|
+
};
|
|
32
40
|
};
|
|
33
41
|
type TypescriptOptions = TypescriptOptions$1 & {
|
|
34
42
|
/**
|
package/dist/node/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vk8p6xowyfh from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vk8p6xowyfh from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vk8p6xowyfh from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vk8p6xowyfh.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vk8p6xowyfh.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vk8p6xowyfh.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
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-DOP2HBXL.js";
|
|
15
15
|
|
|
16
16
|
// src/node/index.ts
|
|
17
17
|
function defineMain(config) {
|
package/dist/preset.d.ts
CHANGED
|
@@ -29,6 +29,14 @@ type StorybookConfigFramework = {
|
|
|
29
29
|
options: BuilderOptions;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
features?: StorybookConfig$1['features'] & {
|
|
33
|
+
/**
|
|
34
|
+
* Enable the experimental `.test` function in CSF Next
|
|
35
|
+
*
|
|
36
|
+
* @see https://storybook.js.org/docs/10/api/main-config/main-config-features#experimentalTestSyntax
|
|
37
|
+
*/
|
|
38
|
+
experimentalTestSyntax?: boolean;
|
|
39
|
+
};
|
|
32
40
|
};
|
|
33
41
|
type TypescriptOptions = TypescriptOptions$1 & {
|
|
34
42
|
/**
|
package/dist/preset.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_vk8p6xowyfh from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_vk8p6xowyfh from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_vk8p6xowyfh from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_vk8p6xowyfh.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_vk8p6xowyfh.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_vk8p6xowyfh.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
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-DOP2HBXL.js";
|
|
15
15
|
|
|
16
16
|
// src/preset.ts
|
|
17
17
|
var core = {
|
|
@@ -41,7 +41,7 @@ var viteFinal = /* @__PURE__ */ __name(async (config, { presets }) => {
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
if (typeof reactDocgenOption === "string") {
|
|
44
|
-
const { reactDocgen } = await import("./_node-chunks/react-docgen-
|
|
44
|
+
const { reactDocgen } = await import("./_node-chunks/react-docgen-LOZ5OB76.js");
|
|
45
45
|
plugins.unshift(
|
|
46
46
|
// If react-docgen is specified, use it for everything, otherwise only use it for non-typescript files
|
|
47
47
|
await reactDocgen({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-vite",
|
|
3
|
-
"version": "10.0.0-beta.
|
|
3
|
+
"version": "10.0.0-beta.11",
|
|
4
4
|
"description": "Storybook for React and Vite: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@joshwooding/vite-plugin-react-docgen-typescript": "0.6.1",
|
|
57
57
|
"@rollup/pluginutils": "^5.0.2",
|
|
58
|
-
"@storybook/builder-vite": "10.0.0-beta.
|
|
59
|
-
"@storybook/react": "10.0.0-beta.
|
|
60
|
-
"
|
|
58
|
+
"@storybook/builder-vite": "10.0.0-beta.11",
|
|
59
|
+
"@storybook/react": "10.0.0-beta.11",
|
|
60
|
+
"empathic": "^2.0.0",
|
|
61
61
|
"magic-string": "^0.30.0",
|
|
62
62
|
"react-docgen": "^8.0.0",
|
|
63
63
|
"resolve": "^1.22.8",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
73
73
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
74
|
-
"storybook": "^10.0.0-beta.
|
|
74
|
+
"storybook": "^10.0.0-beta.11",
|
|
75
75
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
76
76
|
},
|
|
77
77
|
"publishConfig": {
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
argTypes: {
|
|
17
17
|
backgroundColor: { control: 'color' },
|
|
18
18
|
},
|
|
19
|
-
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#
|
|
19
|
+
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
|
|
20
20
|
args: { onClick: fn() },
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -18,7 +18,7 @@ const meta = {
|
|
|
18
18
|
argTypes: {
|
|
19
19
|
backgroundColor: { control: 'color' },
|
|
20
20
|
},
|
|
21
|
-
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#
|
|
21
|
+
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
|
|
22
22
|
args: { onClick: fn() },
|
|
23
23
|
} satisfies Meta<typeof Button>;
|
|
24
24
|
|