storybook 10.2.0-alpha.5 → 10.2.0-alpha.7

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 (70) hide show
  1. package/dist/_browser-chunks/{chunk-HX32VQZR.js → chunk-EUPBEOK3.js} +2 -2
  2. package/dist/_browser-chunks/{chunk-6QKNWBQB.js → chunk-LOTN4ZCW.js} +14 -10
  3. package/dist/_browser-chunks/{chunk-UXVP56J6.js → chunk-POMIZRJL.js} +1 -1
  4. package/dist/_node-chunks/{builder-manager-OWA7PM5D.js → builder-manager-CUNI3ZJ4.js} +12 -12
  5. package/dist/_node-chunks/{camelcase-2LEK4OOC.js → camelcase-4GVAWYWU.js} +7 -7
  6. package/dist/_node-chunks/{chunk-MJEVYN6O.js → chunk-2TPGTNH3.js} +7 -7
  7. package/dist/_node-chunks/{chunk-53QZPC5B.js → chunk-56LVYN72.js} +7 -7
  8. package/dist/_node-chunks/chunk-AT23E4EQ.js +61 -0
  9. package/dist/_node-chunks/{chunk-J7VMFLRZ.js → chunk-BUUY73HB.js} +6 -6
  10. package/dist/_node-chunks/{chunk-FUGUVTSE.js → chunk-BVT57OPU.js} +8 -8
  11. package/dist/_node-chunks/{chunk-Q4YMOGYF.js → chunk-DF3MHTVA.js} +8 -8
  12. package/dist/_node-chunks/{chunk-TM67IYGR.js → chunk-FVVGYCVC.js} +7 -7
  13. package/dist/_node-chunks/{chunk-5MG7AO5M.js → chunk-JVSFH4RF.js} +14 -14
  14. package/dist/_node-chunks/{chunk-VG22ND3P.js → chunk-LPSISNQS.js} +76 -19
  15. package/dist/_node-chunks/chunk-LZSDDOT4.js +23 -0
  16. package/dist/_node-chunks/{chunk-APNNQRRU.js → chunk-M5E3YC4T.js} +6 -6
  17. package/dist/_node-chunks/{chunk-UIW2C2AI.js → chunk-NYGO6SRI.js} +6 -6
  18. package/dist/_node-chunks/{chunk-HT3TF35B.js → chunk-P445LZJB.js} +6 -6
  19. package/dist/_node-chunks/{chunk-SKKDMIEL.js → chunk-PGJHGLNH.js} +9 -9
  20. package/dist/_node-chunks/{chunk-WAM2AUH6.js → chunk-PQM4RHC4.js} +7 -7
  21. package/dist/_node-chunks/{chunk-QUCPWX6N.js → chunk-PYUJOHPH.js} +15 -15
  22. package/dist/_node-chunks/{chunk-WMGB2RD3.js → chunk-QJ6C6Y4J.js} +7 -7
  23. package/dist/_node-chunks/{chunk-ZRAJ6YTG.js → chunk-R3N2GWVX.js} +32 -32
  24. package/dist/_node-chunks/{chunk-BPLKNOG7.js → chunk-RCTV2GMQ.js} +7 -7
  25. package/dist/_node-chunks/{chunk-LOJ6VLWV.js → chunk-TBPJCWU7.js} +6 -6
  26. package/dist/_node-chunks/chunk-TTG4OTIQ.js +18 -0
  27. package/dist/_node-chunks/{chunk-TX3LEYMY.js → chunk-VCZD6QSG.js} +9 -9
  28. package/dist/_node-chunks/{chunk-JRJT7Q2N.js → chunk-VRAZAZEV.js} +7 -7
  29. package/dist/_node-chunks/{chunk-3NPQ2Y77.js → chunk-Y53XRTM4.js} +18 -18
  30. package/dist/_node-chunks/{chunk-RJ6MVIQ7.js → chunk-Y6L7H22H.js} +6 -6
  31. package/dist/_node-chunks/{chunk-TUFR2XYI.js → chunk-YPUOZX6Y.js} +6 -6
  32. package/dist/_node-chunks/{chunk-Q2N5EUMK.js → chunk-ZNQQBZIL.js} +7 -7
  33. package/dist/_node-chunks/{dist-KMT22HT2.js → dist-5DA7I4HZ.js} +9 -9
  34. package/dist/_node-chunks/{globby-MSDE3LN6.js → globby-UXUG5UXW.js} +9 -9
  35. package/dist/_node-chunks/{lib-2BTWTGXL.js → lib-JGWMRG56.js} +7 -7
  36. package/dist/_node-chunks/{mdx-N42X6CFJ-RO5JQN35.js → mdx-N42X6CFJ-SS3BBRSA.js} +8 -8
  37. package/dist/_node-chunks/{p-limit-6ZDUMRV5.js → p-limit-QEWD3I7K.js} +7 -7
  38. package/dist/babel/index.js +10 -10
  39. package/dist/bin/core.js +12 -12
  40. package/dist/bin/dispatcher.js +11 -11
  41. package/dist/bin/loader.js +9 -9
  42. package/dist/cli/index.d.ts +0 -1
  43. package/dist/cli/index.js +18 -18
  44. package/dist/common/index.js +19 -19
  45. package/dist/components/index.js +1 -1
  46. package/dist/core-server/index.js +259 -633
  47. package/dist/core-server/presets/common-manager.js +48 -27
  48. package/dist/core-server/presets/common-override-preset.js +9 -9
  49. package/dist/core-server/presets/common-preset.js +27 -29
  50. package/dist/csf/index.d.ts +41 -11
  51. package/dist/csf/index.js +2 -2
  52. package/dist/csf-tools/index.js +9 -9
  53. package/dist/docs-tools/index.js +1 -1
  54. package/dist/manager/globals-runtime.js +7 -7
  55. package/dist/manager/runtime.js +4 -4
  56. package/dist/manager-api/index.js +7 -7
  57. package/dist/mocking-utils/index.js +8 -8
  58. package/dist/node-logger/index.js +9 -9
  59. package/dist/preview/runtime.js +2 -2
  60. package/dist/preview-api/index.js +2 -2
  61. package/dist/preview-errors.js +1 -1
  62. package/dist/server-errors.js +11 -11
  63. package/dist/telemetry/index.d.ts +9 -2
  64. package/dist/telemetry/index.js +27 -25
  65. package/dist/viewport/index.d.ts +3 -3
  66. package/package.json +2 -2
  67. package/dist/_node-chunks/chunk-4P6JV5PD.js +0 -61
  68. package/dist/_node-chunks/chunk-IMOJACVP.js +0 -23
  69. package/dist/_node-chunks/chunk-IV4K2PSX.js +0 -18
  70. package/dist/_node-chunks/chunk-O72O5WMW.js +0 -72
