@storybook/nextjs 10.5.0-alpha.0 → 10.5.0-alpha.10

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 (40) hide show
  1. package/dist/_browser-chunks/{chunk-A242L54C.js → chunk-IMSF75WX.js} +5 -1
  2. package/dist/_browser-chunks/{chunk-BFMHNVB2.js → chunk-MPD4I4WS.js} +1 -1
  3. package/dist/_browser-chunks/{react-18-J5XOSXHX.js → react-18-V22CCOOF.js} +1 -1
  4. package/dist/_node-chunks/{chunk-KCPX7OD3.js → chunk-7FPDB22V.js} +6 -6
  5. package/dist/_node-chunks/{chunk-XJDHF6KT.js → chunk-7OHDSEPO.js} +7 -7
  6. package/dist/_node-chunks/{chunk-ND7SBAR6.js → chunk-UNLYDHQY.js} +7 -7
  7. package/dist/_node-chunks/{configureNextFont-Q7U57PPU.js → configureNextFont-IC4ZQGZK.js} +6 -6
  8. package/dist/_node-chunks/{loader-RIBGYJHW.js → loader-ICPZXTL3.js} +8 -8
  9. package/dist/_node-chunks/{loader-KI6XZBS3.js → loader-PAETBD67.js} +8 -8
  10. package/dist/_node-chunks/{utils-GL6LQBBS.js → utils-NIV52OTT.js} +8 -8
  11. package/dist/_node-chunks/{webpack-L4DFEH7M.js → webpack-5CAIZHRV.js} +8 -8
  12. package/dist/_node-chunks/{webpack-DCDK2V3E.js → webpack-A6QXQRFS.js} +7 -7
  13. package/dist/_node-chunks/{webpack-G5XGVYIY.js → webpack-N7AIQMXP.js} +6 -6
  14. package/dist/_node-chunks/{webpack-RS75RWMA.js → webpack-QJJEFIGN.js} +9 -9
  15. package/dist/_node-chunks/{webpack-IHEKGOZT.js → webpack-SIQZPUH3.js} +8 -8
  16. package/dist/_node-chunks/{webpack-TXPRZDZK.js → webpack-UKLQ6NGL.js} +6 -6
  17. package/dist/_node-chunks/{webpack-A6MSF7GG.js → webpack-VEQT25J3.js} +6 -6
  18. package/dist/_node-chunks/{webpack-HPXWM7JA.js → webpack-VV7KUFJU.js} +6 -6
  19. package/dist/compatibility/draft-mode.compat.js +1 -1
  20. package/dist/export-mocks/cache/index.js +1 -1
  21. package/dist/export-mocks/headers/index.js +1 -1
  22. package/dist/export-mocks/index.js +9 -9
  23. package/dist/export-mocks/link/index.d.ts +314 -1
  24. package/dist/export-mocks/link/index.js +12 -6
  25. package/dist/export-mocks/navigation/index.js +1 -1
  26. package/dist/export-mocks/router/index.js +1 -1
  27. package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +6 -6
  28. package/dist/image-context.js +1 -1
  29. package/dist/images/next-image.js +1 -1
  30. package/dist/images/next-legacy-image.js +1 -1
  31. package/dist/index.js +12 -17
  32. package/dist/next-image-loader-stub.js +1 -1
  33. package/dist/node/index.js +6 -6
  34. package/dist/preset.js +19 -30
  35. package/dist/preview.js +2 -2
  36. package/dist/rsc/server-only.js +1 -1
  37. package/dist/swc/next-swc-loader-patch.js +7 -7
  38. package/package.json +5 -5
  39. package/template/cli/js/Button.stories.js +1 -1
  40. package/template/cli/ts/Button.stories.ts +1 -1
@@ -10,7 +10,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require < "u" ? require : typeof
10
10
  throw Error('Dynamic require of "' + x + '" is not supported');
11
11
  });
12
12
  var __commonJS = (cb, mod) => function() {
13
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ try {
14
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ } catch (e) {
16
+ throw mod = 0, e;
17
+ }
14
18
  };
15
19
  var __export = (target, all) => {
16
20
  for (var name in all)
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "./chunk-A242L54C.js";
3
+ } from "./chunk-IMSF75WX.js";
4
4
 
5
5
  // src/preview.tsx
6
6
  var preview_exports = {};
@@ -1,4 +1,4 @@
1
- import "./chunk-A242L54C.js";
1
+ import "./chunk-IMSF75WX.js";
2
2
 
3
3
  // ../../lib/react-dom-shim/dist/react-18.js
4
4
  import * as React from "react";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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-KCPX7OD3.js";
14
+ } from "./chunk-7FPDB22V.js";
15
15
 
16
16
  // src/utils.ts
17
17
  import { readFileSync } from "node:fs";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,7 +13,7 @@ import {
13
13
  addScopedAlias,
14
14
  getNextjsVersion,
15
15
  setAlias
16
- } from "./chunk-XJDHF6KT.js";
16
+ } from "./chunk-7OHDSEPO.js";
17
17
 
18
18
  // src/compatibility/compatibility-map.ts
19
19
  import semver from "semver";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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 CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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-XJDHF6KT.js";
15
- import "./chunk-KCPX7OD3.js";
14
+ } from "./chunk-7OHDSEPO.js";
15
+ import "./chunk-7FPDB22V.js";
16
16
 
17
17
  // src/babel/loader.ts
18
18
  import { fileURLToPath } from "node:url";
@@ -1,18 +1,18 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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-XJDHF6KT.js";
15
- import "./chunk-KCPX7OD3.js";
14
+ } from "./chunk-7OHDSEPO.js";
15
+ import "./chunk-7FPDB22V.js";
16
16
 
17
17
  // src/swc/loader.ts
18
18
  import { join } from "node:path";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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-XJDHF6KT.js";
