storybook 10.2.0-alpha.6 → 10.2.0-alpha.8

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 (67) hide show
  1. package/dist/_browser-chunks/{chunk-UXVP56J6.js → chunk-POMIZRJL.js} +1 -1
  2. package/dist/_browser-chunks/{chunk-KTOLYKZY.js → chunk-VUZYLZ4B.js} +6 -6
  3. package/dist/_node-chunks/{builder-manager-SRWOH6O7.js → builder-manager-2XASU3VS.js} +12 -12
  4. package/dist/_node-chunks/{camelcase-IPCCDY4U.js → camelcase-KIWRHB2G.js} +7 -7
  5. package/dist/_node-chunks/chunk-2ANLCK4Y.js +18 -0
  6. package/dist/_node-chunks/{chunk-T53OKK5L.js → chunk-2KSITKBI.js} +7 -7
  7. package/dist/_node-chunks/{chunk-RMPSZ2MA.js → chunk-2OC7H5MZ.js} +7 -7
  8. package/dist/_node-chunks/{chunk-5UF6URLY.js → chunk-3K6P75SS.js} +7 -7
  9. package/dist/_node-chunks/{chunk-YH2VABDS.js → chunk-3TW66YXG.js} +6 -6
  10. package/dist/_node-chunks/{chunk-QNHQNNV2.js → chunk-5BRYY6XB.js} +9 -9
  11. package/dist/_node-chunks/{chunk-IFCVXOGP.js → chunk-5GRHJJHD.js} +9 -9
  12. package/dist/_node-chunks/{chunk-62HH4XOF.js → chunk-5WQXPM6D.js} +6 -6
  13. package/dist/_node-chunks/{chunk-ZFBKUCCD.js → chunk-6TJUL42C.js} +14 -14
  14. package/dist/_node-chunks/{chunk-PI4OGMRN.js → chunk-7B4JYHGV.js} +6 -6
  15. package/dist/_node-chunks/{chunk-YSCJXVR2.js → chunk-COGO4JMD.js} +7 -7
  16. package/dist/_node-chunks/{chunk-5U7Q4G4A.js → chunk-DTM4A3DJ.js} +76 -19
  17. package/dist/_node-chunks/{chunk-VUL47RCU.js → chunk-DYQ6QR45.js} +15 -15
  18. package/dist/_node-chunks/{chunk-J4ASSZ5N.js → chunk-IJ34563N.js} +32 -32
  19. package/dist/_node-chunks/{chunk-HQCIQ33W.js → chunk-JWL5NLJU.js} +6 -6
  20. package/dist/_node-chunks/{chunk-GJU4KX6X.js → chunk-LEZENLG7.js} +7 -7
  21. package/dist/_node-chunks/chunk-LOXLI4XT.js +20 -0
  22. package/dist/_node-chunks/{chunk-2BHMURQI.js → chunk-MLYPMYG5.js} +6 -6
  23. package/dist/_node-chunks/{chunk-TNAUD72T.js → chunk-Q6WPGVIW.js} +6 -6
  24. package/dist/_node-chunks/{chunk-XKPOBYPY.js → chunk-S7FIFCTX.js} +18 -18
  25. package/dist/_node-chunks/{chunk-AQ5XNGJR.js → chunk-TTGXODEY.js} +7 -7
  26. package/dist/_node-chunks/chunk-UFXCGC4W.js +23 -0
  27. package/dist/_node-chunks/{chunk-YIC767NR.js → chunk-UNHOAAXU.js} +7 -7
  28. package/dist/_node-chunks/{chunk-OKIXNWVU.js → chunk-VJFHZL2T.js} +8 -8
  29. package/dist/_node-chunks/{chunk-IBLK5VBI.js → chunk-WKC523P7.js} +7 -7
  30. package/dist/_node-chunks/chunk-X4YDIHYE.js +61 -0
  31. package/dist/_node-chunks/{chunk-JCHPJOPI.js → chunk-ZKB7MQRR.js} +8 -8
  32. package/dist/_node-chunks/{dist-JJEWCMVH.js → dist-GICI6ZHU.js} +9 -9
  33. package/dist/_node-chunks/{globby-VLMVNFI7.js → globby-FWMT4OOQ.js} +9 -9
  34. package/dist/_node-chunks/{lib-FXIHPQYY.js → lib-YCGXIMW5.js} +7 -7
  35. package/dist/_node-chunks/{mdx-N42X6CFJ-MYO6PQF5.js → mdx-N42X6CFJ-CRGM5LTU.js} +8 -8
  36. package/dist/_node-chunks/{p-limit-OTUUNSPQ.js → p-limit-UJIYI4QT.js} +7 -7
  37. package/dist/babel/index.js +10 -10
  38. package/dist/bin/core.js +12 -12
  39. package/dist/bin/dispatcher.js +11 -11
  40. package/dist/bin/loader.js +9 -9
  41. package/dist/cli/index.d.ts +0 -1
  42. package/dist/cli/index.js +18 -18
  43. package/dist/common/index.js +19 -19
  44. package/dist/core-server/index.js +259 -633
  45. package/dist/core-server/presets/common-override-preset.js +9 -9
  46. package/dist/core-server/presets/common-preset.js +27 -29
  47. package/dist/csf/index.d.ts +41 -11
  48. package/dist/csf/index.js +8 -4
  49. package/dist/csf-tools/index.js +9 -9
  50. package/dist/manager/globals-runtime.js +6 -6
  51. package/dist/manager/runtime.js +1 -1
  52. package/dist/manager-api/index.js +7 -7
  53. package/dist/mocking-utils/index.js +8 -8
  54. package/dist/node-logger/index.js +9 -9
  55. package/dist/preview/runtime.js +7 -7
  56. package/dist/preview-api/index.js +1 -1
  57. package/dist/preview-errors.js +1 -1
  58. package/dist/server-errors.js +11 -11
  59. package/dist/telemetry/index.d.ts +9 -2
  60. package/dist/telemetry/index.js +27 -25
  61. package/dist/viewport/index.d.ts +3 -3
  62. package/package.json +2 -2
  63. package/dist/_node-chunks/chunk-2WJTWJRY.js +0 -20
  64. package/dist/_node-chunks/chunk-3SDF3TBW.js +0 -18
  65. package/dist/_node-chunks/chunk-6COWUVY6.js +0 -23
  66. package/dist/_node-chunks/chunk-7YD5E5Y5.js +0 -72
  67. package/dist/_node-chunks/chunk-GE3TP4E7.js +0 -61
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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
  glob
