storybook 9.0.0-alpha.9 → 9.0.0-beta.0

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 (140) hide show
  1. package/assets/docs/addon-backgrounds.gif +0 -0
  2. package/assets/docs/addon-controls-args-annotated.png +0 -0
  3. package/assets/docs/addon-controls-args-background-color.png +0 -0
  4. package/assets/docs/addon-controls-args-background-string.png +0 -0
  5. package/assets/docs/addon-controls-args-docs.png +0 -0
  6. package/assets/docs/addon-controls-args-logging.png +0 -0
  7. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  8. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  9. package/assets/docs/addon-controls-args-reflow.png +0 -0
  10. package/assets/docs/addon-controls-args-template.png +0 -0
  11. package/assets/docs/addon-controls-expanded.png +0 -0
  12. package/assets/docs/addon-controls-hero.gif +0 -0
  13. package/assets/docs/addon-controls-install.png +0 -0
  14. package/assets/docs/hero.gif +0 -0
  15. package/assets/docs/highlight.png +0 -0
  16. package/assets/docs/viewport.png +0 -0
  17. package/assets/server/base-preview-head.html +1 -3
  18. package/bin/index.cjs +2 -2
  19. package/dist/actions/decorator.js +67 -72
  20. package/dist/actions/index.cjs +27 -31
  21. package/dist/actions/index.d.ts +0 -3
  22. package/dist/actions/index.js +27 -31
  23. package/dist/actions/preview.cjs +23 -27
  24. package/dist/actions/preview.d.ts +0 -1
  25. package/dist/actions/preview.js +19 -23
  26. package/dist/babel/index.cjs +822 -816
  27. package/dist/babel/index.js +822 -816
  28. package/dist/backgrounds/index.cjs +148 -0
  29. package/dist/backgrounds/index.d.ts +91 -0
  30. package/dist/backgrounds/index.js +130 -0
  31. package/dist/backgrounds/preview.cjs +143 -0
  32. package/dist/backgrounds/preview.d.ts +54 -0
  33. package/dist/backgrounds/preview.js +127 -0
  34. package/dist/bin/index.cjs +73 -92
  35. package/dist/bin/index.js +66 -85
  36. package/dist/builder-manager/index.cjs +316 -296
  37. package/dist/builder-manager/index.js +567 -547
  38. package/dist/channels/index.cjs +1020 -950
  39. package/dist/channels/index.js +1256 -1201
  40. package/dist/cli/bin/index.cjs +198 -198
  41. package/dist/cli/bin/index.js +204 -204
  42. package/dist/cli/index.cjs +61734 -7589
  43. package/dist/cli/index.d.ts +24 -20
  44. package/dist/cli/index.js +61775 -7630
  45. package/dist/common/index.cjs +16133 -9095
  46. package/dist/common/index.d.ts +32 -24
  47. package/dist/common/index.js +16227 -9183
  48. package/dist/component-testing/index.cjs +23 -0
  49. package/dist/component-testing/index.d.ts +3 -0
  50. package/dist/component-testing/index.js +5 -0
  51. package/dist/component-testing/preview.cjs +40 -0
  52. package/dist/component-testing/preview.d.ts +5 -0
  53. package/dist/component-testing/preview.js +25 -0
  54. package/dist/components/index.cjs +6479 -13005
  55. package/dist/components/index.d.ts +8 -257
  56. package/dist/components/index.js +6160 -18689
  57. package/dist/controls/decorator.d.ts +5 -0
  58. package/dist/controls/decorator.js +8 -0
  59. package/dist/controls/index.cjs +26 -0
  60. package/dist/controls/index.d.ts +39 -0
  61. package/dist/controls/index.js +6 -0
  62. package/dist/controls/preview.cjs +26 -0
  63. package/dist/controls/preview.d.ts +54 -0
  64. package/dist/controls/preview.js +9 -0
  65. package/dist/core-events/index.cjs +91 -106
  66. package/dist/core-events/index.d.ts +2 -80
  67. package/dist/core-events/index.js +79 -94
  68. package/dist/core-server/index.cjs +12409 -12231
  69. package/dist/core-server/index.d.ts +32 -23
  70. package/dist/core-server/index.js +12567 -12389
  71. package/dist/core-server/presets/common-manager.css +170 -0
  72. package/dist/core-server/presets/common-manager.js +12153 -12
  73. package/dist/core-server/presets/common-preset.cjs +3004 -3151
  74. package/dist/core-server/presets/common-preset.js +2833 -2981
  75. package/dist/csf/index.d.ts +1 -3
  76. package/dist/csf-tools/index.cjs +412 -403
  77. package/dist/csf-tools/index.d.ts +0 -4
  78. package/dist/csf-tools/index.js +410 -401
  79. package/dist/docs-tools/index.cjs +2569 -575
  80. package/dist/docs-tools/index.js +2565 -564
  81. package/dist/highlight/index.cjs +27 -0
  82. package/dist/highlight/index.d.ts +61 -0
  83. package/dist/highlight/index.js +7 -0
  84. package/dist/highlight/preview.cjs +535 -0
  85. package/dist/highlight/preview.d.ts +54 -0
  86. package/dist/highlight/preview.js +519 -0
  87. package/dist/instrumenter/index.cjs +1411 -1758
  88. package/dist/instrumenter/index.d.ts +8 -7
  89. package/dist/instrumenter/index.js +1325 -1663
  90. package/dist/manager/globals-module-info.cjs +22 -33
  91. package/dist/manager/globals-module-info.js +7 -18
  92. package/dist/manager/globals-runtime.js +45452 -49541
  93. package/dist/manager/runtime.js +4392 -3774
  94. package/dist/manager-api/index.cjs +2622 -2529
  95. package/dist/manager-api/index.d.ts +109 -114
  96. package/dist/manager-api/index.js +2603 -2475
  97. package/dist/manager-errors.js +41 -37
  98. package/dist/measure/index.cjs +476 -0
  99. package/dist/measure/index.d.ts +66 -0
  100. package/dist/measure/index.js +464 -0
  101. package/dist/measure/preview.cjs +466 -0
  102. package/dist/measure/preview.d.ts +59 -0
  103. package/dist/measure/preview.js +450 -0
  104. package/dist/outline/index.cjs +528 -0
  105. package/dist/outline/index.d.ts +66 -0
  106. package/dist/outline/index.js +500 -0
  107. package/dist/outline/preview.cjs +518 -0
  108. package/dist/outline/preview.d.ts +59 -0
  109. package/dist/outline/preview.js +486 -0
  110. package/dist/preview/runtime.js +41973 -38159
  111. package/dist/preview-api/index.cjs +1204 -1293
  112. package/dist/preview-api/index.d.ts +126 -178
  113. package/dist/preview-api/index.js +1614 -1685
  114. package/dist/preview-errors.cjs +65 -51
  115. package/dist/preview-errors.d.ts +6 -2
  116. package/dist/preview-errors.js +176 -142
  117. package/dist/server-errors.cjs +160 -113
  118. package/dist/server-errors.d.ts +12 -2
  119. package/dist/server-errors.js +157 -110
  120. package/dist/telemetry/index.cjs +374 -370
  121. package/dist/telemetry/index.d.ts +1 -1
  122. package/dist/telemetry/index.js +460 -456
  123. package/dist/test/index.cjs +1553 -1552
  124. package/dist/test/index.js +9603 -9514
  125. package/dist/test/preview.cjs +1906 -1905
  126. package/dist/test/preview.d.ts +0 -6
  127. package/dist/test/preview.js +3664 -3603
  128. package/dist/test/spy.cjs +65 -64
  129. package/dist/test/spy.js +59 -58
  130. package/dist/types/index.cjs +11 -12
  131. package/dist/types/index.d.ts +601 -334
  132. package/dist/types/index.js +1 -2
  133. package/dist/viewport/index.cjs +310 -0
  134. package/dist/viewport/index.d.ts +320 -0
  135. package/dist/viewport/index.js +290 -0
  136. package/dist/viewport/preview.cjs +35 -0
  137. package/dist/viewport/preview.d.ts +68 -0
  138. package/dist/viewport/preview.js +19 -0
  139. package/package.json +207 -12
  140. package/dist/actions/manager.js +0 -1196
