storybook 9.1.0-alpha.0 → 9.1.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/assets/browser/favicon-wrapper.svg +46 -0
  2. package/assets/browser/favicon.svg +1 -1
  3. package/dist/actions/index.cjs +16 -16
  4. package/dist/actions/index.d.ts +1 -38
  5. package/dist/actions/index.js +12 -12
  6. package/dist/bin/index.cjs +62 -69
  7. package/dist/bin/index.js +43 -50
  8. package/dist/builder-manager/index.cjs +379 -378
  9. package/dist/builder-manager/index.d.ts +567 -2
  10. package/dist/builder-manager/index.js +280 -279
  11. package/dist/cli/bin/index.cjs +945 -945
  12. package/dist/cli/bin/index.js +673 -672
  13. package/dist/cli/index.cjs +14965 -14973
  14. package/dist/cli/index.d.ts +713 -15
  15. package/dist/cli/index.js +13488 -13495
  16. package/dist/common/index.cjs +11211 -11103
  17. package/dist/common/index.d.ts +351 -72
  18. package/dist/common/index.js +18491 -18379
  19. package/dist/components/index.cjs +4606 -4425
  20. package/dist/components/index.d.ts +11 -12
  21. package/dist/components/index.js +3020 -2834
  22. package/dist/controls/index.cjs +16 -16
  23. package/dist/controls/index.d.ts +1 -36
  24. package/dist/core-server/index.cjs +6690 -6624
  25. package/dist/core-server/index.d.ts +14 -2
  26. package/dist/core-server/index.js +6088 -6023
  27. package/dist/core-server/presets/common-manager.js +3582 -3475
  28. package/dist/core-server/presets/common-preset.cjs +85015 -5213
  29. package/dist/core-server/presets/common-preset.js +85107 -5291
  30. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.cjs +28728 -0
  31. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +28729 -0
  32. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.cjs +29339 -0
  33. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +29340 -0
  34. package/dist/csf/index.cjs +3019 -104
  35. package/dist/csf/index.d.ts +301 -18
  36. package/dist/csf/index.js +3031 -98
  37. package/dist/csf-tools/index.cjs +489 -488
  38. package/dist/csf-tools/index.js +311 -309
  39. package/dist/highlight/index.cjs +15 -15
  40. package/dist/highlight/index.d.ts +1 -12
  41. package/dist/highlight/index.js +4 -4
  42. package/dist/instrumenter/index.cjs +1308 -1239
  43. package/dist/instrumenter/index.d.ts +25 -3
  44. package/dist/instrumenter/index.js +1345 -1280
  45. package/dist/manager/globals-module-info.cjs +1 -1
  46. package/dist/manager/globals-module-info.js +1 -1
  47. package/dist/manager/globals-runtime.js +42257 -44665
  48. package/dist/manager/runtime.js +3715 -3536
  49. package/dist/manager-api/index.cjs +74 -74
  50. package/dist/manager-api/index.d.ts +4 -1
  51. package/dist/manager-api/index.js +142 -142
  52. package/dist/node-logger/index.cjs +8520 -994
  53. package/dist/node-logger/index.d.ts +395 -2
  54. package/dist/node-logger/index.js +8535 -995
  55. package/dist/preview/runtime.js +13701 -16331
  56. package/dist/preview-api/index.cjs +1434 -1458
  57. package/dist/preview-api/index.d.ts +13 -10
  58. package/dist/preview-api/index.js +950 -976
  59. package/dist/server-errors.cjs +201 -242
  60. package/dist/server-errors.d.ts +1 -12
  61. package/dist/server-errors.js +182 -223
  62. package/dist/telemetry/index.cjs +1919 -1638
  63. package/dist/telemetry/index.d.ts +4 -2
  64. package/dist/telemetry/index.js +1972 -1690
  65. package/dist/test/index.cjs +9184 -9816
  66. package/dist/test/index.d.ts +8 -1
  67. package/dist/test/index.js +8390 -9029
  68. package/dist/types/index.d.ts +19 -17
  69. package/dist/viewport/index.cjs +17 -24
  70. package/dist/viewport/index.d.ts +9 -532
  71. package/dist/viewport/index.js +9 -16
  72. package/package.json +18 -187
  73. package/templates/mocker-runtime.template.js +89 -0
  74. package/dist/actions/preview.cjs +0 -159
  75. package/dist/actions/preview.d.ts +0 -555
  76. package/dist/actions/preview.js +0 -149
  77. package/dist/backgrounds/index.cjs +0 -148
  78. package/dist/backgrounds/index.d.ts +0 -592
  79. package/dist/backgrounds/index.js +0 -130
  80. package/dist/backgrounds/preview.cjs +0 -143
  81. package/dist/backgrounds/preview.d.ts +0 -555
  82. package/dist/backgrounds/preview.js +0 -127
  83. package/dist/component-testing/index.cjs +0 -23
  84. package/dist/component-testing/index.d.ts +0 -3
  85. package/dist/component-testing/index.js +0 -5
  86. package/dist/component-testing/preview.cjs +0 -40
  87. package/dist/component-testing/preview.d.ts +0 -5
  88. package/dist/component-testing/preview.js +0 -25
  89. package/dist/controls/preview.cjs +0 -26
  90. package/dist/controls/preview.d.ts +0 -555
  91. package/dist/controls/preview.js +0 -9
  92. package/dist/highlight/preview.cjs +0 -590
  93. package/dist/highlight/preview.d.ts +0 -555
  94. package/dist/highlight/preview.js +0 -574
  95. package/dist/measure/index.cjs +0 -476
  96. package/dist/measure/index.d.ts +0 -567
  97. package/dist/measure/index.js +0 -464
  98. package/dist/measure/preview.cjs +0 -466
  99. package/dist/measure/preview.d.ts +0 -560
  100. package/dist/measure/preview.js +0 -450
  101. package/dist/outline/index.cjs +0 -528
  102. package/dist/outline/index.d.ts +0 -567
  103. package/dist/outline/index.js +0 -500
  104. package/dist/outline/preview.cjs +0 -518
  105. package/dist/outline/preview.d.ts +0 -560
  106. package/dist/outline/preview.js +0 -486
  107. package/dist/test/preview.cjs +0 -73
  108. package/dist/test/preview.d.ts +0 -555
  109. package/dist/test/preview.js +0 -66
  110. package/dist/viewport/preview.cjs +0 -35
  111. package/dist/viewport/preview.d.ts +0 -569
  112. package/dist/viewport/preview.js +0 -19
