@storybook/nextjs-vite 10.6.0 → 11.0.0-alpha.1

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_8sy1434zve from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sy1434zve from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sy1434zve from "node:module";
1
+ import CJS_COMPAT_NODE_URL_uwh2vuez4b from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_uwh2vuez4b from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_uwh2vuez4b from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sy1434zve.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sy1434zve.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sy1434zve.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_uwh2vuez4b.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_uwh2vuez4b.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_uwh2vuez4b.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -14,7 +14,7 @@ import {
14
14
  __esm,
15
15
  __require,
16
16
  __toESM
17
- } from "./chunk-LNCCG7RU.js";
17
+ } from "./chunk-CYVDAILP.js";
18
18
 
19
19
  // ../../../node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs
20
20
  import r from "node:path";
@@ -4796,7 +4796,7 @@ var import_esbuild, Pt, f2, Ne2, Ie2, Yt, Me2, $e2, Ue2, me2, ae2, ee2, nn2, rn,
4796
4796
  f2(Be2, "u");
4797
4797
  f2(D, "o");
4798
4798
  typeof WebAssembly < "u" && (async () => {
4799
- let { parse: s4, init: e5 } = await import("./lexer-DQCqS3nf-LQRREXVI.js");
4799
+ let { parse: s4, init: e5 } = await import("./lexer-DQCqS3nf-KPK5EMJI.js");
4800
4800
  await e5, Se2 = s4;
4801
4801
  })();
4802
4802
  Pe2 = f2((s4, e5) => Se2 ? Se2(s4, e5) : fn(s4, e5), "parseEsm"), gn = f2((s4) => {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_8sy1434zve from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sy1434zve from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sy1434zve from "node:module";
1
+ import CJS_COMPAT_NODE_URL_uwh2vuez4b from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_uwh2vuez4b from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_uwh2vuez4b from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sy1434zve.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sy1434zve.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sy1434zve.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_uwh2vuez4b.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_uwh2vuez4b.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_uwh2vuez4b.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_8sy1434zve from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sy1434zve from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sy1434zve from "node:module";
1
+ import CJS_COMPAT_NODE_URL_uwh2vuez4b from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_uwh2vuez4b from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_uwh2vuez4b from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sy1434zve.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sy1434zve.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sy1434zve.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_uwh2vuez4b.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_uwh2vuez4b.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_uwh2vuez4b.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_8sy1434zve.createRequire(import.meta.url);
12
12
  import {
13
13
  __commonJS,
14
14
  __require
15
- } from "./chunk-LNCCG7RU.js";
15
+ } from "./chunk-CYVDAILP.js";
16
16
 
17
17
  // ../../../node_modules/yaml/dist/nodes/identity.js
18
18
  var require_identity = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_8sy1434zve from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sy1434zve from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sy1434zve from "node:module";
1
+ import CJS_COMPAT_NODE_URL_uwh2vuez4b from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_uwh2vuez4b from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_uwh2vuez4b from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sy1434zve.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sy1434zve.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sy1434zve.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_uwh2vuez4b.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_uwh2vuez4b.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_uwh2vuez4b.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -14,7 +14,7 @@ import {
14
14
  __esm,
15
15
  __require,
16
16
  __toESM
17
- } from "./chunk-LNCCG7RU.js";
17
+ } from "./chunk-CYVDAILP.js";
18
18
 
19
19
  // ../../../node_modules/jiti/dist/jiti.cjs
20
20
  var require_jiti = __commonJS({
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_8sy1434zve from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sy1434zve from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sy1434zve from "node:module";
1
+ import CJS_COMPAT_NODE_URL_uwh2vuez4b from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_uwh2vuez4b from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_uwh2vuez4b from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sy1434zve.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sy1434zve.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sy1434zve.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_uwh2vuez4b.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_uwh2vuez4b.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_uwh2vuez4b.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
  __esm
14
- } from "./chunk-LNCCG7RU.js";
14
+ } from "./chunk-CYVDAILP.js";
15
15
 
16
16
  // ../../../node_modules/tsx/dist/lexer-DQCqS3nf.mjs
17
17
  function F(A, E = "@") {
package/dist/index.js CHANGED
@@ -6295,7 +6295,7 @@ var { FRAMEWORK_OPTIONS } = scope, ErrorBoundary = class extends ReactComponent
6295
6295
  let { hasError } = this.state, { children } = this.props;
6296
6296
  return hasError ? null : children;
6297
6297
  }
