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,61 +1,57 @@
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
- import "../../_node-chunks/chunk-JYMZJCZ7.js";
12
+ import "../../_node-chunks/chunk-XBDIQU4P.js";
13
13
  import {
14
14
  parseStaticDir,
15
15
  sendTelemetryError,
16
16
  throttle
17
- } from "../../_node-chunks/chunk-GOOBGRAV.js";
18
- import "../../_node-chunks/chunk-LEDV47V2.js";
19
- import "../../_node-chunks/chunk-XEPVDCRL.js";
20
- import "../../_node-chunks/chunk-ZI2RAI3I.js";
21
- import {
22
- getLastEvents,
23
- getSessionId
24
- } from "../../_node-chunks/chunk-VR5LMO3F.js";
17
+ } from "../../_node-chunks/chunk-JXL37VS7.js";
18
+ import "../../_node-chunks/chunk-ZHSAQXJF.js";
19
+ import "../../_node-chunks/chunk-TAETXAN6.js";
20
+ import "../../_node-chunks/chunk-YCQRVBE4.js";
25
21
  import {
26
22
  globalSettings
27
- } from "../../_node-chunks/chunk-VFTNRF5X.js";
23
+ } from "../../_node-chunks/chunk-QF3YWFYM.js";
28
24
  import {
29
25
  invariant
30
- } from "../../_node-chunks/chunk-4EZYJUAC.js";
26
+ } from "../../_node-chunks/chunk-Q6PDB4Y6.js";
27
+ import "../../_node-chunks/chunk-YELE6V4D.js";
31
28
  import {
32
29
  resolvePackageDir
33
- } from "../../_node-chunks/chunk-SR5ZYD7K.js";
34
- import "../../_node-chunks/chunk-TP6ICLTL.js";
30
+ } from "../../_node-chunks/chunk-BP66TAYC.js";
35
31
  import {
36
32
  isAbsolute,
37
33
  join
38
- } from "../../_node-chunks/chunk-PGFQADZC.js";
34
+ } from "../../_node-chunks/chunk-WULYWBBT.js";
39
35
  import {
40
36
  loadConfig
41
- } from "../../_node-chunks/chunk-77APSTTM.js";
37
+ } from "../../_node-chunks/chunk-KP3IIE5P.js";
42
38
  import {
43
39
  require_dist
44
- } from "../../_node-chunks/chunk-AJUO2ZU3.js";
45
- import "../../_node-chunks/chunk-TX77W2KY.js";
46
- import "../../_node-chunks/chunk-KXDU466E.js";
40
+ } from "../../_node-chunks/chunk-MLCI5FPI.js";
41
+ import "../../_node-chunks/chunk-POAHHCVK.js";
42
+ import "../../_node-chunks/chunk-EKU7ASGO.js";
47
43
  import {
48
44
  require_picocolors
49
- } from "../../_node-chunks/chunk-GYZQMMTN.js";
45
+ } from "../../_node-chunks/chunk-Z2CJCEHN.js";
50
46
  import {
51
47
  __commonJS,
52
48
  __require,
53
49
  __toESM
54
- } from "../../_node-chunks/chunk-5NWCBUGD.js";
50
+ } from "../../_node-chunks/chunk-LZ5NNY6S.js";
55
51
 
