storybook 10.1.4 → 10.1.6

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 (74) hide show
  1. package/dist/_browser-chunks/{chunk-2XZMBGTA.js → chunk-7S2XPX5M.js} +1 -1
  2. package/dist/_browser-chunks/{chunk-SS2NHR7W.js → chunk-GPBRNGY5.js} +1 -1
  3. package/dist/{_node-chunks/chunk-LJRKMWYC.js → _browser-chunks/chunk-JVRDBUUP.js} +20 -13
  4. package/dist/_browser-chunks/{chunk-GFY5R5EY.js → chunk-V5NV5R37.js} +1 -1
  5. package/dist/_node-chunks/{builder-manager-7ZU5KYAD.js → builder-manager-IP6Y4NMN.js} +13 -12
  6. package/dist/_node-chunks/{camelcase-YSJ5EORN.js → camelcase-GHUGWSTC.js} +7 -7
  7. package/dist/_node-chunks/chunk-2LMXIXHU.js +20 -0
  8. package/dist/_node-chunks/{chunk-MZL4HRPC.js → chunk-32COQDL3.js} +7 -7
  9. package/dist/{_browser-chunks/chunk-FQ7SLVLR.js → _node-chunks/chunk-4E7PJV6F.js} +32 -1
  10. package/dist/_node-chunks/chunk-5AYMJEEI.js +23 -0
  11. package/dist/_node-chunks/{chunk-T5WYRHJT.js → chunk-6IODXQ5I.js} +6 -6
  12. package/dist/_node-chunks/{chunk-S3DQCJWT.js → chunk-6X7LVWWF.js} +9 -9
  13. package/dist/_node-chunks/{chunk-7KESMTGS.js → chunk-7SZ6I5FR.js} +13 -13
  14. package/dist/_node-chunks/{chunk-6KX7N5UF.js → chunk-BV46V7UA.js} +21 -17
  15. package/dist/_node-chunks/{chunk-76KIYDRU.js → chunk-CQ7X72BT.js} +7 -7
  16. package/dist/_node-chunks/{chunk-RZ2YFNVH.js → chunk-FZPYAEAL.js} +7 -7
  17. package/dist/_node-chunks/{chunk-6O3OB2PO.js → chunk-IIIZ5MXT.js} +12 -12
  18. package/dist/_node-chunks/{chunk-N54KYQ6P.js → chunk-IMSWW5XU.js} +7 -7
  19. package/dist/_node-chunks/{chunk-FY6IUM4S.js → chunk-KPTRKV7Y.js} +8 -8
  20. package/dist/_node-chunks/{chunk-QIY6TMKF.js → chunk-LJZQUQY3.js} +7 -7
  21. package/dist/_node-chunks/{chunk-F2RDEFFH.js → chunk-M4UXZ375.js} +7 -7
  22. package/dist/_node-chunks/{chunk-VBZIULNK.js → chunk-MBCK5AH4.js} +6 -6
  23. package/dist/_node-chunks/{chunk-W6O6RFMF.js → chunk-MTQLLXLU.js} +9 -9
  24. package/dist/_node-chunks/{chunk-Q6B5LJGA.js → chunk-MZPY44R3.js} +7 -7
  25. package/dist/_node-chunks/{chunk-DMPGFWI4.js → chunk-NDRJR464.js} +72 -11
  26. package/dist/_node-chunks/{chunk-COZFRL72.js → chunk-OIIAKMWN.js} +7 -7
  27. package/dist/_node-chunks/chunk-PUOD3HAQ.js +18 -0
  28. package/dist/_node-chunks/{chunk-FMYFRXPU.js → chunk-QAHNTAID.js} +6 -6
  29. package/dist/_node-chunks/{chunk-QZJSO2TW.js → chunk-T4NL27CC.js} +21 -20
  30. package/dist/_node-chunks/{chunk-VUIYVJKC.js → chunk-V4R3AYR4.js} +8 -8
  31. package/dist/_node-chunks/{chunk-4X3VTYIW.js → chunk-WIXJW6LA.js} +7 -7
  32. package/dist/_node-chunks/{chunk-J4VC4I2M.js → chunk-YKVDPPMP.js} +6 -6
  33. package/dist/_node-chunks/chunk-ZQTC4IMW.js +61 -0
  34. package/dist/_node-chunks/{chunk-2IIRK2OT.js → chunk-ZZGFJUT5.js} +6 -6
  35. package/dist/_node-chunks/{dist-NF4P7GPD.js → dist-N6JBF72Y.js} +9 -9
  36. package/dist/_node-chunks/{globby-54L4JJRV.js → globby-EBHKFBTA.js} +9 -9
  37. package/dist/_node-chunks/{lib-GX44WIWA.js → lib-VKFW2NW5.js} +7 -7
  38. package/dist/_node-chunks/{mdx-N42X6CFJ-WJFAHXML.js → mdx-N42X6CFJ-GUFWY7P5.js} +8 -8
  39. package/dist/_node-chunks/{p-limit-QB7Q2I4D.js → p-limit-5QMUSCN6.js} +7 -7
  40. package/dist/babel/index.js +10 -10
  41. package/dist/bin/core.js +12 -12
  42. package/dist/bin/dispatcher.js +11 -11
  43. package/dist/bin/loader.js +9 -9
  44. package/dist/cli/index.js +18 -18
  45. package/dist/common/index.js +19 -19
  46. package/dist/components/index.js +10 -4
  47. package/dist/core-events/index.d.ts +4 -2
  48. package/dist/core-events/index.js +4 -2
  49. package/dist/core-server/index.d.ts +68 -1
  50. package/dist/core-server/index.js +33 -33
  51. package/dist/core-server/presets/common-override-preset.js +9 -9
  52. package/dist/core-server/presets/common-preset.js +25 -25
  53. package/dist/csf/index.js +1 -1
  54. package/dist/csf-tools/index.js +9 -9
  55. package/dist/manager/globals-runtime.js +35 -8
  56. package/dist/manager/runtime.js +20 -5
  57. package/dist/manager-api/index.js +4 -4
  58. package/dist/manager-errors.d.ts +24 -0
  59. package/dist/manager-errors.js +2 -2
  60. package/dist/mocking-utils/index.js +8 -8
  61. package/dist/node-logger/index.js +9 -9
  62. package/dist/preview/runtime.js +30 -5
  63. package/dist/preview-api/index.d.ts +67 -68
  64. package/dist/preview-api/index.js +1 -1
  65. package/dist/preview-errors.d.ts +24 -0
  66. package/dist/preview-errors.js +2 -2
  67. package/dist/server-errors.d.ts +59 -3
  68. package/dist/server-errors.js +22 -11
  69. package/dist/telemetry/index.js +23 -23
  70. package/package.json +1 -1
  71. package/dist/_node-chunks/chunk-4FAPWW5I.js +0 -61
  72. package/dist/_node-chunks/chunk-5UYX4ZF6.js +0 -23
  73. package/dist/_node-chunks/chunk-CMI5GRPA.js +0 -18
  74. package/dist/_node-chunks/chunk-GVOXGNOU.js +0 -20
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorybookError
3
- } from "./chunk-FQ7SLVLR.js";
3
+ } from "./chunk-JVRDBUUP.js";
4
4
  import {
5
5
  dedent
6
6
  } from "./chunk-JP7NCOJX.js";