Binary file
Binary file
Binary file
@@ -1,8 +1,7 @@
1
1
  <base target="_parent" />
2
2
 
3
3
  <style>
4
- /* While we aren't showing the main block yet, but still preparing, we want everything the user
5
- has rendered, which may or may not be in #storybook-root, to be display none */
4
+ /* While we aren't showing the main block yet, but still preparing, we want everything the user has rendered, which may or may not be in #storybook-root, to be display none */
6
5
  .sb-show-preparing-story:not(.sb-show-main) > :not(.sb-preparing-story) {
7
6
  display: none;
8
7
  }
@@ -437,7 +436,6 @@
437
436
 
438
437
  <script>
439
438
  /* globals window */
440
- /* eslint-disable no-underscore-dangle */
441
439
  try {
442
440
  if (window.top !== window) {
443
441
  window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.top.__REACT_DEVTOOLS_GLOBAL_HOOK__;
package/bin/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const majorNodeVersion = parseInt(process.versions.node, 10);
4
- if (majorNodeVersion < 18) {
5
- console.error('To run Storybook you need to have Node.js 18 or higher');
4
+ if (majorNodeVersion < 20) {
5
+ console.error('To run Storybook you need to have Node.js 20 or higher');
6
6
  process.exit(1);
7
7
  }
8
8
 
@@ -1,18 +1,17 @@
1
- var j = Object.defineProperty;
2
- var r = (o, e) => j(o, "name", { value: e, configurable: !0 });
1
+ var R = Object.defineProperty;
2
+ var r = (e, o) => R(e, "name", { value: o, configurable: !0 });
3
3
 
4
4
  // src/actions/decorator.ts
5
- import { global as F } from "@storybook/global";
6
- import { makeDecorator as M, useEffect as C } from "storybook/preview-api";
5
+ import { makeDecorator as T, useEffect as k } from "storybook/preview-api";
7
6
 
8
7
  // src/actions/constants.ts
9
- var h = "actions", y = "storybook/actions", L = `${y}/panel`, g = `${y}/action-event`, W = `${y}/action-clear`;
8
+ var h = "actions", y = "storybook/actions", B = `${y}/panel`, g = `${y}/action-event`, H = `${y}/action-clear`;
10
9
 
11
10
  // src/actions/runtime/action.ts
12
- import { ImplicitActionsDuringRendering as S } from "storybook/internal/preview-errors";
11
+ import { ImplicitActionsDuringRendering as D } from "storybook/internal/preview-errors";
13
12
  import { global as E } from "@storybook/global";
14
- import { addons as I } from "storybook/preview-api";
15
- import { v4 as P } from "uuid";
13
+ import { addons as j } from "storybook/preview-api";
14
+ import { v4 as S } from "uuid";
16
15
 
17
16
  // src/actions/runtime/configureActions.ts
18
17
  var a = {
@@ -22,72 +21,68 @@ var a = {
22
21
  };
23
22
 
24
23
  // src/actions/runtime/action.ts
25
- var A = /* @__PURE__ */ r((o, e) => {
26
- let t = Object.getPrototypeOf(o);
27
- return !t || e(t) ? t : A(t, e);
28
- }, "findProto"), x = /* @__PURE__ */ r((o) => !!(typeof o == "object" && o && A(o, (e) => /^Synthetic(?:Base)?Event$/.test(e.constructor.name)) &&
29
- typeof o.persist == "function"), "isReactSyntheticEvent"), k = /* @__PURE__ */ r((o) => {
30
- if (x(o)) {
31
- let e = Object.create(
32
- o.constructor.prototype,
33
- Object.getOwnPropertyDescriptors(o)
24
+ var A = /* @__PURE__ */ r((e, o) => {
25
+ let t = Object.getPrototypeOf(e);
26
+ return !t || o(t) ? t : A(t, o);
27
+ }, "findProto"), I = /* @__PURE__ */ r((e) => !!(typeof e == "object" && e && A(e, (o) => /^Synthetic(?:Base)?Event$/.test(o.constructor.name)) &&
28
+ typeof e.persist == "function"), "isReactSyntheticEvent"), P = /* @__PURE__ */ r((e) => {
29
+ if (I(e)) {
30
+ let o = Object.create(
31
+ e.constructor.prototype,
32
+ Object.getOwnPropertyDescriptors(e)
34
33
  );
35
- e.persist();
36
- let t = Object.getOwnPropertyDescriptor(e, "view"), n = t?.value;
37
- return typeof n == "object" && n?.constructor.name === "Window" && Object.defineProperty(e, "view", {
34
+ o.persist();
35
+ let t = Object.getOwnPropertyDescriptor(o, "view"), n = t?.value;
36
+ return typeof n == "object" && n?.constructor.name === "Window" && Object.defineProperty(o, "view", {
38
37
  ...t,
39
38
  value: Object.create(n.constructor.prototype)
40
- }), e;
39
+ }), o;
41
40
  }
42
- return o;
43
- }, "serializeArg"), T = /* @__PURE__ */ r(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? P() : (
41
+ return e;
42
+ }, "serializeArg"), x = /* @__PURE__ */ r(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? S() : (
44
43
  // pseudo random id, example response lo1e7zm4832bkr7yfl7
45
44
  Date.now().toString(36) + Math.random().toString(36).substring(2)
46
45
  ), "generateId");
47
- function O(o, e = {}) {
46
+ function O(e, o = {}) {
48
47
  let t = {
49
48
  ...a,
50
- ...e
49
+ ...o
51
50
  }, n = /* @__PURE__ */ r(function(...i) {
52
- if (e.implicit) {
53
- let u = ("__STORYBOOK_PREVIEW__" in E ? (
54
- // eslint-disable-next-line no-underscore-dangle
55
- E.__STORYBOOK_PREVIEW__
56
- ) : void 0)?.storyRenders.find(
57
- (s) => s.phase === "playing" || s.phase === "rendering"
51
+ if (o.implicit) {
52
+ let d = ("__STORYBOOK_PREVIEW__" in E ? E.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
53
+ (c) => c.phase === "playing" || c.phase === "rendering"
58
54
  );
59
- if (u) {
60
- let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, d = new S({
61
- phase: u.phase,
62
- name: o,
63
- deprecated: s
55
+ if (d) {
56
+ let c = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, u = new D({
57
+ phase: d.phase,
58
+ name: e,
59
+ deprecated: c
64
60
  });
65
- if (s)
66
- console.warn(d);
61
+ if (c)
62
+ console.warn(u);
67
63
  else
68
- throw d;
64
+ throw u;
69
65
  }
70
66
  }
71
- let m = I.getChannel(), p = T(), l = 5, f = i.map(k), R = i.length > 1 ? f : f[0], D = {
67
+ let m = j.getChannel(), p = x(), l = 5, f = i.map(P), w = i.length > 1 ? f : f[0], _ = {
72
68
  id: p,
73
69
  count: 0,
74
- data: { name: o, args: R },
70
+ data: { name: e, args: w },
75
71
  options: {
76
72
  ...t,
77
- maxDepth: l + (t.depth || 3),
78
- allowFunction: t.allowFunction || !1
73
+ maxDepth: l + (t.depth || 3)
79
74
  }
80
75
  };
81
- m.emit(g, D);
76
+ m.emit(g, _);
82
77
  }, "actionHandler");
83
- return n.isAction = !0, n.implicit = e.implicit, n;
78
+ return n.isAction = !0, n.implicit = o.implicit, n;
84
79
  }
85
80
  r(O, "action");
86
81
 
87
82
  // src/actions/runtime/actions.ts
88
- var b = /* @__PURE__ */ r((...o) => {
89
- let e = a, t = o;
90
- t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != "string" && (e = {
83
+ var b = /* @__PURE__ */ r((...e) => {
84
+ let o = a, t = e;
85
+ t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != "string" && (o = {
91
86
  ...a,
92
87
  ...t.pop()
93
88
  });
@@ -95,45 +90,45 @@ var b = /* @__PURE__ */ r((...o) => {
95
90
  (t.length !== 1 || typeof n == "string") && (n = {}, t.forEach((i) => {
96
91
  n[i] = i;
97
92
  }));
98
- let c = {};
93
+ let s = {};
99
94
  return Object.keys(n).forEach((i) => {
100
- c[i] = O(n[i], e);
101
- }), c;
95
+ s[i] = O(n[i], o);
96
+ }), s;
102
97
  }, "actions");
103
98
 
104
99
  // src/actions/decorator.ts
105
- var { document: v, Element: w } = F, N = /^(\S+)\s*(.*)$/, V = w != null && !w.prototype.matches, Y = V ? "msMatchesSelector" : "matches", _ = /* @__PURE__ */ r(
106
- (o, e) => {
107
- if (o[Y](e))
100
+ var F = /^(\S+)\s*(.*)$/, M = Element != null && !Element.prototype.matches, C = M ? "msMatchesSelector" : "matches", v = /* @__PURE__ */ r(
101
+ (e, o) => {
102
+ if (e[C](o))
108
103
  return !0;
109
- let t = o.parentElement;
110
- return t ? _(t, e) : !1;
111
- }, "hasMatchInAncestry"), $ = /* @__PURE__ */ r((o, ...e) => {
112
- let t = o(...e);
113
- return Object.entries(t).map(([n, c]) => {
114
- let [i, m, p] = n.match(N) || [];
104
+ let t = e.parentElement;
105
+ return t ? v(t, o) : !1;
106
+ }, "hasMatchInAncestry"), N = /* @__PURE__ */ r((e, ...o) => {
107
+ let t = e(...o);
108
+ return Object.entries(t).map(([n, s]) => {
109
+ let [i, m, p] = n.match(F) || [];
115
110
  return {
116
111
  eventName: m,
117
112
  handler: /* @__PURE__ */ r((l) => {
118
- (!p || _(l.target, p)) && c(l);
113
+ (!p || v(l.target, p)) && s(l);
119
114
  }, "handler")
120
115
  };
121
116
  });
122
- }, "createHandlers"), B = /* @__PURE__ */ r((o, ...e) => {
123
- let t = v && v.getElementById("storybook-root");
124
- C(() => {
125
- if (t != null) {
126
- let n = $(o, ...e);
127
- return n.forEach(({ eventName: c, handler: i }) => t.addEventListener(c, i)), () => n.forEach(({ eventName: c, handler: i }) => t.removeEventListener(
128
- c, i));
117
+ }, "createHandlers"), V = /* @__PURE__ */ r((e, ...o) => {
118
+ let t = typeof globalThis.document < "u" && globalThis.document.getElementById("storybook-root");
119
+ k(() => {
120
+ if (t) {
121
+ let n = N(e, ...o);
122
+ return n.forEach(({ eventName: s, handler: i }) => t.addEventListener(s, i)), () => n.forEach(({ eventName: s, handler: i }) => t.removeEventListener(
123
+ s, i));
129
124
  }
130
- }, [t, o, e]);
131
- }, "applyEventHandlers"), mt = M({
125
+ }, [t, e, o]);
126
+ }, "applyEventHandlers"), ct = T({
132
127
  name: "withActions",
133
128
  parameterName: h,
134
129
  skipIfNoParametersOrOptions: !0,
135
- wrapper: /* @__PURE__ */ r((o, e, { parameters: t }) => (t?.handles && B(b, ...t.handles), o(e)), "wrapper")
130
+ wrapper: /* @__PURE__ */ r((e, o, { parameters: t }) => (t?.handles && V(b, ...t.handles), e(o)), "wrapper")
136
131
  });
137
132
  export {
138
- mt as withActions
133
+ ct as withActions
139
134
  };
@@ -3,14 +3,14 @@ var a = Object.defineProperty;
3
3
  var x = Object.getOwnPropertyDescriptor;
4
4
  var R = Object.getOwnPropertyNames;
5
5
  var j = Object.prototype.hasOwnProperty;
6
- var i = (t, o) => a(t, "name", { value: o, configurable: !0 });
6
+ var r = (t, o) => a(t, "name", { value: o, configurable: !0 });
7
7
  var I = (t, o) => {
8
8
  for (var n in o)
9
9
  a(t, n, { get: o[n], enumerable: !0 });
10
10
  }, P = (t, o, n, e) => {
11
11
  if (o && typeof o == "object" || typeof o == "function")
12
- for (let r of R(o))
13
- !j.call(t, r) && r !== n && a(t, r, { get: () => o[r], enumerable: !(e = x(o, r)) || e.enumerable });
12
+ for (let i of R(o))
13
+ !j.call(t, i) && i !== n && a(t, i, { get: () => o[i], enumerable: !(e = x(o, i)) || e.enumerable });
14
14
  return t;
15
15
  };
16
16
  var S = (t) => P(a({}, "__esModule", { value: !0 }), t);
@@ -18,13 +18,13 @@ var S = (t) => P(a({}, "__esModule", { value: !0 }), t);
18
18
  // src/actions/index.ts
19
19
  var K = {};
20
20
  I(K, {
21
- ADDON_ID: () => l,
22
- CLEAR_ID: () => F,
23
- CYCLIC_KEY: () => C,
24
- EVENT_ID: () => f,
21
+ ADDON_ID: () => m,
22
+ CLEAR_ID: () => C,
23
+ CYCLIC_KEY: () => F,
24
+ EVENT_ID: () => y,
25
25
  PANEL_ID: () => k,
26
26
  PARAM_KEY: () => T,
27
- action: () => y,
27
+ action: () => l,
28
28
  actions: () => B,
29
29
  config: () => s,
30
30
  configureActions: () => V
@@ -32,26 +32,26 @@ I(K, {
32
32
  module.exports = S(K);
33
33
 
34
34
  // src/actions/constants.ts
35
- var T = "actions", l = "storybook/actions", k = `${l}/panel`, f = `${l}/action-event`, F = `${l}/action-clear`, C = "$___storybook.isCyclic";
35
+ var T = "actions", m = "storybook/actions", k = `${m}/panel`, y = `${m}/action-event`, C = `${m}/action-clear`, F = "$___storybook.isCyclic";
36
36
 
37
37
  // src/actions/runtime/action.ts
38
- var A = require("storybook/internal/preview-errors"), m = require("@storybook/global"), O = require("storybook/preview-api"), h = require("uuid");
38
+ var A = require("storybook/internal/preview-errors"), f = require("@storybook/global"), O = require("storybook/preview-api"), h = require("uuid");
39
39
 
40
40
  // src/actions/runtime/configureActions.ts
41
41
  var s = {
42
42
  depth: 10,
43
43
  clearOnStoryChange: !0,
44
44
  limit: 50
45
- }, V = /* @__PURE__ */ i((t = {}) => {
45
+ }, V = /* @__PURE__ */ r((t = {}) => {
46
46
  Object.assign(s, t);
47
47
  }, "configureActions");
48
48
 
49
49
  // src/actions/runtime/action.ts
50
- var b = /* @__PURE__ */ i((t, o) => {
50
+ var b = /* @__PURE__ */ r((t, o) => {
51
51
  let n = Object.getPrototypeOf(t);
52
52
  return !n || o(n) ? n : b(n, o);
53
- }, "findProto"), W = /* @__PURE__ */ i((t) => !!(typeof t == "object" && t && b(t, (o) => /^Synthetic(?:Base)?Event$/.test(o.constructor.name)) &&
54
- typeof t.persist == "function"), "isReactSyntheticEvent"), Y = /* @__PURE__ */ i((t) => {
53
+ }, "findProto"), W = /* @__PURE__ */ r((t) => !!(typeof t == "object" && t && b(t, (o) => /^Synthetic(?:Base)?Event$/.test(o.constructor.name)) &&
54
+ typeof t.persist == "function"), "isReactSyntheticEvent"), Y = /* @__PURE__ */ r((t) => {
55
55
  if (W(t)) {
56
56
  let o = Object.create(
57
57
  t.constructor.prototype,
@@ -65,20 +65,17 @@ typeof t.persist == "function"), "isReactSyntheticEvent"), Y = /* @__PURE__ */ i
65
65
  }), o;
66
66
  }
67
67
  return t;
68
- }, "serializeArg"), $ = /* @__PURE__ */ i(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? (0, h.v4)() : (
68
+ }, "serializeArg"), $ = /* @__PURE__ */ r(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? (0, h.v4)() : (
69
69
  // pseudo random id, example response lo1e7zm4832bkr7yfl7
70
70
  Date.now().toString(36) + Math.random().toString(36).substring(2)
71
71
  ), "generateId");
72
- function y(t, o = {}) {
72
+ function l(t, o = {}) {
73
73
  let n = {
74
74
  ...s,
75
75
  ...o
76
- }, e = /* @__PURE__ */ i(function(...c) {
76
+ }, e = /* @__PURE__ */ r(function(...c) {
77
77
  if (o.implicit) {
78
- let d = ("__STORYBOOK_PREVIEW__" in m.global ? (
79
- // eslint-disable-next-line no-underscore-dangle
80
- m.global.__STORYBOOK_PREVIEW__
81
- ) : void 0)?.storyRenders.find(
78
+ let d = ("__STORYBOOK_PREVIEW__" in f.global ? f.global.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
82
79
  (p) => p.phase === "playing" || p.phase === "rendering"
83
80
  );
84
81
  if (d) {
@@ -93,24 +90,23 @@ function y(t, o = {}) {
93
90
  throw g;
94
91
  }
95
92
  }
96
- let w = O.addons.getChannel(), E = $(), v = 5, u = c.map(Y), _ = c.length > 1 ? u : u[0], D = {
97
- id: E,
93
+ let E = O.addons.getChannel(), v = $(), w = 5, u = c.map(Y), _ = c.length > 1 ? u : u[0], D = {
94
+ id: v,
98
95
  count: 0,
99
96
  data: { name: t, args: _ },
100
97
  options: {
101
98
  ...n,
102
- maxDepth: v + (n.depth || 3),
103
- allowFunction: n.allowFunction || !1
99
+ maxDepth: w + (n.depth || 3)
104
100
  }
105
101
  };
106
- w.emit(f, D);
102
+ E.emit(y, D);
107
103
  }, "actionHandler");
108
104
  return e.isAction = !0, e.implicit = o.implicit, e;
109
105
  }
110
- i(y, "action");
106
+ r(l, "action");
111
107
 
112
108
  // src/actions/runtime/actions.ts
113
- var B = /* @__PURE__ */ i((...t) => {
109
+ var B = /* @__PURE__ */ r((...t) => {
114
110
  let o = s, n = t;
115
111
  n.length === 1 && Array.isArray(n[0]) && ([n] = n), n.length !== 1 && typeof n[n.length - 1] != "string" && (o = {
116
112
  ...s,
@@ -120,8 +116,8 @@ var B = /* @__PURE__ */ i((...t) => {
120
116
  (n.length !== 1 || typeof e == "string") && (e = {}, n.forEach((c) => {
121
117
  e[c] = c;
122
118
  }));
123
- let r = {};
119
+ let i = {};
124
120
  return Object.keys(e).forEach((c) => {
125
- r[c] = y(e[c], o);
126
- }), r;
121
+ i[c] = l(e[c], o);
122
+ }), i;
127
123
  }, "actions");
@@ -7,15 +7,12 @@ declare const CYCLIC_KEY = "$___storybook.isCyclic";
7
7
 
8
8
  interface Options$1 {
9
9
  allowRegExp: boolean;
10
- allowFunction: boolean;
11
10
  allowSymbol: boolean;
12
11
  allowDate: boolean;
13
12
  allowUndefined: boolean;
14
- allowClass: boolean;
15
13
  allowError: boolean;
16
14
  maxDepth: number;
17
15
  space: number | undefined;
18
- lazyEval: boolean;
19
16
  }
20
17
 
21
18
  interface Options {
@@ -1,11 +1,11 @@
1
- var E = Object.defineProperty;
2
- var i = (o, n) => E(o, "name", { value: n, configurable: !0 });
1
+ var v = Object.defineProperty;
2
+ var r = (o, n) => v(o, "name", { value: n, configurable: !0 });
3
3
 
4
4
  // src/actions/constants.ts
5
- var S = "actions", a = "storybook/actions", T = `${a}/panel`, y = `${a}/action-event`, k = `${a}/action-clear`, F = "$___storybook.isCyclic";
5
+ var S = "actions", a = "storybook/actions", T = `${a}/panel`, l = `${a}/action-event`, k = `${a}/action-clear`, C = "$___storybook.isCyclic";
6
6
 
7
7
  // src/actions/runtime/action.ts
8
- import { ImplicitActionsDuringRendering as v } from "storybook/internal/preview-errors";
8
+ import { ImplicitActionsDuringRendering as w } from "storybook/internal/preview-errors";
9
9
  import { global as u } from "@storybook/global";
10
10
  import { addons as _ } from "storybook/preview-api";
11
11
  import { v4 as D } from "uuid";
@@ -15,16 +15,16 @@ var c = {
15
15
  depth: 10,
16
16
  clearOnStoryChange: !0,
17
17
  limit: 50
18
- }, V = /* @__PURE__ */ i((o = {}) => {
18
+ }, V = /* @__PURE__ */ r((o = {}) => {
19
19
  Object.assign(c, o);
20
20
  }, "configureActions");
21
21
 
22
22
  // src/actions/runtime/action.ts
23
- var d = /* @__PURE__ */ i((o, n) => {
23
+ var d = /* @__PURE__ */ r((o, n) => {
24
24
  let t = Object.getPrototypeOf(o);
25
25
  return !t || n(t) ? t : d(t, n);
26
- }, "findProto"), x = /* @__PURE__ */ i((o) => !!(typeof o == "object" && o && d(o, (n) => /^Synthetic(?:Base)?Event$/.test(n.constructor.name)) &&
27
- typeof o.persist == "function"), "isReactSyntheticEvent"), R = /* @__PURE__ */ i((o) => {
26
+ }, "findProto"), x = /* @__PURE__ */ r((o) => !!(typeof o == "object" && o && d(o, (n) => /^Synthetic(?:Base)?Event$/.test(n.constructor.name)) &&
27
+ typeof o.persist == "function"), "isReactSyntheticEvent"), R = /* @__PURE__ */ r((o) => {
28
28
  if (x(o)) {
29
29
  let n = Object.create(
30
30
  o.constructor.prototype,
@@ -38,7 +38,7 @@ typeof o.persist == "function"), "isReactSyntheticEvent"), R = /* @__PURE__ */ i
38
38
  }), n;
39
39
  }
40
40
  return o;
41
- }, "serializeArg"), j = /* @__PURE__ */ i(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? D() : (
41
+ }, "serializeArg"), j = /* @__PURE__ */ r(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? D() : (
42
42
  // pseudo random id, example response lo1e7zm4832bkr7yfl7
43
43
  Date.now().toString(36) + Math.random().toString(36).substring(2)
44
44
  ), "generateId");
@@ -46,63 +46,59 @@ function g(o, n = {}) {
46
46
  let t = {
47
47
  ...c,
48
48
  ...n
49
- }, e = /* @__PURE__ */ i(function(...r) {
49
+ }, e = /* @__PURE__ */ r(function(...i) {
50
50
  if (n.implicit) {
51
- let f = ("__STORYBOOK_PREVIEW__" in u ? (
52
- // eslint-disable-next-line no-underscore-dangle
53
- u.__STORYBOOK_PREVIEW__
54
- ) : void 0)?.storyRenders.find(
51
+ let y = ("__STORYBOOK_PREVIEW__" in u ? u.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
55
52
  (s) => s.phase === "playing" || s.phase === "rendering"
56
53
  );
57
- if (f) {
58
- let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, m = new v({
59
- phase: f.phase,
54
+ if (y) {
55
+ let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, f = new w({
56
+ phase: y.phase,
60
57
  name: o,
61
58
  deprecated: s
62
59
  });
63
60
  if (s)
64
- console.warn(m);
61
+ console.warn(f);
65
62
  else
66
- throw m;
63
+ throw f;
67
64
  }
68
65
  }
69
- let A = _.getChannel(), O = j(), h = 5, l = r.map(R), b = r.length > 1 ? l : l[0], w = {
66
+ let A = _.getChannel(), O = j(), h = 5, m = i.map(R), b = i.length > 1 ? m : m[0], E = {
70
67
  id: O,
71
68
  count: 0,
72
69
  data: { name: o, args: b },
73
70
  options: {
74
71
  ...t,
75
- maxDepth: h + (t.depth || 3),
76
- allowFunction: t.allowFunction || !1
72
+ maxDepth: h + (t.depth || 3)
77
73
  }
78
74
  };
79
- A.emit(y, w);
75
+ A.emit(l, E);
80
76
  }, "actionHandler");
81
77
  return e.isAction = !0, e.implicit = n.implicit, e;
82
78
  }
83
- i(g, "action");
79
+ r(g, "action");
84
80
 
85
81
  // src/actions/runtime/actions.ts
86
- var G = /* @__PURE__ */ i((...o) => {
82
+ var G = /* @__PURE__ */ r((...o) => {
87
83
  let n = c, t = o;
88
84
  t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != "string" && (n = {
89
85
  ...c,
90
86
  ...t.pop()
91
87
  });
92
88
  let e = t[0];
93
- (t.length !== 1 || typeof e == "string") && (e = {}, t.forEach((r) => {
94
- e[r] = r;
89
+ (t.length !== 1 || typeof e == "string") && (e = {}, t.forEach((i) => {
90
+ e[i] = i;
95
91
  }));
96
92
  let p = {};
97
- return Object.keys(e).forEach((r) => {
98
- p[r] = g(e[r], n);
93
+ return Object.keys(e).forEach((i) => {
94
+ p[i] = g(e[i], n);
99
95
  }), p;
100
96
  }, "actions");
101
97
  export {
102
98
  a as ADDON_ID,
103
99
  k as CLEAR_ID,
104
- F as CYCLIC_KEY,
105
- y as EVENT_ID,
100
+ C as CYCLIC_KEY,
101
+ l as EVENT_ID,
106
102
  T as PANEL_ID,
107
103
  S as PARAM_KEY,
108
104
  g as action,