@@ -43,9 +43,6 @@ import {
43
43
  import "../../_browser-chunks/chunk-HPYUT3WS.js";
44
44
  import "../../_browser-chunks/chunk-2NDLAB5X.js";
45
45
  import "../../_browser-chunks/chunk-NZMVUW5T.js";
46
- import {
47
- require_memoizerific
48
- } from "../../_browser-chunks/chunk-ZCFV7BZB.js";
49
46
  import {
50
47
  ADDON_ID,
51
48
  CLEAR_ID,
@@ -2454,9 +2451,11 @@ var { window: globalWindow } = globalThis, Wrapper5 = styled9.div(({ theme: them
2454
2451
  ), [forceVisible, setForceVisible] = useState4(!1), onForceVisible = useCallback3(() => {
2455
2452
  onChange({}), setForceVisible(!0);
2456
2453
  }, [setForceVisible]), htmlElRef = useRef3(null);
2457
- if (useEffect4(() => {
2454
+ useEffect4(() => {
2458
2455
  forceVisible && htmlElRef.current && htmlElRef.current.select();
2459
- }, [forceVisible]), !hasData)
2456
+ }, [forceVisible]);
2457
+ let jsonString = useMemo(() => JSON.stringify(data ?? "", null, 2), [data]);
2458
+ if (!hasData)
2460
2459
  return React12.createElement(
2461
2460
  Button3,
2462
2461
  {
@@ -2474,7 +2473,8 @@ var { window: globalWindow } = globalThis, Wrapper5 = styled9.div(({ theme: them
2474
2473
  id: getControlId(name),
2475
2474
  minRows: 3,
2476
2475
  name,
2477
- defaultValue: value2 === null ? "" : JSON.stringify(value2, null, 2),
2476
+ key: jsonString,
2477
+ defaultValue: jsonString,
2478
2478
  onBlur: (event) => updateRaw(event.target.value),
2479
2479
  placeholder: "Edit JSON string...",
2480
2480
  autoFocus: forceVisible,
@@ -2871,9 +2871,8 @@ var Table = styled13.table(({ theme: theme3 }) => ({
2871
2871
 
2872
2872
  // ../addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
2873
2873
  import React19, { useState as useState7 } from "react";
2874
- import { SyntaxHighlighter, TooltipProvider, codeCommon as codeCommon2 } from "storybook/internal/components";
2874
+ import { PopoverProvider, SyntaxHighlighter, codeCommon as codeCommon2 } from "storybook/internal/components";
2875
2875
  import { ChevronSmallDownIcon as ChevronSmallDownIcon2, ChevronSmallUpIcon } from "@storybook/icons";
2876
- var import_memoizerific = __toESM(require_memoizerific(), 1);
2877
2876
  import { styled as styled14 } from "storybook/theming";
2878
2877
  var ITEMS_BEFORE_EXPANSION = 8, Summary = styled14.div(({ isExpanded }) => ({
2879
2878
  display: "flex",
@@ -2882,7 +2881,24 @@ var ITEMS_BEFORE_EXPANSION = 8, Summary = styled14.div(({ isExpanded }) => ({
2882
2881
  alignItems: "flex-start",
2883
2882
  marginBottom: "-4px",
2884
2883
  minWidth: 100
2885
- })), Text3 = styled14.span(codeCommon2, ({ theme: theme3, simple = !1 }) => ({
2884
+ })), DetailsContainer = styled14.details({
2885
+ display: "flex",
2886
+ flexDirection: "column",
2887
+ summary: {
2888
+ order: 2
2889
+ },
2890
+ "summary::-webkit-details-marker": {
2891
+ display: "none"
2892
+ },
2893
+ "summary::marker": {
2894
+ content: "none"
2895
+ }
2896
+ }), AlignedDetails = styled14.div({
2897
+ display: "flex",
2898
+ flexDirection: "column",
2899
+ flexWrap: "wrap",
2900
+ alignItems: "flex-start"
2901
+ }), Text3 = styled14.span(codeCommon2, ({ theme: theme3, simple = !1 }) => ({
2886
2902
  flex: "0 0 auto",
2887
2903
  fontFamily: theme3.typography.fonts.mono,
2888
2904
  fontSize: theme3.typography.size.s1,
@@ -2900,13 +2916,16 @@ var ITEMS_BEFORE_EXPANSION = 8, Summary = styled14.div(({ isExpanded }) => ({
2900
2916
  border: "0 none",
2901
2917
  paddingLeft: 0
2902
2918
  }
2903
- })), ExpandButton = styled14.button(({ theme: theme3 }) => ({
2919
+ })), ExpandButton = styled14.summary(({ theme: theme3 }) => ({
2904
2920
  fontFamily: theme3.typography.fonts.mono,
2905
2921
  color: theme3.color.secondary,
2906
- marginBottom: "4px",
2922
+ cursor: "pointer",
2923
+ lineHeight: "normal",
2924
+ margin: "0 0 4px",
2925
+ padding: "1px 6px",
2907
2926
  background: "none",
2908
2927
  border: "none"
2909
- })), Expandable = styled14.div(codeCommon2, ({ theme: theme3 }) => ({
2928
+ })), Expandable = styled14.button(codeCommon2, ({ theme: theme3 }) => ({
2910
2929
  fontFamily: theme3.typography.fonts.mono,
2911
2930
  color: theme3.color.secondary,
2912
2931
  fontSize: theme3.typography.size.s1,
@@ -2914,12 +2933,19 @@ var ITEMS_BEFORE_EXPANSION = 8, Summary = styled14.div(({ isExpanded }) => ({
2914
2933
  margin: 0,
2915
2934
  whiteSpace: "nowrap",
2916
2935
  display: "flex",
2917
- alignItems: "center"
2918
- })), Detail = styled14.div(({ theme: theme3, width }) => ({
2919
- width,
2936
+ alignItems: "center",
2937
+ cursor: "pointer",
2938
+ "&:hover": {
2939
+ border: theme3.base === "light" ? "1px solid hsl(0 0 0 / 0.15)" : "1px solid hsl(0 0 100 / 0.15)"
2940
+ },
2941
+ "&:focus-visible": {
2942
+ outline: `2px solid ${theme3.color.secondary}`,
2943
+ outlineOffset: "2px"
2944
+ }
2945
+ })), Detail = styled14.div(({ theme: theme3 }) => ({
2920
2946
  minWidth: 200,
2921
2947
  maxWidth: 800,
2922
- padding: 15,
2948
+ paddingRight: 16,
2923
2949
  // Don't remove the mono fontFamily here even if it seems useless, this is used by the browser to calculate the length of a "ch" unit.
2924
2950
  fontFamily: theme3.typography.fonts.mono,
2925
2951
  fontSize: theme3.typography.size.s1,
@@ -2932,18 +2958,12 @@ var ITEMS_BEFORE_EXPANSION = 8, Summary = styled14.div(({ isExpanded }) => ({
2932
2958
  marginLeft: 4
2933
2959
  }), ChevronDownIcon = styled14(ChevronSmallDownIcon2)({
2934
2960
  marginLeft: 4
2935
- }), EmptyArg = () => React19.createElement("span", null, "-"), ArgText = ({ text, simple }) => React19.createElement(Text3, { simple }, text), calculateDetailWidth = (0, import_memoizerific.default)(1e3)((detail) => {
2936
- let lines = detail.split(/\r?\n/);
2937
- return `${Math.max(...lines.map((x2) => x2.length))}ch`;
2938
- }), getSummaryItems = (summary) => {
2961
+ }), EmptyArg = () => React19.createElement("span", null, "-"), ArgText = ({ text, simple }) => React19.createElement(Text3, { simple }, text), getSummaryItems = (summary) => {
2939
2962
  if (!summary)
2940
2963
  return [summary];
2941
2964
  let summaryItems = summary.split("|").map((value2) => value2.trim());
2942
2965
  return uniq(summaryItems);
2943
- }, renderSummaryItems = (summaryItems, isExpanded = !0) => {
2944
- let items = summaryItems;
2945
- return isExpanded || (items = summaryItems.slice(0, ITEMS_BEFORE_EXPANSION)), items.map((item) => React19.createElement(ArgText, { key: item, text: item === "" ? '""' : item }));
2946
- }, ArgSummary = ({ value: value2, initialExpandedArgs }) => {
2966
+ }, renderSummaryItems = (summaryItems) => summaryItems.slice(0, ITEMS_BEFORE_EXPANSION).map((item) => React19.createElement(ArgText, { key: item, text: item === "" ? '""' : item })), renderExpandedItems = (summaryItems) => summaryItems.slice(ITEMS_BEFORE_EXPANSION).map((item) => React19.createElement(ArgText, { key: item, text: item === "" ? '""' : item })), ArgSummary = ({ value: value2, initialExpandedArgs }) => {
2947
2967
  let { summary, detail } = value2, [isOpen, setIsOpen] = useState7(!1), [isExpanded, setIsExpanded] = useState7(initialExpandedArgs || !1);
2948
2968
  if (summary == null)
2949
2969
  return null;
@@ -2952,17 +2972,18 @@ var ITEMS_BEFORE_EXPANSION = 8, Summary = styled14.div(({ isExpanded }) => ({
2952
2972
  if (/[(){}[\]<>]/.test(summaryAsString))
2953
2973
  return React19.createElement(ArgText, { text: summaryAsString });
2954
2974
  let summaryItems = getSummaryItems(summaryAsString), itemsCount = summaryItems.length;
2955
- return itemsCount > ITEMS_BEFORE_EXPANSION ? React19.createElement(Summary, { isExpanded }, renderSummaryItems(summaryItems, isExpanded), React19.createElement(ExpandButton, { onClick: () => setIsExpanded(!isExpanded) }, isExpanded ? "Show less..." : `Show ${itemsCount - ITEMS_BEFORE_EXPANSION} more...`)) : React19.createElement(Summary, null, renderSummaryItems(summaryItems));
2975
+ return itemsCount > ITEMS_BEFORE_EXPANSION ? React19.createElement(Summary, { isExpanded }, renderSummaryItems(summaryItems), React19.createElement(DetailsContainer, { open: isExpanded, onToggle: (e2) => setIsExpanded(e2.currentTarget.open) }, React19.createElement(AlignedDetails, null, renderExpandedItems(summaryItems)), React19.createElement(ExpandButton, { role: "button" }, isExpanded ? "Show less..." : `Show ${itemsCount - ITEMS_BEFORE_EXPANSION} more...`))) : React19.createElement(Summary, null, renderSummaryItems(summaryItems));
2956
2976
  }
2957
2977
  return React19.createElement(
2958
- TooltipProvider,
2978
+ PopoverProvider,
2959
2979
  {
2960
2980
  placement: "bottom",
2961
2981
  visible: isOpen,
2962
2982
  onVisibleChange: (isVisible) => {
2963
2983
  setIsOpen(isVisible);
2964
2984
  },
2965
- tooltip: React19.createElement(Detail, { width: calculateDetailWidth(detail) }, React19.createElement(SyntaxHighlighter, { language: "jsx", format: !1 }, detail))
2985
+ hasCloseButton: !0,
2986
+ popover: React19.createElement(Detail, null, React19.createElement(SyntaxHighlighter, { language: "jsx", format: !1 }, detail))
2966
2987
  },
2967
2988
  React19.createElement(Expandable, { className: "sbdocs-expandable" }, React19.createElement("span", null, summaryAsString), isOpen ? React19.createElement(ChevronUpIcon, null) : React19.createElement(ChevronDownIcon, null))
2968
2989
  );
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_9jhkjsyjv7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9jhkjsyjv7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9jhkjsyjv7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_9jhkjsyjv7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9jhkjsyjv7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9jhkjsyjv7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.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-JRJT7Q2N.js";
14
+ } from "../../_node-chunks/chunk-VRAZAZEV.js";
15
15
  import {
16
16
  slash
17
- } from "../../_node-chunks/chunk-LOJ6VLWV.js";
18
- import "../../_node-chunks/chunk-TUFR2XYI.js";
17
+ } from "../../_node-chunks/chunk-TBPJCWU7.js";
18
+ import "../../_node-chunks/chunk-YPUOZX6Y.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_9jhkjsyjv7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9jhkjsyjv7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9jhkjsyjv7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_9jhkjsyjv7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9jhkjsyjv7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9jhkjsyjv7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.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-5MG7AO5M.js";
12
+ import "../../_node-chunks/chunk-JVSFH4RF.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-QUCPWX6N.js";
36
- import "../../_node-chunks/chunk-BPLKNOG7.js";
37
- import "../../_node-chunks/chunk-IMOJACVP.js";
38
- import "../../_node-chunks/chunk-J7VMFLRZ.js";
39
- import {
40
- getLastEvents,
41
- getSessionId
42
- } from "../../_node-chunks/chunk-O72O5WMW.js";
35
+ } from "../../_node-chunks/chunk-PYUJOHPH.js";
36
+ import "../../_node-chunks/chunk-RCTV2GMQ.js";
37
+ import "../../_node-chunks/chunk-LZSDDOT4.js";
38
+ import "../../_node-chunks/chunk-BUUY73HB.js";
43
39
  import {
44
40
  globalSettings
45
- } from "../../_node-chunks/chunk-SKKDMIEL.js";
41
+ } from "../../_node-chunks/chunk-PGJHGLNH.js";
46
42
  import {
47
43
  invariant
48
- } from "../../_node-chunks/chunk-APNNQRRU.js";
44
+ } from "../../_node-chunks/chunk-M5E3YC4T.js";
49
45
  import {
50
46
  resolvePackageDir
51
- } from "../../_node-chunks/chunk-MJEVYN6O.js";
52
- import "../../_node-chunks/chunk-HT3TF35B.js";
47
+ } from "../../_node-chunks/chunk-2TPGTNH3.js";
48
+ import "../../_node-chunks/chunk-P445LZJB.js";
53
49
  import {
54
50
  isAbsolute,
55
51
  join
56
- } from "../../_node-chunks/chunk-RJ6MVIQ7.js";
52
+ } from "../../_node-chunks/chunk-Y6L7H22H.js";
57
53
  import {
58
54
  loadConfig
59
- } from "../../_node-chunks/chunk-Q4YMOGYF.js";
55
+ } from "../../_node-chunks/chunk-DF3MHTVA.js";
60
56
  import {
61
57
  require_dist
62
- } from "../../_node-chunks/chunk-53QZPC5B.js";
63
- import "../../_node-chunks/chunk-TX3LEYMY.js";
64
- import "../../_node-chunks/chunk-WAM2AUH6.js";
58
+ } from "../../_node-chunks/chunk-56LVYN72.js";
59
+ import "../../_node-chunks/chunk-VCZD6QSG.js";
60
+ import "../../_node-chunks/chunk-PQM4RHC4.js";
65
61
  import {
66
62
  require_picocolors
67
- } from "../../_node-chunks/chunk-Q2N5EUMK.js";
63
+ } from "../../_node-chunks/chunk-ZNQQBZIL.js";
68
64
  import {
69
65
  __commonJS,
70
66
  __export,
71
67
  __require,
72
68
  __toESM
73
- } from "../../_node-chunks/chunk-TUFR2XYI.js";
69
+ } from "../../_node-chunks/chunk-YPUOZX6Y.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-2LEK4OOC.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
536
+ var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-4GVAWYWU.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-MSDE3LN6.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-UXUG5UXW.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,12 +10,12 @@ import {
10
10
  mountDestructured,
11
11
  normalizeArrays,
12
12
  normalizeProjectAnnotations
13
- } from "../_browser-chunks/chunk-HX32VQZR.js";
13
+ } from "../_browser-chunks/chunk-EUPBEOK3.js";
14
14
  import "../_browser-chunks/chunk-IPA5A322.js";
15
15
  import "../_browser-chunks/chunk-XLJZ7AOP.js";
16
16
  import {
17
17
  combineParameters
18
- } from "../_browser-chunks/chunk-6QKNWBQB.js";
18
+ } from "../_browser-chunks/chunk-LOTN4ZCW.js";
19
19
  import "../_browser-chunks/chunk-XCZK5QUJ.js";
20
20
  import {
21
21
  invariant
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_9jhkjsyjv7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9jhkjsyjv7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9jhkjsyjv7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_9jhkjsyjv7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9jhkjsyjv7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9jhkjsyjv7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.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-Q4YMOGYF.js";
42
- import "../_node-chunks/chunk-53QZPC5B.js";
43
- import "../_node-chunks/chunk-TUFR2XYI.js";
41
+ } from "../_node-chunks/chunk-DF3MHTVA.js";
42
+ import "../_node-chunks/chunk-56LVYN72.js";
43
+ import "../_node-chunks/chunk-YPUOZX6Y.js";
44
44
  export {
45
45
  BadMetaError,
46
46
  ConfigFile,
@@ -24,7 +24,7 @@ import {
24
24
  normalizeNewlines,
25
25
  parseJsDoc,
26
26
  str
27
- } from "../_browser-chunks/chunk-6QKNWBQB.js";
27
+ } from "../_browser-chunks/chunk-LOTN4ZCW.js";
28
28
  import "../_browser-chunks/chunk-XCZK5QUJ.js";
29
29
  import "../_browser-chunks/chunk-CLSHX4VX.js";
30
30
  import "../_browser-chunks/chunk-HPYUT3WS.js";
@@ -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.5";
66338
+ var version = "10.2.0-alpha.7";
66339
66339
 
66340
66340
  // src/manager-api/modules/versions.ts
66341
66341
  var { VERSIONCHECK } = scope, getVersionCheckData = (0, import_memoizerific8.default)(1)(() => {
@@ -79876,7 +79876,7 @@ var PopoverProvider = ({
79876
79876
  setIsOpen(isOpen2), onVisibleChange?.(isOpen2);
79877
79877
  },
79878
79878
  [onVisibleChange]
79879
- ), onHide = (0, import_react156.useCallback)(() => setIsOpen(!1), []);
79879
+ ), onHide = (0, import_react156.useCallback)(() => onOpenChange(!1), [onOpenChange]);
79880
79880
  return import_react156.default.createElement(
79881
79881
  $de32f1b87079253c$export$2e1e1122cf0cba88,
79882
79882
  {
@@ -2276,7 +2276,7 @@ var defaultItemValues = {
2276
2276
  ...argType.toolbar,
2277
2277
  items: argType.toolbar.items.map((_item) => {
2278
2278
  let item = typeof _item == "string" ? { value: _item, title: _item } : _item;
2279
- return item.type === "reset" && argType.toolbar.icon && (item.icon = argType.toolbar.icon, item.hideIcon = !0), { ...defaultItemValues, ...item };
2279
+ return item.type === "reset" && argType.toolbar.icon && (item.icon = argType.toolbar.icon, item.hideIcon = !0, item.value = void 0), { ...defaultItemValues, ...item };
2280
2280
  })
2281
2281
  }
2282
2282
  });
@@ -2606,7 +2606,7 @@ var ToolbarMenuItemContainer = styled("div")({
2606
2606
  }) => {
2607
2607
  let [globals, updateGlobals, storyGlobals] = useGlobals(), currentValue = globals[id], isOverridden = id in storyGlobals, icon = _icon, title2 = _title;
2608
2608
  preventDynamicIcon || (icon = getSelectedIcon({ currentValue, items }) || icon), dynamicTitle && (title2 = getSelectedTitle({ currentValue, items }) || title2), !title2 && !icon && console.warn(`Toolbar '${name}' has no title or icon`);
2609
- let resetLabel = items.find((item) => item.type === "reset")?.title, options2 = items.filter((item) => item.type === "item").map((item) => {
2609
+ let resetItem = items.find((item) => item.type === "reset"), resetLabel = resetItem?.title, options2 = items.filter((item) => item.type === "item").map((item) => {
2610
2610
  let itemTitle = item.title ?? item.value ?? "Untitled", iconComponent = !item.hideIcon && item.icon ? react_default.createElement(Icons, { icon: item.icon, __suppressDeprecationWarning: !0 }) : void 0;
2611
2611
  return item.right ? {
2612
2612
  title: itemTitle,
@@ -2627,7 +2627,7 @@ var ToolbarMenuItemContainer = styled("div")({
2627
2627
  ariaLabel,
2628
2628
  tooltip: ariaLabel,
2629
2629
  resetLabel,
2630
- onReset: () => updateGlobals({ [id]: "_reset" }),
2630
+ onReset: resetItem ? () => updateGlobals({ [id]: resetItem?.value }) : void 0,
2631
2631
  onSelect: (selected) => updateGlobals({ [id]: selected }),
2632
2632
  icon: icon && react_default.createElement(Icons, { icon, __suppressDeprecationWarning: !0 })
2633
2633
  },
@@ -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.5";
2341
+ var version = "10.2.0-alpha.7";
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_9jhkjsyjv7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_9jhkjsyjv7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_9jhkjsyjv7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_99t5k5w5yp4 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_99t5k5w5yp4 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_99t5k5w5yp4 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_9jhkjsyjv7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_9jhkjsyjv7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_9jhkjsyjv7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_99t5k5w5yp4.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_99t5k5w5yp4.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_99t5k5w5yp4.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-RJ6MVIQ7.js";
20
- import "../_node-chunks/chunk-TUFR2XYI.js";
19
+ } from "../_node-chunks/chunk-Y6L7H22H.js";
20
+ import "../_node-chunks/chunk-YPUOZX6Y.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);