storybook 10.0.0-beta.0 → 10.0.0-beta.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 (126) hide show
  1. package/assets/server/openBrowser.applescript +94 -0
  2. package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
  3. package/dist/_browser-chunks/{WithTooltip-2E62HIBN.js → WithTooltip-SK46ZJ2J.js} +1 -1
  4. package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
  5. package/dist/_browser-chunks/{chunk-FWKO3E35.js → chunk-BOOOPFZF.js} +10 -3
  6. package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
  7. package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
  8. package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-HMIIJ6UD.js} +6 -6
  9. package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
  10. package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
  11. package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
  12. package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-PS3AOQI4.js} +48 -25
  13. package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
  14. package/dist/_browser-chunks/chunk-SHR3NNR3.js +5810 -0
  15. package/dist/_browser-chunks/{chunk-O5R5CGFA.js → chunk-TMDZCWME.js} +1 -2
  16. package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
  17. package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
  18. package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-R46XOLMC.js} +1 -1
  19. package/dist/_node-chunks/{builder-manager-OW6YGKXV.js → builder-manager-SJGIDEN6.js} +45 -155
  20. package/dist/_node-chunks/camelcase-VZHWABQV.js +18 -0
  21. package/dist/_node-chunks/{chunk-6JSVPEAU.js → chunk-6CZW7AGN.js} +7 -7
  22. package/dist/_node-chunks/{chunk-CD3IP6HA.js → chunk-6XT5OLNL.js} +12 -12
  23. package/dist/_node-chunks/{chunk-2H7LZ2SD.js → chunk-AHRH5RPR.js} +7 -7
  24. package/dist/_node-chunks/{chunk-5HLANIBM.js → chunk-AOH6ABSV.js} +7 -7
  25. package/dist/_node-chunks/chunk-C5V22GP7.js +79 -0
  26. package/dist/_node-chunks/{chunk-IBXERYDG.js → chunk-FIROF4DV.js} +7 -7
  27. package/dist/_node-chunks/{chunk-I3YCPGZJ.js → chunk-GUJVZUYI.js} +7 -7
  28. package/dist/_node-chunks/chunk-IHPLRRAR.js +4741 -0
  29. package/dist/_node-chunks/{chunk-7TISOZS6.js → chunk-JMXKCRWR.js} +30 -21
  30. package/dist/_node-chunks/{chunk-YWGNEBRO.js → chunk-JUMUXWEV.js} +162 -103
  31. package/dist/_node-chunks/{chunk-UIREEOC7.js → chunk-KGX33KXX.js} +7 -7
  32. package/dist/_node-chunks/{chunk-3QB3ZG6H.js → chunk-KLVABNEU.js} +7 -7
  33. package/dist/_node-chunks/{chunk-H5LTFJHQ.js → chunk-OL6DY6BT.js} +631 -752
  34. package/dist/_node-chunks/{chunk-X5GAZ3EW.js → chunk-ONJV3K2L.js} +399 -116
  35. package/dist/_node-chunks/{chunk-LKB7KRSV.js → chunk-PTHTD4RO.js} +223 -243
  36. package/dist/_node-chunks/{chunk-UHHZPSP7.js → chunk-QQ3Z5KGJ.js} +6 -6
  37. package/dist/_node-chunks/{chunk-MUD3GH3L.js → chunk-QRTDDTZJ.js} +9 -9
  38. package/dist/_node-chunks/chunk-R54K4KSM.js +1540 -0
  39. package/dist/_node-chunks/{chunk-IQAUGVYR.js → chunk-S2LZC6JK.js} +8 -8
  40. package/dist/_node-chunks/chunk-SFJFSPRT.js +62 -0
  41. package/dist/_node-chunks/{chunk-LH3BEEIR.js → chunk-SSN5PKIY.js} +6 -6
  42. package/dist/_node-chunks/{chunk-NOQITS3C.js → chunk-SXR2DITB.js} +7 -7
  43. package/dist/_node-chunks/{chunk-FWUE7SRE.js → chunk-TH5QVQRL.js} +7 -7
  44. package/dist/_node-chunks/chunk-U34NWAU2.js +18 -0
  45. package/dist/_node-chunks/{chunk-FBMMEEO4.js → chunk-UV3CZ3KS.js} +7 -7
  46. package/dist/_node-chunks/{chunk-NZGJJABJ.js → chunk-UVUGJDAI.js} +60 -102
  47. package/dist/_node-chunks/{chunk-GZUNYRFU.js → chunk-VOUNSD2E.js} +7 -7
  48. package/dist/_node-chunks/chunk-WFCPBKQJ.js +64656 -0
  49. package/dist/_node-chunks/{chunk-BFXER3XW.js → chunk-XHF3WWNP.js} +623 -750
  50. package/dist/_node-chunks/{chunk-ANEKBWDX.js → chunk-XU45KXNQ.js} +16 -25
  51. package/dist/_node-chunks/{camelcase-2K3EMR6G.js → chunk-YHO6XR7U.js} +9 -8
  52. package/dist/_node-chunks/{dist-465RSKRC.js → dist-IIC5PBL7.js} +9 -9
  53. package/dist/_node-chunks/{globby-LJ3MVB6M.js → globby-CJACC3HJ.js} +17 -13
  54. package/dist/_node-chunks/{lib-OW3DENXB.js → lib-ZY4TKSOR.js} +40 -16
  55. package/dist/_node-chunks/{mdx-N42X6CFJ-PYX2IFUO.js → mdx-N42X6CFJ-3XNW3DFO.js} +8 -8
  56. package/dist/_node-chunks/{p-limit-X4OG45RB.js → p-limit-R2OFT5HE.js} +76 -10
  57. package/dist/_node-chunks/{plugin-ALTIQMDE.js → plugin-5XD5R2KD.js} +10 -10
  58. package/dist/_node-chunks/{plugin-GE36R32R.js → plugin-WAWVQMVR.js} +10 -12
  59. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-NLCAF7S6.js → webpack-inject-mocker-runtime-plugin-SCRGJLIS.js} +1307 -847
  60. package/dist/_node-chunks/{webpack-mock-plugin-BRYODMCC.js → webpack-mock-plugin-3VAXEGG2.js} +9 -11
  61. package/dist/babel/index.d.ts +1 -1
  62. package/dist/babel/index.js +11 -12
  63. package/dist/bin/core.js +638 -187
  64. package/dist/bin/dispatcher.js +11 -11
  65. package/dist/bin/loader.js +8 -8
  66. package/dist/cli/index.d.ts +62 -75
  67. package/dist/cli/index.js +66 -56
  68. package/dist/common/index.d.ts +3 -1
  69. package/dist/common/index.js +22 -22
  70. package/dist/components/index.d.ts +234 -2
  71. package/dist/components/index.js +74 -5741
  72. package/dist/core-events/index.d.ts +18 -2
  73. package/dist/core-events/index.js +7 -1
  74. package/dist/core-server/index.d.ts +540 -39
  75. package/dist/core-server/index.js +4647 -4182
  76. package/dist/core-server/presets/common-manager.js +1570 -1272
  77. package/dist/core-server/presets/common-override-preset.js +9 -9
  78. package/dist/core-server/presets/common-preset.js +691 -38
  79. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -11
  80. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -12
  81. package/dist/csf/index.d.ts +9 -4
  82. package/dist/csf/index.js +50 -15
  83. package/dist/csf-tools/index.d.ts +47 -6
  84. package/dist/csf-tools/index.js +9 -9
  85. package/dist/docs-tools/index.js +4 -4
  86. package/dist/instrumenter/index.js +1 -1
  87. package/dist/manager/globals-runtime.js +9233 -18113
  88. package/dist/manager/globals.d.ts +0 -4
  89. package/dist/manager/globals.js +1 -6
  90. package/dist/manager/runtime.js +13396 -11518
  91. package/dist/manager-api/index.d.ts +540 -32
  92. package/dist/manager-api/index.js +364 -90
  93. package/dist/manager-errors.d.ts +527 -0
  94. package/dist/node-logger/index.d.ts +1 -1
  95. package/dist/node-logger/index.js +1136 -662
  96. package/dist/preview/globals.js +1 -1
  97. package/dist/preview/runtime.js +12103 -21579
  98. package/dist/preview-api/index.d.ts +3 -3
  99. package/dist/preview-api/index.js +10 -10
  100. package/dist/preview-errors.d.ts +527 -0
  101. package/dist/router/index.d.ts +668 -10
  102. package/dist/router/index.js +2 -2
  103. package/dist/server-errors.d.ts +527 -0
  104. package/dist/server-errors.js +10 -10
  105. package/dist/telemetry/index.d.ts +1 -1
  106. package/dist/telemetry/index.js +23 -25
  107. package/dist/test/index.js +1874 -4024
  108. package/dist/theming/index.d.ts +2 -2
  109. package/dist/theming/index.js +6 -6
  110. package/dist/types/index.d.ts +553 -16
  111. package/dist/viewport/index.d.ts +36 -4
  112. package/dist/viewport/index.js +1 -1
  113. package/package.json +9 -46
  114. package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
  115. package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
  116. package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
  117. package/dist/_node-chunks/chunk-27W2Z6VL.js +0 -28502
  118. package/dist/_node-chunks/chunk-G46DWX7Z.js +0 -266
  119. package/dist/_node-chunks/chunk-GZZDIJIB.js +0 -80
  120. package/dist/_node-chunks/chunk-JDKH3XYB.js +0 -9845
  121. package/dist/_node-chunks/chunk-R7RKO2DC.js +0 -35783
  122. package/dist/_node-chunks/chunk-T23YQHYB.js +0 -62
  123. package/dist/_node-chunks/chunk-VKKLKNFC.js +0 -2377
  124. package/dist/_node-chunks/chunk-W6GKFQ7F.js +0 -87
  125. package/dist/_node-chunks/chunk-YUYBO6S7.js +0 -18
  126. package/dist/_node-chunks/default-browser-id-Z6WQ7DZA.js +0 -1719
