@storybook/nextjs 10.1.0-alpha.9 → 10.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/_browser-chunks/{chunk-KX5HHFXV.js → chunk-2SBZPHE7.js} +50 -100
  2. package/dist/_browser-chunks/chunk-RDMFII4N.js +22 -0
  3. package/dist/_browser-chunks/{chunk-L5NVL7MD.js → chunk-SL3VIQZ3.js} +7 -13
  4. package/dist/_browser-chunks/react-18-PYSEDAWB.js +43 -0
  5. package/dist/_node-chunks/chunk-FDQCPWTU.js +76 -0
  6. package/dist/_node-chunks/chunk-FG42E7V6.js +57 -0
  7. package/dist/_node-chunks/chunk-GP2MEE4L.js +211 -0
  8. package/dist/_node-chunks/configureNextFont-C7CJ3HQC.js +28 -0
  9. package/dist/_node-chunks/{loader-7OJQICYP.js → loader-5F2KS4LJ.js} +15 -25
  10. package/dist/_node-chunks/{loader-OFLGZQCU.js → loader-MSHAULDY.js} +11 -16
  11. package/dist/_node-chunks/{utils-NVB3HGRH.js → utils-CTOPCADU.js} +8 -9
  12. package/dist/_node-chunks/webpack-2BV2ZM4Y.js +23 -0
  13. package/dist/_node-chunks/{webpack-E2OB2ZPW.js → webpack-552M7BUF.js} +13 -19
  14. package/dist/_node-chunks/webpack-L7NHDPNJ.js +30 -0
  15. package/dist/_node-chunks/{webpack-VD3FKUZZ.js → webpack-MROJ5SGY.js} +9 -12
  16. package/dist/_node-chunks/webpack-OJMVAOEH.js +24 -0
  17. package/dist/_node-chunks/webpack-UVPHU4VM.js +23 -0
  18. package/dist/_node-chunks/webpack-VOQXZA35.js +60 -0
  19. package/dist/_node-chunks/webpack-WG2HZDLK.js +97 -0
  20. package/dist/compatibility/draft-mode.compat.js +1 -1
  21. package/dist/export-mocks/cache/index.js +3 -6
  22. package/dist/export-mocks/headers/index.js +6 -29
  23. package/dist/export-mocks/index.js +9 -10
  24. package/dist/export-mocks/navigation/index.js +17 -41
  25. package/dist/export-mocks/router/index.d.ts +4 -7
  26. package/dist/export-mocks/router/index.js +20 -54
  27. package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +38 -80
  28. package/dist/image-context.js +1 -1
  29. package/dist/images/next-image.js +5 -11
  30. package/dist/images/next-legacy-image.js +3 -6
  31. package/dist/index.js +2865 -8413
  32. package/dist/next-image-loader-stub.js +9 -16
  33. package/dist/node/index.js +6 -10
  34. package/dist/preset.js +183 -462
  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 +46 -84
  38. package/package.json +6 -6
  39. package/dist/_browser-chunks/chunk-I5RFHXDS.js +0 -40
  40. package/dist/_browser-chunks/react-18-G7Q4PNHD.js +0 -71
  41. package/dist/_node-chunks/chunk-PWZWGY6W.js +0 -17
  42. package/dist/_node-chunks/chunk-UHO3ELD2.js +0 -475
  43. package/dist/_node-chunks/chunk-WR63XCFA.js +0 -74
  44. package/dist/_node-chunks/chunk-X47EC6DB.js +0 -102
  45. package/dist/_node-chunks/configureNextFont-ZL3UHKQ4.js +0 -36
  46. package/dist/_node-chunks/webpack-3J2WBZ2E.js +0 -30
  47. package/dist/_node-chunks/webpack-7PUWUCNJ.js +0 -27
  48. package/dist/_node-chunks/webpack-JVSODHFI.js +0 -38
  49. package/dist/_node-chunks/webpack-O36IRAFL.js +0 -77
  50. package/dist/_node-chunks/webpack-SNP77BVT.js +0 -107
  51. package/dist/_node-chunks/webpack-THQBX5DA.js +0 -26
@@ -1,32 +1,25 @@
1
- import {
2
- __name
3
- } from "./_browser-chunks/chunk-L5NVL7MD.js";
1
+ import "./_browser-chunks/chunk-SL3VIQZ3.js";
4
2
 
5
3
  // src/next-image-loader-stub.ts
6
4
  import { imageSize } from "image-size";
7
5
  import { interpolateName } from "loader-utils";
8
- var nextImageLoaderStub = /* @__PURE__ */ __name(async function NextImageLoader(content) {
9
- const { filename, nextConfig } = this.getOptions();
10
- const opts = {
6
+ var nextImageLoaderStub = async function(content) {
7
+ let { filename, nextConfig } = this.getOptions(), opts = {
11
8
  context: this.rootContext,
12
9
  content
13
- };
14
- const outputPath = interpolateName(this, filename.replace("[ext]", ".[ext]"), opts);
15
- this.emitFile(outputPath, content);
16
- if (nextConfig.images?.disableStaticImages) {
10
+ }, outputPath = interpolateName(this, filename.replace("[ext]", ".[ext]"), opts);
11
+ if (this.emitFile(outputPath, content), nextConfig.images?.disableStaticImages)
17
12
  return `const src = '${outputPath}'; export default src;`;
18
- }
19
- const { width, height } = imageSize(content);
13
+ let { width, height } = imageSize(content);
20
14
  return `export default ${JSON.stringify({
21
15
  src: outputPath,
22
16
  height,
23
17
  width,
24
18
  blurDataURL: outputPath
25
19
  })};`;
26
- }, "NextImageLoader");
27
- nextImageLoaderStub.raw = true;
28
- var next_image_loader_stub_default = nextImageLoaderStub;
29
- var raw = true;
20
+ };
21
+ nextImageLoaderStub.raw = !0;
22
+ var next_image_loader_stub_default = nextImageLoaderStub, raw = !0;
30
23
  export {
31
24
  next_image_loader_stub_default as default,
32
25
  raw
@@ -1,23 +1,19 @@
1
- import CJS_COMPAT_NODE_URL_mt98813ktw from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mt98813ktw from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mt98813ktw from "node:module";
1
+ import CJS_COMPAT_NODE_URL_irqg4lxu6e from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_irqg4lxu6e from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_irqg4lxu6e from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mt98813ktw.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mt98813ktw.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mt98813ktw.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_irqg4lxu6e.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_irqg4lxu6e.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_irqg4lxu6e.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import {
13
- __name
14
- } from "../_node-chunks/chunk-PWZWGY6W.js";
15
12
 
16
13
  // src/node/index.ts
17
14
  function defineMain(config) {
18
15
  return config;
19
16
  }
20
- __name(defineMain, "defineMain");
21
17
  export {
22
18
  defineMain
23
19
  };