storybook 10.2.0-alpha.2 → 10.2.0-alpha.3

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 (63) hide show
  1. package/dist/_browser-chunks/{chunk-MOYJJEXA.js → chunk-Q5RYDXT3.js} +3 -4
  2. package/dist/_node-chunks/{builder-manager-ZK4QXZNX.js → builder-manager-U6SN6ZED.js} +12 -12
  3. package/dist/_node-chunks/{camelcase-QWQG7I72.js → camelcase-GLXVGCEV.js} +7 -7
  4. package/dist/_node-chunks/{chunk-HMFROKHU.js → chunk-2IFACTU4.js} +7 -7
  5. package/dist/_node-chunks/{chunk-TOXVUAH2.js → chunk-4VZME5CV.js} +6 -6
  6. package/dist/_node-chunks/{chunk-OV2CP4VV.js → chunk-5SCVRD6U.js} +6 -6
  7. package/dist/_node-chunks/{chunk-WUKWNPSQ.js → chunk-5ZGZ22PV.js} +9 -9
  8. package/dist/_node-chunks/{chunk-Q5ZQH2OQ.js → chunk-6RXAFKLM.js} +7 -7
  9. package/dist/_node-chunks/chunk-6WHPDWFA.js +61 -0
  10. package/dist/_node-chunks/chunk-B6AJKALV.js +20 -0
  11. package/dist/_node-chunks/{chunk-EXZXVBZO.js → chunk-C2G5ML5F.js} +7 -7
  12. package/dist/_node-chunks/chunk-CFCZ5PKC.js +18 -0
  13. package/dist/_node-chunks/{chunk-NKOHF7TQ.js → chunk-DO56XDMZ.js} +10 -10
  14. package/dist/_node-chunks/{chunk-URBB5EGY.js → chunk-E6CKDKNL.js} +7 -7
  15. package/dist/_node-chunks/{chunk-QFSK4B7R.js → chunk-H4BZRGVO.js} +8 -8
  16. package/dist/_node-chunks/{chunk-UWJ4BOOL.js → chunk-HGYHQF7Z.js} +9 -9
  17. package/dist/_node-chunks/{chunk-GKEAARBQ.js → chunk-HKTRFCJD.js} +6 -6
  18. package/dist/_node-chunks/{chunk-6OZRMRVO.js → chunk-HYH2IT7K.js} +7 -7
  19. package/dist/_node-chunks/{chunk-2AFVBCGF.js → chunk-IKSK6CEY.js} +6 -6
  20. package/dist/_node-chunks/{chunk-FZFZ5TOM.js → chunk-KP6H4S3L.js} +6 -6
  21. package/dist/_node-chunks/{chunk-I5TOD3AY.js → chunk-LHBDNMEP.js} +12 -12
  22. package/dist/_node-chunks/{chunk-WOS3OQVT.js → chunk-MUWHX7GN.js} +6 -6
  23. package/dist/_node-chunks/{chunk-CW7HJRCY.js → chunk-N3O3HJMU.js} +7 -7
  24. package/dist/_node-chunks/{chunk-KVNLJSAB.js → chunk-NKUDIVPF.js} +7 -7
  25. package/dist/_node-chunks/chunk-O5OIO47U.js +23 -0
  26. package/dist/_node-chunks/{chunk-XFU23B4C.js → chunk-Q27GKV7Y.js} +7 -7
  27. package/dist/_node-chunks/{chunk-DWVHBQGR.js → chunk-Q47IIVLL.js} +8 -8
  28. package/dist/_node-chunks/{chunk-5VZMCPTH.js → chunk-SM7QXYN4.js} +43 -27
  29. package/dist/_node-chunks/{chunk-VJPI73BB.js → chunk-VKFEIIOF.js} +39 -24
  30. package/dist/_node-chunks/{chunk-R2J3OB3H.js → chunk-XYVZIRZC.js} +6 -6
  31. package/dist/_node-chunks/{chunk-RGQC4G3L.js → chunk-YPCGEC3N.js} +13 -13
  32. package/dist/_node-chunks/{dist-UBFMIJZC.js → dist-GGDI7EVD.js} +9 -9
  33. package/dist/_node-chunks/{globby-VD3CGPVI.js → globby-DY2UCDKN.js} +9 -9
  34. package/dist/_node-chunks/{lib-MMJB47J3.js → lib-PFKECSVA.js} +7 -7
  35. package/dist/_node-chunks/{mdx-N42X6CFJ-3J2G7NZZ.js → mdx-N42X6CFJ-OPAAI5WZ.js} +8 -8
  36. package/dist/_node-chunks/{p-limit-SOBWTEVH.js → p-limit-PMYE6ZFC.js} +7 -7
  37. package/dist/babel/index.js +10 -10
  38. package/dist/bin/core.js +24 -18
  39. package/dist/bin/dispatcher.js +11 -11
  40. package/dist/bin/loader.js +9 -9
  41. package/dist/cli/index.js +18 -18
  42. package/dist/common/index.d.ts +25 -18
  43. package/dist/common/index.js +19 -19
  44. package/dist/core-server/index.js +35 -35
  45. package/dist/core-server/presets/common-override-preset.js +9 -9
  46. package/dist/core-server/presets/common-preset.js +25 -25
  47. package/dist/csf-tools/index.js +9 -9
  48. package/dist/instrumenter/index.js +1 -1
  49. package/dist/manager/globals-runtime.js +3102 -3017
  50. package/dist/manager-api/index.js +1 -1
  51. package/dist/mocking-utils/index.js +8 -8
  52. package/dist/node-logger/index.d.ts +1 -1
  53. package/dist/node-logger/index.js +9 -9
  54. package/dist/preview/runtime.js +706 -621
  55. package/dist/server-errors.js +11 -11
  56. package/dist/telemetry/index.js +23 -23
  57. package/dist/test/index.js +370 -286
  58. package/dist/types/index.d.ts +3 -1
  59. package/package.json +1 -1
  60. package/dist/_node-chunks/chunk-CLCLRZYL.js +0 -61
  61. package/dist/_node-chunks/chunk-DF3QP62W.js +0 -18
  62. package/dist/_node-chunks/chunk-EVBCPGQO.js +0 -20
  63. package/dist/_node-chunks/chunk-PCMFKXWQ.js +0 -23
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.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_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.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
  __commonJS
