storybook 10.2.0-alpha.1 → 10.2.0-alpha.10

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 (120) hide show
  1. package/dist/_browser-chunks/{Color-TNPFN3FC.js → Color-XESOIGZP.js} +9 -568
  2. package/dist/_browser-chunks/{WithTooltip-IO6J4KBT.js → WithTooltip-65CFNBJE.js} +70 -70
  3. package/dist/_browser-chunks/{chunk-45UGUKRX.js → chunk-242VQQM5.js} +1 -1
  4. package/dist/_browser-chunks/{chunk-JP7NCOJX.js → chunk-3LY4VQVK.js} +1 -1
  5. package/dist/_browser-chunks/{chunk-VYJQ7RU5.js → chunk-G4M6MXF4.js} +31 -27
  6. package/dist/_browser-chunks/{chunk-BRX2HXH7.js → chunk-IH6QJILI.js} +1 -1
  7. package/dist/_browser-chunks/{chunk-AS2HQEYC.js → chunk-IWQGIXJS.js} +1 -1
  8. package/dist/_browser-chunks/{chunk-3IAH5M2U.js → chunk-IYCKG66Y.js} +5 -5
  9. package/dist/_browser-chunks/{chunk-UD6FQLAF.js → chunk-JK6U3MQW.js} +3 -3
  10. package/dist/_browser-chunks/{chunk-FQ7SLVLR.js → chunk-JVRDBUUP.js} +20 -1
  11. package/dist/_browser-chunks/{chunk-GFLS4VP3.js → chunk-LCHBOIHN.js} +6 -6
  12. package/dist/_browser-chunks/{chunk-CHUV5WSW.js → chunk-LE2LTDW3.js} +1 -1
  13. package/dist/_browser-chunks/{chunk-IPA5A322.js → chunk-MEXTPDJG.js} +1 -1
  14. package/dist/_browser-chunks/{chunk-XJNX76GA.js → chunk-NQJGOFZV.js} +4 -4
  15. package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
  16. package/dist/_browser-chunks/{chunk-2XZMBGTA.js → chunk-POMIZRJL.js} +3 -3
  17. package/dist/_browser-chunks/{chunk-RP5RXKFU.js → chunk-Q5RYDXT3.js} +38 -30
  18. package/dist/_browser-chunks/{chunk-SS2NHR7W.js → chunk-RBABWY22.js} +18 -18
  19. package/dist/_browser-chunks/{chunk-AXG2BOBL.js → chunk-S6TK43XQ.js} +10 -10
  20. package/dist/_browser-chunks/{chunk-AIOS4NGK.js → chunk-SWJP5COI.js} +11 -11
  21. package/dist/_browser-chunks/{chunk-H6XK3RSC.js → chunk-UAYGIC3L.js} +6 -6
  22. package/dist/_browser-chunks/{chunk-YKE5S47A.js → chunk-V2VKKSMQ.js} +18 -18
  23. package/dist/_browser-chunks/{chunk-GFY5R5EY.js → chunk-V5NV5R37.js} +1 -1
  24. package/dist/_browser-chunks/chunk-VIJ7SQRO.js +568 -0
  25. package/dist/_browser-chunks/{chunk-3OXGAGBE.js → chunk-XLJZ7AOP.js} +14 -14
  26. package/dist/_browser-chunks/{chunk-P4F4UVXX.js → chunk-YKABRMAI.js} +15 -15
  27. package/dist/_browser-chunks/{chunk-WJYERY3R.js → chunk-ZCFV7BZB.js} +2 -2
  28. package/dist/_browser-chunks/{formatter-QJ4M4OGQ.js → formatter-EIJCOSYU.js} +2 -2
  29. package/dist/_browser-chunks/{syntaxhighlighter-IQDEPFLK.js → syntaxhighlighter-ED5Y7EFY.js} +119 -119
  30. package/dist/_node-chunks/{builder-manager-LXL5N6M5.js → builder-manager-IL56SHZF.js} +23 -22
  31. package/dist/_node-chunks/camelcase-P3NIWBZX.js +62 -0
  32. package/dist/_node-chunks/{chunk-SR5ZYD7K.js → chunk-BP66TAYC.js} +8 -8
  33. package/dist/_node-chunks/{chunk-R3WYNAT5.js → chunk-D3YJHXPC.js} +6 -6
  34. package/dist/_node-chunks/{chunk-5GNBLJKS.js → chunk-E2KSZELU.js} +8 -8
  35. package/dist/_node-chunks/{chunk-KXDU466E.js → chunk-EKU7ASGO.js} +31 -31
  36. package/dist/_node-chunks/chunk-GLYH3TSV.js +61 -0
  37. package/dist/_node-chunks/{chunk-GOOBGRAV.js → chunk-JXL37VS7.js} +34 -24
  38. package/dist/_node-chunks/{chunk-4BQMSZKI.js → chunk-KH2A547Y.js} +165 -191
  39. package/dist/_node-chunks/{chunk-77APSTTM.js → chunk-KP3IIE5P.js} +8 -9
  40. package/dist/_node-chunks/{chunk-5NWCBUGD.js → chunk-LZ5NNY6S.js} +6 -6
  41. package/dist/_node-chunks/{chunk-AJUO2ZU3.js → chunk-MLCI5FPI.js} +9 -9
  42. package/dist/_node-chunks/{chunk-CLNMK7MP.js → chunk-OVKHHS4W.js} +5434 -1625
  43. package/dist/_node-chunks/{chunk-ET4VMMZG.js → chunk-OZHIDIRL.js} +77 -16
  44. package/dist/_node-chunks/{chunk-TX77W2KY.js → chunk-POAHHCVK.js} +597 -593
  45. package/dist/_node-chunks/chunk-Q6PDB4Y6.js +126 -0
  46. package/dist/_node-chunks/{chunk-VFTNRF5X.js → chunk-QF3YWFYM.js} +17 -17
  47. package/dist/_node-chunks/{chunk-KMTK5W6O.js → chunk-RGJIQDLW.js} +48 -26
  48. package/dist/_node-chunks/{chunk-FTR6MHOX.js → chunk-SME7252C.js} +59 -147
  49. package/dist/_node-chunks/{chunk-LEDV47V2.js → chunk-TAETXAN6.js} +15 -15
  50. package/dist/_node-chunks/chunk-TPSZ4QDT.js +20 -0
  51. package/dist/_node-chunks/{chunk-PGFQADZC.js → chunk-WULYWBBT.js} +7 -7
  52. package/dist/_node-chunks/{chunk-JYMZJCZ7.js → chunk-XBDIQU4P.js} +62 -124
  53. package/dist/_node-chunks/chunk-XXOA6ULE.js +18 -0
  54. package/dist/_node-chunks/{chunk-ZI2RAI3I.js → chunk-YCQRVBE4.js} +26 -7
  55. package/dist/_node-chunks/{chunk-TP6ICLTL.js → chunk-YELE6V4D.js} +6 -6
  56. package/dist/_node-chunks/{chunk-GYZQMMTN.js → chunk-Z2CJCEHN.js} +9 -9
  57. package/dist/_node-chunks/{chunk-F7377GT2.js → chunk-Z2ETF7EI.js} +111 -38
  58. package/dist/_node-chunks/chunk-ZHSAQXJF.js +23 -0
  59. package/dist/_node-chunks/{dist-HGQ5R6JU.js → dist-5MXCD6KF.js} +10 -10
  60. package/dist/_node-chunks/{globby-5XJTXKUJ.js → globby-322GM5CY.js} +155 -164
  61. package/dist/_node-chunks/{lib-XNLTS2RI.js → lib-IXZT5UQX.js} +16 -16
  62. package/dist/_node-chunks/{mdx-N42X6CFJ-7WF3QWVO.js → mdx-N42X6CFJ-DBPHTSPN.js} +11 -11
  63. package/dist/_node-chunks/{p-limit-RBKYTJKF.js → p-limit-TLN4WCPA.js} +19 -15
  64. package/dist/babel/index.js +10 -10
  65. package/dist/bin/core.js +40 -34
  66. package/dist/bin/dispatcher.js +11 -11
  67. package/dist/bin/loader.js +14 -11
  68. package/dist/channels/index.js +3 -3
  69. package/dist/cli/index.d.ts +1330 -250
  70. package/dist/cli/index.js +18 -18
  71. package/dist/common/index.d.ts +1344 -289
  72. package/dist/common/index.js +22 -22
  73. package/dist/components/index.d.ts +9 -2
  74. package/dist/components/index.js +339 -317
  75. package/dist/core-events/index.d.ts +4 -2
  76. package/dist/core-events/index.js +4 -2
  77. package/dist/core-server/index.d.ts +71 -2
  78. package/dist/core-server/index.js +3381 -3529
  79. package/dist/core-server/presets/common-manager.css +2 -2
  80. package/dist/core-server/presets/common-manager.js +93 -65
  81. package/dist/core-server/presets/common-override-preset.js +9 -9
  82. package/dist/core-server/presets/common-preset.js +86 -118
  83. package/dist/csf/index.d.ts +41 -11
  84. package/dist/csf/index.js +46 -39
  85. package/dist/csf-tools/index.js +9 -9
  86. package/dist/docs-tools/index.js +5 -5
  87. package/dist/instrumenter/index.js +1 -1
  88. package/dist/manager/globals-runtime.js +9402 -7204
  89. package/dist/manager/runtime.js +186 -143
  90. package/dist/manager-api/index.js +34 -26
  91. package/dist/manager-errors.d.ts +24 -0
  92. package/dist/manager-errors.js +2 -2
  93. package/dist/mocking-utils/index.js +14 -14
  94. package/dist/node-logger/index.d.ts +1456 -111
  95. package/dist/node-logger/index.js +9 -9
  96. package/dist/preview/runtime.js +4608 -2436
  97. package/dist/preview-api/index.js +12 -12
  98. package/dist/preview-errors.d.ts +24 -0
  99. package/dist/preview-errors.js +3 -3
  100. package/dist/router/index.js +11 -11
  101. package/dist/server-errors.d.ts +59 -3
  102. package/dist/server-errors.js +22 -11
  103. package/dist/telemetry/index.d.ts +10 -3
  104. package/dist/telemetry/index.js +27 -25
  105. package/dist/test/index.js +3237 -1653
  106. package/dist/theming/create.js +3 -3
  107. package/dist/theming/index.d.ts +5 -5
  108. package/dist/theming/index.js +38 -38
  109. package/dist/types/index.d.ts +12 -6
  110. package/dist/viewport/index.d.ts +3 -3
  111. package/package.json +27 -33
  112. package/dist/_browser-chunks/chunk-EZSQOHRI.js +0 -18
  113. package/dist/_browser-chunks/chunk-QKODTO7K.js +0 -7
  114. package/dist/_node-chunks/camelcase-64II7H4U.js +0 -37
  115. package/dist/_node-chunks/chunk-4EZYJUAC.js +0 -70
  116. package/dist/_node-chunks/chunk-COQ27OZ3.js +0 -61
  117. package/dist/_node-chunks/chunk-MC2R4DSD.js +0 -20
  118. package/dist/_node-chunks/chunk-NEENMS4J.js +0 -18
  119. package/dist/_node-chunks/chunk-VR5LMO3F.js +0 -72
  120. package/dist/_node-chunks/chunk-XEPVDCRL.js +0 -23