@@ -0,0 +1,46 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <defs>
3
+ <mask id="active-mask">
4
+ <rect x="0" y="0" width="32" height="32" fill="#FFF" />
5
+ <path fill="#000" fill-rule="nonzero"
6
+ d="M25,15.3 C26.8630998,15.3 28.7261995,16.2284418 29.795607,18.0853254 L29.795607,18.0853254 L34.7484772,26.6853254 C35.2679728,27.5873604 35.5068948,28.5446245 35.509009,29.4780654 C35.5112408,30.4762222 35.243212,31.4466974 34.7610935,32.2926531 C34.2789749,33.1386087 33.5826171,33.8603071 32.7267084,34.3600412 C31.9262928,34.8273748 30.9864445,35.1 29.9528702,35.1 L29.9528702,35.1 L20.0471298,35.1 C19.0135555,35.1 18.0737072,34.8273748 17.2732916,34.3600412 C16.4173829,33.8603071 15.7210251,33.1386087 15.2389065,32.2926531 C14.756788,31.4466974 14.4887592,30.4762222 14.490991,29.4780654 C14.4931052,28.5446245 14.7320272,27.5873604 15.2515228,26.6853254 L15.2515228,26.6853254 L20.204393,18.0853254 C21.2738005,16.2284418 23.1369002,15.3 25,15.3 Z"
7
+ transform="rotate(90 25 25.2)" />
8
+ </mask>
9
+ <mask id="critical-mask">
10
+ <rect x="0" y="0" width="32" height="32" fill="#FFF" />
11
+ <path fill="#000" fill-rule="nonzero"
12
+ d="M23.9,14.6 C26.7442665,14.6 29.3192665,15.7528668 31.1831998,17.6168002 C33.0471332,19.4807335 34.2,22.0557335 34.2,24.9 C34.2,27.7442665 33.0471332,30.3192665 31.1831998,32.1831998 C29.3192665,34.0471332 26.7442665,35.2 23.9,35.2 C21.0557335,35.2 18.4807335,34.0471332 16.6168002,32.1831998 C14.7528668,30.3192665 13.6,27.7442665 13.6,24.9 C13.6,22.0557335 14.7528668,19.4807335 16.6168002,17.6168002 C18.4807335,15.7528668 21.0557335,14.6 23.9,14.6 Z" />
13
+ </mask>
14
+ <mask id="negative-mask">
15
+ <rect x="0" y="0" width="32" height="32" fill="#FFF" />
16
+ <path fill="#000" fill-rule="nonzero"
17
+ d="M28.2,14.8 C29.633165,14.8 31.06633,15.346734 32.159798,16.440202 C33.2414078,17.5218119 33.7880833,18.9357904 33.8,20.353376 C33.811544,21.7725108 33.2872104,23.1952877 32.2266806,24.2917914 L32.2266806,24.2917914 L31.7206,24.8006729 L32.159798,25.240202 C33.253266,26.33367 33.8,27.766835 33.8,29.2 C33.8,30.633165 33.253266,32.06633 32.159798,33.159798 C31.0781881,34.2414078 29.6642096,34.7880833 28.246624,34.8 C26.8274892,34.811544 25.4047123,34.2872104 24.3082086,33.2266806 L24.3082086,33.2266806 L23.7993271,32.7206 L23.359798,33.159798 C22.26633,34.253266 20.833165,34.8 19.4,34.8 C17.966835,34.8 16.53367,34.253266 15.440202,33.159798 C14.3585922,32.0781881 13.8119167,30.6642096 13.8,29.246624 C13.788456,27.8274892 14.3127896,26.4047123 15.3733194,25.3082086 L15.3733194,25.3082086 L15.8794,24.7993271 L15.440202,24.359798 C14.346734,23.26633 13.8,21.833165 13.8,20.4 C13.8,18.966835 14.346734,17.53367 15.440202,16.440202 C16.5218119,15.3585922 17.9357904,14.8119167 19.353376,14.8 C20.7725108,14.788456 22.1952877,15.3127896 23.2917914,16.3733194 L23.2917914,16.3733194 L23.8006729,16.8794 L24.240202,16.440202 C25.33367,15.346734 26.766835,14.8 28.2,14.8 Z" />
18
+ </mask>
19
+ <mask id="positive-mask">
20
+ <rect x="0" y="0" width="32" height="32" fill="#FFF" />
21
+ <path fill="#000" fill-rule="nonzero"
22
+ d="M29.7294207,16.9922805 C31.1625744,16.9866282 32.5979013,17.5276612 33.6957071,18.6167741 C34.7816077,19.6940761 35.3338993,21.1058704 35.351258,22.5233982 C35.3686336,23.9423122 34.8500808,25.3669976 33.7941627,26.4676563 L33.7941627,26.4676563 L27.1794488,33.1363075 C26.0960963,34.2283069 24.675298,34.7802389 23.2508341,34.7920857 C21.8249459,34.8039445 20.3953569,34.27469 19.296927,33.2041927 L19.296927,33.2041927 L15.7761737,29.656491 C14.6870608,28.5586851 14.1460279,27.1233582 14.1516801,25.6902046 C14.1574213,24.2570509 14.7098478,22.8260705 15.8076536,21.7369576 C16.7544861,20.7976225 17.9523748,20.2659173 19.1834383,20.1411672 C20.4372495,20.0141119 21.7255226,20.3088158 22.8178242,21.0249737 L22.8178242,21.0249737 L23.1781395,21.2667759 L25.7761737,18.648254 C26.8652867,17.5504481 28.2962671,16.9980217 29.7294207,16.9922805 Z" />
23
+ </mask>
24
+ <mask id="warning-mask">
25
+ <rect x="0" y="0" width="32" height="32" fill="#FFF" />
26
+ <path fill="#000" fill-rule="nonzero"
27
+ d="M23.8,14.8 C25.6808284,14.8 27.5616567,15.7284418 28.6412402,17.5853254 L28.6412402,17.5853254 L33.6412402,26.1853254 C34.1656792,27.0873604 34.4068747,28.0446245 34.409009,28.9780654 C34.4112621,29.9762222 34.1406828,30.9466974 33.6539766,31.7926531 C33.1672704,32.6386087 32.4642862,33.3603071 31.600233,33.8600412 C30.7922009,34.3273748 29.8434094,34.6 28.8,34.6 L28.8,34.6 L18.8,34.6 C17.7565906,34.6 16.8077991,34.3273748 15.999767,33.8600412 C15.1357138,33.3603071 14.4327296,32.6386087 13.9460234,31.7926531 C13.4593172,30.9466974 13.1887379,29.9762222 13.190991,28.9780654 C13.1931253,28.0446245 13.4343208,27.0873604 13.9587598,26.1853254 L13.9587598,26.1853254 L18.9587598,17.5853254 C20.0383433,15.7284418 21.9191716,14.8 23.8,14.8 Z" />
28
+ </mask>
29
+
30
+ <polygon id="active" fill="none" stroke="#029CFD" stroke-linejoin="round" stroke-width="2.8"
31
+ points="25 21 30 29.6 20 29.6" transform="rotate(90 25 25.3)" />
32
+ <circle id="critical" fill="none" cx="23.9" cy="24.9" r="4.7" stroke="#000" stroke-linejoin="round"
33
+ stroke-width="2.8" />
34
+ <path id="negative" fill="none" stroke="#F40" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.8"
35
+ d="M19.4,20.4 L28.2,29.2 M28.2,20.4 L19.4,29.2" />
36
+ <polyline id="positive" fill="none" stroke="#66BF3C" stroke-linecap="round" stroke-linejoin="round"
37
+ stroke-width="2.8" points="19.752 25.712 23.204 29.192 29.752 22.592" />
38
+ <polygon id="warning" fill="none" stroke="#FFAE00" stroke-linejoin="round" stroke-width="2.8"
39
+ points="23.8 20.4 28.8 29 18.8 29" />
40
+ </defs>
41
+
42
+ <g id="mask">
43
+ <use id="icon" />
44
+ </g>
45
+ <use id="status" />
46
+ </svg>
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:svgjs="http://svgjs.com/svgjs" xmlns:xlink="http://www.w3.org/1999/xlink" width="164" height="164" version="1.1"><svg xmlns="http://www.w3.org/2000/svg" width="164" height="164" fill="none" viewBox="0 0 164 164"><path fill="#FF4785" d="M22.467 147.762 17.5 15.402a8.062 8.062 0 0 1 7.553-8.35L137.637.016a8.061 8.061 0 0 1 8.565 8.047v144.23a8.063 8.063 0 0 1-8.424 8.054l-107.615-4.833a8.062 8.062 0 0 1-7.695-7.752Z"/><path fill="#fff" fill-rule="evenodd" d="m128.785.57-15.495.968-.755 18.172a1.203 1.203 0 0 0 1.928 1.008l7.06-5.354 5.962 4.697a1.202 1.202 0 0 0 1.946-.987L128.785.569Zm-12.059 60.856c-2.836 2.203-23.965 3.707-23.965.57.447-11.969-4.912-12.494-7.889-12.494-2.828 0-7.59.855-7.59 7.267 0 6.534 6.96 10.223 15.13 14.553 11.607 6.15 25.654 13.594 25.654 32.326 0 17.953-14.588 27.871-33.194 27.871-19.201 0-35.981-7.769-34.086-34.702.744-3.163 25.156-2.411 25.156 0-.298 11.114 2.232 14.383 8.633 14.383 4.912 0 7.144-2.708 7.144-7.267 0-6.9-7.252-10.973-15.595-15.657C64.827 81.933 51.53 74.468 51.53 57.34c0-17.098 11.76-28.497 32.747-28.497 20.988 0 32.449 11.224 32.449 32.584Z" clip-rule="evenodd"/></svg><style>@media (prefers-color-scheme:light){:root{filter:none}}</style></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="none" fill-rule="evenodd"><path fill="#FF4785" fill-rule="nonzero" d="M3.19456517,29.5523576 L2.20116517,3.08035756 C2.16820317,2.206041 2.83853396,1.46497625 3.71176517,1.41035756 L26.2285652,0.00315756388 C26.6728415,-0.0246745074 27.1088544,0.132425741 27.4332785,0.437229126 C27.7577026,0.74203251 27.9415652,1.16741027 27.9415652,1.61255756 L27.9415652,30.4585576 C27.9415652,30.8987416 27.7615266,31.3197739 27.4433606,31.6239653 C27.1251947,31.9281568 26.6965078,32.0890657 26.2567652,32.0693576 L4.73376517,31.1027576 C3.89549138,31.0651477 3.22618762,30.3908861 3.19476517,29.5523576 L3.19456517,29.5523576 Z"/><path fill="#FFF" d="M24.4581652,0.113957564 L21.3591652,0.307557564 L21.2081652,3.94195756 C21.2043927,4.0349625 21.2546048,4.1217998 21.3370927,4.16492627 C21.4195807,4.20805273 21.5195442,4.19973049 21.5937652,4.14355756 L23.0057652,3.07275756 L24.1981652,4.01215756 C24.2717133,4.07021898 24.3722957,4.08025391 24.4558654,4.03786787 C24.539435,3.99548183 24.5907604,3.90840015 24.5873652,3.81475756 L24.4581652,0.113757564 L24.4581652,0.113957564 Z M22.0463652,12.2851576 C21.4791652,12.7257576 17.2533652,13.0265576 17.2533652,12.3991576 C17.3427652,10.0053576 16.2709652,9.90035756 15.6755652,9.90035756 C15.1099652,9.90035756 14.1575652,10.0713576 14.1575652,11.3537576 C14.1575652,12.6605576 15.5495652,13.3983576 17.1835652,14.2643576 C19.5049652,15.4943576 22.3143652,16.9831576 22.3143652,20.7295576 C22.3143652,24.3201576 19.3967652,26.3037576 15.6755652,26.3037576 C11.8353652,26.3037576 8.47936517,24.7499576 8.85836517,19.3633576 C9.00716517,18.7307576 13.8895652,18.8811576 13.8895652,19.3633576 C13.8299652,21.5861576 14.3359652,22.2399576 15.6161652,22.2399576 C16.5985652,22.2399576 17.0449652,21.6983576 17.0449652,20.7865576 C17.0449652,19.4065576 15.5945652,18.5919576 13.9259652,17.6551576 C11.6665652,16.3865576 9.00716517,14.8935576 9.00716517,11.4679576 C9.00716517,8.04835756 11.3591652,5.76855756 15.5565652,5.76855756 C19.7541652,5.76855756 22.0463652,8.01335756 22.0463652,12.2853576 L22.0463652,12.2851576 Z"/></g></svg>
@@ -7,13 +7,13 @@ var i = (t, o) => a(t, "name", { value: o, configurable: !0 });
7
7
  var j = (t, o) => {
8
8
  for (var n in o)
9
9
  a(t, n, { get: o[n], enumerable: !0 });
10
- }, P = (t, o, n, e) => {
10
+ }, S = (t, o, n, e) => {
11
11
  if (o && typeof o == "object" || typeof o == "function")
12
12
  for (let r of x(o))
13
13
  !R.call(t, r) && r !== n && a(t, r, { get: () => o[r], enumerable: !(e = D(o, r)) || e.enumerable });
14
14
  return t;
15
15
  };