14
- } from "../../_node-chunks/chunk-5UF6URLY.js";
14
+ } from "../../_node-chunks/chunk-3K6P75SS.js";
15
15
  import {
16
16
  slash
17
- } from "../../_node-chunks/chunk-2WJTWJRY.js";
18
- import "../../_node-chunks/chunk-62HH4XOF.js";
17
+ } from "../../_node-chunks/chunk-LOXLI4XT.js";
18
+ import "../../_node-chunks/chunk-5WQXPM6D.js";
19
19
 
20
20
  // src/core-server/utils/remove-mdx-entries.ts
21
21
  import { isAbsolute, join, relative } from "node:path";
@@ -1,15 +1,15 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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-ZFBKUCCD.js";
12
+ import "../../_node-chunks/chunk-6TJUL42C.js";
13
13
  import {
14
14
  AbortError,
15
15
  after,
@@ -32,45 +32,41 @@ import {
32
32
  sendTelemetryError,
33
33
  throttle,
34
34
  unary
35
- } from "../../_node-chunks/chunk-VUL47RCU.js";
36
- import "../../_node-chunks/chunk-GJU4KX6X.js";
37
- import "../../_node-chunks/chunk-6COWUVY6.js";
38
- import "../../_node-chunks/chunk-TNAUD72T.js";
39
- import {
40
- getLastEvents,
41
- getSessionId
42
- } from "../../_node-chunks/chunk-7YD5E5Y5.js";
35
+ } from "../../_node-chunks/chunk-DYQ6QR45.js";
36
+ import "../../_node-chunks/chunk-LEZENLG7.js";
37
+ import "../../_node-chunks/chunk-UFXCGC4W.js";
38
+ import "../../_node-chunks/chunk-Q6WPGVIW.js";
43
39
  import {
44
40
  globalSettings
45
- } from "../../_node-chunks/chunk-IFCVXOGP.js";
41
+ } from "../../_node-chunks/chunk-5GRHJJHD.js";
46
42
  import {
47
43
  invariant
48
- } from "../../_node-chunks/chunk-YH2VABDS.js";
44
+ } from "../../_node-chunks/chunk-3TW66YXG.js";
49
45
  import {
50
46
  resolvePackageDir
51
- } from "../../_node-chunks/chunk-RMPSZ2MA.js";
52
- import "../../_node-chunks/chunk-2BHMURQI.js";
47
+ } from "../../_node-chunks/chunk-2OC7H5MZ.js";
48
+ import "../../_node-chunks/chunk-MLYPMYG5.js";
53
49
  import {
54
50
  isAbsolute,
55
51
  join
56
- } from "../../_node-chunks/chunk-PI4OGMRN.js";
52
+ } from "../../_node-chunks/chunk-7B4JYHGV.js";
57
53
  import {
58
54
  loadConfig
59
- } from "../../_node-chunks/chunk-OKIXNWVU.js";
55
+ } from "../../_node-chunks/chunk-VJFHZL2T.js";
60
56
  import {
61
57
  require_dist
62
- } from "../../_node-chunks/chunk-AQ5XNGJR.js";
63
- import "../../_node-chunks/chunk-QNHQNNV2.js";
64
- import "../../_node-chunks/chunk-YSCJXVR2.js";
58
+ } from "../../_node-chunks/chunk-TTGXODEY.js";
59
+ import "../../_node-chunks/chunk-5BRYY6XB.js";
60
+ import "../../_node-chunks/chunk-COGO4JMD.js";
65
61
  import {
66
62
  require_picocolors
67
- } from "../../_node-chunks/chunk-T53OKK5L.js";
63
+ } from "../../_node-chunks/chunk-2KSITKBI.js";
68
64
  import {
69
65
  __commonJS,
70
66
  __export,
71
67
  __require,
72
68
  __toESM
73
- } from "../../_node-chunks/chunk-62HH4XOF.js";
69
+ } from "../../_node-chunks/chunk-5WQXPM6D.js";
74
70
 
