storybook 9.0.0-beta.1 → 9.0.0-beta.3

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.
@@ -1,17 +1,16 @@
1
- var R = Object.defineProperty;
2
- var r = (e, o) => R(e, "name", { value: o, configurable: !0 });
1
+ var D = Object.defineProperty;
2
+ var r = (e, n) => D(e, "name", { value: n, configurable: !0 });
3
3
 
4
4
  // src/actions/decorator.ts
5
- import { makeDecorator as T, useEffect as k } from "storybook/preview-api";
5
+ import { makeDecorator as P, useEffect as x } from "storybook/preview-api";
6
6
 
7
7
  // src/actions/constants.ts
8
- var h = "actions", y = "storybook/actions", B = `${y}/panel`, g = `${y}/action-event`, H = `${y}/action-clear`;
8
+ var h = "actions", y = "storybook/actions", $ = `${y}/panel`, g = `${y}/action-event`, B = `${y}/action-clear`;
9
9
 
10
10
  // src/actions/runtime/action.ts
11
- import { ImplicitActionsDuringRendering as D } from "storybook/internal/preview-errors";
11
+ import { ImplicitActionsDuringRendering as R } from "storybook/internal/preview-errors";
12
12
  import { global as E } from "@storybook/global";
13
- import { addons as j } from "storybook/preview-api";
14
- import { v4 as S } from "uuid";
13
+ import { addons as S } from "storybook/preview-api";
15
14
 
16
15
  // src/actions/runtime/configureActions.ts