22
- import "./chunk-KCPX7OD3.js";
21
+ } from "./chunk-7OHDSEPO.js";
22
+ import "./chunk-7FPDB22V.js";
23
23
  export {
24
24
  addScopedAlias,
25
25
  configureRuntimeNextjsVersionResolution,
@@ -1,18 +1,18 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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-XJDHF6KT.js";
15
- import "./chunk-KCPX7OD3.js";
14
+ } from "./chunk-7OHDSEPO.js";
15
+ import "./chunk-7FPDB22V.js";
16
16
 
17
17
  // src/styledJsx/webpack.ts
18
18
  var configureStyledJsx = (baseConfig) => {
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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-KCPX7OD3.js";
14
+ } from "./chunk-7FPDB22V.js";
15
15
 
16
16
  // src/css/webpack.ts
17
17
  import { readFileSync } from "node:fs";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,11 +12,11 @@ var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
12
12
  import {
13
13
  configureCompatibilityAliases,
14
14
  configureNextExportMocks
15
- } from "./chunk-ND7SBAR6.js";
16
- import "./chunk-XJDHF6KT.js";
15
+ } from "./chunk-UNLYDHQY.js";
16
+ import "./chunk-7OHDSEPO.js";
17
17
  import {
18
18
  resolvePackageDir
19
- } from "./chunk-KCPX7OD3.js";
19
+ } from "./chunk-7FPDB22V.js";
20
20
 
21
21
  // src/aliases/webpack.ts
22
22
  var configureAliases = (baseConfig) => {
@@ -1,18 +1,18 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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-XJDHF6KT.js";
15
- import "./chunk-KCPX7OD3.js";
14
+ } from "./chunk-7OHDSEPO.js";
15
+ import "./chunk-7FPDB22V.js";
16
16
 
17
17
  // src/images/webpack.ts
18
18
  import { fileURLToPath } from "node:url";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,4 +1,4 @@
1
- import "../_browser-chunks/chunk-A242L54C.js";
1
+ import "../_browser-chunks/chunk-IMSF75WX.js";
2
2
 
3
3
  // src/compatibility/draft-mode.compat.ts
4
4
  import { draftMode } from "next/dist/client/components/headers.js";
@@ -1,4 +1,4 @@
1
- import "../../_browser-chunks/chunk-A242L54C.js";
1
+ import "../../_browser-chunks/chunk-IMSF75WX.js";
2
2
 
3
3
  // src/export-mocks/cache/index.ts
4
4
  import { unstable_cache } from "next/dist/server/web/spec-extension/unstable-cache.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __require
3
- } from "../../_browser-chunks/chunk-A242L54C.js";
3
+ } from "../../_browser-chunks/chunk-IMSF75WX.js";
4
4
 
5
5
  // src/export-mocks/headers/index.ts
6
6
  import * as headers3 from "next/dist/server/request/headers.js";
@@ -1,19 +1,19 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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-ND7SBAR6.js";
15
- import "../_node-chunks/chunk-XJDHF6KT.js";
16
- import "../_node-chunks/chunk-KCPX7OD3.js";
14
+ } from "../_node-chunks/chunk-UNLYDHQY.js";
15
+ import "../_node-chunks/chunk-7OHDSEPO.js";
16
+ import "../_node-chunks/chunk-7FPDB22V.js";
17
17
  export {
18
18
  getPackageAliases
19
19
  };
@@ -1,5 +1,318 @@
1
1
  import React from 'react';
2
2
 