6298
- }, Wrapper = FRAMEWORK_OPTIONS?.strictMode ? StrictMode : Fragment, actQueue = [], isActing = !1, processActQueue = async () => {
6298
+ }, Wrapper = FRAMEWORK_OPTIONS?.strictMode ? StrictMode : Fragment, actQueue = [], isActing = !1, remountCounts = /* @__PURE__ */ new WeakMap(), processActQueue = async () => {
6299
6299
  if (isActing || actQueue.length === 0)
6300
6300
  return;
6301
6301
  isActing = !0;
@@ -6309,9 +6309,17 @@ async function renderToCanvas({
6309
6309
  showException,
6310
6310
  forceRemount
6311
6311
  }, canvasElement) {
6312
- let { renderElement, unmountElement } = await import("./_browser-chunks/react-18-ODWMAYZK.js"), Story = unboundStoryFn, content = storyContext.parameters.__isPortableStory ? React3.createElement(Story, { ...storyContext }) : React3.createElement(ErrorBoundary, { key: storyContext.id, showMain, showException }, React3.createElement(Story, { ...storyContext })), element = Wrapper ? React3.createElement(Wrapper, null, content) : content;
6313
- forceRemount && unmountElement(canvasElement);
6314
- let act = await getAct({ disableAct: storyContext.viewMode === "docs" });
6312
+ let { renderElement, unmountElement } = await import("./_browser-chunks/react-18-ODWMAYZK.js"), Story = unboundStoryFn, isPortableStory = storyContext.parameters.__isPortableStory;
6313
+ forceRemount && (isPortableStory ? unmountElement(canvasElement) : remountCounts.set(canvasElement, (remountCounts.get(canvasElement) ?? 0) + 1));
6314
+ let content = isPortableStory ? React3.createElement(Story, { ...storyContext }) : React3.createElement(
6315
+ ErrorBoundary,
6316
+ {
6317
+ key: `${storyContext.id}-${remountCounts.get(canvasElement) ?? 0}`,
6318
+ showMain,
6319
+ showException
6320
+ },
6321
+ React3.createElement(Story, { ...storyContext })
6322
+ ), element = Wrapper ? React3.createElement(Wrapper, null, content) : content, act = await getAct({ disableAct: storyContext.viewMode === "docs" });
6315
6323
  return await new Promise(async (resolve, reject) => {
6316
6324
  actQueue.push(async () => {
6317
6325
  try {
@@ -1,15 +1,15 @@
1
- import CJS_COMPAT_NODE_URL_8sy1434zve from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sy1434zve from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sy1434zve from "node:module";
1
+ import CJS_COMPAT_NODE_URL_uwh2vuez4b from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_uwh2vuez4b from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_uwh2vuez4b from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sy1434zve.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sy1434zve.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sy1434zve.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_uwh2vuez4b.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_uwh2vuez4b.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_uwh2vuez4b.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-LNCCG7RU.js";
12
+ import "../_node-chunks/chunk-CYVDAILP.js";
13
13
 
14
14
  // src/node/index.ts
15
15
  function defineMain(config) {
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_8sy1434zve from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sy1434zve from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sy1434zve from "node:module";
1
+ import CJS_COMPAT_NODE_URL_uwh2vuez4b from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_uwh2vuez4b from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_uwh2vuez4b from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sy1434zve.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sy1434zve.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sy1434zve.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_uwh2vuez4b.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_uwh2vuez4b.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_uwh2vuez4b.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,7 +13,7 @@ import {
13
13
  __commonJS,
14
14
  __require,
15
15
  __toESM
16
- } from "./_node-chunks/chunk-LNCCG7RU.js";
16
+ } from "./_node-chunks/chunk-CYVDAILP.js";
17
17
 
18
18
  // ../../../node_modules/semver/internal/constants.js
19
19
  var require_constants = __commonJS({
@@ -1514,7 +1514,7 @@ var require_req = __commonJS({
1514
1514
  }
1515
1515
  if (tsx === void 0)
1516
1516
  try {
1517
- tsx = await import("./_node-chunks/api-3YYJWEGI.js");
1517
+ tsx = await import("./_node-chunks/api-5G6LCRSQ.js");
1518
1518
  } catch (error) {
1519
1519
  importError.push(error);
1520
1520
  }
@@ -1524,7 +1524,7 @@ var require_req = __commonJS({
1524
1524
  }
1525
1525
  if (jiti === void 0)
1526
1526
  try {
1527
- jiti = (await import("./_node-chunks/jiti-DYDH4NF2.js")).default;
1527
+ jiti = (await import("./_node-chunks/jiti-OSGXUHP7.js")).default;
1528
1528
  } catch (error) {
1529
1529
  importError.push(error);
1530
1530
  }
@@ -1641,7 +1641,7 @@ var require_src2 = __commonJS({
1641
1641
  async function yamlLoader(_, content) {
1642
1642
  if (!yaml)
1643
1643
  try {
1644
- yaml = await import("./_node-chunks/dist-JFYRAZRU.js");
1644
+ yaml = await import("./_node-chunks/dist-IGNISVMX.js");
1645
1645
  } catch (e) {
1646
1646
  throw new Error(
1647
1647
  `'yaml' is required for the YAML configuration files. Make sure it is installed
@@ -1699,7 +1699,7 @@ Error: ${e.message}`
1699
1699
  });
1700
1700
 
1701
1701
  // src/preset.ts
1702
- var import_semver = __toESM(require_semver2(), 1);
1702
+ var import_semver2 = __toESM(require_semver2(), 1);
1703
1703
  import { dirname as dirname2 } from "node:path";
1704
1704
  import { fileURLToPath as fileURLToPath2 } from "node:url";
1705
1705
  import { viteFinal as reactViteFinal } from "@storybook/react-vite/preset";
@@ -1784,7 +1784,7 @@ import { readFileSync } from "node:fs";
1784
1784
  import { join as join2 } from "node:path";
1785
1785
 
1786
1786
  // ../../core/src/shared/utils/module.ts
1787
- import { createRequire as createRequire2, register } from "node:module";
1787
+ import nodeModule, { createRequire as createRequire2 } from "node:module";
1788
1788
  import { fileURLToPath, pathToFileURL } from "node:url";
1789
1789
 
1790
1790
  // ../../../node_modules/exsolve/dist/index.mjs
@@ -1911,6 +1911,9 @@ var hasOwnProperty = {}.hasOwnProperty;
1911
1911
  var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace], own = {}.hasOwnProperty;
1912
1912
  var isWindows = process.platform === "win32", globalCache = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
1913
1913
 
1914
+ // ../../core/src/shared/utils/module.ts
1915
+ var import_semver = __toESM(require_semver2(), 1);
1916
+
1914
1917
  // ../../core/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
1915
1918
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
1916
1919
  function normalizeWindowsPath(input = "") {
@@ -1997,7 +2000,7 @@ var core = {
1997
2000
  ...entry,
1998
2001
  fileURLToPath2(import.meta.resolve("@storybook/nextjs-vite/preview"))
1999
2002
  ], nextjsVersion = getNextjsVersion();
2000
- return import_semver.default.gte(nextjsVersion, "16.0.0") || annotations.push(fileURLToPath2(import.meta.resolve("@storybook/nextjs-vite/config/preview"))), annotations;
2003
+ return import_semver2.default.gte(nextjsVersion, "16.0.0") || annotations.push(fileURLToPath2(import.meta.resolve("@storybook/nextjs-vite/config/preview"))), annotations;
2001
2004
  }, optimizeViteDeps = [
2002
2005
  "@storybook/nextjs-vite/link.mock",
2003
2006
  "@storybook/nextjs-vite/navigation.mock",
@@ -1,15 +1,15 @@
1
- import CJS_COMPAT_NODE_URL_8sy1434zve from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8sy1434zve from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8sy1434zve from "node:module";
1
+ import CJS_COMPAT_NODE_URL_uwh2vuez4b from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_uwh2vuez4b from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_uwh2vuez4b from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_8sy1434zve.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8sy1434zve.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8sy1434zve.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_uwh2vuez4b.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_uwh2vuez4b.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_uwh2vuez4b.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-LNCCG7RU.js";
12
+ import "../_node-chunks/chunk-CYVDAILP.js";
13
13
 
14
14
  // src/vite-plugin/index.ts
15
15
  import vitePluginStorybookNextjs from "vite-plugin-storybook-nextjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/nextjs-vite",
3
- "version": "10.6.0",
3
+ "version": "11.0.0-alpha.1",
4
4
  "description": "Storybook for Next.js and Vite: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -88,11 +88,11 @@
88
88
  "!src/**/*"
89
89
  ],
90
90
  "dependencies": {
91
- "@storybook/builder-vite": "10.6.0",
92
- "@storybook/react": "10.6.0",
93
- "@storybook/react-vite": "10.6.0",
91
+ "@storybook/builder-vite": "11.0.0-alpha.1",
92
+ "@storybook/react": "11.0.0-alpha.1",
93
+ "@storybook/react-vite": "11.0.0-alpha.1",
94
94
  "styled-jsx": "5.1.6",
95
- "vite-plugin-storybook-nextjs": "10.6.0"
95
+ "vite-plugin-storybook-nextjs": "11.0.0-alpha.1"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@types/node": "^22.19.1",
@@ -105,11 +105,11 @@
105
105
  "peerDependencies": {
106
106
  "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
107
107
  "@types/react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
108
- "next": "^14.1.0 || ^15.0.0 || ^16.0.0",
108
+ "next": "^15.0.0 || ^16.0.0",
109
109
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
110
110
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
111
- "storybook": "^10.6.0",
112
- "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
111
+ "storybook": "^11.0.0-alpha.1",
112
+ "vite": "^6.3.0 || ^7.0.0 || ^8.0.0"
113
113
  },
114
114
  "peerDependenciesMeta": {
115
115
  "@types/react": {