@@ -2232,7 +2232,7 @@ var DocsContext = class {
2232
2232
  }
2233
2233
  resolveModuleExport(moduleExportOrType) {
2234
2234
  let csfFile = this.exportsToCSFFile.get(moduleExportOrType);
2235
- if (csfFile)
2235
+ if (!csfFile && moduleExportOrType && typeof moduleExportOrType == "object" && "default" in moduleExportOrType && (csfFile = this.exportsToCSFFile.get(moduleExportOrType.default)), csfFile)
2236
2236
  return { type: "meta", csfFile };
2237
2237
  let story = this.exportToStory.get(
2238
2238
  isStory3(moduleExportOrType) ? moduleExportOrType.input : moduleExportOrType
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/storybook-error.ts
14
2
  function parseErrorCode({
15
3
  code,
@@ -43,7 +31,26 @@ var StorybookError = class _StorybookError extends Error {
43
31
  * user.
44
32
  */
45
33
  this.isHandledError = !1;
46
- this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name;
34
+ /**
35
+ * A collection of sub errors which relate to a parent error.
36
+ *
37
+ * Sub-errors are used to represent multiple related errors that occurred together. When a
38
+ * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
39
+ * are sent as separate telemetry events. This allows for better error tracking and debugging.
40
+ *
41
+ * @example
42
+ *
43
+ * ```ts
44
+ * const error1 = new SomeError();
45
+ * const error2 = new AnotherError();
46
+ * const parentError = new ParentError({
47
+ * // ... other props
48
+ * subErrors: [error1, error2],
49
+ * });
50
+ * ```
51
+ */
52
+ this.subErrors = [];
53
+ this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name, this.subErrors = props.subErrors ?? [];
47
54
  }
48
55
  get fullErrorCode() {
49
56
  return parseErrorCode({ code: this.code, category: this.category });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorybookError
3
- } from "./chunk-FQ7SLVLR.js";
3
+ } from "./chunk-JVRDBUUP.js";
4
4
 
5
5
  // src/manager-errors.ts
6
6
  var Category = /* @__PURE__ */ ((Category2) => (Category2.MANAGER_UNCAUGHT = "MANAGER_UNCAUGHT", Category2.MANAGER_UI = "MANAGER_UI", Category2.MANAGER_API = "MANAGER_API", Category2.MANAGER_CLIENT_LOGGER = "MANAGER_CLIENT-LOGGER", Category2.MANAGER_CHANNELS = "MANAGER_CHANNELS", Category2.MANAGER_CORE_EVENTS = "MANAGER_CORE-EVENTS", Category2.MANAGER_ROUTER = "MANAGER_ROUTER", Category2.MANAGER_THEMING = "MANAGER_THEMING", Category2))(Category || {}), ProviderDoesNotExtendBaseProviderError = class extends StorybookError {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,26 +13,26 @@ import {
13
13
  BROWSER_TARGETS,
14
14
  NODE_TARGET,
15
15
  SUPPORTED_FEATURES
16
- } from "./chunk-T5WYRHJT.js";
16
+ } from "./chunk-6IODXQ5I.js";
17
17
  import {
18
18
  require_build
19
- } from "./chunk-COZFRL72.js";
19
+ } from "./chunk-OIIAKMWN.js";
20
20
  import {
21
21
  resolveModulePath,
22
22
  resolvePackageDir
23
- } from "./chunk-Q6B5LJGA.js";
23
+ } from "./chunk-MZPY44R3.js";
24
24
  import {
25
25
  join,
26
26
  parse
27
- } from "./chunk-VBZIULNK.js";
27
+ } from "./chunk-MBCK5AH4.js";
28
28
  import {
29
29
  slash
30
- } from "./chunk-GVOXGNOU.js";
30
+ } from "./chunk-2LMXIXHU.js";
31
31
  import {
32
32
  __commonJS,
33
33
  __require,
34
34
  __toESM
35
- } from "./chunk-J4VC4I2M.js";
35
+ } from "./chunk-YKVDPPMP.js";
36
36
 
