storybook 9.0.0-alpha.12 → 9.0.0-alpha.14

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 (89) hide show
  1. package/assets/docs/addon-backgrounds.gif +0 -0
  2. package/assets/docs/highlight.png +0 -0
  3. package/dist/actions/decorator.js +46 -47
  4. package/dist/actions/index.cjs +28 -29
  5. package/dist/actions/index.d.ts +0 -3
  6. package/dist/actions/index.js +27 -28
  7. package/dist/actions/preview.cjs +22 -23
  8. package/dist/actions/preview.js +18 -19
  9. package/dist/backgrounds/index.cjs +148 -0
  10. package/dist/backgrounds/index.d.ts +91 -0
  11. package/dist/backgrounds/index.js +130 -0
  12. package/dist/backgrounds/preview.cjs +143 -0
  13. package/dist/backgrounds/preview.d.ts +54 -0
  14. package/dist/backgrounds/preview.js +127 -0
  15. package/dist/bin/index.cjs +62 -73
  16. package/dist/bin/index.js +57 -68
  17. package/dist/builder-manager/index.cjs +390 -380
  18. package/dist/builder-manager/index.js +489 -479
  19. package/dist/channels/index.cjs +1018 -948
  20. package/dist/channels/index.js +1194 -1161
  21. package/dist/cli/bin/index.cjs +225 -225
  22. package/dist/cli/bin/index.js +234 -234
  23. package/dist/cli/index.cjs +1860 -1873
  24. package/dist/cli/index.js +308 -321
  25. package/dist/common/index.cjs +2396 -2380
  26. package/dist/common/index.d.ts +0 -11
  27. package/dist/common/index.js +2604 -2588
  28. package/dist/components/index.cjs +6393 -12704
  29. package/dist/components/index.d.ts +1 -2
  30. package/dist/components/index.js +4665 -10778
  31. package/dist/core-events/index.cjs +72 -84
  32. package/dist/core-events/index.d.ts +2 -77
  33. package/dist/core-events/index.js +61 -73
  34. package/dist/core-server/index.cjs +13484 -13318
  35. package/dist/core-server/index.js +13652 -13486
  36. package/dist/core-server/presets/common-manager.js +9815 -12
  37. package/dist/core-server/presets/common-preset.cjs +2809 -3005
  38. package/dist/core-server/presets/common-preset.js +2891 -3087
  39. package/dist/docs-tools/index.cjs +626 -600
  40. package/dist/docs-tools/index.js +613 -587
  41. package/dist/highlight/index.cjs +27 -0
  42. package/dist/highlight/index.d.ts +17 -0
  43. package/dist/highlight/index.js +7 -0
  44. package/dist/highlight/preview.cjs +81 -0
  45. package/dist/highlight/preview.d.ts +54 -0
  46. package/dist/highlight/preview.js +67 -0
  47. package/dist/instrumenter/index.cjs +70 -60
  48. package/dist/instrumenter/index.d.ts +8 -7
  49. package/dist/instrumenter/index.js +98 -88
  50. package/dist/manager/globals-module-info.cjs +12 -22
  51. package/dist/manager/globals-module-info.js +2 -12
  52. package/dist/manager/globals-runtime.js +31295 -33999
  53. package/dist/manager/runtime.js +3419 -3522
  54. package/dist/manager-api/index.cjs +2521 -2445
  55. package/dist/manager-api/index.d.ts +7 -21
  56. package/dist/manager-api/index.js +2431 -2349
  57. package/dist/measure/index.cjs +474 -0
  58. package/dist/measure/index.d.ts +66 -0
  59. package/dist/measure/index.js +462 -0
  60. package/dist/measure/preview.cjs +464 -0
  61. package/dist/measure/preview.d.ts +59 -0
  62. package/dist/measure/preview.js +448 -0
  63. package/dist/outline/index.cjs +528 -0
  64. package/dist/outline/index.d.ts +66 -0
  65. package/dist/outline/index.js +500 -0
  66. package/dist/outline/preview.cjs +518 -0
  67. package/dist/outline/preview.d.ts +59 -0
  68. package/dist/outline/preview.js +486 -0
  69. package/dist/preview/runtime.js +20735 -17220
  70. package/dist/preview-api/index.cjs +1069 -1057
  71. package/dist/preview-api/index.d.ts +384 -157
  72. package/dist/preview-api/index.js +1123 -1109
  73. package/dist/server-errors.cjs +66 -67
  74. package/dist/server-errors.d.ts +0 -1
  75. package/dist/server-errors.js +68 -69
  76. package/dist/test/index.cjs +1547 -1546
  77. package/dist/test/index.js +2308 -2307
  78. package/dist/test/preview.cjs +1906 -1905
  79. package/dist/test/preview.js +1439 -1438
  80. package/dist/test/spy.cjs +65 -64
  81. package/dist/test/spy.js +59 -58
  82. package/dist/types/index.cjs +10 -10
  83. package/dist/types/index.d.ts +203 -243
  84. package/package.json +122 -17
  85. package/dist/actions/manager.js +0 -1195
  86. package/dist/component-testing/manager.js +0 -3126
  87. package/dist/controls/manager.js +0 -5593
  88. package/dist/viewport/manager.js +0 -400
  89. /package/dist/{component-testing/manager.css → core-server/presets/common-manager.css} +0 -0
