@storybook/nextjs 11.0.0-beta.3 → 11.0.0-beta.5

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.
Files changed (32) hide show
  1. package/dist/_node-chunks/{chunk-DCS5S7IB.js → chunk-GMYNB7ZT.js} +1 -12
  2. package/dist/_node-chunks/chunk-LKRSTX6O.js +19 -0
  3. package/dist/_node-chunks/chunk-YNDNOD23.js +81 -0
  4. package/dist/_node-chunks/configureNextFont-RHF3RXPJ.js +16 -0
  5. package/dist/_node-chunks/{loader-LOSORGJO.js → loader-5BXZE62J.js} +2 -13
  6. package/dist/_node-chunks/{loader-UX5ZVPKU.js → loader-EWJIFMNJ.js} +2 -13
  7. package/dist/_node-chunks/utils-PQU76W63.js +21 -0
  8. package/dist/_node-chunks/{webpack-NRY3IOMA.js → webpack-47DZNZQ7.js} +0 -12
  9. package/dist/_node-chunks/webpack-DRSBNC5A.js +12 -0
  10. package/dist/_node-chunks/webpack-JRGVBLLR.js +23 -0
  11. package/dist/_node-chunks/{webpack-V5SINNEC.js → webpack-LAITHUEI.js} +0 -12
  12. package/dist/_node-chunks/{webpack-P52ORMRA.js → webpack-LXED4KY5.js} +0 -12
  13. package/dist/_node-chunks/webpack-MZMGMREC.js +12 -0
  14. package/dist/_node-chunks/{webpack-TXYKWM32.js → webpack-RG3XJZEG.js} +0 -12
  15. package/dist/_node-chunks/webpack-RJP6AVYE.js +14 -0
  16. package/dist/export-mocks/index.js +1 -12
  17. package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +0 -12
  18. package/dist/node/index.js +0 -12
  19. package/dist/preset.js +3 -14
  20. package/dist/swc/next-swc-loader-patch.js +0 -12
  21. package/package.json +5 -5
  22. package/dist/_node-chunks/chunk-GQKWZNAS.js +0 -217
  23. package/dist/_node-chunks/chunk-OLZWTDQZ.js +0 -31
  24. package/dist/_node-chunks/configureNextFont-4QMTBMSA.js +0 -28
  25. package/dist/_node-chunks/utils-S6XU3LSO.js +0 -32
  26. package/dist/_node-chunks/webpack-DCYWUHPO.js +0 -26
  27. package/dist/_node-chunks/webpack-FXJYA7YH.js +0 -34
  28. package/dist/_node-chunks/webpack-J7XEHFPE.js +0 -24
  29. package/dist/_node-chunks/webpack-TDQC6NM7.js +0 -23
  30. /package/template/cli/ts/{Button.stories.ts → Button.stories.tsx} +0 -0
  31. /package/template/cli/ts/{Header.stories.ts → Header.stories.tsx} +0 -0
  32. /package/template/cli/ts/{Page.stories.ts → Page.stories.tsx} +0 -0
@@ -1,17 +1,6 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  resolvePackageDir
14
- } from "./chunk-GQKWZNAS.js";
3
+ } from "./chunk-YNDNOD23.js";
15
4
 
16
5
  // src/utils.ts
17
6
  import { readFileSync } from "node:fs";