37
37
  // ../node_modules/ejs/lib/utils.js
38
38
  var require_utils = __commonJS({
@@ -1153,6 +1153,7 @@ var exports_default = {
1153
1153
  "FORCE_REMOUNT",
1154
1154
  "FORCE_RE_RENDER",
1155
1155
  "GLOBALS_UPDATED",
1156
+ "MANAGER_INERT_ATTRIBUTE_CHANGED",
1156
1157
  "NAVIGATE_URL",
1157
1158
  "OPEN_IN_EDITOR_REQUEST",
1158
1159
  "OPEN_IN_EDITOR_RESPONSE",
@@ -1,15 +1,15 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.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 "./chunk-J4VC4I2M.js";
12
+ import "./chunk-YKVDPPMP.js";
13
13
 
14
14
  // ../node_modules/camelcase/index.js
15
15
  var UPPERCASE = /[\p{Lu}]/u, LOWERCASE = /[\p{Ll}]/u, LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu, IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u, SEPARATORS = /[_.\- ]+/, LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source), SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu"), NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu"), preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
@@ -0,0 +1,20 @@
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+
13
+ // ../node_modules/slash/index.js
14
+ function slash(path) {
15
+ return path.startsWith("\\\\?\\") ? path : path.replace(/\\/g, "/");
16
+ }
17
+
18
+ export {
19
+ slash
20
+ };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.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_yr66iw5gef.createRequire(import.meta.url);
12
12
  import {
13
13
  __commonJS,
14
14
  __require
15
- } from "./chunk-J4VC4I2M.js";
15
+ } from "./chunk-YKVDPPMP.js";
16
16
 
17
17
  // ../node_modules/ms/index.js