14
- } from "./chunk-TOXVUAH2.js";
14
+ } from "./chunk-4VZME5CV.js";
15
15
 
16
16
  // ../../node_modules/ts-dedent/dist/index.js
17
17
  var require_dist = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
12
12
  import {
13
13
  __commonJS,
14
14
  __toESM
15
- } from "./chunk-TOXVUAH2.js";
15
+ } from "./chunk-4VZME5CV.js";
16
16
 
17
17
  // ../../node_modules/balanced-match/index.js
18
18
  var require_balanced_match = __commonJS({
@@ -0,0 +1,23 @@
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import {
13
+ any
14
+ } from "./chunk-HKTRFCJD.js";
15
+
16
+ // src/cli/detect.ts
17
+ async function detectPnp() {
18
+ return !!any([".pnp.js", ".pnp.cjs"]);
19
+ }
20
+
21
+ export {
22
+ detectPnp
23
+ };
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.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
  __commonJS
14
- } from "./chunk-TOXVUAH2.js";
14
+ } from "./chunk-4VZME5CV.js";
15
15
 
16
16
  // ../../node_modules/picocolors/picocolors.js
17
17
  var require_picocolors = __commonJS({
@@ -1,23 +1,23 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.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
  require_picocolors
14
- } from "./chunk-XFU23B4C.js";
14
+ } from "./chunk-Q27GKV7Y.js";
15
15
  import {
16
16
  __commonJS,
17
17
  __export,
18
18
  __require,
19
19
  __toESM
20
- } from "./chunk-TOXVUAH2.js";
20
+ } from "./chunk-4VZME5CV.js";
21
21
 
22
22
  // ../../node_modules/are-we-there-yet/lib/tracker-base.js