56
- // ../node_modules/shell-quote/quote.js
52
+ // ../../node_modules/shell-quote/quote.js
57
53
  var require_quote = __commonJS({
58
- "../node_modules/shell-quote/quote.js"(exports, module) {
54
+ "../../node_modules/shell-quote/quote.js"(exports, module) {
59
55
  "use strict";
60
56
  module.exports = function(xs) {
61
57
  return xs.map(function(s) {
@@ -65,9 +61,9 @@ var require_quote = __commonJS({
65
61
  }
66
62
  });
67
63
 
68
- // ../node_modules/shell-quote/parse.js
64
+ // ../../node_modules/shell-quote/parse.js
69
65
  var require_parse = __commonJS({
70
- "../node_modules/shell-quote/parse.js"(exports, module) {
66
+ "../../node_modules/shell-quote/parse.js"(exports, module) {
71
67
  "use strict";
72
68
  var CONTROL = "(?:" + [
73
69
  "\\|\\|",
@@ -165,18 +161,18 @@ var require_parse = __commonJS({
165
161
  }
166
162
  });
167
163
 
168
- // ../node_modules/shell-quote/index.js
164
+ // ../../node_modules/shell-quote/index.js
169
165
  var require_shell_quote = __commonJS({
170
- "../node_modules/shell-quote/index.js"(exports) {
166
+ "../../node_modules/shell-quote/index.js"(exports) {
171
167
  "use strict";
172
168
  exports.quote = require_quote();
173
169
  exports.parse = require_parse();
174
170
  }
175
171
  });
176
172
 
177
- // ../node_modules/launch-editor/editor-info/macos.js
173
+ // ../../node_modules/launch-editor/editor-info/macos.js
178
174
  var require_macos = __commonJS({
179
- "../node_modules/launch-editor/editor-info/macos.js"(exports, module) {
175
+ "../../node_modules/launch-editor/editor-info/macos.js"(exports, module) {
180
176
  module.exports = {
181
177
  "/Applications/Atom.app/Contents/MacOS/Atom": "atom",
182
178
  "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta": "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta",
@@ -208,9 +204,9 @@ var require_macos = __commonJS({
208
204
  }
209
205
  });
210
206
 
211
- // ../node_modules/launch-editor/editor-info/linux.js
207
+ // ../../node_modules/launch-editor/editor-info/linux.js
212
208
  var require_linux = __commonJS({
213
- "../node_modules/launch-editor/editor-info/linux.js"(exports, module) {
209
+ "../../node_modules/launch-editor/editor-info/linux.js"(exports, module) {
214
210
  module.exports = {
215
211
  atom: "atom",
216
212
  Brackets: "brackets",
@@ -243,9 +239,9 @@ var require_linux = __commonJS({
243
239
  }
244
240
  });
245
241
 
246
- // ../node_modules/launch-editor/editor-info/windows.js
242
+ // ../../node_modules/launch-editor/editor-info/windows.js
247
243
  var require_windows = __commonJS({
248
- "../node_modules/launch-editor/editor-info/windows.js"(exports, module) {
244
+ "../../node_modules/launch-editor/editor-info/windows.js"(exports, module) {
249
245
  module.exports = [
250
246
  "Brackets.exe",
251
247
  "Code.exe",
@@ -276,9 +272,9 @@ var require_windows = __commonJS({
276
272
  }
277
273
  });
278
274
 
279
- // ../node_modules/launch-editor/guess.js
275
+ // ../../node_modules/launch-editor/guess.js
280
276
  var require_guess = __commonJS({
281
- "../node_modules/launch-editor/guess.js"(exports, module) {
277
+ "../../node_modules/launch-editor/guess.js"(exports, module) {
282
278
  var path = __require("path"), shellQuote = require_shell_quote(), childProcess = __require("child_process"), COMMON_EDITORS_MACOS = require_macos(), COMMON_EDITORS_LINUX = require_linux(), COMMON_EDITORS_WIN = require_windows();
283
279
  module.exports = function(specifiedEditor) {
284
280
  if (specifiedEditor)
@@ -336,9 +332,9 @@ var require_guess = __commonJS({
336
332
  }
337
333
  });
338
334
 
339
- // ../node_modules/launch-editor/get-args.js
335
+ // ../../node_modules/launch-editor/get-args.js
340
336
  var require_get_args = __commonJS({
341
- "../node_modules/launch-editor/get-args.js"(exports, module) {
337
+ "../../node_modules/launch-editor/get-args.js"(exports, module) {
342
338
  var path = __require("path");
343
339
  module.exports = function(editor, fileName, lineNumber, columnNumber = 1) {
344
340
  switch (path.basename(editor).replace(/\.(exe|cmd|bat)$/i, "")) {
@@ -401,9 +397,9 @@ var require_get_args = __commonJS({
401
397
  }
402
398
  });
403
399
 
404
- // ../node_modules/launch-editor/index.js
400
+ // ../../node_modules/launch-editor/index.js
405
401
  var require_launch_editor = __commonJS({
406
- "../node_modules/launch-editor/index.js"(exports, module) {
402
+ "../../node_modules/launch-editor/index.js"(exports, module) {
407
403
  var fs = __require("fs"), os = __require("os"), path = __require("path"), colors = require_picocolors(), childProcess = __require("child_process"), guessEditor = require_guess(), getArgumentsForPosition = require_get_args();
408
404
  function wrapErrorCallback(cb) {
409
405
  return (fileName, errorMessage) => {
@@ -477,7 +473,7 @@ var require_launch_editor = __commonJS({
477
473
  // src/core-server/presets/common-preset.ts
478
474
  import { existsSync as existsSync3 } from "node:fs";
479
475
  import { readFile as readFile3 } from "node:fs/promises";
480
- import { optionalEnvToBoolean } from "storybook/internal/common";
476
+ import { normalizeStories, optionalEnvToBoolean } from "storybook/internal/common";
481
477
  import {
482
478
  JsPackageManagerFactory,
483
479
  getDirectoryFromWorkingDir,
@@ -486,6 +482,7 @@ import {
486
482
  loadEnvs,
487
483
  removeAddon as removeAddonBase
488
484
  } from "storybook/internal/common";
485
+ import { StoryIndexGenerator } from "storybook/internal/core-server";
489
486
  import { readCsf as readCsf2 } from "storybook/internal/csf-tools";
490
487
  import { logger as logger4 } from "storybook/internal/node-logger";
491
488
  import { telemetry as telemetry8 } from "storybook/internal/telemetry";
@@ -518,7 +515,7 @@ import { isCsfFactoryPreview } from "storybook/internal/csf-tools";
518
515
  var import_ts_dedent = __toESM(require_dist(), 1);
519
516
 
520
517
  // src/core-server/utils/get-component-variable-name.ts
521
- var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-64II7H4U.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
518
+ var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-P3NIWBZX.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
522
519
 
523
520
  // src/core-server/utils/new-story-templates/csf-factory-template.ts
524
521
  async function getCsfFactoryTemplateForNewStoryFile(data) {
@@ -783,7 +780,7 @@ async function searchFiles({
783
780
  ignoredFiles = IGNORED_FILES,
784
781
  fileExtensions = FILE_EXTENSIONS
785
782
  }) {
786
- let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-5XJTXKUJ.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
783
+ let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-322GM5CY.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
787
784
  `**/*${searchQuery}*.${fileExtensionsPattern}`,
788
785
  `**/*${searchQuery}*/**/*.${fileExtensionsPattern}`
789
786
  ];
@@ -893,6 +890,8 @@ async function initOpenInEditorChannel(channel, _options, coreOptions) {
893
890
  // src/core-server/server-channel/preview-initialized-channel.ts
894
891
  import { PREVIEW_INITIALIZED } from "storybook/internal/core-events";
895
892
  import { telemetry as telemetry4 } from "storybook/internal/telemetry";
893
+ import { getLastEvents } from "storybook/internal/telemetry";
894
+ import { getSessionId } from "storybook/internal/telemetry";
896
895
  var makePayload = (userAgent, lastInit, sessionId) => {
897
896
  let payload = {
898
897
  userAgent,
@@ -921,71 +920,17 @@ import { experimental_UniversalStore } from "storybook/internal/core-server";
921
920
  import { logger } from "storybook/internal/node-logger";
922
921
  import { telemetry as telemetry5 } from "storybook/internal/telemetry";
923
922
 
924
- // ../node_modules/dequal/dist/index.mjs
925
- var has = Object.prototype.hasOwnProperty;
926
- function find(iter, tar, key) {
927
- for (key of iter.keys())
928
- if (dequal(key, tar)) return key;
929
- }
930
- function dequal(foo, bar) {
931
- var ctor, len, tmp;
932
- if (foo === bar) return !0;
933
- if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
934
- if (ctor === Date) return foo.getTime() === bar.getTime();
935
- if (ctor === RegExp) return foo.toString() === bar.toString();
936
- if (ctor === Array) {
937
- if ((len = foo.length) === bar.length)
938
- for (; len-- && dequal(foo[len], bar[len]); ) ;
939
- return len === -1;
940
- }
941
- if (ctor === Set) {
942
- if (foo.size !== bar.size)
943
- return !1;
944
- for (len of foo)
945
- if (tmp = len, tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !bar.has(tmp)) return !1;
946
- return !0;
947
- }
948
- if (ctor === Map) {
949
- if (foo.size !== bar.size)
950
- return !1;
951
- for (len of foo)
952
- if (tmp = len[0], tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !dequal(len[1], bar.get(tmp)))
953
- return !1;
954
- return !0;
955
- }
956
- if (ctor === ArrayBuffer)
957
- foo = new Uint8Array(foo), bar = new Uint8Array(bar);
958
- else if (ctor === DataView) {
959
- if ((len = foo.byteLength) === bar.byteLength)
960
- for (; len-- && foo.getInt8(len) === bar.getInt8(len); ) ;
961
- return len === -1;
962
- }
963
- if (ArrayBuffer.isView(foo)) {
964
- if ((len = foo.byteLength) === bar.byteLength)
965
- for (; len-- && foo[len] === bar[len]; ) ;
966
- return len === -1;
967
- }
968
- if (!ctor || typeof foo == "object") {
969
- len = 0;
970
- for (ctor in foo)
971
- if (has.call(foo, ctor) && ++len && !has.call(bar, ctor) || !(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return !1;
972
- return Object.keys(bar).length === len;
973
- }
974
- }
975
- return foo !== foo && bar !== bar;
976
- }
977
-
978
- // ../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
923
+ // ../../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
979
924
  function isPrimitive(value) {
980
925
  return value == null || typeof value != "object" && typeof value != "function";
981
926
  }
982
927
 
983
- // ../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
928
+ // ../../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
984
929
  function isTypedArray(x) {
985
930
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
986
931
  }
987
932
 
988
- // ../node_modules/es-toolkit/dist/object/clone.mjs
933
+ // ../../node_modules/es-toolkit/dist/object/clone.mjs
989
934
  function clone(obj) {
990
935
  if (isPrimitive(obj))
991
936
  return obj;
@@ -1013,7 +958,7 @@ function clone(obj) {
1013
958
  return obj;
1014
959
  }
1015
960
 
1016
- // ../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
961
+ // ../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
1017
962
  function isPlainObject(value) {
1018
963
  if (!value || typeof value != "object")
1019
964
  return !1;
@@ -1021,12 +966,12 @@ function isPlainObject(value) {
1021
966
  return proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null ? Object.prototype.toString.call(value) === "[object Object]" : !1;
1022
967
  }
1023
968
 
1024
- // ../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
969
+ // ../../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
1025
970
  function isUnsafeProperty(key) {
1026
971
  return key === "__proto__";
1027
972
  }
1028
973
 
1029
- // ../node_modules/es-toolkit/dist/object/mergeWith.mjs
974
+ // ../../node_modules/es-toolkit/dist/object/mergeWith.mjs
1030
975
  function mergeWith(target, source, merge2) {
1031
976
  let sourceKeys = Object.keys(source);
1032
977
  for (let i = 0; i < sourceKeys.length; i++) {
@@ -1039,10 +984,10 @@ function mergeWith(target, source, merge2) {
1039
984
  return target;
1040
985
  }
1041
986
 
1042
- // ../node_modules/es-toolkit/dist/string/words.mjs
987
+ // ../../node_modules/es-toolkit/dist/string/words.mjs
1043
988
  var CASE_SPLIT_PATTERN = new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+", "gu");
1044
989
 
1045
- // ../node_modules/es-toolkit/dist/object/toMerged.mjs
990
+ // ../../node_modules/es-toolkit/dist/object/toMerged.mjs
1046
991
  function toMerged(target, source) {
1047
992
  return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) {
1048
993
  if (Array.isArray(sourceValue))
@@ -1117,19 +1062,27 @@ async function initializeChecklist() {
1117
1062
  loaded: !0
1118
1063
  })
1119
1064
  ), store.onStateChange((state, previousState) => {
1120
- let projectValues = {}, userValues = {};
1121
- Object.entries(state.items).forEach(([id, { status, mutedAt }]) => {
1065
+ let entries = Object.entries(state.items), projectValues = {}, userValues = {};
1066
+ entries.forEach(([id, { status, mutedAt }]) => {
1122
1067
  status === "done" ? projectValues[id] = { status } : (status === "accepted" || status === "skipped") && (userValues[id] = { status }), mutedAt && (userValues[id] = {
1123
1068
  ...userValues[id],
1124
1069
  mutedAt
1125
1070
  });
1126
1071
  }), saveProjectState({ items: projectValues }), saveUserState({ items: userValues, widget: state.widget });
1127
- let changedValues = Object.entries(state.items).filter(
1128
- ([key, value]) => value !== previousState.items[key]
1072
+ let { mutedItems, statusItems } = entries.reduce(
1073
+ (acc, [item, { mutedAt, status }]) => {
1074
+ let prev = previousState.items[item];
1075
+ return mutedAt !== prev?.mutedAt && acc.mutedItems.push(item), status !== prev?.status && acc.statusItems.push(item), acc;
1076
+ },
1077
+ { mutedItems: [], statusItems: [] }
1129
1078
  );
1130
- telemetry5("onboarding-checklist", {
1131
- ...changedValues.length > 0 ? { items: Object.fromEntries(changedValues) } : {},
1132
- ...dequal(state.widget, previousState.widget) ? {} : { widget: state.widget }
1079
+ mutedItems.length > 0 && telemetry5("onboarding-checklist-muted", {
1080
+ items: mutedItems,
1081
+ completedItems: entries.reduce((acc, [id, { status }]) => status === "done" || status === "accepted" ? acc.concat([id]) : acc, []),
1082
+ skippedItems: entries.reduce((acc, [id, { status }]) => status === "skipped" ? acc.concat([id]) : acc, [])
1083
+ }), statusItems.forEach((item) => {
1084
+ let { status } = state.items[item];
1085
+ telemetry5("onboarding-checklist-status", { item, status });
1133
1086
  });
1134
1087
  });
1135
1088
  } catch (err) {
@@ -1478,7 +1431,7 @@ var interpolate = (string, data = {}) => Object.entries(data).reduce((acc, [k, v
1478
1431
  ...babelDefault,
1479
1432
  // This override makes sure that we will never transpile babel further down then the browsers that storybook supports.
1480
1433
  // This is needed to support the mount property of the context described here:
1481
- // https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-test
1434
+ // https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-story-in-a-file
1482
1435
  overrides: [
1483
1436
  ...babelDefault?.overrides ?? [],
1484
1437
  {
@@ -1571,7 +1524,21 @@ var interpolate = (string, data = {}) => Object.entries(data).reduce((acc, [k, v
1571
1524
  }, managerEntries = async (existing) => [
1572
1525
  join(resolvePackageDir("storybook"), "dist/core-server/presets/common-manager.js"),
1573
1526
  ...existing || []
1574
- ];
1527
+ ], storyIndexGeneratorPromise, storyIndexGenerator = async (_, options) => storyIndexGeneratorPromise || (storyIndexGeneratorPromise = (async () => {
1528
+ let workingDir = process.cwd(), configDir = options.configDir, stories = await options.presets.apply("stories"), normalizedStories = normalizeStories(stories, {
1529
+ configDir,
1530
+ workingDir
1531
+ }), [indexers, docs] = await Promise.all([
1532
+ options.presets.apply("experimental_indexers", []),
1533
+ options.presets.apply("docs")
1534
+ ]), generator = new StoryIndexGenerator(normalizedStories, {
1535
+ workingDir,
1536
+ configDir,
1537
+ indexers,
1538
+ docs
1539
+ });
1540
+ return await generator.initialize(), generator;
1541
+ })(), storyIndexGeneratorPromise);
1575
1542
  export {
1576
1543
  babel,
1577
1544
  core,
@@ -1590,6 +1557,7 @@ export {
1590
1557
  previewHead,
1591
1558
  resolvedReact,
1592
1559
  staticDirs,
1560
+ storyIndexGenerator,
1593
1561
  title,
1594
1562
  typescript
1595
1563
  };
@@ -310,7 +310,13 @@ interface ActionsParameters {
310
310
  * @example `argTypesRegex: '^on.*'`
311
311
  */
312
312
  argTypesRegex?: string;
313
- /** Remove the addon panel and disable the addon's behavior */
313
+ /**
314
+ * Removes the addon panel and turns off the feature's behavior. If you wish to turn off this
315
+ * feature for the entire Storybook, you can set the option in your `main.js|ts` configuration
316
+ * file.
317
+ *
318
+ * @see https://storybook.js.org/docs/essentials/actions#disable
319
+ */
314
320
  disable?: boolean;
315
321
  /**
316
322
  * Binds a standard HTML event handler to the outermost HTML element rendered by your component
@@ -320,8 +326,6 @@ interface ActionsParameters {
320
326
  * **To enable this feature, you must use the `withActions` decorator.**
321
327
  *
322
328
  * @example `handles: ['mouseover', 'click .btn']`
323
- *
324
- * @see https://storybook.js.org/docs/essentials/actions#action-event-handlers
325
329
  */
326
330
  handles?: string[];
327
331
  };
@@ -357,7 +361,12 @@ interface BackgroundsParameters {
357
361
  backgrounds?: {
358
362
  /** Default background color */
359
363
  default?: string;
360
- /** Remove the addon panel and disable the addon's behavior */
364
+ /**
365
+ * Removes the tool and disables the feature's behavior. If you wish to turn off this feature
366
+ * for the entire Storybook, you can set the option in your `main.js|ts` configuration file.
367
+ *
368
+ * @see https://storybook.js.org/docs/essentials/backgrounds#disable
369
+ */
361
370
  disable?: boolean;
362
371
  /** Configuration for the background grid */
363
372
  grid?: GridConfig;
@@ -385,7 +394,13 @@ interface ControlsParameters {
385
394
  * @see https://storybook.js.org/docs/essentials/controls#parameters-1
386
395
  */
387
396
  controls?: {
388
- /** Remove the addon panel and disable the addon's behavior */
397
+ /**
398
+ * Removes the addon panel and turns off the feature's behavior. If you wish to turn off this
399
+ * feature for the entire Storybook, you can set the option in your `main.js|ts` configuration
400
+ * file.
401
+ *
402
+ * @see https://storybook.js.org/docs/essentials/controls#disable
403
+ */
389
404
  disable?: boolean;
390
405
  /** Disable the ability to create or edit stories from the Controls panel */
391
406
  disableSaveFromUI?: boolean;
@@ -435,7 +450,12 @@ interface HighlightParameters {
435
450
  * @see https://storybook.js.org/docs/essentials/highlight#parameters
436
451
  */
437
452
  highlight?: {
438
- /** Remove the addon panel and disable the addon's behavior */
453
+ /**
454
+ * Removes the tool and disables the feature's behavior. If you wish to turn off this feature
455
+ * for the entire Storybook, you can set the option in your `main.js|ts` configuration file.
456
+ *
457
+ * @see https://storybook.js.org/docs/essentials/highlight#disable
458
+ */
439
459
  disable?: boolean;
440
460
  };
441
461
  }
@@ -447,7 +467,12 @@ interface MeasureParameters {
447
467
  * @see https://storybook.js.org/docs/essentials/measure-and-outline#parameters
448
468
  */
449
469
  measure?: {
450
- /** Remove the addon panel and disable the addon's behavior */
470
+ /**
471
+ * Removes the tool and disables the feature's behavior. If you wish to turn off this feature
472
+ * for the entire Storybook, you can set the option in your `main.js|ts` configuration file.
473
+ *
474
+ * @see https://storybook.js.org/docs/essentials/measure-and-outline#disable
475
+ */
451
476
  disable?: boolean;
452
477
  };
453
478
  }
@@ -462,7 +487,12 @@ interface OutlineParameters {
462
487
  * @see https://storybook.js.org/docs/essentials/measure-and-outline#parameters
463
488
  */
464
489
  outline?: {
465
- /** Remove the addon panel and disable the addon's behavior */
490
+ /**
491
+ * Removes the tool and disables the feature's behavior. If you wish to turn off this feature
492
+ * for the entire Storybook, you can set the option in your `main.js|ts` configuration file.
493
+ *
494
+ * @see https://storybook.js.org/docs/essentials/measure-and-outline#disable
495
+ */
466
496
  disable?: boolean;
467
497
  };
468
498
  }
@@ -511,10 +541,10 @@ interface ViewportParameters {
511
541
  */
512
542
  viewport?: {
513
543
  /**
514
- * Remove the addon panel and disable the addon's behavior . If you wish to turn off this addon
515
- * for the entire Storybook, you should do so when registering addon-essentials
544
+ * Removes the tool and disables the feature's behavior. If you wish to turn off this feature
545
+ * for the entire Storybook, you can set the option in your `main.js|ts` configuration file.
516
546
  *
517
- * @see https://storybook.js.org/docs/essentials/index#disabling-addons
547
+ * @see https://storybook.js.org/docs/essentials/viewport#disable
518
548
  */
519
549
  disable?: boolean;
520
550
  /**
package/dist/csf/index.js CHANGED
@@ -10,24 +10,24 @@ import {
10
10
  mountDestructured,
11
11
  normalizeArrays,
12
12
  normalizeProjectAnnotations
13
- } from "../_browser-chunks/chunk-SS2NHR7W.js";
14
- import "../_browser-chunks/chunk-IPA5A322.js";
15
- import "../_browser-chunks/chunk-3OXGAGBE.js";
13
+ } from "../_browser-chunks/chunk-RBABWY22.js";
14
+ import "../_browser-chunks/chunk-MEXTPDJG.js";
15
+ import "../_browser-chunks/chunk-XLJZ7AOP.js";
16
16
  import {
17
17
  combineParameters
18
- } from "../_browser-chunks/chunk-VYJQ7RU5.js";
19
- import "../_browser-chunks/chunk-3IAH5M2U.js";
20
- import "../_browser-chunks/chunk-QKODTO7K.js";
18
+ } from "../_browser-chunks/chunk-G4M6MXF4.js";
19
+ import "../_browser-chunks/chunk-IYCKG66Y.js";
20
+ import "../_browser-chunks/chunk-NZMVUW5T.js";
21
21
  import {
22
22
  invariant
23
- } from "../_browser-chunks/chunk-AS2HQEYC.js";
24
- import "../_browser-chunks/chunk-YKE5S47A.js";
25
- import "../_browser-chunks/chunk-AIOS4NGK.js";
26
- import "../_browser-chunks/chunk-GFLS4VP3.js";
27
- import "../_browser-chunks/chunk-WJYERY3R.js";
23
+ } from "../_browser-chunks/chunk-IWQGIXJS.js";
24
+ import "../_browser-chunks/chunk-V2VKKSMQ.js";
25
+ import "../_browser-chunks/chunk-SWJP5COI.js";
26
+ import "../_browser-chunks/chunk-LCHBOIHN.js";
27
+ import "../_browser-chunks/chunk-ZCFV7BZB.js";
28
28
  import {
29
29
  dedent
30
- } from "../_browser-chunks/chunk-JP7NCOJX.js";
30
+ } from "../_browser-chunks/chunk-3LY4VQVK.js";
31
31
  import {
32
32
  HIGHLIGHT,
33
33
  MAX_Z_INDEX,
@@ -50,9 +50,9 @@ import {
50
50
  __toESM
51
51
  } from "../_browser-chunks/chunk-A242L54C.js";
52
52
 
53
- // ../node_modules/@ngard/tiny-isequal/index.js
53
+ // ../../node_modules/@ngard/tiny-isequal/index.js
54
54
  var require_tiny_isequal = __commonJS({
55
- "../node_modules/@ngard/tiny-isequal/index.js"(exports) {
55
+ "../../node_modules/@ngard/tiny-isequal/index.js"(exports) {
56
56
  Object.defineProperty(exports, "__esModule", { value: !0 }), exports.isEqual = /* @__PURE__ */ (function() {
57
57
  var e = Object.prototype.toString, r = Object.getPrototypeOf, t = Object.getOwnPropertySymbols ? function(e2) {
58
58
  return Object.keys(e2).concat(Object.getOwnPropertySymbols(e2));
@@ -1748,29 +1748,32 @@ var resetAllMocksLoader = ({ parameters: parameters2 }) => {
1748
1748
  traverseArgs(initialArgs);
1749
1749
  }, patchedFocus = !1, enhanceContext = async (context) => {
1750
1750
  globalThis.HTMLElement && context.canvasElement instanceof globalThis.HTMLElement && (context.canvas = within(context.canvasElement));
1751
- let clipboard = globalThis.window?.navigator?.clipboard;
1752
- if (clipboard && (context.userEvent = instrument2(
1753
- { userEvent: uninstrumentedUserEvent.setup() },
1754
- {
1755
- intercept: !0,
1756
- getKeys: (obj) => Object.keys(obj).filter((key) => key !== "eventWrapper")
1757
- }
1758
- ).userEvent, Object.defineProperty(globalThis.window.navigator, "clipboard", {
1759
- get: () => clipboard,
1760
- configurable: !0
1761
- }), !patchedFocus)) {
1762
- let originalFocus = HTMLElement.prototype.focus, currentFocus = HTMLElement.prototype.focus, focusingElements = /* @__PURE__ */ new Set();
1763
- Object.defineProperties(HTMLElement.prototype, {
1764
- focus: {
1765
- configurable: !0,
1766
- set: (newFocus) => {
1767
- currentFocus = newFocus;
1768
- },
1769
- get() {
1770
- return focusingElements.has(this) ? originalFocus : (focusingElements.add(this), setTimeout(() => focusingElements.delete(this), 0), currentFocus);
1771
- }
1751
+ try {
1752
+ let clipboard = globalThis.window?.navigator?.clipboard;
1753
+ if (clipboard && (context.userEvent = instrument2(
1754
+ { userEvent: uninstrumentedUserEvent.setup() },
1755
+ {
1756
+ intercept: !0,
1757
+ getKeys: (obj) => Object.keys(obj).filter((key) => key !== "eventWrapper")
1772
1758
  }
1773
- }), patchedFocus = !0;
1759
+ ).userEvent, Object.defineProperty(globalThis.window.navigator, "clipboard", {
1760
+ get: () => clipboard,
1761
+ configurable: !0
1762
+ }), !patchedFocus)) {
1763
+ let originalFocus = HTMLElement.prototype.focus, currentFocus = HTMLElement.prototype.focus, focusingElements = /* @__PURE__ */ new Set();
1764
+ Object.defineProperties(HTMLElement.prototype, {
1765
+ focus: {
1766
+ configurable: !0,
1767
+ set: (newFocus) => {
1768
+ currentFocus = newFocus;
1769
+ },
1770
+ get() {
1771
+ return focusingElements.has(this) ? originalFocus : (focusingElements.add(this), setTimeout(() => focusingElements.delete(this), 0), currentFocus);
1772
+ }
1773
+ }
1774
+ }), patchedFocus = !0;
1775
+ }
1776
+ } catch {
1774
1777
  }
1775
1778
  }, preview_default7 = () => definePreviewAddon7({
1776
1779
  loaders: [resetAllMocksLoader, nameSpiesAndWrapActionsInSpies, enhanceContext]
@@ -1874,9 +1877,13 @@ function defineStory(input, meta) {
1874
1877
  await compose().run(context);
1875
1878
  },
1876
1879
  test(name, overridesOrTestFn, testFn) {
1877
- let annotations = typeof overridesOrTestFn != "function" ? overridesOrTestFn : {}, testFunction = typeof overridesOrTestFn != "function" ? testFn : overridesOrTestFn, play = mountDestructured(this.play) || mountDestructured(testFunction) ? async ({ context }) => {
1878
- await this.play?.(context), await testFunction(context);
1879
- } : async (context) => {
1880
+ let annotations = typeof overridesOrTestFn != "function" ? overridesOrTestFn : {}, testFunction = typeof overridesOrTestFn != "function" ? testFn : overridesOrTestFn, play = mountDestructured(this.play) || mountDestructured(testFunction) ? (
1881
+ // mount needs to be explicitly destructured
1882
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1883
+ async ({ mount, context }) => {
1884
+ await this.play?.(context), await testFunction(context);
1885
+ }
1886
+ ) : async (context) => {
1880
1887
  await this.play?.(context), await testFunction(context);
1881
1888
  }, test = this.extend({
1882
1889
  ...annotations,