75
71
  // ../../node_modules/shell-quote/quote.js
76
72
  var require_quote = __commonJS({
@@ -537,7 +533,7 @@ import { isCsfFactoryPreview } from "storybook/internal/csf-tools";
537
533
  var import_ts_dedent = __toESM(require_dist(), 1);
538
534
 
539
535
  // src/core-server/utils/get-component-variable-name.ts
540
- var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-IPCCDY4U.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
536
+ var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-KIWRHB2G.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
541
537
 
542
538
  // src/core-server/utils/new-story-templates/csf-factory-template.ts
543
539
  async function getCsfFactoryTemplateForNewStoryFile(data) {
@@ -802,7 +798,7 @@ async function searchFiles({
802
798
  ignoredFiles = IGNORED_FILES,
803
799
  fileExtensions = FILE_EXTENSIONS
804
800
  }) {
805
- let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-VLMVNFI7.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
801
+ let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-FWMT4OOQ.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
806
802
  `**/*${searchQuery}*.${fileExtensionsPattern}`,
807
803
  `**/*${searchQuery}*/**/*.${fileExtensionsPattern}`
808
804
  ];
@@ -912,6 +908,8 @@ async function initOpenInEditorChannel(channel, _options, coreOptions) {
912
908
  // src/core-server/server-channel/preview-initialized-channel.ts
913
909
  import { PREVIEW_INITIALIZED } from "storybook/internal/core-events";
914
910
  import { telemetry as telemetry4 } from "storybook/internal/telemetry";
911
+ import { getLastEvents } from "storybook/internal/telemetry";
912
+ import { getSessionId } from "storybook/internal/telemetry";
915
913
  var makePayload = (userAgent, lastInit, sessionId) => {
916
914
  let payload = {
917
915
  userAgent,
@@ -5695,7 +5693,7 @@ var interpolate = (string, data = {}) => Object.entries(data).reduce((acc, [k, v
5695
5693
  ...babelDefault,
5696
5694
  // This override makes sure that we will never transpile babel further down then the browsers that storybook supports.
5697
5695
  // This is needed to support the mount property of the context described here:
5698
- // https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-test
5696
+ // https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-story-in-a-file
5699
5697
  overrides: [
5700
5698
  ...babelDefault?.overrides ?? [],
5701
5699
  {
@@ -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,7 +10,7 @@ import {
10
10
  mountDestructured,
11
11
  normalizeArrays,
12
12
  normalizeProjectAnnotations
13
- } from "../_browser-chunks/chunk-KTOLYKZY.js";
13
+ } from "../_browser-chunks/chunk-VUZYLZ4B.js";
14
14
  import "../_browser-chunks/chunk-IPA5A322.js";
15
15
  import "../_browser-chunks/chunk-XLJZ7AOP.js";
16
16
  import {
@@ -1878,9 +1878,13 @@ function defineStory(input, meta) {
1878
1878
  await compose().run(context);
1879
1879
  },
1880
1880
  test(name, overridesOrTestFn, testFn) {
1881
- let annotations = typeof overridesOrTestFn != "function" ? overridesOrTestFn : {}, testFunction = typeof overridesOrTestFn != "function" ? testFn : overridesOrTestFn, play = mountDestructured(this.play) || mountDestructured(testFunction) ? async ({ context }) => {
1882
- await this.play?.(context), await testFunction(context);
1883
- } : async (context) => {
1881
+ let annotations = typeof overridesOrTestFn != "function" ? overridesOrTestFn : {}, testFunction = typeof overridesOrTestFn != "function" ? testFn : overridesOrTestFn, play = mountDestructured(this.play) || mountDestructured(testFunction) ? (
1882
+ // mount needs to be explicitly destructured
1883
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1884
+ async ({ mount, context }) => {
1885
+ await this.play?.(context), await testFunction(context);
1886
+ }
1887
+ ) : async (context) => {
1884
1888
  await this.play?.(context), await testFunction(context);
1885
1889
  }, test = this.extend({
1886
1890
  ...annotations,
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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-OKIXNWVU.js";
42
- import "../_node-chunks/chunk-AQ5XNGJR.js";
43
- import "../_node-chunks/chunk-62HH4XOF.js";
41
+ } from "../_node-chunks/chunk-VJFHZL2T.js";
42
+ import "../_node-chunks/chunk-TTGXODEY.js";
43
+ import "../_node-chunks/chunk-5WQXPM6D.js";
44
44
  export {
45
45
  BadMetaError,
46
46
  ConfigFile,
@@ -65142,19 +65142,19 @@ var init12 = ({
65142
65142
  updateStory: async (storyId, update3, ref) => {
65143
65143
  if (ref) {
65144
65144
  let { id: refId, index: index4, filteredIndex } = ref;
65145
- index4[storyId] = {
65145
+ index4 && index4[storyId] && (index4[storyId] = {
65146
65146
  ...index4[storyId],
65147
65147
  ...update3
65148
- }, filteredIndex[storyId] = {
65148
+ }), filteredIndex && filteredIndex[storyId] && (filteredIndex[storyId] = {
65149
65149
  ...filteredIndex[storyId],
65150
65150
  ...update3
65151
- }, await fullAPI.updateRef(refId, { index: index4, filteredIndex });
65151
+ }), await fullAPI.updateRef(refId, { index: index4, filteredIndex });
65152
65152
  } else {
65153
65153
  let { index: index4, filteredIndex } = store2.getState();
65154
- index4 && (index4[storyId] = {
65154
+ index4 && index4[storyId] && (index4[storyId] = {
65155
65155
  ...index4[storyId],
65156
65156
  ...update3
65157
- }), filteredIndex && (filteredIndex[storyId] = {
65157
+ }), filteredIndex && filteredIndex[storyId] && (filteredIndex[storyId] = {
65158
65158
  ...filteredIndex[storyId],
65159
65159
  ...update3
65160
65160
  }), (index4 || filteredIndex) && await store2.setState({ index: index4, filteredIndex });
@@ -66335,7 +66335,7 @@ init_dist();
66335
66335
  var import_memoizerific8 = __toESM(require_memoizerific(), 1), import_semver = __toESM(require_semver2(), 1);
66336
66336
 
66337
66337
  // src/manager-api/version.ts
66338
- var version = "10.2.0-alpha.6";
66338
+ var version = "10.2.0-alpha.8";
66339
66339
 
66340
66340
  // src/manager-api/modules/versions.ts
66341
66341
  var { VERSIONCHECK } = scope, getVersionCheckData = (0, import_memoizerific8.default)(1)(() => {
@@ -4308,7 +4308,7 @@ var MobileAbout = () => {
4308
4308
  ), react_default.createElement(
4309
4309
  LinkLine,
4310
4310
  {
4311
- href: "https://storybook.js.org/docs/react/get-started/install/?ref=ui",
4311
+ href: "https://storybook.js.org/docs/get-started/install?ref=ui",
4312
4312
  target: "_blank",
4313
4313
  rel: "noopener noreferrer"
4314
4314
  },
@@ -8,7 +8,7 @@ import {
8
8
  } from "../_browser-chunks/chunk-V5NV5R37.js";
9
9
  import {
10
10
  StatusTypeIdMismatchError as StatusTypeIdMismatchError2
11
- } from "../_browser-chunks/chunk-UXVP56J6.js";
11
+ } from "../_browser-chunks/chunk-POMIZRJL.js";
12
12
  import {
13
13
  StorybookError
14
14
  } from "../_browser-chunks/chunk-JVRDBUUP.js";
@@ -2042,19 +2042,19 @@ var init11 = ({
2042
2042
  updateStory: async (storyId, update2, ref) => {
2043
2043
  if (ref) {
2044
2044
  let { id: refId, index, filteredIndex } = ref;
2045
- index[storyId] = {
2045
+ index && index[storyId] && (index[storyId] = {
2046
2046
  ...index[storyId],
2047
2047
  ...update2
2048
- }, filteredIndex[storyId] = {
2048
+ }), filteredIndex && filteredIndex[storyId] && (filteredIndex[storyId] = {
2049
2049
  ...filteredIndex[storyId],
2050
2050
  ...update2
2051
- }, await fullAPI.updateRef(refId, { index, filteredIndex });
2051
+ }), await fullAPI.updateRef(refId, { index, filteredIndex });
2052
2052
  } else {
2053
2053
  let { index, filteredIndex } = store2.getState();
2054
- index && (index[storyId] = {
2054
+ index && index[storyId] && (index[storyId] = {
2055
2055
  ...index[storyId],
2056
2056
  ...update2
2057
- }), filteredIndex && (filteredIndex[storyId] = {
2057
+ }), filteredIndex && filteredIndex[storyId] && (filteredIndex[storyId] = {
2058
2058
  ...filteredIndex[storyId],
2059
2059
  ...update2
2060
2060
  }), (index || filteredIndex) && await store2.setState({ index, filteredIndex });
@@ -2338,7 +2338,7 @@ import { global as global8 } from "@storybook/global";
2338
2338
  import semver from "semver";
2339
2339
 
2340
2340
  // src/manager-api/version.ts
2341
- var version = "10.2.0-alpha.6";
2341
+ var version = "10.2.0-alpha.8";
2342
2342
 
2343
2343
  // src/manager-api/modules/versions.ts
2344
2344
  var { VERSIONCHECK } = global8, getVersionCheckData = (0, import_memoizerific2.default)(1)(() => {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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-PI4OGMRN.js";
20
- import "../_node-chunks/chunk-62HH4XOF.js";
19
+ } from "../_node-chunks/chunk-7B4JYHGV.js";
20
+ import "../_node-chunks/chunk-5WQXPM6D.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_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.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-JCHPJOPI.js";
26
- import "../_node-chunks/chunk-T53OKK5L.js";
27
- import "../_node-chunks/chunk-62HH4XOF.js";
25
+ } from "../_node-chunks/chunk-ZKB7MQRR.js";
26
+ import "../_node-chunks/chunk-2KSITKBI.js";
27
+ import "../_node-chunks/chunk-5WQXPM6D.js";
28
28
  var export_instance = import_npmlog.default;
29
29
  export {
30
30
  CLI_COLORS,
@@ -15970,7 +15970,7 @@ This is deprecated and won't work in Storybook 8 anymore.
15970
15970
  name: "NextJsSharpError",
15971
15971
  category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
15972
15972
  code: 1,
15973
- documentation: "https://storybook.js.org/docs/get-started/nextjs#faq",
15973
+ documentation: "https://storybook.js.org/docs/get-started/frameworks/nextjs#error-you-are-importing-avif-images-but-you-dont-have-sharp-installed-you-have-to-install-sharp-in-order-to-use-image-optimization-features-in-nextjs",
15974
15974
  message: dedent`
15975
15975
  You are importing avif images, but you don't have sharp installed.
15976
15976
 
@@ -39150,20 +39150,20 @@ var checkGlobals = (parameters2) => {
39150
39150
  parameters2 && (checkGlobals(parameters2), checkStorySort(parameters2));
39151
39151
  };
39152
39152
  function processCSFFile(moduleExports, importPath, title) {
39153
- let { default: defaultExport, __namedExportsOrder, ...namedExports } = moduleExports, firstStory = Object.values(namedExports)[0];
39154
- if (isStory(firstStory)) {
39155
- let meta2 = normalizeComponentAnnotations(firstStory.meta.input, title, importPath);
39153
+ let { default: defaultExport, __namedExportsOrder, ...namedExports } = moduleExports, factoryStory = Object.values(namedExports).find((it) => isStory(it));
39154
+ if (factoryStory) {
39155
+ let meta2 = normalizeComponentAnnotations(factoryStory.meta.input, title, importPath);
39156
39156
  checkDisallowedParameters(meta2.parameters);
39157
39157
  let csfFile2 = { meta: meta2, stories: {}, moduleExports };
39158
39158
  return Object.keys(namedExports).forEach((key) => {
39159
- if (isExportStory(key, meta2)) {
39159
+ if (isExportStory(key, meta2) && isStory(namedExports[key])) {
39160
39160
  let story = namedExports[key], storyMeta = normalizeStory(key, story.input, meta2);
39161
39161
  checkDisallowedParameters(storyMeta.parameters), csfFile2.stories[storyMeta.id] = storyMeta, getStoryChildren(story).forEach((child) => {
39162
39162
  let name = child.input.name, childId = toTestId(storyMeta.id, name);
39163
39163
  child.input.parameters ??= {}, child.input.parameters.__id = childId, csfFile2.stories[childId] = normalizeStory(name, child.input, meta2);
39164
39164
  });
39165
39165
  }
39166
- }), csfFile2.projectAnnotations = firstStory.meta.preview.composed, csfFile2;
39166
+ }), csfFile2.projectAnnotations = factoryStory.meta.preview.composed, csfFile2;
39167
39167
  }
39168
39168
  let meta = normalizeComponentAnnotations(
39169
39169
  defaultExport,
@@ -41166,7 +41166,7 @@ var VALIDATION_REGEXP = /^[a-zA-Z0-9 _-]*$/, NUMBER_REGEXP = /^-?[0-9]+(\.[0-9]+
41166
41166
  return Object.entries((0, import_picoquery.parse)(parts.join(";"), QUERY_OPTIONS)).reduce((acc, [key, value]) => validateArgs(key, value) ? Object.assign(acc, { [key]: value }) : (once.warn(dedent`
41167
41167
  Omitted potentially unsafe URL args.
41168
41168
 
41169
- More info: https://storybook.js.org/docs/writing-stories/args#setting-args-through-the-url?ref=error
41169
+ More info: https://storybook.js.org/docs/writing-stories/args?ref=error#setting-args-through-the-url
41170
41170
  `), acc), {});
41171
41171
  };
41172
41172
 
@@ -48,7 +48,7 @@ import {
48
48
  useStoryContext,
49
49
  userOrAutoTitle,
50
50
  userOrAutoTitleFromSpecifier
51
- } from "../_browser-chunks/chunk-KTOLYKZY.js";
51
+ } from "../_browser-chunks/chunk-VUZYLZ4B.js";
52
52
  import {
53
53
  pauseAnimations,
54
54
  waitForAnimations
@@ -20,7 +20,7 @@ import {
20
20
  StoryStoreAccessedBeforeInitializationError,
21
21
  UnknownArgTypesError,
22
22
  UnsupportedViewportDimensionError
23
- } from "./_browser-chunks/chunk-UXVP56J6.js";
23
+ } from "./_browser-chunks/chunk-POMIZRJL.js";
24
24
  import "./_browser-chunks/chunk-JVRDBUUP.js";
25
25
  import "./_browser-chunks/chunk-3LY4VQVK.js";
26
26
  import "./_browser-chunks/chunk-A242L54C.js";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -46,13 +46,13 @@ import {
46
46
  WebpackCompilationError,
47
47
  WebpackInvocationError,
48
48
  WebpackMissingStatsError
49
- } from "./_node-chunks/chunk-XKPOBYPY.js";
49
+ } from "./_node-chunks/chunk-S7FIFCTX.js";
50
50
  import {
51
51
  StorybookError
52
- } from "./_node-chunks/chunk-TNAUD72T.js";
53
- import "./_node-chunks/chunk-AQ5XNGJR.js";
54
- import "./_node-chunks/chunk-T53OKK5L.js";
55
- import "./_node-chunks/chunk-62HH4XOF.js";
52
+ } from "./_node-chunks/chunk-Q6WPGVIW.js";
53
+ import "./_node-chunks/chunk-TTGXODEY.js";
54
+ import "./_node-chunks/chunk-2KSITKBI.js";
55
+ import "./_node-chunks/chunk-5WQXPM6D.js";
56
56
  export {
57
57
  AddonVitestPostinstallConfigUpdateError,
58
58
  AddonVitestPostinstallError,
@@ -166,7 +166,14 @@ interface UpgradeSummary {
166
166
  eventId?: string;
167
167
  sessionId?: string;
168
168
  }
169
- declare const getPrecedingUpgrade: (events?: any) => Promise<UpgradeSummary | undefined>;
169
+ interface CacheEntry {
170
+ timestamp: number;
171
+ body: TelemetryEvent;
172
+ }
173
+ declare const getLastEvents: () => Promise<Record<EventType, CacheEntry>>;
174
+ declare const getPrecedingUpgrade: (events?: Partial<Record<EventType, CacheEntry>> | undefined) => Promise<UpgradeSummary | undefined>;
175
+
176
+ declare const getSessionId: () => Promise<string>;
170
177
 
171
178
  declare const addToGlobalContext: (key: string, value: any) => void;
172
179
 
@@ -174,4 +181,4 @@ declare const addToGlobalContext: (key: string, value: any) => void;
174
181
  declare const isExampleStoryId: (storyId: string) => boolean;
175
182
  declare const telemetry: (eventType: EventType, payload?: Payload, options?: Partial<Options>) => Promise<void>;
176
183
 
177
- export { type Context, type Dependency, ErrorCollector, type EventType, type IErrorWithStdErrAndStdOut, type InitPayload, type Options, type Payload, type StorybookAddon, type StorybookMetadata, type TelemetryData, type TelemetryEvent, addToGlobalContext, cleanPaths, computeStorybookMetadata, getPrecedingUpgrade, getStorybookMetadata, isExampleStoryId, metaFrameworks, oneWayHash, removeAnsiEscapeCodes, sanitizeAddonName, sanitizeError, telemetry };
184
+ export { type CacheEntry, type Context, type Dependency, ErrorCollector, type EventType, type IErrorWithStdErrAndStdOut, type InitPayload, type Options, type Payload, type StorybookAddon, type StorybookMetadata, type TelemetryData, type TelemetryEvent, addToGlobalContext, cleanPaths, computeStorybookMetadata, getLastEvents, getPrecedingUpgrade, getSessionId, getStorybookMetadata, isExampleStoryId, metaFrameworks, oneWayHash, removeAnsiEscapeCodes, sanitizeAddonName, sanitizeError, telemetry };