18
18
  var require_ms = __commonJS({
@@ -1,3 +1,15 @@
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+
1
13
  // src/storybook-error.ts
2
14
  function parseErrorCode({
3
15
  code,
@@ -31,7 +43,26 @@ var StorybookError = class _StorybookError extends Error {
31
43
  * user.
32
44
  */
33
45
  this.isHandledError = !1;
34
- this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name;
46
+ /**
47
+ * A collection of sub errors which relate to a parent error.
48
+ *
49
+ * Sub-errors are used to represent multiple related errors that occurred together. When a
50
+ * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
51
+ * are sent as separate telemetry events. This allows for better error tracking and debugging.
52
+ *
53
+ * @example
54
+ *
55
+ * ```ts
56
+ * const error1 = new SomeError();
57
+ * const error2 = new AnotherError();
58
+ * const parentError = new ParentError({
59
+ * // ... other props
60
+ * subErrors: [error1, error2],
61
+ * });
62
+ * ```
63
+ */
64
+ this.subErrors = [];
65
+ this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name, this.subErrors = props.subErrors ?? [];
35
66
  }
36
67
  get fullErrorCode() {
37
68
  return parseErrorCode({ code: this.code, category: this.category });
@@ -0,0 +1,23 @@
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.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-ZZGFJUT5.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,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,24 +1,24 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.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
  invariant
14
- } from "./chunk-FMYFRXPU.js";
14
+ } from "./chunk-QAHNTAID.js";
15
15
  import {
16
16
  require_dist
17
- } from "./chunk-76KIYDRU.js";
17
+ } from "./chunk-CQ7X72BT.js";
18
18
  import {
19
19
  __export,
20
20
  __toESM
21
- } from "./chunk-J4VC4I2M.js";
21
+ } from "./chunk-YKVDPPMP.js";
22
22
 
23
23
  // src/cli/globalSettings.ts
24
24
  var import_ts_dedent = __toESM(require_dist(), 1);
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.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-CMI5GRPA.js";
14
+ } from "./chunk-PUOD3HAQ.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-QZJSO2TW.js";
22
+ } from "./chunk-T4NL27CC.js";
23
23
  import {
24
24
  getSessionId,
25
25
  nanoid,
26
26
  set
27
- } from "./chunk-N54KYQ6P.js";
27
+ } from "./chunk-IMSWW5XU.js";
28
28
  import {
29
29
  globalSettings
30
- } from "./chunk-S3DQCJWT.js";
30
+ } from "./chunk-6X7LVWWF.js";
31
31
  import {
32
32
  resolvePackageDir
33
- } from "./chunk-Q6B5LJGA.js";
33
+ } from "./chunk-MZPY44R3.js";
34
34
  import {
35
35
  slash
36
- } from "./chunk-GVOXGNOU.js";
36
+ } from "./chunk-2LMXIXHU.js";
37
37
  import {
38
38
  __commonJS,
39
39
  __toESM
40
- } from "./chunk-J4VC4I2M.js";
40
+ } from "./chunk-YKVDPPMP.js";
41
41
 
42
42
  // ../node_modules/fetch-retry/index.js
43
43
  var require_fetch_retry = __commonJS({
@@ -1,35 +1,35 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.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-COZFRL72.js";
14
+ } from "./chunk-OIIAKMWN.js";
15
15
  import {
16
16
  StorybookError
17
- } from "./chunk-LJRKMWYC.js";
17
+ } from "./chunk-4E7PJV6F.js";
18
18
  import {
19
19
  resolvePackageDir
20
- } from "./chunk-Q6B5LJGA.js";
20
+ } from "./chunk-MZPY44R3.js";
21
21
  import {
22
22
  relative
23
- } from "./chunk-VBZIULNK.js";
23
+ } from "./chunk-MBCK5AH4.js";
24
24
  import {
25
25
  require_dist
26
- } from "./chunk-76KIYDRU.js";
26
+ } from "./chunk-CQ7X72BT.js";
27
27
  import {
28
28
  require_picocolors
29
- } from "./chunk-RZ2YFNVH.js";
29
+ } from "./chunk-FZPYAEAL.js";
30
30
  import {
31
31
  __toESM
32
- } from "./chunk-J4VC4I2M.js";
32
+ } from "./chunk-YKVDPPMP.js";
33
33
 
34
34
  // src/core-server/utils/server-statics.ts
35
35
  import { existsSync, statSync } from "node:fs";