17
16
  var a = {
@@ -21,39 +20,36 @@ var a = {
21
20
  };
22
21
 
23
22
  // src/actions/runtime/action.ts
24
- var A = /* @__PURE__ */ r((e, o) => {
23
+ var A = /* @__PURE__ */ r((e, n) => {
25
24
  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(
25
+ return !t || n(t) ? t : A(t, n);
26
+ }, "findProto"), j = /* @__PURE__ */ r((e) => !!(typeof e == "object" && e && A(e, (n) => /^Synthetic(?:Base)?Event$/.test(n.constructor.name)) &&
27
+ typeof e.persist == "function"), "isReactSyntheticEvent"), I = /* @__PURE__ */ r((e) => {
28
+ if (j(e)) {
29
+ let n = Object.create(
31
30
  e.constructor.prototype,
32
31
  Object.getOwnPropertyDescriptors(e)
33
32
  );
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", {
33
+ n.persist();
34
+ let t = Object.getOwnPropertyDescriptor(n, "view"), o = t?.value;
35
+ return typeof o == "object" && o?.constructor.name === "Window" && Object.defineProperty(n, "view", {
37
36
  ...t,
38
- value: Object.create(n.constructor.prototype)
39
- }), o;
37
+ value: Object.create(o.constructor.prototype)
38
+ }), n;
40
39
  }
41
40
  return e;
42
- }, "serializeArg"), x = /* @__PURE__ */ r(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? S() : (
43
- // pseudo random id, example response lo1e7zm4832bkr7yfl7
44
- Date.now().toString(36) + Math.random().toString(36).substring(2)
45
- ), "generateId");
46
- function O(e, o = {}) {
41
+ }, "serializeArg");
42
+ function O(e, n = {}) {
47
43
  let t = {
48
44
  ...a,
49
- ...o
50
- }, n = /* @__PURE__ */ r(function(...i) {
51
- if (o.implicit) {
45
+ ...n
46
+ }, o = /* @__PURE__ */ r(function(...i) {
47
+ if (n.implicit) {
52
48
  let d = ("__STORYBOOK_PREVIEW__" in E ? E.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
53
49
  (c) => c.phase === "playing" || c.phase === "rendering"
54
50
  );
55
51
  if (d) {
56
- let c = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, u = new D({
52
+ let c = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, u = new R({
57
53
  phase: d.phase,
58
54
  name: e,
59
55
  deprecated: c
@@ -64,7 +60,8 @@ function O(e, o = {}) {
64
60
  throw u;
65
61
  }
66
62
  }
67
- let m = j.getChannel(), p = x(), l = 5, f = i.map(P), w = i.length > 1 ? f : f[0], _ = {
63
+ let m = S.getChannel(), p = Date.now().toString(36) + Math.random().toString(36).substring(2), l = 5, f = i.map(I), w = i.length > 1 ? f :
64
+ f[0], _ = {
68
65
  id: p,
69
66
  count: 0,
70
67
  data: { name: e, args: w },
@@ -75,38 +72,38 @@ function O(e, o = {}) {
75
72
  };
76
73
  m.emit(g, _);
77
74
  }, "actionHandler");
78
- return n.isAction = !0, n.implicit = o.implicit, n;
75
+ return o.isAction = !0, o.implicit = n.implicit, o;
79
76
  }
80
77
  r(O, "action");
81
78
 
82
79
  // src/actions/runtime/actions.ts
83
80
  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 = {
81
+ let n = a, t = e;
82
+ t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != "string" && (n = {
86
83
  ...a,
87
84
  ...t.pop()
88
85
  });
89
- let n = t[0];
90
- (t.length !== 1 || typeof n == "string") && (n = {}, t.forEach((i) => {
91
- n[i] = i;
86
+ let o = t[0];
87
+ (t.length !== 1 || typeof o == "string") && (o = {}, t.forEach((i) => {
88
+ o[i] = i;
92
89
  }));
93
90
  let s = {};
94
- return Object.keys(n).forEach((i) => {
95
- s[i] = O(n[i], o);
91
+ return Object.keys(o).forEach((i) => {
92
+ s[i] = O(o[i], n);
96
93
  }), s;
97
94
  }, "actions");
98
95
 
99
96
  // src/actions/decorator.ts
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))
97
+ var T = /^(\S+)\s*(.*)$/, k = Element != null && !Element.prototype.matches, F = k ? "msMatchesSelector" : "matches", v = /* @__PURE__ */ r(
98
+ (e, n) => {
99
+ if (e[F](n))
103
100
  return !0;
104
101
  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) || [];
102
+ return t ? v(t, n) : !1;
103
+ }, "hasMatchInAncestry"), M = /* @__PURE__ */ r((e, ...n) => {
104
+ let t = e(...n);
105
+ return Object.entries(t).map(([o, s]) => {
106
+ let [i, m, p] = o.match(T) || [];
110
107
  return {
111
108
  eventName: m,
112
109
  handler: /* @__PURE__ */ r((l) => {
@@ -114,21 +111,21 @@ var F = /^(\S+)\s*(.*)$/, M = Element != null && !Element.prototype.matches, C =
114
111
  }, "handler")
115
112
  };
116
113
  });
117
- }, "createHandlers"), V = /* @__PURE__ */ r((e, ...o) => {
114
+ }, "createHandlers"), C = /* @__PURE__ */ r((e, ...n) => {
118
115
  let t = typeof globalThis.document < "u" && globalThis.document.getElementById("storybook-root");
119
- k(() => {
116
+ x(() => {
120
117
  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(
118
+ let o = M(e, ...n);
119
+ return o.forEach(({ eventName: s, handler: i }) => t.addEventListener(s, i)), () => o.forEach(({ eventName: s, handler: i }) => t.removeEventListener(
123
120
  s, i));
124
121
  }
125
- }, [t, e, o]);
126
- }, "applyEventHandlers"), ct = T({
122
+ }, [t, e, n]);
123
+ }, "applyEventHandlers"), rt = P({
127
124
  name: "withActions",
128
125
  parameterName: h,
129
126
  skipIfNoParametersOrOptions: !0,
130
- wrapper: /* @__PURE__ */ r((e, o, { parameters: t }) => (t?.handles && V(b, ...t.handles), e(o)), "wrapper")
127
+ wrapper: /* @__PURE__ */ r((e, n, { parameters: t }) => (t?.handles && C(b, ...t.handles), e(n)), "wrapper")
131
128
  });
132
129
  export {
133
- ct as withActions
130
+ rt as withActions
134
131
  };
@@ -1,58 +1,58 @@
1
1
  "use strict";
2
2
  var a = Object.defineProperty;
3
- var x = Object.getOwnPropertyDescriptor;
4
- var R = Object.getOwnPropertyNames;
5
- var j = Object.prototype.hasOwnProperty;
6
- var r = (t, o) => a(t, "name", { value: o, configurable: !0 });
7
- var I = (t, o) => {
3
+ var D = Object.getOwnPropertyDescriptor;
4
+ var x = Object.getOwnPropertyNames;
5
+ var R = Object.prototype.hasOwnProperty;
6
+ var i = (t, o) => a(t, "name", { value: o, configurable: !0 });
7
+ var j = (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 i of R(o))
13
- !j.call(t, i) && i !== n && a(t, i, { get: () => o[i], enumerable: !(e = x(o, i)) || e.enumerable });
12
+ for (let r of x(o))
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
16
  var S = (t) => P(a({}, "__esModule", { value: !0 }), t);
17
17
 
18
18
  // src/actions/index.ts
19
- var K = {};
20
- I(K, {
21
- ADDON_ID: () => m,
22
- CLEAR_ID: () => C,
23
- CYCLIC_KEY: () => F,
24
- EVENT_ID: () => y,
25
- PANEL_ID: () => k,
26
- PARAM_KEY: () => T,
27
- action: () => l,
28
- actions: () => B,
19
+ var $ = {};
20
+ j($, {
21
+ ADDON_ID: () => l,
22
+ CLEAR_ID: () => k,
23
+ CYCLIC_KEY: () => C,
24
+ EVENT_ID: () => m,
25
+ PANEL_ID: () => T,
26
+ PARAM_KEY: () => I,
27
+ action: () => f,
28
+ actions: () => Y,
29
29
  config: () => s,
30
- configureActions: () => V
30
+ configureActions: () => F
31
31
  });
32
- module.exports = S(K);
32
+ module.exports = S($);
33
33
 
34
34
  // src/actions/constants.ts
35
- var T = "actions", m = "storybook/actions", k = `${m}/panel`, y = `${m}/action-event`, C = `${m}/action-clear`, F = "$___storybook.isCyclic";
35
+ var I = "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"), f = require("@storybook/global"), O = require("storybook/preview-api"), h = require("uuid");
38
+ var A = require("storybook/internal/preview-errors"), y = require("@storybook/global"), O = require("storybook/preview-api");
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__ */ r((t = {}) => {
45
+ }, F = /* @__PURE__ */ i((t = {}) => {
46
46
  Object.assign(s, t);
47
47
  }, "configureActions");
48
48
 
49
49
  // src/actions/runtime/action.ts
50
- var b = /* @__PURE__ */ r((t, o) => {
50
+ var h = /* @__PURE__ */ i((t, o) => {
51
51
  let n = Object.getPrototypeOf(t);
52
- return !n || o(n) ? n : b(n, o);
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
- if (W(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)) &&
54
+ typeof t.persist == "function"), "isReactSyntheticEvent"), W = /* @__PURE__ */ i((t) => {
55
+ if (V(t)) {
56
56
  let o = Object.create(
57
57
  t.constructor.prototype,
58
58
  Object.getOwnPropertyDescriptors(t)
@@ -65,22 +65,19 @@ typeof t.persist == "function"), "isReactSyntheticEvent"), Y = /* @__PURE__ */ r
65
65
  }), o;
66
66
  }
67
67
  return t;
68
- }, "serializeArg"), $ = /* @__PURE__ */ r(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? (0, h.v4)() : (
69
- // pseudo random id, example response lo1e7zm4832bkr7yfl7
70
- Date.now().toString(36) + Math.random().toString(36).substring(2)
71
- ), "generateId");
72
- function l(t, o = {}) {
68
+ }, "serializeArg");
69
+ function f(t, o = {}) {
73
70
  let n = {
74
71
  ...s,
75
72
  ...o
76
- }, e = /* @__PURE__ */ r(function(...c) {
73
+ }, e = /* @__PURE__ */ i(function(...c) {
77
74
  if (o.implicit) {
78
- let d = ("__STORYBOOK_PREVIEW__" in f.global ? f.global.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
75
+ let u = ("__STORYBOOK_PREVIEW__" in y.global ? y.global.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
79
76
  (p) => p.phase === "playing" || p.phase === "rendering"
80
77
  );
81
- if (d) {
78
+ if (u) {
82
79
  let p = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, g = new A.ImplicitActionsDuringRendering({
83
- phase: d.phase,
80
+ phase: u.phase,
84
81
  name: t,
85
82
  deprecated: p
86
83
  });
@@ -90,8 +87,9 @@ function l(t, o = {}) {
90
87
  throw g;
91
88
  }
92
89
  }
93
- let E = O.addons.getChannel(), v = $(), w = 5, u = c.map(Y), _ = c.length > 1 ? u : u[0], D = {
94
- id: v,
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 >
91
+ 1 ? d : d[0], v = {
92
+ id: b,
95
93
  count: 0,
96
94
  data: { name: t, args: _ },
97
95
  options: {
@@ -99,14 +97,14 @@ function l(t, o = {}) {
99
97
  maxDepth: w + (n.depth || 3)
100
98
  }
101
99
  };
102
- E.emit(y, D);
100
+ E.emit(m, v);
103
101
  }, "actionHandler");
104
102
  return e.isAction = !0, e.implicit = o.implicit, e;
105
103
  }
106
- r(l, "action");
104
+ i(f, "action");
107
105
 
108
106
  // src/actions/runtime/actions.ts
109
- var B = /* @__PURE__ */ r((...t) => {
107
+ var Y = /* @__PURE__ */ i((...t) => {
110
108
  let o = s, n = t;
111
109
  n.length === 1 && Array.isArray(n[0]) && ([n] = n), n.length !== 1 && typeof n[n.length - 1] != "string" && (o = {
112
110
  ...s,
@@ -116,8 +114,8 @@ var B = /* @__PURE__ */ r((...t) => {
116
114
  (n.length !== 1 || typeof e == "string") && (e = {}, n.forEach((c) => {
117
115
  e[c] = c;
118
116
  }));
119
- let i = {};
117
+ let r = {};
120
118
  return Object.keys(e).forEach((c) => {
121
- i[c] = l(e[c], o);
122
- }), i;
119
+ r[c] = f(e[c], o);
120
+ }), r;
123
121
  }, "actions");
@@ -1,31 +1,30 @@
1
- var v = Object.defineProperty;
2
- var r = (o, n) => v(o, "name", { value: n, configurable: !0 });
1
+ var w = Object.defineProperty;
2
+ var i = (o, n) => w(o, "name", { value: n, configurable: !0 });
3
3
 
4
4
  // src/actions/constants.ts
5
- var S = "actions", a = "storybook/actions", T = `${a}/panel`, l = `${a}/action-event`, k = `${a}/action-clear`, C = "$___storybook.isCyclic";
5
+ var P = "actions", a = "storybook/actions", S = `${a}/panel`, f = `${a}/action-event`, I = `${a}/action-clear`, T = "$___storybook.isCyclic";
6
6
 
7
7
  // src/actions/runtime/action.ts
8
- import { ImplicitActionsDuringRendering as w } from "storybook/internal/preview-errors";
9
- import { global as u } from "@storybook/global";
10
- import { addons as _ } from "storybook/preview-api";
11
- import { v4 as D } from "uuid";
8
+ import { ImplicitActionsDuringRendering as _ } from "storybook/internal/preview-errors";
9
+ import { global as d } from "@storybook/global";
10
+ import { addons as v } from "storybook/preview-api";
12
11
 
13
12
  // src/actions/runtime/configureActions.ts
14
13
  var c = {
15
14
  depth: 10,
16
15
  clearOnStoryChange: !0,
17
16
  limit: 50
18
- }, V = /* @__PURE__ */ r((o = {}) => {
17
+ }, C = /* @__PURE__ */ i((o = {}) => {
19
18
  Object.assign(c, o);
20
19
  }, "configureActions");
21
20
 
22
21
  // src/actions/runtime/action.ts
23
- var d = /* @__PURE__ */ r((o, n) => {
22
+ var u = /* @__PURE__ */ i((o, n) => {
24
23
  let t = Object.getPrototypeOf(o);
25
- return !t || n(t) ? t : d(t, n);
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
- if (x(o)) {
24
+ return !t || n(t) ? t : u(t, n);
25
+ }, "findProto"), D = /* @__PURE__ */ i((o) => !!(typeof o == "object" && o && u(o, (n) => /^Synthetic(?:Base)?Event$/.test(n.constructor.name)) &&
26
+ typeof o.persist == "function"), "isReactSyntheticEvent"), x = /* @__PURE__ */ i((o) => {
27
+ if (D(o)) {
29
28
  let n = Object.create(
30
29
  o.constructor.prototype,
31
30
  Object.getOwnPropertyDescriptors(o)
@@ -38,71 +37,69 @@ typeof o.persist == "function"), "isReactSyntheticEvent"), R = /* @__PURE__ */ r
38
37
  }), n;
39
38
  }
40
39
  return o;
41
- }, "serializeArg"), j = /* @__PURE__ */ r(() => typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? D() : (
42
- // pseudo random id, example response lo1e7zm4832bkr7yfl7
43
- Date.now().toString(36) + Math.random().toString(36).substring(2)
44
- ), "generateId");
40
+ }, "serializeArg");
45
41
  function g(o, n = {}) {
46
42
  let t = {
47
43
  ...c,
48
44
  ...n
49
- }, e = /* @__PURE__ */ r(function(...i) {
45
+ }, e = /* @__PURE__ */ i(function(...r) {
50
46
  if (n.implicit) {
51
- let y = ("__STORYBOOK_PREVIEW__" in u ? u.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
47
+ let m = ("__STORYBOOK_PREVIEW__" in d ? d.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
52
48
  (s) => s.phase === "playing" || s.phase === "rendering"
53
49
  );
54
- if (y) {
55
- let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, f = new w({
56
- phase: y.phase,
50
+ if (m) {
51
+ let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, y = new _({
52
+ phase: m.phase,
57
53
  name: o,
58
54
  deprecated: s
59
55
  });
60
56
  if (s)
61
- console.warn(f);
57
+ console.warn(y);
62
58
  else
63
- throw f;
59
+ throw y;
64
60
  }
65
61
  }
66
- let A = _.getChannel(), O = j(), h = 5, m = i.map(R), b = i.length > 1 ? m : m[0], E = {
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 :
63
+ l[0], b = {
67
64
  id: O,
68
65
  count: 0,
69
- data: { name: o, args: b },
66
+ data: { name: o, args: E },
70
67
  options: {
71
68
  ...t,
72
69
  maxDepth: h + (t.depth || 3)
73
70
  }
74
71
  };
75
- A.emit(l, E);
72
+ A.emit(f, b);
76
73
  }, "actionHandler");
77
74
  return e.isAction = !0, e.implicit = n.implicit, e;
78
75
  }
79
- r(g, "action");
76
+ i(g, "action");
80
77
 
81
78
  // src/actions/runtime/actions.ts
82
- var G = /* @__PURE__ */ r((...o) => {
79
+ var L = /* @__PURE__ */ i((...o) => {
83
80
  let n = c, t = o;
84
81
  t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != "string" && (n = {
85
82
  ...c,
86
83
  ...t.pop()
87
84
  });
88
85
  let e = t[0];
89
- (t.length !== 1 || typeof e == "string") && (e = {}, t.forEach((i) => {
90
- e[i] = i;
86
+ (t.length !== 1 || typeof e == "string") && (e = {}, t.forEach((r) => {
87
+ e[r] = r;
91
88
  }));
92
89
  let p = {};
93
- return Object.keys(e).forEach((i) => {
94
- p[i] = g(e[i], n);
90
+ return Object.keys(e).forEach((r) => {
91
+ p[r] = g(e[r], n);
95
92
  }), p;
96
93
  }, "actions");
97
94
  export {
98
95
  a as ADDON_ID,
99
- k as CLEAR_ID,
100
- C as CYCLIC_KEY,
101
- l as EVENT_ID,
102
- T as PANEL_ID,
103
- S as PARAM_KEY,
96
+ I as CLEAR_ID,
97
+ T as CYCLIC_KEY,
98
+ f as EVENT_ID,
99
+ S as PANEL_ID,
100
+ P as PARAM_KEY,
104
101
  g as action,
105
- G as actions,
102
+ L as actions,
106
103
  c as config,
107
- V as configureActions
104
+ C as configureActions
108
105
  };
@@ -1,39 +1,39 @@
1
1
  "use strict";
2
- var y = Object.defineProperty;
3
- var C = Object.getOwnPropertyDescriptor;
4
- var W = Object.getOwnPropertyNames;
5
- var M = Object.prototype.hasOwnProperty;
6
- var i = (e, t) => y(e, "name", { value: t, configurable: !0 });
7
- var l = (e, t) => {
2
+ var l = Object.defineProperty;
3
+ var F = Object.getOwnPropertyDescriptor;
4
+ var C = Object.getOwnPropertyNames;
5
+ var W = Object.prototype.hasOwnProperty;
6
+ var i = (e, t) => l(e, "name", { value: t, configurable: !0 });
7
+ var y = (e, t) => {
8
8
  for (var o in t)
9
- y(e, o, { get: t[o], enumerable: !0 });
10
- }, L = (e, t, o, r) => {
9
+ l(e, o, { get: t[o], enumerable: !0 });
10
+ }, M = (e, t, o, r) => {
11
11
  if (t && typeof t == "object" || typeof t == "function")
12
- for (let n of W(t))
13
- !M.call(e, n) && n !== o && y(e, n, { get: () => t[n], enumerable: !(r = C(t, n)) || r.enumerable });
12
+ for (let n of C(t))
13
+ !W.call(e, n) && n !== o && l(e, n, { get: () => t[n], enumerable: !(r = F(t, n)) || r.enumerable });
14
14
  return e;
15
15
  };
16
- var V = (e) => L(y({}, "__esModule", { value: !0 }), e);
16
+ var L = (e) => M(l({}, "__esModule", { value: !0 }), e);
17
17
 
18
18
  // src/actions/preview.ts
19
- var U = {};
20
- l(U, {
21
- default: () => H
19
+ var z = {};
20
+ y(z, {
21
+ default: () => K
22
22
  });
23
- module.exports = V(U);
24
- var P = require("storybook/preview-api");
23
+ module.exports = L(z);
24
+ var j = require("storybook/preview-api");
25
25
 
26
26
  // src/actions/addArgs.ts
27
27
  var A = {};
28
- l(A, {
29
- argsEnhancers: () => B
28
+ y(A, {
29
+ argsEnhancers: () => Y
30
30
  });
31
31
 
32
32
  // src/actions/runtime/action.ts
33
- var O = require("storybook/internal/preview-errors"), u = require("@storybook/global"), v = require("storybook/preview-api"), w = require("uuid");
33
+ var O = require("storybook/internal/preview-errors"), u = require("@storybook/global"), w = require("storybook/preview-api");
34
34
 
35
35
  // src/actions/constants.ts
36
- var f = "storybook/actions", J = `${f}/panel`, E = `${f}/action-event`, Q = `${f}/action-clear`;
36
+ var f = "storybook/actions", q = `${f}/panel`, E = `${f}/action-event`, G = `${f}/action-clear`;
37
37
 
38
38
  // src/actions/runtime/configureActions.ts
39
39
  var R = {
@@ -43,11 +43,11 @@ var R = {
43
43
  };
44
44
 
45
45
  // src/actions/runtime/action.ts
46
- var T = /* @__PURE__ */ i((e, t) => {
46
+ var v = /* @__PURE__ */ i((e, t) => {
47
47
  let o = Object.getPrototypeOf(e);
48
- return !o || t(o) ? o : T(o, t);
49
- }, "findProto"), N = /* @__PURE__ */ i((e) => !!(typeof e == "object" && e && T(e, (t) => /^Synthetic(?:Base)?Event$/.test(t.constructor.name)) &&
50
- typeof e.persist == "function"), "isReactSyntheticEvent"), Y = /* @__PURE__ */ i((e) => {
48
+ return !o || t(o) ? o : v(o, t);
49
+ }, "findProto"), N = /* @__PURE__ */ i((e) => !!(typeof e == "object" && e && v(e, (t) => /^Synthetic(?:Base)?Event$/.test(t.constructor.name)) &&
50
+ typeof e.persist == "function"), "isReactSyntheticEvent"), V = /* @__PURE__ */ i((e) => {
51
51
  if (N(e)) {
52
52
  let t = Object.create(
53
53
  e.constructor.prototype,
@@ -61,10 +61,7 @@ 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, w.v4)() : (
65
- // pseudo random id, example response lo1e7zm4832bkr7yfl7
66
- Date.now().toString(36) + Math.random().toString(36).substring(2)
67
- ), "generateId");
64
+ }, "serializeArg");
68
65
  function g(e, t = {}) {
69
66
  let o = {
70
67
  ...R,
@@ -86,23 +83,24 @@ function g(e, t = {}) {
86
83
  throw b;
87
84
  }
88
85
  }
89
- let a = v.addons.getChannel(), c = $(), p = 5, m = s.map(Y), S = s.length > 1 ? m : m[0], F = {
86
+ let a = w.addons.getChannel(), c = Date.now().toString(36) + Math.random().toString(36).substring(2), p = 5, m = s.map(V), P = s.length >
87
+ 1 ? m : m[0], S = {
90
88
  id: c,
91
89
  count: 0,
92
- data: { name: e, args: S },
90
+ data: { name: e, args: P },
93
91
  options: {
94
92
  ...o,
95
93
  maxDepth: p + (o.depth || 3)
96
94
  }
97
95
  };
98
- a.emit(E, F);
96
+ a.emit(E, S);
99
97
  }, "actionHandler");
100
98
  return r.isAction = !0, r.implicit = t.implicit, r;
101
99
  }
102
100
  i(g, "action");
103
101
 
104
102
  // src/actions/addArgsHelpers.ts
105
- var _ = /* @__PURE__ */ i((e, t) => typeof t[e] > "u" && !(e in t), "isInInitialArgs"), D = /* @__PURE__ */ i((e) => {
103
+ var T = /* @__PURE__ */ i((e, t) => typeof t[e] > "u" && !(e in t), "isInInitialArgs"), _ = /* @__PURE__ */ i((e) => {
106
104
  let {
107
105
  initialArgs: t,
108
106
  argTypes: o,
@@ -114,32 +112,32 @@ var _ = /* @__PURE__ */ i((e, t) => typeof t[e] > "u" && !(e in t), "isInInitial
114
112
  let s = new RegExp(n.argTypesRegex);
115
113
  return Object.entries(o).filter(
116
114
  ([c]) => !!s.test(c)
117
- ).reduce((c, [p, m]) => (_(p, t) && (c[p] = g(p, { implicit: !0, id: r })), c), {});
118
- }, "inferActionsFromArgTypesRegex"), k = /* @__PURE__ */ i((e) => {
115
+ ).reduce((c, [p, m]) => (T(p, t) && (c[p] = g(p, { implicit: !0, id: r })), c), {});
116
+ }, "inferActionsFromArgTypesRegex"), D = /* @__PURE__ */ i((e) => {
119
117
  let {
120
118
  initialArgs: t,
121
119
  argTypes: o,
122
120
  parameters: { actions: r }
123
121
  } = e;
124
- return r?.disable || !o ? {} : Object.entries(o).filter(([s, a]) => !!a.action).reduce((s, [a, c]) => (_(a, t) && (s[a] = g(typeof c.action ==
122
+ return r?.disable || !o ? {} : Object.entries(o).filter(([s, a]) => !!a.action).reduce((s, [a, c]) => (T(a, t) && (s[a] = g(typeof c.action ==
125
123
  "string" ? c.action : a)), s), {});
126
124
  }, "addActionsFromArgTypes");
127
125
 
128
126
  // src/actions/addArgs.ts
129
- var B = [
130
- k,
131
- D
127
+ var Y = [
128
+ D,
129
+ _
132
130
  ];
133
131
 
134
132
  // src/actions/loaders.ts
135
133
  var h = {};
136
- l(h, {
137
- loaders: () => z
134
+ y(h, {
135
+ loaders: () => B
138
136
  });
139
- var j = require("storybook/test/spy");
140
- var I = !1, K = /* @__PURE__ */ i((e) => {
137
+ var I = require("storybook/test/spy");
138
+ var k = !1, $ = /* @__PURE__ */ i((e) => {
141
139
  let { parameters: t } = e;
142
- t?.actions?.disable || I || ((0, j.onMockCall)((o, r) => {
140
+ t?.actions?.disable || k || ((0, I.onMockCall)((o, r) => {
143
141
  let n = o.getMockName();
144
142
  n !== "spy" && (!/^next\/.*::/.test(n) || [
145
143
  "next/router::useRouter()",
@@ -151,11 +149,11 @@ var I = !1, K = /* @__PURE__ */ i((e) => {
151
149
  "next/headers::headers().set",
152
150
  "next/headers::headers().delete"
153
151
  ].some((s) => n.startsWith(s))) && g(n)(r);
154
- }), I = !0);
155
- }, "logActionsWhenMockCalled"), z = [K];
152
+ }), k = !0);
153
+ }, "logActionsWhenMockCalled"), B = [$];
156
154
 
157
155
  // src/actions/preview.ts
158
- var H = /* @__PURE__ */ i(() => (0, P.definePreview)({
156
+ var K = /* @__PURE__ */ i(() => (0, j.definePreview)({
159
157
  ...A,
160
158
  ...h
161
159
  }), "default");