Binary file
@@ -1,5 +1,5 @@
1
1
  var j = Object.defineProperty;
2
- var r = (o, e) => j(o, "name", { value: e, configurable: !0 });
2
+ var r = (e, o) => j(e, "name", { value: o, configurable: !0 });
3
3
 
4
4
  // src/actions/decorator.ts
5
5
  import { global as F } from "@storybook/global";
@@ -22,47 +22,47 @@ var a = {
22
22
  };
23
23
 
24
24
  // 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)
25
+ var A = /* @__PURE__ */ r((e, o) => {
26
+ let t = Object.getPrototypeOf(e);
27
+ return !t || o(t) ? t : A(t, o);
28
+ }, "findProto"), x = /* @__PURE__ */ r((e) => !!(typeof e == "object" && e && A(e, (o) => /^Synthetic(?:Base)?Event$/.test(o.constructor.name)) &&
29
+ typeof e.persist == "function"), "isReactSyntheticEvent"), k = /* @__PURE__ */ r((e) => {
30
+ if (x(e)) {
31
+ let o = Object.create(
32
+ e.constructor.prototype,
33
+ Object.getOwnPropertyDescriptors(e)
34
34
  );
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", {
35
+ o.persist();
36
+ let t = Object.getOwnPropertyDescriptor(o, "view"), n = t?.value;
37
+ return typeof n == "object" && n?.constructor.name === "Window" && Object.defineProperty(o, "view", {
38
38
  ...t,
39
39
  value: Object.create(n.constructor.prototype)
40
- }), e;
40
+ }), o;
41
41
  }
42
- return o;
42
+ return e;
43
43
  }, "serializeArg"), T = /* @__PURE__ */ r(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? P() : (
44
44
  // pseudo random id, example response lo1e7zm4832bkr7yfl7
45
45
  Date.now().toString(36) + Math.random().toString(36).substring(2)
46
46
  ), "generateId");
