@storybook/nextjs-vite 10.1.0-alpha.8 → 10.1.0-beta.0

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/preview.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  decorators,
3
3
  loaders,
4
4
  parameters
5
- } from "./_browser-chunks/chunk-I34DATQB.js";
6
- import "./_browser-chunks/chunk-L5NVL7MD.js";
5
+ } from "./_browser-chunks/chunk-37RBXWOJ.js";
6
+ import "./_browser-chunks/chunk-SL3VIQZ3.js";
7
7
  export {
8
8
  decorators,
9
9
  loaders,
@@ -1,21 +1,19 @@
1
- import CJS_COMPAT_NODE_URL_19c6wpd8y6z from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_19c6wpd8y6z from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_19c6wpd8y6z from "node:module";
1
+ import CJS_COMPAT_NODE_URL_7fnhscgp4ca from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_7fnhscgp4ca from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_7fnhscgp4ca from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_19c6wpd8y6z.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_19c6wpd8y6z.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_19c6wpd8y6z.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_7fnhscgp4ca.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_7fnhscgp4ca.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_7fnhscgp4ca.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import "../_node-chunks/chunk-NAXW245X.js";
12
+ import "../_node-chunks/chunk-UXKTRIHR.js";
13
13
 
14
14
  // src/vite-plugin/index.ts
15
15
  import { createRequire } from "node:module";
16
- var require2 = createRequire(import.meta.url);
17
- var vitePluginStorybookNextjs = require2("vite-plugin-storybook-nextjs");
18
- var storybookNextJsPlugin = vitePluginStorybookNextjs;
16
+ var require2 = createRequire(import.meta.url), vitePluginStorybookNextjs = require2("vite-plugin-storybook-nextjs"), storybookNextJsPlugin = vitePluginStorybookNextjs;
19
17
  export {
20
18
  storybookNextJsPlugin
21
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/nextjs-vite",
3
- "version": "10.1.0-alpha.8",
3
+ "version": "10.1.0-beta.0",
4
4
  "description": "Storybook for Next.js and Vite: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -79,9 +79,9 @@
79
79
  "prep": "jiti ../../../scripts/build/build-package.ts"
80
80
  },
81
81
  "dependencies": {
82
- "@storybook/builder-vite": "10.1.0-alpha.8",
83
- "@storybook/react": "10.1.0-alpha.8",
84
- "@storybook/react-vite": "10.1.0-alpha.8",
82
+ "@storybook/builder-vite": "10.1.0-beta.0",
83
+ "@storybook/react": "10.1.0-beta.0",
84
+ "@storybook/react-vite": "10.1.0-beta.0",
85
85
  "styled-jsx": "5.1.6",
86
86
  "vite-plugin-storybook-nextjs": "^3.1.0"
87
87
  },
@@ -97,7 +97,7 @@
97
97
  "next": "^14.1.0 || ^15.0.0 || ^16.0.0",
98
98
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
99
99
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
100
- "storybook": "^10.1.0-alpha.8",
100
+ "storybook": "^10.1.0-beta.0",
101
101
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
102
102
  },
103
103
  "peerDependenciesMeta": {
@@ -108,5 +108,5 @@
108
108
  "publishConfig": {
109
109
  "access": "public"
110
110
  },
111
- "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae16"
111
+ "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l"
112
112
  }
@@ -1,71 +0,0 @@
1
- import {
2
- __name
3
- } from "./chunk-L5NVL7MD.js";
4
-
5
- // ../../lib/react-dom-shim/dist/_browser-chunks/chunk-JK72E6FR.js
6
- var __defProp = Object.defineProperty;
7
- var __name2 = /* @__PURE__ */ __name((target, value) => __defProp(target, "name", { value, configurable: true }), "__name");
8
-
9
- // ../../lib/react-dom-shim/dist/react-18.js
10
- import * as React from "react";
11
- import * as ReactDOM from "react-dom/client";
12
- var nodes = /* @__PURE__ */ new Map();
13
- function getIsReactActEnvironment() {
14
- return globalThis.IS_REACT_ACT_ENVIRONMENT;
15
- }
16
- __name(getIsReactActEnvironment, "getIsReactActEnvironment");
17
- __name2(getIsReactActEnvironment, "getIsReactActEnvironment");
18
- var WithCallback = __name2(({
19
- callback,
20
- children
21
- }) => {
22
- const once = React.useRef();
23
- React.useLayoutEffect(() => {
24
- if (once.current === callback) {
25
- return;
26
- }
27
- once.current = callback;
28
- callback();
29
- }, [callback]);
30
- return children;
31
- }, "WithCallback");
32
- if (typeof Promise.withResolvers === "undefined") {
33
- Promise.withResolvers = () => {
34
- let resolve = null;
35
- let reject = null;
36
- const promise = new Promise((res, rej) => {
37
- resolve = res;
38
- reject = rej;
39
- });
40
- return { promise, resolve, reject };
41
- };
42
- }
43
- var renderElement = __name2(async (node, el, rootOptions) => {
44
- const root = await getReactRoot(el, rootOptions);
45
- if (getIsReactActEnvironment()) {
46
- root.render(node);
47
- return;
48
- }
49
- const { promise, resolve } = Promise.withResolvers();
50
- root.render(React.createElement(WithCallback, { callback: resolve }, node));
51
- return promise;
52
- }, "renderElement");
53
- var unmountElement = __name2((el, shouldUseNewRootApi) => {
54
- const root = nodes.get(el);
55
- if (root) {
56
- root.unmount();
57
- nodes.delete(el);
58
- }
59
- }, "unmountElement");
60
- var getReactRoot = __name2(async (el, rootOptions) => {
61
- let root = nodes.get(el);
62
- if (!root) {
63
- root = ReactDOM.createRoot(el, rootOptions);
64
- nodes.set(el, root);
65
- }
66
- return root;
67
- }, "getReactRoot");
68
- export {
69
- renderElement,
70
- unmountElement
71
- };