3
+ interface MockResultReturn<T> {
4
+ type: "return";
5
+ /**
6
+ * The value that was returned from the function. If function returned a Promise, then this will be a resolved value.
7
+ */
8
+ value: T;
9
+ }
10
+ interface MockResultIncomplete {
11
+ type: "incomplete";
12
+ value: undefined;
13
+ }
14
+ interface MockResultThrow {
15
+ type: "throw";
16
+ /**
17
+ * An error that was thrown during function execution.
18
+ */
19
+ value: any;
20
+ }
21
+ interface MockSettledResultFulfilled<T> {
22
+ type: "fulfilled";
23
+ value: T;
24
+ }
25
+ interface MockSettledResultRejected {
26
+ type: "rejected";
27
+ value: any;
28
+ }
29
+ type MockResult<T> = MockResultReturn<T> | MockResultThrow | MockResultIncomplete;
30
+ type MockSettledResult<T> = MockSettledResultFulfilled<T> | MockSettledResultRejected;
31
+ interface MockContext<T extends Procedure> {
32
+ /**
33
+ * This is an array containing all arguments for each call. One item of the array is the arguments of that call.
34
+ *
35
+ * @see https://vitest.dev/api/mock#mock-calls
36
+ * @example
37
+ * const fn = vi.fn()
38
+ *
39
+ * fn('arg1', 'arg2')
40
+ * fn('arg3')
41
+ *
42
+ * fn.mock.calls === [
43
+ * ['arg1', 'arg2'], // first call
44
+ * ['arg3'], // second call
45
+ * ]
46
+ */
47
+ calls: Parameters<T>[];
48
+ /**
49
+ * This is an array containing all instances that were instantiated when mock was called with a `new` keyword. Note that this is an actual context (`this`) of the function, not a return value.
50
+ * @see https://vitest.dev/api/mock#mock-instances
51
+ */
52
+ instances: ReturnType<T>[];
53
+ /**
54
+ * An array of `this` values that were used during each call to the mock function.
55
+ * @see https://vitest.dev/api/mock#mock-contexts
56
+ */
57
+ contexts: ThisParameterType<T>[];
58
+ /**
59
+ * The order of mock's execution. This returns an array of numbers which are shared between all defined mocks.
60
+ *
61
+ * @see https://vitest.dev/api/mock#mock-invocationcallorder
62
+ * @example
63
+ * const fn1 = vi.fn()
64
+ * const fn2 = vi.fn()
65
+ *
66
+ * fn1()
67
+ * fn2()
68
+ * fn1()
69
+ *
70
+ * fn1.mock.invocationCallOrder === [1, 3]
71
+ * fn2.mock.invocationCallOrder === [2]
72
+ */
73
+ invocationCallOrder: number[];
74
+ /**
75
+ * This is an array containing all values that were `returned` from the function.
76
+ *
77
+ * The `value` property contains the returned value or thrown error. If the function returned a `Promise`, then `result` will always be `'return'` even if the promise was rejected.
78
+ *
79
+ * @see https://vitest.dev/api/mock#mock-results
80
+ * @example
81
+ * const fn = vi.fn()
82
+ * .mockReturnValueOnce('result')
83
+ * .mockImplementationOnce(() => { throw new Error('thrown error') })
84
+ *
85
+ * const result = fn()
86
+ *
87
+ * try {
88
+ * fn()
89
+ * }
90
+ * catch {}
91
+ *
92
+ * fn.mock.results === [
93
+ * {
94
+ * type: 'return',
95
+ * value: 'result',
96
+ * },
97
+ * {
98
+ * type: 'throw',
99
+ * value: Error,
100
+ * },
101
+ * ]
102
+ */
103
+ results: MockResult<ReturnType<T>>[];
104
+ /**
105
+ * An array containing all values that were `resolved` or `rejected` from the function.
106
+ *
107
+ * This array will be empty if the function was never resolved or rejected.
108
+ *
109
+ * @see https://vitest.dev/api/mock#mock-settledresults
110
+ * @example
111
+ * const fn = vi.fn().mockResolvedValueOnce('result')
112
+ *
113
+ * const result = fn()
114
+ *
115
+ * fn.mock.settledResults === []
116
+ * fn.mock.results === [
117
+ * {
118
+ * type: 'return',
119
+ * value: Promise<'result'>,
120
+ * },
121
+ * ]
122
+ *
123
+ * await result
124
+ *
125
+ * fn.mock.settledResults === [
126
+ * {
127
+ * type: 'fulfilled',
128
+ * value: 'result',
129
+ * },
130
+ * ]
131
+ */
132
+ settledResults: MockSettledResult<Awaited<ReturnType<T>>>[];
133
+ /**
134
+ * This contains the arguments of the last call. If spy wasn't called, will return `undefined`.
135
+ * @see https://vitest.dev/api/mock#mock-lastcall
136
+ */
137
+ lastCall: Parameters<T> | undefined;
138
+ }
139
+ type Procedure = (...args: any[]) => any;
140
+ // pick a single function type from function overloads, unions, etc...
141
+ type NormalizedProcedure<T extends Procedure> = (...args: Parameters<T>) => ReturnType<T>;
142
+ /*
143
+ cf. https://typescript-eslint.io/rules/method-signature-style/
144
+
145
+ Typescript assignability is different between
146
+ { foo: (f: T) => U } (this is "method-signature-style")
147
+ and
148
+ { foo(f: T): U }
149
+
150
+ Jest uses the latter for `MockInstance.mockImplementation` etc... and it allows assignment such as:
151
+ const boolFn: Jest.Mock<() => boolean> = jest.fn<() => true>(() => true)
152
+ */
153
+ /* eslint-disable ts/method-signature-style */
154
+ interface MockInstance<T extends Procedure = Procedure> extends Disposable {
155
+ /**
156
+ * Use it to return the name assigned to the mock with the `.mockName(name)` method. By default, it will return `vi.fn()`.
157
+ * @see https://vitest.dev/api/mock#getmockname
158
+ */
159
+ getMockName(): string;
160
+ /**
161
+ * Sets the internal mock name. This is useful for identifying the mock when an assertion fails.
162
+ * @see https://vitest.dev/api/mock#mockname
163
+ */
164
+ mockName(name: string): this;
165
+ /**
166
+ * Current context of the mock. It stores information about all invocation calls, instances, and results.
167
+ */
168
+ mock: MockContext<T>;
169
+ /**
170
+ * Clears all information about every call. After calling it, all properties on `.mock` will return to their initial state. This method does not reset implementations. It is useful for cleaning up mocks between different assertions.
171
+ *
172
+ * To automatically call this method before each test, enable the [`clearMocks`](https://vitest.dev/config/#clearmocks) setting in the configuration.
173
+ * @see https://vitest.dev/api/mock#mockclear
174
+ */
175
+ mockClear(): this;
176
+ /**
177
+ * Does what `mockClear` does and resets inner implementation to the original function. This also resets all "once" implementations.
178
+ *
179
+ * Note that resetting a mock from `vi.fn()` will set implementation to an empty function that returns `undefined`.
180
+ * Resetting a mock from `vi.fn(impl)` will set implementation to `impl`. It is useful for completely resetting a mock to its default state.
181
+ *
182
+ * To automatically call this method before each test, enable the [`mockReset`](https://vitest.dev/config/#mockreset) setting in the configuration.
183
+ * @see https://vitest.dev/api/mock#mockreset
184
+ */
185
+ mockReset(): this;
186
+ /**
187
+ * Does what `mockReset` does and restores original descriptors of spied-on objects.
188
+ *
189
+ * Note that restoring mock from `vi.fn()` will set implementation to an empty function that returns `undefined`. Restoring a `vi.fn(impl)` will restore implementation to `impl`.
190
+ * @see https://vitest.dev/api/mock#mockrestore
191
+ */
192
+ mockRestore(): void;
193
+ /**
194
+ * Returns current permanent mock implementation if there is one.
195
+ *
196
+ * If mock was created with `vi.fn`, it will consider passed down method as a mock implementation.
197
+ *
198
+ * If mock was created with `vi.spyOn`, it will return `undefined` unless a custom implementation was provided.
199
+ */
200
+ getMockImplementation(): NormalizedProcedure<T> | undefined;
201
+ /**
202
+ * Accepts a function to be used as the mock implementation. TypeScript expects the arguments and return type to match those of the original function.
203
+ * @see https://vitest.dev/api/mock#mockimplementation
204
+ * @example
205
+ * const increment = vi.fn().mockImplementation(count => count + 1);
206
+ * expect(increment(3)).toBe(4);
207
+ */
208
+ mockImplementation(fn: NormalizedProcedure<T>): this;
209
+ /**
210
+ * Accepts a function to be used as the mock implementation. TypeScript expects the arguments and return type to match those of the original function. This method can be chained to produce different results for multiple function calls.
211
+ *
212
+ * When the mocked function runs out of implementations, it will invoke the default implementation set with `vi.fn(() => defaultValue)` or `.mockImplementation(() => defaultValue)` if they were called.
213
+ * @see https://vitest.dev/api/mock#mockimplementationonce
214
+ * @example
215
+ * const fn = vi.fn(count => count).mockImplementationOnce(count => count + 1);
216
+ * expect(fn(3)).toBe(4);
217
+ * expect(fn(3)).toBe(3);
218
+ */
219
+ mockImplementationOnce(fn: NormalizedProcedure<T>): this;
220
+ /**
221
+ * Overrides the original mock implementation temporarily while the callback is being executed.
222
+ *
223
+ * Note that this method takes precedence over the [`mockImplementationOnce`](https://vitest.dev/api/mock#mockimplementationonce).
224
+ * @see https://vitest.dev/api/mock#withimplementation
225
+ * @example
226
+ * const myMockFn = vi.fn(() => 'original')
227
+ *
228
+ * myMockFn.withImplementation(() => 'temp', () => {
229
+ * myMockFn() // 'temp'
230
+ * })
231
+ *
232
+ * myMockFn() // 'original'
233
+ */
234
+ withImplementation<T2>(fn: NormalizedProcedure<T>, cb: () => T2): T2 extends Promise<unknown> ? Promise<this> : this;
235
+ /**
236
+ * Use this if you need to return the `this` context from the method without invoking the actual implementation.
237
+ * @see https://vitest.dev/api/mock#mockreturnthis
238
+ */
239
+ mockReturnThis(): this;
240
+ /**
241
+ * Accepts a value that will be returned whenever the mock function is called. TypeScript will only accept values that match the return type of the original function.
242
+ * @see https://vitest.dev/api/mock#mockreturnvalue
243
+ * @example
244
+ * const mock = vi.fn()
245
+ * mock.mockReturnValue(42)
246
+ * mock() // 42
247
+ * mock.mockReturnValue(43)
248
+ * mock() // 43
249
+ */
250
+ mockReturnValue(value: ReturnType<T>): this;
251
+ /**
252
+ * Accepts a value that will be returned whenever the mock function is called. TypeScript will only accept values that match the return type of the original function.
253
+ *
254
+ * When the mocked function runs out of implementations, it will invoke the default implementation set with `vi.fn(() => defaultValue)` or `.mockImplementation(() => defaultValue)` if they were called.
255
+ * @example
256
+ * const myMockFn = vi
257
+ * .fn()
258
+ * .mockReturnValue('default')
259
+ * .mockReturnValueOnce('first call')
260
+ * .mockReturnValueOnce('second call')
261
+ *
262
+ * // 'first call', 'second call', 'default'
263
+ * console.log(myMockFn(), myMockFn(), myMockFn())
264
+ */
265
+ mockReturnValueOnce(value: ReturnType<T>): this;
266
+ /**
267
+ * Accepts a value that will be resolved when the async function is called. TypeScript will only accept values that match the return type of the original function.
268
+ * @example
269
+ * const asyncMock = vi.fn().mockResolvedValue(42)
270
+ * asyncMock() // Promise<42>
271
+ */
272
+ mockResolvedValue(value: Awaited<ReturnType<T>>): this;
273
+ /**
274
+ * Accepts a value that will be resolved during the next function call. TypeScript will only accept values that match the return type of the original function. If chained, each consecutive call will resolve the specified value.
275
+ * @example
276
+ * const myMockFn = vi
277
+ * .fn()
278
+ * .mockResolvedValue('default')
279
+ * .mockResolvedValueOnce('first call')
280
+ * .mockResolvedValueOnce('second call')
281
+ *
282
+ * // Promise<'first call'>, Promise<'second call'>, Promise<'default'>
283
+ * console.log(myMockFn(), myMockFn(), myMockFn())
284
+ */
285
+ mockResolvedValueOnce(value: Awaited<ReturnType<T>>): this;
286
+ /**
287
+ * Accepts an error that will be rejected when async function is called.
288
+ * @example
289
+ * const asyncMock = vi.fn().mockRejectedValue(new Error('Async error'))
290
+ * await asyncMock() // throws Error<'Async error'>
291
+ */
292
+ mockRejectedValue(error: unknown): this;
293
+ /**
294
+ * Accepts a value that will be rejected during the next function call. If chained, each consecutive call will reject the specified value.
295
+ * @example
296
+ * const asyncMock = vi
297
+ * .fn()
298
+ * .mockResolvedValueOnce('first call')
299
+ * .mockRejectedValueOnce(new Error('Async error'))
300
+ *
301
+ * await asyncMock() // first call
302
+ * await asyncMock() // throws Error<'Async error'>
303
+ */
304
+ mockRejectedValueOnce(error: unknown): this;
305
+ }
306
+ /* eslint-enable ts/method-signature-style */
307
+ interface Mock<T extends Procedure = Procedure> extends MockInstance<T> {
308
+ new (...args: Parameters<T>): ReturnType<T>;
309
+ (...args: Parameters<T>): ReturnType<T>;
310
+ }
311
+
3
312
  declare const MockLink: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