@@ -0,0 +1,19 @@
1
+ // src/export-mocks/webpack.ts
2
+ var mapping = {
3
+ "next/headers": "@storybook/nextjs/headers.mock",
4
+ "next/navigation": "@storybook/nextjs/navigation.mock",
5
+ "next/router": "@storybook/nextjs/router.mock",
6
+ "next/cache": "@storybook/nextjs/cache.mock",
7
+ "next/link": "@storybook/nextjs/link.mock"
8
+ }, getPackageAliases = () => mapping, configureNextExportMocks = (baseConfig) => {
9
+ let resolve = baseConfig.resolve ?? {};
10
+ resolve.alias = {
11
+ ...resolve.alias,
12
+ ...mapping
13
+ };
14
+ };
15
+
16
+ export {
17
+ getPackageAliases,
18
+ configureNextExportMocks
19
+ };
@@ -0,0 +1,81 @@
1
+ // ../../core/src/shared/utils/module.ts
2
+ import nodeModule, { createRequire } from "node:module";
3
+ import { fileURLToPath, pathToFileURL } from "node:url";
4
+
5
+ // ../../core/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
6
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
7
+ function normalizeWindowsPath(input = "") {
8
+ return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
9
+ }
10
+ var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
11
+ var normalize = function(path2) {
12
+ if (path2.length === 0)
13
+ return ".";
14
+ path2 = normalizeWindowsPath(path2);
15
+ let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
16
+ return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
17
+ }, join = function(...arguments_) {
18
+ if (arguments_.length === 0)
19
+ return ".";
20
+ let joined;
21
+ for (let argument of arguments_)
22
+ argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`);
23
+ return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/"));
24
+ };
25
+ function normalizeString(path2, allowAboveRoot) {
26
+ let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
27
+ for (let index = 0; index <= path2.length; ++index) {
28
+ if (index < path2.length)
29
+ char = path2[index];
30
+ else {
31
+ if (char === "/")
32
+ break;
33
+ char = "/";
34
+ }
35
+ if (char === "/") {
36
+ if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
37
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
38
+ if (res.length > 2) {
39
+ let lastSlashIndex = res.lastIndexOf("/");
40
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
41
+ continue;
42
+ } else if (res.length > 0) {
43
+ res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
44
+ continue;
45
+ }
46
+ }
47
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
48
+ } else
49
+ res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
50
+ lastSlash = index, dots = 0;
51
+ } else char === "." && dots !== -1 ? ++dots : dots = -1;
52
+ }
53
+ return res;
54
+ }
55
+ var isAbsolute = function(p) {
56
+ return _IS_ABSOLUTE_RE.test(p);
57
+ };
58
+ var dirname = function(p) {
59
+ let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
60
+ return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
61
+ };
62
+
63
+ // ../../core/src/shared/utils/module.ts
64
+ var importMetaResolve = (...args) => typeof import.meta.resolve != "function" && process.env.VITEST === "true" ? (console.warn(
65
+ "importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
66
+ ), pathToFileURL(args[0]).href) : import.meta.resolve(...args), resolvePackageDir = (pkg, parent) => {
67
+ try {
68
+ return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
69
+ } catch {
70
+ try {
71
+ return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"))));
72
+ } catch {
73
+ let req = createRequire(parent ?? import.meta.url);
74
+ return dirname(req.resolve(join(pkg, "package.json")));
75
+ }
76
+ }
77
+ };
78
+
79
+ export {
80
+ resolvePackageDir
81
+ };
@@ -0,0 +1,16 @@
1
+ // src/font/webpack/configureNextFont.ts
2
+ function configureNextFont(baseConfig, isSWC) {
3
+ isSWC ? baseConfig.module?.rules?.push({
4
+ test: /next(\\|\/|\\\\).*(\\|\/|\\\\)target\.css$/,
5
+ loader: "@storybook/nextjs/storybook-nextjs-font-loader"
6
+ }) : baseConfig.resolveLoader = {
7
+ ...baseConfig.resolveLoader,
8
+ alias: {
9
+ ...baseConfig.resolveLoader?.alias,
10
+ "storybook-nextjs-font-loader": "@storybook/nextjs/storybook-nextjs-font-loader"
11
+ }
12
+ };
13
+ }
14
+ export {
15
+ configureNextFont
16
+ };
@@ -1,18 +1,7 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  getNodeModulesExcludeRegex
14
- } from "./chunk-DCS5S7IB.js";
15
- import "./chunk-GQKWZNAS.js";
3
+ } from "./chunk-GMYNB7ZT.js";
4
+ import "./chunk-YNDNOD23.js";
16
5
 
17
6
  // src/swc/loader.ts
18
7
  import { join } from "node:path";
@@ -1,18 +1,7 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  getNodeModulesExcludeRegex
14
- } from "./chunk-DCS5S7IB.js";
15
- import "./chunk-GQKWZNAS.js";
3
+ } from "./chunk-GMYNB7ZT.js";
4
+ import "./chunk-YNDNOD23.js";
16
5
 
17
6
  // src/babel/loader.ts
18
7
  import { fileURLToPath } from "node:url";
@@ -0,0 +1,21 @@
1
+ import {
2
+ addScopedAlias,
3
+ configureRuntimeNextjsVersionResolution,
4
+ getNextjsVersion,
5
+ getNodeModulesExcludeRegex,
6
+ isNextVersionGte,
7
+ resolveNextConfig,
8
+ scopedResolve,
9
+ setAlias
10
+ } from "./chunk-GMYNB7ZT.js";
11
+ import "./chunk-YNDNOD23.js";
12
+ export {
13
+ addScopedAlias,
14
+ configureRuntimeNextjsVersionResolution,
15
+ getNextjsVersion,
16
+ getNodeModulesExcludeRegex,
17
+ isNextVersionGte,
18
+ resolveNextConfig,
19
+ scopedResolve,
20
+ setAlias
21
+ };
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/images/webpack.ts
14
2
  import { fileURLToPath } from "node:url";
15
3
  var configureImages = (baseConfig, nextConfig) => {
@@ -0,0 +1,12 @@
1
+ import {
2
+ addScopedAlias
3
+ } from "./chunk-GMYNB7ZT.js";
4
+ import "./chunk-YNDNOD23.js";
5
+
6
+ // src/styledJsx/webpack.ts
7
+ var configureStyledJsx = (baseConfig) => {
8
+ addScopedAlias(baseConfig, "styled-jsx");
9
+ };
10
+ export {
11
+ configureStyledJsx
12
+ };
@@ -0,0 +1,23 @@
1
+ import {
2
+ configureNextExportMocks
3
+ } from "./chunk-LKRSTX6O.js";
4
+ import {
5
+ resolvePackageDir
6
+ } from "./chunk-YNDNOD23.js";
7
+
8
+ // src/aliases/webpack.ts
9
+ var configureAliases = (baseConfig) => {
10
+ configureNextExportMocks(baseConfig), baseConfig.resolve = {
11
+ ...baseConfig.resolve ?? {},
12
+ alias: {
13
+ ...baseConfig.resolve?.alias ?? {},
14
+ "@opentelemetry/api": "next/dist/compiled/@opentelemetry/api",
15
+ next: resolvePackageDir("next"),
16
+ "next/dist/shared/lib/app-router-context.shared-runtime": "next/dist/shared/lib/app-router-context.shared-runtime",
17
+ "next/dist/shared/lib/app-router-context": "next/dist/shared/lib/app-router-context.shared-runtime"
18
+ }
19
+ };
20
+ };
21
+ export {
22
+ configureAliases
23
+ };
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/nodePolyfills/webpack.ts
14
2
  import { createRequire } from "node:module";
15
3
  var NODE_PROTOCOL_REGEX = /^node:/, require2 = createRequire(import.meta.url), nodePolyfillFallback = {
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/css/webpack.ts
14
2
  import { fileURLToPath } from "node:url";
15
3
  import { cssFileResolve } from "next/dist/build/webpack/config/blocks/css/loaders/file-resolve.js";
@@ -0,0 +1,12 @@
1
+ // src/rsc/webpack.ts
2
+ import { fileURLToPath } from "node:url";
3
+ var configureRSC = (baseConfig) => {
4
+ let resolve = baseConfig.resolve ?? {};
5
+ resolve.alias = {
6
+ ...resolve.alias,
7
+ "server-only$": fileURLToPath(import.meta.resolve("@storybook/nextjs/rsc/server-only"))
8
+ };
9
+ };
10
+ export {
11
+ configureRSC
12
+ };
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/imports/webpack.ts
14
2
  import { getTsconfigPathsBaseDir } from "storybook/internal/common";
15
3
  import { loadConfig } from "tsconfig-paths";
@@ -0,0 +1,14 @@
1
+ // src/fastRefresh/webpack.ts
2
+ import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
3
+ var configureFastRefresh = (baseConfig) => {
4
+ baseConfig.plugins = [
5
+ ...baseConfig.plugins ?? [],
6
+ // overlay is disabled as it is shown with caught errors in error boundaries
7
+ // and the next app router is using error boundaries to redirect
8
+ // TODO use the Next error overlay
9
+ new ReactRefreshWebpackPlugin({ overlay: !1 })
10
+ ];
11
+ };
12
+ export {
13
+ configureFastRefresh
14
+ };
@@ -1,17 +1,6 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  getPackageAliases
14
- } from "../_node-chunks/chunk-OLZWTDQZ.js";
3
+ } from "../_node-chunks/chunk-LKRSTX6O.js";
15
4
  export {
16
5
  getPackageAliases
17
6
  };
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/font/webpack/loader/storybook-nextjs-font-loader.ts
14
2
  import { sep } from "node:path";
15
3
 
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/node/index.ts
14
2
  function defineMain(config) {
15
3
  return config;
package/dist/preset.js CHANGED
@@ -1,20 +1,9 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  addScopedAlias,
14
3
  isNextVersionGte,
15
4
  resolveNextConfig
16
- } from "./_node-chunks/chunk-DCS5S7IB.js";
17
- import "./_node-chunks/chunk-GQKWZNAS.js";
5
+ } from "./_node-chunks/chunk-GMYNB7ZT.js";
6
+ import "./_node-chunks/chunk-YNDNOD23.js";
18
7
 
19
8
  // src/preset.ts
20
9
  import { fileURLToPath as fileURLToPath2 } from "node:url";
@@ -553,7 +542,7 @@ var addons = [
553
542
  baseConfig,
554
543
  nextConfigPath,
555
544
  webpackInstance
556
- }), { configureNextFont } = await import("./_node-chunks/configureNextFont-4QMTBMSA.js"), { configureRuntimeNextjsVersionResolution } = await import("./_node-chunks/utils-S6XU3LSO.js"), { configureImports } = await import("./_node-chunks/webpack-TXYKWM32.js"), { configureCss } = await import("./_node-chunks/webpack-P52ORMRA.js"), { configureImages } = await import("./_node-chunks/webpack-NRY3IOMA.js"), { configureStyledJsx } = await import("./_node-chunks/webpack-TDQC6NM7.js"), { configureNodePolyfills } = await import("./_node-chunks/webpack-V5SINNEC.js"), { configureAliases } = await import("./_node-chunks/webpack-FXJYA7YH.js"), { configureFastRefresh } = await import("./_node-chunks/webpack-DCYWUHPO.js"), { configureRSC } = await import("./_node-chunks/webpack-J7XEHFPE.js"), { configureSWCLoader } = await import("./_node-chunks/loader-LOSORGJO.js"), { configureBabelLoader } = await import("./_node-chunks/loader-UX5ZVPKU.js"), hasBabelConfig = !!findBabelConfigFile(getProjectRoot()), isDevelopment = options.configType !== "PRODUCTION", useSWC = nextConfig.experimental?.forceSwcTransforms || !hasBabelConfig;
545
+ }), { configureNextFont } = await import("./_node-chunks/configureNextFont-RHF3RXPJ.js"), { configureRuntimeNextjsVersionResolution } = await import("./_node-chunks/utils-PQU76W63.js"), { configureImports } = await import("./_node-chunks/webpack-RG3XJZEG.js"), { configureCss } = await import("./_node-chunks/webpack-LXED4KY5.js"), { configureImages } = await import("./_node-chunks/webpack-47DZNZQ7.js"), { configureStyledJsx } = await import("./_node-chunks/webpack-DRSBNC5A.js"), { configureNodePolyfills } = await import("./_node-chunks/webpack-LAITHUEI.js"), { configureAliases } = await import("./_node-chunks/webpack-JRGVBLLR.js"), { configureFastRefresh } = await import("./_node-chunks/webpack-RJP6AVYE.js"), { configureRSC } = await import("./_node-chunks/webpack-MZMGMREC.js"), { configureSWCLoader } = await import("./_node-chunks/loader-5BXZE62J.js"), { configureBabelLoader } = await import("./_node-chunks/loader-EWJIFMNJ.js"), hasBabelConfig = !!findBabelConfigFile(getProjectRoot()), isDevelopment = options.configType !== "PRODUCTION", useSWC = nextConfig.experimental?.forceSwcTransforms || !hasBabelConfig;
557
546
  return configureNextFont(baseConfig, useSWC), configureRuntimeNextjsVersionResolution(baseConfig), configureImports({ baseConfig, configDir: options.configDir }), configureCss(baseConfig, nextConfig), configureImages(baseConfig, nextConfig), configureStyledJsx(baseConfig), configureNodePolyfills(baseConfig, webpackInstance), 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;
558
547
  };
559
548
  export {
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/swc/next-swc-loader-patch.ts
14
2
  import { isAbsolute, relative } from "node:path";
15
3
  import * as nextSwcUtils from "next/dist/build/swc/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/nextjs",
3
- "version": "11.0.0-beta.3",
3
+ "version": "11.0.0-beta.5",
4
4
  "description": "Storybook for Next.js: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -101,9 +101,9 @@
101
101
  "@babel/preset-typescript": "^7.28.5",
102
102
  "@babel/runtime": "^7.28.4",
103
103
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
104
- "@storybook/builder-webpack5": "11.0.0-beta.3",
105
- "@storybook/preset-react-webpack": "11.0.0-beta.3",
106
- "@storybook/react": "11.0.0-beta.3",
104
+ "@storybook/builder-webpack5": "11.0.0-beta.5",
105
+ "@storybook/preset-react-webpack": "11.0.0-beta.5",
106
+ "@storybook/react": "11.0.0-beta.5",
107
107
  "@types/semver": "^7.7.1",
108
108
  "babel-loader": "^9.1.3",
109
109
  "browserify-zlib": "^0.2.0",
@@ -148,7 +148,7 @@
148
148
  "react-docgen": "^8.0.2",
149
149
  "react-docgen-typescript": "^2.2.2",
150
150
  "react-dom": "^18.0.0 || ^19.0.0",
151
- "storybook": "^11.0.0-beta.3",
151
+ "storybook": "^11.0.0-beta.5",
152
152
  "typescript": "^5.9.0 || ^6.0.0 || ^7.0.0",
153
153
  "webpack": "^5.0.0"
154
154
  },
@@ -1,217 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // ../../core/src/shared/utils/module.ts
14
- import nodeModule, { createRequire } from "node:module";
15
- import { fileURLToPath, pathToFileURL } from "node:url";
16
-
17
- // ../../../node_modules/exsolve/dist/index.mjs
18
- import assert from "node:assert";
19
- import v8 from "node:v8";
20
- import { format, inspect } from "node:util";
21
- var own$1 = {}.hasOwnProperty, classRegExp = /^([A-Z][a-z\d]*)+$/, kTypes = /* @__PURE__ */ new Set([
22
- "string",
23
- "function",
24
- "number",
25
- "object",
26
- "Function",
27
- "Object",
28
- "boolean",
29
- "bigint",
30
- "symbol"
31
- ]), messages = /* @__PURE__ */ new Map(), nodeInternalPrefix = "__node_internal_", userStackTraceLimit;
32
- function formatList(array, type = "and") {
33
- return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
34
- }
35
- function createError(sym, value, constructor) {
36
- return messages.set(sym, value), makeNodeErrorWithCode(constructor, sym);
37
- }
38
- function makeNodeErrorWithCode(Base, key) {
39
- return function(...parameters) {
40
- let limit = Error.stackTraceLimit;
41
- isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = 0);
42
- let error = new Base();
43
- isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = limit);
44
- let message = getMessage(key, parameters, error);
45
- return Object.defineProperties(error, {
46
- message: {
47
- value: message,
48
- enumerable: !1,
49
- writable: !0,
50
- configurable: !0
51
- },
52
- toString: {
53
- value() {
54
- return `${this.name} [${key}]: ${this.message}`;
55
- },
56
- enumerable: !1,
57
- writable: !0,
58
- configurable: !0
59
- }
60
- }), captureLargerStackTrace(error), error.code = key, error;
61
- };
62
- }
63
- function isErrorStackTraceLimitWritable() {
64
- try {
65
- if (v8.startupSnapshot.isBuildingSnapshot()) return !1;
66
- } catch {
67
- }
68
- let desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
69
- return desc === void 0 ? Object.isExtensible(Error) : own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
70
- }
71
- function hideStackFrames(wrappedFunction) {
72
- let hidden = nodeInternalPrefix + wrappedFunction.name;
73
- return Object.defineProperty(wrappedFunction, "name", { value: hidden }), wrappedFunction;
74
- }
75
- var captureLargerStackTrace = hideStackFrames(function(error) {
76
- let stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
77
- return stackTraceLimitIsWritable && (userStackTraceLimit = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(error), stackTraceLimitIsWritable && (Error.stackTraceLimit = userStackTraceLimit), error;
78
- });
79
- function getMessage(key, parameters, self) {
80
- let message = messages.get(key);
81
- if (assert.ok(message !== void 0, "expected `message` to be found"), typeof message == "function")
82
- return assert.ok(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`), Reflect.apply(message, self, parameters);
83
- let regex = /%[dfijoOs]/g, expectedLength = 0;
84
- for (; regex.exec(message) !== null; ) expectedLength++;
85
- return assert.ok(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`), parameters.length === 0 ? message : (parameters.unshift(message), Reflect.apply(format, null, parameters));
86
- }
87
- function determineSpecificType(value) {
88
- if (value == null) return String(value);
89
- if (typeof value == "function" && value.name) return `function ${value.name}`;
90
- if (typeof value == "object")
91
- return value.constructor && value.constructor.name ? `an instance of ${value.constructor.name}` : `${inspect(value, { depth: -1 })}`;
92
- let inspected = inspect(value, { colors: !1 });
93
- return inspected.length > 28 && (inspected = `${inspected.slice(0, 25)}...`), `type ${typeof value} (${inspected})`;
94
- }
95
- var ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
96
- assert.ok(typeof name == "string", "'name' must be a string"), Array.isArray(expected) || (expected = [expected]);
97
- let message = "The ";
98
- if (name.endsWith(" argument")) message += `${name} `;
99
- else {
100
- let type = name.includes(".") ? "property" : "argument";
101
- message += `"${name}" ${type} `;
102
- }
103
- message += "must be ";
104
- let types = [], instances = [], other = [];
105
- for (let value of expected)
106
- assert.ok(typeof value == "string", "All expected entries have to be of type string"), kTypes.has(value) ? types.push(value.toLowerCase()) : classRegExp.exec(value) === null ? (assert.ok(value !== "object", 'The value "object" should be written as "Object"'), other.push(value)) : instances.push(value);
107
- if (instances.length > 0) {
108
- let pos = types.indexOf("object");
109
- pos !== -1 && (types.slice(pos, 1), instances.push("Object"));
110
- }
111
- return types.length > 0 && (message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`, (instances.length > 0 || other.length > 0) && (message += " or ")), instances.length > 0 && (message += `an instance of ${formatList(instances, "or")}`, other.length > 0 && (message += " or ")), other.length > 0 && (other.length > 1 ? message += `one of ${formatList(other, "or")}` : (other[0]?.toLowerCase() !== other[0] && (message += "an "), message += `${other[0]}`)), message += `. Received ${determineSpecificType(actual)}`, message;
112
- }, TypeError), ERR_INVALID_MODULE_SPECIFIER = createError(
113
- "ERR_INVALID_MODULE_SPECIFIER",
114
- /**
115
- * @param {string} request
116
- * @param {string} reason
117
- * @param {string} [base]
118
- */
119
- (request, reason, base) => `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`,
120
- TypeError
121
- ), ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path$1, base, message) => `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`, Error), ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (packagePath, key, target, isImport = !1, base) => {
122
- let relatedError = typeof target == "string" && !isImport && target.length > 0 && !target.startsWith("./");
123
- return key === "." ? (assert.ok(isImport === !1), `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`) : `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
124
- }, Error), ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path$1, base, exactUrl = !1) => `Cannot find ${exactUrl ? "module" : "package"} '${path$1}' imported from ${base}`, Error), ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error), ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`, TypeError), ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
125
- "ERR_PACKAGE_PATH_NOT_EXPORTED",
126
- /**
127
- * @param {string} packagePath
128
- * @param {string} subpath
129
- * @param {string} [base]
130
- */
131
- (packagePath, subpath, base) => subpath === "." ? `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}` : `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`,
132
- Error
133
- ), ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error), ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', TypeError), ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$1) => `Unknown file extension "${extension}" for ${path$1}`, TypeError), ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
134
- let inspected = inspect(value);
135
- return inspected.length > 128 && (inspected = `${inspected.slice(0, 128)}...`), `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
136
- }, TypeError), hasOwnProperty$1 = {}.hasOwnProperty;
137
- var hasOwnProperty = {}.hasOwnProperty;
138
- var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace], own = {}.hasOwnProperty;
139
- var isWindows = process.platform === "win32", globalCache = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
140
-
141
- // ../../core/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
142
- var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
143
- function normalizeWindowsPath(input = "") {
144
- return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
145
- }
146
- var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
147
- var normalize = function(path2) {
148
- if (path2.length === 0)
149
- return ".";
150
- path2 = normalizeWindowsPath(path2);
151
- let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
152
- return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
153
- }, join = function(...arguments_) {
154
- if (arguments_.length === 0)
155
- return ".";
156
- let joined;
157
- for (let argument of arguments_)
158
- argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`);
159
- return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/"));
160
- };
161
- function normalizeString(path2, allowAboveRoot) {
162
- let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
163
- for (let index = 0; index <= path2.length; ++index) {
164
- if (index < path2.length)
165
- char = path2[index];
166
- else {
167
- if (char === "/")
168
- break;
169
- char = "/";
170
- }
171
- if (char === "/") {
172
- if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
173
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
174
- if (res.length > 2) {
175
- let lastSlashIndex = res.lastIndexOf("/");
176
- lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
177
- continue;
178
- } else if (res.length > 0) {
179
- res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
180
- continue;
181
- }
182
- }
183
- allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
184
- } else
185
- res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
186
- lastSlash = index, dots = 0;
187
- } else char === "." && dots !== -1 ? ++dots : dots = -1;
188
- }
189
- return res;
190
- }
191
- var isAbsolute = function(p) {
192
- return _IS_ABSOLUTE_RE.test(p);
193
- };
194
- var dirname = function(p) {
195
- let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
196
- return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
197
- };
198
-
199
- // ../../core/src/shared/utils/module.ts
200
- var importMetaResolve = (...args) => typeof import.meta.resolve != "function" && process.env.VITEST === "true" ? (console.warn(
201
- "importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
202
- ), pathToFileURL(args[0]).href) : import.meta.resolve(...args), resolvePackageDir = (pkg, parent) => {
203
- try {
204
- return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
205
- } catch {
206
- try {
207
- return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"))));
208
- } catch {
209
- let req = createRequire(parent ?? import.meta.url);
210
- return dirname(req.resolve(join(pkg, "package.json")));
211
- }
212
- }
213
- };
214
-
215
- export {
216
- resolvePackageDir
217
- };
@@ -1,31 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.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,28 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // src/font/webpack/configureNextFont.ts
14
- function configureNextFont(baseConfig, isSWC) {
15
- isSWC ? baseConfig.module?.rules?.push({
16
- test: /next(\\|\/|\\\\).*(\\|\/|\\\\)target\.css$/,
17
- loader: "@storybook/nextjs/storybook-nextjs-font-loader"
18
- }) : baseConfig.resolveLoader = {
19
- ...baseConfig.resolveLoader,
20
- alias: {
21
- ...baseConfig.resolveLoader?.alias,
22
- "storybook-nextjs-font-loader": "@storybook/nextjs/storybook-nextjs-font-loader"
23
- }
24
- };
25
- }
26
- export {
27
- configureNextFont
28
- };
@@ -1,32 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- addScopedAlias,
14
- configureRuntimeNextjsVersionResolution,
15
- getNextjsVersion,
16
- getNodeModulesExcludeRegex,
17
- isNextVersionGte,
18
- resolveNextConfig,
19
- scopedResolve,
20
- setAlias
21
- } from "./chunk-DCS5S7IB.js";
22
- import "./chunk-GQKWZNAS.js";
23
- export {
24
- addScopedAlias,
25
- configureRuntimeNextjsVersionResolution,
26
- getNextjsVersion,
27
- getNodeModulesExcludeRegex,
28
- isNextVersionGte,
29
- resolveNextConfig,
30
- scopedResolve,
31
- setAlias
32
- };
@@ -1,26 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // src/fastRefresh/webpack.ts
14
- import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
15
- var configureFastRefresh = (baseConfig) => {
16
- baseConfig.plugins = [
17
- ...baseConfig.plugins ?? [],
18
- // overlay is disabled as it is shown with caught errors in error boundaries
19
- // and the next app router is using error boundaries to redirect
20
- // TODO use the Next error overlay
21
- new ReactRefreshWebpackPlugin({ overlay: !1 })
22
- ];
23
- };
24
- export {
25
- configureFastRefresh
26
- };
@@ -1,34 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.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-OLZWTDQZ.js";
15
- import {
16
- resolvePackageDir
17
- } from "./chunk-GQKWZNAS.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,24 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // src/rsc/webpack.ts
14
- import { fileURLToPath } from "node:url";
15
- var configureRSC = (baseConfig) => {
16
- let resolve = baseConfig.resolve ?? {};
17
- resolve.alias = {
18
- ...resolve.alias,
19
- "server-only$": fileURLToPath(import.meta.resolve("@storybook/nextjs/rsc/server-only"))
20
- };
21
- };
22
- export {
23
- configureRSC
24
- };
@@ -1,23 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_9pnltxwgg2 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9pnltxwgg2 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9pnltxwgg2 from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_9pnltxwgg2.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9pnltxwgg2.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9pnltxwgg2.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-DCS5S7IB.js";
15
- import "./chunk-GQKWZNAS.js";
16
-
17
- // src/styledJsx/webpack.ts
18
- var configureStyledJsx = (baseConfig) => {
19
- addScopedAlias(baseConfig, "styled-jsx");
20
- };
21
- export {
22
- configureStyledJsx
23
- };