@@ -15,19 +15,22 @@ import {
15
15
  import {
16
16
  dequal
17
17
  } from "../_browser-chunks/chunk-2DK2T7MP.js";
18
+ import "../_browser-chunks/chunk-G33S6YM3.js";
19
+ import {
20
+ require_picocolors_browser
21
+ } from "../_browser-chunks/chunk-VUAFL5XK.js";
18
22
  import {
19
23
  mergeWith,
20
- pick
21
- } from "../_browser-chunks/chunk-YWDKX534.js";
24
+ pick,
25
+ toMerged
26
+ } from "../_browser-chunks/chunk-FA42P6MO.js";
22
27
  import "../_browser-chunks/chunk-WKCVJYVJ.js";
23
28
  import {
24
- countBy,
25
- mapValues,
26
- toMerged
27
- } from "../_browser-chunks/chunk-E7VLET3C.js";
29
+ mapValues
30
+ } from "../_browser-chunks/chunk-QK3L5AXO.js";
28
31
  import {
29
32
  isEqual
30
- } from "../_browser-chunks/chunk-4QPX7WIQ.js";
33
+ } from "../_browser-chunks/chunk-JJZMHC3A.js";
31
34
  import {
32
35
  require_memoizerific
33
36
  } from "../_browser-chunks/chunk-NVV6MIOE.js";
@@ -41,22 +44,147 @@ import {
41
44
  __toESM
42
45
  } from "../_browser-chunks/chunk-MM7DTO55.js";
43
46
 