47
- function O(o, e = {}) {
47
+ function O(e, o = {}) {
48
48
  let t = {
49
49
  ...a,
50
- ...e
50
+ ...o
51
51
  }, n = /* @__PURE__ */ r(function(...i) {
52
- if (e.implicit) {
52
+ if (o.implicit) {
53
53
  let u = ("__STORYBOOK_PREVIEW__" in E ? (
54
54
  // eslint-disable-next-line no-underscore-dangle
55
55
  E.__STORYBOOK_PREVIEW__
56
56
  ) : void 0)?.storyRenders.find(
57
- (s) => s.phase === "playing" || s.phase === "rendering"
57
+ (c) => c.phase === "playing" || c.phase === "rendering"
58
58
  );
59
59
  if (u) {
60
- let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, d = new S({
60
+ let c = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, d = new S({
61
61
  phase: u.phase,
62
- name: o,
63
- deprecated: s
62
+ name: e,
63
+ deprecated: c
64
64
  });
65
- if (s)
65
+ if (c)
66
66
  console.warn(d);
67
67
  else
68
68
  throw d;
@@ -71,23 +71,22 @@ function O(o, e = {}) {
71
71
  let m = I.getChannel(), p = T(), l = 5, f = i.map(k), R = i.length > 1 ? f : f[0], D = {
72
72
  id: p,
73
73
  count: 0,
74
- data: { name: o, args: R },
74
+ data: { name: e, args: R },
75
75
  options: {
76
76
  ...t,
77
- maxDepth: l + (t.depth || 3),
78
- allowFunction: t.allowFunction || !1
77
+ maxDepth: l + (t.depth || 3)
79
78
  }
80
79
  };
81
80
  m.emit(g, D);
82
81
  }, "actionHandler");
83
- return n.isAction = !0, n.implicit = e.implicit, n;
82
+ return n.isAction = !0, n.implicit = o.implicit, n;
84
83
  }
85
84
  r(O, "action");
86
85
 
87
86
  // 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 = {
87
+ var b = /* @__PURE__ */ r((...e) => {
88
+ let o = a, t = e;
89
+ t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != "string" && (o = {
91
90
  ...a,
92
91
  ...t.pop()
93
92
  });
@@ -95,44 +94,44 @@ var b = /* @__PURE__ */ r((...o) => {
95
94
  (t.length !== 1 || typeof n == "string") && (n = {}, t.forEach((i) => {
96
95
  n[i] = i;
97
96
  }));
98
- let c = {};
97
+ let s = {};
99
98
  return Object.keys(n).forEach((i) => {
100
- c[i] = O(n[i], e);
101
- }), c;
99
+ s[i] = O(n[i], o);
100
+ }), s;
102
101
  }, "actions");
103
102
 
104
103
  // src/actions/decorator.ts
105
104
  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))
105
+ (e, o) => {
106
+ if (e[Y](o))
108
107
  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]) => {
108
+ let t = e.parentElement;
109
+ return t ? _(t, o) : !1;
110
+ }, "hasMatchInAncestry"), $ = /* @__PURE__ */ r((e, ...o) => {
111
+ let t = e(...o);
112
+ return Object.entries(t).map(([n, s]) => {
114
113
  let [i, m, p] = n.match(N) || [];
115
114
  return {
116
115
  eventName: m,
117
116
  handler: /* @__PURE__ */ r((l) => {
118
- (!p || _(l.target, p)) && c(l);
117
+ (!p || _(l.target, p)) && s(l);
119
118
  }, "handler")
120
119
  };
121
120
  });
122
- }, "createHandlers"), B = /* @__PURE__ */ r((o, ...e) => {
121
+ }, "createHandlers"), B = /* @__PURE__ */ r((e, ...o) => {
123
122
  let t = v && v.getElementById("storybook-root");
124
123
  C(() => {
125
124
  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));
125
+ let n = $(e, ...o);
126
+ return n.forEach(({ eventName: s, handler: i }) => t.addEventListener(s, i)), () => n.forEach(({ eventName: s, handler: i }) => t.removeEventListener(
127
+ s, i));
129
128
  }
130
- }, [t, o, e]);
129
+ }, [t, e, o]);
131
130
  }, "applyEventHandlers"), mt = M({
132
131
  name: "withActions",
133
132
  parameterName: h,
134
133
  skipIfNoParametersOrOptions: !0,
135
- wrapper: /* @__PURE__ */ r((o, e, { parameters: t }) => (t?.handles && B(b, ...t.handles), o(e)), "wrapper")
134
+ wrapper: /* @__PURE__ */ r((e, o, { parameters: t }) => (t?.handles && B(b, ...t.handles), e(o)), "wrapper")
136
135
  });