4
313
 
5
- export { MockLink as Link, MockLink as default };
314
+ declare const useLinkStatus: Mock<() => {
315
+ pending: boolean;
316
+ }>;
317
+
318
+ export { MockLink as Link, MockLink as default, useLinkStatus };
@@ -1,11 +1,11 @@
1
- import "../../_browser-chunks/chunk-A242L54C.js";
1
+ import "../../_browser-chunks/chunk-IMSF75WX.js";
2
2
 
3
3
  // src/export-mocks/link/index.tsx
4
4
  import React from "react";
5
5
  import { fn } from "storybook/test";
6
6
  var linkAction = fn().mockName("next/link::Link"), MockLink = React.forwardRef(function({
7
7
  href,
8
- as: _as,
8
+ as,
9
9
  replace,
10
10
  scroll,
11
11
  shallow,
@@ -17,14 +17,16 @@ var linkAction = fn().mockName("next/link::Link"), MockLink = React.forwardRef(f
17
17
  children,
18
18
  ...rest
19
19
  }, ref) {
20
- let hrefString = typeof href == "object" ? `${href.pathname || ""}${href.query ? "?" + new URLSearchParams(href.query).toString() : ""}${href.hash || ""}` : href, handleClick = (e) => {
21
- e.preventDefault(), onClick?.(e), linkAction(hrefString, { replace, scroll, shallow, prefetch, locale });
20
+ let resolvedHref = as ?? href, hrefString = typeof resolvedHref == "object" ? `${resolvedHref.pathname || ""}${resolvedHref.query ? "?" + new URLSearchParams(resolvedHref.query).toString() : ""}${resolvedHref.hash || ""}` : resolvedHref, navigate = (e) => {
21
+ e.defaultPrevented || (e.preventDefault(), linkAction(hrefString, { replace, scroll, shallow, prefetch, locale }));
22
+ }, handleClick = (e) => {
23
+ onClick?.(e), navigate(e);
22
24
  };
23
25
  if (legacyBehavior) {
24
26
  let child = React.Children.only(children), childProps = {
25
27
  ref,
26
28
  onClick: (e) => {
27
- e.preventDefault(), child.props && typeof child.props.onClick == "function" && child.props.onClick(e), linkAction(hrefString, { replace, scroll, shallow, prefetch, locale });
29
+ child.props && typeof child.props.onClick == "function" && child.props.onClick(e), navigate(e);
28
30
  },
29
31
  ...rest
30
32
  };
@@ -34,7 +36,11 @@ var linkAction = fn().mockName("next/link::Link"), MockLink = React.forwardRef(f
34
36
  });
35
37
  MockLink.displayName = "NextLink";
36
38
  var link_default = MockLink;
39
+ var useLinkStatus = fn(() => ({ pending: !1 })).mockName(
40
+ "next/link::useLinkStatus"
41
+ );
37
42
  export {
38
43
  MockLink as Link,
39
- link_default as default
44
+ link_default as default,
45
+ useLinkStatus
40
46
  };
@@ -1,4 +1,4 @@
1
- import "../../_browser-chunks/chunk-A242L54C.js";
1
+ import "../../_browser-chunks/chunk-IMSF75WX.js";
2
2
 
3
3
  // src/export-mocks/navigation/index.ts
4
4
  import { NextjsRouterMocksNotAvailable } from "storybook/internal/preview-errors";
@@ -1,4 +1,4 @@
1
- import "../../_browser-chunks/chunk-A242L54C.js";
1
+ import "../../_browser-chunks/chunk-IMSF75WX.js";
2
2
 
3
3
  // src/export-mocks/router/index.ts
4
4
  import { NextjsRouterMocksNotAvailable } from "storybook/internal/preview-errors";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,4 +1,4 @@
1
- import "./_browser-chunks/chunk-A242L54C.js";
1
+ import "./_browser-chunks/chunk-IMSF75WX.js";
2
2
 
3
3
  // src/image-context.ts
4
4
  import { createContext } from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  defaultLoader
3
3
  } from "../_browser-chunks/chunk-RDMFII4N.js";
4
- import "../_browser-chunks/chunk-A242L54C.js";
4
+ import "../_browser-chunks/chunk-IMSF75WX.js";
5
5
 
6
6
  // src/images/next-image.tsx
7
7
  import React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  defaultLoader
3
3
  } from "../_browser-chunks/chunk-RDMFII4N.js";
4
- import "../_browser-chunks/chunk-A242L54C.js";
4
+ import "../_browser-chunks/chunk-IMSF75WX.js";
5
5
 
6
6
  // src/images/next-legacy-image.tsx
7
7
  import React from "react";
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  preview_exports
3
- } from "./_browser-chunks/chunk-BFMHNVB2.js";
3
+ } from "./_browser-chunks/chunk-MPD4I4WS.js";
4
4
  import {
5
5
  __commonJS,
6
6
  __export,
7
7
  __toESM
8
- } from "./_browser-chunks/chunk-A242L54C.js";
8
+ } from "./_browser-chunks/chunk-IMSF75WX.js";
9
9
 
