@storybook/nextjs 10.0.0-beta.1 → 10.0.0-beta.11

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 (33) hide show
  1. package/dist/_browser-chunks/{chunk-JOMP7DUK.js → chunk-KX5HHFXV.js} +0 -4
  2. package/dist/_node-chunks/chunk-BCCVNT56.js +475 -0
  3. package/dist/_node-chunks/{chunk-254AWWVV.js → chunk-FEGDN3PQ.js} +15 -8
  4. package/dist/_node-chunks/chunk-IM32OH7O.js +17 -0
  5. package/dist/_node-chunks/{chunk-N47GZ6ZF.js → chunk-OCW2HFGT.js} +8 -8
  6. package/dist/_node-chunks/{configureNextFont-YCA4Y2MY.js → configureNextFont-N5UVJAJD.js} +7 -7
  7. package/dist/_node-chunks/{loader-W6JNOWKU.js → loader-TBZPA3RU.js} +9 -9
  8. package/dist/_node-chunks/{loader-BMOR26K7.js → loader-WACLTECU.js} +9 -9
  9. package/dist/_node-chunks/{utils-TOBNY3XG.js → utils-G4YU6ZYA.js} +11 -9
  10. package/dist/_node-chunks/{webpack-7CTFG24J.js → webpack-3WZWANLS.js} +8 -8
  11. package/dist/_node-chunks/{webpack-422IPQRP.js → webpack-4EVPHLSU.js} +7 -7
  12. package/dist/_node-chunks/{webpack-GIA2WMBH.js → webpack-DNSWYKVN.js} +9 -9
  13. package/dist/_node-chunks/{webpack-E2SJEFJM.js → webpack-IZK57VEP.js} +7 -7
  14. package/dist/_node-chunks/webpack-RQFGTJQT.js +26 -0
  15. package/dist/_node-chunks/{webpack-MCDIAAFL.js → webpack-UMWDZ47L.js} +10 -10
  16. package/dist/_node-chunks/{webpack-WWJ5TQDG.js → webpack-W5HKC4C5.js} +7 -7
  17. package/dist/_node-chunks/{webpack-AGJ2TY75.js → webpack-Z6BA3ZGN.js} +7 -7
  18. package/dist/config/preview.js +3 -0
  19. package/dist/export-mocks/index.js +10 -10
  20. package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +7 -7
  21. package/dist/index.js +3845 -3536
  22. package/dist/node/index.js +7 -7
  23. package/dist/preset.js +37 -30
  24. package/dist/preview.d.ts +18 -3
  25. package/dist/preview.js +1 -1
  26. package/dist/swc/next-swc-loader-patch.js +7 -7
  27. package/package.json +6 -5
  28. package/template/cli/js/Button.stories.js +1 -1
  29. package/template/cli/ts/Button.stories.ts +1 -1
  30. package/dist/_node-chunks/chunk-4Q3WLK5D.js +0 -167
  31. package/dist/_node-chunks/chunk-DF7TGUJT.js +0 -17
  32. package/dist/_node-chunks/webpack-UPXNFNSK.js +0 -26
  33. package/dist/preview.d.tsx +0 -18
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_nafzxsaqn from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_nafzxsaqn from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_nafzxsaqn from "node:module";
1
+ import CJS_COMPAT_NODE_URL_smq2coha47 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_smq2coha47 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_smq2coha47 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_nafzxsaqn.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_nafzxsaqn.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_nafzxsaqn.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_smq2coha47.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_smq2coha47.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_smq2coha47.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  __name
14
- } from "../_node-chunks/chunk-DF7TGUJT.js";
14
+ } from "../_node-chunks/chunk-IM32OH7O.js";
15
15
 
16
16
  // src/node/index.ts
17
17
  function defineMain(config) {
package/dist/preset.js CHANGED
@@ -1,22 +1,23 @@
1
- import CJS_COMPAT_NODE_URL_nafzxsaqn from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_nafzxsaqn from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_nafzxsaqn from "node:module";
1
+ import CJS_COMPAT_NODE_URL_smq2coha47 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_smq2coha47 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_smq2coha47 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_nafzxsaqn.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_nafzxsaqn.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_nafzxsaqn.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_smq2coha47.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_smq2coha47.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_smq2coha47.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
+ isNextVersionGte,
14
15
  resolveNextConfig
15
- } from "./_node-chunks/chunk-254AWWVV.js";
16
- import "./_node-chunks/chunk-4Q3WLK5D.js";
16
+ } from "./_node-chunks/chunk-FEGDN3PQ.js";
17
+ import "./_node-chunks/chunk-BCCVNT56.js";
17
18
  import {
18
19
  __name
19
- } from "./_node-chunks/chunk-DF7TGUJT.js";
20
+ } from "./_node-chunks/chunk-IM32OH7O.js";
20
21
 