16
- var S = (t) => P(a({}, "__esModule", { value: !0 }), t);
16
+ var I = (t) => S(a({}, "__esModule", { value: !0 }), t);
17
17
 
18
18
  // src/actions/index.ts
19
19
  var $ = {};
@@ -23,19 +23,19 @@ j($, {
23
23
  CYCLIC_KEY: () => C,
24
24
  EVENT_ID: () => m,
25
25
  PANEL_ID: () => T,
26
- PARAM_KEY: () => I,
27
- action: () => f,
26
+ PARAM_KEY: () => P,
27
+ action: () => y,
28
28
  actions: () => Y,
29
29
  config: () => s,
30
30
  configureActions: () => F
31
31
  });
32
- module.exports = S($);
32
+ module.exports = I($);
33
33
 
34
34
  // src/actions/constants.ts
35
- var I = "actions", l = "storybook/actions", T = `${l}/panel`, m = `${l}/action-event`, k = `${l}/action-clear`, C = "$___storybook.isCyclic";
35
+ var P = "actions", l = "storybook/actions", T = `${l}/panel`, m = `${l}/action-event`, k = `${l}/action-clear`, C = "$___storybook.isCyclic";
36
36
 
37
37
  // src/actions/runtime/action.ts
38
- var A = require("storybook/internal/preview-errors"), y = require("@storybook/global"), O = require("storybook/preview-api");
38
+ var O = require("storybook/internal/preview-errors"), f = require("@storybook/global"), h = require("storybook/preview-api");
39
39
 