44
- // ../node_modules/picocolors/picocolors.browser.js
45
- var require_picocolors_browser = __commonJS({
46
- "../node_modules/picocolors/picocolors.browser.js"(exports, module) {
47
- var x = String;
48
- var create2 = /* @__PURE__ */ __name(function() {
49
- return { isColorSupported: false, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x, blackBright: x, redBright: x, greenBright: x, yellowBright: x, blueBright: x, magentaBright: x, cyanBright: x, whiteBright: x, bgBlackBright: x, bgRedBright: x, bgGreenBright: x, bgYellowBright: x, bgBlueBright: x, bgMagentaBright: x, bgCyanBright: x, bgWhiteBright: x };
50
- }, "create");
51
- module.exports = create2();
52
- module.exports.createColors = create2;
47
+ // ../node_modules/toggle-selection/index.js
48
+ var require_toggle_selection = __commonJS({
49
+ "../node_modules/toggle-selection/index.js"(exports, module) {
50
+ module.exports = function() {
51
+ var selection = document.getSelection();
52
+ if (!selection.rangeCount) {
53
+ return function() {
54
+ };
55
+ }
56
+ var active = document.activeElement;
57
+ var ranges = [];
58
+ for (var i = 0; i < selection.rangeCount; i++) {
59
+ ranges.push(selection.getRangeAt(i));
60
+ }
61
+ switch (active.tagName.toUpperCase()) {
62
+ // .toUpperCase handles XHTML
63
+ case "INPUT":
64
+ case "TEXTAREA":
65
+ active.blur();
66
+ break;
67
+ default:
68
+ active = null;
69
+ break;
70
+ }
71
+ selection.removeAllRanges();
72
+ return function() {
73
+ selection.type === "Caret" && selection.removeAllRanges();
74
+ if (!selection.rangeCount) {
75
+ ranges.forEach(function(range) {
76
+ selection.addRange(range);
77
+ });
78
+ }
79
+ active && active.focus();
80
+ };
81
+ };
82
+ }
83
+ });
84
+
85
+ // ../node_modules/copy-to-clipboard/index.js
86
+ var require_copy_to_clipboard = __commonJS({
87
+ "../node_modules/copy-to-clipboard/index.js"(exports, module) {
88
+ "use strict";
89
+ var deselectCurrent = require_toggle_selection();
90
+ var clipboardToIE11Formatting = {
91
+ "text/plain": "Text",
92
+ "text/html": "Url",
93
+ "default": "Text"
94
+ };
95
+ var defaultMessage = "Copy to clipboard: #{key}, Enter";
96
+ function format(message) {
97
+ var copyKey = (/mac os x/i.test(navigator.userAgent) ? "\u2318" : "Ctrl") + "+C";
98
+ return message.replace(/#{\s*key\s*}/g, copyKey);
99
+ }
100
+ __name(format, "format");
101
+ function copy2(text, options) {
102
+ var debug, message, reselectPrevious, range, selection, mark, success = false;
103
+ if (!options) {
104
+ options = {};
105
+ }
106
+ debug = options.debug || false;
107
+ try {
108
+ reselectPrevious = deselectCurrent();
109
+ range = document.createRange();
110
+ selection = document.getSelection();
111
+ mark = document.createElement("span");
112
+ mark.textContent = text;
113
+ mark.ariaHidden = "true";
114
+ mark.style.all = "unset";
115
+ mark.style.position = "fixed";
116
+ mark.style.top = 0;
117
+ mark.style.clip = "rect(0, 0, 0, 0)";
118
+ mark.style.whiteSpace = "pre";
119
+ mark.style.webkitUserSelect = "text";
120
+ mark.style.MozUserSelect = "text";
121
+ mark.style.msUserSelect = "text";
122
+ mark.style.userSelect = "text";
123
+ mark.addEventListener("copy", function(e) {
124
+ e.stopPropagation();
125
+ if (options.format) {
126
+ e.preventDefault();
127
+ if (typeof e.clipboardData === "undefined") {
128
+ debug && console.warn("unable to use e.clipboardData");
129
+ debug && console.warn("trying IE specific stuff");
130
+ window.clipboardData.clearData();
131
+ var format2 = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"];
132
+ window.clipboardData.setData(format2, text);
133
+ } else {
134
+ e.clipboardData.clearData();
135
+ e.clipboardData.setData(options.format, text);
136
+ }
137
+ }
138
+ if (options.onCopy) {
139
+ e.preventDefault();
140
+ options.onCopy(e.clipboardData);
141
+ }
142
+ });
143
+ document.body.appendChild(mark);
144
+ range.selectNodeContents(mark);
145
+ selection.addRange(range);
146
+ var successful = document.execCommand("copy");
147
+ if (!successful) {
148
+ throw new Error("copy command was unsuccessful");
149
+ }
150
+ success = true;
151
+ } catch (err) {
152
+ debug && console.error("unable to copy using execCommand: ", err);
153
+ debug && console.warn("trying IE specific stuff");
154
+ try {
155
+ window.clipboardData.setData(options.format || "text", text);
156
+ options.onCopy && options.onCopy(window.clipboardData);
157
+ success = true;
158
+ } catch (err2) {
159
+ debug && console.error("unable to copy using clipboardData: ", err2);
160
+ debug && console.error("falling back to prompt");
161
+ message = format("message" in options ? options.message : defaultMessage);
162
+ window.prompt(message, text);
163
+ }
164
+ } finally {
165
+ if (selection) {
166
+ if (typeof selection.removeRange == "function") {
167
+ selection.removeRange(range);
168
+ } else {
169
+ selection.removeAllRanges();
170
+ }
171
+ }
172
+ if (mark) {
173
+ document.body.removeChild(mark);
174
+ }
175
+ reselectPrevious();
176
+ }
177
+ return success;
178
+ }
179
+ __name(copy2, "copy");
180
+ module.exports = copy2;
53
181
  }
54
182
  });
55
183
 
56
184
  // ../node_modules/store2/dist/store2.js
57
185
  var require_store2 = __commonJS({
58
186
  "../node_modules/store2/dist/store2.js"(exports, module) {
59
- (function(window, define) {
187
+ (function(window2, define) {
60
188
  var _ = {
61
189
  version: "2.14.4",
62
190
  areas: {},
@@ -383,17 +511,17 @@ var require_store2 = __commonJS({
383
511
  } else if (typeof module !== "undefined" && module.exports) {
384
512
  module.exports = store2;
385
513
  } else {
386
- if (window.store) {
387
- _.conflict = window.store;
514
+ if (window2.store) {
515
+ _.conflict = window2.store;
388
516
  }
389
- window.store = store2;
517
+ window2.store = store2;
390
518
  }
391
519
  })(exports, exports && exports.define);
392
520
  }
393
521
  });
394
522
 
395
523
  // src/manager-api/root.tsx
396
- import React3, {
524
+ import React4, {
397
525
  Component,
398
526
  Fragment,
399
527
  useCallback as useCallback2,
@@ -683,6 +811,18 @@ import { global as global2 } from "@storybook/global";
683
811
  // src/manager-api/lib/stories.ts
684
812
  import { sanitize } from "storybook/internal/csf";
685
813
 
814
+ // ../node_modules/es-toolkit/dist/array/countBy.mjs
815
+ function countBy(arr, mapper) {
816
+ const result = {};
817
+ for (let i = 0; i < arr.length; i++) {
818
+ const item = arr[i];
819
+ const key = mapper(item);
820
+ result[key] = (result[key] ?? 0) + 1;
821
+ }
822
+ return result;
823
+ }
824
+ __name(countBy, "countBy");
825
+
686
826
  // ../node_modules/es-toolkit/dist/array/partition.mjs
687
827
  function partition(arr, isInTruthy) {
688
828
  const truthy = [];
@@ -755,6 +895,7 @@ var transformSetStoriesStoryDataToPreparedStoryIndex = /* @__PURE__ */ __name((s
755
895
  const { argTypes, args, initialArgs } = story;
756
896
  acc[id] = {
757
897
  type: "story",
898
+ subtype: "story",
758
899
  ...base,
759
900
  parameters,
760
901
  argTypes,
@@ -832,19 +973,18 @@ var transformStoryIndexToStoriesHash = /* @__PURE__ */ __name((input, { provider
832
973
  index = index.v === 3 ? transformStoryIndexV3toV4(index) : index;
833
974
  index = index.v === 4 ? transformStoryIndexV4toV5(index) : index;
834
975
  index = index;
835
- const entryValues = Object.values(index.entries).filter((entry) => {
836
- let result = true;
837
- const storyStatuses = allStatuses[entry.id] ?? {};
838
- if (Object.values(storyStatuses).some(({ value }) => value === "status-value:error")) {
839
- return result;
976
+ const indexEntries = Object.values(index.entries);
977
+ const filterFunctions = Object.values(filters);
978
+ const entryValues = indexEntries.filter((entry) => {
979
+ const statuses = allStatuses[entry.id] ?? {};
980
+ if (Object.values(statuses).some(({ value }) => value === "status-value:error")) {
981
+ return true;
840
982
  }
841
- Object.values(filters).forEach((filter) => {
842
- if (result === false) {
843
- return;
844
- }
845
- result = filter({ ...entry, statuses: storyStatuses });
846
- });
847
- return result;
983
+ if (filterFunctions.every((fn) => fn({ ...entry, statuses }))) {
984
+ return true;
985
+ }
986
+ const children = indexEntries.filter((item) => "parent" in item && item.parent === entry.id);
987
+ return children.some((child) => filterFunctions.every((fn) => fn({ ...child, statuses })));
848
988
  });
849
989
  const { sidebar = {} } = provider.getConfig();
850
990
  const { showRoots, collapsedRoots = [], renderLabel } = sidebar;
@@ -867,7 +1007,7 @@ var transformStoryIndexToStoriesHash = /* @__PURE__ */ __name((input, { provider
867
1007
  throw new Error(
868
1008
  dedent`
869
1009
  Invalid part '${name}', leading to id === parentId ('${id}'), inside title '${title}'
870
-
1010
+
871
1011
  Did you create a path that uses the separator char accidentally, such as 'Vue <docs/>' where '/' is a separator char? See https://github.com/storybookjs/storybook/issues/6128
872
1012
  `
873
1013
  );
@@ -918,33 +1058,60 @@ var transformStoryIndexToStoriesHash = /* @__PURE__ */ __name((input, { provider
918
1058
  }
919
1059
  });
920
1060
  acc[item.id] = {
921
- type: "story",
922
1061
  tags: [],
923
1062
  ...item,
924
1063
  depth: paths.length,
925
- parent: paths[paths.length - 1],
1064
+ parent: "parent" in item ? item.parent : paths[paths.length - 1],
926
1065
  renderLabel,
927
1066
  prepared: !!item.parameters
928
1067
  };
929
1068
  return acc;
930
1069
  }, {});
931
1070
  function addItem(acc, item) {
932
- if (acc[item.id]) {
933
- return acc;
1071
+ if (!acc[item.id]) {
1072
+ acc[item.id] = item;
1073
+ if ("children" in item && item.children) {
1074
+ item.children.forEach((childId) => addItem(acc, storiesHashOutOfOrder[childId]));
1075
+ item.tags = item.children.reduce((currentTags, childId) => {
1076
+ return currentTags === null ? acc[childId].tags : intersect_default(currentTags, acc[childId].tags);
1077
+ }, null) || [];
1078
+ }
934
1079
  }
935
- acc[item.id] = item;
936
- if (item.type === "root" || item.type === "group" || item.type === "component") {
937
- item.children.forEach((childId) => addItem(acc, storiesHashOutOfOrder[childId]));
938
- item.tags = item.children.reduce((currentTags, childId) => {
939
- const child = acc[childId];
940
- return currentTags === null ? child.tags : intersect_default(currentTags, child.tags);
941
- }, null);
1080
+ if (item.type === "component") {
1081
+ const firstChild = acc[item.children[0]];
1082
+ if (firstChild && "importPath" in firstChild) {
1083
+ item.importPath = firstChild.importPath;
1084
+ }
942
1085
  }
943
1086
  return acc;
944
1087
  }
945
1088
  __name(addItem, "addItem");
946
- const orphanHash = Object.values(storiesHashOutOfOrder).filter((i) => i.type !== "root" && !i.parent).reduce(addItem, {});
947
- return Object.values(storiesHashOutOfOrder).filter((i) => i.type === "root").reduce(addItem, orphanHash);
1089
+ let storiesHash = Object.values(storiesHashOutOfOrder).filter((i) => i.type !== "root" && !i.parent).reduce((acc, item) => addItem(acc, item), {});
1090
+ storiesHash = Object.values(storiesHashOutOfOrder).filter((i) => i.type === "root").reduce(addItem, storiesHash);
1091
+ storiesHash = Object.values(storiesHash).reduce((acc, item) => {
1092
+ if (item.type === "story" && item.subtype === "test") {
1093
+ const story = acc[item.parent];
1094
+ const component = acc[story.parent];
1095
+ acc[component.id] = {
1096
+ ...component,
1097
+ // Remove test from the component node as it will be attached to the story node instead
1098
+ children: component.children && component.children.filter((id) => id !== item.id)
1099
+ };
1100
+ acc[story.id] = {
1101
+ ...story,
1102
+ // Add test to the story node
1103
+ children: (story.children || []).concat(item.id)
1104
+ };
1105
+ acc[item.id] = {
1106
+ ...item,
1107
+ depth: item.depth + 1
1108
+ };
1109
+ } else {
1110
+ acc[item.id] = item;
1111
+ }
1112
+ return acc;
1113
+ }, {});
1114
+ return storiesHash;
948
1115
  }, "transformStoryIndexToStoriesHash");
949
1116
  var addPreparedStories = /* @__PURE__ */ __name((newHash, oldHash) => {
950
1117
  if (!oldHash) {
@@ -954,6 +1121,9 @@ var addPreparedStories = /* @__PURE__ */ __name((newHash, oldHash) => {
954
1121
  Object.entries(newHash).map(([id, newEntry]) => {
955
1122
  const oldEntry = oldHash[id];
956
1123
  if (newEntry.type === "story" && oldEntry?.type === "story" && oldEntry.prepared) {
1124
+ if ("children" in oldEntry) {
1125
+ delete oldEntry.children;
1126
+ }
957
1127
  return [id, { ...oldEntry, ...newEntry, prepared: true }];
958
1128
  }
959
1129
  return [id, newEntry];
@@ -1323,7 +1493,7 @@ __export(layout_exports, {
1323
1493
  import { SET_CONFIG as SET_CONFIG2 } from "storybook/internal/core-events";
1324
1494
  import { global as global3 } from "@storybook/global";
1325
1495
  import { create } from "storybook/theming/create";
1326
- var { document } = global3;
1496
+ var { document: document2 } = global3;
1327
1497
  var isFunction = /* @__PURE__ */ __name((val) => typeof val === "function", "isFunction");
1328
1498
  var ActiveTabs = {
1329
1499
  SIDEBAR: "sidebar",
@@ -1517,7 +1687,7 @@ var init5 = /* @__PURE__ */ __name(({ store: store2, provider, singleStory }) =>
1517
1687
  if (!elementId) {
1518
1688
  return;
1519
1689
  }
1520
- const element = document.getElementById(elementId);
1690
+ const element = document2.getElementById(elementId);
1521
1691
  if (element) {
1522
1692
  element.focus();
1523
1693
  if (select) {
@@ -1561,6 +1731,13 @@ var init5 = /* @__PURE__ */ __name(({ store: store2, provider, singleStory }) =>
1561
1731
  }
1562
1732
  return showToolbar;
1563
1733
  },
1734
+ getShowPanelWithCustomisations(showPanel) {
1735
+ const state = store2.getState();
1736
+ if (isFunction(state.layoutCustomisations.showPanel)) {
1737
+ return state.layoutCustomisations.showPanel(state, showPanel) ?? showPanel;
1738
+ }
1739
+ return showPanel;
1740
+ },
1564
1741
  getNavSizeWithCustomisations(navSize) {
1565
1742
  const state = store2.getState();
1566
1743
  if (isFunction(state.layoutCustomisations.showSidebar)) {
@@ -1652,15 +1829,68 @@ var init6 = /* @__PURE__ */ __name(({ store: store2 }) => {
1652
1829
  }, "clearNotification")
1653
1830
  };
1654
1831
  const state = { notifications: [] };
1655
- return { api, state };
1832
+ return {
1833
+ api,
1834
+ state
1835
+ };
1836
+ }, "init");
1837
+
1838
+ // src/manager-api/modules/open-in-editor.tsx
1839
+ var open_in_editor_exports = {};
1840
+ __export(open_in_editor_exports, {
1841
+ init: () => init7
1842
+ });
1843
+ import React from "react";
1844
+ import {
1845
+ OPEN_IN_EDITOR_REQUEST,
1846
+ OPEN_IN_EDITOR_RESPONSE
1847
+ } from "storybook/internal/core-events";
1848
+ import { FailedIcon } from "@storybook/icons";
1849
+ var init7 = /* @__PURE__ */ __name(({ provider, fullAPI }) => {
1850
+ const api = {
1851
+ openInEditor(payload) {
1852
+ return new Promise((resolve) => {
1853
+ const { file, line, column } = payload;
1854
+ const handler = /* @__PURE__ */ __name((res) => {
1855
+ if (res.file === file && res.line === line && res.column === column) {
1856
+ provider.channel?.off(OPEN_IN_EDITOR_RESPONSE, handler);
1857
+ resolve(res);
1858
+ }
1859
+ }, "handler");
1860
+ provider.channel?.on(OPEN_IN_EDITOR_RESPONSE, handler);
1861
+ provider.channel?.emit(OPEN_IN_EDITOR_REQUEST, payload);
1862
+ });
1863
+ }
1864
+ };
1865
+ const state = { notifications: [] };
1866
+ return {
1867
+ api,
1868
+ state,
1869
+ init: /* @__PURE__ */ __name(async () => {
1870
+ const { color } = await import("../theming/index.js");
1871
+ provider.channel?.on(OPEN_IN_EDITOR_RESPONSE, (payload) => {
1872
+ if (payload.error !== null) {
1873
+ fullAPI.addNotification({
1874
+ id: "open-in-editor-error",
1875
+ content: {
1876
+ headline: "Failed to open in editor",
1877
+ subHeadline: payload.error || "Check the Storybook process on the command line for more details."
1878
+ },
1879
+ icon: React.createElement(FailedIcon, { color: color.negative }),
1880
+ duration: 8e3
1881
+ });
1882
+ }
1883
+ });
1884
+ }, "init")
1885
+ };
1656
1886
  }, "init");
1657
1887
 
1658
1888
  // src/manager-api/modules/provider.ts
1659
1889
  var provider_exports = {};
1660
1890
  __export(provider_exports, {
1661
- init: () => init7
1891
+ init: () => init8
1662
1892
  });
1663
- var init7 = /* @__PURE__ */ __name(({ provider, fullAPI }) => {
1893
+ var init8 = /* @__PURE__ */ __name(({ provider, fullAPI }) => {
1664
1894
  return {
1665
1895
  api: provider.renderPreview ? { renderPreview: provider.renderPreview } : {},
1666
1896
  state: {},
@@ -1673,9 +1903,9 @@ var init7 = /* @__PURE__ */ __name(({ provider, fullAPI }) => {
1673
1903
  // src/manager-api/modules/settings.ts
1674
1904
  var settings_exports = {};
1675
1905
  __export(settings_exports, {
1676
- init: () => init8
1906
+ init: () => init9
1677
1907
  });
1678
- var init8 = /* @__PURE__ */ __name(({ store: store2, navigate, fullAPI }) => {
1908
+ var init9 = /* @__PURE__ */ __name(({ store: store2, navigate, fullAPI }) => {
1679
1909
  const isSettingsScreenActive = /* @__PURE__ */ __name(() => {
1680
1910
  const { path } = fullAPI.getUrlState();
1681
1911
  return !!(path || "").match(/^\/settings/);
@@ -1717,10 +1947,11 @@ var shortcuts_exports = {};
1717
1947
  __export(shortcuts_exports, {
1718
1948
  controlOrMetaKey: () => controlOrMetaKey2,
1719
1949
  defaultShortcuts: () => defaultShortcuts,
1720
- init: () => init9,
1950
+ init: () => init10,
1721
1951
  isMacLike: () => isMacLike2,
1722
1952
  keys: () => keys
1723
1953
  });
1954
+ var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
1724
1955
  import {
1725
1956
  FORCE_REMOUNT,
1726
1957
  PREVIEW_KEYDOWN,
@@ -1731,8 +1962,8 @@ import { global as global5 } from "@storybook/global";
1731
1962
 
1732
1963
  // src/manager-api/lib/shortcut.ts
1733
1964
  import { global as global4 } from "@storybook/global";
1734
- var { navigator } = global4;
1735
- var isMacLike = /* @__PURE__ */ __name(() => navigator && navigator.platform ? !!navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i) : false, "isMacLike");
1965
+ var { navigator: navigator2 } = global4;
1966
+ var isMacLike = /* @__PURE__ */ __name(() => navigator2 && navigator2.platform ? !!navigator2.platform.match(/(Mac|iPhone|iPod|iPad)/i) : false, "isMacLike");
1736
1967
  var controlOrMetaSymbol = /* @__PURE__ */ __name(() => isMacLike() ? "\u2318" : "ctrl", "controlOrMetaSymbol");
1737
1968
  var controlOrMetaKey = /* @__PURE__ */ __name(() => isMacLike() ? "meta" : "control", "controlOrMetaKey");
1738
1969
  var optionOrAltSymbol = /* @__PURE__ */ __name(() => isMacLike() ? "\u2325" : "alt", "optionOrAltSymbol");
@@ -1754,14 +1985,31 @@ var eventToShortcut = /* @__PURE__ */ __name((e) => {
1754
1985
  if (e.shiftKey) {
1755
1986
  keys2.push("shift");
1756
1987
  }
1988
+ const codeUpper = e.code?.toUpperCase();
1989
+ const codeToCharMap = {
1990
+ MINUS: "-",
1991
+ EQUAL: "=",
1992
+ BRACKETLEFT: "[",
1993
+ BRACKETRIGHT: "]",
1994
+ BACKSLASH: "\\",
1995
+ SEMICOLON: ";",
1996
+ QUOTE: "'",
1997
+ BACKQUOTE: "`",
1998
+ COMMA: ",",
1999
+ PERIOD: ".",
2000
+ SLASH: "/"
2001
+ };
2002
+ const codeChar = codeUpper ? codeUpper.startsWith("KEY") && codeUpper.length === 4 ? codeUpper.replace("KEY", "") : codeUpper.startsWith("DIGIT") ? codeUpper.replace("DIGIT", "") : codeToCharMap[codeUpper] : void 0;
1757
2003
  if (e.key && e.key.length === 1 && e.key !== " ") {
1758
2004
  const key = e.key.toUpperCase();
1759
- const code = e.code?.toUpperCase().replace("KEY", "").replace("DIGIT", "");
2005
+ const code = codeChar;
1760
2006
  if (code && code.length === 1 && code !== key) {
1761
2007
  keys2.push([key, code]);
1762
2008
  } else {
1763
2009
  keys2.push(key);
1764
2010
  }
2011
+ } else if (e.key === "Dead" && codeChar) {
2012
+ keys2.push(codeChar);
1765
2013
  }
1766
2014
  if (e.key === " ") {
1767
2015
  keys2.push("space");
@@ -1834,15 +2082,15 @@ var keyToSymbol = /* @__PURE__ */ __name((key) => {
1834
2082
  if (key === "ArrowRight") {
1835
2083
  return "\u2192";
1836
2084
  }
1837
- return key.toUpperCase();
2085
+ return key?.toUpperCase();
1838
2086
  }, "keyToSymbol");
1839
2087
  var shortcutToHumanString = /* @__PURE__ */ __name((shortcut) => {
1840
2088
  return shortcut.map(keyToSymbol).join(" ");
1841
2089
  }, "shortcutToHumanString");
1842
2090
 
1843
2091
  // src/manager-api/modules/shortcuts.ts
1844
- var { navigator: navigator2, document: document2 } = global5;
1845
- var isMacLike2 = /* @__PURE__ */ __name(() => navigator2 && navigator2.platform ? !!navigator2.platform.match(/(Mac|iPhone|iPod|iPad)/i) : false, "isMacLike");
2092
+ var { navigator: navigator3, document: document3 } = global5;
2093
+ var isMacLike2 = /* @__PURE__ */ __name(() => navigator3 && navigator3.platform ? !!navigator3.platform.match(/(Mac|iPhone|iPod|iPad)/i) : false, "isMacLike");
1846
2094
  var controlOrMetaKey2 = /* @__PURE__ */ __name(() => isMacLike2() ? "meta" : "control", "controlOrMetaKey");
1847
2095
  function keys(o) {
1848
2096
  return Object.keys(o);
@@ -1868,7 +2116,11 @@ var defaultShortcuts = Object.freeze({
1868
2116
  // This one is not customizable
1869
2117
  collapseAll: [controlOrMetaKey2(), "shift", "ArrowUp"],
1870
2118
  expandAll: [controlOrMetaKey2(), "shift", "ArrowDown"],
1871
- remount: ["alt", "R"]
2119
+ remount: ["alt", "R"],
2120
+ openInEditor: ["alt", "shift", "E"],
2121
+ copyStoryLink: ["alt", "shift", "L"]
2122
+ // TODO: bring this back once we want to add shortcuts for this
2123
+ // copyStoryName: ['alt', 'shift', 'C'],
1872
2124
  });
1873
2125
  var addonsShortcuts = {};
1874
2126
  function shouldSkipShortcut(event) {
@@ -1883,7 +2135,7 @@ function shouldSkipShortcut(event) {
1883
2135
  return false;
1884
2136
  }
1885
2137
  __name(shouldSkipShortcut, "shouldSkipShortcut");
1886
- var init9 = /* @__PURE__ */ __name(({ store: store2, fullAPI, provider }) => {
2138
+ var init10 = /* @__PURE__ */ __name(({ store: store2, fullAPI, provider }) => {
1887
2139
  const api = {
1888
2140
  // Getting and setting shortcuts
1889
2141
  getShortcutKeys() {
@@ -1993,7 +2245,7 @@ var init9 = /* @__PURE__ */ __name(({ store: store2, fullAPI, provider }) => {
1993
2245
  break;
1994
2246
  }
1995
2247
  case "focusIframe": {
1996
- const element = document2.getElementById("storybook-preview-iframe");
2248
+ const element = document3.getElementById("storybook-preview-iframe");
1997
2249
  if (element) {
1998
2250
  try {
1999
2251
  element.contentWindow.focus();
@@ -2074,6 +2326,26 @@ var init9 = /* @__PURE__ */ __name(({ store: store2, fullAPI, provider }) => {
2074
2326
  fullAPI.emit(FORCE_REMOUNT, { storyId });
2075
2327
  break;
2076
2328
  }
2329
+ case "openInEditor": {
2330
+ if (global5.CONFIG_TYPE === "DEVELOPMENT") {
2331
+ fullAPI.openInEditor({
2332
+ file: fullAPI.getCurrentStoryData().importPath
2333
+ });
2334
+ }
2335
+ break;
2336
+ }
2337
+ // TODO: bring this back once we want to add shortcuts for this
2338
+ // case 'copyStoryName': {
2339
+ // const storyData = fullAPI.getCurrentStoryData();
2340
+ // if (storyData.type === 'story') {
2341
+ // copy(storyData.exportName);
2342
+ // }
2343
+ // break;
2344
+ // }
2345
+ case "copyStoryLink": {
2346
+ (0, import_copy_to_clipboard.default)(window.location.href);
2347
+ break;
2348
+ }
2077
2349
  default:
2078
2350
  addonsShortcuts[feature].action();
2079
2351
  break;
@@ -2089,7 +2361,7 @@ var init9 = /* @__PURE__ */ __name(({ store: store2, fullAPI, provider }) => {
2089
2361
  )
2090
2362
  };
2091
2363
  const initModule = /* @__PURE__ */ __name(() => {
2092
- document2.addEventListener("keydown", (event) => {
2364
+ document3.addEventListener("keydown", (event) => {
2093
2365
  if (!shouldSkipShortcut(event)) {
2094
2366
  api.handleKeydownEvent(event);
2095
2367
  }
@@ -2104,7 +2376,7 @@ var init9 = /* @__PURE__ */ __name(({ store: store2, fullAPI, provider }) => {
2104
2376
  // src/manager-api/modules/stories.ts
2105
2377
  var stories_exports = {};
2106
2378
  __export(stories_exports, {
2107
- init: () => init10
2379
+ init: () => init11
2108
2380
  });
2109
2381
  import { logger as logger5 } from "storybook/internal/client-logger";
2110
2382
  import {
@@ -2272,12 +2544,12 @@ function createStatusStore({
2272
2544
  __name(createStatusStore, "createStatusStore");
2273
2545
 
2274
2546
  // src/shared/universal-store/use-universal-store-manager.ts
2275
- import * as React from "react";
2547
+ import * as React2 from "react";
2276
2548
  var useUniversalStore = /* @__PURE__ */ __name((universalStore, selector) => {
2277
- const snapshotRef = React.useRef(
2549
+ const snapshotRef = React2.useRef(
2278
2550
  selector ? selector(universalStore.getState()) : universalStore.getState()
2279
2551
  );
2280
- const subscribe = React.useCallback(
2552
+ const subscribe = React2.useCallback(
2281
2553
  (listener) => universalStore.onStateChange((state2, previousState) => {
2282
2554
  if (!selector) {
2283
2555
  snapshotRef.current = state2;
@@ -2294,7 +2566,7 @@ var useUniversalStore = /* @__PURE__ */ __name((universalStore, selector) => {
2294
2566
  }),
2295
2567
  [universalStore, selector]
2296
2568
  );
2297
- const getSnapshot = React.useCallback(() => {
2569
+ const getSnapshot = React2.useCallback(() => {
2298
2570
  const currentState = universalStore.getState();
2299
2571
  const selectedState = selector ? selector(currentState) : currentState;
2300
2572
  if (isEqual(selectedState, snapshotRef.current)) {
@@ -2303,7 +2575,7 @@ var useUniversalStore = /* @__PURE__ */ __name((universalStore, selector) => {
2303
2575
  snapshotRef.current = selectedState;
2304
2576
  return snapshotRef.current;
2305
2577
  }, [universalStore, selector]);
2306
- const state = React.useSyncExternalStore(subscribe, getSnapshot);
2578
+ const state = React2.useSyncExternalStore(subscribe, getSnapshot);
2307
2579
  return [state, universalStore.setState];
2308
2580
  }, "useUniversalStore");
2309
2581
 
@@ -2335,7 +2607,7 @@ function removeRemovedOptions(options) {
2335
2607
  return result;
2336
2608
  }
2337
2609
  __name(removeRemovedOptions, "removeRemovedOptions");
2338
- var init10 = /* @__PURE__ */ __name(({
2610
+ var init11 = /* @__PURE__ */ __name(({
2339
2611
  fullAPI,
2340
2612
  store: store2,
2341
2613
  navigate,
@@ -2492,8 +2764,9 @@ var init10 = /* @__PURE__ */ __name(({
2492
2764
  }
2493
2765
  if (node.type === "story") {
2494
2766
  results.push(node.id);
2495
- } else if ("children" in node) {
2496
- node.children.forEach((childId) => findChildEntriesRecursively(childId, results));
2767
+ }
2768
+ if ("children" in node) {
2769
+ node.children?.forEach((childId) => findChildEntriesRecursively(childId, results));
2497
2770
  }
2498
2771
  return results;
2499
2772
  }, "findChildEntriesRecursively");
@@ -2836,7 +3109,7 @@ var init10 = /* @__PURE__ */ __name(({
2836
3109
  // src/manager-api/modules/url.ts
2837
3110
  var url_exports = {};
2838
3111
  __export(url_exports, {
2839
- init: () => init11
3112
+ init: () => init12
2840
3113
  });
2841
3114
  import {
2842
3115
  GLOBALS_UPDATED as GLOBALS_UPDATED2,
@@ -2913,7 +3186,7 @@ var initialUrlSupport = /* @__PURE__ */ __name(({
2913
3186
  prevParams = customQueryParams;
2914
3187
  return { viewMode, layout, ui, selectedPanel, location: location2, path, customQueryParams, storyId };
2915
3188
  }, "initialUrlSupport");
2916
- var init11 = /* @__PURE__ */ __name((moduleArgs) => {
3189
+ var init12 = /* @__PURE__ */ __name((moduleArgs) => {
2917
3190
  const { store: store2, navigate, provider, fullAPI } = moduleArgs;
2918
3191
  const navigateTo = /* @__PURE__ */ __name((path, queryParams = {}, options = {}) => {
2919
3192
  const params = Object.entries(queryParams).filter(([, v]) => v).sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${k}=${v}`);
@@ -3009,14 +3282,14 @@ var init11 = /* @__PURE__ */ __name((moduleArgs) => {
3009
3282
  // src/manager-api/modules/versions.ts
3010
3283
  var versions_exports = {};
3011
3284
  __export(versions_exports, {
3012
- init: () => init12
3285
+ init: () => init13
3013
3286
  });
3014
3287
  var import_memoizerific2 = __toESM(require_memoizerific(), 1);
3015
3288
  import { global as global8 } from "@storybook/global";
3016
3289
  import semver from "semver";
3017
3290
 
3018
3291
  // src/manager-api/version.ts
3019
- var version = "10.0.0-beta.0";
3292
+ var version = "10.0.0-beta.10";
3020
3293
 
3021
3294
  // src/manager-api/modules/versions.ts
3022
3295
  var { VERSIONCHECK } = global8;
@@ -3033,7 +3306,7 @@ var normalizeRendererName = /* @__PURE__ */ __name((renderer) => {
3033
3306
  }
3034
3307
  return renderer;
3035
3308
  }, "normalizeRendererName");
3036
- var init12 = /* @__PURE__ */ __name(({ store: store2 }) => {
3309
+ var init13 = /* @__PURE__ */ __name(({ store: store2 }) => {
3037
3310
  const { dismissedVersionNotification } = store2.getState();
3038
3311
  const state = {
3039
3312
  versions: {
@@ -3122,9 +3395,9 @@ var init12 = /* @__PURE__ */ __name(({ store: store2 }) => {
3122
3395
  // src/manager-api/modules/whatsnew.tsx
3123
3396
  var whatsnew_exports = {};
3124
3397
  __export(whatsnew_exports, {
3125
- init: () => init13
3398
+ init: () => init14
3126
3399
  });
3127
- import React2 from "react";
3400
+ import React3 from "react";
3128
3401
  import {
3129
3402
  REQUEST_WHATS_NEW_DATA,
3130
3403
  RESULT_WHATS_NEW_DATA,
@@ -3134,7 +3407,7 @@ import {
3134
3407
  import { global as global9 } from "@storybook/global";
3135
3408
  var WHATS_NEW_NOTIFICATION_ID = "whats-new";
3136
3409
  var StorybookIcon = /* @__PURE__ */ __name(({ color = "currentColor", size = 14 }) => {
3137
- return React2.createElement(
3410
+ return React3.createElement(
3138
3411
  "svg",
3139
3412
  {
3140
3413
  width: size,
@@ -3143,7 +3416,7 @@ var StorybookIcon = /* @__PURE__ */ __name(({ color = "currentColor", size = 14
3143
3416
  fill: "none",
3144
3417
  xmlns: "http://www.w3.org/2000/svg"
3145
3418
  },
3146
- React2.createElement(
3419
+ React3.createElement(
3147
3420
  "path",
3148
3421
  {
3149
3422
  fillRule: "evenodd",
@@ -3154,7 +3427,7 @@ var StorybookIcon = /* @__PURE__ */ __name(({ color = "currentColor", size = 14
3154
3427
  )
3155
3428
  );
3156
3429
  }, "StorybookIcon");
3157
- var init13 = /* @__PURE__ */ __name(({ fullAPI, store: store2, provider }) => {
3430
+ var init14 = /* @__PURE__ */ __name(({ fullAPI, store: store2, provider }) => {
3158
3431
  const state = {
3159
3432
  whatsNewData: void 0
3160
3433
  };
@@ -3216,7 +3489,7 @@ var init13 = /* @__PURE__ */ __name(({ fullAPI, store: store2, provider }) => {
3216
3489
  headline: whatsNewData.title,
3217
3490
  subHeadline: "Learn what's new in Storybook"
3218
3491
  },
3219
- icon: React2.createElement(StorybookIcon, null),
3492
+ icon: React3.createElement(StorybookIcon, null),
3220
3493
  onClear({ dismissed }) {
3221
3494
  if (dismissed) {
3222
3495
  setWhatsNewCache({ lastDismissedPost: whatsNewData.url });
@@ -3409,7 +3682,8 @@ var _ManagerProvider = class _ManagerProvider extends Component {
3409
3682
  globals_exports,
3410
3683
  url_exports,
3411
3684
  versions_exports,
3412
- whatsnew_exports
3685
+ whatsnew_exports,
3686
+ open_in_editor_exports
3413
3687
  ].map(
3414
3688
  (m) => m.init({ ...routeData, ...optionsData, ...apiData, state: this.state, fullAPI: this.api })
3415
3689
  );
@@ -3442,14 +3716,14 @@ var _ManagerProvider = class _ManagerProvider extends Component {
3442
3716
  state: this.state,
3443
3717
  api: this.api
3444
3718
  };
3445
- return React3.createElement(EffectOnMount, { effect: this.initModules }, React3.createElement(ManagerContext.Provider, { value }, React3.createElement(ManagerConsumer, null, children)));
3719
+ return React4.createElement(EffectOnMount, { effect: this.initModules }, React4.createElement(ManagerContext.Provider, { value }, React4.createElement(ManagerConsumer, null, children)));
3446
3720
  }
3447
3721
  };
3448
3722
  __name(_ManagerProvider, "ManagerProvider");
3449
3723
  _ManagerProvider.displayName = "Manager";
3450
3724
  var ManagerProvider = _ManagerProvider;
3451
3725
  var EffectOnMount = /* @__PURE__ */ __name(({ children, effect }) => {
3452
- React3.useEffect(effect, []);
3726
+ React4.useEffect(effect, []);
3453
3727
  return children;
3454
3728
  }, "EffectOnMount");
3455
3729
  var defaultFilter = /* @__PURE__ */ __name((c) => c, "defaultFilter");
@@ -3462,7 +3736,7 @@ function ManagerConsumer({
3462
3736
  const renderer = useRef2(children);
3463
3737
  const filterer = useRef2(filter);
3464
3738
  if (typeof renderer.current !== "function") {
3465
- return React3.createElement(Fragment, null, renderer.current);
3739
+ return React4.createElement(Fragment, null, renderer.current);
3466
3740
  }
3467
3741
  const comboData = filterer.current(managerContext);
3468
3742
  const comboDataArray = useMemo(() => {
@@ -3470,7 +3744,7 @@ function ManagerConsumer({
3470
3744
  }, [managerContext.state]);
3471
3745
  return useMemo(() => {
3472
3746
  const Child = renderer.current;
3473
- return React3.createElement(Child, { ...comboData });
3747
+ return React4.createElement(Child, { ...comboData });
3474
3748
  }, comboDataArray);
3475
3749
  }
3476
3750
  __name(ManagerConsumer, "ManagerConsumer");