@@ -157,7 +157,7 @@ async function getErrorLevel({
157
157
  let valueFromPrompt = await promptCrashReports();
158
158
  return valueFromPrompt !== void 0 ? valueFromPrompt ? "full" : "error" : "full";
159
159
  }
160
- async function sendTelemetryError(_error, eventType, options, blocking = !0) {
160
+ async function sendTelemetryError(_error, eventType, options, blocking = !0, parent) {
161
161
  try {
162
162
  let errorLevel = "error";
163
163
  try {
@@ -168,7 +168,7 @@ async function sendTelemetryError(_error, eventType, options, blocking = !0) {
168
168
  let precedingUpgrade = await getPrecedingUpgrade(), error = _error, errorHash;
169
169
  "message" in error ? errorHash = error.message ? oneWayHash(error.message) : "EMPTY_MESSAGE" : errorHash = "NO_MESSAGE";
170
170
  let { code, name, category } = error;
171
- await telemetry(
171
+ if (await telemetry(
172
172
  "error",
173
173
  {
174
174
  code,
@@ -180,14 +180,18 @@ async function sendTelemetryError(_error, eventType, options, blocking = !0) {
180
180
  error: errorLevel === "full" ? error : void 0,
181
181
  errorHash,
182
182
  // if we ever end up sending a non-error instance, we'd like to know
183
- isErrorInstance: error instanceof Error
183
+ isErrorInstance: error instanceof Error,
184
+ // Include parent error information if this is a sub-error
185
+ ...parent ? { parent: parent.fullErrorCode } : {}
184
186
  },
185
187
  {
186
188
  immediate: !0,
187
189
  configDir: options.cliOptions.configDir || options.presetOptions?.configDir,
188
190
  enableCrashReports: errorLevel === "full"
189
191
  }
190
- );
192
+ ), error instanceof StorybookError && error.subErrors.length > 0)
193
+ for (let subError of error.subErrors)
194
+ subError instanceof StorybookError && await sendTelemetryError(subError, eventType, options, blocking, error);
191
195
  }
192
196
  } catch {
193
197
  }
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.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-J4VC4I2M.js";
14
+ } from "./chunk-YKVDPPMP.js";
15
15
 
16
16
  // ../node_modules/ts-dedent/dist/index.js
17
17
  var require_dist = __commonJS({
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.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-J4VC4I2M.js";
14
+ } from "./chunk-YKVDPPMP.js";
15
15
 
16
16
  // ../node_modules/picocolors/picocolors.js
17
17
  var require_picocolors = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,27 +13,27 @@ import {
13
13
  any,
14
14
  invariant,
15
15
  up2 as up
16
- } from "./chunk-2IIRK2OT.js";
16
+ } from "./chunk-ZZGFJUT5.js";
17
17
  import {
18
18
  resolvePackageDir
19
- } from "./chunk-Q6B5LJGA.js";
19
+ } from "./chunk-MZPY44R3.js";
20
20
  import {
21
21
  require_dist
22
- } from "./chunk-76KIYDRU.js";
22
+ } from "./chunk-CQ7X72BT.js";
23
23
  import {
24
24
  babelParse,
25
25
  recast,
26
26
  traverse,
27
27
  types
28
- } from "./chunk-W6O6RFMF.js";
28
+ } from "./chunk-MTQLLXLU.js";
29
29
  import {
30
30
  require_picocolors
31
- } from "./chunk-RZ2YFNVH.js";
31
+ } from "./chunk-FZPYAEAL.js";
32
32
  import {
33
33
  __commonJS,
34
34
  __require,
35
35
  __toESM
36
- } from "./chunk-J4VC4I2M.js";
36
+ } from "./chunk-YKVDPPMP.js";
37
37
 
38
38
  // ../node_modules/esprima/dist/esprima.js
39
39
  var require_esprima = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -16,7 +16,7 @@ var operation = Promise.resolve(), setHelper = async (eventType, body) => {
16
16
  let lastEvents = await cache.get("lastEvents") || {};
17
17
  lastEvents[eventType] = { body, timestamp: Date.now() }, await cache.set("lastEvents", lastEvents);
18
18
  }, set = async (eventType, body) => (await operation, operation = setHelper(eventType, body), operation);
19
- var getLastEvents = async () => await cache.get("lastEvents") || {}, upgradeFields = (event) => {
19
+ var getLastEvents = async () => (await operation, await cache.get("lastEvents") || {}), upgradeFields = (event) => {
20
20
  let { body, timestamp } = event;
21
21
  return {
22
22
  timestamp,
@@ -1,20 +1,20 @@
1
- import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module";
1
+ import CJS_COMPAT_NODE_URL_u12tm8drdom from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_u12tm8drdom from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_u12tm8drdom from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_u12tm8drdom.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_u12tm8drdom.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_u12tm8drdom.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_dist
14
- } from "./chunk-76KIYDRU.js";
14
+ } from "./chunk-CQ7X72BT.js";
15
15
  import {
16
16
  __toESM
17
- } from "./chunk-J4VC4I2M.js";
17
+ } from "./chunk-YKVDPPMP.js";
18
18
 
19
19
  // src/csf-tools/CsfFile.ts
20
20
  var import_ts_dedent = __toESM(require_dist(), 1);