137
136
  export {
138
137
  mt as withActions
@@ -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,19 +65,19 @@ 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 ? (
78
+ let d = ("__STORYBOOK_PREVIEW__" in f.global ? (
79
79
  // eslint-disable-next-line no-underscore-dangle
80
- m.global.__STORYBOOK_PREVIEW__
80
+ f.global.__STORYBOOK_PREVIEW__
81
81
  ) : void 0)?.storyRenders.find(
82
82
  (p) => p.phase === "playing" || p.phase === "rendering"
83
83
  );
@@ -93,24 +93,23 @@ function y(t, o = {}) {
93
93
  throw g;
94
94
  }
95
95
  }
96
- let w = O.addons.getChannel(), E = $(), v = 5, u = c.map(Y), _ = c.length > 1 ? u : u[0], D = {
97
- id: E,
96
+ let E = O.addons.getChannel(), v = $(), w = 5, u = c.map(Y), _ = c.length > 1 ? u : u[0], D = {
97
+ id: v,
98
98
  count: 0,
99
99
  data: { name: t, args: _ },
100
100
  options: {
101
101
  ...n,
102
- maxDepth: v + (n.depth || 3),
103
- allowFunction: n.allowFunction || !1
102
+ maxDepth: w + (n.depth || 3)
104
103
  }
105
104
  };
106
- w.emit(f, D);
105
+ E.emit(y, D);
107
106
  }, "actionHandler");
108
107
  return e.isAction = !0, e.implicit = o.implicit, e;
109
108
  }
110
- i(y, "action");
109
+ r(l, "action");
111
110
 
112
111
  // src/actions/runtime/actions.ts