@@ -1,26 +1,26 @@
1
- import CJS_COMPAT_NODE_URL_2297kyafub from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_2297kyafub from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_2297kyafub from "node:module";
1
+ import CJS_COMPAT_NODE_URL_1qalasm8z9n from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_1qalasm8z9n from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_1qalasm8z9n from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_2297kyafub.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_2297kyafub.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_2297kyafub.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_1qalasm8z9n.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_1qalasm8z9n.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_1qalasm8z9n.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
  StorybookError
14
- } from "./chunk-ZI2RAI3I.js";
14
+ } from "./chunk-YCQRVBE4.js";
15
15
  import {
16
16
  require_dist
17
- } from "./chunk-AJUO2ZU3.js";
17
+ } from "./chunk-MLCI5FPI.js";
18
18
  import {
19
19
  require_picocolors
20
- } from "./chunk-GYZQMMTN.js";
20
+ } from "./chunk-Z2CJCEHN.js";
21
21
  import {
22
22
  __toESM
23
- } from "./chunk-5NWCBUGD.js";
23
+ } from "./chunk-LZ5NNY6S.js";
24
24
 
25
25
  // src/server-errors.ts
26
26
  var import_picocolors = __toESM(require_picocolors(), 1), import_ts_dedent = __toESM(require_dist(), 1);