23
23
  var require_tracker_base = __commonJS({
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.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
  version
14
- } from "./chunk-DF3QP62W.js";
14
+ } from "./chunk-CFCZ5PKC.js";
15
15
  import {
16
16
  createFileSystemCache,
17
17
  execa,
@@ -19,25 +19,25 @@ import {
19
19
  getProjectRoot,
20
20
  resolvePathInStorybookCache,
21
21
  up
22
- } from "./chunk-VJPI73BB.js";
22
+ } from "./chunk-VKFEIIOF.js";
23
23
  import {
24
24
  getSessionId,
25
25
  nanoid,
26
26
  set
27
- } from "./chunk-FZFZ5TOM.js";
27
+ } from "./chunk-KP6H4S3L.js";
28
28
  import {
29
29
  globalSettings
30
- } from "./chunk-WUKWNPSQ.js";
30
+ } from "./chunk-5ZGZ22PV.js";
31
31
  import {
32
32
  resolvePackageDir
33
- } from "./chunk-URBB5EGY.js";
33
+ } from "./chunk-E6CKDKNL.js";
34
34
  import {
35
35
  slash
36
- } from "./chunk-EVBCPGQO.js";
36
+ } from "./chunk-B6AJKALV.js";
37
37
  import {
38
38
  __commonJS,
39
39
  __toESM
40
- } from "./chunk-TOXVUAH2.js";
40
+ } from "./chunk-4VZME5CV.js";
41
41
 
42
42
  // ../../node_modules/fetch-retry/index.js
