storybook 10.1.4 → 10.1.5

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 (69) 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-ZXJBDRXR.js} +12 -12
  6. package/dist/_node-chunks/{camelcase-YSJ5EORN.js → camelcase-WRTIKEO6.js} +7 -7
  7. package/dist/_node-chunks/{chunk-2IIRK2OT.js → chunk-255LKCUD.js} +6 -6
  8. package/dist/_node-chunks/chunk-3GJDB3VJ.js +18 -0
  9. package/dist/_node-chunks/{chunk-W6O6RFMF.js → chunk-3N5PBWO5.js} +9 -9
  10. package/dist/_node-chunks/{chunk-F2RDEFFH.js → chunk-52EAUB7R.js} +7 -7
  11. package/dist/_node-chunks/{chunk-RZ2YFNVH.js → chunk-56BVIMJO.js} +7 -7
  12. package/dist/_node-chunks/{chunk-COZFRL72.js → chunk-5H7WLGZC.js} +7 -7
  13. package/dist/_node-chunks/{chunk-7KESMTGS.js → chunk-AJ7QOTOZ.js} +13 -13
  14. package/dist/{_browser-chunks/chunk-FQ7SLVLR.js → _node-chunks/chunk-B2EXFXPG.js} +32 -1
  15. package/dist/_node-chunks/{chunk-MZL4HRPC.js → chunk-C3CWELCD.js} +7 -7
  16. package/dist/_node-chunks/{chunk-VBZIULNK.js → chunk-CUUCEXYW.js} +6 -6
  17. package/dist/_node-chunks/chunk-EBMWZDZG.js +23 -0
  18. package/dist/_node-chunks/{chunk-DMPGFWI4.js → chunk-FCQVKOY4.js} +72 -11
  19. package/dist/_node-chunks/{chunk-VUIYVJKC.js → chunk-FD76ZM2X.js} +8 -8
  20. package/dist/_node-chunks/{chunk-FMYFRXPU.js → chunk-GJ5FSAL5.js} +6 -6
  21. package/dist/_node-chunks/{chunk-N54KYQ6P.js → chunk-GUCJOBT7.js} +6 -6
  22. package/dist/_node-chunks/{chunk-QIY6TMKF.js → chunk-HNDTWAF5.js} +7 -7
  23. package/dist/_node-chunks/{chunk-S3DQCJWT.js → chunk-ITMM32VP.js} +9 -9
  24. package/dist/_node-chunks/{chunk-T5WYRHJT.js → chunk-KYHFIXVV.js} +6 -6
  25. package/dist/_node-chunks/{chunk-6O3OB2PO.js → chunk-PL7KUITS.js} +12 -12
  26. package/dist/_node-chunks/{chunk-76KIYDRU.js → chunk-QCZPELNP.js} +7 -7
  27. package/dist/_node-chunks/{chunk-QZJSO2TW.js → chunk-RZ3SV46Y.js} +21 -20
  28. package/dist/_node-chunks/{chunk-Q6B5LJGA.js → chunk-SNGQFKE7.js} +7 -7
  29. package/dist/_node-chunks/{chunk-6KX7N5UF.js → chunk-VGBOM5PD.js} +21 -17
  30. package/dist/_node-chunks/chunk-VRODUWUT.js +61 -0
  31. package/dist/_node-chunks/chunk-WUVM2V22.js +20 -0
  32. package/dist/_node-chunks/{chunk-J4VC4I2M.js → chunk-WYREEMWZ.js} +6 -6
  33. package/dist/_node-chunks/{chunk-4X3VTYIW.js → chunk-XPWMJEXT.js} +7 -7
  34. package/dist/_node-chunks/{chunk-FY6IUM4S.js → chunk-ZIG3SZMN.js} +8 -8
  35. package/dist/_node-chunks/{dist-NF4P7GPD.js → dist-XHCP6OFU.js} +9 -9
  36. package/dist/_node-chunks/{globby-54L4JJRV.js → globby-YHL6UTMA.js} +9 -9
  37. package/dist/_node-chunks/{lib-GX44WIWA.js → lib-RWWG7TOS.js} +7 -7
  38. package/dist/_node-chunks/{mdx-N42X6CFJ-WJFAHXML.js → mdx-N42X6CFJ-ZALEYAPJ.js} +8 -8
  39. package/dist/_node-chunks/{p-limit-QB7Q2I4D.js → p-limit-LLBQLQ7I.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/core-server/index.d.ts +68 -1
  47. package/dist/core-server/index.js +33 -33
  48. package/dist/core-server/presets/common-override-preset.js +9 -9
  49. package/dist/core-server/presets/common-preset.js +25 -25
  50. package/dist/csf/index.js +1 -1
  51. package/dist/csf-tools/index.js +9 -9
  52. package/dist/manager/globals-runtime.js +21 -2
  53. package/dist/manager-api/index.js +4 -4
  54. package/dist/manager-errors.d.ts +24 -0
  55. package/dist/manager-errors.js +2 -2
  56. package/dist/mocking-utils/index.js +8 -8
  57. package/dist/node-logger/index.js +9 -9
  58. package/dist/preview/runtime.js +21 -2
  59. package/dist/preview-api/index.js +1 -1
  60. package/dist/preview-errors.d.ts +24 -0
  61. package/dist/preview-errors.js +2 -2
  62. package/dist/server-errors.d.ts +59 -3
  63. package/dist/server-errors.js +22 -11
  64. package/dist/telemetry/index.js +23 -23
  65. package/package.json +1 -1
  66. package/dist/_node-chunks/chunk-4FAPWW5I.js +0 -61
  67. package/dist/_node-chunks/chunk-5UYX4ZF6.js +0 -23
  68. package/dist/_node-chunks/chunk-CMI5GRPA.js +0 -18
  69. package/dist/_node-chunks/chunk-GVOXGNOU.js +0 -20
@@ -1,57 +1,57 @@
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_16w7d0j2rs7 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 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_16w7d0j2rs7.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.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 "../../_node-chunks/chunk-6O3OB2PO.js";
12
+ import "../../_node-chunks/chunk-PL7KUITS.js";
13
13
  import {
14
14
  parseStaticDir,
15
15
  sendTelemetryError,
16
16
  throttle
17
- } from "../../_node-chunks/chunk-6KX7N5UF.js";
18
- import "../../_node-chunks/chunk-COZFRL72.js";
19
- import "../../_node-chunks/chunk-5UYX4ZF6.js";
20
- import "../../_node-chunks/chunk-LJRKMWYC.js";
17
+ } from "../../_node-chunks/chunk-VGBOM5PD.js";
18
+ import "../../_node-chunks/chunk-5H7WLGZC.js";
19
+ import "../../_node-chunks/chunk-EBMWZDZG.js";
20
+ import "../../_node-chunks/chunk-B2EXFXPG.js";
21
21
  import {
22
22
  getLastEvents,
23
23
  getSessionId
24
- } from "../../_node-chunks/chunk-N54KYQ6P.js";
24
+ } from "../../_node-chunks/chunk-GUCJOBT7.js";
25
25
  import {
26
26
  globalSettings
27
- } from "../../_node-chunks/chunk-S3DQCJWT.js";
27
+ } from "../../_node-chunks/chunk-ITMM32VP.js";
28
28
  import {
29
29
  invariant
30
- } from "../../_node-chunks/chunk-2IIRK2OT.js";
30
+ } from "../../_node-chunks/chunk-255LKCUD.js";
31
31
  import {
32
32
  resolvePackageDir
33
- } from "../../_node-chunks/chunk-Q6B5LJGA.js";
34
- import "../../_node-chunks/chunk-FMYFRXPU.js";
33
+ } from "../../_node-chunks/chunk-SNGQFKE7.js";
34
+ import "../../_node-chunks/chunk-GJ5FSAL5.js";
35
35
  import {
36
36
  isAbsolute,
37
37
  join
38
- } from "../../_node-chunks/chunk-VBZIULNK.js";
38
+ } from "../../_node-chunks/chunk-CUUCEXYW.js";
39
39
  import {
40
40
  loadConfig
41
- } from "../../_node-chunks/chunk-FY6IUM4S.js";
41
+ } from "../../_node-chunks/chunk-ZIG3SZMN.js";
42
42
  import {
43
43
  require_dist
44
- } from "../../_node-chunks/chunk-76KIYDRU.js";
45
- import "../../_node-chunks/chunk-W6O6RFMF.js";
46
- import "../../_node-chunks/chunk-MZL4HRPC.js";
44
+ } from "../../_node-chunks/chunk-QCZPELNP.js";
45
+ import "../../_node-chunks/chunk-3N5PBWO5.js";
46
+ import "../../_node-chunks/chunk-C3CWELCD.js";
47
47
  import {
48
48
  require_picocolors
49
- } from "../../_node-chunks/chunk-RZ2YFNVH.js";
49
+ } from "../../_node-chunks/chunk-56BVIMJO.js";
50
50
  import {
51
51
  __commonJS,
52
52
  __require,
53
53
  __toESM
54
- } from "../../_node-chunks/chunk-J4VC4I2M.js";
54
+ } from "../../_node-chunks/chunk-WYREEMWZ.js";
55
55
 