@@ -229,7 +229,7 @@ var WebpackCompilationError = class extends StorybookError {
229
229
  name: "GoogleFontsDownloadError",
230
230
  category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
231
231
  code: 1,
232
- documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
232
+ documentation: "https://storybook.js.org/docs/get-started/frameworks/nextjs#nextjs-font-optimization",
233
233
  message: import_ts_dedent.dedent`
234
234
  Failed to fetch \`${data.fontFamily}\` from Google Fonts with URL: \`${data.url}\``
235
235
  });
@@ -241,7 +241,7 @@ var WebpackCompilationError = class extends StorybookError {
241
241
  name: "GoogleFontsLoadingError",
242
242
  category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
243
243
  code: 2,
244
- documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
244
+ documentation: "https://storybook.js.org/docs/get-started/frameworks/nextjs#nextjs-font-optimization",
245
245
  message: import_ts_dedent.dedent`
246
246
  An error occurred when trying to load Google Fonts with URL \`${data.url}\`.
247
247
 
@@ -286,11 +286,11 @@ var WebpackCompilationError = class extends StorybookError {
286
286
  constructor(data) {
287
287
  let map = {
288
288
  storybook: {
289
- helperMessage: "You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.",
289
+ helperMessage: "You can pass a --config-dir flag to tell Storybook, where your main.js|ts file is located at.",
290
290
  documentation: "https://storybook.js.org/docs/configure?ref=error"
291
291
  },
292
292
  vitest: {
293
- helperMessage: "You can pass a configDir plugin option to tell where your main.js file is located at.",
293
+ helperMessage: "You can pass a configDir plugin option to tell where your main.js|ts file is located at.",
294
294
  // TODO: add proper docs once available
295
295
  documentation: "https://storybook.js.org/docs/configure?ref=error"
296
296
  }
@@ -302,7 +302,7 @@ var WebpackCompilationError = class extends StorybookError {
302
302
  documentation,
303
303
  message: import_ts_dedent.dedent`
304
304
  No configuration files have been found in your configDir: ${import_picocolors.default.yellow(data.location)}.
305
- Storybook needs a "main.js" file, please add it.
305
+ Storybook needs a "main.js|ts" file, please add it.
306
306
 
307
307
  ${helperMessage}`
308
308
  });
@@ -365,6 +365,62 @@ var WebpackCompilationError = class extends StorybookError {
365
365
  });
366
366
  this.data = data;
367
367
  }
368
+ }, AddonVitestPostinstallFailedAddonA11yError = class extends StorybookError {
369
+ constructor(data) {
370
+ super({
371
+ name: "AddonVitestPostinstallFailedAddonA11yError",
372
+ message: "The @storybook/addon-a11y couldn't be set up for the Vitest addon",
373
+ category: "CLI_INIT" /* CLI_INIT */,
374
+ isHandledError: !0,
375
+ code: 6
376
+ });
377
+ this.data = data;
378
+ }
379
+ }, AddonVitestPostinstallExistingSetupFileError = class extends StorybookError {
380
+ constructor(data) {
381
+ super({
382
+ name: "AddonVitestPostinstallExistingSetupFileError",
383
+ category: "CLI_INIT" /* CLI_INIT */,
384
+ isHandledError: !0,
385
+ code: 7,
386
+ documentation: "https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#manual-setup-advanced",
387
+ message: import_ts_dedent.dedent`
388
+ Found an existing Vitest setup file: ${data.filePath}
389
+ Please refer to the documentation to complete the setup manually.
390
+ `
391
+ });
392
+ this.data = data;
393
+ }
394
+ }, AddonVitestPostinstallWorkspaceUpdateError = class extends StorybookError {
395
+ constructor(data) {
396
+ super({
397
+ name: "AddonVitestPostinstallWorkspaceUpdateError",
398
+ category: "CLI_INIT" /* CLI_INIT */,
399
+ isHandledError: !0,
400
+ code: 8,
401
+ documentation: "https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#manual-setup-advanced",
402
+ message: import_ts_dedent.dedent`
403
+ Could not update existing Vitest workspace file: ${data.filePath}
404
+ Please refer to the documentation to complete the setup manually.
405
+ `
406
+ });
407
+ this.data = data;
408
+ }
409
+ }, AddonVitestPostinstallConfigUpdateError = class extends StorybookError {
410
+ constructor(data) {
411
+ super({
412
+ name: "AddonVitestPostinstallConfigUpdateError",
413
+ category: "CLI_INIT" /* CLI_INIT */,
414
+ isHandledError: !0,
415
+ code: 9,
416
+ documentation: "https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#manual-setup-advanced",
417
+ message: import_ts_dedent.dedent`
418
+ Unable to update existing Vitest config file: ${data.filePath}
419
+ Please refer to the documentation to complete the setup manually.
420
+ `
421
+ });
422
+ this.data = data;
423
+ }
368
424
  }, AddonVitestPostinstallError = class extends StorybookError {
369
425
  constructor(data) {
370
426
  super({
@@ -372,7 +428,8 @@ var WebpackCompilationError = class extends StorybookError {
372
428
  category: "CLI_INIT" /* CLI_INIT */,
373
429
  isHandledError: !0,
374
430
  code: 5,
375
- message: "The Vitest addon setup failed."
431
+ message: "The Vitest addon setup failed.",
432
+ subErrors: data.errors
376
433
  });
377
434
  this.data = data;
378
435
  }
@@ -528,6 +585,10 @@ export {
528
585
  StatusTypeIdMismatchError,
529
586
  GenerateNewProjectOnInitError,
530
587
  AddonVitestPostinstallPrerequisiteCheckError,
588
+ AddonVitestPostinstallFailedAddonA11yError,
589
+ AddonVitestPostinstallExistingSetupFileError,
590
+ AddonVitestPostinstallWorkspaceUpdateError,
591
+ AddonVitestPostinstallConfigUpdateError,
531
592
  AddonVitestPostinstallError,
532
593
  UpgradeStorybookToLowerVersionError,
533
594
  UpgradeStorybookUnknownCurrentVersionError,