43
43
  var require_fetch_retry = __commonJS({
@@ -76,22 +76,22 @@ var require_fetch_retry = __commonJS({
76
76
  retryOn = init.retryOn;
77
77
  else
78
78
  throw new ArgumentError("retryOn property expects an array or function");
79
- return new Promise(function(resolve, reject) {
79
+ return new Promise(function(resolve2, reject) {
80
80
  var wrappedFetch = function(attempt) {
81
81
  var _input = typeof Request < "u" && input instanceof Request ? input.clone() : input;
82
82
  fetch2(_input, init).then(function(response) {
83
83
  if (Array.isArray(retryOn) && retryOn.indexOf(response.status) === -1)
84
- resolve(response);
84
+ resolve2(response);
85
85
  else if (typeof retryOn == "function")
86
86
  try {
87
87
  return Promise.resolve(retryOn(attempt, null, response)).then(function(retryOnResponse) {
88
- retryOnResponse ? retry2(attempt, null, response) : resolve(response);
88
+ retryOnResponse ? retry2(attempt, null, response) : resolve2(response);
89
89
  }).catch(reject);
90
90
  } catch (error) {
91
91
  reject(error);
92
92
  }
93
93
  else
94
- attempt < retries ? retry2(attempt, null, response) : resolve(response);
94
+ attempt < retries ? retry2(attempt, null, response) : resolve2(response);
95
95
  }).catch(function(error) {
96
96
  if (typeof retryOn == "function")
97
97
  try {
@@ -174,8 +174,10 @@ function sanitizeError(error, pathSeparator = path.sep) {
174
174
  }
175
175
 
176
176
  // src/telemetry/storybook-metadata.ts
177
+ import { createHash } from "node:crypto";
178
+ import { existsSync as existsSync2 } from "node:fs";
177
179
  import { readFile } from "node:fs/promises";
178
- import { dirname } from "node:path";
180
+ import { dirname, resolve } from "node:path";
179
181
  import {
180
182
  getStorybookConfiguration,
181
183
  getStorybookInfo as getStorybookInfo2,
@@ -183,6 +185,7 @@ import {
183
185
  loadMainConfig,
184
186
  versions
185
187
  } from "storybook/internal/common";
188
+ import { getInterpretedFile } from "storybook/internal/common";
186
189
  import { readConfig } from "storybook/internal/csf-tools";
187
190
 
188
191
  // src/telemetry/get-application-file-count.ts
@@ -753,21 +756,34 @@ async function getPackageJsonDetails() {
753
756
  packageJson: {}
754
757
  };
755
758
  }
756
- var cachedMetadata, getStorybookMetadata = async (_configDir) => {
757
- if (cachedMetadata)
758
- return cachedMetadata;
759
+ var metadataCache = /* @__PURE__ */ new Map();
760
+ async function hashMainConfig(configDir) {
761
+ try {
762
+ let mainPath = getInterpretedFile(resolve(configDir, "main"));
763
+ if (!mainPath || !existsSync2(mainPath))
764
+ return "missing";
765
+ let content = await readFile(mainPath);
766
+ return createHash("sha256").update(new Uint8Array(content)).digest("hex");
767
+ } catch {
768
+ return "unknown";
769
+ }
770
+ }
771
+ var getStorybookMetadata = async (_configDir) => {
759
772
  let { packageJson, packageJsonPath } = await getPackageJsonDetails(), configDir = (_configDir || getStorybookConfiguration(
760
773
  String(packageJson?.scripts?.storybook || ""),
761
774
  "-c",
762
775
  "--config-dir"
763
- )) ?? ".storybook", mainConfig = await loadMainConfig({ configDir }).catch(() => {
764
- });
765
- return cachedMetadata = await computeStorybookMetadata({
776
+ )) ?? ".storybook", contentHash = await hashMainConfig(configDir), cacheKey = `${configDir}::${contentHash}`, cached = metadataCache.get(cacheKey);
777
+ if (cached)
778
+ return cached;
779
+ let mainConfig = await loadMainConfig({ configDir }).catch(() => {
780
+ }), computed = await computeStorybookMetadata({
766
781
  mainConfig,
767
782
  packageJson,
768
783
  packageJsonPath,
769
784
  configDir
770
- }), cachedMetadata;
785
+ });
786
+ return metadataCache.set(cacheKey, computed), computed;
771
787
  };
772
788
 
773
789
  // src/telemetry/telemetry.ts
@@ -783,9 +799,9 @@ import { getProjectRoot as getProjectRoot3 } from "storybook/internal/common";
783
799
  import { execSync } from "child_process";
784
800
 
785
801
  // src/telemetry/one-way-hash.ts
786
- import { createHash } from "crypto";
802
+ import { createHash as createHash2 } from "crypto";
787
803
  var oneWayHash = (payload) => {
788
- let hash = createHash("sha256");
804
+ let hash = createHash2("sha256");
789
805
  return hash.update("storybook-telemetry-salt"), hash.update(payload), hash.digest("hex");
790
806
  };
791
807
 
@@ -1,54 +1,54 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.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
  versions_default
14
- } from "./chunk-CLCLRZYL.js";
14
+ } from "./chunk-6WHPDWFA.js";
15
15
  import {
16
16
  require_picomatch
17
- } from "./chunk-HMFROKHU.js";
17
+ } from "./chunk-2IFACTU4.js";
18
18
  import {
19
19
  logger
20
- } from "./chunk-DWVHBQGR.js";
20
+ } from "./chunk-Q47IIVLL.js";
21
21
  import {
22
22
  any,
23
23
  from,
24
24
  invariant,
25
25
  up,
26
26
  up2
27
- } from "./chunk-GKEAARBQ.js";
27
+ } from "./chunk-HKTRFCJD.js";
28
28
  import {
29
29
  importModule,
30
30
  resolveModulePath,
31
31
  resolvePackageDir,
32
32
  safeResolveModule
33
- } from "./chunk-URBB5EGY.js";
33
+ } from "./chunk-E6CKDKNL.js";
34
34
  import {
35
35
  join,
36
36
  parse,
37
37
  resolve
38
- } from "./chunk-OV2CP4VV.js";
38
+ } from "./chunk-5SCVRD6U.js";
39
39
  import {
40
40
  glob,
41
41
  globSync
42
- } from "./chunk-KVNLJSAB.js";
42
+ } from "./chunk-NKUDIVPF.js";
43
43
  import {
44
44
  slash
45
- } from "./chunk-EVBCPGQO.js";
45
+ } from "./chunk-B6AJKALV.js";
46
46
  import {
47
47
  require_dist
48
- } from "./chunk-CW7HJRCY.js";
48
+ } from "./chunk-N3O3HJMU.js";
49
49
  import {
50
50
  require_picocolors
51
- } from "./chunk-XFU23B4C.js";
51
+ } from "./chunk-Q27GKV7Y.js";
52
52
  import {
53
53
  __commonJS,
54
54
  __esm,
@@ -56,7 +56,7 @@ import {
56
56
  __require,
57
57
  __toCommonJS,
58
58
  __toESM
59
- } from "./chunk-TOXVUAH2.js";
59
+ } from "./chunk-4VZME5CV.js";
60
60
 