56
56
  // ../node_modules/shell-quote/quote.js
57
57
  var require_quote = __commonJS({
@@ -518,7 +518,7 @@ import { isCsfFactoryPreview } from "storybook/internal/csf-tools";
518
518
  var import_ts_dedent = __toESM(require_dist(), 1);
519
519
 
520
520
  // src/core-server/utils/get-component-variable-name.ts
521
- var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-YSJ5EORN.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
521
+ var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-WRTIKEO6.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
522
522
 
523
523
  // src/core-server/utils/new-story-templates/csf-factory-template.ts
524
524
  async function getCsfFactoryTemplateForNewStoryFile(data) {
@@ -783,7 +783,7 @@ async function searchFiles({
783
783
  ignoredFiles = IGNORED_FILES,
784
784
  fileExtensions = FILE_EXTENSIONS
785
785
  }) {
786
- let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-54L4JJRV.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
786
+ let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-YHL6UTMA.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
787
787
  `**/*${searchQuery}*.${fileExtensionsPattern}`,
788
788
  `**/*${searchQuery}*/**/*.${fileExtensionsPattern}`
789
789
  ];
package/dist/csf/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  mountDestructured,
11
11
  normalizeArrays,
12
12
  normalizeProjectAnnotations
13
- } from "../_browser-chunks/chunk-SS2NHR7W.js";
13
+ } from "../_browser-chunks/chunk-GPBRNGY5.js";
14
14
  import "../_browser-chunks/chunk-IPA5A322.js";
15
15
  import "../_browser-chunks/chunk-3OXGAGBE.js";
16
16
  import {
@@ -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_16w7d0j2rs7 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 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_16w7d0j2rs7.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -38,9 +38,9 @@ import {
38
38
  vitestTransform,
39
39
  writeConfig,
40
40
  writeCsf
41
- } from "../_node-chunks/chunk-FY6IUM4S.js";
42
- import "../_node-chunks/chunk-76KIYDRU.js";
43
- import "../_node-chunks/chunk-J4VC4I2M.js";
41
+ } from "../_node-chunks/chunk-ZIG3SZMN.js";
42
+ import "../_node-chunks/chunk-QCZPELNP.js";
43
+ import "../_node-chunks/chunk-WYREEMWZ.js";
44
44
  export {
45
45
  BadMetaError,
46
46
  ConfigFile,
@@ -39224,7 +39224,26 @@ var StorybookError = class _StorybookError extends Error {
39224
39224
  * user.
39225
39225
  */
39226
39226
  this.isHandledError = !1;
39227
- this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name;
39227
+ /**
39228
+ * A collection of sub errors which relate to a parent error.
39229
+ *
39230
+ * Sub-errors are used to represent multiple related errors that occurred together. When a
39231
+ * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
39232
+ * are sent as separate telemetry events. This allows for better error tracking and debugging.
39233
+ *
39234
+ * @example
39235
+ *
39236
+ * ```ts
39237
+ * const error1 = new SomeError();
39238
+ * const error2 = new AnotherError();
39239
+ * const parentError = new ParentError({
39240
+ * // ... other props
39241
+ * subErrors: [error1, error2],
39242
+ * });
39243
+ * ```
39244
+ */
39245
+ this.subErrors = [];
39246
+ 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 ?? [];
39228
39247
  }
39229
39248
  get fullErrorCode() {
39230
39249
  return parseErrorCode({ code: this.code, category: this.category });
@@ -59891,7 +59910,7 @@ init_dist();
59891
59910
  var import_memoizerific8 = __toESM(require_memoizerific(), 1), import_semver = __toESM(require_semver2(), 1);
59892
59911
 
59893
59912
  // src/manager-api/version.ts
59894
- var version = "10.1.4";
59913
+ var version = "10.1.5";
59895
59914
 
59896
59915
  // src/manager-api/modules/versions.ts
59897
59916
  var { VERSIONCHECK } = scope, getVersionCheckData = (0, import_memoizerific8.default)(1)(() => {
@@ -5,13 +5,13 @@ import {
5
5
  } from "../_browser-chunks/chunk-UD6FQLAF.js";
6
6
  import {
7
7
  StatusTypeIdMismatchError
8
- } from "../_browser-chunks/chunk-GFY5R5EY.js";
8
+ } from "../_browser-chunks/chunk-V5NV5R37.js";
9
9
  import {
10
10
  StatusTypeIdMismatchError as StatusTypeIdMismatchError2
11
- } from "../_browser-chunks/chunk-2XZMBGTA.js";
11
+ } from "../_browser-chunks/chunk-7S2XPX5M.js";
12
12
  import {
13
13
  StorybookError
14
- } from "../_browser-chunks/chunk-FQ7SLVLR.js";
14
+ } from "../_browser-chunks/chunk-JVRDBUUP.js";
15
15
  import {
16
16
  countBy,
17
17
  dequal,
@@ -2329,7 +2329,7 @@ import { global as global8 } from "@storybook/global";
2329
2329
  import semver from "semver";
2330
2330
 
2331
2331
  // src/manager-api/version.ts
2332
- var version = "10.1.4";
2332
+ var version = "10.1.5";
2333
2333
 
2334
2334
  // src/manager-api/modules/versions.ts
2335
2335
  var { VERSIONCHECK } = global8, getVersionCheckData = (0, import_memoizerific2.default)(1)(() => {
@@ -570,6 +570,25 @@ declare abstract class StorybookError extends Error {
570
570
  /** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
571
571
  get name(): string;
572
572
  set name(name: string);
573
+ /**
574
+ * A collection of sub errors which relate to a parent error.
575
+ *
576
+ * Sub-errors are used to represent multiple related errors that occurred together. When a
577
+ * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
578
+ * are sent as separate telemetry events. This allows for better error tracking and debugging.
579
+ *
580
+ * @example
581
+ *
582
+ * ```ts
583
+ * const error1 = new SomeError();
584
+ * const error2 = new AnotherError();
585
+ * const parentError = new ParentError({
586
+ * // ... other props
587
+ * subErrors: [error1, error2],
588
+ * });
589
+ * ```
590
+ */
591
+ subErrors: StorybookError[];
573
592
  constructor(props: {
574
593
  category: string;
575
594
  code: number;
@@ -577,6 +596,11 @@ declare abstract class StorybookError extends Error {
577
596
  documentation?: boolean | string | string[];
578
597
  isHandledError?: boolean;
579
598
  name: string;
599
+ /**
600
+ * Optional array of sub-errors that are related to this error. When this error is sent to
601
+ * telemetry, each sub-error will be sent as a separate event.
602
+ */
603
+ subErrors?: StorybookError[];
580
604
  });
581
605
  /** Generates the error message along with additional documentation link (if applicable). */
582
606
  static getFullMessage({ documentation, code, category, message, }: ConstructorParameters<typeof StorybookError>[0]): string;
@@ -3,8 +3,8 @@ import {
3
3
  ProviderDoesNotExtendBaseProviderError,
4
4
  StatusTypeIdMismatchError,
5
5
  UncaughtManagerError
6
- } from "./_browser-chunks/chunk-GFY5R5EY.js";
7
- import "./_browser-chunks/chunk-FQ7SLVLR.js";
6
+ } from "./_browser-chunks/chunk-V5NV5R37.js";
7
+ import "./_browser-chunks/chunk-JVRDBUUP.js";
8
8
  import "./_browser-chunks/chunk-A242L54C.js";
9
9
  export {
10
10
  Category,
@@ -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_16w7d0j2rs7 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 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_16w7d0j2rs7.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -16,8 +16,8 @@ import {
16
16
  join,
17
17
  normalize,
18
18
  resolve
19
- } from "../_node-chunks/chunk-VBZIULNK.js";
20
- import "../_node-chunks/chunk-J4VC4I2M.js";
19
+ } from "../_node-chunks/chunk-CUUCEXYW.js";
20
+ import "../_node-chunks/chunk-WYREEMWZ.js";
21
21
 
22
22
  // ../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
23
23
  var comma = 44, semicolon = 59, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);
@@ -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_16w7d0j2rs7 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 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_16w7d0j2rs7.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -22,9 +22,9 @@ import {
22
22
  once,
23
23
  prompt,
24
24
  protectUrls
25
- } from "../_node-chunks/chunk-VUIYVJKC.js";
26
- import "../_node-chunks/chunk-RZ2YFNVH.js";
27
- import "../_node-chunks/chunk-J4VC4I2M.js";
25
+ } from "../_node-chunks/chunk-FD76ZM2X.js";
26
+ import "../_node-chunks/chunk-56BVIMJO.js";
27
+ import "../_node-chunks/chunk-WYREEMWZ.js";
28
28
  var export_instance = import_npmlog.default;
29
29
  export {
30
30
  CLI_COLORS,
@@ -13566,7 +13566,26 @@ var StorybookError = class _StorybookError extends Error {
13566
13566
  * user.
13567
13567
  */
13568
13568
  this.isHandledError = !1;
13569
- this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name;
13569
+ /**
13570
+ * A collection of sub errors which relate to a parent error.
13571
+ *
13572
+ * Sub-errors are used to represent multiple related errors that occurred together. When a
13573
+ * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
13574
+ * are sent as separate telemetry events. This allows for better error tracking and debugging.
13575
+ *
13576
+ * @example
13577
+ *
13578
+ * ```ts
13579
+ * const error1 = new SomeError();
13580
+ * const error2 = new AnotherError();
13581
+ * const parentError = new ParentError({
13582
+ * // ... other props
13583
+ * subErrors: [error1, error2],
13584
+ * });
13585
+ * ```
13586
+ */
13587
+ this.subErrors = [];
13588
+ 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 ?? [];
13570
13589
  }
13571
13590
  get fullErrorCode() {
13572
13591
  return parseErrorCode({ code: this.code, category: this.category });
@@ -34217,7 +34236,7 @@ var DocsContext = class {
34217
34236
  }
34218
34237
  resolveModuleExport(moduleExportOrType) {
34219
34238
  let csfFile = this.exportsToCSFFile.get(moduleExportOrType);
34220
- if (csfFile)
34239
+ if (!csfFile && moduleExportOrType && typeof moduleExportOrType == "object" && "default" in moduleExportOrType && (csfFile = this.exportsToCSFFile.get(moduleExportOrType.default)), csfFile)
34221
34240
  return { type: "meta", csfFile };
34222
34241
  let story = this.exportToStory.get(
34223
34242
  isStory(moduleExportOrType) ? moduleExportOrType.input : moduleExportOrType
@@ -48,7 +48,7 @@ import {
48
48
  useStoryContext,
49
49
  userOrAutoTitle,
50
50
  userOrAutoTitleFromSpecifier
51
- } from "../_browser-chunks/chunk-SS2NHR7W.js";
51
+ } from "../_browser-chunks/chunk-GPBRNGY5.js";
52
52
  import {
53
53
  pauseAnimations,
54
54
  waitForAnimations
@@ -570,6 +570,25 @@ declare abstract class StorybookError extends Error {
570
570
  /** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
571
571
  get name(): string;
572
572
  set name(name: string);
573
+ /**
574
+ * A collection of sub errors which relate to a parent error.
575
+ *
576
+ * Sub-errors are used to represent multiple related errors that occurred together. When a
577
+ * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
578
+ * are sent as separate telemetry events. This allows for better error tracking and debugging.
579
+ *
580
+ * @example
581
+ *
582
+ * ```ts
583
+ * const error1 = new SomeError();
584
+ * const error2 = new AnotherError();
585
+ * const parentError = new ParentError({
586
+ * // ... other props
587
+ * subErrors: [error1, error2],
588
+ * });
589
+ * ```
590
+ */
591
+ subErrors: StorybookError[];
573
592
  constructor(props: {
574
593
  category: string;
575
594
  code: number;
@@ -577,6 +596,11 @@ declare abstract class StorybookError extends Error {
577
596
  documentation?: boolean | string | string[];
578
597
  isHandledError?: boolean;
579
598
  name: string;
599
+ /**
600
+ * Optional array of sub-errors that are related to this error. When this error is sent to
601
+ * telemetry, each sub-error will be sent as a separate event.
602
+ */
603
+ subErrors?: StorybookError[];
580
604
  });
581
605
  /** Generates the error message along with additional documentation link (if applicable). */
582
606
  static getFullMessage({ documentation, code, category, message, }: ConstructorParameters<typeof StorybookError>[0]): string;
@@ -20,8 +20,8 @@ import {
20
20
  StoryStoreAccessedBeforeInitializationError,
21
21
  UnknownArgTypesError,
22
22
  UnsupportedViewportDimensionError
23
- } from "./_browser-chunks/chunk-2XZMBGTA.js";
24
- import "./_browser-chunks/chunk-FQ7SLVLR.js";
23
+ } from "./_browser-chunks/chunk-7S2XPX5M.js";
24
+ import "./_browser-chunks/chunk-JVRDBUUP.js";
25
25
  import "./_browser-chunks/chunk-JP7NCOJX.js";
26
26
  import "./_browser-chunks/chunk-A242L54C.js";
27
27
  export {
@@ -570,6 +570,25 @@ declare abstract class StorybookError extends Error {
570
570
  /** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
571
571
  get name(): string;
572
572
  set name(name: string);
573
+ /**
574
+ * A collection of sub errors which relate to a parent error.
575
+ *
576
+ * Sub-errors are used to represent multiple related errors that occurred together. When a
577
+ * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
578
+ * are sent as separate telemetry events. This allows for better error tracking and debugging.
579
+ *
580
+ * @example
581
+ *
582
+ * ```ts
583
+ * const error1 = new SomeError();
584
+ * const error2 = new AnotherError();
585
+ * const parentError = new ParentError({
586
+ * // ... other props
587
+ * subErrors: [error1, error2],
588
+ * });
589
+ * ```
590
+ */
591
+ subErrors: StorybookError[];
573
592
  constructor(props: {
574
593
  category: string;
575
594
  code: number;
@@ -577,6 +596,11 @@ declare abstract class StorybookError extends Error {
577
596
  documentation?: boolean | string | string[];
578
597
  isHandledError?: boolean;
579
598
  name: string;
599
+ /**
600
+ * Optional array of sub-errors that are related to this error. When this error is sent to
601
+ * telemetry, each sub-error will be sent as a separate event.
602
+ */
603
+ subErrors?: StorybookError[];
580
604
  });
581
605
  /** Generates the error message along with additional documentation link (if applicable). */
582
606
  static getFullMessage({ documentation, code, category, message, }: ConstructorParameters<typeof StorybookError>[0]): string;
@@ -787,12 +811,44 @@ declare class AddonVitestPostinstallPrerequisiteCheckError extends StorybookErro
787
811
  reasons: string[];
788
812
  });
789
813
  }
814
+ declare class AddonVitestPostinstallFailedAddonA11yError extends StorybookError {
815
+ data: {
816
+ error: unknown | Error;
817
+ };
818
+ constructor(data: {
819
+ error: unknown | Error;
820
+ });
821
+ }
822
+ declare class AddonVitestPostinstallExistingSetupFileError extends StorybookError {
823
+ data: {
824
+ filePath: string;
825
+ };
826
+ constructor(data: {
827
+ filePath: string;
828
+ });
829
+ }
830
+ declare class AddonVitestPostinstallWorkspaceUpdateError extends StorybookError {
831
+ data: {
832
+ filePath: string;
833
+ };
834
+ constructor(data: {
835
+ filePath: string;
836
+ });
837
+ }
838
+ declare class AddonVitestPostinstallConfigUpdateError extends StorybookError {
839
+ data: {
840
+ filePath: string;
841
+ };
842
+ constructor(data: {
843
+ filePath: string;
844
+ });
845
+ }
790
846
  declare class AddonVitestPostinstallError extends StorybookError {
791
847
  data: {
792
- errors: string[];
848
+ errors: StorybookError[];
793
849
  };
794
850
  constructor(data: {
795
- errors: string[];
851
+ errors: StorybookError[];
796
852
  });
797
853
  }
798
854
  declare class UpgradeStorybookToLowerVersionError extends StorybookError {
@@ -853,4 +909,4 @@ declare class AutomigrateError extends StorybookError {
853
909
  });
854
910
  }
855
911
 
856
- export { AddonVitestPostinstallError, AddonVitestPostinstallPrerequisiteCheckError, AngularLegacyBuildOptionsError, AutomigrateError, Category, CommonJsConfigNotSupportedError, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, IncompatiblePostCssConfigError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, SavingGlobalSettingsFileError, StatusTypeIdMismatchError, SvelteViteWithSvelteKitError, UpgradeStorybookToLowerVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };
912
+ export { AddonVitestPostinstallConfigUpdateError, AddonVitestPostinstallError, AddonVitestPostinstallExistingSetupFileError, AddonVitestPostinstallFailedAddonA11yError, AddonVitestPostinstallPrerequisiteCheckError, AddonVitestPostinstallWorkspaceUpdateError, AngularLegacyBuildOptionsError, AutomigrateError, Category, CommonJsConfigNotSupportedError, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, IncompatiblePostCssConfigError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, SavingGlobalSettingsFileError, StatusTypeIdMismatchError, StorybookError, SvelteViteWithSvelteKitError, UpgradeStorybookToLowerVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };
@@ -1,17 +1,21 @@
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_16w7d0j2rs7 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 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_16w7d0j2rs7.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.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
+ AddonVitestPostinstallConfigUpdateError,
13
14
  AddonVitestPostinstallError,
15
+ AddonVitestPostinstallExistingSetupFileError,
16
+ AddonVitestPostinstallFailedAddonA11yError,
14
17
  AddonVitestPostinstallPrerequisiteCheckError,
18
+ AddonVitestPostinstallWorkspaceUpdateError,
15
19
  AngularLegacyBuildOptionsError,
16
20
  AutomigrateError,
17
21
  Category,
@@ -42,14 +46,20 @@ import {
42
46
  WebpackCompilationError,
43
47
  WebpackInvocationError,
44
48
  WebpackMissingStatsError
45
- } from "./_node-chunks/chunk-DMPGFWI4.js";
46
- import "./_node-chunks/chunk-LJRKMWYC.js";
47
- import "./_node-chunks/chunk-76KIYDRU.js";
48
- import "./_node-chunks/chunk-RZ2YFNVH.js";
49
- import "./_node-chunks/chunk-J4VC4I2M.js";
49
+ } from "./_node-chunks/chunk-FCQVKOY4.js";
50
+ import {
51
+ StorybookError
52
+ } from "./_node-chunks/chunk-B2EXFXPG.js";
53
+ import "./_node-chunks/chunk-QCZPELNP.js";
54
+ import "./_node-chunks/chunk-56BVIMJO.js";
55
+ import "./_node-chunks/chunk-WYREEMWZ.js";
50
56
  export {
57
+ AddonVitestPostinstallConfigUpdateError,
51
58
  AddonVitestPostinstallError,
59
+ AddonVitestPostinstallExistingSetupFileError,
60
+ AddonVitestPostinstallFailedAddonA11yError,
52
61
  AddonVitestPostinstallPrerequisiteCheckError,
62
+ AddonVitestPostinstallWorkspaceUpdateError,
53
63
  AngularLegacyBuildOptionsError,
54
64
  AutomigrateError,
55
65
  Category,
@@ -74,6 +84,7 @@ export {
74
84
  NxProjectDetectedError,
75
85
  SavingGlobalSettingsFileError,
76
86
  StatusTypeIdMismatchError,
87
+ StorybookError,
77
88
  SvelteViteWithSvelteKitError,
78
89
  UpgradeStorybookToLowerVersionError,
79
90
  UpgradeStorybookUnknownCurrentVersionError,
@@ -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_16w7d0j2rs7 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 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_16w7d0j2rs7.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -22,25 +22,25 @@ import {
22
22
  sanitizeAddonName,
23
23
  sanitizeError,
24
24
  telemetry
25
- } from "../_node-chunks/chunk-7KESMTGS.js";
26
- import "../_node-chunks/chunk-CMI5GRPA.js";
27
- import "../_node-chunks/chunk-QZJSO2TW.js";
28
- import "../_node-chunks/chunk-4FAPWW5I.js";
29
- import "../_node-chunks/chunk-4X3VTYIW.js";
30
- import "../_node-chunks/chunk-VUIYVJKC.js";
25
+ } from "../_node-chunks/chunk-AJ7QOTOZ.js";
26
+ import "../_node-chunks/chunk-3GJDB3VJ.js";
27
+ import "../_node-chunks/chunk-RZ3SV46Y.js";
28
+ import "../_node-chunks/chunk-VRODUWUT.js";
29
+ import "../_node-chunks/chunk-XPWMJEXT.js";
30
+ import "../_node-chunks/chunk-FD76ZM2X.js";
31
31
  import {
32
32
  getPrecedingUpgrade
33
- } from "../_node-chunks/chunk-N54KYQ6P.js";
34
- import "../_node-chunks/chunk-S3DQCJWT.js";
35
- import "../_node-chunks/chunk-2IIRK2OT.js";
36
- import "../_node-chunks/chunk-Q6B5LJGA.js";
37
- import "../_node-chunks/chunk-FMYFRXPU.js";
38
- import "../_node-chunks/chunk-VBZIULNK.js";
39
- import "../_node-chunks/chunk-F2RDEFFH.js";
40
- import "../_node-chunks/chunk-GVOXGNOU.js";
41
- import "../_node-chunks/chunk-76KIYDRU.js";
42
- import "../_node-chunks/chunk-RZ2YFNVH.js";
43
- import "../_node-chunks/chunk-J4VC4I2M.js";
33
+ } from "../_node-chunks/chunk-GUCJOBT7.js";
34
+ import "../_node-chunks/chunk-ITMM32VP.js";
35
+ import "../_node-chunks/chunk-255LKCUD.js";
36
+ import "../_node-chunks/chunk-SNGQFKE7.js";
37
+ import "../_node-chunks/chunk-GJ5FSAL5.js";
38
+ import "../_node-chunks/chunk-CUUCEXYW.js";
39
+ import "../_node-chunks/chunk-52EAUB7R.js";
40
+ import "../_node-chunks/chunk-WUVM2V22.js";
41
+ import "../_node-chunks/chunk-QCZPELNP.js";
42
+ import "../_node-chunks/chunk-56BVIMJO.js";
43
+ import "../_node-chunks/chunk-WYREEMWZ.js";
44
44
  export {
45
45
  ErrorCollector,
46
46
  addToGlobalContext,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook",
3
- "version": "10.1.4",
3
+ "version": "10.1.5",
4
4
  "description": "Storybook: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",