40
40
  // src/actions/runtime/configureActions.ts
41
41
  var s = {
@@ -47,10 +47,10 @@ var s = {
47
47
  }, "configureActions");
48
48
 
49
49
  // src/actions/runtime/action.ts
50
- var h = /* @__PURE__ */ i((t, o) => {
50
+ var A = /* @__PURE__ */ i((t, o) => {
51
51
  let n = Object.getPrototypeOf(t);
52
- return !n || o(n) ? n : h(n, o);
53
- }, "findProto"), V = /* @__PURE__ */ i((t) => !!(typeof t == "object" && t && h(t, (o) => /^Synthetic(?:Base)?Event$/.test(o.constructor.name)) &&
52
+ return !n || o(n) ? n : A(n, o);
53
+ }, "findProto"), V = /* @__PURE__ */ i((t) => !!(typeof t == "object" && t && A(t, (o) => /^Synthetic(?:Base)?Event$/.test(o.constructor.name)) &&
54
54
  typeof t.persist == "function"), "isReactSyntheticEvent"), W = /* @__PURE__ */ i((t) => {
55
55
  if (V(t)) {
56
56
  let o = Object.create(
@@ -66,17 +66,17 @@ typeof t.persist == "function"), "isReactSyntheticEvent"), W = /* @__PURE__ */ i
66
66
  }
67
67
  return t;
68
68
  }, "serializeArg");
69
- function f(t, o = {}) {
69
+ function y(t, o = {}) {
70
70
  let n = {
71
71
  ...s,
72
72
  ...o
73
73
  }, e = /* @__PURE__ */ i(function(...c) {
74
74
  if (o.implicit) {
75
- let u = ("__STORYBOOK_PREVIEW__" in y.global ? y.global.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
75
+ let u = ("__STORYBOOK_PREVIEW__" in f.global ? f.global.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
76
76
  (p) => p.phase === "playing" || p.phase === "rendering"
77
77
  );
78
78
  if (u) {
79
- let p = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, g = new A.ImplicitActionsDuringRendering({
79
+ let p = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, g = new O.ImplicitActionsDuringRendering({
80
80
  phase: u.phase,
81
81
  name: t,
82
82
  deprecated: p
@@ -87,7 +87,7 @@ function f(t, o = {}) {
87
87
  throw g;
88
88
  }
89
89
  }
90
- let E = O.addons.getChannel(), b = Date.now().toString(36) + Math.random().toString(36).substring(2), w = 5, d = c.map(W), _ = c.length >
90
+ let E = h.addons.getChannel(), b = Date.now().toString(36) + Math.random().toString(36).substring(2), w = 5, d = c.map(W), _ = c.length >
91
91
  1 ? d : d[0], v = {
92
92
  id: b,
93
93
  count: 0,
@@ -101,7 +101,7 @@ function f(t, o = {}) {
101
101
  }, "actionHandler");
102
102
  return e.isAction = !0, e.implicit = o.implicit, e;
103
103
  }
104
- i(f, "action");
104
+ i(y, "action");
105
105
 
106
106
  // src/actions/runtime/actions.ts
107
107
  var Y = /* @__PURE__ */ i((...t) => {
@@ -116,6 +116,6 @@ var Y = /* @__PURE__ */ i((...t) => {
116
116
  }));
117
117
  let r = {};
118
118
  return Object.keys(e).forEach((c) => {
119
- r[c] = f(e[c], o);
119
+ r[c] = y(e[c], o);
120
120
  }), r;
121
121
  }, "actions");
@@ -62,41 +62,4 @@ declare const actions: ActionsFunction;
62
62
  declare const config: ActionOptions;
63
63
  declare const configureActions: (options?: ActionOptions) => void;
64
64
 
65
- interface ActionsParameters {
66
- /**
67
- * Actions configuration
68
- *
69
- * @see https://storybook.js.org/docs/essentials/actions#parameters
70
- */
71
- actions: {
72
- /**
73
- * Create actions for each arg that matches the regex. (**NOT recommended, see below**)
74
- *
75
- * This is quite useful when your component has dozens (or hundreds) of methods and you do not
76
- * want to manually apply the fn utility for each of those methods. However, this is not the
77
- * recommended way of writing actions. That's because automatically inferred args are not
78
- * available as spies in your play function. If you use argTypesRegex and your stories have play
79
- * functions, you will need to also define args with the fn utility to test them in your play
80
- * function.
81
- *
82
- * @example `argTypesRegex: '^on.*'`
83
- */
84
- argTypesRegex?: string;
85
- /** Remove the addon panel and disable the addon's behavior */
86
- disable?: boolean;
87
- /**
88
- * Binds a standard HTML event handler to the outermost HTML element rendered by your component
89
- * and triggers an action when the event is called for a given selector. The format is
90
- * `<eventname> <selector>`. The selector is optional; it defaults to all elements.
91
- *
92
- * **To enable this feature, you must use the `withActions` decorator.**
93
- *
94
- * @example `handles: ['mouseover', 'click .btn']`
95
- *
96
- * @see https://storybook.js.org/docs/essentials/actions#action-event-handlers
97
- */
98
- handles?: string[];
99
- };
100
- }
101
-
102
- export { ADDON_ID, type ActionDisplay, type ActionOptions, type ActionsFunction, type ActionsMap, type ActionsParameters, CLEAR_ID, CYCLIC_KEY, type DecoratorFunction, EVENT_ID, type HandlerFunction, PANEL_ID, PARAM_KEY, action, actions, config, configureActions };
65
+ export { ADDON_ID, type ActionDisplay, type ActionOptions, type ActionsFunction, type ActionsMap, CLEAR_ID, CYCLIC_KEY, type DecoratorFunction, EVENT_ID, type HandlerFunction, PANEL_ID, PARAM_KEY, action, actions, config, configureActions };
@@ -2,7 +2,7 @@ var w = Object.defineProperty;
2
2
  var i = (o, n) => w(o, "name", { value: n, configurable: !0 });
3
3
 
4
4
  // src/actions/constants.ts
5
- var P = "actions", a = "storybook/actions", S = `${a}/panel`, f = `${a}/action-event`, I = `${a}/action-clear`, T = "$___storybook.isCyclic";
5
+ var S = "actions", a = "storybook/actions", I = `${a}/panel`, y = `${a}/action-event`, P = `${a}/action-clear`, T = "$___storybook.isCyclic";
6
6
 
7
7
  // src/actions/runtime/action.ts
8
8
  import { ImplicitActionsDuringRendering as _ } from "storybook/internal/preview-errors";
@@ -48,28 +48,28 @@ function g(o, n = {}) {
48
48
  (s) => s.phase === "playing" || s.phase === "rendering"
49
49
  );
50
50
  if (m) {
51
- let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, y = new _({
51
+ let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, f = new _({
52
52
  phase: m.phase,
53
53
  name: o,
54
54
  deprecated: s
55
55
  });
56
56
  if (s)
57
- console.warn(y);
57
+ console.warn(f);
58
58
  else
59
- throw y;
59
+ throw f;
60
60
  }
61
61
  }
62
- let A = v.getChannel(), O = Date.now().toString(36) + Math.random().toString(36).substring(2), h = 5, l = r.map(x), E = r.length > 1 ? l :
62
+ let O = v.getChannel(), h = Date.now().toString(36) + Math.random().toString(36).substring(2), A = 5, l = r.map(x), E = r.length > 1 ? l :
63
63
  l[0], b = {
64
- id: O,
64
+ id: h,
65
65
  count: 0,
66
66
  data: { name: o, args: E },
67
67
  options: {
68
68
  ...t,
69
- maxDepth: h + (t.depth || 3)
69
+ maxDepth: A + (t.depth || 3)
70
70
  }
71
71
  };
72
- A.emit(f, b);
72
+ O.emit(y, b);
73
73
  }, "actionHandler");
74
74
  return e.isAction = !0, e.implicit = n.implicit, e;
75
75
  }
@@ -93,11 +93,11 @@ var L = /* @__PURE__ */ i((...o) => {
93
93
  }, "actions");
94
94
  export {
95
95
  a as ADDON_ID,
96
- I as CLEAR_ID,
96
+ P as CLEAR_ID,
97
97
  T as CYCLIC_KEY,
98
- f as EVENT_ID,
99
- S as PANEL_ID,
100
- P as PARAM_KEY,
98
+ y as EVENT_ID,
99
+ I as PANEL_ID,
100
+ S as PARAM_KEY,
101
101
  g as action,
102
102
  L as actions,
103
103
  c as config,
@@ -2,78 +2,71 @@
2
2
  var y = Object.create;
3
3
  var i = Object.defineProperty;
4
4
  var h = Object.getOwnPropertyDescriptor;
5
- var d = Object.getOwnPropertyNames;
6
- var c = Object.getPrototypeOf, v = Object.prototype.hasOwnProperty;
7
- var u = (o, e, a, t) => {
8
- if (e && typeof e == "object" || typeof e == "function")
9
- for (let l of d(e))
10
- !v.call(o, l) && l !== a && i(o, l, { get: () => e[l], enumerable: !(t = h(e, l)) || t.enumerable });
5
+ var c = Object.getOwnPropertyNames;
6
+ var d = Object.getPrototypeOf, v = Object.prototype.hasOwnProperty;
7
+ var u = (o, a, e, t) => {
8
+ if (a && typeof a == "object" || typeof a == "function")
9
+ for (let l of c(a))
10
+ !v.call(o, l) && l !== e && i(o, l, { get: () => a[l], enumerable: !(t = h(a, l)) || t.enumerable });
11
11
  return o;
12
12
  };
13
- var n = (o, e, a) => (a = o != null ? y(c(o)) : {}, u(
13
+ var k = (o, a, e) => (e = o != null ? y(d(o)) : {}, u(
14
14
  // If the importer is in node compatibility mode or this is not an ESM
15
15
  // file that has been converted to a CommonJS file using a Babel-
16
16
  // compatible transform (i.e. "__esModule" has not been set), then set
17
17
  // "default" to the CommonJS "module.exports" for node compatibility.
18
- e || !o || !o.__esModule ? i(a, "default", { value: o, enumerable: !0 }) : a,
18
+ a || !o || !o.__esModule ? i(e, "default", { value: o, enumerable: !0 }) : e,
19
19
  o
20
20
  ));
21
21
 
22
22
  // src/bin/index.ts
23
- var k = require("node:child_process"), b = require("node:fs"), s = require("node:path");
23
+ var n = require("node:child_process"), b = require("node:fs"), s = require("node:path");
24
24
 
25
25
  // src/common/versions.ts
26
26
  var p = {
27
- "@storybook/addon-a11y": "9.1.0-alpha.0",
28
- "@storybook/addon-actions": "9.1.0-alpha.0",
29
- "@storybook/addon-backgrounds": "9.1.0-alpha.0",
30
- "@storybook/addon-controls": "9.1.0-alpha.0",
31
- "@storybook/addon-docs": "9.1.0-alpha.0",
32
- "@storybook/addon-jest": "9.1.0-alpha.0",
33
- "@storybook/addon-links": "9.1.0-alpha.0",
34
- "@storybook/addon-measure": "9.1.0-alpha.0",
35
- "@storybook/addon-onboarding": "9.1.0-alpha.0",
36
- "@storybook/addon-outline": "9.1.0-alpha.0",
37
- "storybook-addon-pseudo-states": "9.1.0-alpha.0",
38
- "@storybook/addon-themes": "9.1.0-alpha.0",
39
- "@storybook/addon-toolbars": "9.1.0-alpha.0",
40
- "@storybook/addon-viewport": "9.1.0-alpha.0",
41
- "@storybook/addon-vitest": "9.1.0-alpha.0",
42
- "@storybook/builder-vite": "9.1.0-alpha.0",
43
- "@storybook/builder-webpack5": "9.1.0-alpha.0",
44
- storybook: "9.1.0-alpha.0",
45
- "@storybook/angular": "9.1.0-alpha.0",
46
- "@storybook/ember": "9.1.0-alpha.0",
47
- "@storybook/html-vite": "9.1.0-alpha.0",
48
- "@storybook/nextjs": "9.1.0-alpha.0",
49
- "@storybook/nextjs-vite": "9.1.0-alpha.0",
50
- "@storybook/preact-vite": "9.1.0-alpha.0",
51
- "@storybook/react-native-web-vite": "9.1.0-alpha.0",
52
- "@storybook/react-vite": "9.1.0-alpha.0",
53
- "@storybook/react-webpack5": "9.1.0-alpha.0",
54
- "@storybook/server-webpack5": "9.1.0-alpha.0",
55
- "@storybook/svelte-vite": "9.1.0-alpha.0",
56
- "@storybook/sveltekit": "9.1.0-alpha.0",
57
- "@storybook/vue3-vite": "9.1.0-alpha.0",
58
- "@storybook/web-components-vite": "9.1.0-alpha.0",
59
- sb: "9.1.0-alpha.0",
60
- "@storybook/cli": "9.1.0-alpha.0",
61
- "@storybook/codemod": "9.1.0-alpha.0",
62
- "@storybook/core-webpack": "9.1.0-alpha.0",
63
- "create-storybook": "9.1.0-alpha.0",
64
- "@storybook/csf-plugin": "9.1.0-alpha.0",
65
- "eslint-plugin-storybook": "9.1.0-alpha.0",
66
- "@storybook/react-dom-shim": "9.1.0-alpha.0",
67
- "@storybook/preset-create-react-app": "9.1.0-alpha.0",
68
- "@storybook/preset-react-webpack": "9.1.0-alpha.0",
69
- "@storybook/preset-server-webpack": "9.1.0-alpha.0",
70
- "@storybook/html": "9.1.0-alpha.0",
71
- "@storybook/preact": "9.1.0-alpha.0",
72
- "@storybook/react": "9.1.0-alpha.0",
73
- "@storybook/server": "9.1.0-alpha.0",
74
- "@storybook/svelte": "9.1.0-alpha.0",
75
- "@storybook/vue3": "9.1.0-alpha.0",
76
- "@storybook/web-components": "9.1.0-alpha.0"
27
+ "@storybook/addon-a11y": "9.1.0-alpha.10",
28
+ "@storybook/addon-docs": "9.1.0-alpha.10",
29
+ "@storybook/addon-jest": "9.1.0-alpha.10",
30
+ "@storybook/addon-links": "9.1.0-alpha.10",
31
+ "@storybook/addon-onboarding": "9.1.0-alpha.10",
32
+ "storybook-addon-pseudo-states": "9.1.0-alpha.10",
33
+ "@storybook/addon-themes": "9.1.0-alpha.10",
34
+ "@storybook/addon-vitest": "9.1.0-alpha.10",
35
+ "@storybook/builder-vite": "9.1.0-alpha.10",
36
+ "@storybook/builder-webpack5": "9.1.0-alpha.10",
37
+ storybook: "9.1.0-alpha.10",
38
+ "@storybook/angular": "9.1.0-alpha.10",
39
+ "@storybook/ember": "9.1.0-alpha.10",
40
+ "@storybook/html-vite": "9.1.0-alpha.10",
41
+ "@storybook/nextjs": "9.1.0-alpha.10",
42
+ "@storybook/nextjs-vite": "9.1.0-alpha.10",
43
+ "@storybook/preact-vite": "9.1.0-alpha.10",
44
+ "@storybook/react-native-web-vite": "9.1.0-alpha.10",
45
+ "@storybook/react-vite": "9.1.0-alpha.10",
46
+ "@storybook/react-webpack5": "9.1.0-alpha.10",
47
+ "@storybook/server-webpack5": "9.1.0-alpha.10",
48
+ "@storybook/svelte-vite": "9.1.0-alpha.10",
49
+ "@storybook/sveltekit": "9.1.0-alpha.10",
50
+ "@storybook/vue3-vite": "9.1.0-alpha.10",
51
+ "@storybook/web-components-vite": "9.1.0-alpha.10",
52
+ sb: "9.1.0-alpha.10",
53
+ "@storybook/cli": "9.1.0-alpha.10",
54
+ "@storybook/codemod": "9.1.0-alpha.10",
55
+ "@storybook/core-webpack": "9.1.0-alpha.10",
56
+ "create-storybook": "9.1.0-alpha.10",
57
+ "@storybook/csf-plugin": "9.1.0-alpha.10",
58
+ "eslint-plugin-storybook": "9.1.0-alpha.10",
59
+ "@storybook/react-dom-shim": "9.1.0-alpha.10",
60
+ "@storybook/preset-create-react-app": "9.1.0-alpha.10",
61
+ "@storybook/preset-react-webpack": "9.1.0-alpha.10",
62
+ "@storybook/preset-server-webpack": "9.1.0-alpha.10",
63
+ "@storybook/html": "9.1.0-alpha.10",
64
+ "@storybook/preact": "9.1.0-alpha.10",
65
+ "@storybook/react": "9.1.0-alpha.10",
66
+ "@storybook/server": "9.1.0-alpha.10",
67
+ "@storybook/svelte": "9.1.0-alpha.10",
68
+ "@storybook/vue3": "9.1.0-alpha.10",
69
+ "@storybook/web-components": "9.1.0-alpha.10"
77
70
  };
78
71
 
79
72
  // src/bin/index.ts
@@ -83,27 +76,27 @@ if (["dev", "build", "index"].includes(r[0]))
83
76
  else {
84
77
  let o;
85
78
  if (r[0] === "init") {
86
- let a;
79
+ let e;
87
80
  try {
88
- a = require.resolve("create-storybook/package.json");
81
+ e = require.resolve("create-storybook/package.json");
89
82
  } catch {
90
83
  }
91
- a ? JSON.parse((0, b.readFileSync)(a, "utf-8")).version === p["create-storybook"] && (o = [
84
+ e ? JSON.parse((0, b.readFileSync)(e, "utf-8")).version === p["create-storybook"] && (o = [
92
85
  "node",
93
- (0, s.join)((0, s.dirname)(a), "bin", "index.cjs"),
86
+ (0, s.join)((0, s.dirname)(e), "bin", "index.cjs"),
94
87
  ...r.slice(1)
95
88
  ]) : o = ["npx", "--yes", `create-storybook@${p.storybook}`, ...r.slice(1)];
96
89
  } else {
97
- let a;
90
+ let e;
98
91
  try {
99
- a = require.resolve("@storybook/cli/package.json");
92
+ e = require.resolve("@storybook/cli/package.json");
100
93
  } catch {
101
94
  }
102
- a ? JSON.parse((0, b.readFileSync)(a, "utf-8")).version === p["@storybook/cli"] && (o = ["node", (0, s.join)((0, s.dirname)(a), "bin", "\
95
+ e ? JSON.parse((0, b.readFileSync)(e, "utf-8")).version === p["@storybook/cli"] && (o = ["node", (0, s.join)((0, s.dirname)(e), "bin", "\
103
96
  index.cjs"), ...r]) : o = ["npx", "--yes", `@storybook/cli@${p.storybook}`, ...r];
104
97
  }
105
- o || (console.error("Could not run storybook cli, please report this as a bug"), process.exit(1)), (0, k.spawn)(o[0], o.slice(1), { stdio: "\
106
- inherit", shell: !0 }).on("exit", (a) => {
107
- a != null && process.exit(a), process.exit(1);
98
+ o || (console.error("Could not run storybook cli, please report this as a bug"), process.exit(1)), (0, n.spawn)(o[0], o.slice(1), { stdio: "\
99
+ inherit", shell: !0 }).on("exit", (e) => {
100
+ e != null && process.exit(e), process.exit(1);
108
101
  });
109
102
  }
package/dist/bin/index.js CHANGED
@@ -18,56 +18,49 @@ import { dirname as b, join as i } from "node:path";
18
18
 
19
19
  // src/common/versions.ts
20
20
  var t = {
21
- "@storybook/addon-a11y": "9.1.0-alpha.0",
22
- "@storybook/addon-actions": "9.1.0-alpha.0",
23
- "@storybook/addon-backgrounds": "9.1.0-alpha.0",
24
- "@storybook/addon-controls": "9.1.0-alpha.0",
25
- "@storybook/addon-docs": "9.1.0-alpha.0",
26
- "@storybook/addon-jest": "9.1.0-alpha.0",
27
- "@storybook/addon-links": "9.1.0-alpha.0",
28
- "@storybook/addon-measure": "9.1.0-alpha.0",
29
- "@storybook/addon-onboarding": "9.1.0-alpha.0",
30
- "@storybook/addon-outline": "9.1.0-alpha.0",
31
- "storybook-addon-pseudo-states": "9.1.0-alpha.0",
32
- "@storybook/addon-themes": "9.1.0-alpha.0",
33
- "@storybook/addon-toolbars": "9.1.0-alpha.0",
34
- "@storybook/addon-viewport": "9.1.0-alpha.0",
35
- "@storybook/addon-vitest": "9.1.0-alpha.0",
36
- "@storybook/builder-vite": "9.1.0-alpha.0",
37
- "@storybook/builder-webpack5": "9.1.0-alpha.0",
38
- storybook: "9.1.0-alpha.0",
39
- "@storybook/angular": "9.1.0-alpha.0",
40
- "@storybook/ember": "9.1.0-alpha.0",
41
- "@storybook/html-vite": "9.1.0-alpha.0",
42
- "@storybook/nextjs": "9.1.0-alpha.0",
43
- "@storybook/nextjs-vite": "9.1.0-alpha.0",
44
- "@storybook/preact-vite": "9.1.0-alpha.0",
45
- "@storybook/react-native-web-vite": "9.1.0-alpha.0",
46
- "@storybook/react-vite": "9.1.0-alpha.0",
47
- "@storybook/react-webpack5": "9.1.0-alpha.0",
48
- "@storybook/server-webpack5": "9.1.0-alpha.0",
49
- "@storybook/svelte-vite": "9.1.0-alpha.0",
50
- "@storybook/sveltekit": "9.1.0-alpha.0",
51
- "@storybook/vue3-vite": "9.1.0-alpha.0",
52
- "@storybook/web-components-vite": "9.1.0-alpha.0",
53
- sb: "9.1.0-alpha.0",
54
- "@storybook/cli": "9.1.0-alpha.0",
55
- "@storybook/codemod": "9.1.0-alpha.0",
56
- "@storybook/core-webpack": "9.1.0-alpha.0",
57
- "create-storybook": "9.1.0-alpha.0",
58
- "@storybook/csf-plugin": "9.1.0-alpha.0",
59
- "eslint-plugin-storybook": "9.1.0-alpha.0",
60
- "@storybook/react-dom-shim": "9.1.0-alpha.0",
61
- "@storybook/preset-create-react-app": "9.1.0-alpha.0",
62
- "@storybook/preset-react-webpack": "9.1.0-alpha.0",
63
- "@storybook/preset-server-webpack": "9.1.0-alpha.0",
64
- "@storybook/html": "9.1.0-alpha.0",
65
- "@storybook/preact": "9.1.0-alpha.0",
66
- "@storybook/react": "9.1.0-alpha.0",
67
- "@storybook/server": "9.1.0-alpha.0",
68
- "@storybook/svelte": "9.1.0-alpha.0",
69
- "@storybook/vue3": "9.1.0-alpha.0",
70
- "@storybook/web-components": "9.1.0-alpha.0"
21
+ "@storybook/addon-a11y": "9.1.0-alpha.10",
22
+ "@storybook/addon-docs": "9.1.0-alpha.10",
23
+ "@storybook/addon-jest": "9.1.0-alpha.10",
24
+ "@storybook/addon-links": "9.1.0-alpha.10",
25
+ "@storybook/addon-onboarding": "9.1.0-alpha.10",
26
+ "storybook-addon-pseudo-states": "9.1.0-alpha.10",
27
+ "@storybook/addon-themes": "9.1.0-alpha.10",
28
+ "@storybook/addon-vitest": "9.1.0-alpha.10",
29
+ "@storybook/builder-vite": "9.1.0-alpha.10",
30
+ "@storybook/builder-webpack5": "9.1.0-alpha.10",
31
+ storybook: "9.1.0-alpha.10",
32
+ "@storybook/angular": "9.1.0-alpha.10",
33
+ "@storybook/ember": "9.1.0-alpha.10",
34
+ "@storybook/html-vite": "9.1.0-alpha.10",
35
+ "@storybook/nextjs": "9.1.0-alpha.10",
36
+ "@storybook/nextjs-vite": "9.1.0-alpha.10",
37
+ "@storybook/preact-vite": "9.1.0-alpha.10",
38
+ "@storybook/react-native-web-vite": "9.1.0-alpha.10",
39
+ "@storybook/react-vite": "9.1.0-alpha.10",
40
+ "@storybook/react-webpack5": "9.1.0-alpha.10",
41
+ "@storybook/server-webpack5": "9.1.0-alpha.10",
42
+ "@storybook/svelte-vite": "9.1.0-alpha.10",
43
+ "@storybook/sveltekit": "9.1.0-alpha.10",
44
+ "@storybook/vue3-vite": "9.1.0-alpha.10",
45
+ "@storybook/web-components-vite": "9.1.0-alpha.10",
46
+ sb: "9.1.0-alpha.10",
47
+ "@storybook/cli": "9.1.0-alpha.10",
48
+ "@storybook/codemod": "9.1.0-alpha.10",
49
+ "@storybook/core-webpack": "9.1.0-alpha.10",
50
+ "create-storybook": "9.1.0-alpha.10",
51
+ "@storybook/csf-plugin": "9.1.0-alpha.10",
52
+ "eslint-plugin-storybook": "9.1.0-alpha.10",
53
+ "@storybook/react-dom-shim": "9.1.0-alpha.10",
54
+ "@storybook/preset-create-react-app": "9.1.0-alpha.10",
55
+ "@storybook/preset-react-webpack": "9.1.0-alpha.10",
56
+ "@storybook/preset-server-webpack": "9.1.0-alpha.10",
57
+ "@storybook/html": "9.1.0-alpha.10",
58
+ "@storybook/preact": "9.1.0-alpha.10",
59
+ "@storybook/react": "9.1.0-alpha.10",
60
+ "@storybook/server": "9.1.0-alpha.10",
61
+ "@storybook/svelte": "9.1.0-alpha.10",
62
+ "@storybook/vue3": "9.1.0-alpha.10",
63
+ "@storybook/web-components": "9.1.0-alpha.10"
71
64
  };
72
65
 
73
66
  // src/bin/index.ts