@storybook/nextjs 10.0.0-beta.7 → 10.0.0-beta.9
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/_browser-chunks/{chunk-JOMP7DUK.js → chunk-KX5HHFXV.js} +0 -4
- package/dist/_node-chunks/chunk-2AIU567S.js +475 -0
- package/dist/_node-chunks/{chunk-R5YVZ544.js → chunk-C2JBPJNF.js} +8 -8
- package/dist/_node-chunks/{chunk-P5ANMHV5.js → chunk-LOXZKSL5.js} +8 -8
- package/dist/_node-chunks/{chunk-TOC5P2JS.js → chunk-QT76SDL6.js} +6 -6
- package/dist/_node-chunks/{configureNextFont-5A5MQY5F.js → configureNextFont-75U4EED2.js} +7 -7
- package/dist/_node-chunks/{loader-55SG2SCO.js → loader-6TU7D2X3.js} +9 -9
- package/dist/_node-chunks/{loader-STRQQK44.js → loader-TZNYRIKN.js} +9 -9
- package/dist/_node-chunks/{utils-QJMJG66O.js → utils-53WNHYBB.js} +9 -9
- package/dist/_node-chunks/{webpack-7WEWRSDT.js → webpack-6SBL2B6C.js} +10 -10
- package/dist/_node-chunks/{webpack-KZYCS2TY.js → webpack-7MBP7UUJ.js} +8 -8
- package/dist/_node-chunks/{webpack-J7BYSE2X.js → webpack-A2EJXX3J.js} +9 -9
- package/dist/_node-chunks/{webpack-4OYO4ZCO.js → webpack-BI2FNR2F.js} +7 -7
- package/dist/_node-chunks/{webpack-OZ4TCVTN.js → webpack-JYC4FM4N.js} +9 -9
- package/dist/_node-chunks/{webpack-27TRAWQ5.js → webpack-VXLTOMVP.js} +7 -7
- package/dist/_node-chunks/{webpack-RYEZF6GW.js → webpack-W42T353Z.js} +7 -7
- package/dist/_node-chunks/{webpack-YE7JOPCL.js → webpack-WK5J5HXP.js} +7 -7
- package/dist/config/preview.js +3 -0
- package/dist/export-mocks/index.js +10 -10
- package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +7 -7
- package/dist/index.js +1 -1
- package/dist/node/index.js +7 -7
- package/dist/preset.js +43 -33
- package/dist/preview.js +1 -1
- package/dist/swc/next-swc-loader-patch.js +7 -7
- package/package.json +6 -5
- package/dist/_node-chunks/chunk-UHVMIXLX.js +0 -167
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
resolveNextConfig,
|
|
18
18
|
scopedResolve,
|
|
19
19
|
setAlias
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-C2JBPJNF.js";
|
|
21
|
+
import "./chunk-2AIU567S.js";
|
|
22
|
+
import "./chunk-QT76SDL6.js";
|
|
23
23
|
export {
|
|
24
24
|
addScopedAlias,
|
|
25
25
|
configureRuntimeNextjsVersionResolution,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,14 +12,14 @@ var require = CJS_COMPAT_NODE_MODULE_1q1d17aubaz.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
configureCompatibilityAliases,
|
|
14
14
|
configureNextExportMocks
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-LOXZKSL5.js";
|
|
16
|
+
import "./chunk-C2JBPJNF.js";
|
|
17
17
|
import {
|
|
18
18
|
resolvePackageDir
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2AIU567S.js";
|
|
20
20
|
import {
|
|
21
21
|
__name
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QT76SDL6.js";
|
|
23
23
|
|
|
24
24
|
// src/aliases/webpack.ts
|
|
25
25
|
var configureAliases = /* @__PURE__ */ __name((baseConfig) => {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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
|
resolvePackageDir
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2AIU567S.js";
|
|
15
15
|
import {
|
|
16
16
|
__name
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QT76SDL6.js";
|
|
18
18
|
|
|
19
19
|
// src/css/webpack.ts
|
|
20
20
|
import { readFileSync } from "node:fs";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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
|
getNextjsVersion
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-C2JBPJNF.js";
|
|
15
|
+
import "./chunk-2AIU567S.js";
|
|
16
16
|
import {
|
|
17
17
|
__name
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QT76SDL6.js";
|
|
19
19
|
|
|
20
20
|
// src/images/webpack.ts
|
|
21
21
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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-QT76SDL6.js";
|
|
15
15
|
|
|
16
16
|
// src/imports/webpack.ts
|
|
17
17
|
import { loadConfig } from "tsconfig-paths";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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
|
addScopedAlias
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-C2JBPJNF.js";
|
|
15
|
+
import "./chunk-2AIU567S.js";
|
|
16
16
|
import {
|
|
17
17
|
__name
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QT76SDL6.js";
|
|
19
19
|
|
|
20
20
|
// src/styledJsx/webpack.ts
|
|
21
21
|
var configureStyledJsx = /* @__PURE__ */ __name((baseConfig) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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-QT76SDL6.js";
|
|
15
15
|
|
|
16
16
|
// src/nodePolyfills/webpack.ts
|
|
17
17
|
import NodePolyfillPlugin from "node-polyfill-webpack-plugin";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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-QT76SDL6.js";
|
|
15
15
|
|
|
16
16
|
// src/fastRefresh/webpack.ts
|
|
17
17
|
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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-QT76SDL6.js";
|
|
15
15
|
|
|
16
16
|
// src/rsc/webpack.ts
|
|
17
17
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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
|
getPackageAliases
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
15
|
-
import "../_node-chunks/chunk-
|
|
16
|
-
import "../_node-chunks/chunk-
|
|
17
|
-
import "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-LOXZKSL5.js";
|
|
15
|
+
import "../_node-chunks/chunk-C2JBPJNF.js";
|
|
16
|
+
import "../_node-chunks/chunk-2AIU567S.js";
|
|
17
|
+
import "../_node-chunks/chunk-QT76SDL6.js";
|
|
18
18
|
export {
|
|
19
19
|
getPackageAliases
|
|
20
20
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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-QT76SDL6.js";
|
|
15
15
|
|
|
16
16
|
// src/font/webpack/loader/storybook-nextjs-font-loader.ts
|
|
17
17
|
import { sep } from "node:path";
|
package/dist/index.js
CHANGED
package/dist/node/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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-QT76SDL6.js";
|
|
15
15
|
|
|
16
16
|
// src/node/index.ts
|
|
17
17
|
function defineMain(config) {
|
package/dist/preset.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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
|
addScopedAlias,
|
|
14
|
+
getNextjsVersion,
|
|
14
15
|
resolveNextConfig
|
|
15
|
-
} from "./_node-chunks/chunk-
|
|
16
|
-
import "./_node-chunks/chunk-
|
|
16
|
+
} from "./_node-chunks/chunk-C2JBPJNF.js";
|
|
17
|
+
import "./_node-chunks/chunk-2AIU567S.js";
|
|
17
18
|
import {
|
|
18
19
|
__name
|
|
19
|
-
} from "./_node-chunks/chunk-
|
|
20
|
+
} from "./_node-chunks/chunk-QT76SDL6.js";
|
|
20
21
|
|
|
21
22
|
// src/preset.ts
|
|
22
23
|
import { existsSync } from "node:fs";
|
|
@@ -25,7 +26,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
25
26
|
import { getProjectRoot } from "storybook/internal/common";
|
|
26
27
|
import { logger } from "storybook/internal/node-logger";
|
|
27
28
|
import { loadPartialConfig } from "@babel/core";
|
|
28
|
-
import
|
|
29
|
+
import semver2 from "semver";
|
|
29
30
|
|
|
30
31
|
// src/babel/preset.ts
|
|
31
32
|
import { createRequire } from "node:module";
|
|
@@ -456,6 +457,9 @@ var preset_default = /* @__PURE__ */ __name((api, options = {}) => {
|
|
|
456
457
|
|
|
457
458
|
// src/config/webpack.ts
|
|
458
459
|
import { fileURLToPath } from "node:url";
|
|
460
|
+
import semver from "semver";
|
|
461
|
+
var nextjsVersion = getNextjsVersion();
|
|
462
|
+
var isNext16orNewer = semver.gte(nextjsVersion, "16.0.0");
|
|
459
463
|
var tryResolve = /* @__PURE__ */ __name((path) => {
|
|
460
464
|
try {
|
|
461
465
|
return fileURLToPath(import.meta.resolve(path)) || false;
|
|
@@ -468,7 +472,9 @@ var configureConfig = /* @__PURE__ */ __name(async ({
|
|
|
468
472
|
nextConfigPath
|
|
469
473
|
}) => {
|
|
470
474
|
const nextConfig = await resolveNextConfig({ nextConfigPath });
|
|
471
|
-
|
|
475
|
+
if (!isNext16orNewer) {
|
|
476
|
+
addScopedAlias(baseConfig, "next/config");
|
|
477
|
+
}
|
|
472
478
|
if (baseConfig.resolve?.alias?.["react-dom"]) {
|
|
473
479
|
delete baseConfig.resolve.alias?.["react-dom"];
|
|
474
480
|
}
|
|
@@ -491,14 +497,13 @@ var configureConfig = /* @__PURE__ */ __name(async ({
|
|
|
491
497
|
return nextConfig;
|
|
492
498
|
}, "configureConfig");
|
|
493
499
|
var setupRuntimeConfig = /* @__PURE__ */ __name(async (baseConfig, nextConfig) => {
|
|
494
|
-
const definePluginConfig = {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
"process.env.__NEXT_RUNTIME_CONFIG": JSON.stringify({
|
|
500
|
+
const definePluginConfig = {};
|
|
501
|
+
if (!isNext16orNewer) {
|
|
502
|
+
definePluginConfig["process.env.__NEXT_RUNTIME_CONFIG"] = JSON.stringify({
|
|
498
503
|
serverRuntimeConfig: {},
|
|
499
504
|
publicRuntimeConfig: nextConfig.publicRuntimeConfig
|
|
500
|
-
})
|
|
501
|
-
}
|
|
505
|
+
});
|
|
506
|
+
}
|
|
502
507
|
const newNextLinkBehavior = nextConfig.experimental?.newNextLinkBehavior;
|
|
503
508
|
definePluginConfig["process.env.__NEXT_NEW_LINK_BEHAVIOR"] = newNextLinkBehavior;
|
|
504
509
|
baseConfig.plugins?.push(new (await import("webpack")).default.DefinePlugin(definePluginConfig));
|
|
@@ -713,8 +718,13 @@ var core = /* @__PURE__ */ __name(async (config, options) => {
|
|
|
713
718
|
};
|
|
714
719
|
}, "core");
|
|
715
720
|
var previewAnnotations = /* @__PURE__ */ __name((entry = []) => {
|
|
716
|
-
const
|
|
717
|
-
|
|
721
|
+
const annotations = [...entry, fileURLToPath2(import.meta.resolve("@storybook/nextjs/preview"))];
|
|
722
|
+
const nextjsVersion2 = getNextjsVersion();
|
|
723
|
+
const isNext16orNewer2 = semver2.gte(nextjsVersion2, "16.0.0");
|
|
724
|
+
if (!isNext16orNewer2) {
|
|
725
|
+
annotations.push(fileURLToPath2(import.meta.resolve("@storybook/nextjs/config/preview")));
|
|
726
|
+
}
|
|
727
|
+
return annotations;
|
|
718
728
|
}, "previewAnnotations");
|
|
719
729
|
var babel = /* @__PURE__ */ __name(async (baseConfig) => {
|
|
720
730
|
const configPartial = loadPartialConfig({
|
|
@@ -779,24 +789,24 @@ var webpackFinal = /* @__PURE__ */ __name(async (baseConfig, options) => {
|
|
|
779
789
|
baseConfig,
|
|
780
790
|
nextConfigPath
|
|
781
791
|
});
|
|
782
|
-
const { configureNextFont } = await import("./_node-chunks/configureNextFont-
|
|
783
|
-
const { configureRuntimeNextjsVersionResolution, getNextjsVersion } = await import("./_node-chunks/utils-
|
|
784
|
-
const { configureImports } = await import("./_node-chunks/webpack-
|
|
785
|
-
const { configureCss } = await import("./_node-chunks/webpack-
|
|
786
|
-
const { configureImages } = await import("./_node-chunks/webpack-
|
|
787
|
-
const { configureStyledJsx } = await import("./_node-chunks/webpack-
|
|
788
|
-
const { configureNodePolyfills } = await import("./_node-chunks/webpack-
|
|
789
|
-
const { configureAliases } = await import("./_node-chunks/webpack-
|
|
790
|
-
const { configureFastRefresh } = await import("./_node-chunks/webpack-
|
|
791
|
-
const { configureRSC } = await import("./_node-chunks/webpack-
|
|
792
|
-
const { configureSWCLoader } = await import("./_node-chunks/loader-
|
|
793
|
-
const { configureBabelLoader } = await import("./_node-chunks/loader-
|
|
792
|
+
const { configureNextFont } = await import("./_node-chunks/configureNextFont-75U4EED2.js");
|
|
793
|
+
const { configureRuntimeNextjsVersionResolution, getNextjsVersion: getNextjsVersion2 } = await import("./_node-chunks/utils-53WNHYBB.js");
|
|
794
|
+
const { configureImports } = await import("./_node-chunks/webpack-BI2FNR2F.js");
|
|
795
|
+
const { configureCss } = await import("./_node-chunks/webpack-7MBP7UUJ.js");
|
|
796
|
+
const { configureImages } = await import("./_node-chunks/webpack-A2EJXX3J.js");
|
|
797
|
+
const { configureStyledJsx } = await import("./_node-chunks/webpack-JYC4FM4N.js");
|
|
798
|
+
const { configureNodePolyfills } = await import("./_node-chunks/webpack-VXLTOMVP.js");
|
|
799
|
+
const { configureAliases } = await import("./_node-chunks/webpack-6SBL2B6C.js");
|
|
800
|
+
const { configureFastRefresh } = await import("./_node-chunks/webpack-W42T353Z.js");
|
|
801
|
+
const { configureRSC } = await import("./_node-chunks/webpack-WK5J5HXP.js");
|
|
802
|
+
const { configureSWCLoader } = await import("./_node-chunks/loader-TZNYRIKN.js");
|
|
803
|
+
const { configureBabelLoader } = await import("./_node-chunks/loader-6TU7D2X3.js");
|
|
794
804
|
const babelRCPath = join(getProjectRoot(), ".babelrc");
|
|
795
805
|
const babelConfigPath = join(getProjectRoot(), "babel.config.js");
|
|
796
806
|
const hasBabelConfig = existsSync(babelRCPath) || existsSync(babelConfigPath);
|
|
797
|
-
const
|
|
807
|
+
const nextjsVersion2 = getNextjsVersion2();
|
|
798
808
|
const isDevelopment = options.configType !== "PRODUCTION";
|
|
799
|
-
const isNext14orNewer =
|
|
809
|
+
const isNext14orNewer = semver2.gte(nextjsVersion2, "14.0.0");
|
|
800
810
|
const useSWC = isNext14orNewer && (nextConfig.experimental?.forceSwcTransforms || !hasBabelConfig);
|
|
801
811
|
configureNextFont(baseConfig, useSWC);
|
|
802
812
|
configureRuntimeNextjsVersionResolution(baseConfig);
|
package/dist/preview.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3u6pwvvvuoc from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3u6pwvvvuoc from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3u6pwvvvuoc.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3u6pwvvvuoc.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3u6pwvvvuoc.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-QT76SDL6.js";
|
|
15
15
|
|
|
16
16
|
// src/swc/next-swc-loader-patch.ts
|
|
17
17
|
import { isAbsolute, relative } from "node:path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/nextjs",
|
|
3
|
-
"version": "10.0.0-beta.
|
|
3
|
+
"version": "10.0.0-beta.9",
|
|
4
4
|
"description": "Storybook for Next.js: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"default": "./dist/export-mocks/cache/index.js"
|
|
36
36
|
},
|
|
37
37
|
"./compatibility/draft-mode.compat": "./dist/compatibility/draft-mode.compat.js",
|
|
38
|
+
"./config/preview": "./dist/config/preview.js",
|
|
38
39
|
"./export-mocks": "./dist/export-mocks/index.js",
|
|
39
40
|
"./headers.mock": {
|
|
40
41
|
"types": "./dist/export-mocks/headers/index.d.ts",
|
|
@@ -93,9 +94,9 @@
|
|
|
93
94
|
"@babel/preset-typescript": "^7.24.1",
|
|
94
95
|
"@babel/runtime": "^7.24.4",
|
|
95
96
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
96
|
-
"@storybook/builder-webpack5": "10.0.0-beta.
|
|
97
|
-
"@storybook/preset-react-webpack": "10.0.0-beta.
|
|
98
|
-
"@storybook/react": "10.0.0-beta.
|
|
97
|
+
"@storybook/builder-webpack5": "10.0.0-beta.9",
|
|
98
|
+
"@storybook/preset-react-webpack": "10.0.0-beta.9",
|
|
99
|
+
"@storybook/react": "10.0.0-beta.9",
|
|
99
100
|
"@types/semver": "^7.3.4",
|
|
100
101
|
"babel-loader": "^9.1.3",
|
|
101
102
|
"css-loader": "^6.7.3",
|
|
@@ -129,7 +130,7 @@
|
|
|
129
130
|
"next": "^14.1.0 || ^15.0.0",
|
|
130
131
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
131
132
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
132
|
-
"storybook": "^10.0.0-beta.
|
|
133
|
+
"storybook": "^10.0.0-beta.9",
|
|
133
134
|
"webpack": "^5.0.0"
|
|
134
135
|
},
|
|
135
136
|
"peerDependenciesMeta": {
|