storybook 9.0.0-beta.6 → 9.0.0-beta.8
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.
- package/dist/bin/index.cjs +44 -44
- package/dist/bin/index.js +44 -44
- package/dist/cli/bin/index.cjs +4184 -737
- package/dist/cli/bin/index.js +4198 -749
- package/dist/cli/index.cjs +25090 -21638
- package/dist/cli/index.d.ts +974 -1
- package/dist/cli/index.js +25330 -21876
- package/dist/common/index.cjs +4518 -4511
- package/dist/common/index.d.ts +7 -2
- package/dist/common/index.js +4528 -4521
- package/dist/core-server/index.cjs +3240 -3235
- package/dist/core-server/index.d.ts +22 -22
- package/dist/core-server/index.js +1288 -1283
- package/dist/core-server/presets/common-preset.cjs +1445 -1444
- package/dist/core-server/presets/common-preset.js +418 -417
- package/dist/manager/globals-runtime.js +8188 -8165
- package/dist/manager/runtime.js +1151 -1149
- package/dist/manager-api/index.cjs +1046 -1023
- package/dist/manager-api/index.d.ts +12 -1
- package/dist/manager-api/index.js +649 -626
- package/dist/preview/runtime.js +5389 -5388
- package/dist/preview-api/index.cjs +615 -614
- package/dist/preview-api/index.js +532 -531
- package/dist/server-errors.cjs +186 -171
- package/dist/server-errors.d.ts +11 -1
- package/dist/server-errors.js +167 -152
- package/dist/telemetry/index.cjs +4887 -1403
- package/dist/telemetry/index.d.ts +2 -1
- package/dist/telemetry/index.js +4923 -1437
- package/dist/test/index.d.ts +2 -6
- package/dist/test/index.js +2818 -2818
- package/dist/test/preview.cjs +648 -648
- package/dist/test/preview.js +837 -837
- package/dist/test/spy.cjs +112 -112
- package/dist/test/spy.d.ts +2 -6
- package/dist/test/spy.js +104 -104
- package/dist/types/index.cjs +4 -4
- package/dist/types/index.d.ts +2687 -2594
- package/package.json +3 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var kn = Object.create;
|
|
2
|
-
var
|
|
2
|
+
var hr = Object.defineProperty;
|
|
3
3
|
var jn = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var Mn = Object.getOwnPropertyNames;
|
|
5
5
|
var _n = Object.getPrototypeOf, Ln = Object.prototype.hasOwnProperty;
|
|
6
|
-
var n = (r, e) =>
|
|
6
|
+
var n = (r, e) => hr(r, "name", { value: e, configurable: !0 }), Ee = /* @__PURE__ */ ((r) => typeof require < "u" ? require : typeof Proxy <
|
|
7
7
|
"u" ? new Proxy(r, {
|
|
8
8
|
get: (e, t) => (typeof require < "u" ? require : e)[t]
|
|
9
9
|
}) : r)(function(r) {
|
|
@@ -14,7 +14,7 @@ var O = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
|
14
14
|
var Nn = (r, e, t, o) => {
|
|
15
15
|
if (e && typeof e == "object" || typeof e == "function")
|
|
16
16
|
for (let s of Mn(e))
|
|
17
|
-
!Ln.call(r, s) && s !== t &&
|
|
17
|
+
!Ln.call(r, s) && s !== t && hr(r, s, { get: () => e[s], enumerable: !(o = jn(e, s)) || o.enumerable });
|
|
18
18
|
return r;
|
|
19
19
|
};
|
|
20
20
|
var ue = (r, e, t) => (t = r != null ? kn(_n(r)) : {}, Nn(
|
|
@@ -22,15 +22,15 @@ var ue = (r, e, t) => (t = r != null ? kn(_n(r)) : {}, Nn(
|
|
|
22
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
23
23
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
24
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
e || !r || !r.__esModule ?
|
|
25
|
+
e || !r || !r.__esModule ? hr(t, "default", { value: r, enumerable: !0 }) : t,
|
|
26
26
|
r
|
|
27
27
|
));
|
|
28
28
|
|
|
29
29
|
// ../node_modules/memoizerific/memoizerific.js
|
|
30
|
-
var
|
|
30
|
+
var Or = O((zt, Ir) => {
|
|
31
31
|
(function(r) {
|
|
32
|
-
if (typeof
|
|
33
|
-
|
|
32
|
+
if (typeof zt == "object" && typeof Ir < "u")
|
|
33
|
+
Ir.exports = r();
|
|
34
34
|
else if (typeof define == "function" && define.amd)
|
|
35
35
|
define([], r);
|
|
36
36
|
else {
|
|
@@ -46,14 +46,14 @@ var Ir = O((Bt, Fr) => {
|
|
|
46
46
|
var y = typeof Ee == "function" && Ee;
|
|
47
47
|
if (!u && y) return y(p, !0);
|
|
48
48
|
if (c) return c(p, !0);
|
|
49
|
-
var
|
|
50
|
-
throw
|
|
49
|
+
var h = new Error("Cannot find module '" + p + "'");
|
|
50
|
+
throw h.code = "MODULE_NOT_FOUND", h;
|
|
51
51
|
}
|
|
52
|
-
var
|
|
53
|
-
s[p][0].call(
|
|
54
|
-
var
|
|
55
|
-
return l(
|
|
56
|
-
},
|
|
52
|
+
var g = i[p] = { exports: {} };
|
|
53
|
+
s[p][0].call(g.exports, function(b) {
|
|
54
|
+
var m = s[p][1][b];
|
|
55
|
+
return l(m || b);
|
|
56
|
+
}, g, g.exports, o, s, i, a);
|
|
57
57
|
}
|
|
58
58
|
return i[p].exports;
|
|
59
59
|
}
|
|
@@ -107,47 +107,47 @@ var Ir = O((Bt, Fr) => {
|
|
|
107
107
|
var a = o("map-or-similar");
|
|
108
108
|
s.exports = function(p) {
|
|
109
109
|
var u = new a(!1), y = [];
|
|
110
|
-
return function(
|
|
111
|
-
var
|
|
112
|
-
var
|
|
113
|
-
if ((
|
|
110
|
+
return function(h) {
|
|
111
|
+
var g = /* @__PURE__ */ n(function() {
|
|
112
|
+
var b = u, m, T, x = arguments.length - 1, f = Array(x + 1), S = !0, R;
|
|
113
|
+
if ((g.numArgs || g.numArgs === 0) && g.numArgs !== x + 1)
|
|
114
114
|
throw new Error("Memoizerific functions should always be called with the same number of arguments");
|
|
115
|
-
for (
|
|
116
|
-
if (f[
|
|
117
|
-
cacheItem:
|
|
118
|
-
arg: arguments[
|
|
119
|
-
},
|
|
120
|
-
|
|
115
|
+
for (R = 0; R < x; R++) {
|
|
116
|
+
if (f[R] = {
|
|
117
|
+
cacheItem: b,
|
|
118
|
+
arg: arguments[R]
|
|
119
|
+
}, b.has(arguments[R])) {
|
|
120
|
+
b = b.get(arguments[R]);
|
|
121
121
|
continue;
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
S = !1, m = new a(!1), b.set(arguments[R], m), b = m;
|
|
124
124
|
}
|
|
125
|
-
return
|
|
126
|
-
p > 0 && (f[
|
|
127
|
-
cacheItem:
|
|
128
|
-
arg: arguments[
|
|
129
|
-
},
|
|
125
|
+
return S && (b.has(arguments[x]) ? T = b.get(arguments[x]) : S = !1), S || (T = h.apply(null, arguments), b.set(arguments[x], T)),
|
|
126
|
+
p > 0 && (f[x] = {
|
|
127
|
+
cacheItem: b,
|
|
128
|
+
arg: arguments[x]
|
|
129
|
+
}, S ? l(y, f) : y.push(f), y.length > p && c(y.shift())), g.wasMemoized = S, g.numArgs = x + 1, T;
|
|
130
130
|
}, "memoizerific");
|
|
131
|
-
return
|
|
131
|
+
return g.limit = p, g.wasMemoized = !1, g.cache = u, g.lru = y, g;
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
134
|
function l(p, u) {
|
|
135
|
-
var y = p.length,
|
|
136
|
-
for (
|
|
137
|
-
for (
|
|
138
|
-
if (!d(p[
|
|
139
|
-
|
|
135
|
+
var y = p.length, h = u.length, g, b, m;
|
|
136
|
+
for (b = 0; b < y; b++) {
|
|
137
|
+
for (g = !0, m = 0; m < h; m++)
|
|
138
|
+
if (!d(p[b][m].arg, u[m].arg)) {
|
|
139
|
+
g = !1;
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
|
-
if (
|
|
142
|
+
if (g)
|
|
143
143
|
break;
|
|
144
144
|
}
|
|
145
|
-
p.push(p.splice(
|
|
145
|
+
p.push(p.splice(b, 1)[0]);
|
|
146
146
|
}
|
|
147
147
|
n(l, "moveToMostRecentLru");
|
|
148
148
|
function c(p) {
|
|
149
|
-
var u = p.length, y = p[u - 1],
|
|
150
|
-
for (y.cacheItem.delete(y.arg),
|
|
149
|
+
var u = p.length, y = p[u - 1], h, g;
|
|
150
|
+
for (y.cacheItem.delete(y.arg), g = u - 2; g >= 0 && (y = p[g], h = y.cacheItem.get(y.arg), !h || !h.size); g--)
|
|
151
151
|
y.cacheItem.delete(y.arg);
|
|
152
152
|
}
|
|
153
153
|
n(c, "removeCachedResult");
|
|
@@ -160,10 +160,10 @@ var Ir = O((Bt, Fr) => {
|
|
|
160
160
|
});
|
|
161
161
|
|
|
162
162
|
// ../node_modules/picoquery/lib/string-util.js
|
|
163
|
-
var
|
|
163
|
+
var Wr = O((Vr) => {
|
|
164
164
|
"use strict";
|
|
165
|
-
Object.defineProperty(
|
|
166
|
-
|
|
165
|
+
Object.defineProperty(Vr, "__esModule", { value: !0 });
|
|
166
|
+
Vr.encodeString = Hi;
|
|
167
167
|
var z = Array.from({ length: 256 }, (r, e) => "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()), Ui = new Int8Array([
|
|
168
168
|
0,
|
|
169
169
|
0,
|
|
@@ -325,23 +325,23 @@ var Vr = O((Hr) => {
|
|
|
325
325
|
});
|
|
326
326
|
|
|
327
327
|
// ../node_modules/picoquery/lib/shared.js
|
|
328
|
-
var
|
|
328
|
+
var tr = O((G) => {
|
|
329
329
|
"use strict";
|
|
330
330
|
Object.defineProperty(G, "__esModule", { value: !0 });
|
|
331
331
|
G.defaultOptions = G.defaultShouldSerializeObject = G.defaultValueSerializer = void 0;
|
|
332
|
-
var
|
|
332
|
+
var $r = Wr(), Vi = /* @__PURE__ */ n((r) => {
|
|
333
333
|
switch (typeof r) {
|
|
334
334
|
case "string":
|
|
335
|
-
return (0,
|
|
335
|
+
return (0, $r.encodeString)(r);
|
|
336
336
|
case "bigint":
|
|
337
337
|
case "boolean":
|
|
338
338
|
return "" + r;
|
|
339
339
|
case "number":
|
|
340
340
|
if (Number.isFinite(r))
|
|
341
|
-
return r < 1e21 ? "" + r : (0,
|
|
341
|
+
return r < 1e21 ? "" + r : (0, $r.encodeString)("" + r);
|
|
342
342
|
break;
|
|
343
343
|
}
|
|
344
|
-
return r instanceof Date ? (0,
|
|
344
|
+
return r instanceof Date ? (0, $r.encodeString)(r.toISOString()) : "";
|
|
345
345
|
}, "defaultValueSerializer");
|
|
346
346
|
G.defaultValueSerializer = Vi;
|
|
347
347
|
var Wi = /* @__PURE__ */ n((r) => r instanceof Date, "defaultShouldSerializeObject");
|
|
@@ -361,12 +361,12 @@ var rr = O((G) => {
|
|
|
361
361
|
});
|
|
362
362
|
|
|
363
363
|
// ../node_modules/picoquery/lib/object-util.js
|
|
364
|
-
var
|
|
364
|
+
var Yr = O((or) => {
|
|
365
365
|
"use strict";
|
|
366
|
-
Object.defineProperty(
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
var ae =
|
|
366
|
+
Object.defineProperty(or, "__esModule", { value: !0 });
|
|
367
|
+
or.getDeepObject = Ki;
|
|
368
|
+
or.stringifyObject = Io;
|
|
369
|
+
var ae = tr(), $i = Wr();
|
|
370
370
|
function Yi(r) {
|
|
371
371
|
return r === "__proto__" || r === "constructor" || r === "prototype";
|
|
372
372
|
}
|
|
@@ -384,25 +384,25 @@ var $r = O((tr) => {
|
|
|
384
384
|
let { nestingSyntax: i = ae.defaultOptions.nestingSyntax, arrayRepeat: a = ae.defaultOptions.arrayRepeat, arrayRepeatSyntax: l = ae.defaultOptions.
|
|
385
385
|
arrayRepeatSyntax, nesting: c = ae.defaultOptions.nesting, delimiter: d = ae.defaultOptions.delimiter, valueSerializer: p = ae.defaultOptions.
|
|
386
386
|
valueSerializer, shouldSerializeObject: u = ae.defaultOptions.shouldSerializeObject } = e, y = typeof d == "number" ? String.fromCharCode(
|
|
387
|
-
d) : d,
|
|
387
|
+
d) : d, h = s === !0 && a, g = i === "dot" || i === "js" && !s;
|
|
388
388
|
if (t > Xi)
|
|
389
389
|
return "";
|
|
390
|
-
let
|
|
391
|
-
for (let
|
|
392
|
-
let f = r[
|
|
393
|
-
o ? (
|
|
394
|
-
"object" && f !== null && !u(f) ? (T = f.pop !== void 0, (c || a && T) && (
|
|
395
|
-
|
|
390
|
+
let b = "", m = !0, T = !1;
|
|
391
|
+
for (let x in r) {
|
|
392
|
+
let f = r[x], S;
|
|
393
|
+
o ? (S = o, h ? l === "bracket" && (S += Ji) : g ? (S += ea, S += x) : (S += Qi, S += x, S += Zi)) : S = x, m || (b += y), typeof f ==
|
|
394
|
+
"object" && f !== null && !u(f) ? (T = f.pop !== void 0, (c || a && T) && (b += Io(f, e, t + 1, S, T))) : (b += (0, $i.encodeString)(S),
|
|
395
|
+
b += "=", b += p(f, x)), m && (m = !1);
|
|
396
396
|
}
|
|
397
|
-
return
|
|
397
|
+
return b;
|
|
398
398
|
}
|
|
399
399
|
n(Io, "stringifyObject");
|
|
400
400
|
});
|
|
401
401
|
|
|
402
402
|
// ../node_modules/fast-decode-uri-component/index.js
|
|
403
|
-
var jo = O((
|
|
403
|
+
var jo = O((Xu, ko) => {
|
|
404
404
|
"use strict";
|
|
405
|
-
var Oo = 12, ra = 0,
|
|
405
|
+
var Oo = 12, ra = 0, Kr = [
|
|
406
406
|
// The first part of the table maps bytes to character to a transition.
|
|
407
407
|
0,
|
|
408
408
|
0,
|
|
@@ -789,8 +789,8 @@ var jo = O((Ku, ko) => {
|
|
|
789
789
|
var e = r.indexOf("%");
|
|
790
790
|
if (e === -1) return r;
|
|
791
791
|
for (var t = r.length, o = "", s = 0, i = 0, a = e, l = Oo; e > -1 && e < t; ) {
|
|
792
|
-
var c = Do(r[e + 1], 4), d = Do(r[e + 2], 0), p = c | d, u =
|
|
793
|
-
if (l =
|
|
792
|
+
var c = Do(r[e + 1], 4), d = Do(r[e + 2], 0), p = c | d, u = Kr[p];
|
|
793
|
+
if (l = Kr[256 + l + u], i = i << 6 | p & Kr[364 + u], l === Oo)
|
|
794
794
|
o += r.slice(s, a), o += i <= 65535 ? String.fromCharCode(i) : String.fromCharCode(
|
|
795
795
|
55232 + (i >> 10),
|
|
796
796
|
56320 + (i & 1023)
|
|
@@ -846,7 +846,7 @@ var No = O((W) => {
|
|
|
846
846
|
Object.defineProperty(W, "__esModule", { value: !0 });
|
|
847
847
|
W.numberValueDeserializer = W.numberKeyDeserializer = void 0;
|
|
848
848
|
W.parse = aa;
|
|
849
|
-
var
|
|
849
|
+
var nr = Yr(), le = tr(), Mo = na(jo()), sa = /* @__PURE__ */ n((r) => {
|
|
850
850
|
let e = Number(r);
|
|
851
851
|
return Number.isNaN(e) ? r : e;
|
|
852
852
|
}, "numberKeyDeserializer");
|
|
@@ -859,11 +859,11 @@ var No = O((W) => {
|
|
|
859
859
|
var _o = /\+/g, Lo = /* @__PURE__ */ n(function() {
|
|
860
860
|
}, "Empty");
|
|
861
861
|
Lo.prototype = /* @__PURE__ */ Object.create(null);
|
|
862
|
-
function
|
|
862
|
+
function sr(r, e, t, o, s) {
|
|
863
863
|
let i = r.substring(e, t);
|
|
864
864
|
return o && (i = i.replace(_o, " ")), s && (i = (0, Mo.default)(i) || i), i;
|
|
865
865
|
}
|
|
866
|
-
n(
|
|
866
|
+
n(sr, "computeKeySlice");
|
|
867
867
|
function aa(r, e) {
|
|
868
868
|
let { valueDeserializer: t = le.defaultOptions.valueDeserializer, keyDeserializer: o = le.defaultOptions.keyDeserializer, arrayRepeatSyntax: s = le.
|
|
869
869
|
defaultOptions.arrayRepeatSyntax, nesting: i = le.defaultOptions.nesting, arrayRepeat: a = le.defaultOptions.arrayRepeat, nestingSyntax: l = le.
|
|
@@ -871,28 +871,28 @@ var No = O((W) => {
|
|
|
871
871
|
"js", u = new Lo();
|
|
872
872
|
if (typeof r != "string")
|
|
873
873
|
return u;
|
|
874
|
-
let y = r.length,
|
|
875
|
-
B = -1, Re = -1,
|
|
874
|
+
let y = r.length, h = "", g = -1, b = -1, m = -1, T = u, x, f = "", S = "", R = !1, w = !1, A = !1, F = !1, j = !1, N = !1, pe = !1, C = 0,
|
|
875
|
+
B = -1, Re = -1, at = -1;
|
|
876
876
|
for (let I = 0; I < y + 1; I++) {
|
|
877
877
|
if (C = I !== y ? r.charCodeAt(I) : d, C === d) {
|
|
878
|
-
if (pe =
|
|
879
|
-
T,
|
|
880
|
-
pe && (
|
|
881
|
-
let we = t(
|
|
878
|
+
if (pe = b > g, pe || (b = I), m !== b - 1 && (S = sr(r, m + 1, B > -1 ? B : b, A, R), f = o(S), x !== void 0 && (T = (0, nr.getDeepObject)(
|
|
879
|
+
T, x, f, p && j, p && N))), pe || f !== "") {
|
|
880
|
+
pe && (h = r.slice(b + 1, I), F && (h = h.replace(_o, " ")), w && (h = (0, Mo.default)(h) || h));
|
|
881
|
+
let we = t(h, f);
|
|
882
882
|
if (a) {
|
|
883
883
|
let Be = T[f];
|
|
884
884
|
Be === void 0 ? B > -1 ? T[f] = [we] : T[f] = we : Be.pop ? Be.push(we) : T[f] = [Be, we];
|
|
885
885
|
} else
|
|
886
886
|
T[f] = we;
|
|
887
887
|
}
|
|
888
|
-
|
|
889
|
-
} else C === 93 ? (a && s === "bracket" &&
|
|
890
|
-
I, A,
|
|
891
|
-
C === 46 ? i && (l === "dot" || p) &&
|
|
892
|
-
T,
|
|
893
|
-
r,
|
|
894
|
-
I) : C === 61 ?
|
|
895
|
-
Re = I,
|
|
888
|
+
h = "", g = I, b = I, R = !1, w = !1, A = !1, F = !1, j = !1, N = !1, B = -1, m = I, T = u, x = void 0, f = "";
|
|
889
|
+
} else C === 93 ? (a && s === "bracket" && at === 91 && (B = Re), i && (l === "index" || p) && b <= g && (m !== Re && (S = sr(r, m + 1,
|
|
890
|
+
I, A, R), f = o(S), x !== void 0 && (T = (0, nr.getDeepObject)(T, x, f, void 0, p)), x = f, A = !1, R = !1), m = I, N = !0, j = !1)) :
|
|
891
|
+
C === 46 ? i && (l === "dot" || p) && b <= g && (m !== Re && (S = sr(r, m + 1, I, A, R), f = o(S), x !== void 0 && (T = (0, nr.getDeepObject)(
|
|
892
|
+
T, x, f, p)), x = f, A = !1, R = !1), j = !0, N = !1, m = I) : C === 91 ? i && (l === "index" || p) && b <= g && (m !== Re && (S = sr(
|
|
893
|
+
r, m + 1, I, A, R), f = o(S), p && x !== void 0 && (T = (0, nr.getDeepObject)(T, x, f, p)), x = f, A = !1, R = !1, j = !1, N = !0), m =
|
|
894
|
+
I) : C === 61 ? b <= g ? b = I : w = !0 : C === 43 ? b > g ? F = !0 : A = !0 : C === 37 && (b > g ? w = !0 : R = !0);
|
|
895
|
+
Re = I, at = C;
|
|
896
896
|
}
|
|
897
897
|
return u;
|
|
898
898
|
}
|
|
@@ -900,11 +900,11 @@ var No = O((W) => {
|
|
|
900
900
|
});
|
|
901
901
|
|
|
902
902
|
// ../node_modules/picoquery/lib/stringify.js
|
|
903
|
-
var qo = O((
|
|
903
|
+
var qo = O((Xr) => {
|
|
904
904
|
"use strict";
|
|
905
|
-
Object.defineProperty(
|
|
906
|
-
|
|
907
|
-
var la =
|
|
905
|
+
Object.defineProperty(Xr, "__esModule", { value: !0 });
|
|
906
|
+
Xr.stringify = ca;
|
|
907
|
+
var la = Yr();
|
|
908
908
|
function ca(r, e) {
|
|
909
909
|
if (r === null || typeof r != "object")
|
|
910
910
|
return "";
|
|
@@ -915,7 +915,7 @@ var qo = O((Kr) => {
|
|
|
915
915
|
});
|
|
916
916
|
|
|
917
917
|
// ../node_modules/picoquery/lib/main.js
|
|
918
|
-
var
|
|
918
|
+
var ir = O((q) => {
|
|
919
919
|
"use strict";
|
|
920
920
|
var da = q && q.__createBinding || (Object.create ? function(r, e, t, o) {
|
|
921
921
|
o === void 0 && (o = t);
|
|
@@ -938,11 +938,11 @@ var sr = O((q) => {
|
|
|
938
938
|
Object.defineProperty(q, "stringify", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
939
939
|
return fa.stringify;
|
|
940
940
|
}, "get") });
|
|
941
|
-
pa(
|
|
941
|
+
pa(tr(), q);
|
|
942
942
|
});
|
|
943
943
|
|
|
944
944
|
// ../node_modules/entities/lib/maps/entities.json
|
|
945
|
-
var
|
|
945
|
+
var Zr = O((yf, Ra) => {
|
|
946
946
|
Ra.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\
|
|
947
947
|
\xC2", acirc: "\xE2", acute: "\xB4", Acy: "\u0410", acy: "\u0430", AElig: "\xC6", aelig: "\xE6", af: "\u2061", Afr: "\u{1D504}", afr: "\u{1D51E}",
|
|
948
948
|
Agrave: "\xC0", agrave: "\xE0", alefsym: "\u2135", aleph: "\u2135", Alpha: "\u0391", alpha: "\u03B1", Amacr: "\u0100", amacr: "\u0101", amalg: "\
|
|
@@ -1224,7 +1224,7 @@ var Qr = O((ff, Ra) => {
|
|
|
1224
1224
|
});
|
|
1225
1225
|
|
|
1226
1226
|
// ../node_modules/entities/lib/maps/legacy.json
|
|
1227
|
-
var Wo = O((
|
|
1227
|
+
var Wo = O((mf, wa) => {
|
|
1228
1228
|
wa.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\
|
|
1229
1229
|
\xE0", amp: "&", AMP: "&", Aring: "\xC5", aring: "\xE5", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", brvbar: "\xA6", Ccedil: "\
|
|
1230
1230
|
\xC7", ccedil: "\xE7", cedil: "\xB8", cent: "\xA2", copy: "\xA9", COPY: "\xA9", curren: "\xA4", deg: "\xB0", divide: "\xF7", Eacute: "\xC9",
|
|
@@ -1239,12 +1239,12 @@ var Wo = O((yf, wa) => {
|
|
|
1239
1239
|
});
|
|
1240
1240
|
|
|
1241
1241
|
// ../node_modules/entities/lib/maps/xml.json
|
|
1242
|
-
var
|
|
1242
|
+
var et = O((hf, Ea) => {
|
|
1243
1243
|
Ea.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
|
|
1244
1244
|
});
|
|
1245
1245
|
|
|
1246
1246
|
// ../node_modules/entities/lib/maps/decode.json
|
|
1247
|
-
var $o = O((
|
|
1247
|
+
var $o = O((gf, Aa) => {
|
|
1248
1248
|
Aa.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240,
|
|
1249
1249
|
"138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212,
|
|
1250
1250
|
"152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 };
|
|
@@ -1273,16 +1273,16 @@ var Ko = O((qe) => {
|
|
|
1273
1273
|
});
|
|
1274
1274
|
|
|
1275
1275
|
// ../node_modules/entities/lib/decode.js
|
|
1276
|
-
var
|
|
1276
|
+
var tt = O((U) => {
|
|
1277
1277
|
"use strict";
|
|
1278
|
-
var
|
|
1278
|
+
var ar = U && U.__importDefault || function(r) {
|
|
1279
1279
|
return r && r.__esModule ? r : { default: r };
|
|
1280
1280
|
};
|
|
1281
1281
|
Object.defineProperty(U, "__esModule", { value: !0 });
|
|
1282
1282
|
U.decodeHTML = U.decodeHTMLStrict = U.decodeXML = void 0;
|
|
1283
|
-
var
|
|
1283
|
+
var rt = ar(Zr()), Fa = ar(Wo()), Ia = ar(et()), Xo = ar(Ko()), Oa = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
|
|
1284
1284
|
U.decodeXML = Qo(Ia.default);
|
|
1285
|
-
U.decodeHTMLStrict = Qo(
|
|
1285
|
+
U.decodeHTMLStrict = Qo(rt.default);
|
|
1286
1286
|
function Qo(r) {
|
|
1287
1287
|
var e = Zo(r);
|
|
1288
1288
|
return function(t) {
|
|
@@ -1294,9 +1294,9 @@ var rt = O((U) => {
|
|
|
1294
1294
|
return r < e ? 1 : -1;
|
|
1295
1295
|
}, "sorter");
|
|
1296
1296
|
U.decodeHTML = function() {
|
|
1297
|
-
for (var r = Object.keys(Fa.default).sort(Jo), e = Object.keys(
|
|
1297
|
+
for (var r = Object.keys(Fa.default).sort(Jo), e = Object.keys(rt.default).sort(Jo), t = 0, o = 0; t < e.length; t++)
|
|
1298
1298
|
r[o] === e[t] ? (e[t] += ";?", o++) : e[t] += ";";
|
|
1299
|
-
var s = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i = Zo(
|
|
1299
|
+
var s = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i = Zo(rt.default);
|
|
1300
1300
|
function a(l) {
|
|
1301
1301
|
return l.substr(-1) !== ";" && (l += ";"), i(l);
|
|
1302
1302
|
}
|
|
@@ -1317,18 +1317,18 @@ var rt = O((U) => {
|
|
|
1317
1317
|
});
|
|
1318
1318
|
|
|
1319
1319
|
// ../node_modules/entities/lib/encode.js
|
|
1320
|
-
var
|
|
1320
|
+
var nt = O((M) => {
|
|
1321
1321
|
"use strict";
|
|
1322
1322
|
var en = M && M.__importDefault || function(r) {
|
|
1323
1323
|
return r && r.__esModule ? r : { default: r };
|
|
1324
1324
|
};
|
|
1325
1325
|
Object.defineProperty(M, "__esModule", { value: !0 });
|
|
1326
1326
|
M.escapeUTF8 = M.escape = M.encodeNonAsciiHTML = M.encodeHTML = M.encodeXML = void 0;
|
|
1327
|
-
var Da = en(
|
|
1327
|
+
var Da = en(et()), rn = on(Da.default), tn = nn(rn);
|
|
1328
1328
|
M.encodeXML = ln(rn);
|
|
1329
|
-
var ka = en(
|
|
1330
|
-
M.encodeHTML = _a(
|
|
1331
|
-
M.encodeNonAsciiHTML = ln(
|
|
1329
|
+
var ka = en(Zr()), ot = on(ka.default), ja = nn(ot);
|
|
1330
|
+
M.encodeHTML = _a(ot, ja);
|
|
1331
|
+
M.encodeNonAsciiHTML = ln(ot);
|
|
1332
1332
|
function on(r) {
|
|
1333
1333
|
return Object.keys(r).sort().reduce(function(e, t) {
|
|
1334
1334
|
return e[r[t]] = "&" + t + ";", e;
|
|
@@ -1365,33 +1365,33 @@ var ot = O((M) => {
|
|
|
1365
1365
|
}
|
|
1366
1366
|
)
|
|
1367
1367
|
);
|
|
1368
|
-
function
|
|
1368
|
+
function lr(r) {
|
|
1369
1369
|
return "&#x" + (r.length > 1 ? Ma(r) : r.charCodeAt(0)).toString(16).toUpperCase() + ";";
|
|
1370
1370
|
}
|
|
1371
|
-
n(
|
|
1371
|
+
n(lr, "singleCharReplacer");
|
|
1372
1372
|
function _a(r, e) {
|
|
1373
1373
|
return function(t) {
|
|
1374
1374
|
return t.replace(e, function(o) {
|
|
1375
1375
|
return r[o];
|
|
1376
|
-
}).replace(sn,
|
|
1376
|
+
}).replace(sn, lr);
|
|
1377
1377
|
};
|
|
1378
1378
|
}
|
|
1379
1379
|
n(_a, "getInverse");
|
|
1380
1380
|
var an = new RegExp(tn.source + "|" + sn.source, "g");
|
|
1381
1381
|
function La(r) {
|
|
1382
|
-
return r.replace(an,
|
|
1382
|
+
return r.replace(an, lr);
|
|
1383
1383
|
}
|
|
1384
1384
|
n(La, "escape");
|
|
1385
1385
|
M.escape = La;
|
|
1386
1386
|
function Na(r) {
|
|
1387
|
-
return r.replace(tn,
|
|
1387
|
+
return r.replace(tn, lr);
|
|
1388
1388
|
}
|
|
1389
1389
|
n(Na, "escapeUTF8");
|
|
1390
1390
|
M.escapeUTF8 = Na;
|
|
1391
1391
|
function ln(r) {
|
|
1392
1392
|
return function(e) {
|
|
1393
1393
|
return e.replace(an, function(t) {
|
|
1394
|
-
return r[t] ||
|
|
1394
|
+
return r[t] || lr(t);
|
|
1395
1395
|
});
|
|
1396
1396
|
};
|
|
1397
1397
|
}
|
|
@@ -1399,79 +1399,79 @@ var ot = O((M) => {
|
|
|
1399
1399
|
});
|
|
1400
1400
|
|
|
1401
1401
|
// ../node_modules/entities/lib/index.js
|
|
1402
|
-
var dn = O((
|
|
1402
|
+
var dn = O((E) => {
|
|
1403
1403
|
"use strict";
|
|
1404
|
-
Object.defineProperty(
|
|
1405
|
-
|
|
1406
|
-
|
|
1404
|
+
Object.defineProperty(E, "__esModule", { value: !0 });
|
|
1405
|
+
E.decodeXMLStrict = E.decodeHTML5Strict = E.decodeHTML4Strict = E.decodeHTML5 = E.decodeHTML4 = E.decodeHTMLStrict = E.decodeHTML = E.decodeXML =
|
|
1406
|
+
E.encodeHTML5 = E.encodeHTML4 = E.escapeUTF8 = E.escape = E.encodeNonAsciiHTML = E.encodeHTML = E.encodeXML = E.encode = E.decodeStrict = E.
|
|
1407
1407
|
decode = void 0;
|
|
1408
|
-
var
|
|
1408
|
+
var cr = tt(), cn = nt();
|
|
1409
1409
|
function qa(r, e) {
|
|
1410
|
-
return (!e || e <= 0 ?
|
|
1410
|
+
return (!e || e <= 0 ? cr.decodeXML : cr.decodeHTML)(r);
|
|
1411
1411
|
}
|
|
1412
1412
|
n(qa, "decode");
|
|
1413
|
-
|
|
1413
|
+
E.decode = qa;
|
|
1414
1414
|
function Ba(r, e) {
|
|
1415
|
-
return (!e || e <= 0 ?
|
|
1415
|
+
return (!e || e <= 0 ? cr.decodeXML : cr.decodeHTMLStrict)(r);
|
|
1416
1416
|
}
|
|
1417
1417
|
n(Ba, "decodeStrict");
|
|
1418
|
-
|
|
1418
|
+
E.decodeStrict = Ba;
|
|
1419
1419
|
function za(r, e) {
|
|
1420
1420
|
return (!e || e <= 0 ? cn.encodeXML : cn.encodeHTML)(r);
|
|
1421
1421
|
}
|
|
1422
1422
|
n(za, "encode");
|
|
1423
|
-
|
|
1424
|
-
var ce =
|
|
1425
|
-
Object.defineProperty(
|
|
1423
|
+
E.encode = za;
|
|
1424
|
+
var ce = nt();
|
|
1425
|
+
Object.defineProperty(E, "encodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1426
1426
|
return ce.encodeXML;
|
|
1427
1427
|
}, "get") });
|
|
1428
|
-
Object.defineProperty(
|
|
1428
|
+
Object.defineProperty(E, "encodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1429
1429
|
return ce.encodeHTML;
|
|
1430
1430
|
}, "get") });
|
|
1431
|
-
Object.defineProperty(
|
|
1431
|
+
Object.defineProperty(E, "encodeNonAsciiHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1432
1432
|
return ce.encodeNonAsciiHTML;
|
|
1433
1433
|
}, "get") });
|
|
1434
|
-
Object.defineProperty(
|
|
1434
|
+
Object.defineProperty(E, "escape", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1435
1435
|
return ce.escape;
|
|
1436
1436
|
}, "get") });
|
|
1437
|
-
Object.defineProperty(
|
|
1437
|
+
Object.defineProperty(E, "escapeUTF8", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1438
1438
|
return ce.escapeUTF8;
|
|
1439
1439
|
}, "get") });
|
|
1440
|
-
Object.defineProperty(
|
|
1440
|
+
Object.defineProperty(E, "encodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1441
1441
|
return ce.encodeHTML;
|
|
1442
1442
|
}, "get") });
|
|
1443
|
-
Object.defineProperty(
|
|
1443
|
+
Object.defineProperty(E, "encodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1444
1444
|
return ce.encodeHTML;
|
|
1445
1445
|
}, "get") });
|
|
1446
|
-
var Z =
|
|
1447
|
-
Object.defineProperty(
|
|
1446
|
+
var Z = tt();
|
|
1447
|
+
Object.defineProperty(E, "decodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1448
1448
|
return Z.decodeXML;
|
|
1449
1449
|
}, "get") });
|
|
1450
|
-
Object.defineProperty(
|
|
1450
|
+
Object.defineProperty(E, "decodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1451
1451
|
return Z.decodeHTML;
|
|
1452
1452
|
}, "get") });
|
|
1453
|
-
Object.defineProperty(
|
|
1453
|
+
Object.defineProperty(E, "decodeHTMLStrict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1454
1454
|
return Z.decodeHTMLStrict;
|
|
1455
1455
|
}, "get") });
|
|
1456
|
-
Object.defineProperty(
|
|
1456
|
+
Object.defineProperty(E, "decodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1457
1457
|
return Z.decodeHTML;
|
|
1458
1458
|
}, "get") });
|
|
1459
|
-
Object.defineProperty(
|
|
1459
|
+
Object.defineProperty(E, "decodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1460
1460
|
return Z.decodeHTML;
|
|
1461
1461
|
}, "get") });
|
|
1462
|
-
Object.defineProperty(
|
|
1462
|
+
Object.defineProperty(E, "decodeHTML4Strict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1463
1463
|
return Z.decodeHTMLStrict;
|
|
1464
1464
|
}, "get") });
|
|
1465
|
-
Object.defineProperty(
|
|
1465
|
+
Object.defineProperty(E, "decodeHTML5Strict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1466
1466
|
return Z.decodeHTMLStrict;
|
|
1467
1467
|
}, "get") });
|
|
1468
|
-
Object.defineProperty(
|
|
1468
|
+
Object.defineProperty(E, "decodeXMLStrict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
|
|
1469
1469
|
return Z.decodeXML;
|
|
1470
1470
|
}, "get") });
|
|
1471
1471
|
});
|
|
1472
1472
|
|
|
1473
1473
|
// ../node_modules/ansi-to-html/lib/ansi_to_html.js
|
|
1474
|
-
var xn = O((
|
|
1474
|
+
var xn = O((Cf, Tn) => {
|
|
1475
1475
|
"use strict";
|
|
1476
1476
|
function Ga(r, e) {
|
|
1477
1477
|
if (!(r instanceof e))
|
|
@@ -1565,13 +1565,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1565
1565
|
14: "#5FF",
|
|
1566
1566
|
15: "#FFF"
|
|
1567
1567
|
};
|
|
1568
|
-
return
|
|
1569
|
-
|
|
1570
|
-
|
|
1568
|
+
return dr(0, 5).forEach(function(e) {
|
|
1569
|
+
dr(0, 5).forEach(function(t) {
|
|
1570
|
+
dr(0, 5).forEach(function(o) {
|
|
1571
1571
|
return $a(e, t, o, r);
|
|
1572
1572
|
});
|
|
1573
1573
|
});
|
|
1574
|
-
}),
|
|
1574
|
+
}), dr(0, 23).forEach(function(e) {
|
|
1575
1575
|
var t = e + 232, o = bn(e * 10 + 8);
|
|
1576
1576
|
r[t] = "#" + o + o + o;
|
|
1577
1577
|
}), r;
|
|
@@ -1605,8 +1605,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1605
1605
|
n(Ya, "toColorHexString");
|
|
1606
1606
|
function yn(r, e, t, o) {
|
|
1607
1607
|
var s;
|
|
1608
|
-
return e === "text" ? s = Qa(t, o) : e === "display" ? s = Xa(r, t, o) : e === "xterm256Foreground" ? s =
|
|
1609
|
-
erm256Background" ? s =
|
|
1608
|
+
return e === "text" ? s = Qa(t, o) : e === "display" ? s = Xa(r, t, o) : e === "xterm256Foreground" ? s = ur(r, o.colors[t]) : e === "xt\
|
|
1609
|
+
erm256Background" ? s = fr(r, o.colors[t]) : e === "rgb" && (s = Ka(r, t)), s;
|
|
1610
1610
|
}
|
|
1611
1611
|
n(yn, "generateOutput");
|
|
1612
1612
|
function Ka(r, e) {
|
|
@@ -1614,7 +1614,7 @@ erm256Background" ? s = ur(r, o.colors[t]) : e === "rgb" && (s = Ka(r, t)), s;
|
|
|
1614
1614
|
var t = +e.substr(0, 2), o = e.substring(5).split(";"), s = o.map(function(i) {
|
|
1615
1615
|
return ("0" + Number(i).toString(16)).substr(-2);
|
|
1616
1616
|
}).join("");
|
|
1617
|
-
return
|
|
1617
|
+
return pr(r, (t === 38 ? "color:#" : "background-color:#") + s);
|
|
1618
1618
|
}
|
|
1619
1619
|
n(Ka, "handleRgb");
|
|
1620
1620
|
function Xa(r, e, t) {
|
|
@@ -1636,13 +1636,13 @@ erm256Background" ? s = ur(r, o.colors[t]) : e === "rgb" && (s = Ka(r, t)), s;
|
|
|
1636
1636
|
return ee(r, "u");
|
|
1637
1637
|
}, "_"),
|
|
1638
1638
|
8: /* @__PURE__ */ n(function() {
|
|
1639
|
-
return
|
|
1639
|
+
return pr(r, "display:none");
|
|
1640
1640
|
}, "_"),
|
|
1641
1641
|
9: /* @__PURE__ */ n(function() {
|
|
1642
1642
|
return ee(r, "strike");
|
|
1643
1643
|
}, "_"),
|
|
1644
1644
|
22: /* @__PURE__ */ n(function() {
|
|
1645
|
-
return
|
|
1645
|
+
return pr(r, "font-weight:normal;text-decoration:none;font-style:normal");
|
|
1646
1646
|
}, "_"),
|
|
1647
1647
|
23: /* @__PURE__ */ n(function() {
|
|
1648
1648
|
return hn(r, "i");
|
|
@@ -1651,17 +1651,17 @@ erm256Background" ? s = ur(r, o.colors[t]) : e === "rgb" && (s = Ka(r, t)), s;
|
|
|
1651
1651
|
return hn(r, "u");
|
|
1652
1652
|
}, "_"),
|
|
1653
1653
|
39: /* @__PURE__ */ n(function() {
|
|
1654
|
-
return
|
|
1654
|
+
return ur(r, t.fg);
|
|
1655
1655
|
}, "_"),
|
|
1656
1656
|
49: /* @__PURE__ */ n(function() {
|
|
1657
|
-
return
|
|
1657
|
+
return fr(r, t.bg);
|
|
1658
1658
|
}, "_"),
|
|
1659
1659
|
53: /* @__PURE__ */ n(function() {
|
|
1660
|
-
return
|
|
1660
|
+
return pr(r, "text-decoration:overline");
|
|
1661
1661
|
}, "_")
|
|
1662
1662
|
}, s;
|
|
1663
|
-
return o[e] ? s = o[e]() : 4 < e && e < 7 ? s = ee(r, "blink") : 29 < e && e < 38 ? s =
|
|
1664
|
-
|
|
1663
|
+
return o[e] ? s = o[e]() : 4 < e && e < 7 ? s = ee(r, "blink") : 29 < e && e < 38 ? s = ur(r, t.colors[e - 30]) : 39 < e && e < 48 ? s =
|
|
1664
|
+
fr(r, t.colors[e - 40]) : 89 < e && e < 98 ? s = ur(r, t.colors[8 + (e - 90)]) : 99 < e && e < 108 && (s = fr(r, t.colors[8 + (e - 100)])),
|
|
1665
1665
|
s;
|
|
1666
1666
|
}
|
|
1667
1667
|
n(Xa, "handleDisplay");
|
|
@@ -1672,12 +1672,12 @@ erm256Background" ? s = ur(r, o.colors[t]) : e === "rgb" && (s = Ka(r, t)), s;
|
|
|
1672
1672
|
}).join("");
|
|
1673
1673
|
}
|
|
1674
1674
|
n(Sn, "resetStyles");
|
|
1675
|
-
function
|
|
1675
|
+
function dr(r, e) {
|
|
1676
1676
|
for (var t = [], o = r; o <= e; o++)
|
|
1677
1677
|
t.push(o);
|
|
1678
1678
|
return t;
|
|
1679
1679
|
}
|
|
1680
|
-
n(
|
|
1680
|
+
n(dr, "range");
|
|
1681
1681
|
function Ja(r) {
|
|
1682
1682
|
return function(e) {
|
|
1683
1683
|
return (r === null || e.category !== r) && r !== "all";
|
|
@@ -1700,18 +1700,18 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
|
|
|
1700
1700
|
return t || (t = ""), r.push(e), "<".concat(e).concat(t ? ' style="'.concat(t, '"') : "", ">");
|
|
1701
1701
|
}
|
|
1702
1702
|
n(ee, "pushTag");
|
|
1703
|
-
function
|
|
1703
|
+
function pr(r, e) {
|
|
1704
1704
|
return ee(r, "span", e);
|
|
1705
1705
|
}
|
|
1706
|
-
n(
|
|
1707
|
-
function
|
|
1706
|
+
n(pr, "pushStyle");
|
|
1707
|
+
function ur(r, e) {
|
|
1708
1708
|
return ee(r, "span", "color:" + e);
|
|
1709
1709
|
}
|
|
1710
|
-
n(
|
|
1711
|
-
function
|
|
1710
|
+
n(ur, "pushForegroundColor");
|
|
1711
|
+
function fr(r, e) {
|
|
1712
1712
|
return ee(r, "span", "background-color:" + e);
|
|
1713
1713
|
}
|
|
1714
|
-
n(
|
|
1714
|
+
n(fr, "pushBackgroundColor");
|
|
1715
1715
|
function hn(r, e) {
|
|
1716
1716
|
var t;
|
|
1717
1717
|
if (r.slice(-1)[0] === e && (t = r.pop()), t)
|
|
@@ -1724,21 +1724,21 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
|
|
|
1724
1724
|
return "";
|
|
1725
1725
|
}
|
|
1726
1726
|
n(i, "remove");
|
|
1727
|
-
function a(
|
|
1728
|
-
return t("xterm256Foreground",
|
|
1727
|
+
function a(R, w) {
|
|
1728
|
+
return t("xterm256Foreground", w), "";
|
|
1729
1729
|
}
|
|
1730
1730
|
n(a, "removeXterm256Foreground");
|
|
1731
|
-
function l(
|
|
1732
|
-
return t("xterm256Background",
|
|
1731
|
+
function l(R, w) {
|
|
1732
|
+
return t("xterm256Background", w), "";
|
|
1733
1733
|
}
|
|
1734
1734
|
n(l, "removeXterm256Background");
|
|
1735
|
-
function c(
|
|
1736
|
-
return e.newline ? t("display", -1) : t("text",
|
|
1735
|
+
function c(R) {
|
|
1736
|
+
return e.newline ? t("display", -1) : t("text", R), "";
|
|
1737
1737
|
}
|
|
1738
1738
|
n(c, "newline");
|
|
1739
|
-
function d(
|
|
1740
|
-
o = !0,
|
|
1741
|
-
var A = gn(
|
|
1739
|
+
function d(R, w) {
|
|
1740
|
+
o = !0, w.trim().length === 0 && (w = "0"), w = w.trimRight(";").split(";");
|
|
1741
|
+
var A = gn(w), F;
|
|
1742
1742
|
try {
|
|
1743
1743
|
for (A.s(); !(F = A.n()).done; ) {
|
|
1744
1744
|
var j = F.value;
|
|
@@ -1752,12 +1752,12 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
|
|
|
1752
1752
|
return "";
|
|
1753
1753
|
}
|
|
1754
1754
|
n(d, "ansiMess");
|
|
1755
|
-
function p(
|
|
1756
|
-
return t("text",
|
|
1755
|
+
function p(R) {
|
|
1756
|
+
return t("text", R), "";
|
|
1757
1757
|
}
|
|
1758
1758
|
n(p, "realText");
|
|
1759
|
-
function u(
|
|
1760
|
-
return t("rgb",
|
|
1759
|
+
function u(R) {
|
|
1760
|
+
return t("rgb", R), "";
|
|
1761
1761
|
}
|
|
1762
1762
|
n(u, "rgb");
|
|
1763
1763
|
var y = [{
|
|
@@ -1820,24 +1820,24 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
|
|
|
1820
1820
|
pattern: /^(([^\x1b\x08\r\n])+)/,
|
|
1821
1821
|
sub: p
|
|
1822
1822
|
}];
|
|
1823
|
-
function
|
|
1824
|
-
|
|
1823
|
+
function h(R, w) {
|
|
1824
|
+
w > s && o || (o = !1, r = r.replace(R.pattern, R.sub));
|
|
1825
1825
|
}
|
|
1826
|
-
n(
|
|
1827
|
-
var
|
|
1828
|
-
e: for (;
|
|
1829
|
-
for (var T = 0,
|
|
1830
|
-
var
|
|
1831
|
-
if (
|
|
1832
|
-
|
|
1826
|
+
n(h, "process");
|
|
1827
|
+
var g = [], b = r, m = b.length;
|
|
1828
|
+
e: for (; m > 0; ) {
|
|
1829
|
+
for (var T = 0, x = 0, f = y.length; x < f; T = ++x) {
|
|
1830
|
+
var S = y[T];
|
|
1831
|
+
if (h(S, T), r.length !== m) {
|
|
1832
|
+
m = r.length;
|
|
1833
1833
|
continue e;
|
|
1834
1834
|
}
|
|
1835
1835
|
}
|
|
1836
|
-
if (r.length ===
|
|
1836
|
+
if (r.length === m)
|
|
1837
1837
|
break;
|
|
1838
|
-
|
|
1838
|
+
g.push(0), m = r.length;
|
|
1839
1839
|
}
|
|
1840
|
-
return
|
|
1840
|
+
return g;
|
|
1841
1841
|
}
|
|
1842
1842
|
n(Za, "tokenize");
|
|
1843
1843
|
function el(r, e, t) {
|
|
@@ -1873,11 +1873,11 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
|
|
|
1873
1873
|
});
|
|
1874
1874
|
|
|
1875
1875
|
// src/preview-api/modules/addons/main.ts
|
|
1876
|
-
import { global as
|
|
1876
|
+
import { global as br } from "@storybook/global";
|
|
1877
1877
|
|
|
1878
1878
|
// src/preview-api/modules/addons/storybook-channel-mock.ts
|
|
1879
1879
|
import { Channel as qn } from "storybook/internal/channels";
|
|
1880
|
-
function
|
|
1880
|
+
function gr() {
|
|
1881
1881
|
let r = {
|
|
1882
1882
|
setHandler: /* @__PURE__ */ n(() => {
|
|
1883
1883
|
}, "setHandler"),
|
|
@@ -1886,14 +1886,14 @@ function hr() {
|
|
|
1886
1886
|
};
|
|
1887
1887
|
return new qn({ transport: r });
|
|
1888
1888
|
}
|
|
1889
|
-
n(
|
|
1889
|
+
n(gr, "mockChannel");
|
|
1890
1890
|
|
|
1891
1891
|
// src/preview-api/modules/addons/main.ts
|
|
1892
|
-
var
|
|
1892
|
+
var Tr = class {
|
|
1893
1893
|
constructor() {
|
|
1894
1894
|
this.getChannel = /* @__PURE__ */ n(() => {
|
|
1895
1895
|
if (!this.channel) {
|
|
1896
|
-
let e =
|
|
1896
|
+
let e = gr();
|
|
1897
1897
|
return this.setChannel(e), e;
|
|
1898
1898
|
}
|
|
1899
1899
|
return this.channel;
|
|
@@ -1910,9 +1910,9 @@ var Sr = class {
|
|
|
1910
1910
|
static {
|
|
1911
1911
|
n(this, "AddonStore");
|
|
1912
1912
|
}
|
|
1913
|
-
},
|
|
1913
|
+
}, Sr = "__STORYBOOK_ADDONS_PREVIEW";
|
|
1914
1914
|
function Bn() {
|
|
1915
|
-
return
|
|
1915
|
+
return br[Sr] || (br[Sr] = new Tr()), br[Sr];
|
|
1916
1916
|
}
|
|
1917
1917
|
n(Bn, "getAddonsStore");
|
|
1918
1918
|
var _ = Bn();
|
|
@@ -1928,7 +1928,7 @@ import { logger as Ae } from "storybook/internal/client-logger";
|
|
|
1928
1928
|
import {
|
|
1929
1929
|
FORCE_RE_RENDER as Gn,
|
|
1930
1930
|
RESET_STORY_ARGS as Un,
|
|
1931
|
-
STORY_RENDERED as
|
|
1931
|
+
STORY_RENDERED as lt,
|
|
1932
1932
|
UPDATE_GLOBALS as Hn,
|
|
1933
1933
|
UPDATE_STORY_ARGS as Vn
|
|
1934
1934
|
} from "storybook/internal/core-events";
|
|
@@ -1976,13 +1976,13 @@ var re = class {
|
|
|
1976
1976
|
}), this.prevEffects = this.currentEffects, this.currentEffects = [];
|
|
1977
1977
|
}
|
|
1978
1978
|
addRenderListeners() {
|
|
1979
|
-
this.removeRenderListeners(), _.getChannel().on(
|
|
1979
|
+
this.removeRenderListeners(), _.getChannel().on(lt, this.renderListener);
|
|
1980
1980
|
}
|
|
1981
1981
|
removeRenderListeners() {
|
|
1982
|
-
_.getChannel().removeListener(
|
|
1982
|
+
_.getChannel().removeListener(lt, this.renderListener);
|
|
1983
1983
|
}
|
|
1984
1984
|
};
|
|
1985
|
-
function
|
|
1985
|
+
function ct(r) {
|
|
1986
1986
|
let e = /* @__PURE__ */ n((...t) => {
|
|
1987
1987
|
let { hooks: o } = typeof t[0] == "function" ? t[1] : t[0], s = o.currentPhase, i = o.currentHooks, a = o.nextHookIndex, l = o.currentDecoratorName;
|
|
1988
1988
|
o.currentDecoratorName = r.name, o.prevMountedDecorators.has(r) ? (o.currentPhase = "UPDATE", o.currentHooks = o.hookListsMap.get(r) || []) :
|
|
@@ -1999,39 +1999,39 @@ function lt(r) {
|
|
|
1999
1999
|
}, "hookified");
|
|
2000
2000
|
return e.originalFn = r, e;
|
|
2001
2001
|
}
|
|
2002
|
-
n(
|
|
2003
|
-
var
|
|
2002
|
+
n(ct, "hookify");
|
|
2003
|
+
var xr = 0, Wn = 25, Rr = /* @__PURE__ */ n((r) => (e, t) => {
|
|
2004
2004
|
let o = r(
|
|
2005
|
-
|
|
2006
|
-
t.map((s) =>
|
|
2005
|
+
ct(e),
|
|
2006
|
+
t.map((s) => ct(s))
|
|
2007
2007
|
);
|
|
2008
2008
|
return (s) => {
|
|
2009
2009
|
let { hooks: i } = s;
|
|
2010
2010
|
i.prevMountedDecorators ??= /* @__PURE__ */ new Set(), i.mountedDecorators = /* @__PURE__ */ new Set([e, ...t]), i.currentContext = s, i.
|
|
2011
2011
|
hasUpdates = !1;
|
|
2012
2012
|
let a = o(s);
|
|
2013
|
-
for (
|
|
2014
|
-
if (i.hasUpdates = !1, i.currentEffects = [], a = o(s),
|
|
2013
|
+
for (xr = 1; i.hasUpdates; )
|
|
2014
|
+
if (i.hasUpdates = !1, i.currentEffects = [], a = o(s), xr += 1, xr > Wn)
|
|
2015
2015
|
throw new Error(
|
|
2016
2016
|
"Too many re-renders. Storybook limits the number of renders to prevent an infinite loop."
|
|
2017
2017
|
);
|
|
2018
2018
|
return i.addRenderListeners(), a;
|
|
2019
2019
|
};
|
|
2020
|
-
}, "applyHooks"), $n = /* @__PURE__ */ n((r, e) => r.length === e.length && r.every((t, o) => t === e[o]), "areDepsEqual"),
|
|
2020
|
+
}, "applyHooks"), $n = /* @__PURE__ */ n((r, e) => r.length === e.length && r.every((t, o) => t === e[o]), "areDepsEqual"), wr = /* @__PURE__ */ n(
|
|
2021
2021
|
() => new Error("Storybook preview hooks can only be called inside decorators and story functions."), "invalidHooksError");
|
|
2022
|
-
function
|
|
2022
|
+
function dt() {
|
|
2023
2023
|
return ze.STORYBOOK_HOOKS_CONTEXT || null;
|
|
2024
2024
|
}
|
|
2025
|
-
n(
|
|
2026
|
-
function
|
|
2027
|
-
let r =
|
|
2025
|
+
n(dt, "getHooksContextOrNull");
|
|
2026
|
+
function Er() {
|
|
2027
|
+
let r = dt();
|
|
2028
2028
|
if (r == null)
|
|
2029
|
-
throw
|
|
2029
|
+
throw wr();
|
|
2030
2030
|
return r;
|
|
2031
2031
|
}
|
|
2032
|
-
n(
|
|
2032
|
+
n(Er, "getHooksContextOrThrow");
|
|
2033
2033
|
function Yn(r, e, t) {
|
|
2034
|
-
let o =
|
|
2034
|
+
let o = Er();
|
|
2035
2035
|
if (o.currentPhase === "MOUNT") {
|
|
2036
2036
|
t != null && !Array.isArray(t) && Ae.warn(
|
|
2037
2037
|
`${r} received a final argument that is not an array (instead, received ${t}). When specified, the final argument must be an array.`
|
|
@@ -2054,7 +2054,7 @@ s type cannot change between renders.`
|
|
|
2054
2054
|
Previous: ${s.deps}
|
|
2055
2055
|
Incoming: ${t}`), (t == null || s.deps == null || !$n(t, s.deps)) && (e(s), s.deps = t), s;
|
|
2056
2056
|
}
|
|
2057
|
-
throw
|
|
2057
|
+
throw wr();
|
|
2058
2058
|
}
|
|
2059
2059
|
n(Yn, "useHook");
|
|
2060
2060
|
function Ge(r, e, t) {
|
|
@@ -2076,16 +2076,16 @@ function Ce(r, e) {
|
|
|
2076
2076
|
return Ge("useCallback", () => r, e);
|
|
2077
2077
|
}
|
|
2078
2078
|
n(Ce, "useCallback");
|
|
2079
|
-
function
|
|
2079
|
+
function pt(r, e) {
|
|
2080
2080
|
return Ge(r, () => ({ current: e }), []);
|
|
2081
2081
|
}
|
|
2082
|
-
n(
|
|
2082
|
+
n(pt, "useRefLike");
|
|
2083
2083
|
function Xn(r) {
|
|
2084
|
-
return
|
|
2084
|
+
return pt("useRef", r);
|
|
2085
2085
|
}
|
|
2086
2086
|
n(Xn, "useRef");
|
|
2087
2087
|
function Jn() {
|
|
2088
|
-
let r =
|
|
2088
|
+
let r = dt();
|
|
2089
2089
|
if (r != null && r.currentPhase !== "NONE")
|
|
2090
2090
|
r.hasUpdates = !0;
|
|
2091
2091
|
else
|
|
@@ -2096,8 +2096,8 @@ function Jn() {
|
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
2098
2098
|
n(Jn, "triggerUpdate");
|
|
2099
|
-
function
|
|
2100
|
-
let t =
|
|
2099
|
+
function ut(r, e) {
|
|
2100
|
+
let t = pt(
|
|
2101
2101
|
r,
|
|
2102
2102
|
// @ts-expect-error S type should never be function, but there's no way to tell that to TypeScript
|
|
2103
2103
|
typeof e == "function" ? e() : e
|
|
@@ -2106,24 +2106,24 @@ function pt(r, e) {
|
|
|
2106
2106
|
}, "setState");
|
|
2107
2107
|
return [t.current, o];
|
|
2108
2108
|
}
|
|
2109
|
-
n(
|
|
2109
|
+
n(ut, "useStateLike");
|
|
2110
2110
|
function Qn(r) {
|
|
2111
|
-
return
|
|
2111
|
+
return ut("useState", r);
|
|
2112
2112
|
}
|
|
2113
2113
|
n(Qn, "useState");
|
|
2114
2114
|
function Zn(r, e, t) {
|
|
2115
|
-
let o = t != null ? () => t(e) : e, [s, i] =
|
|
2115
|
+
let o = t != null ? () => t(e) : e, [s, i] = ut("useReducer", o);
|
|
2116
2116
|
return [s, /* @__PURE__ */ n((l) => i((c) => r(c, l)), "dispatch")];
|
|
2117
2117
|
}
|
|
2118
2118
|
n(Zn, "useReducer");
|
|
2119
|
-
function
|
|
2120
|
-
let t =
|
|
2119
|
+
function ft(r, e) {
|
|
2120
|
+
let t = Er(), o = Ge("useEffect", () => ({ create: r }), e);
|
|
2121
2121
|
t.currentEffects.includes(o) || t.currentEffects.push(o);
|
|
2122
2122
|
}
|
|
2123
|
-
n(
|
|
2123
|
+
n(ft, "useEffect");
|
|
2124
2124
|
function es(r, e = []) {
|
|
2125
2125
|
let t = _.getChannel();
|
|
2126
|
-
return
|
|
2126
|
+
return ft(() => (Object.entries(r).forEach(([o, s]) => t.on(o, s)), () => {
|
|
2127
2127
|
Object.entries(r).forEach(
|
|
2128
2128
|
([o, s]) => t.removeListener(o, s)
|
|
2129
2129
|
);
|
|
@@ -2131,9 +2131,9 @@ function es(r, e = []) {
|
|
|
2131
2131
|
}
|
|
2132
2132
|
n(es, "useChannel");
|
|
2133
2133
|
function Ue() {
|
|
2134
|
-
let { currentContext: r } =
|
|
2134
|
+
let { currentContext: r } = Er();
|
|
2135
2135
|
if (r == null)
|
|
2136
|
-
throw
|
|
2136
|
+
throw wr();
|
|
2137
2137
|
return r;
|
|
2138
2138
|
}
|
|
2139
2139
|
n(Ue, "useStoryContext");
|
|
@@ -2194,28 +2194,28 @@ import {
|
|
|
2194
2194
|
} from "storybook/internal/preview-errors";
|
|
2195
2195
|
|
|
2196
2196
|
// ../node_modules/es-toolkit/dist/function/noop.mjs
|
|
2197
|
-
function
|
|
2197
|
+
function yt() {
|
|
2198
2198
|
}
|
|
2199
|
-
n(
|
|
2199
|
+
n(yt, "noop");
|
|
2200
2200
|
|
|
2201
2201
|
// ../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
2202
|
-
function
|
|
2202
|
+
function Ar(r) {
|
|
2203
2203
|
return Object.getOwnPropertySymbols(r).filter((e) => Object.prototype.propertyIsEnumerable.call(r, e));
|
|
2204
2204
|
}
|
|
2205
|
-
n(
|
|
2205
|
+
n(Ar, "getSymbols");
|
|
2206
2206
|
|
|
2207
2207
|
// ../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
2208
|
-
function
|
|
2208
|
+
function Cr(r) {
|
|
2209
2209
|
return r == null ? r === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(r);
|
|
2210
2210
|
}
|
|
2211
|
-
n(
|
|
2211
|
+
n(Cr, "getTag");
|
|
2212
2212
|
|
|
2213
2213
|
// ../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
2214
|
-
var
|
|
2215
|
-
t Symbol]",
|
|
2216
|
-
rrayBuffer]", He = "[object Object]",
|
|
2217
|
-
dArray]",
|
|
2218
|
-
Int16Array]",
|
|
2214
|
+
var mt = "[object RegExp]", ht = "[object String]", gt = "[object Number]", bt = "[object Boolean]", vr = "[object Arguments]", St = "[objec\
|
|
2215
|
+
t Symbol]", Tt = "[object Date]", xt = "[object Map]", Rt = "[object Set]", wt = "[object Array]", Et = "[object Function]", At = "[object A\
|
|
2216
|
+
rrayBuffer]", He = "[object Object]", Ct = "[object Error]", vt = "[object DataView]", Pt = "[object Uint8Array]", Ft = "[object Uint8Clampe\
|
|
2217
|
+
dArray]", It = "[object Uint16Array]", Ot = "[object Uint32Array]", Dt = "[object BigUint64Array]", kt = "[object Int8Array]", jt = "[object\
|
|
2218
|
+
Int16Array]", Mt = "[object Int32Array]", _t = "[object BigInt64Array]", Lt = "[object Float32Array]", Nt = "[object Float64Array]";
|
|
2219
2219
|
|
|
2220
2220
|
// ../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
2221
2221
|
function k(r) {
|
|
@@ -2239,7 +2239,7 @@ function H(r, e) {
|
|
|
2239
2239
|
n(H, "mapValues");
|
|
2240
2240
|
|
|
2241
2241
|
// ../node_modules/es-toolkit/dist/object/pickBy.mjs
|
|
2242
|
-
function
|
|
2242
|
+
function Pr(r, e) {
|
|
2243
2243
|
let t = {}, o = Object.keys(r);
|
|
2244
2244
|
for (let s = 0; s < o.length; s++) {
|
|
2245
2245
|
let i = o[s], a = r[i];
|
|
@@ -2247,19 +2247,19 @@ function vr(r, e) {
|
|
|
2247
2247
|
}
|
|
2248
2248
|
return t;
|
|
2249
2249
|
}
|
|
2250
|
-
n(
|
|
2250
|
+
n(Pr, "pickBy");
|
|
2251
2251
|
|
|
2252
2252
|
// ../node_modules/es-toolkit/dist/compat/util/eq.mjs
|
|
2253
|
-
function
|
|
2253
|
+
function qt(r, e) {
|
|
2254
2254
|
return r === e || Number.isNaN(r) && Number.isNaN(e);
|
|
2255
2255
|
}
|
|
2256
|
-
n(
|
|
2256
|
+
n(qt, "eq");
|
|
2257
2257
|
|
|
2258
2258
|
// ../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
|
|
2259
|
-
function
|
|
2259
|
+
function Bt(r, e, t) {
|
|
2260
2260
|
return ve(r, e, void 0, void 0, void 0, void 0, t);
|
|
2261
2261
|
}
|
|
2262
|
-
n(
|
|
2262
|
+
n(Bt, "isEqualWith");
|
|
2263
2263
|
function ve(r, e, t, o, s, i, a) {
|
|
2264
2264
|
let l = a(r, e, t, o, s, i);
|
|
2265
2265
|
if (l !== void 0)
|
|
@@ -2285,23 +2285,23 @@ n(ve, "isEqualWithImpl");
|
|
|
2285
2285
|
function Pe(r, e, t, o) {
|
|
2286
2286
|
if (Object.is(r, e))
|
|
2287
2287
|
return !0;
|
|
2288
|
-
let s =
|
|
2289
|
-
if (s ===
|
|
2288
|
+
let s = Cr(r), i = Cr(e);
|
|
2289
|
+
if (s === vr && (s = He), i === vr && (i = He), s !== i)
|
|
2290
2290
|
return !1;
|
|
2291
2291
|
switch (s) {
|
|
2292
|
-
case
|
|
2292
|
+
case ht:
|
|
2293
2293
|
return r.toString() === e.toString();
|
|
2294
|
-
case
|
|
2294
|
+
case gt: {
|
|
2295
2295
|
let c = r.valueOf(), d = e.valueOf();
|
|
2296
|
-
return
|
|
2296
|
+
return qt(c, d);
|
|
2297
2297
|
}
|
|
2298
|
-
case gt:
|
|
2299
|
-
case St:
|
|
2300
2298
|
case bt:
|
|
2299
|
+
case Tt:
|
|
2300
|
+
case St:
|
|
2301
2301
|
return Object.is(r.valueOf(), e.valueOf());
|
|
2302
|
-
case
|
|
2302
|
+
case mt:
|
|
2303
2303
|
return r.source === e.source && r.flags === e.flags;
|
|
2304
|
-
case
|
|
2304
|
+
case Et:
|
|
2305
2305
|
return r === e;
|
|
2306
2306
|
}
|
|
2307
2307
|
t = t ?? /* @__PURE__ */ new Map();
|
|
@@ -2311,7 +2311,7 @@ function Pe(r, e, t, o) {
|
|
|
2311
2311
|
t.set(r, e), t.set(e, r);
|
|
2312
2312
|
try {
|
|
2313
2313
|
switch (s) {
|
|
2314
|
-
case
|
|
2314
|
+
case xt: {
|
|
2315
2315
|
if (r.size !== e.size)
|
|
2316
2316
|
return !1;
|
|
2317
2317
|
for (let [c, d] of r.entries())
|
|
@@ -2319,20 +2319,19 @@ function Pe(r, e, t, o) {
|
|
|
2319
2319
|
return !1;
|
|
2320
2320
|
return !0;
|
|
2321
2321
|
}
|
|
2322
|
-
case
|
|
2322
|
+
case Rt: {
|
|
2323
2323
|
if (r.size !== e.size)
|
|
2324
2324
|
return !1;
|
|
2325
2325
|
let c = Array.from(r.values()), d = Array.from(e.values());
|
|
2326
2326
|
for (let p = 0; p < c.length; p++) {
|
|
2327
|
-
let u = c[p], y = d.findIndex((
|
|
2327
|
+
let u = c[p], y = d.findIndex((h) => ve(u, h, void 0, r, e, t, o));
|
|
2328
2328
|
if (y === -1)
|
|
2329
2329
|
return !1;
|
|
2330
2330
|
d.splice(y, 1);
|
|
2331
2331
|
}
|
|
2332
2332
|
return !0;
|
|
2333
2333
|
}
|
|
2334
|
-
case
|
|
2335
|
-
case vt:
|
|
2334
|
+
case wt:
|
|
2336
2335
|
case Pt:
|
|
2337
2336
|
case Ft:
|
|
2338
2337
|
case It:
|
|
@@ -2342,7 +2341,8 @@ function Pe(r, e, t, o) {
|
|
|
2342
2341
|
case jt:
|
|
2343
2342
|
case Mt:
|
|
2344
2343
|
case _t:
|
|
2345
|
-
case Lt:
|
|
2344
|
+
case Lt:
|
|
2345
|
+
case Nt: {
|
|
2346
2346
|
if (typeof Buffer < "u" && Buffer.isBuffer(r) !== Buffer.isBuffer(e) || r.length !== e.length)
|
|
2347
2347
|
return !1;
|
|
2348
2348
|
for (let c = 0; c < r.length; c++)
|
|
@@ -2350,24 +2350,24 @@ function Pe(r, e, t, o) {
|
|
|
2350
2350
|
return !1;
|
|
2351
2351
|
return !0;
|
|
2352
2352
|
}
|
|
2353
|
-
case
|
|
2353
|
+
case At:
|
|
2354
2354
|
return r.byteLength !== e.byteLength ? !1 : Pe(new Uint8Array(r), new Uint8Array(e), t, o);
|
|
2355
|
-
case
|
|
2355
|
+
case vt:
|
|
2356
2356
|
return r.byteLength !== e.byteLength || r.byteOffset !== e.byteOffset ? !1 : Pe(new Uint8Array(r), new Uint8Array(e), t, o);
|
|
2357
|
-
case
|
|
2357
|
+
case Ct:
|
|
2358
2358
|
return r.name === e.name && r.message === e.message;
|
|
2359
2359
|
case He: {
|
|
2360
2360
|
if (!(Pe(r.constructor, e.constructor, t, o) || k(r) && k(e)))
|
|
2361
2361
|
return !1;
|
|
2362
|
-
let d = [...Object.keys(r), ...
|
|
2362
|
+
let d = [...Object.keys(r), ...Ar(r)], p = [...Object.keys(e), ...Ar(e)];
|
|
2363
2363
|
if (d.length !== p.length)
|
|
2364
2364
|
return !1;
|
|
2365
2365
|
for (let u = 0; u < d.length; u++) {
|
|
2366
|
-
let y = d[u],
|
|
2366
|
+
let y = d[u], h = r[y];
|
|
2367
2367
|
if (!Object.hasOwn(e, y))
|
|
2368
2368
|
return !1;
|
|
2369
|
-
let
|
|
2370
|
-
if (!ve(
|
|
2369
|
+
let g = e[y];
|
|
2370
|
+
if (!ve(h, g, y, r, e, t, o))
|
|
2371
2371
|
return !1;
|
|
2372
2372
|
}
|
|
2373
2373
|
return !0;
|
|
@@ -2382,47 +2382,47 @@ function Pe(r, e, t, o) {
|
|
|
2382
2382
|
n(Pe, "areObjectsEqual");
|
|
2383
2383
|
|
|
2384
2384
|
// ../node_modules/es-toolkit/dist/predicate/isEqual.mjs
|
|
2385
|
-
function
|
|
2386
|
-
return
|
|
2385
|
+
function Fr(r, e) {
|
|
2386
|
+
return Bt(r, e, yt);
|
|
2387
2387
|
}
|
|
2388
|
-
n(
|
|
2388
|
+
n(Fr, "isEqual");
|
|
2389
2389
|
|
|
2390
2390
|
// src/preview-api/modules/store/StoryStore.ts
|
|
2391
|
-
var
|
|
2391
|
+
var Ze = ue(Or(), 1);
|
|
2392
2392
|
|
|
2393
2393
|
// src/preview-api/core-annotations.ts
|
|
2394
|
-
import
|
|
2395
|
-
import
|
|
2396
|
-
import
|
|
2397
|
-
import
|
|
2398
|
-
import
|
|
2399
|
-
import
|
|
2400
|
-
import
|
|
2401
|
-
import
|
|
2394
|
+
import Gt from "storybook/internal/component-testing/preview";
|
|
2395
|
+
import Ut from "storybook/actions/preview";
|
|
2396
|
+
import Ht from "storybook/backgrounds/preview";
|
|
2397
|
+
import Vt from "storybook/highlight/preview";
|
|
2398
|
+
import Wt from "storybook/measure/preview";
|
|
2399
|
+
import $t from "storybook/outline/preview";
|
|
2400
|
+
import Yt from "storybook/test/preview";
|
|
2401
|
+
import Kt from "storybook/viewport/preview";
|
|
2402
2402
|
function te() {
|
|
2403
2403
|
return [
|
|
2404
2404
|
// @ts-expect-error CJS fallback
|
|
2405
|
-
(
|
|
2406
|
-
// @ts-expect-error CJS fallback
|
|
2407
|
-
(Ut.default ?? Ut)(),
|
|
2405
|
+
(Wt.default ?? Wt)(),
|
|
2408
2406
|
// @ts-expect-error CJS fallback
|
|
2409
2407
|
(Ht.default ?? Ht)(),
|
|
2410
2408
|
// @ts-expect-error CJS fallback
|
|
2411
|
-
(
|
|
2409
|
+
(Vt.default ?? Vt)(),
|
|
2412
2410
|
// @ts-expect-error CJS fallback
|
|
2413
|
-
(
|
|
2411
|
+
($t.default ?? $t)(),
|
|
2414
2412
|
// @ts-expect-error CJS fallback
|
|
2415
|
-
(
|
|
2413
|
+
(Kt.default ?? Kt)(),
|
|
2416
2414
|
// @ts-expect-error CJS fallback
|
|
2417
|
-
(
|
|
2415
|
+
(Ut.default ?? Ut)(),
|
|
2416
|
+
// @ts-expect-error CJS fallback
|
|
2417
|
+
(Gt.default ?? Gt)(),
|
|
2418
2418
|
// @ts-expect-error CJS fallback
|
|
2419
|
-
(
|
|
2419
|
+
(Yt.default ?? Yt)()
|
|
2420
2420
|
];
|
|
2421
2421
|
}
|
|
2422
2422
|
n(te, "getCoreAnnotations");
|
|
2423
2423
|
|
|
2424
2424
|
// src/preview-api/modules/store/args.ts
|
|
2425
|
-
import { once as
|
|
2425
|
+
import { once as Dr } from "storybook/internal/client-logger";
|
|
2426
2426
|
|
|
2427
2427
|
// ../node_modules/ts-dedent/esm/index.js
|
|
2428
2428
|
function P(r) {
|
|
@@ -2451,8 +2451,8 @@ function P(r) {
|
|
|
2451
2451
|
var d = a.match(/(?:^|\n)( *)$/), p = d ? d[1] : "", u = l;
|
|
2452
2452
|
typeof l == "string" && l.includes(`
|
|
2453
2453
|
`) && (u = String(l).split(`
|
|
2454
|
-
`).map(function(y,
|
|
2455
|
-
return
|
|
2454
|
+
`).map(function(y, h) {
|
|
2455
|
+
return h === 0 ? y : "" + p + y;
|
|
2456
2456
|
}).join(`
|
|
2457
2457
|
`)), a += u + o[c + 1];
|
|
2458
2458
|
}), a;
|
|
@@ -2460,7 +2460,7 @@ function P(r) {
|
|
|
2460
2460
|
n(P, "dedent");
|
|
2461
2461
|
|
|
2462
2462
|
// src/preview-api/modules/store/args.ts
|
|
2463
|
-
var fe = Symbol("incompatible"),
|
|
2463
|
+
var fe = Symbol("incompatible"), kr = /* @__PURE__ */ n((r, e) => {
|
|
2464
2464
|
let t = e.type;
|
|
2465
2465
|
if (r == null || !t || e.mapping)
|
|
2466
2466
|
return r;
|
|
@@ -2475,21 +2475,21 @@ var fe = Symbol("incompatible"), Dr = /* @__PURE__ */ n((r, e) => {
|
|
|
2475
2475
|
return String(r) === "true";
|
|
2476
2476
|
case "array":
|
|
2477
2477
|
return !t.value || !Array.isArray(r) ? fe : r.reduce((o, s, i) => {
|
|
2478
|
-
let a =
|
|
2478
|
+
let a = kr(s, { type: t.value });
|
|
2479
2479
|
return a !== fe && (o[i] = a), o;
|
|
2480
2480
|
}, new Array(r.length));
|
|
2481
2481
|
case "object":
|
|
2482
2482
|
return typeof r == "string" || typeof r == "number" ? r : !t.value || typeof r != "object" ? fe : Object.entries(r).reduce((o, [s, i]) => {
|
|
2483
|
-
let a =
|
|
2483
|
+
let a = kr(i, { type: t.value[s] });
|
|
2484
2484
|
return a === fe ? o : Object.assign(o, { [s]: a });
|
|
2485
2485
|
}, {});
|
|
2486
2486
|
default:
|
|
2487
2487
|
return fe;
|
|
2488
2488
|
}
|
|
2489
|
-
}, "map"),
|
|
2489
|
+
}, "map"), Xt = /* @__PURE__ */ n((r, e) => Object.entries(r).reduce((t, [o, s]) => {
|
|
2490
2490
|
if (!e[o])
|
|
2491
2491
|
return t;
|
|
2492
|
-
let i =
|
|
2492
|
+
let i = kr(s, e[o]);
|
|
2493
2493
|
return i === fe ? t : Object.assign(t, { [o]: i });
|
|
2494
2494
|
}, {}), "mapArgsToTypes"), Fe = /* @__PURE__ */ n((r, e) => Array.isArray(r) && Array.isArray(e) ? e.reduce(
|
|
2495
2495
|
(t, o, s) => (t[s] = Fe(r[s], e[s]), t),
|
|
@@ -2501,20 +2501,20 @@ var fe = Symbol("incompatible"), Dr = /* @__PURE__ */ n((r, e) => {
|
|
|
2501
2501
|
} else
|
|
2502
2502
|
t[o] = r[o];
|
|
2503
2503
|
return t;
|
|
2504
|
-
}, {}), "combineArgs"),
|
|
2504
|
+
}, {}), "combineArgs"), Jt = /* @__PURE__ */ n((r, e) => Object.entries(e).reduce((t, [o, { options: s }]) => {
|
|
2505
2505
|
function i() {
|
|
2506
2506
|
return o in r && (t[o] = r[o]), t;
|
|
2507
2507
|
}
|
|
2508
2508
|
if (n(i, "allowArg"), !s)
|
|
2509
2509
|
return i();
|
|
2510
2510
|
if (!Array.isArray(s))
|
|
2511
|
-
return
|
|
2511
|
+
return Dr.error(P`
|
|
2512
2512
|
Invalid argType: '${o}.options' should be an array.
|
|
2513
2513
|
|
|
2514
2514
|
More info: https://storybook.js.org/docs/api/arg-types
|
|
2515
2515
|
`), i();
|
|
2516
2516
|
if (s.some((u) => u && ["object", "function"].includes(typeof u)))
|
|
2517
|
-
return
|
|
2517
|
+
return Dr.error(P`
|
|
2518
2518
|
Invalid argType: '${o}.options' should only contain primitives. Use a 'mapping' for complex values.
|
|
2519
2519
|
|
|
2520
2520
|
More info: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
|
|
@@ -2523,11 +2523,11 @@ var fe = Symbol("incompatible"), Dr = /* @__PURE__ */ n((r, e) => {
|
|
|
2523
2523
|
if (r[o] === void 0 || s.includes(r[o]) || c)
|
|
2524
2524
|
return i();
|
|
2525
2525
|
let d = a ? `${o}[${l}]` : o, p = s.map((u) => typeof u == "string" ? `'${u}'` : String(u)).join(", ");
|
|
2526
|
-
return
|
|
2526
|
+
return Dr.warn(`Received illegal value for '${d}'. Supported options: ${p}`), t;
|
|
2527
2527
|
}, {}), "validateOptions"), oe = Symbol("Deeply equal"), ye = /* @__PURE__ */ n((r, e) => {
|
|
2528
2528
|
if (typeof r != typeof e)
|
|
2529
2529
|
return e;
|
|
2530
|
-
if (
|
|
2530
|
+
if (Fr(r, e))
|
|
2531
2531
|
return oe;
|
|
2532
2532
|
if (Array.isArray(r) && Array.isArray(e)) {
|
|
2533
2533
|
let t = e.reduce((o, s, i) => {
|
|
@@ -2540,18 +2540,18 @@ var fe = Symbol("incompatible"), Dr = /* @__PURE__ */ n((r, e) => {
|
|
|
2540
2540
|
let s = ye(r?.[o], e?.[o]);
|
|
2541
2541
|
return s === oe ? t : Object.assign(t, { [o]: s });
|
|
2542
2542
|
}, {}) : e;
|
|
2543
|
-
}, "deepDiff"),
|
|
2544
|
-
function
|
|
2543
|
+
}, "deepDiff"), jr = "UNTARGETED";
|
|
2544
|
+
function Qt({
|
|
2545
2545
|
args: r,
|
|
2546
2546
|
argTypes: e
|
|
2547
2547
|
}) {
|
|
2548
2548
|
let t = {};
|
|
2549
2549
|
return Object.entries(r).forEach(([o, s]) => {
|
|
2550
|
-
let { target: i =
|
|
2550
|
+
let { target: i = jr } = e[o] || {};
|
|
2551
2551
|
t[i] = t[i] || {}, t[i][o] = s;
|
|
2552
2552
|
}), t;
|
|
2553
2553
|
}
|
|
2554
|
-
n(
|
|
2554
|
+
n(Qt, "groupArgsByTarget");
|
|
2555
2555
|
|
|
2556
2556
|
// src/preview-api/modules/store/ArgsStore.ts
|
|
2557
2557
|
function ss(r) {
|
|
@@ -2580,11 +2580,11 @@ var Ve = class {
|
|
|
2580
2580
|
}
|
|
2581
2581
|
}
|
|
2582
2582
|
updateFromDelta(e, t) {
|
|
2583
|
-
let o =
|
|
2583
|
+
let o = Jt(t, e.argTypes);
|
|
2584
2584
|
this.argsByStoryId[e.id] = Fe(this.argsByStoryId[e.id], o);
|
|
2585
2585
|
}
|
|
2586
2586
|
updateFromPersisted(e, t) {
|
|
2587
|
-
let o =
|
|
2587
|
+
let o = Xt(t, e.argTypes);
|
|
2588
2588
|
return this.updateFromDelta(e, o);
|
|
2589
2589
|
}
|
|
2590
2590
|
update(e, t) {
|
|
@@ -2601,11 +2601,11 @@ var Ve = class {
|
|
|
2601
2601
|
import { logger as is } from "storybook/internal/client-logger";
|
|
2602
2602
|
|
|
2603
2603
|
// src/preview-api/modules/store/csf/getValuesFromArgTypes.ts
|
|
2604
|
-
var
|
|
2604
|
+
var We = /* @__PURE__ */ n((r = {}) => Object.entries(r).reduce((e, [t, { defaultValue: o }]) => (typeof o < "u" && (e[t] = o), e), {}), "ge\
|
|
2605
2605
|
tValuesFromArgTypes");
|
|
2606
2606
|
|
|
2607
2607
|
// src/preview-api/modules/store/GlobalsStore.ts
|
|
2608
|
-
var
|
|
2608
|
+
var $e = class {
|
|
2609
2609
|
static {
|
|
2610
2610
|
n(this, "GlobalsStore");
|
|
2611
2611
|
}
|
|
@@ -2618,7 +2618,7 @@ var We = class {
|
|
|
2618
2618
|
set({ globals: e = {}, globalTypes: t = {} }) {
|
|
2619
2619
|
let o = this.initialGlobals && ye(this.initialGlobals, this.globals);
|
|
2620
2620
|
this.allowedGlobalNames = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
2621
|
-
let s =
|
|
2621
|
+
let s = We(t);
|
|
2622
2622
|
this.initialGlobals = { ...s, ...e }, this.globals = this.initialGlobals, o && o !== oe && this.updateFromPersisted(o);
|
|
2623
2623
|
}
|
|
2624
2624
|
filterAllowedGlobals(e) {
|
|
@@ -2639,14 +2639,14 @@ var We = class {
|
|
|
2639
2639
|
};
|
|
2640
2640
|
|
|
2641
2641
|
// src/preview-api/modules/store/StoryIndexStore.ts
|
|
2642
|
-
var Zt = ue(
|
|
2642
|
+
var Zt = ue(Or(), 1);
|
|
2643
2643
|
import { MissingStoryAfterHmrError as as } from "storybook/internal/preview-errors";
|
|
2644
2644
|
var ls = (0, Zt.default)(1)(
|
|
2645
2645
|
(r) => Object.values(r).reduce(
|
|
2646
2646
|
(e, t) => (e[t.importPath] = e[t.importPath] || t, e),
|
|
2647
2647
|
{}
|
|
2648
2648
|
)
|
|
2649
|
-
),
|
|
2649
|
+
), Ye = class {
|
|
2650
2650
|
static {
|
|
2651
2651
|
n(this, "StoryIndexStore");
|
|
2652
2652
|
}
|
|
@@ -2704,13 +2704,13 @@ function me(r, e, t) {
|
|
|
2704
2704
|
...v(o.decorators),
|
|
2705
2705
|
...v(i?.decorators)
|
|
2706
2706
|
], d = { ...i?.parameters, ...o.parameters }, p = { ...i?.args, ...o.args }, u = { ...i?.argTypes, ...o.argTypes }, y = [...v(o.loaders), ...v(
|
|
2707
|
-
i?.loaders)],
|
|
2707
|
+
i?.loaders)], h = [
|
|
2708
2708
|
...v(o.beforeEach),
|
|
2709
2709
|
...v(i?.beforeEach)
|
|
2710
|
-
],
|
|
2710
|
+
], g = [
|
|
2711
2711
|
...v(o.experimental_afterEach),
|
|
2712
2712
|
...v(i?.experimental_afterEach)
|
|
2713
|
-
], { render:
|
|
2713
|
+
], { render: b, play: m, tags: T = [], globals: x = {} } = o, f = d.__id || ms(t.id, a);
|
|
2714
2714
|
return {
|
|
2715
2715
|
moduleExport: e,
|
|
2716
2716
|
id: f,
|
|
@@ -2721,12 +2721,12 @@ function me(r, e, t) {
|
|
|
2721
2721
|
args: p,
|
|
2722
2722
|
argTypes: ne(u),
|
|
2723
2723
|
loaders: y,
|
|
2724
|
-
beforeEach:
|
|
2725
|
-
experimental_afterEach:
|
|
2726
|
-
globals:
|
|
2727
|
-
...
|
|
2724
|
+
beforeEach: h,
|
|
2725
|
+
experimental_afterEach: g,
|
|
2726
|
+
globals: x,
|
|
2727
|
+
...b && { render: b },
|
|
2728
2728
|
...s && { userStoryFn: s },
|
|
2729
|
-
...
|
|
2729
|
+
...m && { play: m }
|
|
2730
2730
|
};
|
|
2731
2731
|
}
|
|
2732
2732
|
n(me, "normalizeStory");
|
|
@@ -2765,19 +2765,19 @@ var Ss = /* @__PURE__ */ n((r) => {
|
|
|
2765
2765
|
}, "checkGlobals"), Ts = /* @__PURE__ */ n((r) => {
|
|
2766
2766
|
let { options: e } = r;
|
|
2767
2767
|
e?.storySort && ro.error("The storySort option parameter can only be set globally");
|
|
2768
|
-
}, "checkStorySort"),
|
|
2768
|
+
}, "checkStorySort"), Ke = /* @__PURE__ */ n((r) => {
|
|
2769
2769
|
r && (Ss(r), Ts(r));
|
|
2770
2770
|
}, "checkDisallowedParameters");
|
|
2771
2771
|
function to(r, e, t) {
|
|
2772
2772
|
let { default: o, __namedExportsOrder: s, ...i } = r, a = Object.values(i)[0];
|
|
2773
2773
|
if (bs(a)) {
|
|
2774
2774
|
let d = Ie(a.meta.input, t, e);
|
|
2775
|
-
|
|
2775
|
+
Ke(d.parameters);
|
|
2776
2776
|
let p = { meta: d, stories: {}, moduleExports: r };
|
|
2777
2777
|
return Object.keys(i).forEach((u) => {
|
|
2778
2778
|
if (eo(u, d)) {
|
|
2779
2779
|
let y = me(u, i[u].input, d);
|
|
2780
|
-
|
|
2780
|
+
Ke(y.parameters), p.stories[y.id] = y;
|
|
2781
2781
|
}
|
|
2782
2782
|
}), p.projectAnnotations = a.meta.preview.composed, p;
|
|
2783
2783
|
}
|
|
@@ -2786,12 +2786,12 @@ function to(r, e, t) {
|
|
|
2786
2786
|
t,
|
|
2787
2787
|
e
|
|
2788
2788
|
);
|
|
2789
|
-
|
|
2789
|
+
Ke(l.parameters);
|
|
2790
2790
|
let c = { meta: l, stories: {}, moduleExports: r };
|
|
2791
2791
|
return Object.keys(i).forEach((d) => {
|
|
2792
2792
|
if (eo(d, l)) {
|
|
2793
2793
|
let p = me(d, i[d], l);
|
|
2794
|
-
|
|
2794
|
+
Ke(p.parameters), c.stories[p.id] = p;
|
|
2795
2795
|
}
|
|
2796
2796
|
}), c;
|
|
2797
2797
|
}
|
|
@@ -2856,7 +2856,7 @@ function io({
|
|
|
2856
2856
|
return d;
|
|
2857
2857
|
}
|
|
2858
2858
|
n(io, "sanitizeStoryContextUpdate");
|
|
2859
|
-
function
|
|
2859
|
+
function Mr(r, e) {
|
|
2860
2860
|
let t = {}, o = /* @__PURE__ */ n((i) => (a) => {
|
|
2861
2861
|
if (!t.value)
|
|
2862
2862
|
throw new Error("Decorated function called without init");
|
|
@@ -2870,7 +2870,7 @@ function jr(r, e) {
|
|
|
2870
2870
|
);
|
|
2871
2871
|
return (i) => (t.value = i, s(i));
|
|
2872
2872
|
}
|
|
2873
|
-
n(
|
|
2873
|
+
n(Mr, "defaultDecorateStory");
|
|
2874
2874
|
|
|
2875
2875
|
// src/preview-api/modules/store/parameters.ts
|
|
2876
2876
|
var L = /* @__PURE__ */ n((...r) => {
|
|
@@ -2890,54 +2890,54 @@ function Oe(r, e, t) {
|
|
|
2890
2890
|
r,
|
|
2891
2891
|
e,
|
|
2892
2892
|
t
|
|
2893
|
-
), l = /* @__PURE__ */ n(async (
|
|
2893
|
+
), l = /* @__PURE__ */ n(async (w) => {
|
|
2894
2894
|
let A = {};
|
|
2895
2895
|
for (let F of [
|
|
2896
2896
|
v(t.loaders),
|
|
2897
2897
|
v(e.loaders),
|
|
2898
2898
|
v(r.loaders)
|
|
2899
2899
|
]) {
|
|
2900
|
-
if (
|
|
2900
|
+
if (w.abortSignal.aborted)
|
|
2901
2901
|
return A;
|
|
2902
|
-
let j = await Promise.all(F.map((N) => N(
|
|
2902
|
+
let j = await Promise.all(F.map((N) => N(w)));
|
|
2903
2903
|
Object.assign(A, ...j);
|
|
2904
2904
|
}
|
|
2905
2905
|
return A;
|
|
2906
|
-
}, "applyLoaders"), c = /* @__PURE__ */ n(async (
|
|
2906
|
+
}, "applyLoaders"), c = /* @__PURE__ */ n(async (w) => {
|
|
2907
2907
|
let A = new Array();
|
|
2908
2908
|
for (let F of [
|
|
2909
2909
|
...v(t.beforeEach),
|
|
2910
2910
|
...v(e.beforeEach),
|
|
2911
2911
|
...v(r.beforeEach)
|
|
2912
2912
|
]) {
|
|
2913
|
-
if (
|
|
2913
|
+
if (w.abortSignal.aborted)
|
|
2914
2914
|
return A;
|
|
2915
|
-
let j = await F(
|
|
2915
|
+
let j = await F(w);
|
|
2916
2916
|
j && A.push(j);
|
|
2917
2917
|
}
|
|
2918
2918
|
return A;
|
|
2919
|
-
}, "applyBeforeEach"), d = /* @__PURE__ */ n(async (
|
|
2919
|
+
}, "applyBeforeEach"), d = /* @__PURE__ */ n(async (w) => {
|
|
2920
2920
|
let A = [
|
|
2921
2921
|
...v(t.experimental_afterEach),
|
|
2922
2922
|
...v(e.experimental_afterEach),
|
|
2923
2923
|
...v(r.experimental_afterEach)
|
|
2924
2924
|
].reverse();
|
|
2925
2925
|
for (let F of A) {
|
|
2926
|
-
if (
|
|
2926
|
+
if (w.abortSignal.aborted)
|
|
2927
2927
|
return;
|
|
2928
|
-
await F(
|
|
2928
|
+
await F(w);
|
|
2929
2929
|
}
|
|
2930
|
-
}, "applyAfterEach"), p = /* @__PURE__ */ n((
|
|
2931
|
-
|
|
2930
|
+
}, "applyAfterEach"), p = /* @__PURE__ */ n((w) => w.originalStoryFn(w.args, w), "undecoratedStoryFn"), { applyDecorators: u = Mr, runStep: y } = t,
|
|
2931
|
+
h = [
|
|
2932
2932
|
...v(r?.decorators),
|
|
2933
2933
|
...v(e?.decorators),
|
|
2934
2934
|
...v(t?.decorators)
|
|
2935
|
-
],
|
|
2936
|
-
play ?? e?.play,
|
|
2937
|
-
if (!
|
|
2935
|
+
], g = r?.userStoryFn || r?.render || e.render || t.render, b = Rr(u)(p, h), m = /* @__PURE__ */ n((w) => b(w), "unboundStoryFn"), T = r?.
|
|
2936
|
+
play ?? e?.play, x = no(T);
|
|
2937
|
+
if (!g && !x)
|
|
2938
2938
|
throw new Es({ id: s });
|
|
2939
|
-
let f = /* @__PURE__ */ n((
|
|
2940
|
-
|
|
2939
|
+
let f = /* @__PURE__ */ n((w) => async () => (await w.renderToCanvas(), w.canvas), "defaultMount"), S = r.mount ?? e.mount ?? t.mount ?? f,
|
|
2940
|
+
R = t.testingLibraryRender;
|
|
2941
2941
|
return {
|
|
2942
2942
|
storyGlobals: {},
|
|
2943
2943
|
...a,
|
|
@@ -2945,28 +2945,28 @@ function Oe(r, e, t) {
|
|
|
2945
2945
|
id: s,
|
|
2946
2946
|
name: i,
|
|
2947
2947
|
story: i,
|
|
2948
|
-
originalStoryFn:
|
|
2948
|
+
originalStoryFn: g,
|
|
2949
2949
|
undecoratedStoryFn: p,
|
|
2950
|
-
unboundStoryFn:
|
|
2950
|
+
unboundStoryFn: m,
|
|
2951
2951
|
applyLoaders: l,
|
|
2952
2952
|
applyBeforeEach: c,
|
|
2953
2953
|
applyAfterEach: d,
|
|
2954
2954
|
playFunction: T,
|
|
2955
2955
|
runStep: y,
|
|
2956
|
-
mount:
|
|
2957
|
-
testingLibraryRender:
|
|
2956
|
+
mount: S,
|
|
2957
|
+
testingLibraryRender: R,
|
|
2958
2958
|
renderToCanvas: t.renderToCanvas,
|
|
2959
|
-
usesMount:
|
|
2959
|
+
usesMount: x
|
|
2960
2960
|
};
|
|
2961
2961
|
}
|
|
2962
2962
|
n(Oe, "prepareStory");
|
|
2963
|
-
function
|
|
2963
|
+
function _r(r, e, t) {
|
|
2964
2964
|
return {
|
|
2965
2965
|
...ao(void 0, r, e),
|
|
2966
2966
|
moduleExport: t
|
|
2967
2967
|
};
|
|
2968
2968
|
}
|
|
2969
|
-
n(
|
|
2969
|
+
n(_r, "prepareMeta");
|
|
2970
2970
|
function ao(r, e, t) {
|
|
2971
2971
|
let o = ["dev", "test"], s = Cs.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], i = Rs(
|
|
2972
2972
|
...o,
|
|
@@ -3013,37 +3013,37 @@ function ao(r, e, t) {
|
|
|
3013
3013
|
storyGlobals: u
|
|
3014
3014
|
};
|
|
3015
3015
|
y.argTypes = l.reduce(
|
|
3016
|
-
(T,
|
|
3016
|
+
(T, x) => x({ ...y, argTypes: T }),
|
|
3017
3017
|
y.argTypes
|
|
3018
3018
|
);
|
|
3019
|
-
let
|
|
3019
|
+
let h = { ...p };
|
|
3020
3020
|
y.initialArgs = [...c].reduce(
|
|
3021
|
-
(T,
|
|
3021
|
+
(T, x) => ({
|
|
3022
3022
|
...T,
|
|
3023
|
-
...
|
|
3023
|
+
...x({
|
|
3024
3024
|
...y,
|
|
3025
3025
|
initialArgs: T
|
|
3026
3026
|
})
|
|
3027
3027
|
}),
|
|
3028
|
-
|
|
3028
|
+
h
|
|
3029
3029
|
);
|
|
3030
|
-
let { name:
|
|
3031
|
-
return
|
|
3030
|
+
let { name: g, story: b, ...m } = y;
|
|
3031
|
+
return m;
|
|
3032
3032
|
}
|
|
3033
3033
|
n(ao, "preparePartialAnnotations");
|
|
3034
|
-
function
|
|
3034
|
+
function Xe(r) {
|
|
3035
3035
|
let { args: e } = r, t = {
|
|
3036
3036
|
...r,
|
|
3037
3037
|
allArgs: void 0,
|
|
3038
3038
|
argsByTarget: void 0
|
|
3039
3039
|
};
|
|
3040
3040
|
if (As.FEATURES?.argTypeTargetsV7) {
|
|
3041
|
-
let i =
|
|
3041
|
+
let i = Qt(r);
|
|
3042
3042
|
t = {
|
|
3043
3043
|
...r,
|
|
3044
3044
|
allArgs: r.args,
|
|
3045
3045
|
argsByTarget: i,
|
|
3046
|
-
args: i[
|
|
3046
|
+
args: i[jr] || {}
|
|
3047
3047
|
};
|
|
3048
3048
|
}
|
|
3049
3049
|
let o = Object.entries(t.args).reduce((i, [a, l]) => {
|
|
@@ -3060,11 +3060,11 @@ function Ke(r) {
|
|
|
3060
3060
|
}, {});
|
|
3061
3061
|
return { ...t, unmappedArgs: e, args: s };
|
|
3062
3062
|
}
|
|
3063
|
-
n(
|
|
3063
|
+
n(Xe, "prepareContext");
|
|
3064
3064
|
|
|
3065
3065
|
// src/preview-api/modules/store/inferArgTypes.ts
|
|
3066
3066
|
import { logger as vs } from "storybook/internal/client-logger";
|
|
3067
|
-
var
|
|
3067
|
+
var Lr = /* @__PURE__ */ n((r, e, t) => {
|
|
3068
3068
|
let o = typeof r;
|
|
3069
3069
|
switch (o) {
|
|
3070
3070
|
case "boolean":
|
|
@@ -3082,25 +3082,25 @@ var _r = /* @__PURE__ */ n((r, e, t) => {
|
|
|
3082
3082
|
Consider using the mapping feature or fully custom args:
|
|
3083
3083
|
- Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
|
|
3084
3084
|
- Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args
|
|
3085
|
-
`), { name: "other", value: "cyclic object" }) : (t.add(r), Array.isArray(r) ? { name: "array", value: r.length > 0 ?
|
|
3086
|
-
t)) : { name: "other", value: "unknown" } } : { name: "object", value: H(r, (i) =>
|
|
3087
|
-
}, "inferType"),
|
|
3085
|
+
`), { name: "other", value: "cyclic object" }) : (t.add(r), Array.isArray(r) ? { name: "array", value: r.length > 0 ? Lr(r[0], e, new Set(
|
|
3086
|
+
t)) : { name: "other", value: "unknown" } } : { name: "object", value: H(r, (i) => Lr(i, e, new Set(t))) }) : { name: "object", value: {} };
|
|
3087
|
+
}, "inferType"), Nr = /* @__PURE__ */ n((r) => {
|
|
3088
3088
|
let { id: e, argTypes: t = {}, initialArgs: o = {} } = r, s = H(o, (a, l) => ({
|
|
3089
3089
|
name: l,
|
|
3090
|
-
type:
|
|
3090
|
+
type: Lr(a, `${e}.${l}`, /* @__PURE__ */ new Set())
|
|
3091
3091
|
})), i = H(t, (a, l) => ({
|
|
3092
3092
|
name: l
|
|
3093
3093
|
}));
|
|
3094
3094
|
return L(s, i, t);
|
|
3095
3095
|
}, "inferArgTypes");
|
|
3096
|
-
|
|
3096
|
+
Nr.secondPass = !0;
|
|
3097
3097
|
|
|
3098
3098
|
// src/preview-api/modules/store/inferControls.ts
|
|
3099
3099
|
import { logger as Ps } from "storybook/internal/client-logger";
|
|
3100
3100
|
|
|
3101
3101
|
// src/preview-api/modules/store/filterArgTypes.ts
|
|
3102
|
-
var lo = /* @__PURE__ */ n((r, e) => Array.isArray(e) ? e.includes(r) : r.match(e), "matches"),
|
|
3103
|
-
r : r &&
|
|
3102
|
+
var lo = /* @__PURE__ */ n((r, e) => Array.isArray(e) ? e.includes(r) : r.match(e), "matches"), Je = /* @__PURE__ */ n((r, e, t) => !e && !t ?
|
|
3103
|
+
r : r && Pr(r, (o, s) => {
|
|
3104
3104
|
let i = o.name || s.toString();
|
|
3105
3105
|
return !!(!e || lo(i, e)) && (!t || !lo(i, t));
|
|
3106
3106
|
}), "filterArgTypes");
|
|
@@ -3146,7 +3146,7 @@ var Fs = /* @__PURE__ */ n((r, e, t) => {
|
|
|
3146
3146
|
} = r;
|
|
3147
3147
|
if (!t)
|
|
3148
3148
|
return e;
|
|
3149
|
-
let a =
|
|
3149
|
+
let a = Je(e, o, s), l = H(a, (c, d) => c?.type && Fs(c, d.toString(), i));
|
|
3150
3150
|
return L(l, a);
|
|
3151
3151
|
}, "inferControls");
|
|
3152
3152
|
De.secondPass = !0;
|
|
@@ -3172,7 +3172,7 @@ function he({
|
|
|
3172
3172
|
experimental_afterEach: v(a),
|
|
3173
3173
|
argTypesEnhancers: [
|
|
3174
3174
|
...t || [],
|
|
3175
|
-
|
|
3175
|
+
Nr,
|
|
3176
3176
|
// There's an architectural decision to be made regarding embedded addons in core:
|
|
3177
3177
|
//
|
|
3178
3178
|
// Option 1: Keep embedded addons but ensure consistency by moving addon-specific code
|
|
@@ -3213,7 +3213,7 @@ var co = /* @__PURE__ */ n((r) => async () => {
|
|
|
3213
3213
|
}, "composeBeforeAllHooks");
|
|
3214
3214
|
|
|
3215
3215
|
// src/preview-api/modules/store/csf/stepRunners.ts
|
|
3216
|
-
function
|
|
3216
|
+
function qr(r) {
|
|
3217
3217
|
return async (e, t, o) => {
|
|
3218
3218
|
await r.reduceRight(
|
|
3219
3219
|
(i, a) => async () => a(e, i, o),
|
|
@@ -3221,7 +3221,7 @@ function Nr(r) {
|
|
|
3221
3221
|
)();
|
|
3222
3222
|
};
|
|
3223
3223
|
}
|
|
3224
|
-
n(
|
|
3224
|
+
n(qr, "composeStepRunners");
|
|
3225
3225
|
|
|
3226
3226
|
// src/preview-api/modules/store/csf/composeConfigs.ts
|
|
3227
3227
|
function je(r, e) {
|
|
@@ -3235,10 +3235,10 @@ function $(r, e, t = {}) {
|
|
|
3235
3235
|
}, []);
|
|
3236
3236
|
}
|
|
3237
3237
|
n($, "getArrayField");
|
|
3238
|
-
function
|
|
3238
|
+
function Qe(r, e) {
|
|
3239
3239
|
return Object.assign({}, ...je(r, e));
|
|
3240
3240
|
}
|
|
3241
|
-
n(
|
|
3241
|
+
n(Qe, "getObjectField");
|
|
3242
3242
|
function ke(r, e) {
|
|
3243
3243
|
return je(r, e).pop();
|
|
3244
3244
|
}
|
|
@@ -3250,15 +3250,15 @@ function Y(r) {
|
|
|
3250
3250
|
decorators: $(e, "decorators", {
|
|
3251
3251
|
reverseFileOrder: !(Is.FEATURES?.legacyDecoratorFileOrder ?? !1)
|
|
3252
3252
|
}),
|
|
3253
|
-
args:
|
|
3253
|
+
args: Qe(e, "args"),
|
|
3254
3254
|
argsEnhancers: $(e, "argsEnhancers"),
|
|
3255
|
-
argTypes:
|
|
3255
|
+
argTypes: Qe(e, "argTypes"),
|
|
3256
3256
|
argTypesEnhancers: [
|
|
3257
3257
|
...t.filter((i) => !i.secondPass),
|
|
3258
3258
|
...t.filter((i) => i.secondPass)
|
|
3259
3259
|
],
|
|
3260
|
-
initialGlobals:
|
|
3261
|
-
globalTypes:
|
|
3260
|
+
initialGlobals: Qe(e, "initialGlobals"),
|
|
3261
|
+
globalTypes: Qe(e, "globalTypes"),
|
|
3262
3262
|
loaders: $(e, "loaders"),
|
|
3263
3263
|
beforeAll: co(s),
|
|
3264
3264
|
beforeEach: $(e, "beforeEach"),
|
|
@@ -3266,7 +3266,7 @@ function Y(r) {
|
|
|
3266
3266
|
render: ke(e, "render"),
|
|
3267
3267
|
renderToCanvas: ke(e, "renderToCanvas"),
|
|
3268
3268
|
applyDecorators: ke(e, "applyDecorators"),
|
|
3269
|
-
runStep:
|
|
3269
|
+
runStep: qr(o),
|
|
3270
3270
|
tags: $(e, "tags"),
|
|
3271
3271
|
mount: ke(e, "mount"),
|
|
3272
3272
|
testingLibraryRender: ke(e, "testingLibraryRender")
|
|
@@ -3293,14 +3293,14 @@ var se = class {
|
|
|
3293
3293
|
|
|
3294
3294
|
// src/preview-api/modules/store/csf/csf-factory-utils.ts
|
|
3295
3295
|
import { isStory as Os } from "storybook/internal/csf";
|
|
3296
|
-
function
|
|
3296
|
+
function Br(r, e, t) {
|
|
3297
3297
|
return Os(r) ? {
|
|
3298
3298
|
story: r.input,
|
|
3299
3299
|
meta: r.meta.input,
|
|
3300
3300
|
preview: r.meta.preview.composed
|
|
3301
3301
|
} : { story: r, meta: e, preview: t };
|
|
3302
3302
|
}
|
|
3303
|
-
n(
|
|
3303
|
+
n(Br, "getCsfFactoryAnnotations");
|
|
3304
3304
|
|
|
3305
3305
|
// src/preview-api/modules/store/csf/portable-stories.ts
|
|
3306
3306
|
function js(r) {
|
|
@@ -3339,19 +3339,20 @@ function po(r, e, t, o, s) {
|
|
|
3339
3339
|
l,
|
|
3340
3340
|
i,
|
|
3341
3341
|
c
|
|
3342
|
-
),
|
|
3342
|
+
), u = {
|
|
3343
|
+
...We(c.globalTypes),
|
|
3343
3344
|
...c.initialGlobals,
|
|
3344
3345
|
...d.storyGlobals
|
|
3345
|
-
},
|
|
3346
|
-
let
|
|
3346
|
+
}, y = new se(), h = /* @__PURE__ */ n(() => {
|
|
3347
|
+
let f = Xe({
|
|
3347
3348
|
hooks: new re(),
|
|
3348
|
-
globals:
|
|
3349
|
+
globals: u,
|
|
3349
3350
|
args: { ...d.initialArgs },
|
|
3350
3351
|
viewMode: "story",
|
|
3351
|
-
reporting:
|
|
3352
|
+
reporting: y,
|
|
3352
3353
|
loaded: {},
|
|
3353
3354
|
abortSignal: new AbortController().signal,
|
|
3354
|
-
step: /* @__PURE__ */ n((
|
|
3355
|
+
step: /* @__PURE__ */ n((S, R) => d.runStep(S, R, f), "step"),
|
|
3355
3356
|
canvasElement: null,
|
|
3356
3357
|
canvas: {},
|
|
3357
3358
|
userEvent: {},
|
|
@@ -3360,8 +3361,8 @@ function po(r, e, t, o, s) {
|
|
|
3360
3361
|
context: null,
|
|
3361
3362
|
mount: null
|
|
3362
3363
|
});
|
|
3363
|
-
return
|
|
3364
|
-
let
|
|
3364
|
+
return f.parameters.__isPortableStory = !0, f.context = f, d.renderToCanvas && (f.renderToCanvas = async () => {
|
|
3365
|
+
let S = await d.renderToCanvas?.(
|
|
3365
3366
|
{
|
|
3366
3367
|
componentId: d.componentId,
|
|
3367
3368
|
title: d.title,
|
|
@@ -3370,54 +3371,54 @@ function po(r, e, t, o, s) {
|
|
|
3370
3371
|
tags: d.tags,
|
|
3371
3372
|
showMain: /* @__PURE__ */ n(() => {
|
|
3372
3373
|
}, "showMain"),
|
|
3373
|
-
showError: /* @__PURE__ */ n((
|
|
3374
|
-
throw new Error(`${
|
|
3375
|
-
${
|
|
3374
|
+
showError: /* @__PURE__ */ n((R) => {
|
|
3375
|
+
throw new Error(`${R.title}
|
|
3376
|
+
${R.description}`);
|
|
3376
3377
|
}, "showError"),
|
|
3377
|
-
showException: /* @__PURE__ */ n((
|
|
3378
|
-
throw
|
|
3378
|
+
showException: /* @__PURE__ */ n((R) => {
|
|
3379
|
+
throw R;
|
|
3379
3380
|
}, "showException"),
|
|
3380
3381
|
forceRemount: !0,
|
|
3381
|
-
storyContext:
|
|
3382
|
-
storyFn: /* @__PURE__ */ n(() => d.unboundStoryFn(
|
|
3382
|
+
storyContext: f,
|
|
3383
|
+
storyFn: /* @__PURE__ */ n(() => d.unboundStoryFn(f), "storyFn"),
|
|
3383
3384
|
unboundStoryFn: d.unboundStoryFn
|
|
3384
3385
|
},
|
|
3385
|
-
|
|
3386
|
+
f.canvasElement
|
|
3386
3387
|
);
|
|
3387
|
-
|
|
3388
|
-
}),
|
|
3389
|
-
}, "initializeContext"), g, b = /* @__PURE__ */ n(async (
|
|
3390
|
-
let
|
|
3391
|
-
return
|
|
3392
|
-
}, "play"),
|
|
3393
|
-
let
|
|
3394
|
-
return Object.assign(
|
|
3395
|
-
}, "run"),
|
|
3388
|
+
S && K.push(S);
|
|
3389
|
+
}), f.mount = d.mount(f), f;
|
|
3390
|
+
}, "initializeContext"), g, b = /* @__PURE__ */ n(async (f) => {
|
|
3391
|
+
let S = h();
|
|
3392
|
+
return S.canvasElement ??= globalThis?.document?.body, g && (S.loaded = g.loaded), Object.assign(S, f), d.playFunction(S);
|
|
3393
|
+
}, "play"), m = /* @__PURE__ */ n((f) => {
|
|
3394
|
+
let S = h();
|
|
3395
|
+
return Object.assign(S, f), Gs(d, S);
|
|
3396
|
+
}, "run"), T = d.playFunction ? b : void 0;
|
|
3396
3397
|
return Object.assign(
|
|
3397
|
-
/* @__PURE__ */ n(function(
|
|
3398
|
-
let
|
|
3399
|
-
return g && (
|
|
3400
|
-
...
|
|
3401
|
-
...
|
|
3402
|
-
}, d.unboundStoryFn(
|
|
3398
|
+
/* @__PURE__ */ n(function(S) {
|
|
3399
|
+
let R = h();
|
|
3400
|
+
return g && (R.loaded = g.loaded), R.args = {
|
|
3401
|
+
...R.initialArgs,
|
|
3402
|
+
...S
|
|
3403
|
+
}, d.unboundStoryFn(R);
|
|
3403
3404
|
}, "storyFn"),
|
|
3404
3405
|
{
|
|
3405
3406
|
id: d.id,
|
|
3406
3407
|
storyName: a,
|
|
3407
3408
|
load: /* @__PURE__ */ n(async () => {
|
|
3408
|
-
for (let
|
|
3409
|
-
await
|
|
3409
|
+
for (let S of [...K].reverse())
|
|
3410
|
+
await S();
|
|
3410
3411
|
K.length = 0;
|
|
3411
|
-
let
|
|
3412
|
-
|
|
3412
|
+
let f = h();
|
|
3413
|
+
f.loaded = await d.applyLoaders(f), K.push(...(await d.applyBeforeEach(f)).filter(Boolean)), g = f;
|
|
3413
3414
|
}, "load"),
|
|
3414
|
-
globals:
|
|
3415
|
+
globals: u,
|
|
3415
3416
|
args: d.initialArgs,
|
|
3416
3417
|
parameters: d.parameters,
|
|
3417
3418
|
argTypes: d.argTypes,
|
|
3418
|
-
play:
|
|
3419
|
-
run:
|
|
3420
|
-
reporting:
|
|
3419
|
+
play: T,
|
|
3420
|
+
run: m,
|
|
3421
|
+
reporting: y,
|
|
3421
3422
|
tags: d.tags
|
|
3422
3423
|
}
|
|
3423
3424
|
);
|
|
@@ -3428,8 +3429,8 @@ function Bs(r, e, t = qs) {
|
|
|
3428
3429
|
let { default: o, __esModule: s, __namedExportsOrder: i, ...a } = r, l = o;
|
|
3429
3430
|
return Object.entries(a).reduce(
|
|
3430
3431
|
(d, [p, u]) => {
|
|
3431
|
-
let { story: y, meta:
|
|
3432
|
-
return !l &&
|
|
3432
|
+
let { story: y, meta: h } = Br(u);
|
|
3433
|
+
return !l && h && (l = h), Ds(p, l) ? Object.assign(d, {
|
|
3433
3434
|
[p]: t(y, l, e, p)
|
|
3434
3435
|
}) : d;
|
|
3435
3436
|
},
|
|
@@ -3491,12 +3492,12 @@ n(Gs, "runStory");
|
|
|
3491
3492
|
var uo = 1e3, Vs = 1e4, ge = class {
|
|
3492
3493
|
constructor(e, t, o) {
|
|
3493
3494
|
this.importFn = t;
|
|
3494
|
-
this.storyIndex = new
|
|
3495
|
+
this.storyIndex = new Ye(e), this.projectAnnotations = he(
|
|
3495
3496
|
Y([...te(), o])
|
|
3496
3497
|
);
|
|
3497
3498
|
let { initialGlobals: s, globalTypes: i } = this.projectAnnotations;
|
|
3498
|
-
this.args = new Ve(), this.userGlobals = new
|
|
3499
|
-
(0,
|
|
3499
|
+
this.args = new Ve(), this.userGlobals = new $e({ globals: s, globalTypes: i }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache =
|
|
3500
|
+
(0, Ze.default)(uo)(to), this.prepareMetaWithCache = (0, Ze.default)(uo)(_r), this.prepareStoryWithCache = (0, Ze.default)(Vs)(Oe);
|
|
3500
3501
|
}
|
|
3501
3502
|
static {
|
|
3502
3503
|
n(this, "StoryStore");
|
|
@@ -3591,7 +3592,7 @@ var uo = 1e3, Vs = 1e4, ge = class {
|
|
|
3591
3592
|
// and updated separtely to the (immutable) story.
|
|
3592
3593
|
getStoryContext(e, { forceInitialArgs: t = !1 } = {}) {
|
|
3593
3594
|
let o = this.userGlobals.get(), { initialGlobals: s } = this.userGlobals, i = new se();
|
|
3594
|
-
return
|
|
3595
|
+
return Xe({
|
|
3595
3596
|
...e,
|
|
3596
3597
|
args: t ? e.initialArgs : this.args.get(e.id),
|
|
3597
3598
|
initialGlobals: s,
|
|
@@ -3648,10 +3649,10 @@ var uo = 1e3, Vs = 1e4, ge = class {
|
|
|
3648
3649
|
import { once as Ws } from "storybook/internal/client-logger";
|
|
3649
3650
|
|
|
3650
3651
|
// ../node_modules/slash/index.js
|
|
3651
|
-
function
|
|
3652
|
+
function zr(r) {
|
|
3652
3653
|
return r.startsWith("\\\\?\\") ? r : r.replace(/\\/g, "/");
|
|
3653
3654
|
}
|
|
3654
|
-
n(
|
|
3655
|
+
n(zr, "slash");
|
|
3655
3656
|
|
|
3656
3657
|
// src/preview-api/modules/store/autoTitle.ts
|
|
3657
3658
|
var $s = /* @__PURE__ */ n((r) => {
|
|
@@ -3675,7 +3676,7 @@ var yo = /* @__PURE__ */ n((r, e, t) => {
|
|
|
3675
3676
|
webpack is mis-configured in production mode. To force webpack to produce
|
|
3676
3677
|
filenames, set optimization.moduleIds = "named" in your webpack config.
|
|
3677
3678
|
`);
|
|
3678
|
-
let a =
|
|
3679
|
+
let a = zr(String(r));
|
|
3679
3680
|
if (s.exec(a)) {
|
|
3680
3681
|
if (!t) {
|
|
3681
3682
|
let l = a.replace(o, ""), c = fo([i, l]).split("/");
|
|
@@ -3706,8 +3707,8 @@ var mo = /\s*\/\s*/, ho = /* @__PURE__ */ n((r = {}) => (e, t) => {
|
|
|
3706
3707
|
return 1;
|
|
3707
3708
|
let c = i[l], d = a[l];
|
|
3708
3709
|
if (c !== d) {
|
|
3709
|
-
let u = s.indexOf(c), y = s.indexOf(d),
|
|
3710
|
-
return u !== -1 || y !== -1 ? (u === -1 && (
|
|
3710
|
+
let u = s.indexOf(c), y = s.indexOf(d), h = s.indexOf("*");
|
|
3711
|
+
return u !== -1 || y !== -1 ? (u === -1 && (h !== -1 ? u = h : u = s.length), y === -1 && (h !== -1 ? y = h : y = s.length), u - y) : o ===
|
|
3711
3712
|
"configure" ? 0 : c.localeCompare(d, r.locales ? r.locales : void 0, {
|
|
3712
3713
|
numeric: !0,
|
|
3713
3714
|
sensitivity: "accent"
|
|
@@ -3869,25 +3870,25 @@ var ie = class {
|
|
|
3869
3870
|
applyLoaders: p,
|
|
3870
3871
|
applyBeforeEach: u,
|
|
3871
3872
|
applyAfterEach: y,
|
|
3872
|
-
unboundStoryFn:
|
|
3873
|
-
playFunction:
|
|
3874
|
-
runStep:
|
|
3873
|
+
unboundStoryFn: h,
|
|
3874
|
+
playFunction: g,
|
|
3875
|
+
runStep: b
|
|
3875
3876
|
} = s;
|
|
3876
3877
|
t && !e && (this.cancelRender(), this.abortController = new So());
|
|
3877
|
-
let
|
|
3878
|
+
let m = this.abortController.signal, T = !1, x = s.usesMount;
|
|
3878
3879
|
try {
|
|
3879
3880
|
let f = {
|
|
3880
3881
|
...this.storyContext(),
|
|
3881
3882
|
viewMode: this.viewMode,
|
|
3882
|
-
abortSignal:
|
|
3883
|
+
abortSignal: m,
|
|
3883
3884
|
canvasElement: o,
|
|
3884
3885
|
loaded: {},
|
|
3885
|
-
step: /* @__PURE__ */ n((C, B) =>
|
|
3886
|
+
step: /* @__PURE__ */ n((C, B) => b(C, B, f), "step"),
|
|
3886
3887
|
context: null,
|
|
3887
3888
|
canvas: {},
|
|
3888
3889
|
userEvent: {},
|
|
3889
3890
|
renderToCanvas: /* @__PURE__ */ n(async () => {
|
|
3890
|
-
let C = await this.renderToScreen(
|
|
3891
|
+
let C = await this.renderToScreen(S, o);
|
|
3891
3892
|
this.teardownRender = C || (() => {
|
|
3892
3893
|
}), T = !0;
|
|
3893
3894
|
}, "renderToCanvas"),
|
|
@@ -3899,13 +3900,13 @@ var ie = class {
|
|
|
3899
3900
|
mount: /* @__PURE__ */ n(async (...C) => {
|
|
3900
3901
|
this.callbacks.showStoryDuringRender?.();
|
|
3901
3902
|
let B = null;
|
|
3902
|
-
return await this.runPhase(
|
|
3903
|
+
return await this.runPhase(m, "rendering", async () => {
|
|
3903
3904
|
B = await s.mount(f)(...C);
|
|
3904
|
-
}),
|
|
3905
|
+
}), x && await this.runPhase(m, "playing"), B;
|
|
3905
3906
|
}, "mount")
|
|
3906
3907
|
};
|
|
3907
3908
|
f.context = f;
|
|
3908
|
-
let
|
|
3909
|
+
let S = {
|
|
3909
3910
|
componentId: a,
|
|
3910
3911
|
title: l,
|
|
3911
3912
|
kind: l,
|
|
@@ -3918,51 +3919,51 @@ var ie = class {
|
|
|
3918
3919
|
showException: /* @__PURE__ */ n((C) => (this.phase = "errored", this.callbacks.showException(C)), "showException"),
|
|
3919
3920
|
forceRemount: t || this.notYetRendered,
|
|
3920
3921
|
storyContext: f,
|
|
3921
|
-
storyFn: /* @__PURE__ */ n(() =>
|
|
3922
|
-
unboundStoryFn:
|
|
3922
|
+
storyFn: /* @__PURE__ */ n(() => h(f), "storyFn"),
|
|
3923
|
+
unboundStoryFn: h
|
|
3923
3924
|
};
|
|
3924
|
-
if (await this.runPhase(
|
|
3925
|
+
if (await this.runPhase(m, "loading", async () => {
|
|
3925
3926
|
f.loaded = await p(f);
|
|
3926
|
-
}),
|
|
3927
|
+
}), m.aborted)
|
|
3927
3928
|
return;
|
|
3928
|
-
let
|
|
3929
|
-
if (this.store.addCleanupCallbacks(s,
|
|
3929
|
+
let R = await u(f);
|
|
3930
|
+
if (this.store.addCleanupCallbacks(s, R), this.checkIfAborted(m) || (!T && !x && await f.mount(), this.notYetRendered = !1, m.aborted))
|
|
3930
3931
|
return;
|
|
3931
|
-
let
|
|
3932
|
+
let w = this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors === !0, A = /* @__PURE__ */ new Set(), F = /* @__PURE__ */ n((C) => A.
|
|
3932
3933
|
add("error" in C ? C.error : C.reason), "onError");
|
|
3933
|
-
if (this.renderOptions.autoplay && t &&
|
|
3934
|
+
if (this.renderOptions.autoplay && t && g && this.phase !== "errored") {
|
|
3934
3935
|
window.addEventListener("error", F), window.addEventListener("unhandledrejection", F), this.disableKeyListeners = !0;
|
|
3935
3936
|
try {
|
|
3936
|
-
if (
|
|
3937
|
-
throw new ei({ playFunction:
|
|
3938
|
-
}, await this.runPhase(
|
|
3937
|
+
if (x ? await g(f) : (f.mount = async () => {
|
|
3938
|
+
throw new ei({ playFunction: g.toString() });
|
|
3939
|
+
}, await this.runPhase(m, "playing", async () => g(f))), !T)
|
|
3939
3940
|
throw new ri();
|
|
3940
|
-
this.checkIfAborted(
|
|
3941
|
+
this.checkIfAborted(m), !w && A.size > 0 ? await this.runPhase(m, "errored") : await this.runPhase(m, "played");
|
|
3941
3942
|
} catch (C) {
|
|
3942
|
-
if (this.callbacks.showStoryDuringRender?.(), await this.runPhase(
|
|
3943
|
+
if (this.callbacks.showStoryDuringRender?.(), await this.runPhase(m, "errored", async () => {
|
|
3943
3944
|
this.channel.emit(Js, To(C));
|
|
3944
3945
|
}), this.story.parameters.throwPlayFunctionExceptions !== !1)
|
|
3945
3946
|
throw C;
|
|
3946
3947
|
console.error(C);
|
|
3947
3948
|
}
|
|
3948
|
-
if (!
|
|
3949
|
+
if (!w && A.size > 0 && this.channel.emit(
|
|
3949
3950
|
Zs,
|
|
3950
3951
|
Array.from(A).map(To)
|
|
3951
|
-
), this.disableKeyListeners = !1, window.removeEventListener("unhandledrejection", F), window.removeEventListener("error", F),
|
|
3952
|
+
), this.disableKeyListeners = !1, window.removeEventListener("unhandledrejection", F), window.removeEventListener("error", F), m.aborted)
|
|
3952
3953
|
return;
|
|
3953
3954
|
}
|
|
3954
3955
|
await this.runPhase(
|
|
3955
|
-
|
|
3956
|
+
m,
|
|
3956
3957
|
"completed",
|
|
3957
3958
|
async () => this.channel.emit(Qs, i)
|
|
3958
|
-
), this.phase !== "errored" && await this.runPhase(
|
|
3959
|
+
), this.phase !== "errored" && await this.runPhase(m, "afterEach", async () => {
|
|
3959
3960
|
await y(f);
|
|
3960
3961
|
});
|
|
3961
|
-
let j = !
|
|
3962
|
+
let j = !w && A.size > 0, N = f.reporting.reports.some(
|
|
3962
3963
|
(C) => C.status === "failed"
|
|
3963
3964
|
), pe = j || N;
|
|
3964
3965
|
await this.runPhase(
|
|
3965
|
-
|
|
3966
|
+
m,
|
|
3966
3967
|
"finished",
|
|
3967
3968
|
async () => this.channel.emit(go, {
|
|
3968
3969
|
storyId: i,
|
|
@@ -3972,7 +3973,7 @@ var ie = class {
|
|
|
3972
3973
|
);
|
|
3973
3974
|
} catch (f) {
|
|
3974
3975
|
this.phase = "errored", this.callbacks.showException(f), await this.runPhase(
|
|
3975
|
-
|
|
3976
|
+
m,
|
|
3976
3977
|
"finished",
|
|
3977
3978
|
async () => this.channel.emit(go, {
|
|
3978
3979
|
storyId: i,
|
|
@@ -4292,7 +4293,7 @@ var { fetch: gi } = hi, bi = "./index.json", be = class {
|
|
|
4292
4293
|
import { global as nl } from "@storybook/global";
|
|
4293
4294
|
|
|
4294
4295
|
// src/preview-api/modules/preview-web/PreviewWithSelection.tsx
|
|
4295
|
-
import { logger as
|
|
4296
|
+
import { logger as rr } from "storybook/internal/client-logger";
|
|
4296
4297
|
import {
|
|
4297
4298
|
CURRENT_STORY_WAS_SET as Eo,
|
|
4298
4299
|
DOCS_PREPARED as wi,
|
|
@@ -4311,23 +4312,23 @@ import {
|
|
|
4311
4312
|
UPDATE_QUERY_PARAMS as ki
|
|
4312
4313
|
} from "storybook/internal/core-events";
|
|
4313
4314
|
import {
|
|
4314
|
-
CalledPreviewMethodBeforeInitializationError as
|
|
4315
|
+
CalledPreviewMethodBeforeInitializationError as Ur,
|
|
4315
4316
|
EmptyIndexError as ji,
|
|
4316
4317
|
MdxFileWithNoCsfReferencesError as Mi,
|
|
4317
4318
|
NoStoryMatchError as _i
|
|
4318
4319
|
} from "storybook/internal/preview-errors";
|
|
4319
4320
|
|
|
4320
4321
|
// ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
4321
|
-
var Si = !1,
|
|
4322
|
-
function
|
|
4322
|
+
var Si = !1, Gr = "Invariant failed";
|
|
4323
|
+
function er(r, e) {
|
|
4323
4324
|
if (!r) {
|
|
4324
4325
|
if (Si)
|
|
4325
|
-
throw new Error(
|
|
4326
|
-
var t = typeof e == "function" ? e() : e, o = t ? "".concat(
|
|
4326
|
+
throw new Error(Gr);
|
|
4327
|
+
var t = typeof e == "function" ? e() : e, o = t ? "".concat(Gr, ": ").concat(t) : Gr;
|
|
4327
4328
|
throw new Error(o);
|
|
4328
4329
|
}
|
|
4329
4330
|
}
|
|
4330
|
-
n(
|
|
4331
|
+
n(er, "invariant");
|
|
4331
4332
|
|
|
4332
4333
|
// src/preview-api/modules/preview-web/render/CsfDocsRender.ts
|
|
4333
4334
|
import { DOCS_RENDERED as xi } from "storybook/internal/core-events";
|
|
@@ -4623,10 +4624,10 @@ function Bi({ tags: r }) {
|
|
|
4623
4624
|
return r?.includes(qi) || r?.includes(Po);
|
|
4624
4625
|
}
|
|
4625
4626
|
n(Bi, "isMdxEntry");
|
|
4626
|
-
function
|
|
4627
|
+
function Hr(r) {
|
|
4627
4628
|
return r.type === "story";
|
|
4628
4629
|
}
|
|
4629
|
-
n(
|
|
4630
|
+
n(Hr, "isStoryRender");
|
|
4630
4631
|
function zi(r) {
|
|
4631
4632
|
return r.type === "docs";
|
|
4632
4633
|
}
|
|
@@ -4653,7 +4654,7 @@ var Se = class extends be {
|
|
|
4653
4654
|
}
|
|
4654
4655
|
async setInitialGlobals() {
|
|
4655
4656
|
if (!this.storyStoreValue)
|
|
4656
|
-
throw new
|
|
4657
|
+
throw new Ur({ methodName: "setInitialGlobals" });
|
|
4657
4658
|
let { globals: t } = this.selectionStore.selectionSpecifier || {};
|
|
4658
4659
|
t && this.storyStoreValue.userGlobals.updateFromPersisted(t), this.emitGlobals();
|
|
4659
4660
|
}
|
|
@@ -4664,7 +4665,7 @@ var Se = class extends be {
|
|
|
4664
4665
|
// Use the selection specifier to choose a story, then render it
|
|
4665
4666
|
async selectSpecifiedStory() {
|
|
4666
4667
|
if (!this.storyStoreValue)
|
|
4667
|
-
throw new
|
|
4668
|
+
throw new Ur({
|
|
4668
4669
|
methodName: "selectSpecifiedStory"
|
|
4669
4670
|
});
|
|
4670
4671
|
if (this.selectionStore.selection) {
|
|
@@ -4737,15 +4738,15 @@ var Se = class extends be {
|
|
|
4737
4738
|
async renderSelection({ persistedArgs: t } = {}) {
|
|
4738
4739
|
let { renderToCanvas: o } = this;
|
|
4739
4740
|
if (!this.storyStoreValue || !o)
|
|
4740
|
-
throw new
|
|
4741
|
+
throw new Ur({ methodName: "renderSelection" });
|
|
4741
4742
|
let { selection: s } = this.selectionStore;
|
|
4742
4743
|
if (!s)
|
|
4743
4744
|
throw new Error("Cannot call renderSelection as no selection was made");
|
|
4744
4745
|
let { storyId: i } = s, a;
|
|
4745
4746
|
try {
|
|
4746
4747
|
a = await this.storyStoreValue.storyIdToEntry(i);
|
|
4747
|
-
} catch (
|
|
4748
|
-
this.currentRender && await this.teardownRender(this.currentRender), this.renderStoryLoadingException(i,
|
|
4748
|
+
} catch (h) {
|
|
4749
|
+
this.currentRender && await this.teardownRender(this.currentRender), this.renderStoryLoadingException(i, h);
|
|
4749
4750
|
return;
|
|
4750
4751
|
}
|
|
4751
4752
|
let l = this.currentSelection?.storyId !== i, c = this.currentRender?.type !== a.type;
|
|
@@ -4776,54 +4777,54 @@ var Se = class extends be {
|
|
|
4776
4777
|
this.currentRender = d;
|
|
4777
4778
|
try {
|
|
4778
4779
|
await d.prepare();
|
|
4779
|
-
} catch (
|
|
4780
|
-
u && await this.teardownRender(u),
|
|
4780
|
+
} catch (h) {
|
|
4781
|
+
u && await this.teardownRender(u), h !== X && this.renderStoryLoadingException(i, h);
|
|
4781
4782
|
return;
|
|
4782
4783
|
}
|
|
4783
4784
|
let y = !l && u && !d.isEqual(u);
|
|
4784
|
-
if (t &&
|
|
4785
|
+
if (t && Hr(d) && (er(!!d.story), this.storyStoreValue.args.updateFromPersisted(d.story, t)), u && !u.torndown && !l && !y && !c) {
|
|
4785
4786
|
this.currentRender = u, this.channel.emit(Di, i), this.view.showMain();
|
|
4786
4787
|
return;
|
|
4787
4788
|
}
|
|
4788
|
-
if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(vi, i),
|
|
4789
|
-
|
|
4789
|
+
if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(vi, i), Hr(d)) {
|
|
4790
|
+
er(!!d.story);
|
|
4790
4791
|
let {
|
|
4791
|
-
parameters:
|
|
4792
|
-
initialArgs:
|
|
4793
|
-
argTypes:
|
|
4794
|
-
unmappedArgs:
|
|
4792
|
+
parameters: h,
|
|
4793
|
+
initialArgs: g,
|
|
4794
|
+
argTypes: b,
|
|
4795
|
+
unmappedArgs: m,
|
|
4795
4796
|
initialGlobals: T,
|
|
4796
|
-
userGlobals:
|
|
4797
|
+
userGlobals: x,
|
|
4797
4798
|
storyGlobals: f,
|
|
4798
|
-
globals:
|
|
4799
|
+
globals: S
|
|
4799
4800
|
} = this.storyStoreValue.getStoryContext(d.story);
|
|
4800
4801
|
this.channel.emit(Fi, {
|
|
4801
4802
|
id: i,
|
|
4802
|
-
parameters:
|
|
4803
|
-
initialArgs:
|
|
4804
|
-
argTypes:
|
|
4805
|
-
args:
|
|
4806
|
-
}), this.channel.emit(Ao, { userGlobals:
|
|
4803
|
+
parameters: h,
|
|
4804
|
+
initialArgs: g,
|
|
4805
|
+
argTypes: b,
|
|
4806
|
+
args: m
|
|
4807
|
+
}), this.channel.emit(Ao, { userGlobals: x, storyGlobals: f, globals: S, initialGlobals: T });
|
|
4807
4808
|
} else {
|
|
4808
|
-
let { parameters:
|
|
4809
|
+
let { parameters: h } = this.storyStoreValue.projectAnnotations, { initialGlobals: g, globals: b } = this.storyStoreValue.userGlobals;
|
|
4809
4810
|
if (this.channel.emit(Ao, {
|
|
4810
|
-
globals:
|
|
4811
|
-
initialGlobals:
|
|
4811
|
+
globals: b,
|
|
4812
|
+
initialGlobals: g,
|
|
4812
4813
|
storyGlobals: {},
|
|
4813
|
-
userGlobals:
|
|
4814
|
+
userGlobals: b
|
|
4814
4815
|
}), Gi(d) || d.entry.tags?.includes(Po)) {
|
|
4815
4816
|
if (!d.csfFiles)
|
|
4816
4817
|
throw new Mi({ storyId: i });
|
|
4817
|
-
({ parameters:
|
|
4818
|
+
({ parameters: h } = this.storyStoreValue.preparedMetaFromCSFFile({
|
|
4818
4819
|
csfFile: d.csfFiles[0]
|
|
4819
4820
|
}));
|
|
4820
4821
|
}
|
|
4821
4822
|
this.channel.emit(wi, {
|
|
4822
4823
|
id: i,
|
|
4823
|
-
parameters:
|
|
4824
|
+
parameters: h
|
|
4824
4825
|
});
|
|
4825
4826
|
}
|
|
4826
|
-
|
|
4827
|
+
Hr(d) ? (er(!!d.story), this.storyRenders.push(d), this.currentRender.renderToElement(
|
|
4827
4828
|
this.view.prepareForStory(d.story)
|
|
4828
4829
|
)) : this.currentRender.renderToElement(
|
|
4829
4830
|
this.view.prepareForDocs(),
|
|
@@ -4850,18 +4851,18 @@ var Se = class extends be {
|
|
|
4850
4851
|
this.view.showNoPreview(), this.channel.emit(Co);
|
|
4851
4852
|
}
|
|
4852
4853
|
renderStoryLoadingException(t, o) {
|
|
4853
|
-
|
|
4854
|
+
rr.error(o), this.view.showErrorDisplay(o), this.channel.emit(Co, t);
|
|
4854
4855
|
}
|
|
4855
4856
|
// renderException is used if we fail to render the story and it is uncaught by the app layer
|
|
4856
4857
|
renderException(t, o) {
|
|
4857
4858
|
let { name: s = "Error", message: i = String(o), stack: a } = o;
|
|
4858
4859
|
this.channel.emit(Oi, { name: s, message: i, stack: a }), this.channel.emit(vo, { newPhase: "errored", storyId: t }), this.view.showErrorDisplay(
|
|
4859
|
-
o),
|
|
4860
|
+
o), rr.error(`Error rendering story '${t}':`), rr.error(o);
|
|
4860
4861
|
}
|
|
4861
4862
|
// renderError is used by the various app layers to inform the user they have done something
|
|
4862
4863
|
// wrong -- for instance returned the wrong thing from a story
|
|
4863
4864
|
renderError(t, { title: o, description: s }) {
|
|
4864
|
-
|
|
4865
|
+
rr.error(`Error rendering story ${o}: ${s}`), this.channel.emit(Pi, { title: o, description: s }), this.channel.emit(vo, { newPhase: "er\
|
|
4865
4866
|
rored", storyId: t }), this.view.showErrorDisplay({
|
|
4866
4867
|
message: o,
|
|
4867
4868
|
stack: s
|
|
@@ -4870,16 +4871,16 @@ rored", storyId: t }), this.view.showErrorDisplay({
|
|
|
4870
4871
|
};
|
|
4871
4872
|
|
|
4872
4873
|
// src/preview-api/modules/preview-web/UrlStore.ts
|
|
4873
|
-
var Ne = ue(
|
|
4874
|
+
var Ne = ue(ir(), 1);
|
|
4874
4875
|
import { global as ga } from "@storybook/global";
|
|
4875
4876
|
|
|
4876
4877
|
// src/preview-api/modules/preview-web/parseArgsParam.ts
|
|
4877
4878
|
import { once as ya } from "storybook/internal/client-logger";
|
|
4878
|
-
var zo = ue(
|
|
4879
|
+
var zo = ue(ir(), 1);
|
|
4879
4880
|
var Bo = /^[a-zA-Z0-9 _-]*$/, Go = /^-?[0-9]+(\.[0-9]+)?$/, ma = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, Uo = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
|
|
4880
|
-
|
|
4881
|
-
typeof e == "boolean" ? !0 : typeof e == "string" ? Bo.test(e) || Go.test(e) || ma.test(e) || Uo.test(e) : Array.isArray(e) ? e.every((t) =>
|
|
4882
|
-
r, t)) : k(e) ? Object.entries(e).every(([t, o]) =>
|
|
4881
|
+
Jr = /* @__PURE__ */ n((r = "", e) => r === null || r === "" || !Bo.test(r) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
|
|
4882
|
+
typeof e == "boolean" ? !0 : typeof e == "string" ? Bo.test(e) || Go.test(e) || ma.test(e) || Uo.test(e) : Array.isArray(e) ? e.every((t) => Jr(
|
|
4883
|
+
r, t)) : k(e) ? Object.entries(e).every(([t, o]) => Jr(t, o)) : !1, "validateArgs"), ha = {
|
|
4883
4884
|
delimiter: ";",
|
|
4884
4885
|
// we're parsing a single query param
|
|
4885
4886
|
nesting: !0,
|
|
@@ -4909,9 +4910,9 @@ r, t)) : k(e) ? Object.entries(e).every(([t, o]) => Xr(t, o)) : !1, "validateArg
|
|
|
4909
4910
|
}
|
|
4910
4911
|
return Go.test(r) ? Number(r) : r;
|
|
4911
4912
|
}
|
|
4912
|
-
},
|
|
4913
|
+
}, Qr = /* @__PURE__ */ n((r) => {
|
|
4913
4914
|
let e = r.split(";").map((t) => t.replace("=", "~").replace(":", "="));
|
|
4914
|
-
return Object.entries((0, zo.parse)(e.join(";"), ha)).reduce((t, [o, s]) =>
|
|
4915
|
+
return Object.entries((0, zo.parse)(e.join(";"), ha)).reduce((t, [o, s]) => Jr(o, s) ? Object.assign(t, { [o]: s }) : (ya.warn(P`
|
|
4915
4916
|
Omitted potentially unsafe URL args.
|
|
4916
4917
|
|
|
4917
4918
|
More info: https://storybook.js.org/docs/writing-stories/args#setting-args-through-the-url
|
|
@@ -4956,8 +4957,8 @@ var Vo = /* @__PURE__ */ n(({
|
|
|
4956
4957
|
}
|
|
4957
4958
|
}, "getFirstString"), xa = /* @__PURE__ */ n(() => {
|
|
4958
4959
|
if (typeof Q < "u") {
|
|
4959
|
-
let r = Q.location.search.slice(1), e = (0, Ne.parse)(r), t = typeof e.args == "string" ?
|
|
4960
|
-
string" ?
|
|
4960
|
+
let r = Q.location.search.slice(1), e = (0, Ne.parse)(r), t = typeof e.args == "string" ? Qr(e.args) : void 0, o = typeof e.globals == "\
|
|
4961
|
+
string" ? Qr(e.globals) : void 0, s = Le(e.viewMode);
|
|
4961
4962
|
(typeof s != "string" || !s.match(/docs|story/)) && (s = "story");
|
|
4962
4963
|
let i = Le(e.path), a = i ? ba(i) : Le(e.id);
|
|
4963
4964
|
if (a)
|
|
@@ -4981,17 +4982,17 @@ string" ? Jr(e.globals) : void 0, s = Le(e.viewMode);
|
|
|
4981
4982
|
};
|
|
4982
4983
|
|
|
4983
4984
|
// src/preview-api/modules/preview-web/WebView.ts
|
|
4984
|
-
var En = ue(xn(), 1), An = ue(
|
|
4985
|
+
var En = ue(xn(), 1), An = ue(ir(), 1);
|
|
4985
4986
|
import { logger as tl } from "storybook/internal/client-logger";
|
|
4986
4987
|
import { global as ol } from "@storybook/global";
|
|
4987
4988
|
var { document: D } = ol, Rn = 100, Cn = /* @__PURE__ */ ((i) => (i.MAIN = "MAIN", i.NOPREVIEW = "NOPREVIEW", i.PREPARING_STORY = "PREPARING\
|
|
4988
|
-
_STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Cn || {}),
|
|
4989
|
+
_STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Cn || {}), st = {
|
|
4989
4990
|
PREPARING_STORY: "sb-show-preparing-story",
|
|
4990
4991
|
PREPARING_DOCS: "sb-show-preparing-docs",
|
|
4991
4992
|
MAIN: "sb-show-main",
|
|
4992
4993
|
NOPREVIEW: "sb-show-nopreview",
|
|
4993
4994
|
ERROR: "sb-show-errordisplay"
|
|
4994
|
-
},
|
|
4995
|
+
}, it = {
|
|
4995
4996
|
centered: "sb-main-centered",
|
|
4996
4997
|
fullscreen: "sb-main-fullscreen",
|
|
4997
4998
|
padded: "sb-main-padded"
|
|
@@ -5039,20 +5040,20 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Cn || {}),
|
|
|
5039
5040
|
return;
|
|
5040
5041
|
}
|
|
5041
5042
|
this.checkIfLayoutExists(e);
|
|
5042
|
-
let t =
|
|
5043
|
+
let t = it[e];
|
|
5043
5044
|
D.body.classList.remove(this.currentLayoutClass), D.body.classList.add(t), this.currentLayoutClass = t;
|
|
5044
5045
|
}
|
|
5045
5046
|
checkIfLayoutExists(e) {
|
|
5046
|
-
|
|
5047
|
+
it[e] || tl.warn(
|
|
5047
5048
|
P`
|
|
5048
5049
|
The desired layout: ${e} is not a valid option.
|
|
5049
|
-
The possible options are: ${Object.keys(
|
|
5050
|
+
The possible options are: ${Object.keys(it).join(", ")}, none.
|
|
5050
5051
|
`
|
|
5051
5052
|
);
|
|
5052
5053
|
}
|
|
5053
5054
|
showMode(e) {
|
|
5054
5055
|
clearTimeout(this.preparingTimeout), Object.keys(Cn).forEach((t) => {
|
|
5055
|
-
t === e ? D.body.classList.add(
|
|
5056
|
+
t === e ? D.body.classList.add(st[t]) : D.body.classList.remove(st[t]);
|
|
5056
5057
|
});
|
|
5057
5058
|
}
|
|
5058
5059
|
showErrorDisplay({ message: e = "", stack: t = "" }) {
|
|
@@ -5086,12 +5087,12 @@ RING_DOCS"), Rn);
|
|
|
5086
5087
|
this.docsRoot().setAttribute("hidden", "true"), this.storyRoot().removeAttribute("hidden");
|
|
5087
5088
|
}
|
|
5088
5089
|
showStoryDuringRender() {
|
|
5089
|
-
D.body.classList.add(
|
|
5090
|
+
D.body.classList.add(st.MAIN);
|
|
5090
5091
|
}
|
|
5091
5092
|
};
|
|
5092
5093
|
|
|
5093
5094
|
// src/preview-api/modules/preview-web/PreviewWeb.tsx
|
|
5094
|
-
var
|
|
5095
|
+
var yr = class extends Se {
|
|
5095
5096
|
constructor(t, o) {
|
|
5096
5097
|
super(t, o, new Te(), new xe());
|
|
5097
5098
|
this.importFn = t;
|
|
@@ -5125,11 +5126,11 @@ var { document: de } = sl, il = [
|
|
|
5125
5126
|
// Support modern javascript
|
|
5126
5127
|
"module"
|
|
5127
5128
|
], al = "script", vn = "scripts-root";
|
|
5128
|
-
function
|
|
5129
|
+
function mr() {
|
|
5129
5130
|
let r = de.createEvent("Event");
|
|
5130
5131
|
r.initEvent("DOMContentLoaded", !0, !0), de.dispatchEvent(r);
|
|
5131
5132
|
}
|
|
5132
|
-
n(
|
|
5133
|
+
n(mr, "simulateDOMContentLoaded");
|
|
5133
5134
|
function ll(r, e, t) {
|
|
5134
5135
|
let o = de.createElement("script");
|
|
5135
5136
|
o.type = r.type === "module" ? "module" : "text/javascript", r.src ? (o.onload = e, o.onerror = e, o.src = r.src) : o.textContent = r.innerText,
|
|
@@ -5151,14 +5152,14 @@ function Fn(r) {
|
|
|
5151
5152
|
t.forEach((s) => {
|
|
5152
5153
|
let i = s.getAttribute("type");
|
|
5153
5154
|
(!i || il.includes(i)) && o.push((a) => ll(s, a, e));
|
|
5154
|
-
}), o.length && Pn(o,
|
|
5155
|
+
}), o.length && Pn(o, mr, void 0);
|
|
5155
5156
|
} else
|
|
5156
|
-
|
|
5157
|
+
mr();
|
|
5157
5158
|
}
|
|
5158
5159
|
n(Fn, "simulatePageLoad");
|
|
5159
5160
|
|
|
5160
5161
|
// src/docs-tools/shared.ts
|
|
5161
|
-
var In = "storybook/docs",
|
|
5162
|
+
var In = "storybook/docs", Gf = `${In}/panel`;
|
|
5162
5163
|
var On = `${In}/snippet-rendered`;
|
|
5163
5164
|
|
|
5164
5165
|
// src/preview-api/modules/preview-web/emitTransformCode.ts
|
|
@@ -5175,45 +5176,45 @@ export {
|
|
|
5175
5176
|
J as DocsContext,
|
|
5176
5177
|
re as HooksContext,
|
|
5177
5178
|
be as Preview,
|
|
5178
|
-
|
|
5179
|
+
yr as PreviewWeb,
|
|
5179
5180
|
Se as PreviewWithSelection,
|
|
5180
5181
|
se as ReporterAPI,
|
|
5181
5182
|
ge as StoryStore,
|
|
5182
5183
|
Te as UrlStore,
|
|
5183
5184
|
xe as WebView,
|
|
5184
5185
|
_ as addons,
|
|
5185
|
-
|
|
5186
|
+
Rr as applyHooks,
|
|
5186
5187
|
Fe as combineArgs,
|
|
5187
5188
|
L as combineParameters,
|
|
5188
5189
|
Y as composeConfigs,
|
|
5189
|
-
|
|
5190
|
+
qr as composeStepRunners,
|
|
5190
5191
|
Bs as composeStories,
|
|
5191
5192
|
po as composeStory,
|
|
5192
5193
|
zs as createPlaywrightTest,
|
|
5193
5194
|
so as decorateStory,
|
|
5194
|
-
|
|
5195
|
+
Mr as defaultDecorateStory,
|
|
5195
5196
|
zn as definePreview,
|
|
5196
5197
|
Dn as emitTransformCode,
|
|
5197
|
-
|
|
5198
|
+
Je as filterArgTypes,
|
|
5198
5199
|
te as getCoreAnnotations,
|
|
5199
|
-
|
|
5200
|
+
Br as getCsfFactoryAnnotations,
|
|
5200
5201
|
De as inferControls,
|
|
5201
5202
|
ns as makeDecorator,
|
|
5202
|
-
|
|
5203
|
+
gr as mockChannel,
|
|
5203
5204
|
he as normalizeProjectAnnotations,
|
|
5204
5205
|
me as normalizeStory,
|
|
5205
|
-
|
|
5206
|
+
_r as prepareMeta,
|
|
5206
5207
|
Oe as prepareStory,
|
|
5207
5208
|
io as sanitizeStoryContextUpdate,
|
|
5208
5209
|
js as setDefaultProjectAnnotations,
|
|
5209
5210
|
Ns as setProjectAnnotations,
|
|
5210
|
-
|
|
5211
|
+
mr as simulateDOMContentLoaded,
|
|
5211
5212
|
Fn as simulatePageLoad,
|
|
5212
5213
|
Xs as sortStoriesV7,
|
|
5213
5214
|
ts as useArgs,
|
|
5214
5215
|
Ce as useCallback,
|
|
5215
5216
|
es as useChannel,
|
|
5216
|
-
|
|
5217
|
+
ft as useEffect,
|
|
5217
5218
|
os as useGlobals,
|
|
5218
5219
|
Kn as useMemo,
|
|
5219
5220
|
rs as useParameter,
|