10
10
  // ../../../node_modules/estraverse/estraverse.js
11
11
  var require_estraverse = __commonJS({
@@ -5968,8 +5968,8 @@ var require_dist = __commonJS({
5968
5968
  var require_react_is_production_min = __commonJS({
5969
5969
  "../../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
5970
5970
  "use strict";
5971
- var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
5972
- u = Symbol.for("react.module.reference");
5971
+ var b = /* @__PURE__ */ Symbol.for("react.element"), c = /* @__PURE__ */ Symbol.for("react.portal"), d = /* @__PURE__ */ Symbol.for("react.fragment"), e = /* @__PURE__ */ Symbol.for("react.strict_mode"), f = /* @__PURE__ */ Symbol.for("react.profiler"), g = /* @__PURE__ */ Symbol.for("react.provider"), h = /* @__PURE__ */ Symbol.for("react.context"), k = /* @__PURE__ */ Symbol.for("react.server_context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), m = /* @__PURE__ */ Symbol.for("react.suspense"), n = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), q = /* @__PURE__ */ Symbol.for("react.lazy"), t = /* @__PURE__ */ Symbol.for("react.offscreen"), u;
5972
+ u = /* @__PURE__ */ Symbol.for("react.module.reference");
5973
5973
  function v(a) {
5974
5974
  if (typeof a == "object" && a !== null) {
5975
5975
  var r = a.$$typeof;
@@ -6067,8 +6067,8 @@ var require_react_is_development = __commonJS({
6067
6067
  "use strict";
6068
6068
  process.env.NODE_ENV !== "production" && (function() {
6069
6069
  "use strict";
6070
- var enableScopeAPI = !1, enableCacheElement = !1, enableTransitionTracing = !1, enableLegacyHidden = !1, enableDebugTracing = !1, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), REACT_MODULE_REFERENCE;
6071
- REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
6070
+ var enableScopeAPI = !1, enableCacheElement = !1, enableTransitionTracing = !1, enableLegacyHidden = !1, enableDebugTracing = !1, REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_SERVER_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.server_context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen"), REACT_MODULE_REFERENCE;
6071
+ REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
6072
6072
  function isValidElementType(type) {
6073
6073
  return !!(typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
6074
6074
  // types supported by any Flight configuration anywhere since
@@ -6309,7 +6309,7 @@ async function renderToCanvas({
6309
6309
  showException,
6310
6310
  forceRemount
6311
6311
  }, canvasElement) {
6312
- let { renderElement, unmountElement } = await import("./_browser-chunks/react-18-J5XOSXHX.js"), Story = unboundStoryFn, content = storyContext.parameters.__isPortableStory ? React3.createElement(Story, { ...storyContext }) : React3.createElement(ErrorBoundary, { key: storyContext.id, showMain, showException }, React3.createElement(Story, { ...storyContext })), element = Wrapper ? React3.createElement(Wrapper, null, content) : content;
6312
+ let { renderElement, unmountElement } = await import("./_browser-chunks/react-18-V22CCOOF.js"), Story = unboundStoryFn, content = storyContext.parameters.__isPortableStory ? React3.createElement(Story, { ...storyContext }) : React3.createElement(ErrorBoundary, { key: storyContext.id, showMain, showException }, React3.createElement(Story, { ...storyContext })), element = Wrapper ? React3.createElement(Wrapper, null, content) : content;
6313
6313
  forceRemount && unmountElement(canvasElement);
6314
6314
  let act = await getAct({ disableAct: storyContext.viewMode === "docs" });
6315
6315
  return await new Promise(async (resolve, reject) => {
@@ -6411,7 +6411,7 @@ import {
6411
6411
  } from "storybook/internal/docs-tools";
6412
6412
 
6413
6413
  // ../../renderers/react/src/docs/lib/componentTypes.ts
6414
- var isMemo = (component) => component.$$typeof === Symbol.for("react.memo");
6414
+ var isMemo = (component) => component.$$typeof === /* @__PURE__ */ Symbol.for("react.memo");
6415
6415
 
6416
6416
  // ../../renderers/react/src/docs/lib/defaultValues/createDefaultValue.ts
6417
6417
  import {
@@ -6854,14 +6854,9 @@ function parse(value) {
6854
6854
  };
6855
6855
  if (ast.body[0] != null) {
6856
6856
  let rootNode = ast.body[0];
6857
- switch (rootNode.type) {
6858
- case "ExpressionStatement": {
6859
- let expressionResult = parseExpression(rootNode.expression);
6860
- expressionResult != null && (parsingResult = expressionResult);
6861
- break;
6862
- }
6863
- default:
6864
- break;
6857
+ if (rootNode.type === "ExpressionStatement") {
6858
+ let expressionResult = parseExpression(rootNode.expression);
6859
+ expressionResult != null && (parsingResult = expressionResult);
6865
6860
  }
6866
6861
  }
6867
6862
  return parsingResult;
@@ -7232,7 +7227,7 @@ var defaultFunctionValue = inlineFunction, formatFunction = (function(fn, option
7232
7227
  var usedValue = hasValue ? value : defaultValue, useBooleanShorthandSyntax = options.useBooleanShorthandSyntax, tabStop = options.tabStop, formattedPropValue = formatPropValue(usedValue, inline, lvl, options), attributeFormattedInline = " ", attributeFormattedMultiline = `
7233
7228
  `.concat(spacer(lvl + 1, tabStop)), isMultilineAttribute = formattedPropValue.includes(`
7234
7229
  `);
7235
- return useBooleanShorthandSyntax && formattedPropValue === "{false}" && !hasDefaultValue ? (attributeFormattedInline = "", attributeFormattedMultiline = "") : useBooleanShorthandSyntax && formattedPropValue === "{true}" ? (attributeFormattedInline += "".concat(name), attributeFormattedMultiline += "".concat(name)) : (attributeFormattedInline += "".concat(name, "=").concat(formattedPropValue), attributeFormattedMultiline += "".concat(name, "=").concat(formattedPropValue)), {
7230
+ return useBooleanShorthandSyntax && formattedPropValue === "{true}" ? (attributeFormattedInline += "".concat(name), attributeFormattedMultiline += "".concat(name)) : (attributeFormattedInline += "".concat(name, "=").concat(formattedPropValue), attributeFormattedMultiline += "".concat(name, "=").concat(formattedPropValue)), {
7236
7231
  attributeFormattedInline,
7237
7232
  attributeFormattedMultiline,
7238
7233
  isMultilineAttribute
@@ -1,4 +1,4 @@
1
- import "./_browser-chunks/chunk-A242L54C.js";
1
+ import "./_browser-chunks/chunk-IMSF75WX.js";
2
2
 
3
3
  // src/next-image-loader-stub.ts
4
4
  import { imageSize } from "image-size";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.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 CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,8 +13,8 @@ import {
13
13
  addScopedAlias,
14
14
  isNextVersionGte,
15
15
  resolveNextConfig
16
- } from "./_node-chunks/chunk-XJDHF6KT.js";
17
- import "./_node-chunks/chunk-KCPX7OD3.js";
16
+ } from "./_node-chunks/chunk-7OHDSEPO.js";
17
+ import "./_node-chunks/chunk-7FPDB22V.js";
18
18
 
19
19
  // src/preset.ts
20
20
  import { existsSync } from "node:fs";
@@ -243,7 +243,6 @@ var preset_default = (api, options = {}) => {
243
243
  // In production/development this option is set to `false` so that webpack can handle import/export with tree-shaking
244
244
  modules: "auto",
245
245
  exclude: ["transform-typeof-symbol"],
246
- bugfixes: !0,
247
246
  targets: {
248
247
  chrome: 100,
249
248
  safari: 15,
@@ -251,7 +250,7 @@ var preset_default = (api, options = {}) => {
251
250
  },
252
251
  ...options["preset-env"]
253
252
  };
254
- return (isServer || isTest) && (!presetEnvConfig.targets || !(typeof presetEnvConfig.targets == "object" && "node" in presetEnvConfig.targets)) && (presetEnvConfig.targets = {
253
+ return globalThis?.FEATURES && "babelRemoveBugfixes" in globalThis.FEATURES && globalThis.FEATURES.babelRemoveBugfixes || (presetEnvConfig.bugfixes = !0), (isServer || isTest) && (!presetEnvConfig.targets || !(typeof presetEnvConfig.targets == "object" && "node" in presetEnvConfig.targets)) && (presetEnvConfig.targets = {
255
254
  // Targets the current process' version of Node. This requires apps be
256
255
  // built and deployed on the same version of Node.
257
256
  // This is the same as using "current" but explicit
@@ -511,8 +510,14 @@ var addons = [
511
510
  (preset) => !(isPresetConfigItem(preset) && preset.file?.request === fileURLToPath2(import.meta.resolve("@babel/preset-react")) || isNextBabelConfig(preset))
512
511
  ) ?? [];
513
512
  hasNextBabelConfig ? Array.isArray(hasNextBabelConfig) && hasNextBabelConfig[1] ? presets.push([preset_default, hasNextBabelConfig[1]]) : isPresetConfigItem(hasNextBabelConfig) && hasNextBabelConfig.file?.request === "next/babel" ? presets.push([preset_default, hasNextBabelConfig.options]) : presets.push(preset_default) : presets.push(preset_default);
514
- let plugins = [...options?.plugins ?? [], TransformFontImports];
515
- return {
513
+ let plugins = [...options?.plugins ?? [], TransformFontImports], presetConfig = {
514
+ targets: {
515
+ chrome: 100,
516
+ safari: 15,
517
+ firefox: 91
518
+ }
519
+ };
520
+ return globalThis?.FEATURES && "babelRemoveBugfixes" in globalThis.FEATURES && globalThis.FEATURES.babelRemoveBugfixes || (presetConfig.bugfixes = !0), {
516
521
  ...options,
517
522
  plugins,
518
523
  presets,
@@ -520,25 +525,9 @@ var addons = [
520
525
  configFile: !1,
521
526
  overrides: [
522
527
  ...options?.overrides ?? [],
523
- // We need to re-apply the default storybook babel override from:
524
- // https://github.com/storybookjs/storybook/blob/next/code/core/src/core-server/presets/common-preset.ts
525
- // Because it get lost in the loadPartialConfig call above.
526
- // See https://github.com/storybookjs/storybook/issues/28467
527
528
  {
528
529
  include: /(story|stories)\.[cm]?[jt]sx?$/,
529
- presets: [
530
- [
531
- "next/dist/compiled/babel/preset-env",
532
- {
533
- bugfixes: !0,
534
- targets: {
535
- chrome: 100,
536
- safari: 15,
537
- firefox: 91
538
- }
539
- }
540
- ]
541
- ]
530
+ presets: [["next/dist/compiled/babel/preset-env", presetConfig]]
542
531
  }
543
532
  ]
544
533
  };
@@ -546,7 +535,7 @@ var addons = [
546
535
  let { nextConfigPath } = await options.presets.apply("frameworkOptions"), nextConfig = await configureConfig({
547
536
  baseConfig,
548
537
  nextConfigPath
549
- }), { configureNextFont } = await import("./_node-chunks/configureNextFont-Q7U57PPU.js"), { configureRuntimeNextjsVersionResolution, getNextjsVersion } = await import("./_node-chunks/utils-GL6LQBBS.js"), { configureImports } = await import("./_node-chunks/webpack-HPXWM7JA.js"), { configureCss } = await import("./_node-chunks/webpack-DCDK2V3E.js"), { configureImages } = await import("./_node-chunks/webpack-IHEKGOZT.js"), { configureStyledJsx } = await import("./_node-chunks/webpack-L4DFEH7M.js"), { configureNodePolyfills } = await import("./_node-chunks/webpack-TXPRZDZK.js"), { configureAliases } = await import("./_node-chunks/webpack-RS75RWMA.js"), { configureFastRefresh } = await import("./_node-chunks/webpack-G5XGVYIY.js"), { configureRSC } = await import("./_node-chunks/webpack-A6MSF7GG.js"), { configureSWCLoader } = await import("./_node-chunks/loader-KI6XZBS3.js"), { configureBabelLoader } = await import("./_node-chunks/loader-RIBGYJHW.js"), babelRCPath = join(getProjectRoot(), ".babelrc"), babelConfigPath = join(getProjectRoot(), "babel.config.js"), hasBabelConfig = existsSync(babelRCPath) || existsSync(babelConfigPath), nextjsVersion = getNextjsVersion(), isDevelopment = options.configType !== "PRODUCTION", useSWC = semver.gte(nextjsVersion, "14.0.0") && (nextConfig.experimental?.forceSwcTransforms || !hasBabelConfig);
538
+ }), { configureNextFont } = await import("./_node-chunks/configureNextFont-IC4ZQGZK.js"), { configureRuntimeNextjsVersionResolution, getNextjsVersion } = await import("./_node-chunks/utils-NIV52OTT.js"), { configureImports } = await import("./_node-chunks/webpack-VV7KUFJU.js"), { configureCss } = await import("./_node-chunks/webpack-A6QXQRFS.js"), { configureImages } = await import("./_node-chunks/webpack-SIQZPUH3.js"), { configureStyledJsx } = await import("./_node-chunks/webpack-5CAIZHRV.js"), { configureNodePolyfills } = await import("./_node-chunks/webpack-UKLQ6NGL.js"), { configureAliases } = await import("./_node-chunks/webpack-QJJEFIGN.js"), { configureFastRefresh } = await import("./_node-chunks/webpack-N7AIQMXP.js"), { configureRSC } = await import("./_node-chunks/webpack-VEQT25J3.js"), { configureSWCLoader } = await import("./_node-chunks/loader-PAETBD67.js"), { configureBabelLoader } = await import("./_node-chunks/loader-ICPZXTL3.js"), babelRCPath = join(getProjectRoot(), ".babelrc"), babelConfigPath = join(getProjectRoot(), "babel.config.js"), hasBabelConfig = existsSync(babelRCPath) || existsSync(babelConfigPath), nextjsVersion = getNextjsVersion(), isDevelopment = options.configType !== "PRODUCTION", useSWC = semver.gte(nextjsVersion, "14.0.0") && (nextConfig.experimental?.forceSwcTransforms || !hasBabelConfig);
550
539
  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;
551
540
  };
552
541
  export {
package/dist/preview.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  decorators,
3
3
  loaders,
4
4
  parameters
5
- } from "./_browser-chunks/chunk-BFMHNVB2.js";
6
- import "./_browser-chunks/chunk-A242L54C.js";
5
+ } from "./_browser-chunks/chunk-MPD4I4WS.js";
6
+ import "./_browser-chunks/chunk-IMSF75WX.js";
7
7
  export {
8
8
  decorators,
9
9
  loaders,
@@ -1,4 +1,4 @@
1
- import "../_browser-chunks/chunk-A242L54C.js";
1
+ import "../_browser-chunks/chunk-IMSF75WX.js";
2
2
 
3
3
  // src/rsc/server-only.ts
4
4
  var server_only_default = {};
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_zv47cms2kw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_zv47cms2kw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_zv47cms2kw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_jip6k0ps6c from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_jip6k0ps6c from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_jip6k0ps6c from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_zv47cms2kw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_zv47cms2kw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_zv47cms2kw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_jip6k0ps6c.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_jip6k0ps6c.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_jip6k0ps6c.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -64,7 +64,7 @@ async function loaderTransform(parentTrace, source, inputSourceMap) {
64
64
  // modules.
65
65
  sourceFileName: filename
66
66
  };
67
- return programmaticOptions.env.bugfixes = !0, programmaticOptions.inputSourceMap || delete programmaticOptions.inputSourceMap, this.mode && programmaticOptions.jsc && programmaticOptions.jsc.transform && programmaticOptions.jsc.transform.react && !Object.prototype.hasOwnProperty.call(programmaticOptions.jsc.transform.react, "development") && (programmaticOptions.jsc.transform.react.development = this.mode === "development"), parentTrace.traceChild("next-swc-transform").traceAsyncFn(
67
+ return (!globalThis.FEATURES || !("babelRemoveBugfixes" in globalThis.FEATURES) || !globalThis.FEATURES.babelRemoveBugfixes) && (programmaticOptions.env.bugfixes = !0), programmaticOptions.inputSourceMap || delete programmaticOptions.inputSourceMap, this.mode && programmaticOptions.jsc && programmaticOptions.jsc.transform && programmaticOptions.jsc.transform.react && !Object.prototype.hasOwnProperty.call(programmaticOptions.jsc.transform.react, "development") && (programmaticOptions.jsc.transform.react.development = this.mode === "development"), parentTrace.traceChild("next-swc-transform").traceAsyncFn(
68
68
  () => nextSwcUtils.transform(source, programmaticOptions).then((output) => {
69
69
  if (output.eliminatedPackages && this.eliminatedPackages)
70
70
  for (let pkg of JSON.parse(output.eliminatedPackages))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/nextjs",
3
- "version": "10.5.0-alpha.0",
3
+ "version": "10.5.0-alpha.10",
4
4
  "description": "Storybook for Next.js: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -102,9 +102,9 @@
102
102
  "@babel/preset-typescript": "^7.28.5",
103
103
  "@babel/runtime": "^7.28.4",
104
104
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
105
- "@storybook/builder-webpack5": "10.5.0-alpha.0",
106
- "@storybook/preset-react-webpack": "10.5.0-alpha.0",
107
- "@storybook/react": "10.5.0-alpha.0",
105
+ "@storybook/builder-webpack5": "10.5.0-alpha.10",
106
+ "@storybook/preset-react-webpack": "10.5.0-alpha.10",
107
+ "@storybook/react": "10.5.0-alpha.10",
108
108
  "@types/semver": "^7.7.1",
109
109
  "babel-loader": "^9.1.3",
110
110
  "css-loader": "^6.7.3",
@@ -140,7 +140,7 @@
140
140
  "next": "^14.1.0 || ^15.0.0 || ^16.0.0",
141
141
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
142
142
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
143
- "storybook": "^10.5.0-alpha.0",
143
+ "storybook": "^10.5.0-alpha.10",
144
144
  "webpack": "^5.0.0"
145
145
  },
146
146
  "peerDependenciesMeta": {
@@ -12,7 +12,7 @@ export default {
12
12
  },
13
13
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
14
14
  tags: ['autodocs'],
15
- // More on argTypes: https://storybook.js.org/docs/api/argtypes
15
+ // More on argTypes: https://storybook.js.org/docs/api/arg-types
16
16
  argTypes: {
17
17
  backgroundColor: { control: 'color' },
18
18
  },
@@ -14,7 +14,7 @@ const meta = {
14
14
  },
15
15
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
16
16
  tags: ['autodocs'],
17
- // More on argTypes: https://storybook.js.org/docs/api/argtypes
17
+ // More on argTypes: https://storybook.js.org/docs/api/arg-types
18
18
  argTypes: {
19
19
  backgroundColor: { control: 'color' },
20
20
  },