61
61
  // ../../node_modules/resolve/lib/homedir.js
62
62
  var require_homedir = __commonJS({
@@ -11086,7 +11086,7 @@ function normalizeStoryPath(filename) {
11086
11086
 
11087
11087
  // src/common/utils/envs.ts
11088
11088
  async function loadEnvs(options = {}) {
11089
- let { getEnvironment } = await import("./lib-MMJB47J3.js"), defaultNodeEnv = options.production ? "production" : "development", env2 = {
11089
+ let { getEnvironment } = await import("./lib-PFKECSVA.js"), defaultNodeEnv = options.production ? "production" : "development", env2 = {
11090
11090
  // eslint-disable-next-line @typescript-eslint/dot-notation
11091
11091
  NODE_ENV: process.env.NODE_ENV || defaultNodeEnv,
11092
11092
  NODE_PATH: process.env.NODE_PATH || "",
@@ -12134,10 +12134,25 @@ function satisfies2() {
12134
12134
 
12135
12135
  // src/common/utils/formatter.ts
12136
12136
  async function getPrettier() {
12137
- return import("prettier").catch((e) => ({
12138
- resolveConfig: async () => null,
12139
- format: (content) => content
12140
- }));
12137
+ try {
12138
+ return await import("prettier");
12139
+ } catch {
12140
+ return {
12141
+ AstPath: class {
12142
+ },
12143
+ doc: {},
12144
+ util: {},
12145
+ version: "0.0.0-fallback",
12146
+ resolveConfig: async () => null,
12147
+ format: (content) => Promise.resolve(content),
12148
+ check: () => Promise.resolve(!1),
12149
+ clearConfigCache: () => Promise.resolve(void 0),
12150
+ formatWithCursor: () => Promise.resolve({ formatted: "", cursorOffset: 0 }),
12151
+ getFileInfo: async () => ({ ignored: !1, inferredParser: null }),
12152
+ getSupportInfo: () => Promise.resolve({ languages: [], options: [] }),
12153
+ resolveConfigFile: async () => null
12154
+ };
12155
+ }
12141
12156
  }
12142
12157
  async function formatFileContent(filePath, content) {
12143
12158
  try {
@@ -14737,7 +14752,7 @@ async function scanAndTransformFiles({
14737
14752
  initialValue: defaultGlob
14738
14753
  });
14739
14754
  logger13.log("Scanning for affected files...");
14740
- let globby = (await import("./globby-VD3CGPVI.js")).globby, sourceFiles = await globby([glob2], {
14755
+ let globby = (await import("./globby-DY2UCDKN.js")).globby, sourceFiles = await globby([glob2], {
14741
14756
  ...commonGlobOptions(""),
14742
14757
  ignore: ["**/node_modules/**"],
14743
14758
  dot: !0,
@@ -14758,7 +14773,7 @@ function transformImports(source, renamedImports) {
14758
14773
  return hasChanges ? transformed : null;
14759
14774
  }
14760
14775
  var transformImportFiles = async (files, renamedImports, dryRun) => {
14761
- let errors = [], { default: pLimit } = await import("./p-limit-SOBWTEVH.js"), limit = pLimit(10);
14776
+ let errors = [], { default: pLimit } = await import("./p-limit-PMYE6ZFC.js"), limit = pLimit(10);
14762
14777
  return await Promise.all(
14763
14778
  files.map(
14764
14779
  (file) => limit(async () => {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,35 +1,35 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.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
  require_build
14
- } from "./chunk-Q5ZQH2OQ.js";
14
+ } from "./chunk-6RXAFKLM.js";
15
15
  import {
16
16
  StorybookError
17
- } from "./chunk-WOS3OQVT.js";
17
+ } from "./chunk-MUWHX7GN.js";
18
18
  import {
19
19
  resolvePackageDir
20
- } from "./chunk-URBB5EGY.js";
20
+ } from "./chunk-E6CKDKNL.js";
21
21
  import {
22
22
  relative
23
- } from "./chunk-OV2CP4VV.js";
23
+ } from "./chunk-5SCVRD6U.js";
24
24
  import {
25
25
  require_dist
26
- } from "./chunk-CW7HJRCY.js";
26
+ } from "./chunk-N3O3HJMU.js";
27
27
  import {
28
28
  require_picocolors
29
- } from "./chunk-XFU23B4C.js";
29
+ } from "./chunk-Q27GKV7Y.js";
30
30
  import {
31
31
  __toESM
32
- } from "./chunk-TOXVUAH2.js";
32
+ } from "./chunk-4VZME5CV.js";
33
33
 
34
34
  // src/core-server/utils/server-statics.ts
35
35
  import { existsSync, statSync } from "node:fs";
@@ -1,18 +1,18 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.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
  toEstree
14
- } from "./chunk-EXZXVBZO.js";
15
- import "./chunk-TOXVUAH2.js";
14
+ } from "./chunk-C2G5ML5F.js";
15
+ import "./chunk-4VZME5CV.js";
16
16
 
17
17
  // ../../node_modules/@storybook/docs-mdx/dist/index.js
18
18
  var getAttr = (elt, what) => elt.attributes.find((n) => n.type === "JSXAttribute" && n.name.name === what), getAttrValue = (elt, what) => getAttr(elt, what)?.value, getAttrLiteral = (elt, what) => {
@@ -107,7 +107,7 @@ var getAttr = (elt, what) => elt.attributes.find((n) => n.type === "JSXAttribute
107
107
  isTemplate: !1,
108
108
  metaTags: void 0,
109
109
  imports: void 0
110
- }, { compile } = await import("./mdx-N42X6CFJ-3J2G7NZZ.js");
110
+ }, { compile } = await import("./mdx-N42X6CFJ-OPAAI5WZ.js");
111
111
  await compile(code, {
112
112
  rehypePlugins: [[plugin, store]]
113
113
  });
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,15 +12,15 @@ var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
12
12
  import {
13
13
  require_picomatch,
14
14
  require_utils
15
- } from "./chunk-HMFROKHU.js";
15
+ } from "./chunk-2IFACTU4.js";
16
16
  import {
17
17
  slash
18
- } from "./chunk-EVBCPGQO.js";
18
+ } from "./chunk-B6AJKALV.js";
19
19
  import {
20
20
  __commonJS,
21
21
  __require,
22
22
  __toESM
23
- } from "./chunk-TOXVUAH2.js";
23
+ } from "./chunk-4VZME5CV.js";
24
24
 
25
25
  // ../../node_modules/fast-glob/out/utils/array.js
26
26
  var require_array = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.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
  __commonJS,
14
14
  __require,
15
15
  __toESM
16
- } from "./chunk-TOXVUAH2.js";
16
+ } from "./chunk-4VZME5CV.js";
17
17
 
18
18
  // ../../node_modules/app-root-dir/lib/index.js
19
19
  var require_lib = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_wtqlduo6et from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_wtqlduo6et from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_wtqlduo6et from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2512dr0mzhu from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2512dr0mzhu from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2512dr0mzhu from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_wtqlduo6et.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_wtqlduo6et.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_wtqlduo6et.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2512dr0mzhu.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2512dr0mzhu.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2512dr0mzhu.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -21,8 +21,8 @@ import {
21
21
  position,
22
22
  start,
23
23
  toEstree
24
- } from "./chunk-EXZXVBZO.js";
25
- import "./chunk-TOXVUAH2.js";
24
+ } from "./chunk-C2G5ML5F.js";
25
+ import "./chunk-4VZME5CV.js";
26
26
 
27
27
  // ../../node_modules/@storybook/docs-mdx/dist/mdx-N42X6CFJ.js
28
28
  import { default as default2 } from "path";