@storybook/react-vite 10.0.0-beta.0 → 10.0.0-beta.10

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,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_sxlqeh4uf3f from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sxlqeh4uf3f from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sxlqeh4uf3f from "node:module";
1
+ import CJS_COMPAT_NODE_URL_pfw2n24pnna from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_pfw2n24pnna from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_pfw2n24pnna from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sxlqeh4uf3f.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sxlqeh4uf3f.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sxlqeh4uf3f.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_pfw2n24pnna.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_pfw2n24pnna.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_pfw2n24pnna.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 CJS_COMPAT_NODE_URL_sxlqeh4uf3f from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sxlqeh4uf3f from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sxlqeh4uf3f from "node:module";
1
+ import CJS_COMPAT_NODE_URL_pfw2n24pnna from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_pfw2n24pnna from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_pfw2n24pnna from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sxlqeh4uf3f.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sxlqeh4uf3f.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sxlqeh4uf3f.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_pfw2n24pnna.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_pfw2n24pnna.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_pfw2n24pnna.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-S3I4ISWP.js";
14
+ } from "./chunk-EXXEMQEJ.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 { findUp } from "find-up";
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 = await findUp("tsconfig.json", { cwd, stopAt: getProjectRoot() });
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
  /**
@@ -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
  /**
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_sxlqeh4uf3f from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sxlqeh4uf3f from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sxlqeh4uf3f from "node:module";
1
+ import CJS_COMPAT_NODE_URL_pfw2n24pnna from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_pfw2n24pnna from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_pfw2n24pnna from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sxlqeh4uf3f.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sxlqeh4uf3f.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sxlqeh4uf3f.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_pfw2n24pnna.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_pfw2n24pnna.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_pfw2n24pnna.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-S3I4ISWP.js";
14
+ } from "../_node-chunks/chunk-EXXEMQEJ.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 CJS_COMPAT_NODE_URL_sxlqeh4uf3f from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sxlqeh4uf3f from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sxlqeh4uf3f from "node:module";
1
+ import CJS_COMPAT_NODE_URL_pfw2n24pnna from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_pfw2n24pnna from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_pfw2n24pnna from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sxlqeh4uf3f.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sxlqeh4uf3f.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sxlqeh4uf3f.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_pfw2n24pnna.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_pfw2n24pnna.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_pfw2n24pnna.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-S3I4ISWP.js";
14
+ } from "./_node-chunks/chunk-EXXEMQEJ.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-MISGQNYC.js");
44
+ const { reactDocgen } = await import("./_node-chunks/react-docgen-FRP75NXU.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.0",
3
+ "version": "10.0.0-beta.10",
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.0",
59
- "@storybook/react": "10.0.0-beta.0",
60
- "find-up": "^7.0.0",
58
+ "@storybook/builder-vite": "10.0.0-beta.10",
59
+ "@storybook/react": "10.0.0-beta.10",
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.0",
74
+ "storybook": "^10.0.0-beta.10",
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#action-args
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#action-args
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