113
- var B = /* @__PURE__ */ i((...t) => {
112
+ var B = /* @__PURE__ */ r((...t) => {
114
113
  let o = s, n = t;
115
114
  n.length === 1 && Array.isArray(n[0]) && ([n] = n), n.length !== 1 && typeof n[n.length - 1] != "string" && (o = {
116
115
  ...s,
@@ -120,8 +119,8 @@ var B = /* @__PURE__ */ i((...t) => {
120
119
  (n.length !== 1 || typeof e == "string") && (e = {}, n.forEach((c) => {
121
120
  e[c] = c;
122
121
  }));
123
- let r = {};
122
+ let i = {};
124
123
  return Object.keys(e).forEach((c) => {
125
- r[c] = y(e[c], o);
126
- }), r;
124
+ i[c] = l(e[c], o);
125
+ }), i;
127
126
  }, "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,62 @@ 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 ? (
51
+ let y = ("__STORYBOOK_PREVIEW__" in u ? (
52
52
  // eslint-disable-next-line no-underscore-dangle
53
53
  u.__STORYBOOK_PREVIEW__
54
54
  ) : void 0)?.storyRenders.find(
55
55
  (s) => s.phase === "playing" || s.phase === "rendering"
56
56
  );
57
- if (f) {
58
- let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, m = new v({
59
- phase: f.phase,
57
+ if (y) {
58
+ let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, f = new w({
59
+ phase: y.phase,
60
60
  name: o,
61
61
  deprecated: s
62
62
  });
63
63
  if (s)
64
- console.warn(m);
64
+ console.warn(f);
65
65
  else
66
- throw m;
66
+ throw f;
67
67
  }
68
68
  }
69
- let A = _.getChannel(), O = j(), h = 5, l = r.map(R), b = r.length > 1 ? l : l[0], w = {
69
+ let A = _.getChannel(), O = j(), h = 5, m = i.map(R), b = i.length > 1 ? m : m[0], E = {
70
70
  id: O,
71
71
  count: 0,
72
72
  data: { name: o, args: b },
73
73
  options: {
74
74
  ...t,
75
- maxDepth: h + (t.depth || 3),
76
- allowFunction: t.allowFunction || !1
75
+ maxDepth: h + (t.depth || 3)
77
76
  }
78
77
  };
79
- A.emit(y, w);
78
+ A.emit(l, E);
80
79
  }, "actionHandler");
81
80
  return e.isAction = !0, e.implicit = n.implicit, e;
82
81
  }
83
- i(g, "action");
82
+ r(g, "action");
84
83
 
85
84
  // src/actions/runtime/actions.ts
86
- var G = /* @__PURE__ */ i((...o) => {
85
+ var G = /* @__PURE__ */ r((...o) => {
87
86
  let n = c, t = o;
88
87
  t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != "string" && (n = {
89
88
  ...c,
90
89
  ...t.pop()
91
90
  });
92
91
  let e = t[0];
93
- (t.length !== 1 || typeof e == "string") && (e = {}, t.forEach((r) => {
94
- e[r] = r;
92
+ (t.length !== 1 || typeof e == "string") && (e = {}, t.forEach((i) => {
93
+ e[i] = i;
95
94
  }));
96
95
  let p = {};
97
- return Object.keys(e).forEach((r) => {
98
- p[r] = g(e[r], n);
96
+ return Object.keys(e).forEach((i) => {
97
+ p[i] = g(e[i], n);
99
98
  }), p;
100
99
  }, "actions");
101
100
  export {
102
101
  a as ADDON_ID,
103
102
  k as CLEAR_ID,
104
- F as CYCLIC_KEY,
105
- y as EVENT_ID,
103
+ C as CYCLIC_KEY,
104
+ l as EVENT_ID,
106
105
  T as PANEL_ID,
107
106
  S as PARAM_KEY,
108
107
  g as action,
@@ -1,36 +1,36 @@
1
1
  "use strict";
2
- var g = Object.defineProperty;
2
+ var y = Object.defineProperty;
3
3
  var C = Object.getOwnPropertyDescriptor;
4
4
  var W = Object.getOwnPropertyNames;
5
5
  var M = Object.prototype.hasOwnProperty;
6
- var i = (e, t) => g(e, "name", { value: t, configurable: !0 });
7
- var m = (e, t) => {
6
+ var i = (e, t) => y(e, "name", { value: t, configurable: !0 });
7
+ var l = (e, t) => {
8
8
  for (var o in t)
9
- g(e, o, { get: t[o], enumerable: !0 });
9
+ y(e, o, { get: t[o], enumerable: !0 });
10
10
  }, L = (e, t, o, r) => {
11
11
  if (t && typeof t == "object" || typeof t == "function")
12
12
  for (let n of W(t))
13
- !M.call(e, n) && n !== o && g(e, n, { get: () => t[n], enumerable: !(r = C(t, n)) || r.enumerable });
13
+ !M.call(e, n) && n !== o && y(e, n, { get: () => t[n], enumerable: !(r = C(t, n)) || r.enumerable });
14
14
  return e;
15
15
  };
16
- var V = (e) => L(g({}, "__esModule", { value: !0 }), e);
16
+ var V = (e) => L(y({}, "__esModule", { value: !0 }), e);
17
17
 
18
18
  // src/actions/preview.ts
19
19
  var U = {};
20
- m(U, {
20
+ l(U, {
21
21
  default: () => H
22
22
  });
23
23
  module.exports = V(U);
24
- var F = require("storybook/preview-api");
24
+ var P = require("storybook/preview-api");
25
25
 
26
26
  // src/actions/addArgs.ts
27
27
  var A = {};
28
- m(A, {
28
+ l(A, {
29
29
  argsEnhancers: () => B
30
30
  });
31
31
 
32
32
  // src/actions/runtime/action.ts
33
- var O = require("storybook/internal/preview-errors"), u = require("@storybook/global"), w = require("storybook/preview-api"), v = require("uuid");
33
+ var O = require("storybook/internal/preview-errors"), u = require("@storybook/global"), v = require("storybook/preview-api"), w = require("uuid");
34
34
 
35
35
  // src/actions/constants.ts
36
36
  var f = "storybook/actions", J = `${f}/panel`, E = `${f}/action-event`, Q = `${f}/action-clear`;
@@ -61,11 +61,11 @@ typeof e.persist == "function"), "isReactSyntheticEvent"), Y = /* @__PURE__ */ i
61
61
  }), t;
62
62
  }
63
63
  return e;
64
- }, "serializeArg"), $ = /* @__PURE__ */ i(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? (0, v.v4)() : (
64
+ }, "serializeArg"), $ = /* @__PURE__ */ i(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? (0, w.v4)() : (
65
65
  // pseudo random id, example response lo1e7zm4832bkr7yfl7
66
66
  Date.now().toString(36) + Math.random().toString(36).substring(2)
67
67
  ), "generateId");
68
- function l(e, t = {}) {
68
+ function g(e, t = {}) {
69
69
  let o = {
70
70
  ...R,
71
71
  ...t
@@ -89,21 +89,20 @@ function l(e, t = {}) {
89
89
  throw b;
90
90
  }
91
91
  }
92
- let a = w.addons.getChannel(), c = $(), p = 5, y = s.map(Y), P = s.length > 1 ? y : y[0], S = {
92
+ let a = v.addons.getChannel(), c = $(), p = 5, m = s.map(Y), S = s.length > 1 ? m : m[0], F = {
93
93
  id: c,
94
94
  count: 0,
95
- data: { name: e, args: P },
95
+ data: { name: e, args: S },
96
96
  options: {
97
97
  ...o,
98
- maxDepth: p + (o.depth || 3),
99
- allowFunction: o.allowFunction || !1
98
+ maxDepth: p + (o.depth || 3)
100
99
  }
101
100
  };
102
- a.emit(E, S);
101
+ a.emit(E, F);
103
102
  }, "actionHandler");
104
103
  return r.isAction = !0, r.implicit = t.implicit, r;
105
104
  }
106
- i(l, "action");
105
+ i(g, "action");
107
106
 
108
107
  // src/actions/addArgsHelpers.ts
109
108
  var _ = /* @__PURE__ */ i((e, t) => typeof t[e] > "u" && !(e in t), "isInInitialArgs"), D = /* @__PURE__ */ i((e) => {
@@ -118,14 +117,14 @@ var _ = /* @__PURE__ */ i((e, t) => typeof t[e] > "u" && !(e in t), "isInInitial
118
117
  let s = new RegExp(n.argTypesRegex);
119
118
  return Object.entries(o).filter(
120
119
  ([c]) => !!s.test(c)
121
- ).reduce((c, [p, y]) => (_(p, t) && (c[p] = l(p, { implicit: !0, id: r })), c), {});
120
+ ).reduce((c, [p, m]) => (_(p, t) && (c[p] = g(p, { implicit: !0, id: r })), c), {});
122
121
  }, "inferActionsFromArgTypesRegex"), k = /* @__PURE__ */ i((e) => {
123
122
  let {
124
123
  initialArgs: t,
125
124
  argTypes: o,
126
125
  parameters: { actions: r }
127
126
  } = e;
128
- return r?.disable || !o ? {} : Object.entries(o).filter(([s, a]) => !!a.action).reduce((s, [a, c]) => (_(a, t) && (s[a] = l(typeof c.action ==
127
+ return r?.disable || !o ? {} : Object.entries(o).filter(([s, a]) => !!a.action).reduce((s, [a, c]) => (_(a, t) && (s[a] = g(typeof c.action ==
129
128
  "string" ? c.action : a)), s), {});
130
129
  }, "addActionsFromArgTypes");
131
130
 
@@ -137,7 +136,7 @@ var B = [
137
136
 
138
137
  // src/actions/loaders.ts
139
138
  var h = {};
140
- m(h, {
139
+ l(h, {
141
140
  loaders: () => z
142
141
  });
143
142
  var j = require("storybook/test/spy");
@@ -154,12 +153,12 @@ var I = !1, K = /* @__PURE__ */ i((e) => {
154
153
  "next/headers::cookies().delete",
155
154
  "next/headers::headers().set",
156
155
  "next/headers::headers().delete"
157
- ].some((s) => n.startsWith(s))) && l(n)(r);
156
+ ].some((s) => n.startsWith(s))) && g(n)(r);
158
157
  }), I = !0);
159
158
  }, "logActionsWhenMockCalled"), z = [K];
160
159
 
161
160
  // src/actions/preview.ts
162
- var H = /* @__PURE__ */ i(() => (0, F.definePreview)({
161
+ var H = /* @__PURE__ */ i(() => (0, P.definePreview)({
163
162
  ...A,
164
163
  ...h
165
164
  }), "default");