21
22
  // src/preset.ts
22
23
  import { existsSync } from "node:fs";
@@ -456,6 +457,7 @@ var preset_default = /* @__PURE__ */ __name((api, options = {}) => {
456
457
 
457
458
  // src/config/webpack.ts
458
459
  import { fileURLToPath } from "node:url";
460
+ var isNext16orNewer = isNextVersionGte("16.0.0");
459
461
  var tryResolve = /* @__PURE__ */ __name((path) => {
460
462
  try {
461
463
  return fileURLToPath(import.meta.resolve(path)) || false;
@@ -468,7 +470,9 @@ var configureConfig = /* @__PURE__ */ __name(async ({
468
470
  nextConfigPath
469
471
  }) => {
470
472
  const nextConfig = await resolveNextConfig({ nextConfigPath });
471
- addScopedAlias(baseConfig, "next/config");
473
+ if (!isNext16orNewer) {
474
+ addScopedAlias(baseConfig, "next/config");
475
+ }
472
476
  if (baseConfig.resolve?.alias?.["react-dom"]) {
473
477
  delete baseConfig.resolve.alias?.["react-dom"];
474
478
  }
@@ -491,14 +495,13 @@ var configureConfig = /* @__PURE__ */ __name(async ({
491
495
  return nextConfig;
492
496
  }, "configureConfig");
493
497
  var setupRuntimeConfig = /* @__PURE__ */ __name(async (baseConfig, nextConfig) => {
494
- const definePluginConfig = {
495
- // this mimics what nextjs does client side
496
- // https://github.com/vercel/next.js/blob/57702cb2a9a9dba4b552e0007c16449cf36cfb44/packages/next/client/index.tsx#L101
497
- "process.env.__NEXT_RUNTIME_CONFIG": JSON.stringify({
498
+ const definePluginConfig = {};
499
+ if (!isNext16orNewer) {
500
+ definePluginConfig["process.env.__NEXT_RUNTIME_CONFIG"] = JSON.stringify({
498
501
  serverRuntimeConfig: {},
499
502
  publicRuntimeConfig: nextConfig.publicRuntimeConfig
500
- })
501
- };
503
+ });
504
+ }
502
505
  const newNextLinkBehavior = nextConfig.experimental?.newNextLinkBehavior;
503
506
  definePluginConfig["process.env.__NEXT_NEW_LINK_BEHAVIOR"] = newNextLinkBehavior;
504
507
  baseConfig.plugins?.push(new (await import("webpack")).default.DefinePlugin(definePluginConfig));
@@ -713,8 +716,12 @@ var core = /* @__PURE__ */ __name(async (config, options) => {
713
716
  };
714
717
  }, "core");
715
718
  var previewAnnotations = /* @__PURE__ */ __name((entry = []) => {
716
- const result = [...entry, fileURLToPath2(import.meta.resolve("@storybook/nextjs/preview"))];
717
- return result;
719
+ const annotations = [...entry, fileURLToPath2(import.meta.resolve("@storybook/nextjs/preview"))];
720
+ const isNext16orNewer2 = isNextVersionGte("16.0.0");
721
+ if (!isNext16orNewer2) {
722
+ annotations.push(fileURLToPath2(import.meta.resolve("@storybook/nextjs/config/preview")));
723
+ }
724
+ return annotations;
718
725
  }, "previewAnnotations");
719
726
  var babel = /* @__PURE__ */ __name(async (baseConfig) => {
720
727
  const configPartial = loadPartialConfig({
@@ -779,18 +786,18 @@ var webpackFinal = /* @__PURE__ */ __name(async (baseConfig, options) => {
779
786
  baseConfig,
780
787
  nextConfigPath
781
788
  });
782
- const { configureNextFont } = await import("./_node-chunks/configureNextFont-YCA4Y2MY.js");
783
- const { configureRuntimeNextjsVersionResolution, getNextjsVersion } = await import("./_node-chunks/utils-TOBNY3XG.js");
784
- const { configureImports } = await import("./_node-chunks/webpack-422IPQRP.js");
785
- const { configureCss } = await import("./_node-chunks/webpack-7CTFG24J.js");
786
- const { configureImages } = await import("./_node-chunks/webpack-GIA2WMBH.js");
787
- const { configureStyledJsx } = await import("./_node-chunks/webpack-UPXNFNSK.js");
788
- const { configureNodePolyfills } = await import("./_node-chunks/webpack-WWJ5TQDG.js");
789
- const { configureAliases } = await import("./_node-chunks/webpack-MCDIAAFL.js");
790
- const { configureFastRefresh } = await import("./_node-chunks/webpack-AGJ2TY75.js");
791
- const { configureRSC } = await import("./_node-chunks/webpack-E2SJEFJM.js");
792
- const { configureSWCLoader } = await import("./_node-chunks/loader-BMOR26K7.js");
793
- const { configureBabelLoader } = await import("./_node-chunks/loader-W6JNOWKU.js");
789
+ const { configureNextFont } = await import("./_node-chunks/configureNextFont-N5UVJAJD.js");
790
+ const { configureRuntimeNextjsVersionResolution, getNextjsVersion } = await import("./_node-chunks/utils-G4YU6ZYA.js");
791
+ const { configureImports } = await import("./_node-chunks/webpack-4EVPHLSU.js");
792
+ const { configureCss } = await import("./_node-chunks/webpack-3WZWANLS.js");
793
+ const { configureImages } = await import("./_node-chunks/webpack-DNSWYKVN.js");
794
+ const { configureStyledJsx } = await import("./_node-chunks/webpack-RQFGTJQT.js");
795
+ const { configureNodePolyfills } = await import("./_node-chunks/webpack-W5HKC4C5.js");
796
+ const { configureAliases } = await import("./_node-chunks/webpack-UMWDZ47L.js");
797
+ const { configureFastRefresh } = await import("./_node-chunks/webpack-Z6BA3ZGN.js");
798
+ const { configureRSC } = await import("./_node-chunks/webpack-IZK57VEP.js");
799
+ const { configureSWCLoader } = await import("./_node-chunks/loader-WACLTECU.js");
800
+ const { configureBabelLoader } = await import("./_node-chunks/loader-TBZPA3RU.js");
794
801
  const babelRCPath = join(getProjectRoot(), ".babelrc");
795
802
  const babelConfigPath = join(getProjectRoot(), "babel.config.js");
796
803
  const hasBabelConfig = existsSync(babelRCPath) || existsSync(babelConfigPath);
package/dist/preview.d.ts CHANGED
@@ -1,3 +1,18 @@
1
- // auto generated file from file:///home/runner/work/storybook/storybook/scripts/build/utils/generate-type-mappers.ts, do not edit
2
- export * from '../src/preview.tsx';
3
- export type * from '../src/preview.tsx';
1
+ import { Addon_DecoratorFunction, Addon_LoaderFunction } from 'storybook/internal/types';
2
+
3
+ declare const decorators: Addon_DecoratorFunction<any>[];
4
+ declare const loaders: Addon_LoaderFunction;
5
+ declare const parameters: {
6
+ docs: {
7
+ source: {
8
+ excludeDecorators: boolean;
9
+ };
10
+ };
11
+ react: {
12
+ rootOptions: {
13
+ onCaughtError(error: unknown): void;
14
+ };
15
+ };
16
+ };
17
+
18
+ export { decorators, loaders, parameters };
package/dist/preview.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  decorators,
3
3
  loaders,
4
4
  parameters
5
- } from "./_browser-chunks/chunk-JOMP7DUK.js";
5
+ } from "./_browser-chunks/chunk-KX5HHFXV.js";
6
6
  import "./_browser-chunks/chunk-L5NVL7MD.js";
7
7
  export {
8
8
  decorators,
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_nafzxsaqn from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_nafzxsaqn from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_nafzxsaqn from "node:module";
1
+ import CJS_COMPAT_NODE_URL_smq2coha47 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_smq2coha47 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_smq2coha47 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_nafzxsaqn.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_nafzxsaqn.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_nafzxsaqn.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_smq2coha47.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_smq2coha47.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_smq2coha47.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  __name
14
- } from "../_node-chunks/chunk-DF7TGUJT.js";
14
+ } from "../_node-chunks/chunk-IM32OH7O.js";
15
15
 
16
16
  // src/swc/next-swc-loader-patch.ts
17
17
  import { isAbsolute, relative } from "node:path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/nextjs",
3
- "version": "10.0.0-beta.1",
3
+ "version": "10.0.0-beta.11",
4
4
  "description": "Storybook for Next.js: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -35,6 +35,7 @@
35
35
  "default": "./dist/export-mocks/cache/index.js"
36
36
  },
37
37
  "./compatibility/draft-mode.compat": "./dist/compatibility/draft-mode.compat.js",
38
+ "./config/preview": "./dist/config/preview.js",
38
39
  "./export-mocks": "./dist/export-mocks/index.js",
39
40
  "./headers.mock": {
40
41
  "types": "./dist/export-mocks/headers/index.d.ts",
@@ -93,9 +94,9 @@
93
94
  "@babel/preset-typescript": "^7.24.1",
94
95
  "@babel/runtime": "^7.24.4",
95
96
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
96
- "@storybook/builder-webpack5": "10.0.0-beta.1",
97
- "@storybook/preset-react-webpack": "10.0.0-beta.1",
98
- "@storybook/react": "10.0.0-beta.1",
97
+ "@storybook/builder-webpack5": "10.0.0-beta.11",
98
+ "@storybook/preset-react-webpack": "10.0.0-beta.11",
99
+ "@storybook/react": "10.0.0-beta.11",
99
100
  "@types/semver": "^7.3.4",
100
101
  "babel-loader": "^9.1.3",
101
102
  "css-loader": "^6.7.3",
@@ -129,7 +130,7 @@
129
130
  "next": "^14.1.0 || ^15.0.0",
130
131
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
131
132
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
132
- "storybook": "^10.0.0-beta.1",
133
+ "storybook": "^10.0.0-beta.11",
133
134
  "webpack": "^5.0.0"
134
135
  },
135
136
  "peerDependenciesMeta": {
@@ -16,7 +16,7 @@ export default {
16
16
  argTypes: {
17
17
  backgroundColor: { control: 'color' },
18
18
  },
19
- // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
19
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
20
20
  args: { onClick: fn() },
21
21
  };
22
22
 
@@ -18,7 +18,7 @@ const meta = {
18
18
  argTypes: {
19
19
  backgroundColor: { control: 'color' },
20
20
  },
21
- // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
21
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
22
22
  args: { onClick: fn() },
23
23
  } satisfies Meta<typeof Button>;
24
24
 
@@ -1,167 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_nafzxsaqn from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_nafzxsaqn from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_nafzxsaqn from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_nafzxsaqn.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_nafzxsaqn.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_nafzxsaqn.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- __name
14
- } from "./chunk-DF7TGUJT.js";
15
-
16
- // ../../core/src/shared/utils/module.ts
17
- import { fileURLToPath, pathToFileURL } from "node:url";
18
-
19
- // ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
20
- var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
21
- function normalizeWindowsPath(input = "") {
22
- if (!input) {
23
- return input;
24
- }
25
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
26
- }
27
- __name(normalizeWindowsPath, "normalizeWindowsPath");
28
- var _UNC_REGEX = /^[/\\]{2}/;
29
- var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
30
- var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
31
- var normalize = /* @__PURE__ */ __name(function(path2) {
32
- if (path2.length === 0) {
33
- return ".";
34
- }
35
- path2 = normalizeWindowsPath(path2);
36
- const isUNCPath = path2.match(_UNC_REGEX);
37
- const isPathAbsolute = isAbsolute(path2);
38
- const trailingSeparator = path2[path2.length - 1] === "/";
39
- path2 = normalizeString(path2, !isPathAbsolute);
40
- if (path2.length === 0) {
41
- if (isPathAbsolute) {
42
- return "/";
43
- }
44
- return trailingSeparator ? "./" : ".";
45
- }
46
- if (trailingSeparator) {
47
- path2 += "/";
48
- }
49
- if (_DRIVE_LETTER_RE.test(path2)) {
50
- path2 += "/";
51
- }
52
- if (isUNCPath) {
53
- if (!isPathAbsolute) {
54
- return `//./${path2}`;
55
- }
56
- return `//${path2}`;
57
- }
58
- return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
59
- }, "normalize");
60
- var join = /* @__PURE__ */ __name(function(...arguments_) {
61
- if (arguments_.length === 0) {
62
- return ".";
63
- }
64
- let joined;
65
- for (const argument of arguments_) {
66
- if (argument && argument.length > 0) {
67
- if (joined === void 0) {
68
- joined = argument;
69
- } else {
70
- joined += `/${argument}`;
71
- }
72
- }
73
- }
74
- if (joined === void 0) {
75
- return ".";
76
- }
77
- return normalize(joined.replace(/\/\/+/g, "/"));
78
- }, "join");
79
- function normalizeString(path2, allowAboveRoot) {
80
- let res = "";
81
- let lastSegmentLength = 0;
82
- let lastSlash = -1;
83
- let dots = 0;
84
- let char = null;
85
- for (let index = 0; index <= path2.length; ++index) {
86
- if (index < path2.length) {
87
- char = path2[index];
88
- } else if (char === "/") {
89
- break;
90
- } else {
91
- char = "/";
92
- }
93
- if (char === "/") {
94
- if (lastSlash === index - 1 || dots === 1) ;
95
- else if (dots === 2) {
96
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
97
- if (res.length > 2) {
98
- const lastSlashIndex = res.lastIndexOf("/");
99
- if (lastSlashIndex === -1) {
100
- res = "";
101
- lastSegmentLength = 0;
102
- } else {
103
- res = res.slice(0, lastSlashIndex);
104
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
105
- }
106
- lastSlash = index;
107
- dots = 0;
108
- continue;
109
- } else if (res.length > 0) {
110
- res = "";
111
- lastSegmentLength = 0;
112
- lastSlash = index;
113
- dots = 0;
114
- continue;
115
- }
116
- }
117
- if (allowAboveRoot) {
118
- res += res.length > 0 ? "/.." : "..";
119
- lastSegmentLength = 2;
120
- }
121
- } else {
122
- if (res.length > 0) {
123
- res += `/${path2.slice(lastSlash + 1, index)}`;
124
- } else {
125
- res = path2.slice(lastSlash + 1, index);
126
- }
127
- lastSegmentLength = index - lastSlash - 1;
128
- }
129
- lastSlash = index;
130
- dots = 0;
131
- } else if (char === "." && dots !== -1) {
132
- ++dots;
133
- } else {
134
- dots = -1;
135
- }
136
- }
137
- return res;
138
- }
139
- __name(normalizeString, "normalizeString");
140
- var isAbsolute = /* @__PURE__ */ __name(function(p) {
141
- return _IS_ABSOLUTE_RE.test(p);
142
- }, "isAbsolute");
143
- var dirname = /* @__PURE__ */ __name(function(p) {
144
- const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
145
- if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
146
- segments[0] += "/";
147
- }
148
- return segments.join("/") || (isAbsolute(p) ? "/" : ".");
149
- }, "dirname");
150
-
151
- // ../../core/src/shared/utils/module.ts
152
- var importMetaResolve = /* @__PURE__ */ __name((...args) => {
153
- if (typeof import.meta.resolve !== "function" && process.env.VITEST === "true") {
154
- console.warn(
155
- "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"
156
- );
157
- return pathToFileURL(args[0]).href;
158
- }
159
- return import.meta.resolve(...args);
160
- }, "importMetaResolve");
161
- var resolvePackageDir = /* @__PURE__ */ __name((pkg, parent) => {
162
- return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
163
- }, "resolvePackageDir");
164
-
165
- export {
166
- resolvePackageDir
167
- };
@@ -1,17 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_nafzxsaqn from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_nafzxsaqn from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_nafzxsaqn from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_nafzxsaqn.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_nafzxsaqn.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_nafzxsaqn.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- var __defProp = Object.defineProperty;
13
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
14
-
15
- export {
16
- __name
17
- };
@@ -1,26 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_nafzxsaqn from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_nafzxsaqn from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_nafzxsaqn from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_nafzxsaqn.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_nafzxsaqn.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_nafzxsaqn.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-254AWWVV.js";
15
- import "./chunk-4Q3WLK5D.js";
16
- import {
17
- __name
18
- } from "./chunk-DF7TGUJT.js";
19
-
20
- // src/styledJsx/webpack.ts
21
- var configureStyledJsx = /* @__PURE__ */ __name((baseConfig) => {
22
- addScopedAlias(baseConfig, "styled-jsx");
23
- }, "configureStyledJsx");
24
- export {
25
- configureStyledJsx
26
- };
@@ -1,18 +0,0 @@
1
- import { Addon_DecoratorFunction, Addon_LoaderFunction } from 'storybook/internal/types';
2
-
3
- declare const decorators: Addon_DecoratorFunction<any>[];
4
- declare const loaders: Addon_LoaderFunction;
5
- declare const parameters: {
6
- docs: {
7
- source: {
8
- excludeDecorators: boolean;
9
- };
10
- };
11
- react: {
12
- rootOptions: {
13
- onCaughtError(error: unknown): void;
14
- };
15
- };
16
- };
17
-
18
- export { decorators, loaders, parameters };