@storybook/nextjs 11.0.0-alpha.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.
- package/README.md +5 -0
- package/dist/_node-chunks/{chunk-J6XYSX4C.js → chunk-KG33DJAN.js} +10 -7
- package/dist/_node-chunks/chunk-UMSFQFIM.js +31 -0
- package/dist/_node-chunks/{chunk-HS4NIXO2.js → chunk-YZRBWXNI.js} +7 -7
- package/dist/_node-chunks/{configureNextFont-B4VJ7RHY.js → configureNextFont-MWKZKSTA.js} +6 -6
- package/dist/_node-chunks/{loader-UGEEDXQ4.js → loader-JE7BKQ3L.js} +8 -8
- package/dist/_node-chunks/{loader-IYXKXVFG.js → loader-R4DPBG2Z.js} +8 -8
- package/dist/_node-chunks/{utils-OJCFVKXV.js → utils-MSUY6QKX.js} +8 -8
- package/dist/_node-chunks/{webpack-OOZVQP5K.js → webpack-3Q3QUQ7M.js} +7 -7
- package/dist/_node-chunks/{webpack-7QXPGFMA.js → webpack-5DXDZRZK.js} +6 -6
- package/dist/_node-chunks/{webpack-GTMWRMHR.js → webpack-B2DNG3GL.js} +6 -6
- package/dist/_node-chunks/{webpack-VHEBLWCK.js → webpack-D2Z5RALL.js} +6 -6
- package/dist/_node-chunks/webpack-DYL5CG42.js +42 -0
- package/dist/_node-chunks/{webpack-QUTYPKPT.js → webpack-H5C52AZM.js} +9 -16
- package/dist/_node-chunks/webpack-RDEZORPP.js +23 -0
- package/dist/_node-chunks/webpack-WJYRXTIG.js +34 -0
- package/dist/export-mocks/index.js +7 -9
- package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +6 -6
- package/dist/index.js +12 -4
- package/dist/node/index.js +6 -6
- package/dist/preset.js +13 -11
- package/dist/swc/next-swc-loader-patch.js +7 -9
- package/package.json +13 -9
- package/dist/_node-chunks/chunk-GCMGR3UX.js +0 -58
- package/dist/_node-chunks/webpack-4WOENOEJ.js +0 -39
- package/dist/_node-chunks/webpack-4XK6MERK.js +0 -23
- package/dist/_node-chunks/webpack-VXTKEXGE.js +0 -31
- package/dist/compatibility/draft-mode.compat.js +0 -7
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Storybook for Next.js
|
|
2
2
|
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> **`@storybook/nextjs` is deprecated and will be removed in Storybook 12.**
|
|
5
|
+
>
|
|
6
|
+
> Migrate to [`@storybook/nextjs-vite`](https://www.npmjs.com/package/@storybook/nextjs-vite) — the automigration is available via `storybook upgrade` (accept the fix) or `storybook migrate nextjs-to-nextjs-vite`. See the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#nextjs-storybooknextjs-is-deprecated) for details.
|
|
7
|
+
|
|
3
8
|
See [documentation](https://storybook.js.org/docs/get-started/frameworks/nextjs?renderer=react&ref=readme) for installation instructions, usage examples, APIs, and more.
|
|
4
9
|
|
|
5
10
|
## Acknowledgements
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.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
|
|
|
13
13
|
// ../../core/src/shared/utils/module.ts
|
|
14
|
-
import { createRequire
|
|
14
|
+
import nodeModule, { createRequire } from "node:module";
|
|
15
15
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
16
16
|
|
|
17
17
|
// ../../../node_modules/exsolve/dist/index.mjs
|
|
@@ -138,6 +138,9 @@ var hasOwnProperty = {}.hasOwnProperty;
|
|
|
138
138
|
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace], own = {}.hasOwnProperty;
|
|
139
139
|
var isWindows = process.platform === "win32", globalCache = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
|
|
140
140
|
|
|
141
|
+
// ../../core/src/shared/utils/module.ts
|
|
142
|
+
import semver from "semver";
|
|
143
|
+
|
|
141
144
|
// ../../core/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
142
145
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
143
146
|
function normalizeWindowsPath(input = "") {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// src/export-mocks/webpack.ts
|
|
14
|
+
var mapping = {
|
|
15
|
+
"next/headers": "@storybook/nextjs/headers.mock",
|
|
16
|
+
"next/navigation": "@storybook/nextjs/navigation.mock",
|
|
17
|
+
"next/router": "@storybook/nextjs/router.mock",
|
|
18
|
+
"next/cache": "@storybook/nextjs/cache.mock",
|
|
19
|
+
"next/link": "@storybook/nextjs/link.mock"
|
|
20
|
+
}, getPackageAliases = () => mapping, configureNextExportMocks = (baseConfig) => {
|
|
21
|
+
let resolve = baseConfig.resolve ?? {};
|
|
22
|
+
resolve.alias = {
|
|
23
|
+
...resolve.alias,
|
|
24
|
+
...mapping
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
getPackageAliases,
|
|
30
|
+
configureNextExportMocks
|
|
31
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.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-KG33DJAN.js";
|
|
15
15
|
|
|
16
16
|
// src/utils.ts
|
|
17
17
|
import { readFileSync } from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.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
|
getNodeModulesExcludeRegex
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-YZRBWXNI.js";
|
|
15
|
+
import "./chunk-KG33DJAN.js";
|
|
16
16
|
|
|
17
17
|
// src/babel/loader.ts
|
|
18
18
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.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
|
getNodeModulesExcludeRegex
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-YZRBWXNI.js";
|
|
15
|
+
import "./chunk-KG33DJAN.js";
|
|
16
16
|
|
|
17
17
|
// src/swc/loader.ts
|
|
18
18
|
import { join } from "node:path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
resolveNextConfig,
|
|
19
19
|
scopedResolve,
|
|
20
20
|
setAlias
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-YZRBWXNI.js";
|
|
22
|
+
import "./chunk-KG33DJAN.js";
|
|
23
23
|
export {
|
|
24
24
|
addScopedAlias,
|
|
25
25
|
configureRuntimeNextjsVersionResolution,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.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-KG33DJAN.js";
|
|
15
15
|
|
|
16
16
|
// src/css/webpack.ts
|
|
17
17
|
import { readFileSync } from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// src/nodePolyfills/webpack.ts
|
|
14
|
+
import { createRequire } from "node:module";
|
|
15
|
+
import webpack from "webpack";
|
|
16
|
+
var NODE_PROTOCOL_REGEX = /^node:/, require2 = createRequire(import.meta.url), nodePolyfillFallback = {
|
|
17
|
+
buffer: require2.resolve("buffer/"),
|
|
18
|
+
events: require2.resolve("events/"),
|
|
19
|
+
process: require2.resolve("process/browser.js"),
|
|
20
|
+
stream: require2.resolve("stream-browserify"),
|
|
21
|
+
util: require2.resolve("util/"),
|
|
22
|
+
zlib: require2.resolve("browserify-zlib")
|
|
23
|
+
}, configureNodePolyfills = (baseConfig) => (baseConfig.plugins = [
|
|
24
|
+
...baseConfig.plugins || [],
|
|
25
|
+
new webpack.NormalModuleReplacementPlugin(NODE_PROTOCOL_REGEX, (resource) => {
|
|
26
|
+
resource.request = resource.request.replace(NODE_PROTOCOL_REGEX, "");
|
|
27
|
+
}),
|
|
28
|
+
new webpack.ProvidePlugin({
|
|
29
|
+
Buffer: [nodePolyfillFallback.buffer, "Buffer"],
|
|
30
|
+
process: nodePolyfillFallback.process
|
|
31
|
+
})
|
|
32
|
+
], baseConfig.resolve = {
|
|
33
|
+
...baseConfig.resolve,
|
|
34
|
+
fallback: {
|
|
35
|
+
...nodePolyfillFallback,
|
|
36
|
+
fs: !1,
|
|
37
|
+
...baseConfig.resolve?.fallback
|
|
38
|
+
}
|
|
39
|
+
}, baseConfig);
|
|
40
|
+
export {
|
|
41
|
+
configureNodePolyfills
|
|
42
|
+
};
|
|
@@ -1,37 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.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 {
|
|
13
|
-
getNextjsVersion
|
|
14
|
-
} from "./chunk-HS4NIXO2.js";
|
|
15
|
-
import "./chunk-J6XYSX4C.js";
|
|
16
12
|
|
|
17
13
|
// src/images/webpack.ts
|
|
18
14
|
import { fileURLToPath } from "node:url";
|
|
19
|
-
import semver from "semver";
|
|
20
15
|
var configureImages = (baseConfig, nextConfig) => {
|
|
21
16
|
configureStaticImageImport(baseConfig, nextConfig), configureImageDefaults(baseConfig);
|
|
22
17
|
}, fallbackFilename = "static/media/[path][name][ext]", configureImageDefaults = (baseConfig) => {
|
|
23
|
-
let
|
|
18
|
+
let resolve = baseConfig.resolve ?? {};
|
|
24
19
|
resolve.alias = {
|
|
25
20
|
...resolve.alias,
|
|
26
21
|
"sb-original/next/image": fileURLToPath(import.meta.resolve("next/image")),
|
|
27
|
-
"next/image": fileURLToPath(import.meta.resolve("@storybook/nextjs/images/next-image"))
|
|
28
|
-
}, semver.satisfies(version, ">=13.0.0") && (resolve.alias = {
|
|
29
|
-
...resolve.alias,
|
|
22
|
+
"next/image": fileURLToPath(import.meta.resolve("@storybook/nextjs/images/next-image")),
|
|
30
23
|
"sb-original/next/legacy/image": fileURLToPath(import.meta.resolve("next/legacy/image")),
|
|
31
24
|
"next/legacy/image": fileURLToPath(
|
|
32
25
|
import.meta.resolve("@storybook/nextjs/images/next-legacy-image")
|
|
33
26
|
)
|
|
34
|
-
}
|
|
27
|
+
};
|
|
35
28
|
}, configureStaticImageImport = (baseConfig, nextConfig) => {
|
|
36
29
|
let rules = baseConfig.module?.rules, assetRule = rules?.find(
|
|
37
30
|
(rule) => rule && typeof rule != "string" && rule.test instanceof RegExp && rule.test.test("test.jpg")
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
addScopedAlias
|
|
14
|
+
} from "./chunk-YZRBWXNI.js";
|
|
15
|
+
import "./chunk-KG33DJAN.js";
|
|
16
|
+
|
|
17
|
+
// src/styledJsx/webpack.ts
|
|
18
|
+
var configureStyledJsx = (baseConfig) => {
|
|
19
|
+
addScopedAlias(baseConfig, "styled-jsx");
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
configureStyledJsx
|
|
23
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
configureNextExportMocks
|
|
14
|
+
} from "./chunk-UMSFQFIM.js";
|
|
15
|
+
import {
|
|
16
|
+
resolvePackageDir
|
|
17
|
+
} from "./chunk-KG33DJAN.js";
|
|
18
|
+
|
|
19
|
+
// src/aliases/webpack.ts
|
|
20
|
+
var configureAliases = (baseConfig) => {
|
|
21
|
+
configureNextExportMocks(baseConfig), baseConfig.resolve = {
|
|
22
|
+
...baseConfig.resolve ?? {},
|
|
23
|
+
alias: {
|
|
24
|
+
...baseConfig.resolve?.alias ?? {},
|
|
25
|
+
"@opentelemetry/api": "next/dist/compiled/@opentelemetry/api",
|
|
26
|
+
next: resolvePackageDir("next"),
|
|
27
|
+
"next/dist/shared/lib/app-router-context.shared-runtime": "next/dist/shared/lib/app-router-context.shared-runtime",
|
|
28
|
+
"next/dist/shared/lib/app-router-context": "next/dist/shared/lib/app-router-context.shared-runtime"
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
configureAliases
|
|
34
|
+
};
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.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-HS4NIXO2.js";
|
|
16
|
-
import "../_node-chunks/chunk-J6XYSX4C.js";
|
|
14
|
+
} from "../_node-chunks/chunk-UMSFQFIM.js";
|
|
17
15
|
export {
|
|
18
16
|
getPackageAliases
|
|
19
17
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
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-V22CCOOF.js"), Story = unboundStoryFn,
|
|
6313
|
-
forceRemount && unmountElement(canvasElement);
|
|
6314
|
-
let
|
|
6312
|
+
let { renderElement, unmountElement } = await import("./_browser-chunks/react-18-V22CCOOF.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 {
|
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,17 +13,16 @@ import {
|
|
|
13
13
|
addScopedAlias,
|
|
14
14
|
isNextVersionGte,
|
|
15
15
|
resolveNextConfig
|
|
16
|
-
} from "./_node-chunks/chunk-
|
|
17
|
-
import "./_node-chunks/chunk-
|
|
16
|
+
} from "./_node-chunks/chunk-YZRBWXNI.js";
|
|
17
|
+
import "./_node-chunks/chunk-KG33DJAN.js";
|
|
18
18
|
|
|
19
19
|
// src/preset.ts
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import { join } from "node:path";
|
|
22
22
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
23
23
|
import { getProjectRoot } from "storybook/internal/common";
|
|
24
|
-
import { logger } from "storybook/internal/node-logger";
|
|
24
|
+
import { deprecate, logger } from "storybook/internal/node-logger";
|
|
25
25
|
import { loadPartialConfig } from "@babel/core";
|
|
26
|
-
import semver from "semver";
|
|
27
26
|
|
|
28
27
|
// src/babel/preset.ts
|
|
29
28
|
import { createRequire } from "node:module";
|
|
@@ -480,6 +479,9 @@ function TransformFontImports({ types }) {
|
|
|
480
479
|
}
|
|
481
480
|
|
|
482
481
|
// src/preset.ts
|
|
482
|
+
deprecate(
|
|
483
|
+
"@storybook/nextjs is deprecated and will be removed in Storybook 12. Migrate to @storybook/nextjs-vite \u2014 the automigration is available via `storybook upgrade` (accept the fix) or `storybook migrate nextjs-to-nextjs-vite`."
|
|
484
|
+
);
|
|
483
485
|
var addons = [
|
|
484
486
|
fileURLToPath2(import.meta.resolve("@storybook/preset-react-webpack"))
|
|
485
487
|
], core = async (config, options) => {
|
|
@@ -535,7 +537,7 @@ var addons = [
|
|
|
535
537
|
let { nextConfigPath } = await options.presets.apply("frameworkOptions"), nextConfig = await configureConfig({
|
|
536
538
|
baseConfig,
|
|
537
539
|
nextConfigPath
|
|
538
|
-
}), { configureNextFont } = await import("./_node-chunks/configureNextFont-
|
|
540
|
+
}), { configureNextFont } = await import("./_node-chunks/configureNextFont-MWKZKSTA.js"), { configureRuntimeNextjsVersionResolution } = await import("./_node-chunks/utils-MSUY6QKX.js"), { configureImports } = await import("./_node-chunks/webpack-5DXDZRZK.js"), { configureCss } = await import("./_node-chunks/webpack-3Q3QUQ7M.js"), { configureImages } = await import("./_node-chunks/webpack-H5C52AZM.js"), { configureStyledJsx } = await import("./_node-chunks/webpack-RDEZORPP.js"), { configureNodePolyfills } = await import("./_node-chunks/webpack-DYL5CG42.js"), { configureAliases } = await import("./_node-chunks/webpack-WJYRXTIG.js"), { configureFastRefresh } = await import("./_node-chunks/webpack-D2Z5RALL.js"), { configureRSC } = await import("./_node-chunks/webpack-B2DNG3GL.js"), { configureSWCLoader } = await import("./_node-chunks/loader-R4DPBG2Z.js"), { configureBabelLoader } = await import("./_node-chunks/loader-JE7BKQ3L.js"), babelRCPath = join(getProjectRoot(), ".babelrc"), babelConfigPath = join(getProjectRoot(), "babel.config.js"), hasBabelConfig = existsSync(babelRCPath) || existsSync(babelConfigPath), isDevelopment = options.configType !== "PRODUCTION", useSWC = nextConfig.experimental?.forceSwcTransforms || !hasBabelConfig;
|
|
539
541
|
return configureNextFont(baseConfig, useSWC), configureRuntimeNextjsVersionResolution(baseConfig), configureImports({ baseConfig, configDir: options.configDir }), configureCss(baseConfig, nextConfig), configureImages(baseConfig, nextConfig), configureStyledJsx(baseConfig), configureNodePolyfills(baseConfig), configureAliases(baseConfig), isDevelopment && configureFastRefresh(baseConfig), options.features?.experimentalRSC && configureRSC(baseConfig), useSWC ? (logger.info("Using SWC as compiler"), await configureSWCLoader(baseConfig, options, nextConfig)) : (logger.info("Using Babel as compiler"), await configureBabelLoader(baseConfig, options, nextConfig)), baseConfig;
|
|
540
542
|
};
|
|
541
543
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_28jpl5dzv78j from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_28jpl5dzv78j from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_28jpl5dzv78j from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_28jpl5dzv78j.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_28jpl5dzv78j.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_28jpl5dzv78j.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -78,9 +78,7 @@ function pitch() {
|
|
|
78
78
|
let callback = this.async();
|
|
79
79
|
(async () => {
|
|
80
80
|
let isWasm2 = !1;
|
|
81
|
-
if (nextSwcUtils.isWasm ? isWasm2 = await nextSwcUtils.isWasm() : nextSwcUtils.getBindingsSync && (await nextSwcUtils.loadBindings(), isWasm2 = nextSwcUtils.getBindingsSync().isWasm),
|
|
82
|
-
// TODO: investigate swc file reading in PnP mode?
|
|
83
|
-
!process.versions.pnp && !EXCLUDED_PATHS.test(this.resourcePath) && this.loaders.length - 1 === this.loaderIndex && isAbsolute(this.resourcePath) && !isWasm2) {
|
|
81
|
+
if (nextSwcUtils.isWasm ? isWasm2 = await nextSwcUtils.isWasm() : nextSwcUtils.getBindingsSync && (await nextSwcUtils.loadBindings(), isWasm2 = nextSwcUtils.getBindingsSync().isWasm), !EXCLUDED_PATHS.test(this.resourcePath) && this.loaders.length - 1 === this.loaderIndex && isAbsolute(this.resourcePath) && !isWasm2) {
|
|
84
82
|
let loaderSpan = mockCurrentTraceSpan.traceChild("next-swc-loader");
|
|
85
83
|
return this.addDependency(this.resourcePath), loaderSpan.traceAsyncFn(() => loaderTransform.call(this, loaderSpan));
|
|
86
84
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/nextjs",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.1",
|
|
4
4
|
"description": "Storybook for Next.js: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
"code": "./src/export-mocks/cache/index.ts",
|
|
37
37
|
"default": "./dist/export-mocks/cache/index.js"
|
|
38
38
|
},
|
|
39
|
-
"./compatibility/draft-mode.compat": "./dist/compatibility/draft-mode.compat.js",
|
|
40
39
|
"./config/preview": "./dist/config/preview.js",
|
|
41
40
|
"./export-mocks": "./dist/export-mocks/index.js",
|
|
42
41
|
"./headers.mock": {
|
|
@@ -102,25 +101,30 @@
|
|
|
102
101
|
"@babel/preset-typescript": "^7.28.5",
|
|
103
102
|
"@babel/runtime": "^7.28.4",
|
|
104
103
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
105
|
-
"@storybook/builder-webpack5": "11.0.0-alpha.
|
|
106
|
-
"@storybook/preset-react-webpack": "11.0.0-alpha.
|
|
107
|
-
"@storybook/react": "11.0.0-alpha.
|
|
104
|
+
"@storybook/builder-webpack5": "11.0.0-alpha.1",
|
|
105
|
+
"@storybook/preset-react-webpack": "11.0.0-alpha.1",
|
|
106
|
+
"@storybook/react": "11.0.0-alpha.1",
|
|
108
107
|
"@types/semver": "^7.7.1",
|
|
109
108
|
"babel-loader": "^9.1.3",
|
|
109
|
+
"browserify-zlib": "^0.2.0",
|
|
110
|
+
"buffer": "^6.0.3",
|
|
110
111
|
"css-loader": "^6.7.3",
|
|
112
|
+
"events": "^3.3.0",
|
|
111
113
|
"loader-utils": "^3.2.1",
|
|
112
|
-
"node-polyfill-webpack-plugin": "^2.0.1",
|
|
113
114
|
"postcss": "^8.4.38",
|
|
114
115
|
"postcss-loader": "^8.1.1",
|
|
115
116
|
"probe-image-size": "^7.3.0",
|
|
117
|
+
"process": "^0.11.10",
|
|
116
118
|
"react-refresh": "^0.14.0",
|
|
117
119
|
"resolve-url-loader": "^5.0.0",
|
|
118
120
|
"sass-loader": "^16.0.5",
|
|
119
121
|
"semver": "^7.7.3",
|
|
122
|
+
"stream-browserify": "^3.0.0",
|
|
120
123
|
"style-loader": "^3.3.1",
|
|
121
124
|
"styled-jsx": "^5.1.6",
|
|
122
125
|
"tsconfig-paths": "^4.0.0",
|
|
123
|
-
"tsconfig-paths-webpack-plugin": "^4.0.1"
|
|
126
|
+
"tsconfig-paths-webpack-plugin": "^4.0.1",
|
|
127
|
+
"util": "^0.12.5"
|
|
124
128
|
},
|
|
125
129
|
"devDependencies": {
|
|
126
130
|
"@babel/types": "^7.28.5",
|
|
@@ -138,10 +142,10 @@
|
|
|
138
142
|
"peerDependencies": {
|
|
139
143
|
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
140
144
|
"@types/react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
141
|
-
"next": "^
|
|
145
|
+
"next": "^15.0.0 || ^16.0.0",
|
|
142
146
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
143
147
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
144
|
-
"storybook": "^11.0.0-alpha.
|
|
148
|
+
"storybook": "^11.0.0-alpha.1",
|
|
145
149
|
"webpack": "^5.0.0"
|
|
146
150
|
},
|
|
147
151
|
"peerDependenciesMeta": {
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_i4qm0mthp88 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_i4qm0mthp88 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_i4qm0mthp88 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_i4qm0mthp88.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_i4qm0mthp88.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_i4qm0mthp88.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
addScopedAlias,
|
|
14
|
-
getNextjsVersion,
|
|
15
|
-
setAlias
|
|
16
|
-
} from "./chunk-HS4NIXO2.js";
|
|
17
|
-
|
|
18
|
-
// src/compatibility/compatibility-map.ts
|
|
19
|
-
import semver from "semver";
|
|
20
|
-
var mapping = {
|
|
21
|
-
"<15.0.0": {
|
|
22
|
-
"next/dist/server/request/headers": "next/dist/client/components/headers",
|
|
23
|
-
// this path only exists from Next 15 onwards
|
|
24
|
-
"next/dist/server/request/draft-mode": "@storybook/nextjs/compatibility/draft-mode.compat"
|
|
25
|
-
}
|
|
26
|
-
}, getCompatibilityAliases = () => {
|
|
27
|
-
let version = getNextjsVersion(), result = {};
|
|
28
|
-
return Object.keys(mapping).forEach((key) => {
|
|
29
|
-
semver.intersects(version, key) && Object.assign(result, mapping[key]);
|
|
30
|
-
}), result;
|
|
31
|
-
}, configureCompatibilityAliases = (baseConfig) => {
|
|
32
|
-
let aliases = getCompatibilityAliases();
|
|
33
|
-
Object.entries(aliases).forEach(([name, alias]) => {
|
|
34
|
-
typeof alias == "string" ? addScopedAlias(baseConfig, name, alias) : setAlias(baseConfig, name, alias);
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// src/export-mocks/webpack.ts
|
|
39
|
-
var mapping2 = {
|
|
40
|
-
"next/headers": "@storybook/nextjs/headers.mock",
|
|
41
|
-
"next/navigation": "@storybook/nextjs/navigation.mock",
|
|
42
|
-
"next/router": "@storybook/nextjs/router.mock",
|
|
43
|
-
"next/cache": "@storybook/nextjs/cache.mock",
|
|
44
|
-
"next/link": "@storybook/nextjs/link.mock",
|
|
45
|
-
...getCompatibilityAliases()
|
|
46
|
-
}, getPackageAliases = () => mapping2, configureNextExportMocks = (baseConfig) => {
|
|
47
|
-
let resolve = baseConfig.resolve ?? {};
|
|
48
|
-
resolve.alias = {
|
|
49
|
-
...resolve.alias,
|
|
50
|
-
...mapping2
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export {
|
|
55
|
-
configureCompatibilityAliases,
|
|
56
|
-
getPackageAliases,
|
|
57
|
-
configureNextExportMocks
|
|
58
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_i4qm0mthp88 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_i4qm0mthp88 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_i4qm0mthp88 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_i4qm0mthp88.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_i4qm0mthp88.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_i4qm0mthp88.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
configureCompatibilityAliases,
|
|
14
|
-
configureNextExportMocks
|
|
15
|
-
} from "./chunk-GCMGR3UX.js";
|
|
16
|
-
import "./chunk-HS4NIXO2.js";
|
|
17
|
-
import {
|
|
18
|
-
resolvePackageDir
|
|
19
|
-
} from "./chunk-J6XYSX4C.js";
|
|
20
|
-
|
|
21
|
-
// src/aliases/webpack.ts
|
|
22
|
-
var configureAliases = (baseConfig) => {
|
|
23
|
-
configureNextExportMocks(baseConfig), configureCompatibilityAliases(baseConfig), baseConfig.resolve = {
|
|
24
|
-
...baseConfig.resolve ?? {},
|
|
25
|
-
alias: {
|
|
26
|
-
...baseConfig.resolve?.alias ?? {},
|
|
27
|
-
"@opentelemetry/api": "next/dist/compiled/@opentelemetry/api",
|
|
28
|
-
next: resolvePackageDir("next"),
|
|
29
|
-
"next/dist/shared/lib/app-router-context.shared-runtime": "next/dist/shared/lib/app-router-context.shared-runtime",
|
|
30
|
-
"next/dist/shared/lib/app-router-context": "next/dist/shared/lib/app-router-context.shared-runtime"
|
|
31
|
-
}
|
|
32
|
-
}, baseConfig.ignoreWarnings = [
|
|
33
|
-
...baseConfig.ignoreWarnings ?? [],
|
|
34
|
-
(warning) => warning.message.includes("export 'draftMode'") && warning.message.includes("next/dist/server/request/headers")
|
|
35
|
-
];
|
|
36
|
-
};
|
|
37
|
-
export {
|
|
38
|
-
configureAliases
|
|
39
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_i4qm0mthp88 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_i4qm0mthp88 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_i4qm0mthp88 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_i4qm0mthp88.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_i4qm0mthp88.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_i4qm0mthp88.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
addScopedAlias
|
|
14
|
-
} from "./chunk-HS4NIXO2.js";
|
|
15
|
-
import "./chunk-J6XYSX4C.js";
|
|
16
|
-
|
|
17
|
-
// src/styledJsx/webpack.ts
|
|
18
|
-
var configureStyledJsx = (baseConfig) => {
|
|
19
|
-
addScopedAlias(baseConfig, "styled-jsx");
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
configureStyledJsx
|
|
23
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_i4qm0mthp88 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_i4qm0mthp88 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_i4qm0mthp88 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_i4qm0mthp88.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_i4qm0mthp88.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_i4qm0mthp88.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// src/nodePolyfills/webpack.ts
|
|
14
|
-
import NodePolyfillPlugin from "node-polyfill-webpack-plugin";
|
|
15
|
-
import webpack from "webpack";
|
|
16
|
-
var NODE_PROTOCOL_REGEX = /^node:/, configureNodePolyfills = (baseConfig) => (baseConfig.plugins = [
|
|
17
|
-
...baseConfig.plugins || [],
|
|
18
|
-
new webpack.NormalModuleReplacementPlugin(NODE_PROTOCOL_REGEX, (resource) => {
|
|
19
|
-
resource.request = resource.request.replace(NODE_PROTOCOL_REGEX, "");
|
|
20
|
-
}),
|
|
21
|
-
new NodePolyfillPlugin()
|
|
22
|
-
], baseConfig.resolve = {
|
|
23
|
-
...baseConfig.resolve,
|
|
24
|
-
fallback: {
|
|
25
|
-
...baseConfig.resolve?.fallback,
|
|
26
|
-
fs: !1
|
|
27
|
-
}
|
|
28
|
-
}, baseConfig);
|
|
29
|
-
export {
|
|
30
|
-
configureNodePolyfills
|
|
31
|
-
};
|