storybook 9.0.0-alpha.10 → 9.0.0-alpha.11
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 +63 -64
- package/dist/bin/index.js +59 -60
- package/dist/cli/bin/index.cjs +80 -80
- package/dist/cli/bin/index.js +83 -83
- package/dist/common/index.cjs +61 -62
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.js +93 -94
- package/dist/component-testing/index.cjs +23 -0
- package/dist/component-testing/index.d.ts +3 -0
- package/dist/component-testing/index.js +5 -0
- package/dist/component-testing/manager.css +170 -0
- package/dist/component-testing/manager.js +3099 -0
- package/dist/component-testing/preview.cjs +40 -0
- package/dist/component-testing/preview.d.ts +5 -0
- package/dist/component-testing/preview.js +25 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.js +1 -0
- package/dist/core-server/presets/common-preset.cjs +1359 -1359
- package/dist/core-server/presets/common-preset.js +1406 -1406
- package/dist/instrumenter/index.cjs +475 -468
- package/dist/instrumenter/index.js +949 -950
- package/dist/manager/globals-runtime.js +55652 -49799
- package/dist/manager-api/index.cjs +206 -206
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/preview/runtime.js +38686 -37394
- package/dist/preview-api/index.cjs +591 -588
- package/dist/preview-api/index.d.ts +2 -2
- package/dist/preview-api/index.js +580 -577
- package/package.json +22 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Vn = Object.create;
|
|
2
2
|
var mr = Object.defineProperty;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var Un = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var Hn = Object.getOwnPropertyNames;
|
|
5
|
+
var Wn = Object.getPrototypeOf, $n = Object.prototype.hasOwnProperty;
|
|
6
6
|
var s = (r, e) => mr(r, "name", { value: e, configurable: !0 }), Ae = /* @__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]
|
|
@@ -11,13 +11,13 @@ var s = (r, e) => mr(r, "name", { value: e, configurable: !0 }), Ae = /* @__PURE
|
|
|
11
11
|
throw Error('Dynamic require of "' + r + '" is not supported');
|
|
12
12
|
});
|
|
13
13
|
var O = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
14
|
-
var
|
|
14
|
+
var Yn = (r, e, t, o) => {
|
|
15
15
|
if (e && typeof e == "object" || typeof e == "function")
|
|
16
|
-
for (let n of
|
|
17
|
-
|
|
16
|
+
for (let n of Hn(e))
|
|
17
|
+
!$n.call(r, n) && n !== t && mr(r, n, { get: () => e[n], enumerable: !(o = Un(e, n)) || o.enumerable });
|
|
18
18
|
return r;
|
|
19
19
|
};
|
|
20
|
-
var pe = (r, e, t) => (t = r != null ?
|
|
20
|
+
var pe = (r, e, t) => (t = r != null ? Vn(Wn(r)) : {}, Yn(
|
|
21
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
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
|
|
@@ -163,8 +163,8 @@ var jr = O((ro, kr) => {
|
|
|
163
163
|
var it = O((st) => {
|
|
164
164
|
"use strict";
|
|
165
165
|
Object.defineProperty(st, "__esModule", { value: !0 });
|
|
166
|
-
st.encodeString =
|
|
167
|
-
var G = Array.from({ length: 256 }, (r, e) => "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()),
|
|
166
|
+
st.encodeString = ta;
|
|
167
|
+
var G = Array.from({ length: 256 }, (r, e) => "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()), ra = new Int8Array([
|
|
168
168
|
0,
|
|
169
169
|
0,
|
|
170
170
|
0,
|
|
@@ -294,7 +294,7 @@ var it = O((st) => {
|
|
|
294
294
|
1,
|
|
295
295
|
0
|
|
296
296
|
]);
|
|
297
|
-
function
|
|
297
|
+
function ta(r) {
|
|
298
298
|
let e = r.length;
|
|
299
299
|
if (e === 0)
|
|
300
300
|
return "";
|
|
@@ -302,7 +302,7 @@ var it = O((st) => {
|
|
|
302
302
|
e: for (; n < e; n++) {
|
|
303
303
|
let i = r.charCodeAt(n);
|
|
304
304
|
for (; i < 128; ) {
|
|
305
|
-
if (
|
|
305
|
+
if (ra[i] !== 1 && (o < n && (t += r.slice(o, n)), o = n + 1, t += G[i]), ++n === e)
|
|
306
306
|
break e;
|
|
307
307
|
i = r.charCodeAt(n);
|
|
308
308
|
}
|
|
@@ -321,7 +321,7 @@ var it = O((st) => {
|
|
|
321
321
|
}
|
|
322
322
|
return o === 0 ? r : o < e ? t + r.slice(o) : t;
|
|
323
323
|
}
|
|
324
|
-
s(
|
|
324
|
+
s(ta, "encodeString");
|
|
325
325
|
});
|
|
326
326
|
|
|
327
327
|
// ../node_modules/picoquery/lib/shared.js
|
|
@@ -329,7 +329,7 @@ var rr = O((V) => {
|
|
|
329
329
|
"use strict";
|
|
330
330
|
Object.defineProperty(V, "__esModule", { value: !0 });
|
|
331
331
|
V.defaultOptions = V.defaultShouldSerializeObject = V.defaultValueSerializer = void 0;
|
|
332
|
-
var at = it(),
|
|
332
|
+
var at = it(), oa = /* @__PURE__ */ s((r) => {
|
|
333
333
|
switch (typeof r) {
|
|
334
334
|
case "string":
|
|
335
335
|
return (0, at.encodeString)(r);
|
|
@@ -343,19 +343,19 @@ var rr = O((V) => {
|
|
|
343
343
|
}
|
|
344
344
|
return r instanceof Date ? (0, at.encodeString)(r.toISOString()) : "";
|
|
345
345
|
}, "defaultValueSerializer");
|
|
346
|
-
V.defaultValueSerializer =
|
|
347
|
-
var
|
|
348
|
-
V.defaultShouldSerializeObject =
|
|
349
|
-
var
|
|
346
|
+
V.defaultValueSerializer = oa;
|
|
347
|
+
var na = /* @__PURE__ */ s((r) => r instanceof Date, "defaultShouldSerializeObject");
|
|
348
|
+
V.defaultShouldSerializeObject = na;
|
|
349
|
+
var Go = /* @__PURE__ */ s((r) => r, "identityFunc");
|
|
350
350
|
V.defaultOptions = {
|
|
351
351
|
nesting: !0,
|
|
352
352
|
nestingSyntax: "dot",
|
|
353
353
|
arrayRepeat: !1,
|
|
354
354
|
arrayRepeatSyntax: "repeat",
|
|
355
355
|
delimiter: 38,
|
|
356
|
-
valueDeserializer:
|
|
356
|
+
valueDeserializer: Go,
|
|
357
357
|
valueSerializer: V.defaultValueSerializer,
|
|
358
|
-
keyDeserializer:
|
|
358
|
+
keyDeserializer: Go,
|
|
359
359
|
shouldSerializeObject: V.defaultShouldSerializeObject
|
|
360
360
|
};
|
|
361
361
|
});
|
|
@@ -364,45 +364,45 @@ var rr = O((V) => {
|
|
|
364
364
|
var lt = O((tr) => {
|
|
365
365
|
"use strict";
|
|
366
366
|
Object.defineProperty(tr, "__esModule", { value: !0 });
|
|
367
|
-
tr.getDeepObject =
|
|
368
|
-
tr.stringifyObject =
|
|
369
|
-
var ae = rr(),
|
|
370
|
-
function
|
|
367
|
+
tr.getDeepObject = aa;
|
|
368
|
+
tr.stringifyObject = Vo;
|
|
369
|
+
var ae = rr(), sa = it();
|
|
370
|
+
function ia(r) {
|
|
371
371
|
return r === "__proto__" || r === "constructor" || r === "prototype";
|
|
372
372
|
}
|
|
373
|
-
s(
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
373
|
+
s(ia, "isPrototypeKey");
|
|
374
|
+
function aa(r, e, t, o, n) {
|
|
375
|
+
if (ia(e))
|
|
376
376
|
return r;
|
|
377
377
|
let i = r[e];
|
|
378
378
|
return typeof i == "object" && i !== null ? i : !o && (n || typeof t == "number" || typeof t == "string" && t * 0 === 0 && t.indexOf(".") ===
|
|
379
379
|
-1) ? r[e] = [] : r[e] = {};
|
|
380
380
|
}
|
|
381
|
-
s(
|
|
382
|
-
var
|
|
383
|
-
function
|
|
381
|
+
s(aa, "getDeepObject");
|
|
382
|
+
var la = 20, ca = "[]", da = "[", pa = "]", ua = ".";
|
|
383
|
+
function Vo(r, e, t = 0, o, n) {
|
|
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, h = typeof d == "number" ? String.fromCharCode(
|
|
387
387
|
d) : d, y = n === !0 && a, g = i === "dot" || i === "js" && !n;
|
|
388
|
-
if (t >
|
|
388
|
+
if (t > la)
|
|
389
389
|
return "";
|
|
390
390
|
let b = "", m = !0, R = !1;
|
|
391
391
|
for (let S in r) {
|
|
392
392
|
let f = r[S], T;
|
|
393
|
-
o ? (T = o, y ? l === "bracket" && (T +=
|
|
394
|
-
"object" && f !== null && !u(f) ? (R = f.pop !== void 0, (c || a && R) && (b +=
|
|
393
|
+
o ? (T = o, y ? l === "bracket" && (T += ca) : g ? (T += ua, T += S) : (T += da, T += S, T += pa)) : T = S, m || (b += h), typeof f ==
|
|
394
|
+
"object" && f !== null && !u(f) ? (R = f.pop !== void 0, (c || a && R) && (b += Vo(f, e, t + 1, T, R))) : (b += (0, sa.encodeString)(T),
|
|
395
395
|
b += "=", b += p(f, S)), m && (m = !1);
|
|
396
396
|
}
|
|
397
397
|
return b;
|
|
398
398
|
}
|
|
399
|
-
s(
|
|
399
|
+
s(Vo, "stringifyObject");
|
|
400
400
|
});
|
|
401
401
|
|
|
402
402
|
// ../node_modules/fast-decode-uri-component/index.js
|
|
403
|
-
var
|
|
403
|
+
var $o = O((sf, Wo) => {
|
|
404
404
|
"use strict";
|
|
405
|
-
var
|
|
405
|
+
var Uo = 12, fa = 0, ct = [
|
|
406
406
|
// The first part of the table maps bytes to character to a transition.
|
|
407
407
|
0,
|
|
408
408
|
0,
|
|
@@ -785,18 +785,18 @@ var Wo = O((of, Ho) => {
|
|
|
785
785
|
7,
|
|
786
786
|
7
|
|
787
787
|
];
|
|
788
|
-
function
|
|
788
|
+
function ya(r) {
|
|
789
789
|
var e = r.indexOf("%");
|
|
790
790
|
if (e === -1) return r;
|
|
791
|
-
for (var t = r.length, o = "", n = 0, i = 0, a = e, l =
|
|
792
|
-
var c =
|
|
793
|
-
if (l = ct[256 + l + u], i = i << 6 | p & ct[364 + u], l ===
|
|
791
|
+
for (var t = r.length, o = "", n = 0, i = 0, a = e, l = Uo; e > -1 && e < t; ) {
|
|
792
|
+
var c = Ho(r[e + 1], 4), d = Ho(r[e + 2], 0), p = c | d, u = ct[p];
|
|
793
|
+
if (l = ct[256 + l + u], i = i << 6 | p & ct[364 + u], l === Uo)
|
|
794
794
|
o += r.slice(n, a), o += i <= 65535 ? String.fromCharCode(i) : String.fromCharCode(
|
|
795
795
|
55232 + (i >> 10),
|
|
796
796
|
56320 + (i & 1023)
|
|
797
797
|
), i = 0, n = e + 3, e = a = r.indexOf("%", n);
|
|
798
798
|
else {
|
|
799
|
-
if (l ===
|
|
799
|
+
if (l === fa)
|
|
800
800
|
return null;
|
|
801
801
|
if (e += 3, e < t && r.charCodeAt(e) === 37) continue;
|
|
802
802
|
return null;
|
|
@@ -804,8 +804,8 @@ var Wo = O((of, Ho) => {
|
|
|
804
804
|
}
|
|
805
805
|
return o + r.slice(n);
|
|
806
806
|
}
|
|
807
|
-
s(
|
|
808
|
-
var
|
|
807
|
+
s(ya, "decodeURIComponent");
|
|
808
|
+
var ma = {
|
|
809
809
|
0: 0,
|
|
810
810
|
1: 1,
|
|
811
811
|
2: 2,
|
|
@@ -829,46 +829,46 @@ var Wo = O((of, Ho) => {
|
|
|
829
829
|
f: 15,
|
|
830
830
|
F: 15
|
|
831
831
|
};
|
|
832
|
-
function
|
|
833
|
-
var t =
|
|
832
|
+
function Ho(r, e) {
|
|
833
|
+
var t = ma[r];
|
|
834
834
|
return t === void 0 ? 255 : t << e;
|
|
835
835
|
}
|
|
836
|
-
s(
|
|
837
|
-
|
|
836
|
+
s(Ho, "hexCodeToInt");
|
|
837
|
+
Wo.exports = ya;
|
|
838
838
|
});
|
|
839
839
|
|
|
840
840
|
// ../node_modules/picoquery/lib/parse.js
|
|
841
|
-
var
|
|
841
|
+
var Jo = O(($) => {
|
|
842
842
|
"use strict";
|
|
843
|
-
var
|
|
843
|
+
var ha = $ && $.__importDefault || function(r) {
|
|
844
844
|
return r && r.__esModule ? r : { default: r };
|
|
845
845
|
};
|
|
846
846
|
Object.defineProperty($, "__esModule", { value: !0 });
|
|
847
847
|
$.numberValueDeserializer = $.numberKeyDeserializer = void 0;
|
|
848
|
-
$.parse =
|
|
849
|
-
var or = lt(), le = rr(),
|
|
848
|
+
$.parse = Sa;
|
|
849
|
+
var or = lt(), le = rr(), Yo = ha($o()), ga = /* @__PURE__ */ s((r) => {
|
|
850
850
|
let e = Number(r);
|
|
851
851
|
return Number.isNaN(e) ? r : e;
|
|
852
852
|
}, "numberKeyDeserializer");
|
|
853
|
-
$.numberKeyDeserializer =
|
|
854
|
-
var
|
|
853
|
+
$.numberKeyDeserializer = ga;
|
|
854
|
+
var ba = /* @__PURE__ */ s((r) => {
|
|
855
855
|
let e = Number(r);
|
|
856
856
|
return Number.isNaN(e) ? r : e;
|
|
857
857
|
}, "numberValueDeserializer");
|
|
858
|
-
$.numberValueDeserializer =
|
|
859
|
-
var
|
|
858
|
+
$.numberValueDeserializer = ba;
|
|
859
|
+
var Ko = /\+/g, Xo = /* @__PURE__ */ s(function() {
|
|
860
860
|
}, "Empty");
|
|
861
|
-
|
|
861
|
+
Xo.prototype = /* @__PURE__ */ Object.create(null);
|
|
862
862
|
function nr(r, e, t, o, n) {
|
|
863
863
|
let i = r.substring(e, t);
|
|
864
|
-
return o && (i = i.replace(
|
|
864
|
+
return o && (i = i.replace(Ko, " ")), n && (i = (0, Yo.default)(i) || i), i;
|
|
865
865
|
}
|
|
866
866
|
s(nr, "computeKeySlice");
|
|
867
|
-
function
|
|
867
|
+
function Sa(r, e) {
|
|
868
868
|
let { valueDeserializer: t = le.defaultOptions.valueDeserializer, keyDeserializer: o = le.defaultOptions.keyDeserializer, arrayRepeatSyntax: n = le.
|
|
869
869
|
defaultOptions.arrayRepeatSyntax, nesting: i = le.defaultOptions.nesting, arrayRepeat: a = le.defaultOptions.arrayRepeat, nestingSyntax: l = le.
|
|
870
870
|
defaultOptions.nestingSyntax, delimiter: c = le.defaultOptions.delimiter } = e ?? {}, d = typeof c == "string" ? c.charCodeAt(0) : c, p = l ===
|
|
871
|
-
"js", u = new
|
|
871
|
+
"js", u = new Xo();
|
|
872
872
|
if (typeof r != "string")
|
|
873
873
|
return u;
|
|
874
874
|
let h = r.length, y = "", g = -1, b = -1, m = -1, R = u, S, f = "", T = "", x = !1, C = !1, w = !1, P = !1, k = !1, M = !1, Y = !1, v = 0,
|
|
@@ -877,7 +877,7 @@ var Xo = O(($) => {
|
|
|
877
877
|
if (v = I !== h ? r.charCodeAt(I) : d, v === d) {
|
|
878
878
|
if (Y = b > g, Y || (b = I), m !== b - 1 && (T = nr(r, m + 1, z > -1 ? z : b, w, x), f = o(T), S !== void 0 && (R = (0, or.getDeepObject)(
|
|
879
879
|
R, S, f, p && k, p && M))), Y || f !== "") {
|
|
880
|
-
Y && (y = r.slice(b + 1, I), P && (y = y.replace(
|
|
880
|
+
Y && (y = r.slice(b + 1, I), P && (y = y.replace(Ko, " ")), C && (y = (0, Yo.default)(y) || y));
|
|
881
881
|
let Ee = t(y, f);
|
|
882
882
|
if (a) {
|
|
883
883
|
let qe = R[f];
|
|
@@ -896,28 +896,28 @@ var Xo = O(($) => {
|
|
|
896
896
|
}
|
|
897
897
|
return u;
|
|
898
898
|
}
|
|
899
|
-
s(
|
|
899
|
+
s(Sa, "parse");
|
|
900
900
|
});
|
|
901
901
|
|
|
902
902
|
// ../node_modules/picoquery/lib/stringify.js
|
|
903
|
-
var
|
|
903
|
+
var Qo = O((dt) => {
|
|
904
904
|
"use strict";
|
|
905
905
|
Object.defineProperty(dt, "__esModule", { value: !0 });
|
|
906
|
-
dt.stringify =
|
|
907
|
-
var
|
|
908
|
-
function
|
|
906
|
+
dt.stringify = xa;
|
|
907
|
+
var Ta = lt();
|
|
908
|
+
function xa(r, e) {
|
|
909
909
|
if (r === null || typeof r != "object")
|
|
910
910
|
return "";
|
|
911
911
|
let t = e ?? {};
|
|
912
|
-
return (0,
|
|
912
|
+
return (0, Ta.stringifyObject)(r, t);
|
|
913
913
|
}
|
|
914
|
-
s(
|
|
914
|
+
s(xa, "stringify");
|
|
915
915
|
});
|
|
916
916
|
|
|
917
917
|
// ../node_modules/picoquery/lib/main.js
|
|
918
918
|
var sr = O((q) => {
|
|
919
919
|
"use strict";
|
|
920
|
-
var
|
|
920
|
+
var Ra = q && q.__createBinding || (Object.create ? function(r, e, t, o) {
|
|
921
921
|
o === void 0 && (o = t);
|
|
922
922
|
var n = Object.getOwnPropertyDescriptor(e, t);
|
|
923
923
|
(!n || ("get" in n ? !e.__esModule : n.writable || n.configurable)) && (n = { enumerable: !0, get: /* @__PURE__ */ s(function() {
|
|
@@ -925,25 +925,25 @@ var sr = O((q) => {
|
|
|
925
925
|
}, "get") }), Object.defineProperty(r, o, n);
|
|
926
926
|
} : function(r, e, t, o) {
|
|
927
927
|
o === void 0 && (o = t), r[o] = e[t];
|
|
928
|
-
}),
|
|
929
|
-
for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) &&
|
|
928
|
+
}), wa = q && q.__exportStar || function(r, e) {
|
|
929
|
+
for (var t in r) t !== "default" && !Object.prototype.hasOwnProperty.call(e, t) && Ra(e, r, t);
|
|
930
930
|
};
|
|
931
931
|
Object.defineProperty(q, "__esModule", { value: !0 });
|
|
932
932
|
q.stringify = q.parse = void 0;
|
|
933
|
-
var
|
|
933
|
+
var Ea = Jo();
|
|
934
934
|
Object.defineProperty(q, "parse", { enumerable: !0, get: /* @__PURE__ */ s(function() {
|
|
935
|
-
return
|
|
935
|
+
return Ea.parse;
|
|
936
936
|
}, "get") });
|
|
937
|
-
var
|
|
937
|
+
var Aa = Qo();
|
|
938
938
|
Object.defineProperty(q, "stringify", { enumerable: !0, get: /* @__PURE__ */ s(function() {
|
|
939
|
-
return
|
|
939
|
+
return Aa.stringify;
|
|
940
940
|
}, "get") });
|
|
941
|
-
|
|
941
|
+
wa(rr(), q);
|
|
942
942
|
});
|
|
943
943
|
|
|
944
944
|
// ../node_modules/ansi-to-html/node_modules/entities/lib/maps/entities.json
|
|
945
|
-
var yt = O((
|
|
946
|
-
|
|
945
|
+
var yt = O((wf, ja) => {
|
|
946
|
+
ja.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: "\
|
|
949
949
|
\u2A3F", amp: "&", AMP: "&", andand: "\u2A55", And: "\u2A53", and: "\u2227", andd: "\u2A5C", andslope: "\u2A58", andv: "\u2A5A", ang: "\u2220",
|
|
@@ -1224,8 +1224,8 @@ var yt = O((xf, ka) => {
|
|
|
1224
1224
|
});
|
|
1225
1225
|
|
|
1226
1226
|
// ../node_modules/ansi-to-html/node_modules/entities/lib/maps/legacy.json
|
|
1227
|
-
var
|
|
1228
|
-
|
|
1227
|
+
var sn = O((Ef, Ma) => {
|
|
1228
|
+
Ma.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",
|
|
1231
1231
|
eacute: "\xE9", Ecirc: "\xCA", ecirc: "\xEA", Egrave: "\xC8", egrave: "\xE8", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", frac12: "\
|
|
@@ -1239,25 +1239,25 @@ var nn = O((Rf, ja) => {
|
|
|
1239
1239
|
});
|
|
1240
1240
|
|
|
1241
1241
|
// ../node_modules/ansi-to-html/node_modules/entities/lib/maps/xml.json
|
|
1242
|
-
var mt = O((
|
|
1243
|
-
|
|
1242
|
+
var mt = O((Af, _a) => {
|
|
1243
|
+
_a.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
|
|
1244
1244
|
});
|
|
1245
1245
|
|
|
1246
1246
|
// ../node_modules/ansi-to-html/node_modules/entities/lib/maps/decode.json
|
|
1247
|
-
var
|
|
1248
|
-
|
|
1247
|
+
var an = O((vf, La) => {
|
|
1248
|
+
La.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 };
|
|
1251
1251
|
});
|
|
1252
1252
|
|
|
1253
1253
|
// ../node_modules/ansi-to-html/node_modules/entities/lib/decode_codepoint.js
|
|
1254
|
-
var
|
|
1254
|
+
var cn = O((Ne) => {
|
|
1255
1255
|
"use strict";
|
|
1256
|
-
var
|
|
1256
|
+
var Na = Ne && Ne.__importDefault || function(r) {
|
|
1257
1257
|
return r && r.__esModule ? r : { default: r };
|
|
1258
1258
|
};
|
|
1259
1259
|
Object.defineProperty(Ne, "__esModule", { value: !0 });
|
|
1260
|
-
var
|
|
1260
|
+
var ln = Na(an()), qa = (
|
|
1261
1261
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
1262
1262
|
String.fromCodePoint || function(r) {
|
|
1263
1263
|
var e = "";
|
|
@@ -1265,11 +1265,11 @@ var ln = O((Ne) => {
|
|
|
1265
1265
|
e;
|
|
1266
1266
|
}
|
|
1267
1267
|
);
|
|
1268
|
-
function
|
|
1269
|
-
return r >= 55296 && r <= 57343 || r > 1114111 ? "\uFFFD" : (r in
|
|
1268
|
+
function za(r) {
|
|
1269
|
+
return r >= 55296 && r <= 57343 || r > 1114111 ? "\uFFFD" : (r in ln.default && (r = ln.default[r]), qa(r));
|
|
1270
1270
|
}
|
|
1271
|
-
s(
|
|
1272
|
-
Ne.default =
|
|
1271
|
+
s(za, "decodeCodePoint");
|
|
1272
|
+
Ne.default = za;
|
|
1273
1273
|
});
|
|
1274
1274
|
|
|
1275
1275
|
// ../node_modules/ansi-to-html/node_modules/entities/lib/decode.js
|
|
@@ -1280,23 +1280,23 @@ var gt = O((U) => {
|
|
|
1280
1280
|
};
|
|
1281
1281
|
Object.defineProperty(U, "__esModule", { value: !0 });
|
|
1282
1282
|
U.decodeHTML = U.decodeHTMLStrict = U.decodeXML = void 0;
|
|
1283
|
-
var ht = ir(yt()),
|
|
1284
|
-
U.decodeXML =
|
|
1285
|
-
U.decodeHTMLStrict =
|
|
1286
|
-
function
|
|
1287
|
-
var e =
|
|
1283
|
+
var ht = ir(yt()), Ba = ir(sn()), Ga = ir(mt()), dn = ir(cn()), Va = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
|
|
1284
|
+
U.decodeXML = un(Ga.default);
|
|
1285
|
+
U.decodeHTMLStrict = un(ht.default);
|
|
1286
|
+
function un(r) {
|
|
1287
|
+
var e = fn(r);
|
|
1288
1288
|
return function(t) {
|
|
1289
|
-
return String(t).replace(
|
|
1289
|
+
return String(t).replace(Va, e);
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
|
-
s(
|
|
1293
|
-
var
|
|
1292
|
+
s(un, "getStrictDecoder");
|
|
1293
|
+
var pn = /* @__PURE__ */ s(function(r, e) {
|
|
1294
1294
|
return r < e ? 1 : -1;
|
|
1295
1295
|
}, "sorter");
|
|
1296
1296
|
U.decodeHTML = function() {
|
|
1297
|
-
for (var r = Object.keys(
|
|
1297
|
+
for (var r = Object.keys(Ba.default).sort(pn), e = Object.keys(ht.default).sort(pn), t = 0, o = 0; t < e.length; t++)
|
|
1298
1298
|
r[o] === e[t] ? (e[t] += ";?", o++) : e[t] += ";";
|
|
1299
|
-
var n = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i =
|
|
1299
|
+
var n = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), i = fn(ht.default);
|
|
1300
1300
|
function a(l) {
|
|
1301
1301
|
return l.substr(-1) !== ";" && (l += ";"), i(l);
|
|
1302
1302
|
}
|
|
@@ -1304,38 +1304,38 @@ var gt = O((U) => {
|
|
|
1304
1304
|
return String(l).replace(n, a);
|
|
1305
1305
|
};
|
|
1306
1306
|
}();
|
|
1307
|
-
function
|
|
1307
|
+
function fn(r) {
|
|
1308
1308
|
return /* @__PURE__ */ s(function(t) {
|
|
1309
1309
|
if (t.charAt(1) === "#") {
|
|
1310
1310
|
var o = t.charAt(2);
|
|
1311
|
-
return o === "X" || o === "x" ?
|
|
1311
|
+
return o === "X" || o === "x" ? dn.default(parseInt(t.substr(3), 16)) : dn.default(parseInt(t.substr(2), 10));
|
|
1312
1312
|
}
|
|
1313
1313
|
return r[t.slice(1, -1)] || t;
|
|
1314
1314
|
}, "replace");
|
|
1315
1315
|
}
|
|
1316
|
-
s(
|
|
1316
|
+
s(fn, "getReplacer");
|
|
1317
1317
|
});
|
|
1318
1318
|
|
|
1319
1319
|
// ../node_modules/ansi-to-html/node_modules/entities/lib/encode.js
|
|
1320
1320
|
var St = O((L) => {
|
|
1321
1321
|
"use strict";
|
|
1322
|
-
var
|
|
1322
|
+
var yn = L && L.__importDefault || function(r) {
|
|
1323
1323
|
return r && r.__esModule ? r : { default: r };
|
|
1324
1324
|
};
|
|
1325
1325
|
Object.defineProperty(L, "__esModule", { value: !0 });
|
|
1326
1326
|
L.escapeUTF8 = L.escape = L.encodeNonAsciiHTML = L.encodeHTML = L.encodeXML = void 0;
|
|
1327
|
-
var
|
|
1328
|
-
L.encodeXML =
|
|
1329
|
-
var
|
|
1330
|
-
L.encodeHTML =
|
|
1331
|
-
L.encodeNonAsciiHTML =
|
|
1332
|
-
function
|
|
1327
|
+
var Ua = yn(mt()), mn = gn(Ua.default), hn = bn(mn);
|
|
1328
|
+
L.encodeXML = xn(mn);
|
|
1329
|
+
var Ha = yn(yt()), bt = gn(Ha.default), Wa = bn(bt);
|
|
1330
|
+
L.encodeHTML = Ya(bt, Wa);
|
|
1331
|
+
L.encodeNonAsciiHTML = xn(bt);
|
|
1332
|
+
function gn(r) {
|
|
1333
1333
|
return Object.keys(r).sort().reduce(function(e, t) {
|
|
1334
1334
|
return e[r[t]] = "&" + t + ";", e;
|
|
1335
1335
|
}, {});
|
|
1336
1336
|
}
|
|
1337
|
-
s(
|
|
1338
|
-
function
|
|
1337
|
+
s(gn, "getInverseObj");
|
|
1338
|
+
function bn(r) {
|
|
1339
1339
|
for (var e = [], t = [], o = 0, n = Object.keys(r); o < n.length; o++) {
|
|
1340
1340
|
var i = n[o];
|
|
1341
1341
|
i.length === 1 ? e.push("\\" + i) : t.push(i);
|
|
@@ -1349,9 +1349,9 @@ var St = O((L) => {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
return t.unshift("[" + e.join("") + "]"), new RegExp(t.join("|"), "g");
|
|
1351
1351
|
}
|
|
1352
|
-
s(
|
|
1353
|
-
var
|
|
1354
|
-
|
|
1352
|
+
s(bn, "getInverseReplacer");
|
|
1353
|
+
var Sn = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
|
|
1354
|
+
$a = (
|
|
1355
1355
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
1356
1356
|
String.prototype.codePointAt != null ? (
|
|
1357
1357
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -1366,61 +1366,61 @@ var St = O((L) => {
|
|
|
1366
1366
|
)
|
|
1367
1367
|
);
|
|
1368
1368
|
function ar(r) {
|
|
1369
|
-
return "&#x" + (r.length > 1 ?
|
|
1369
|
+
return "&#x" + (r.length > 1 ? $a(r) : r.charCodeAt(0)).toString(16).toUpperCase() + ";";
|
|
1370
1370
|
}
|
|
1371
1371
|
s(ar, "singleCharReplacer");
|
|
1372
|
-
function
|
|
1372
|
+
function Ya(r, e) {
|
|
1373
1373
|
return function(t) {
|
|
1374
1374
|
return t.replace(e, function(o) {
|
|
1375
1375
|
return r[o];
|
|
1376
|
-
}).replace(
|
|
1376
|
+
}).replace(Sn, ar);
|
|
1377
1377
|
};
|
|
1378
1378
|
}
|
|
1379
|
-
s(
|
|
1380
|
-
var
|
|
1381
|
-
function Ya(r) {
|
|
1382
|
-
return r.replace(Sn, ar);
|
|
1383
|
-
}
|
|
1384
|
-
s(Ya, "escape");
|
|
1385
|
-
L.escape = Ya;
|
|
1379
|
+
s(Ya, "getInverse");
|
|
1380
|
+
var Tn = new RegExp(hn.source + "|" + Sn.source, "g");
|
|
1386
1381
|
function Ka(r) {
|
|
1387
|
-
return r.replace(
|
|
1382
|
+
return r.replace(Tn, ar);
|
|
1383
|
+
}
|
|
1384
|
+
s(Ka, "escape");
|
|
1385
|
+
L.escape = Ka;
|
|
1386
|
+
function Xa(r) {
|
|
1387
|
+
return r.replace(hn, ar);
|
|
1388
1388
|
}
|
|
1389
|
-
s(
|
|
1390
|
-
L.escapeUTF8 =
|
|
1391
|
-
function
|
|
1389
|
+
s(Xa, "escapeUTF8");
|
|
1390
|
+
L.escapeUTF8 = Xa;
|
|
1391
|
+
function xn(r) {
|
|
1392
1392
|
return function(e) {
|
|
1393
|
-
return e.replace(
|
|
1393
|
+
return e.replace(Tn, function(t) {
|
|
1394
1394
|
return r[t] || ar(t);
|
|
1395
1395
|
});
|
|
1396
1396
|
};
|
|
1397
1397
|
}
|
|
1398
|
-
s(
|
|
1398
|
+
s(xn, "getASCIIEncoder");
|
|
1399
1399
|
});
|
|
1400
1400
|
|
|
1401
1401
|
// ../node_modules/ansi-to-html/node_modules/entities/lib/index.js
|
|
1402
|
-
var
|
|
1402
|
+
var wn = O((E) => {
|
|
1403
1403
|
"use strict";
|
|
1404
1404
|
Object.defineProperty(E, "__esModule", { value: !0 });
|
|
1405
1405
|
E.decodeXMLStrict = E.decodeHTML5Strict = E.decodeHTML4Strict = E.decodeHTML5 = E.decodeHTML4 = E.decodeHTMLStrict = E.decodeHTML = E.decodeXML =
|
|
1406
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 lr = gt(),
|
|
1409
|
-
function
|
|
1408
|
+
var lr = gt(), Rn = St();
|
|
1409
|
+
function Ja(r, e) {
|
|
1410
1410
|
return (!e || e <= 0 ? lr.decodeXML : lr.decodeHTML)(r);
|
|
1411
1411
|
}
|
|
1412
|
-
s(
|
|
1413
|
-
E.decode =
|
|
1414
|
-
function
|
|
1412
|
+
s(Ja, "decode");
|
|
1413
|
+
E.decode = Ja;
|
|
1414
|
+
function Qa(r, e) {
|
|
1415
1415
|
return (!e || e <= 0 ? lr.decodeXML : lr.decodeHTMLStrict)(r);
|
|
1416
1416
|
}
|
|
1417
|
-
s(
|
|
1418
|
-
E.decodeStrict =
|
|
1419
|
-
function
|
|
1420
|
-
return (!e || e <= 0 ?
|
|
1417
|
+
s(Qa, "decodeStrict");
|
|
1418
|
+
E.decodeStrict = Qa;
|
|
1419
|
+
function Za(r, e) {
|
|
1420
|
+
return (!e || e <= 0 ? Rn.encodeXML : Rn.encodeHTML)(r);
|
|
1421
1421
|
}
|
|
1422
|
-
s(
|
|
1423
|
-
E.encode =
|
|
1422
|
+
s(Za, "encode");
|
|
1423
|
+
E.encode = Za;
|
|
1424
1424
|
var ce = St();
|
|
1425
1425
|
Object.defineProperty(E, "encodeXML", { enumerable: !0, get: /* @__PURE__ */ s(function() {
|
|
1426
1426
|
return ce.encodeXML;
|
|
@@ -1471,28 +1471,28 @@ var Rn = O((E) => {
|
|
|
1471
1471
|
});
|
|
1472
1472
|
|
|
1473
1473
|
// ../node_modules/ansi-to-html/lib/ansi_to_html.js
|
|
1474
|
-
var
|
|
1474
|
+
var jn = O((Mf, kn) => {
|
|
1475
1475
|
"use strict";
|
|
1476
|
-
function
|
|
1476
|
+
function el(r, e) {
|
|
1477
1477
|
if (!(r instanceof e))
|
|
1478
1478
|
throw new TypeError("Cannot call a class as a function");
|
|
1479
1479
|
}
|
|
1480
|
-
s(
|
|
1481
|
-
function
|
|
1480
|
+
s(el, "_classCallCheck");
|
|
1481
|
+
function En(r, e) {
|
|
1482
1482
|
for (var t = 0; t < e.length; t++) {
|
|
1483
1483
|
var o = e[t];
|
|
1484
1484
|
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(r, o.key, o);
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
|
-
s(
|
|
1488
|
-
function
|
|
1489
|
-
return e &&
|
|
1487
|
+
s(En, "_defineProperties");
|
|
1488
|
+
function rl(r, e, t) {
|
|
1489
|
+
return e && En(r.prototype, e), t && En(r, t), r;
|
|
1490
1490
|
}
|
|
1491
|
-
s(
|
|
1492
|
-
function
|
|
1491
|
+
s(rl, "_createClass");
|
|
1492
|
+
function In(r, e) {
|
|
1493
1493
|
var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
|
|
1494
1494
|
if (!t) {
|
|
1495
|
-
if (Array.isArray(r) || (t =
|
|
1495
|
+
if (Array.isArray(r) || (t = tl(r)) || e && r && typeof r.length == "number") {
|
|
1496
1496
|
t && (r = t);
|
|
1497
1497
|
var o = 0, n = /* @__PURE__ */ s(function() {
|
|
1498
1498
|
}, "F");
|
|
@@ -1521,32 +1521,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1521
1521
|
}
|
|
1522
1522
|
}, "f") };
|
|
1523
1523
|
}
|
|
1524
|
-
s(
|
|
1525
|
-
function
|
|
1524
|
+
s(In, "_createForOfIteratorHelper");
|
|
1525
|
+
function tl(r, e) {
|
|
1526
1526
|
if (r) {
|
|
1527
|
-
if (typeof r == "string") return
|
|
1527
|
+
if (typeof r == "string") return An(r, e);
|
|
1528
1528
|
var t = Object.prototype.toString.call(r).slice(8, -1);
|
|
1529
1529
|
if (t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set") return Array.from(r);
|
|
1530
|
-
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return
|
|
1530
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return An(r, e);
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
1533
|
-
s(
|
|
1534
|
-
function
|
|
1533
|
+
s(tl, "_unsupportedIterableToArray");
|
|
1534
|
+
function An(r, e) {
|
|
1535
1535
|
(e == null || e > r.length) && (e = r.length);
|
|
1536
1536
|
for (var t = 0, o = new Array(e); t < e; t++)
|
|
1537
1537
|
o[t] = r[t];
|
|
1538
1538
|
return o;
|
|
1539
1539
|
}
|
|
1540
|
-
s(
|
|
1541
|
-
var
|
|
1540
|
+
s(An, "_arrayLikeToArray");
|
|
1541
|
+
var ol = wn(), vn = {
|
|
1542
1542
|
fg: "#FFF",
|
|
1543
1543
|
bg: "#000",
|
|
1544
1544
|
newline: !1,
|
|
1545
1545
|
escapeXML: !1,
|
|
1546
1546
|
stream: !1,
|
|
1547
|
-
colors:
|
|
1547
|
+
colors: nl()
|
|
1548
1548
|
};
|
|
1549
|
-
function
|
|
1549
|
+
function nl() {
|
|
1550
1550
|
var r = {
|
|
1551
1551
|
0: "#000",
|
|
1552
1552
|
1: "#A00",
|
|
@@ -1568,32 +1568,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1568
1568
|
return cr(0, 5).forEach(function(e) {
|
|
1569
1569
|
cr(0, 5).forEach(function(t) {
|
|
1570
1570
|
cr(0, 5).forEach(function(o) {
|
|
1571
|
-
return
|
|
1571
|
+
return sl(e, t, o, r);
|
|
1572
1572
|
});
|
|
1573
1573
|
});
|
|
1574
1574
|
}), cr(0, 23).forEach(function(e) {
|
|
1575
|
-
var t = e + 232, o =
|
|
1575
|
+
var t = e + 232, o = On(e * 10 + 8);
|
|
1576
1576
|
r[t] = "#" + o + o + o;
|
|
1577
1577
|
}), r;
|
|
1578
1578
|
}
|
|
1579
|
-
s(
|
|
1580
|
-
function
|
|
1579
|
+
s(nl, "getDefaultColors");
|
|
1580
|
+
function sl(r, e, t, o) {
|
|
1581
1581
|
var n = 16 + r * 36 + e * 6 + t, i = r > 0 ? r * 40 + 55 : 0, a = e > 0 ? e * 40 + 55 : 0, l = t > 0 ? t * 40 + 55 : 0;
|
|
1582
|
-
o[n] =
|
|
1582
|
+
o[n] = il([i, a, l]);
|
|
1583
1583
|
}
|
|
1584
|
-
s(
|
|
1585
|
-
function
|
|
1584
|
+
s(sl, "setStyleColor");
|
|
1585
|
+
function On(r) {
|
|
1586
1586
|
for (var e = r.toString(16); e.length < 2; )
|
|
1587
1587
|
e = "0" + e;
|
|
1588
1588
|
return e;
|
|
1589
1589
|
}
|
|
1590
|
-
s(
|
|
1591
|
-
function
|
|
1592
|
-
var e = [], t =
|
|
1590
|
+
s(On, "toHexString");
|
|
1591
|
+
function il(r) {
|
|
1592
|
+
var e = [], t = In(r), o;
|
|
1593
1593
|
try {
|
|
1594
1594
|
for (t.s(); !(o = t.n()).done; ) {
|
|
1595
1595
|
var n = o.value;
|
|
1596
|
-
e.push(
|
|
1596
|
+
e.push(On(n));
|
|
1597
1597
|
}
|
|
1598
1598
|
} catch (i) {
|
|
1599
1599
|
t.e(i);
|
|
@@ -1602,29 +1602,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1602
1602
|
}
|
|
1603
1603
|
return "#" + e.join("");
|
|
1604
1604
|
}
|
|
1605
|
-
s(
|
|
1606
|
-
function
|
|
1605
|
+
s(il, "toColorHexString");
|
|
1606
|
+
function Cn(r, e, t, o) {
|
|
1607
1607
|
var n;
|
|
1608
|
-
return e === "text" ? n =
|
|
1609
|
-
erm256Background" ? n = ur(r, o.colors[t]) : e === "rgb" && (n =
|
|
1608
|
+
return e === "text" ? n = dl(t, o) : e === "display" ? n = ll(r, t, o) : e === "xterm256Foreground" ? n = pr(r, o.colors[t]) : e === "xt\
|
|
1609
|
+
erm256Background" ? n = ur(r, o.colors[t]) : e === "rgb" && (n = al(r, t)), n;
|
|
1610
1610
|
}
|
|
1611
|
-
s(
|
|
1612
|
-
function
|
|
1611
|
+
s(Cn, "generateOutput");
|
|
1612
|
+
function al(r, e) {
|
|
1613
1613
|
e = e.substring(2).slice(0, -1);
|
|
1614
1614
|
var t = +e.substr(0, 2), o = e.substring(5).split(";"), n = o.map(function(i) {
|
|
1615
1615
|
return ("0" + Number(i).toString(16)).substr(-2);
|
|
1616
1616
|
}).join("");
|
|
1617
1617
|
return dr(r, (t === 38 ? "color:#" : "background-color:#") + n);
|
|
1618
1618
|
}
|
|
1619
|
-
s(
|
|
1620
|
-
function
|
|
1619
|
+
s(al, "handleRgb");
|
|
1620
|
+
function ll(r, e, t) {
|
|
1621
1621
|
e = parseInt(e, 10);
|
|
1622
1622
|
var o = {
|
|
1623
1623
|
"-1": /* @__PURE__ */ s(function() {
|
|
1624
1624
|
return "<br/>";
|
|
1625
1625
|
}, "_"),
|
|
1626
1626
|
0: /* @__PURE__ */ s(function() {
|
|
1627
|
-
return r.length &&
|
|
1627
|
+
return r.length && Dn(r);
|
|
1628
1628
|
}, "_"),
|
|
1629
1629
|
1: /* @__PURE__ */ s(function() {
|
|
1630
1630
|
return re(r, "b");
|
|
@@ -1645,10 +1645,10 @@ erm256Background" ? n = ur(r, o.colors[t]) : e === "rgb" && (n = il(r, t)), n;
|
|
|
1645
1645
|
return dr(r, "font-weight:normal;text-decoration:none;font-style:normal");
|
|
1646
1646
|
}, "_"),
|
|
1647
1647
|
23: /* @__PURE__ */ s(function() {
|
|
1648
|
-
return
|
|
1648
|
+
return Fn(r, "i");
|
|
1649
1649
|
}, "_"),
|
|
1650
1650
|
24: /* @__PURE__ */ s(function() {
|
|
1651
|
-
return
|
|
1651
|
+
return Fn(r, "u");
|
|
1652
1652
|
}, "_"),
|
|
1653
1653
|
39: /* @__PURE__ */ s(function() {
|
|
1654
1654
|
return pr(r, t.fg);
|
|
@@ -1664,38 +1664,38 @@ erm256Background" ? n = ur(r, o.colors[t]) : e === "rgb" && (n = il(r, t)), n;
|
|
|
1664
1664
|
ur(r, t.colors[e - 40]) : 89 < e && e < 98 ? n = pr(r, t.colors[8 + (e - 90)]) : 99 < e && e < 108 && (n = ur(r, t.colors[8 + (e - 100)])),
|
|
1665
1665
|
n;
|
|
1666
1666
|
}
|
|
1667
|
-
s(
|
|
1668
|
-
function
|
|
1667
|
+
s(ll, "handleDisplay");
|
|
1668
|
+
function Dn(r) {
|
|
1669
1669
|
var e = r.slice(0);
|
|
1670
1670
|
return r.length = 0, e.reverse().map(function(t) {
|
|
1671
1671
|
return "</" + t + ">";
|
|
1672
1672
|
}).join("");
|
|
1673
1673
|
}
|
|
1674
|
-
s(
|
|
1674
|
+
s(Dn, "resetStyles");
|
|
1675
1675
|
function cr(r, e) {
|
|
1676
1676
|
for (var t = [], o = r; o <= e; o++)
|
|
1677
1677
|
t.push(o);
|
|
1678
1678
|
return t;
|
|
1679
1679
|
}
|
|
1680
1680
|
s(cr, "range");
|
|
1681
|
-
function
|
|
1681
|
+
function cl(r) {
|
|
1682
1682
|
return function(e) {
|
|
1683
1683
|
return (r === null || e.category !== r) && r !== "all";
|
|
1684
1684
|
};
|
|
1685
1685
|
}
|
|
1686
|
-
s(
|
|
1687
|
-
function
|
|
1686
|
+
s(cl, "notCategory");
|
|
1687
|
+
function Pn(r) {
|
|
1688
1688
|
r = parseInt(r, 10);
|
|
1689
1689
|
var e = null;
|
|
1690
1690
|
return r === 0 ? e = "all" : r === 1 ? e = "bold" : 2 < r && r < 5 ? e = "underline" : 4 < r && r < 7 ? e = "blink" : r === 8 ? e = "hid\
|
|
1691
1691
|
e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ? e = "foreground-color" : (39 < r && r < 48 || r === 49 || 99 <
|
|
1692
1692
|
r && r < 108) && (e = "background-color"), e;
|
|
1693
1693
|
}
|
|
1694
|
-
s(
|
|
1695
|
-
function
|
|
1696
|
-
return e.escapeXML ?
|
|
1694
|
+
s(Pn, "categoryForCode");
|
|
1695
|
+
function dl(r, e) {
|
|
1696
|
+
return e.escapeXML ? ol.encodeXML(r) : r;
|
|
1697
1697
|
}
|
|
1698
|
-
s(
|
|
1698
|
+
s(dl, "pushText");
|
|
1699
1699
|
function re(r, e, t) {
|
|
1700
1700
|
return t || (t = ""), r.push(e), "<".concat(e).concat(t ? ' style="'.concat(t, '"') : "", ">");
|
|
1701
1701
|
}
|
|
@@ -1712,13 +1712,13 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
|
|
|
1712
1712
|
return re(r, "span", "background-color:" + e);
|
|
1713
1713
|
}
|
|
1714
1714
|
s(ur, "pushBackgroundColor");
|
|
1715
|
-
function
|
|
1715
|
+
function Fn(r, e) {
|
|
1716
1716
|
var t;
|
|
1717
1717
|
if (r.slice(-1)[0] === e && (t = r.pop()), t)
|
|
1718
1718
|
return "</" + e + ">";
|
|
1719
1719
|
}
|
|
1720
|
-
s(
|
|
1721
|
-
function
|
|
1720
|
+
s(Fn, "closeTag");
|
|
1721
|
+
function pl(r, e, t) {
|
|
1722
1722
|
var o = !1, n = 3;
|
|
1723
1723
|
function i() {
|
|
1724
1724
|
return "";
|
|
@@ -1738,7 +1738,7 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
|
|
|
1738
1738
|
s(c, "newline");
|
|
1739
1739
|
function d(x, C) {
|
|
1740
1740
|
o = !0, C.trim().length === 0 && (C = "0"), C = C.trimRight(";").split(";");
|
|
1741
|
-
var w =
|
|
1741
|
+
var w = In(C), P;
|
|
1742
1742
|
try {
|
|
1743
1743
|
for (w.s(); !(P = w.n()).done; ) {
|
|
1744
1744
|
var k = P.value;
|
|
@@ -1839,44 +1839,44 @@ e" : r === 9 ? e = "strike" : 29 < r && r < 38 || r === 39 || 89 < r && r < 98 ?
|
|
|
1839
1839
|
}
|
|
1840
1840
|
return g;
|
|
1841
1841
|
}
|
|
1842
|
-
s(
|
|
1843
|
-
function
|
|
1844
|
-
return e !== "text" && (r = r.filter(
|
|
1842
|
+
s(pl, "tokenize");
|
|
1843
|
+
function ul(r, e, t) {
|
|
1844
|
+
return e !== "text" && (r = r.filter(cl(Pn(t))), r.push({
|
|
1845
1845
|
token: e,
|
|
1846
1846
|
data: t,
|
|
1847
|
-
category:
|
|
1847
|
+
category: Pn(t)
|
|
1848
1848
|
})), r;
|
|
1849
1849
|
}
|
|
1850
|
-
s(
|
|
1851
|
-
var
|
|
1850
|
+
s(ul, "updateStickyStack");
|
|
1851
|
+
var fl = /* @__PURE__ */ function() {
|
|
1852
1852
|
function r(e) {
|
|
1853
|
-
|
|
1853
|
+
el(this, r), e = e || {}, e.colors && (e.colors = Object.assign({}, vn.colors, e.colors)), this.options = Object.assign({}, vn, e), this.
|
|
1854
1854
|
stack = [], this.stickyStack = [];
|
|
1855
1855
|
}
|
|
1856
|
-
return s(r, "Filter"),
|
|
1856
|
+
return s(r, "Filter"), rl(r, [{
|
|
1857
1857
|
key: "toHtml",
|
|
1858
1858
|
value: /* @__PURE__ */ s(function(t) {
|
|
1859
1859
|
var o = this;
|
|
1860
1860
|
t = typeof t == "string" ? [t] : t;
|
|
1861
1861
|
var n = this.stack, i = this.options, a = [];
|
|
1862
1862
|
return this.stickyStack.forEach(function(l) {
|
|
1863
|
-
var c =
|
|
1863
|
+
var c = Cn(n, l.token, l.data, i);
|
|
1864
1864
|
c && a.push(c);
|
|
1865
|
-
}),
|
|
1866
|
-
var d =
|
|
1867
|
-
d && a.push(d), i.stream && (o.stickyStack =
|
|
1868
|
-
}), n.length && a.push(
|
|
1865
|
+
}), pl(t.join(""), i, function(l, c) {
|
|
1866
|
+
var d = Cn(n, l, c, i);
|
|
1867
|
+
d && a.push(d), i.stream && (o.stickyStack = ul(o.stickyStack, l, c));
|
|
1868
|
+
}), n.length && a.push(Dn(n)), a.join("");
|
|
1869
1869
|
}, "toHtml")
|
|
1870
1870
|
}]), r;
|
|
1871
1871
|
}();
|
|
1872
|
-
|
|
1872
|
+
kn.exports = fl;
|
|
1873
1873
|
});
|
|
1874
1874
|
|
|
1875
1875
|
// src/preview-api/modules/addons/main.ts
|
|
1876
1876
|
import { global as gr } from "@storybook/global";
|
|
1877
1877
|
|
|
1878
1878
|
// src/preview-api/modules/addons/storybook-channel-mock.ts
|
|
1879
|
-
import { Channel as
|
|
1879
|
+
import { Channel as Kn } from "storybook/internal/channels";
|
|
1880
1880
|
function hr() {
|
|
1881
1881
|
let r = {
|
|
1882
1882
|
setHandler: /* @__PURE__ */ s(() => {
|
|
@@ -1884,7 +1884,7 @@ function hr() {
|
|
|
1884
1884
|
send: /* @__PURE__ */ s(() => {
|
|
1885
1885
|
}, "send")
|
|
1886
1886
|
};
|
|
1887
|
-
return new
|
|
1887
|
+
return new Kn({ transport: r });
|
|
1888
1888
|
}
|
|
1889
1889
|
s(hr, "mockChannel");
|
|
1890
1890
|
|
|
@@ -1910,26 +1910,26 @@ var Tr = class Tr {
|
|
|
1910
1910
|
};
|
|
1911
1911
|
s(Tr, "AddonStore");
|
|
1912
1912
|
var Sr = Tr, br = "__STORYBOOK_ADDONS_PREVIEW";
|
|
1913
|
-
function
|
|
1913
|
+
function Xn() {
|
|
1914
1914
|
return gr[br] || (gr[br] = new Sr()), gr[br];
|
|
1915
1915
|
}
|
|
1916
|
-
s(
|
|
1917
|
-
var B =
|
|
1916
|
+
s(Xn, "getAddonsStore");
|
|
1917
|
+
var B = Xn();
|
|
1918
1918
|
|
|
1919
1919
|
// src/preview-api/modules/addons/definePreview.ts
|
|
1920
|
-
function
|
|
1920
|
+
function Jn(r) {
|
|
1921
1921
|
return r;
|
|
1922
1922
|
}
|
|
1923
|
-
s(
|
|
1923
|
+
s(Jn, "definePreview");
|
|
1924
1924
|
|
|
1925
1925
|
// src/preview-api/modules/addons/hooks.ts
|
|
1926
1926
|
import { logger as ve } from "storybook/internal/client-logger";
|
|
1927
1927
|
import {
|
|
1928
|
-
FORCE_RE_RENDER as
|
|
1929
|
-
RESET_STORY_ARGS as
|
|
1928
|
+
FORCE_RE_RENDER as Qn,
|
|
1929
|
+
RESET_STORY_ARGS as Zn,
|
|
1930
1930
|
STORY_RENDERED as At,
|
|
1931
|
-
UPDATE_GLOBALS as
|
|
1932
|
-
UPDATE_STORY_ARGS as
|
|
1931
|
+
UPDATE_GLOBALS as es,
|
|
1932
|
+
UPDATE_STORY_ARGS as rs
|
|
1933
1933
|
} from "storybook/internal/core-events";
|
|
1934
1934
|
import { global as ze } from "@storybook/global";
|
|
1935
1935
|
var Ar = class Ar {
|
|
@@ -1998,7 +1998,7 @@ function vt(r) {
|
|
|
1998
1998
|
return e.originalFn = r, e;
|
|
1999
1999
|
}
|
|
2000
2000
|
s(vt, "hookify");
|
|
2001
|
-
var xr = 0,
|
|
2001
|
+
var xr = 0, ts = 25, Rr = /* @__PURE__ */ s((r) => (e, t) => {
|
|
2002
2002
|
let o = r(
|
|
2003
2003
|
vt(e),
|
|
2004
2004
|
t.map((n) => vt(n))
|
|
@@ -2009,13 +2009,13 @@ var xr = 0, rs = 25, Rr = /* @__PURE__ */ s((r) => (e, t) => {
|
|
|
2009
2009
|
hasUpdates = !1;
|
|
2010
2010
|
let a = o(n);
|
|
2011
2011
|
for (xr = 1; i.hasUpdates; )
|
|
2012
|
-
if (i.hasUpdates = !1, i.currentEffects = [], a = o(n), xr += 1, xr >
|
|
2012
|
+
if (i.hasUpdates = !1, i.currentEffects = [], a = o(n), xr += 1, xr > ts)
|
|
2013
2013
|
throw new Error(
|
|
2014
2014
|
"Too many re-renders. Storybook limits the number of renders to prevent an infinite loop."
|
|
2015
2015
|
);
|
|
2016
2016
|
return i.addRenderListeners(), a;
|
|
2017
2017
|
};
|
|
2018
|
-
}, "applyHooks"),
|
|
2018
|
+
}, "applyHooks"), os = /* @__PURE__ */ s((r, e) => r.length === e.length && r.every((t, o) => t === e[o]), "areDepsEqual"), wr = /* @__PURE__ */ s(
|
|
2019
2019
|
() => new Error("Storybook preview hooks can only be called inside decorators and story functions."), "invalidHooksError");
|
|
2020
2020
|
function Ct() {
|
|
2021
2021
|
return ze.STORYBOOK_HOOKS_CONTEXT || null;
|
|
@@ -2028,7 +2028,7 @@ function Er() {
|
|
|
2028
2028
|
return r;
|
|
2029
2029
|
}
|
|
2030
2030
|
s(Er, "getHooksContextOrThrow");
|
|
2031
|
-
function
|
|
2031
|
+
function ns(r, e, t) {
|
|
2032
2032
|
let o = Er();
|
|
2033
2033
|
if (o.currentPhase === "MOUNT") {
|
|
2034
2034
|
t != null && !Array.isArray(t) && ve.warn(
|
|
@@ -2050,13 +2050,13 @@ s type cannot change between renders.`
|
|
|
2050
2050
|
), t != null && n.deps != null && t.length !== n.deps.length && ve.warn(`The final argument passed to ${r} changed size between renders.\
|
|
2051
2051
|
The order and size of this array must remain constant.
|
|
2052
2052
|
Previous: ${n.deps}
|
|
2053
|
-
Incoming: ${t}`), (t == null || n.deps == null || !
|
|
2053
|
+
Incoming: ${t}`), (t == null || n.deps == null || !os(t, n.deps)) && (e(n), n.deps = t), n;
|
|
2054
2054
|
}
|
|
2055
2055
|
throw wr();
|
|
2056
2056
|
}
|
|
2057
|
-
s(
|
|
2057
|
+
s(ns, "useHook");
|
|
2058
2058
|
function Be(r, e, t) {
|
|
2059
|
-
let { memoizedState: o } =
|
|
2059
|
+
let { memoizedState: o } = ns(
|
|
2060
2060
|
r,
|
|
2061
2061
|
(n) => {
|
|
2062
2062
|
n.memoizedState = e();
|
|
@@ -2066,10 +2066,10 @@ function Be(r, e, t) {
|
|
|
2066
2066
|
return o;
|
|
2067
2067
|
}
|
|
2068
2068
|
s(Be, "useMemoLike");
|
|
2069
|
-
function
|
|
2069
|
+
function ss(r, e) {
|
|
2070
2070
|
return Be("useMemo", r, e);
|
|
2071
2071
|
}
|
|
2072
|
-
s(
|
|
2072
|
+
s(ss, "useMemo");
|
|
2073
2073
|
function Ce(r, e) {
|
|
2074
2074
|
return Be("useCallback", () => r, e);
|
|
2075
2075
|
}
|
|
@@ -2078,48 +2078,48 @@ function Pt(r, e) {
|
|
|
2078
2078
|
return Be(r, () => ({ current: e }), []);
|
|
2079
2079
|
}
|
|
2080
2080
|
s(Pt, "useRefLike");
|
|
2081
|
-
function
|
|
2081
|
+
function is(r) {
|
|
2082
2082
|
return Pt("useRef", r);
|
|
2083
2083
|
}
|
|
2084
|
-
s(
|
|
2085
|
-
function
|
|
2084
|
+
s(is, "useRef");
|
|
2085
|
+
function as() {
|
|
2086
2086
|
let r = Ct();
|
|
2087
2087
|
if (r != null && r.currentPhase !== "NONE")
|
|
2088
2088
|
r.hasUpdates = !0;
|
|
2089
2089
|
else
|
|
2090
2090
|
try {
|
|
2091
|
-
B.getChannel().emit(
|
|
2091
|
+
B.getChannel().emit(Qn);
|
|
2092
2092
|
} catch {
|
|
2093
2093
|
ve.warn("State updates of Storybook preview hooks work only in browser");
|
|
2094
2094
|
}
|
|
2095
2095
|
}
|
|
2096
|
-
s(
|
|
2096
|
+
s(as, "triggerUpdate");
|
|
2097
2097
|
function Ft(r, e) {
|
|
2098
2098
|
let t = Pt(
|
|
2099
2099
|
r,
|
|
2100
2100
|
// @ts-expect-error S type should never be function, but there's no way to tell that to TypeScript
|
|
2101
2101
|
typeof e == "function" ? e() : e
|
|
2102
2102
|
), o = /* @__PURE__ */ s((n) => {
|
|
2103
|
-
t.current = typeof n == "function" ? n(t.current) : n,
|
|
2103
|
+
t.current = typeof n == "function" ? n(t.current) : n, as();
|
|
2104
2104
|
}, "setState");
|
|
2105
2105
|
return [t.current, o];
|
|
2106
2106
|
}
|
|
2107
2107
|
s(Ft, "useStateLike");
|
|
2108
|
-
function
|
|
2108
|
+
function ls(r) {
|
|
2109
2109
|
return Ft("useState", r);
|
|
2110
2110
|
}
|
|
2111
|
-
s(
|
|
2112
|
-
function
|
|
2111
|
+
s(ls, "useState");
|
|
2112
|
+
function cs(r, e, t) {
|
|
2113
2113
|
let o = t != null ? () => t(e) : e, [n, i] = Ft("useReducer", o);
|
|
2114
2114
|
return [n, /* @__PURE__ */ s((l) => i((c) => r(c, l)), "dispatch")];
|
|
2115
2115
|
}
|
|
2116
|
-
s(
|
|
2116
|
+
s(cs, "useReducer");
|
|
2117
2117
|
function It(r, e) {
|
|
2118
2118
|
let t = Er(), o = Be("useEffect", () => ({ create: r }), e);
|
|
2119
2119
|
t.currentEffects.includes(o) || t.currentEffects.push(o);
|
|
2120
2120
|
}
|
|
2121
2121
|
s(It, "useEffect");
|
|
2122
|
-
function
|
|
2122
|
+
function ds(r, e = []) {
|
|
2123
2123
|
let t = B.getChannel();
|
|
2124
2124
|
return It(() => (Object.entries(r).forEach(([o, n]) => t.on(o, n)), () => {
|
|
2125
2125
|
Object.entries(r).forEach(
|
|
@@ -2127,7 +2127,7 @@ function cs(r, e = []) {
|
|
|
2127
2127
|
);
|
|
2128
2128
|
}), [...Object.keys(r), ...e]), Ce(t.emit.bind(t), [t]);
|
|
2129
2129
|
}
|
|
2130
|
-
s(
|
|
2130
|
+
s(ds, "useChannel");
|
|
2131
2131
|
function Ge() {
|
|
2132
2132
|
let { currentContext: r } = Er();
|
|
2133
2133
|
if (r == null)
|
|
@@ -2135,34 +2135,34 @@ function Ge() {
|
|
|
2135
2135
|
return r;
|
|
2136
2136
|
}
|
|
2137
2137
|
s(Ge, "useStoryContext");
|
|
2138
|
-
function
|
|
2138
|
+
function ps(r, e) {
|
|
2139
2139
|
let { parameters: t } = Ge();
|
|
2140
2140
|
if (r)
|
|
2141
2141
|
return t[r] ?? e;
|
|
2142
2142
|
}
|
|
2143
|
-
s(
|
|
2144
|
-
function
|
|
2143
|
+
s(ps, "useParameter");
|
|
2144
|
+
function us() {
|
|
2145
2145
|
let r = B.getChannel(), { id: e, args: t } = Ge(), o = Ce(
|
|
2146
|
-
(i) => r.emit(
|
|
2146
|
+
(i) => r.emit(rs, { storyId: e, updatedArgs: i }),
|
|
2147
2147
|
[r, e]
|
|
2148
2148
|
), n = Ce(
|
|
2149
|
-
(i) => r.emit(
|
|
2149
|
+
(i) => r.emit(Zn, { storyId: e, argNames: i }),
|
|
2150
2150
|
[r, e]
|
|
2151
2151
|
);
|
|
2152
2152
|
return [t, o, n];
|
|
2153
2153
|
}
|
|
2154
|
-
s(
|
|
2155
|
-
function
|
|
2154
|
+
s(us, "useArgs");
|
|
2155
|
+
function fs() {
|
|
2156
2156
|
let r = B.getChannel(), { globals: e } = Ge(), t = Ce(
|
|
2157
|
-
(o) => r.emit(
|
|
2157
|
+
(o) => r.emit(es, { globals: o }),
|
|
2158
2158
|
[r]
|
|
2159
2159
|
);
|
|
2160
2160
|
return [e, t];
|
|
2161
2161
|
}
|
|
2162
|
-
s(
|
|
2162
|
+
s(fs, "useGlobals");
|
|
2163
2163
|
|
|
2164
2164
|
// src/preview-api/modules/addons/make-decorator.ts
|
|
2165
|
-
var
|
|
2165
|
+
var ys = /* @__PURE__ */ s(({
|
|
2166
2166
|
name: r,
|
|
2167
2167
|
parameterName: e,
|
|
2168
2168
|
wrapper: t,
|
|
@@ -2186,10 +2186,10 @@ var fs = /* @__PURE__ */ s(({
|
|
|
2186
2186
|
}, "makeDecorator");
|
|
2187
2187
|
|
|
2188
2188
|
// src/preview-api/modules/store/StoryStore.ts
|
|
2189
|
-
import { deprecate as
|
|
2189
|
+
import { deprecate as wo } from "storybook/internal/client-logger";
|
|
2190
2190
|
import {
|
|
2191
|
-
CalledExtractOnStoreError as
|
|
2192
|
-
MissingStoryFromCsfFileError as
|
|
2191
|
+
CalledExtractOnStoreError as ri,
|
|
2192
|
+
MissingStoryFromCsfFileError as ti
|
|
2193
2193
|
} from "storybook/internal/preview-errors";
|
|
2194
2194
|
|
|
2195
2195
|
// ../node_modules/es-toolkit/dist/object/omitBy.mjs
|
|
@@ -2525,10 +2525,10 @@ function no({
|
|
|
2525
2525
|
s(no, "groupArgsByTarget");
|
|
2526
2526
|
|
|
2527
2527
|
// src/preview-api/modules/store/ArgsStore.ts
|
|
2528
|
-
function
|
|
2528
|
+
function ms(r) {
|
|
2529
2529
|
return Object.keys(r).forEach((e) => r[e] === void 0 && delete r[e]), r;
|
|
2530
2530
|
}
|
|
2531
|
-
s(
|
|
2531
|
+
s(ms, "deleteUndefined");
|
|
2532
2532
|
var Nr = class Nr {
|
|
2533
2533
|
constructor() {
|
|
2534
2534
|
this.initialArgsByStoryId = {};
|
|
@@ -2558,7 +2558,7 @@ var Nr = class Nr {
|
|
|
2558
2558
|
update(e, t) {
|
|
2559
2559
|
if (!(e in this.argsByStoryId))
|
|
2560
2560
|
throw new Error(`No args known for ${e} -- has it been rendered yet?`);
|
|
2561
|
-
this.argsByStoryId[e] =
|
|
2561
|
+
this.argsByStoryId[e] = ms({
|
|
2562
2562
|
...this.argsByStoryId[e],
|
|
2563
2563
|
...t
|
|
2564
2564
|
});
|
|
@@ -2568,7 +2568,7 @@ s(Nr, "ArgsStore");
|
|
|
2568
2568
|
var Ue = Nr;
|
|
2569
2569
|
|
|
2570
2570
|
// src/preview-api/modules/store/GlobalsStore.ts
|
|
2571
|
-
import { logger as
|
|
2571
|
+
import { logger as hs } from "storybook/internal/client-logger";
|
|
2572
2572
|
|
|
2573
2573
|
// src/preview-api/modules/store/csf/getValuesFromArgTypes.ts
|
|
2574
2574
|
var He = /* @__PURE__ */ s((r = {}) => Object.entries(r).reduce((e, [t, { defaultValue: o }]) => (typeof o < "u" && (e[t] = o), e), {}), "ge\
|
|
@@ -2589,7 +2589,7 @@ var qr = class qr {
|
|
|
2589
2589
|
this.initialGlobals = { ...n, ...e }, this.globals = this.initialGlobals, o && o !== oe && this.updateFromPersisted(o);
|
|
2590
2590
|
}
|
|
2591
2591
|
filterAllowedGlobals(e) {
|
|
2592
|
-
return Object.entries(e).reduce((t, [o, n]) => (this.allowedGlobalNames.has(o) ? t[o] = n :
|
|
2592
|
+
return Object.entries(e).reduce((t, [o, n]) => (this.allowedGlobalNames.has(o) ? t[o] = n : hs.warn(
|
|
2593
2593
|
`Attempted to set a global (${o}) that is not defined in initial globals or globalTypes`
|
|
2594
2594
|
), t), {});
|
|
2595
2595
|
}
|
|
@@ -2609,8 +2609,8 @@ var We = qr;
|
|
|
2609
2609
|
|
|
2610
2610
|
// src/preview-api/modules/store/StoryIndexStore.ts
|
|
2611
2611
|
var so = pe(jr(), 1);
|
|
2612
|
-
import { MissingStoryAfterHmrError as
|
|
2613
|
-
var
|
|
2612
|
+
import { MissingStoryAfterHmrError as gs } from "storybook/internal/preview-errors";
|
|
2613
|
+
var bs = (0, so.default)(1)(
|
|
2614
2614
|
(r) => Object.values(r).reduce(
|
|
2615
2615
|
(e, t) => (e[t.importPath] = e[t.importPath] || t, e),
|
|
2616
2616
|
{}
|
|
@@ -2631,35 +2631,35 @@ var gs = (0, so.default)(1)(
|
|
|
2631
2631
|
storyIdToEntry(e) {
|
|
2632
2632
|
let t = this.entries[e];
|
|
2633
2633
|
if (!t)
|
|
2634
|
-
throw new
|
|
2634
|
+
throw new gs({ storyId: e });
|
|
2635
2635
|
return t;
|
|
2636
2636
|
}
|
|
2637
2637
|
importPathToEntry(e) {
|
|
2638
|
-
return
|
|
2638
|
+
return bs(this.entries)[e];
|
|
2639
2639
|
}
|
|
2640
2640
|
};
|
|
2641
2641
|
s(zr, "StoryIndexStore");
|
|
2642
2642
|
var $e = zr;
|
|
2643
2643
|
|
|
2644
2644
|
// src/preview-api/modules/store/csf/normalizeInputTypes.ts
|
|
2645
|
-
var
|
|
2646
|
-
g" ? { type: r } : r, "normalizeControl"),
|
|
2645
|
+
var Ss = /* @__PURE__ */ s((r) => typeof r == "string" ? { name: r } : r, "normalizeType"), Ts = /* @__PURE__ */ s((r) => typeof r == "strin\
|
|
2646
|
+
g" ? { type: r } : r, "normalizeControl"), xs = /* @__PURE__ */ s((r, e) => {
|
|
2647
2647
|
let { type: t, control: o, ...n } = r, i = {
|
|
2648
2648
|
name: e,
|
|
2649
2649
|
...n
|
|
2650
2650
|
};
|
|
2651
|
-
return t && (i.type =
|
|
2652
|
-
}, "normalizeInputType"), ne = /* @__PURE__ */ s((r) => N(r,
|
|
2651
|
+
return t && (i.type = Ss(t)), o ? i.control = Ts(o) : o === !1 && (i.control = { disable: !0 }), i;
|
|
2652
|
+
}, "normalizeInputType"), ne = /* @__PURE__ */ s((r) => N(r, xs), "normalizeInputTypes");
|
|
2653
2653
|
|
|
2654
2654
|
// src/preview-api/modules/store/csf/normalizeStory.ts
|
|
2655
|
-
import { deprecate as
|
|
2656
|
-
import { storyNameFromExport as
|
|
2655
|
+
import { deprecate as Rs, logger as ws } from "storybook/internal/client-logger";
|
|
2656
|
+
import { storyNameFromExport as Es, toId as As } from "storybook/internal/csf";
|
|
2657
2657
|
|
|
2658
2658
|
// src/preview-api/modules/store/csf/normalizeArrays.ts
|
|
2659
2659
|
var A = /* @__PURE__ */ s((r) => Array.isArray(r) ? r : r ? [r] : [], "normalizeArrays");
|
|
2660
2660
|
|
|
2661
2661
|
// src/preview-api/modules/store/csf/normalizeStory.ts
|
|
2662
|
-
var
|
|
2662
|
+
var vs = F`
|
|
2663
2663
|
CSF .story annotations deprecated; annotate story functions directly:
|
|
2664
2664
|
- StoryFn.story.name => StoryFn.storyName
|
|
2665
2665
|
- StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)
|
|
@@ -2667,8 +2667,8 @@ See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-
|
|
|
2667
2667
|
`;
|
|
2668
2668
|
function ye(r, e, t) {
|
|
2669
2669
|
let o = e, n = typeof e == "function" ? e : null, { story: i } = o;
|
|
2670
|
-
i && (
|
|
2671
|
-
let a =
|
|
2670
|
+
i && (ws.debug("deprecated story", i), Rs(vs));
|
|
2671
|
+
let a = Es(r), l = typeof o != "function" && o.name || o.storyName || i?.name || a, c = [
|
|
2672
2672
|
...A(o.decorators),
|
|
2673
2673
|
...A(i?.decorators)
|
|
2674
2674
|
], d = { ...i?.parameters, ...o.parameters }, p = { ...i?.args, ...o.args }, u = { ...i?.argTypes, ...o.argTypes }, h = [...A(o.loaders), ...A(
|
|
@@ -2678,7 +2678,7 @@ function ye(r, e, t) {
|
|
|
2678
2678
|
], g = [
|
|
2679
2679
|
...A(o.experimental_afterEach),
|
|
2680
2680
|
...A(i?.experimental_afterEach)
|
|
2681
|
-
], { render: b, play: m, tags: R = [], globals: S = {} } = o, f = d.__id ||
|
|
2681
|
+
], { render: b, play: m, tags: R = [], globals: S = {} } = o, f = d.__id || As(t.id, a);
|
|
2682
2682
|
return {
|
|
2683
2683
|
moduleExport: e,
|
|
2684
2684
|
id: f,
|
|
@@ -2701,14 +2701,14 @@ s(ye, "normalizeStory");
|
|
|
2701
2701
|
|
|
2702
2702
|
// src/preview-api/modules/store/csf/processCSFFile.ts
|
|
2703
2703
|
import { logger as ao } from "storybook/internal/client-logger";
|
|
2704
|
-
import { isExportStory as io, isStory as
|
|
2704
|
+
import { isExportStory as io, isStory as Ps } from "storybook/internal/csf";
|
|
2705
2705
|
|
|
2706
2706
|
// src/preview-api/modules/store/csf/normalizeComponentAnnotations.ts
|
|
2707
|
-
import { sanitize as
|
|
2707
|
+
import { sanitize as Cs } from "storybook/internal/csf";
|
|
2708
2708
|
function Fe(r, e = r.title, t) {
|
|
2709
2709
|
let { id: o, argTypes: n } = r;
|
|
2710
2710
|
return {
|
|
2711
|
-
id:
|
|
2711
|
+
id: Cs(o || e),
|
|
2712
2712
|
...r,
|
|
2713
2713
|
title: e,
|
|
2714
2714
|
...n && { argTypes: ne(n) },
|
|
@@ -2721,7 +2721,7 @@ function Fe(r, e = r.title, t) {
|
|
|
2721
2721
|
s(Fe, "normalizeComponentAnnotations");
|
|
2722
2722
|
|
|
2723
2723
|
// src/preview-api/modules/store/csf/processCSFFile.ts
|
|
2724
|
-
var
|
|
2724
|
+
var Fs = /* @__PURE__ */ s((r) => {
|
|
2725
2725
|
let { globals: e, globalTypes: t } = r;
|
|
2726
2726
|
(e || t) && ao.error(
|
|
2727
2727
|
"Global args/argTypes can only be set globally",
|
|
@@ -2730,15 +2730,15 @@ var Ps = /* @__PURE__ */ s((r) => {
|
|
|
2730
2730
|
globalTypes: t
|
|
2731
2731
|
})
|
|
2732
2732
|
);
|
|
2733
|
-
}, "checkGlobals"),
|
|
2733
|
+
}, "checkGlobals"), Is = /* @__PURE__ */ s((r) => {
|
|
2734
2734
|
let { options: e } = r;
|
|
2735
2735
|
e?.storySort && ao.error("The storySort option parameter can only be set globally");
|
|
2736
2736
|
}, "checkStorySort"), Ye = /* @__PURE__ */ s((r) => {
|
|
2737
|
-
r && (
|
|
2737
|
+
r && (Fs(r), Is(r));
|
|
2738
2738
|
}, "checkDisallowedParameters");
|
|
2739
2739
|
function lo(r, e, t) {
|
|
2740
2740
|
let { default: o, __namedExportsOrder: n, ...i } = r, a = Object.values(i)[0];
|
|
2741
|
-
if (
|
|
2741
|
+
if (Ps(a)) {
|
|
2742
2742
|
let d = Fe(a.meta.input, t, e);
|
|
2743
2743
|
Ye(d.parameters);
|
|
2744
2744
|
let p = { meta: d, stories: {}, moduleExports: r };
|
|
@@ -2766,49 +2766,52 @@ function lo(r, e, t) {
|
|
|
2766
2766
|
s(lo, "processCSFFile");
|
|
2767
2767
|
|
|
2768
2768
|
// src/preview-api/modules/store/csf/prepareStory.ts
|
|
2769
|
-
import { combineTags as
|
|
2770
|
-
import { NoRenderFunctionError as
|
|
2771
|
-
import { global as Ms } from "@storybook/global";
|
|
2769
|
+
import { combineTags as ks, includeConditionalArg as js } from "storybook/internal/csf";
|
|
2770
|
+
import { NoRenderFunctionError as Ms } from "storybook/internal/preview-errors";
|
|
2772
2771
|
import { global as _s } from "@storybook/global";
|
|
2772
|
+
import { global as Ls } from "@storybook/global";
|
|
2773
2773
|
|
|
2774
2774
|
// src/preview-api/core-annotations.ts
|
|
2775
|
-
import co from "storybook/
|
|
2776
|
-
import
|
|
2777
|
-
import
|
|
2778
|
-
import uo from "storybook/
|
|
2779
|
-
|
|
2775
|
+
import co from "storybook/internal/component-testing/preview";
|
|
2776
|
+
import po from "storybook/actions/preview";
|
|
2777
|
+
import { composeConfigs as Os } from "storybook/preview-api";
|
|
2778
|
+
import uo from "storybook/test/preview";
|
|
2779
|
+
import fo from "storybook/viewport/preview";
|
|
2780
|
+
function yo() {
|
|
2780
2781
|
return [
|
|
2781
2782
|
// @ts-expect-error CJS fallback
|
|
2782
|
-
(
|
|
2783
|
+
(fo.default ?? fo)(),
|
|
2784
|
+
// @ts-expect-error CJS fallback
|
|
2785
|
+
(po.default ?? po)(),
|
|
2783
2786
|
// @ts-expect-error CJS fallback
|
|
2784
2787
|
(co.default ?? co)(),
|
|
2785
2788
|
// @ts-expect-error CJS fallback
|
|
2786
|
-
(
|
|
2789
|
+
(uo.default ?? uo)()
|
|
2787
2790
|
];
|
|
2788
2791
|
}
|
|
2789
|
-
s(
|
|
2792
|
+
s(yo, "getCoreAnnotations");
|
|
2790
2793
|
function Ke() {
|
|
2791
|
-
return
|
|
2794
|
+
return Os(yo());
|
|
2792
2795
|
}
|
|
2793
2796
|
s(Ke, "getComposedCoreAnnotations");
|
|
2794
2797
|
|
|
2795
2798
|
// src/preview-api/modules/preview-web/render/mount-utils.ts
|
|
2796
|
-
function
|
|
2797
|
-
return r != null &&
|
|
2799
|
+
function ho(r) {
|
|
2800
|
+
return r != null && Ds(r).includes("mount");
|
|
2798
2801
|
}
|
|
2799
|
-
s(
|
|
2800
|
-
function
|
|
2802
|
+
s(ho, "mountDestructured");
|
|
2803
|
+
function Ds(r) {
|
|
2801
2804
|
let e = r.toString().match(/[^(]*\(([^)]*)/);
|
|
2802
2805
|
if (!e)
|
|
2803
2806
|
return [];
|
|
2804
|
-
let t =
|
|
2807
|
+
let t = mo(e[1]);
|
|
2805
2808
|
if (!t.length)
|
|
2806
2809
|
return [];
|
|
2807
2810
|
let o = t[0];
|
|
2808
|
-
return o.startsWith("{") && o.endsWith("}") ?
|
|
2811
|
+
return o.startsWith("{") && o.endsWith("}") ? mo(o.slice(1, -1).replace(/\s/g, "")).map((i) => i.replace(/:.*|=.*/g, "")) : [];
|
|
2809
2812
|
}
|
|
2810
|
-
s(
|
|
2811
|
-
function
|
|
2813
|
+
s(Ds, "getUsedProps");
|
|
2814
|
+
function mo(r) {
|
|
2812
2815
|
let e = [], t = [], o = 0;
|
|
2813
2816
|
for (let i = 0; i < r.length; i++)
|
|
2814
2817
|
if (r[i] === "{" || r[i] === "[")
|
|
@@ -2822,15 +2825,15 @@ function yo(r) {
|
|
|
2822
2825
|
let n = r.substring(o).trim();
|
|
2823
2826
|
return n && e.push(n), e;
|
|
2824
2827
|
}
|
|
2825
|
-
s(
|
|
2828
|
+
s(mo, "splitByComma");
|
|
2826
2829
|
|
|
2827
2830
|
// src/preview-api/modules/store/decorators.ts
|
|
2828
|
-
function
|
|
2831
|
+
function go(r, e, t) {
|
|
2829
2832
|
let o = t(r);
|
|
2830
2833
|
return (n) => e(o, n);
|
|
2831
2834
|
}
|
|
2832
|
-
s(
|
|
2833
|
-
function
|
|
2835
|
+
s(go, "decorateStory");
|
|
2836
|
+
function bo({
|
|
2834
2837
|
componentId: r,
|
|
2835
2838
|
title: e,
|
|
2836
2839
|
kind: t,
|
|
@@ -2844,17 +2847,17 @@ function go({
|
|
|
2844
2847
|
} = {}) {
|
|
2845
2848
|
return d;
|
|
2846
2849
|
}
|
|
2847
|
-
s(
|
|
2850
|
+
s(bo, "sanitizeStoryContextUpdate");
|
|
2848
2851
|
function Br(r, e) {
|
|
2849
2852
|
let t = {}, o = /* @__PURE__ */ s((i) => (a) => {
|
|
2850
2853
|
if (!t.value)
|
|
2851
2854
|
throw new Error("Decorated function called without init");
|
|
2852
2855
|
return t.value = {
|
|
2853
2856
|
...t.value,
|
|
2854
|
-
...
|
|
2857
|
+
...bo(a)
|
|
2855
2858
|
}, i(t.value);
|
|
2856
2859
|
}, "bindWithContext"), n = e.reduce(
|
|
2857
|
-
(i, a) =>
|
|
2860
|
+
(i, a) => go(i, a, o),
|
|
2858
2861
|
r
|
|
2859
2862
|
);
|
|
2860
2863
|
return (i) => (t.value = i, n(i));
|
|
@@ -2875,7 +2878,7 @@ var _ = /* @__PURE__ */ s((...r) => {
|
|
|
2875
2878
|
|
|
2876
2879
|
// src/preview-api/modules/store/csf/prepareStory.ts
|
|
2877
2880
|
function Ie(r, e, t) {
|
|
2878
|
-
let { moduleExport: o, id: n, name: i } = r || {}, a = Ke(), l =
|
|
2881
|
+
let { moduleExport: o, id: n, name: i } = r || {}, a = Ke(), l = So(
|
|
2879
2882
|
r,
|
|
2880
2883
|
e,
|
|
2881
2884
|
t
|
|
@@ -2926,9 +2929,9 @@ function Ie(r, e, t) {
|
|
|
2926
2929
|
...A(e?.decorators),
|
|
2927
2930
|
...A(t?.decorators)
|
|
2928
2931
|
], b = r?.userStoryFn || r?.render || e.render || t.render, m = Rr(h)(u, g), R = /* @__PURE__ */ s((w) => m(w), "unboundStoryFn"), S = r?.
|
|
2929
|
-
play ?? e?.play, f =
|
|
2932
|
+
play ?? e?.play, f = ho(S);
|
|
2930
2933
|
if (!b && !f)
|
|
2931
|
-
throw new
|
|
2934
|
+
throw new Ms({ id: n });
|
|
2932
2935
|
let T = /* @__PURE__ */ s((w) => async () => (await w.renderToCanvas(), w.canvas), "defaultMount"), x = r.mount ?? e.mount ?? t.mount ?? a.
|
|
2933
2936
|
mount ?? T, C = t.testingLibraryRender;
|
|
2934
2937
|
return {
|
|
@@ -2955,13 +2958,13 @@ function Ie(r, e, t) {
|
|
|
2955
2958
|
s(Ie, "prepareStory");
|
|
2956
2959
|
function Gr(r, e, t) {
|
|
2957
2960
|
return {
|
|
2958
|
-
...
|
|
2961
|
+
...So(void 0, r, e),
|
|
2959
2962
|
moduleExport: t
|
|
2960
2963
|
};
|
|
2961
2964
|
}
|
|
2962
2965
|
s(Gr, "prepareMeta");
|
|
2963
|
-
function
|
|
2964
|
-
let o = ["dev", "test"], n =
|
|
2966
|
+
function So(r, e, t) {
|
|
2967
|
+
let o = ["dev", "test"], n = Ls.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], i = Ke(), a = ks(
|
|
2965
2968
|
...o,
|
|
2966
2969
|
...n,
|
|
2967
2970
|
...i.tags ?? [],
|
|
@@ -3030,14 +3033,14 @@ function bo(r, e, t) {
|
|
|
3030
3033
|
let { name: b, story: m, ...R } = y;
|
|
3031
3034
|
return R;
|
|
3032
3035
|
}
|
|
3033
|
-
s(
|
|
3036
|
+
s(So, "preparePartialAnnotations");
|
|
3034
3037
|
function Xe(r) {
|
|
3035
3038
|
let { args: e } = r, t = {
|
|
3036
3039
|
...r,
|
|
3037
3040
|
allArgs: void 0,
|
|
3038
3041
|
argsByTarget: void 0
|
|
3039
3042
|
};
|
|
3040
|
-
if (
|
|
3043
|
+
if (_s.FEATURES?.argTypeTargetsV7) {
|
|
3041
3044
|
let i = no(r);
|
|
3042
3045
|
t = {
|
|
3043
3046
|
...r,
|
|
@@ -3056,17 +3059,17 @@ function Xe(r) {
|
|
|
3056
3059
|
return i[a] = Array.isArray(l) ? l.map(c) : c(l), i;
|
|
3057
3060
|
}, {}), n = Object.entries(o).reduce((i, [a, l]) => {
|
|
3058
3061
|
let c = t.argTypes[a] || {};
|
|
3059
|
-
return
|
|
3062
|
+
return js(c, o, t.globals) && (i[a] = l), i;
|
|
3060
3063
|
}, {});
|
|
3061
3064
|
return { ...t, unmappedArgs: e, args: n };
|
|
3062
3065
|
}
|
|
3063
3066
|
s(Xe, "prepareContext");
|
|
3064
3067
|
|
|
3065
3068
|
// src/preview-api/modules/store/csf/normalizeProjectAnnotations.ts
|
|
3066
|
-
import { deprecate as
|
|
3069
|
+
import { deprecate as Bs } from "storybook/internal/client-logger";
|
|
3067
3070
|
|
|
3068
3071
|
// src/preview-api/modules/store/inferArgTypes.ts
|
|
3069
|
-
import { logger as
|
|
3072
|
+
import { logger as Ns } from "storybook/internal/client-logger";
|
|
3070
3073
|
var Vr = /* @__PURE__ */ s((r, e, t) => {
|
|
3071
3074
|
let o = typeof r;
|
|
3072
3075
|
switch (o) {
|
|
@@ -3079,7 +3082,7 @@ var Vr = /* @__PURE__ */ s((r, e, t) => {
|
|
|
3079
3082
|
default:
|
|
3080
3083
|
break;
|
|
3081
3084
|
}
|
|
3082
|
-
return r ? t.has(r) ? (
|
|
3085
|
+
return r ? t.has(r) ? (Ns.warn(F`
|
|
3083
3086
|
We've detected a cycle in arg '${e}'. Args should be JSON-serializable.
|
|
3084
3087
|
|
|
3085
3088
|
Consider using the mapping feature or fully custom args:
|
|
@@ -3099,24 +3102,24 @@ var Vr = /* @__PURE__ */ s((r, e, t) => {
|
|
|
3099
3102
|
Ur.secondPass = !0;
|
|
3100
3103
|
|
|
3101
3104
|
// src/preview-api/modules/store/inferControls.ts
|
|
3102
|
-
import { logger as
|
|
3105
|
+
import { logger as qs } from "storybook/internal/client-logger";
|
|
3103
3106
|
|
|
3104
3107
|
// src/preview-api/modules/store/filterArgTypes.ts
|
|
3105
|
-
var
|
|
3108
|
+
var To = /* @__PURE__ */ s((r, e) => Array.isArray(e) ? e.includes(r) : r.match(e), "matches"), Je = /* @__PURE__ */ s((r, e, t) => !e && !t ?
|
|
3106
3109
|
r : r && Pr(r, (o, n) => {
|
|
3107
3110
|
let i = o.name || n.toString();
|
|
3108
|
-
return !!(!e ||
|
|
3111
|
+
return !!(!e || To(i, e)) && (!t || !To(i, t));
|
|
3109
3112
|
}), "filterArgTypes");
|
|
3110
3113
|
|
|
3111
3114
|
// src/preview-api/modules/store/inferControls.ts
|
|
3112
|
-
var
|
|
3115
|
+
var zs = /* @__PURE__ */ s((r, e, t) => {
|
|
3113
3116
|
let { type: o, options: n } = r;
|
|
3114
3117
|
if (o) {
|
|
3115
3118
|
if (t.color && t.color.test(e)) {
|
|
3116
3119
|
let i = o.name;
|
|
3117
3120
|
if (i === "string")
|
|
3118
3121
|
return { control: { type: "color" } };
|
|
3119
|
-
i !== "enum" &&
|
|
3122
|
+
i !== "enum" && qs.warn(
|
|
3120
3123
|
`Addon controls: Control of type color only supports string, received "${i}" instead`
|
|
3121
3124
|
);
|
|
3122
3125
|
}
|
|
@@ -3150,7 +3153,7 @@ var qs = /* @__PURE__ */ s((r, e, t) => {
|
|
|
3150
3153
|
} = r;
|
|
3151
3154
|
if (!t)
|
|
3152
3155
|
return e;
|
|
3153
|
-
let a = Je(e, o, n), l = N(a, (c, d) => c?.type &&
|
|
3156
|
+
let a = Je(e, o, n), l = N(a, (c, d) => c?.type && zs(c, d.toString(), i));
|
|
3154
3157
|
return _(l, a);
|
|
3155
3158
|
}, "inferControls");
|
|
3156
3159
|
Oe.secondPass = !0;
|
|
@@ -3168,7 +3171,7 @@ function me({
|
|
|
3168
3171
|
initialGlobals: c,
|
|
3169
3172
|
...d
|
|
3170
3173
|
}) {
|
|
3171
|
-
return l && Object.keys(l).length > 0 &&
|
|
3174
|
+
return l && Object.keys(l).length > 0 && Bs(F`
|
|
3172
3175
|
The preview.js 'globals' field is deprecated and will be removed in Storybook 9.0.
|
|
3173
3176
|
Please use 'initialGlobals' instead. Learn more:
|
|
3174
3177
|
|
|
@@ -3207,10 +3210,10 @@ function me({
|
|
|
3207
3210
|
s(me, "normalizeProjectAnnotations");
|
|
3208
3211
|
|
|
3209
3212
|
// src/preview-api/modules/store/csf/composeConfigs.ts
|
|
3210
|
-
import { global as
|
|
3213
|
+
import { global as Gs } from "@storybook/global";
|
|
3211
3214
|
|
|
3212
3215
|
// src/preview-api/modules/store/csf/beforeAll.ts
|
|
3213
|
-
var
|
|
3216
|
+
var xo = /* @__PURE__ */ s((r) => async () => {
|
|
3214
3217
|
let e = [];
|
|
3215
3218
|
for (let t of r) {
|
|
3216
3219
|
let o = await t();
|
|
@@ -3258,7 +3261,7 @@ function ge(r) {
|
|
|
3258
3261
|
return {
|
|
3259
3262
|
parameters: _(...ke(r, "parameters")),
|
|
3260
3263
|
decorators: K(r, "decorators", {
|
|
3261
|
-
reverseFileOrder: !(
|
|
3264
|
+
reverseFileOrder: !(Gs.FEATURES?.legacyDecoratorFileOrder ?? !1)
|
|
3262
3265
|
}),
|
|
3263
3266
|
args: De(r, "args"),
|
|
3264
3267
|
argsEnhancers: K(r, "argsEnhancers"),
|
|
@@ -3271,7 +3274,7 @@ function ge(r) {
|
|
|
3271
3274
|
initialGlobals: De(r, "initialGlobals"),
|
|
3272
3275
|
globalTypes: De(r, "globalTypes"),
|
|
3273
3276
|
loaders: K(r, "loaders"),
|
|
3274
|
-
beforeAll:
|
|
3277
|
+
beforeAll: xo(o),
|
|
3275
3278
|
beforeEach: K(r, "beforeEach"),
|
|
3276
3279
|
experimental_afterEach: K(r, "experimental_afterEach"),
|
|
3277
3280
|
render: he(r, "render"),
|
|
@@ -3288,8 +3291,8 @@ function ge(r) {
|
|
|
3288
3291
|
s(ge, "composeConfigs");
|
|
3289
3292
|
|
|
3290
3293
|
// src/preview-api/modules/store/csf/portable-stories.ts
|
|
3291
|
-
import { isExportStory as
|
|
3292
|
-
import { MountMustBeDestructuredError as
|
|
3294
|
+
import { isExportStory as Us } from "storybook/internal/csf";
|
|
3295
|
+
import { MountMustBeDestructuredError as Hs } from "storybook/internal/preview-errors";
|
|
3293
3296
|
|
|
3294
3297
|
// src/preview-api/modules/store/reporter-api.ts
|
|
3295
3298
|
var Wr = class Wr {
|
|
@@ -3304,9 +3307,9 @@ s(Wr, "ReporterAPI");
|
|
|
3304
3307
|
var se = Wr;
|
|
3305
3308
|
|
|
3306
3309
|
// src/preview-api/modules/store/csf/csf-factory-utils.ts
|
|
3307
|
-
import { isStory as
|
|
3310
|
+
import { isStory as Vs } from "storybook/internal/csf";
|
|
3308
3311
|
function $r(r, e, t) {
|
|
3309
|
-
return
|
|
3312
|
+
return Vs(r) ? {
|
|
3310
3313
|
story: r.input,
|
|
3311
3314
|
meta: r.meta.input,
|
|
3312
3315
|
preview: r.meta.preview.composed
|
|
@@ -3315,29 +3318,29 @@ function $r(r, e, t) {
|
|
|
3315
3318
|
s($r, "getCsfFactoryAnnotations");
|
|
3316
3319
|
|
|
3317
3320
|
// src/preview-api/modules/store/csf/portable-stories.ts
|
|
3318
|
-
function
|
|
3321
|
+
function Ws(r) {
|
|
3319
3322
|
globalThis.defaultProjectAnnotations = r;
|
|
3320
3323
|
}
|
|
3321
|
-
s(
|
|
3322
|
-
var
|
|
3323
|
-
function
|
|
3324
|
+
s(Ws, "setDefaultProjectAnnotations");
|
|
3325
|
+
var $s = "ComposedStory", Ys = "Unnamed Story";
|
|
3326
|
+
function Ks(r) {
|
|
3324
3327
|
return r ? ge([r]) : {};
|
|
3325
3328
|
}
|
|
3326
|
-
s(
|
|
3327
|
-
function
|
|
3329
|
+
s(Ks, "extractAnnotation");
|
|
3330
|
+
function Xs(r) {
|
|
3328
3331
|
let e = Array.isArray(r) ? r : [r];
|
|
3329
3332
|
return globalThis.globalProjectAnnotations = ge([
|
|
3330
3333
|
globalThis.defaultProjectAnnotations ?? {},
|
|
3331
|
-
ge(e.map(
|
|
3334
|
+
ge(e.map(Ks))
|
|
3332
3335
|
]), globalThis.globalProjectAnnotations ?? {};
|
|
3333
3336
|
}
|
|
3334
|
-
s(
|
|
3337
|
+
s(Xs, "setProjectAnnotations");
|
|
3335
3338
|
var X = [];
|
|
3336
|
-
function
|
|
3339
|
+
function Ro(r, e, t, o, n) {
|
|
3337
3340
|
if (r === void 0)
|
|
3338
3341
|
throw new Error("Expected a story but received undefined.");
|
|
3339
|
-
e.title = e.title ??
|
|
3340
|
-
let i = Fe(e), a = n || r.storyName || r.story?.name || r.name ||
|
|
3342
|
+
e.title = e.title ?? $s;
|
|
3343
|
+
let i = Fe(e), a = n || r.storyName || r.story?.name || r.name || Ys, l = ye(
|
|
3341
3344
|
a,
|
|
3342
3345
|
r,
|
|
3343
3346
|
i
|
|
@@ -3404,7 +3407,7 @@ ${x.description}`);
|
|
|
3404
3407
|
return T.canvasElement ??= globalThis?.document?.body, g && (T.loaded = g.loaded), Object.assign(T, f), d.playFunction(T);
|
|
3405
3408
|
}, "play"), m = /* @__PURE__ */ s((f) => {
|
|
3406
3409
|
let T = y();
|
|
3407
|
-
return Object.assign(T, f),
|
|
3410
|
+
return Object.assign(T, f), ei(d, T);
|
|
3408
3411
|
}, "run"), R = d.playFunction ? b : void 0;
|
|
3409
3412
|
return Object.assign(
|
|
3410
3413
|
/* @__PURE__ */ s(function(T) {
|
|
@@ -3435,22 +3438,22 @@ ${x.description}`);
|
|
|
3435
3438
|
}
|
|
3436
3439
|
);
|
|
3437
3440
|
}
|
|
3438
|
-
s(
|
|
3439
|
-
var
|
|
3440
|
-
function
|
|
3441
|
+
s(Ro, "composeStory");
|
|
3442
|
+
var Js = /* @__PURE__ */ s((r, e, t, o) => Ro(r, e, t, {}, o), "defaultComposeStory");
|
|
3443
|
+
function Qs(r, e, t = Js) {
|
|
3441
3444
|
let { default: o, __esModule: n, __namedExportsOrder: i, ...a } = r, l = o;
|
|
3442
3445
|
return Object.entries(a).reduce(
|
|
3443
3446
|
(d, [p, u]) => {
|
|
3444
3447
|
let { story: h, meta: y } = $r(u);
|
|
3445
|
-
return !l && y && (l = y),
|
|
3448
|
+
return !l && y && (l = y), Us(p, l) ? Object.assign(d, {
|
|
3446
3449
|
[p]: t(h, l, e, p)
|
|
3447
3450
|
}) : d;
|
|
3448
3451
|
},
|
|
3449
3452
|
{}
|
|
3450
3453
|
);
|
|
3451
3454
|
}
|
|
3452
|
-
s(
|
|
3453
|
-
function
|
|
3455
|
+
s(Qs, "composeStories");
|
|
3456
|
+
function Zs(r) {
|
|
3454
3457
|
return r.extend({
|
|
3455
3458
|
mount: /* @__PURE__ */ s(async ({ mount: e, page: t }, o) => {
|
|
3456
3459
|
await o(async (n, ...i) => {
|
|
@@ -3480,8 +3483,8 @@ function Qs(r) {
|
|
|
3480
3483
|
}, "mount")
|
|
3481
3484
|
});
|
|
3482
3485
|
}
|
|
3483
|
-
s(
|
|
3484
|
-
async function
|
|
3486
|
+
s(Zs, "createPlaywrightTest");
|
|
3487
|
+
async function ei(r, e) {
|
|
3485
3488
|
for (let n of [...X].reverse())
|
|
3486
3489
|
await n();
|
|
3487
3490
|
if (X.length = 0, !e.canvasElement) {
|
|
@@ -3495,17 +3498,17 @@ async function Zs(r, e) {
|
|
|
3495
3498
|
X.push(...(await r.applyBeforeEach(e)).filter(Boolean));
|
|
3496
3499
|
let t = r.playFunction, o = r.usesMount;
|
|
3497
3500
|
o || await e.mount(), !e.abortSignal.aborted && (t && (o || (e.mount = async () => {
|
|
3498
|
-
throw new
|
|
3501
|
+
throw new Hs({ playFunction: t.toString() });
|
|
3499
3502
|
}), await t(e)), await r.applyAfterEach(e));
|
|
3500
3503
|
}
|
|
3501
|
-
s(
|
|
3504
|
+
s(ei, "runStory");
|
|
3502
3505
|
|
|
3503
3506
|
// src/preview-api/modules/store/StoryStore.ts
|
|
3504
|
-
function
|
|
3507
|
+
function Eo(r, e) {
|
|
3505
3508
|
return vr(Cr(r, e), (t) => t === void 0);
|
|
3506
3509
|
}
|
|
3507
|
-
s(
|
|
3508
|
-
var
|
|
3510
|
+
s(Eo, "picky");
|
|
3511
|
+
var Ao = 1e3, oi = 1e4, Yr = class Yr {
|
|
3509
3512
|
constructor(e, t, o) {
|
|
3510
3513
|
this.importFn = t;
|
|
3511
3514
|
// TODO: Remove in 9.0
|
|
@@ -3519,7 +3522,7 @@ var Eo = 1e3, ti = 1e4, Yr = class Yr {
|
|
|
3519
3522
|
stories: N(e.stories, (n) => {
|
|
3520
3523
|
let { importPath: i } = this.storyIndex.entries[n.id];
|
|
3521
3524
|
return {
|
|
3522
|
-
...
|
|
3525
|
+
...Eo(n, ["id", "name", "title"]),
|
|
3523
3526
|
importPath: i,
|
|
3524
3527
|
// These 3 fields were going to be dropped in v7, but instead we will keep them for the
|
|
3525
3528
|
// 7.x cycle so that v7 Storybooks can be composed successfully in v6 Storybook.
|
|
@@ -3527,7 +3530,7 @@ var Eo = 1e3, ti = 1e4, Yr = class Yr {
|
|
|
3527
3530
|
kind: n.title,
|
|
3528
3531
|
story: n.name,
|
|
3529
3532
|
parameters: {
|
|
3530
|
-
...
|
|
3533
|
+
...Eo(n.parameters, t),
|
|
3531
3534
|
fileName: i
|
|
3532
3535
|
}
|
|
3533
3536
|
};
|
|
@@ -3537,7 +3540,7 @@ var Eo = 1e3, ti = 1e4, Yr = class Yr {
|
|
|
3537
3540
|
this.storyIndex = new $e(e), this.projectAnnotations = me(o);
|
|
3538
3541
|
let { initialGlobals: n, globalTypes: i } = this.projectAnnotations;
|
|
3539
3542
|
this.args = new Ue(), this.userGlobals = new We({ globals: n, globalTypes: i }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache =
|
|
3540
|
-
(0, Qe.default)(
|
|
3543
|
+
(0, Qe.default)(Ao)(lo), this.prepareMetaWithCache = (0, Qe.default)(Ao)(Gr), this.prepareStoryWithCache = (0, Qe.default)(oi)(Ie);
|
|
3541
3544
|
}
|
|
3542
3545
|
setProjectAnnotations(e) {
|
|
3543
3546
|
this.projectAnnotations = me(e);
|
|
@@ -3601,7 +3604,7 @@ var Eo = 1e3, ti = 1e4, Yr = class Yr {
|
|
|
3601
3604
|
}) {
|
|
3602
3605
|
let o = t.stories[e];
|
|
3603
3606
|
if (!o)
|
|
3604
|
-
throw new
|
|
3607
|
+
throw new ti({ storyId: e });
|
|
3605
3608
|
let n = t.meta, i = this.prepareStoryWithCache(
|
|
3606
3609
|
o,
|
|
3607
3610
|
n,
|
|
@@ -3657,7 +3660,7 @@ var Eo = 1e3, ti = 1e4, Yr = class Yr {
|
|
|
3657
3660
|
extract(e = { includeDocsOnly: !1 }) {
|
|
3658
3661
|
let { cachedCSFFiles: t } = this;
|
|
3659
3662
|
if (!t)
|
|
3660
|
-
throw new
|
|
3663
|
+
throw new ri();
|
|
3661
3664
|
return Object.entries(this.storyIndex.entries).reduce(
|
|
3662
3665
|
(o, [n, { type: i, importPath: a }]) => {
|
|
3663
3666
|
if (i === "docs")
|
|
@@ -3695,12 +3698,12 @@ var Eo = 1e3, ti = 1e4, Yr = class Yr {
|
|
|
3695
3698
|
};
|
|
3696
3699
|
}
|
|
3697
3700
|
raw() {
|
|
3698
|
-
return
|
|
3701
|
+
return wo(
|
|
3699
3702
|
"StoryStore.raw() is deprecated and will be removed in 9.0, please use extract() instead"
|
|
3700
3703
|
), Object.values(this.extract()).map(({ id: e }) => this.fromId(e)).filter(Boolean);
|
|
3701
3704
|
}
|
|
3702
3705
|
fromId(e) {
|
|
3703
|
-
if (
|
|
3706
|
+
if (wo(
|
|
3704
3707
|
"StoryStore.fromId() is deprecated and will be removed in 9.0, please use loadStory() instead"
|
|
3705
3708
|
), !this.cachedCSFFiles)
|
|
3706
3709
|
throw new Error("Cannot call fromId/raw() unless you call cacheAllCSFFiles() first.");
|
|
@@ -3735,7 +3738,7 @@ s(Yr, "StoryStore");
|
|
|
3735
3738
|
var be = Yr;
|
|
3736
3739
|
|
|
3737
3740
|
// src/preview-api/modules/store/autoTitle.ts
|
|
3738
|
-
import { once as
|
|
3741
|
+
import { once as ni } from "storybook/internal/client-logger";
|
|
3739
3742
|
|
|
3740
3743
|
// ../node_modules/slash/index.js
|
|
3741
3744
|
function Kr(r) {
|
|
@@ -3744,7 +3747,7 @@ function Kr(r) {
|
|
|
3744
3747
|
s(Kr, "slash");
|
|
3745
3748
|
|
|
3746
3749
|
// src/preview-api/modules/store/autoTitle.ts
|
|
3747
|
-
var
|
|
3750
|
+
var si = /* @__PURE__ */ s((r) => {
|
|
3748
3751
|
if (r.length === 0)
|
|
3749
3752
|
return r;
|
|
3750
3753
|
let e = r[r.length - 1], t = e?.replace(/(?:[.](?:story|stories))?([.][^.]+)$/i, "");
|
|
@@ -3754,13 +3757,13 @@ var ni = /* @__PURE__ */ s((r) => {
|
|
|
3754
3757
|
return t && o && t.toLowerCase() === o.toLowerCase() ? [...r.slice(0, -2), t] : t && (/^(story|stories)([.][^.]+)$/i.test(e) || /^index$/i.
|
|
3755
3758
|
test(t)) ? r.slice(0, -1) : [...r.slice(0, -1), t];
|
|
3756
3759
|
}, "sanitize");
|
|
3757
|
-
function
|
|
3760
|
+
function vo(r) {
|
|
3758
3761
|
return r.flatMap((e) => e.split("/")).filter(Boolean).join("/");
|
|
3759
3762
|
}
|
|
3760
|
-
s(
|
|
3761
|
-
var
|
|
3763
|
+
s(vo, "pathJoin");
|
|
3764
|
+
var Co = /* @__PURE__ */ s((r, e, t) => {
|
|
3762
3765
|
let { directory: o, importPathMatcher: n, titlePrefix: i = "" } = e || {};
|
|
3763
|
-
typeof r == "number" &&
|
|
3766
|
+
typeof r == "number" && ni.warn(F`
|
|
3764
3767
|
CSF Auto-title received a numeric fileName. This typically happens when
|
|
3765
3768
|
webpack is mis-configured in production mode. To force webpack to produce
|
|
3766
3769
|
filenames, set optimization.moduleIds = "named" in your webpack config.
|
|
@@ -3768,14 +3771,14 @@ var vo = /* @__PURE__ */ s((r, e, t) => {
|
|
|
3768
3771
|
let a = Kr(String(r));
|
|
3769
3772
|
if (n.exec(a)) {
|
|
3770
3773
|
if (!t) {
|
|
3771
|
-
let l = a.replace(o, ""), c =
|
|
3772
|
-
return c =
|
|
3774
|
+
let l = a.replace(o, ""), c = vo([i, l]).split("/");
|
|
3775
|
+
return c = si(c), c.join("/");
|
|
3773
3776
|
}
|
|
3774
|
-
return i ?
|
|
3777
|
+
return i ? vo([i, t]) : t;
|
|
3775
3778
|
}
|
|
3776
|
-
}, "userOrAutoTitleFromSpecifier"),
|
|
3779
|
+
}, "userOrAutoTitleFromSpecifier"), ii = /* @__PURE__ */ s((r, e, t) => {
|
|
3777
3780
|
for (let o = 0; o < e.length; o += 1) {
|
|
3778
|
-
let n =
|
|
3781
|
+
let n = Co(r, e[o], t);
|
|
3779
3782
|
if (n)
|
|
3780
3783
|
return n;
|
|
3781
3784
|
}
|
|
@@ -3783,10 +3786,10 @@ var vo = /* @__PURE__ */ s((r, e, t) => {
|
|
|
3783
3786
|
}, "userOrAutoTitle");
|
|
3784
3787
|
|
|
3785
3788
|
// src/preview-api/modules/store/storySort.ts
|
|
3786
|
-
var
|
|
3789
|
+
var Po = /\s*\/\s*/, Fo = /* @__PURE__ */ s((r = {}) => (e, t) => {
|
|
3787
3790
|
if (e.title === t.title && !r.includeNames)
|
|
3788
3791
|
return 0;
|
|
3789
|
-
let o = r.method || "configure", n = r.order || [], i = e.title.trim().split(
|
|
3792
|
+
let o = r.method || "configure", n = r.order || [], i = e.title.trim().split(Po), a = t.title.trim().split(Po);
|
|
3790
3793
|
r.includeNames && (i.push(e.name), a.push(t.name));
|
|
3791
3794
|
let l = 0;
|
|
3792
3795
|
for (; i[l] || a[l]; ) {
|
|
@@ -3810,18 +3813,18 @@ var Co = /\s*\/\s*/, Po = /* @__PURE__ */ s((r = {}) => (e, t) => {
|
|
|
3810
3813
|
}, "storySort");
|
|
3811
3814
|
|
|
3812
3815
|
// src/preview-api/modules/store/sortStories.ts
|
|
3813
|
-
var
|
|
3816
|
+
var ai = /* @__PURE__ */ s((r, e, t) => {
|
|
3814
3817
|
if (e) {
|
|
3815
3818
|
let o;
|
|
3816
|
-
typeof e == "function" ? o = e : o =
|
|
3819
|
+
typeof e == "function" ? o = e : o = Fo(e), r.sort(o);
|
|
3817
3820
|
} else
|
|
3818
3821
|
r.sort(
|
|
3819
3822
|
(o, n) => t.indexOf(o.importPath) - t.indexOf(n.importPath)
|
|
3820
3823
|
);
|
|
3821
3824
|
return r;
|
|
3822
|
-
}, "sortStoriesCommon"),
|
|
3825
|
+
}, "sortStoriesCommon"), li = /* @__PURE__ */ s((r, e, t) => {
|
|
3823
3826
|
try {
|
|
3824
|
-
return
|
|
3827
|
+
return ai(r, e, t);
|
|
3825
3828
|
} catch (o) {
|
|
3826
3829
|
throw new Error(F`
|
|
3827
3830
|
Error sorting stories with sort parameter ${e}:
|
|
@@ -3836,48 +3839,48 @@ var ii = /* @__PURE__ */ s((r, e, t) => {
|
|
|
3836
3839
|
}, "sortStoriesV7");
|
|
3837
3840
|
|
|
3838
3841
|
// src/preview-api/modules/preview-web/Preview.tsx
|
|
3839
|
-
import { deprecate as
|
|
3842
|
+
import { deprecate as yi, logger as jo } from "storybook/internal/client-logger";
|
|
3840
3843
|
import {
|
|
3841
|
-
ARGTYPES_INFO_REQUEST as
|
|
3842
|
-
ARGTYPES_INFO_RESPONSE as
|
|
3843
|
-
CONFIG_ERROR as
|
|
3844
|
-
FORCE_REMOUNT as
|
|
3845
|
-
FORCE_RE_RENDER as
|
|
3846
|
-
GLOBALS_UPDATED as
|
|
3847
|
-
RESET_STORY_ARGS as
|
|
3848
|
-
SET_GLOBALS as
|
|
3849
|
-
STORY_ARGS_UPDATED as
|
|
3850
|
-
STORY_INDEX_INVALIDATED as
|
|
3851
|
-
UPDATE_GLOBALS as
|
|
3852
|
-
UPDATE_STORY_ARGS as
|
|
3844
|
+
ARGTYPES_INFO_REQUEST as mi,
|
|
3845
|
+
ARGTYPES_INFO_RESPONSE as Mo,
|
|
3846
|
+
CONFIG_ERROR as hi,
|
|
3847
|
+
FORCE_REMOUNT as gi,
|
|
3848
|
+
FORCE_RE_RENDER as bi,
|
|
3849
|
+
GLOBALS_UPDATED as _o,
|
|
3850
|
+
RESET_STORY_ARGS as Si,
|
|
3851
|
+
SET_GLOBALS as Ti,
|
|
3852
|
+
STORY_ARGS_UPDATED as xi,
|
|
3853
|
+
STORY_INDEX_INVALIDATED as Ri,
|
|
3854
|
+
UPDATE_GLOBALS as wi,
|
|
3855
|
+
UPDATE_STORY_ARGS as Ei
|
|
3853
3856
|
} from "storybook/internal/core-events";
|
|
3854
3857
|
import {
|
|
3855
3858
|
CalledPreviewMethodBeforeInitializationError as W,
|
|
3856
|
-
MissingRenderToCanvasError as
|
|
3857
|
-
StoryIndexFetchError as
|
|
3858
|
-
StoryStoreAccessedBeforeInitializationError as
|
|
3859
|
+
MissingRenderToCanvasError as Ai,
|
|
3860
|
+
StoryIndexFetchError as vi,
|
|
3861
|
+
StoryStoreAccessedBeforeInitializationError as Ci
|
|
3859
3862
|
} from "storybook/internal/preview-errors";
|
|
3860
|
-
import { global as
|
|
3863
|
+
import { global as Pi } from "@storybook/global";
|
|
3861
3864
|
|
|
3862
3865
|
// src/preview-api/modules/preview-web/render/StoryRender.ts
|
|
3863
3866
|
import {
|
|
3864
|
-
PLAY_FUNCTION_THREW_EXCEPTION as
|
|
3865
|
-
STORY_FINISHED as
|
|
3866
|
-
STORY_RENDERED as
|
|
3867
|
-
STORY_RENDER_PHASE_CHANGED as
|
|
3868
|
-
UNHANDLED_ERRORS_WHILE_PLAYING as
|
|
3867
|
+
PLAY_FUNCTION_THREW_EXCEPTION as ci,
|
|
3868
|
+
STORY_FINISHED as Io,
|
|
3869
|
+
STORY_RENDERED as di,
|
|
3870
|
+
STORY_RENDER_PHASE_CHANGED as Oo,
|
|
3871
|
+
UNHANDLED_ERRORS_WHILE_PLAYING as pi
|
|
3869
3872
|
} from "storybook/internal/core-events";
|
|
3870
3873
|
import {
|
|
3871
|
-
MountMustBeDestructuredError as
|
|
3872
|
-
NoStoryMountedError as
|
|
3874
|
+
MountMustBeDestructuredError as ui,
|
|
3875
|
+
NoStoryMountedError as fi
|
|
3873
3876
|
} from "storybook/internal/preview-errors";
|
|
3874
3877
|
|
|
3875
3878
|
// src/preview-api/modules/preview-web/render/Render.ts
|
|
3876
3879
|
var J = new Error("prepareAborted");
|
|
3877
3880
|
|
|
3878
3881
|
// src/preview-api/modules/preview-web/render/StoryRender.ts
|
|
3879
|
-
var { AbortController:
|
|
3880
|
-
function
|
|
3882
|
+
var { AbortController: Do } = globalThis;
|
|
3883
|
+
function ko(r) {
|
|
3881
3884
|
try {
|
|
3882
3885
|
let { name: e = "Error", message: t = String(r), stack: o } = r;
|
|
3883
3886
|
return { name: e, message: t, stack: o };
|
|
@@ -3885,7 +3888,7 @@ function Do(r) {
|
|
|
3885
3888
|
return { name: "Error", message: String(r) };
|
|
3886
3889
|
}
|
|
3887
3890
|
}
|
|
3888
|
-
s(
|
|
3891
|
+
s(ko, "serializeError");
|
|
3889
3892
|
var Xr = class Xr {
|
|
3890
3893
|
constructor(e, t, o, n, i, a, l = { autoplay: !0, forceInitialArgs: !1 }, c) {
|
|
3891
3894
|
this.channel = e;
|
|
@@ -3902,13 +3905,13 @@ var Xr = class Xr {
|
|
|
3902
3905
|
this.teardownRender = /* @__PURE__ */ s(() => {
|
|
3903
3906
|
}, "teardownRender");
|
|
3904
3907
|
this.torndown = !1;
|
|
3905
|
-
this.abortController = new
|
|
3908
|
+
this.abortController = new Do(), c && (this.story = c, this.phase = "preparing");
|
|
3906
3909
|
}
|
|
3907
3910
|
async runPhase(e, t, o) {
|
|
3908
|
-
this.phase = t, this.channel.emit(
|
|
3911
|
+
this.phase = t, this.channel.emit(Oo, { newPhase: this.phase, storyId: this.id }), o && (await o(), this.checkIfAborted(e));
|
|
3909
3912
|
}
|
|
3910
3913
|
checkIfAborted(e) {
|
|
3911
|
-
return e.aborted ? (this.phase = "aborted", this.channel.emit(
|
|
3914
|
+
return e.aborted ? (this.phase = "aborted", this.channel.emit(Oo, { newPhase: this.phase, storyId: this.id }), !0) : !1;
|
|
3912
3915
|
}
|
|
3913
3916
|
async prepare() {
|
|
3914
3917
|
if (await this.runPhase(this.abortController.signal, "preparing", async () => {
|
|
@@ -3960,7 +3963,7 @@ var Xr = class Xr {
|
|
|
3960
3963
|
playFunction: g,
|
|
3961
3964
|
runStep: b
|
|
3962
3965
|
} = n;
|
|
3963
|
-
t && !e && (this.cancelRender(), this.abortController = new
|
|
3966
|
+
t && !e && (this.cancelRender(), this.abortController = new Do());
|
|
3964
3967
|
let m = this.abortController.signal, R = !1, S = n.usesMount;
|
|
3965
3968
|
try {
|
|
3966
3969
|
let f = {
|
|
@@ -4021,27 +4024,27 @@ var Xr = class Xr {
|
|
|
4021
4024
|
window.addEventListener("error", P), window.addEventListener("unhandledrejection", P), this.disableKeyListeners = !0;
|
|
4022
4025
|
try {
|
|
4023
4026
|
if (S ? await g(f) : (f.mount = async () => {
|
|
4024
|
-
throw new
|
|
4027
|
+
throw new ui({ playFunction: g.toString() });
|
|
4025
4028
|
}, await this.runPhase(m, "playing", async () => g(f))), !R)
|
|
4026
|
-
throw new
|
|
4029
|
+
throw new fi();
|
|
4027
4030
|
this.checkIfAborted(m), !C && w.size > 0 ? await this.runPhase(m, "errored") : await this.runPhase(m, "played");
|
|
4028
4031
|
} catch (v) {
|
|
4029
4032
|
if (this.callbacks.showStoryDuringRender?.(), await this.runPhase(m, "errored", async () => {
|
|
4030
|
-
this.channel.emit(
|
|
4033
|
+
this.channel.emit(ci, ko(v));
|
|
4031
4034
|
}), this.story.parameters.throwPlayFunctionExceptions !== !1)
|
|
4032
4035
|
throw v;
|
|
4033
4036
|
console.error(v);
|
|
4034
4037
|
}
|
|
4035
4038
|
if (!C && w.size > 0 && this.channel.emit(
|
|
4036
|
-
|
|
4037
|
-
Array.from(w).map(
|
|
4039
|
+
pi,
|
|
4040
|
+
Array.from(w).map(ko)
|
|
4038
4041
|
), this.disableKeyListeners = !1, window.removeEventListener("unhandledrejection", P), window.removeEventListener("error", P), m.aborted)
|
|
4039
4042
|
return;
|
|
4040
4043
|
}
|
|
4041
4044
|
await this.runPhase(
|
|
4042
4045
|
m,
|
|
4043
4046
|
"completed",
|
|
4044
|
-
async () => this.channel.emit(
|
|
4047
|
+
async () => this.channel.emit(di, i)
|
|
4045
4048
|
), this.phase !== "errored" && await this.runPhase(m, "afterEach", async () => {
|
|
4046
4049
|
await h(f);
|
|
4047
4050
|
});
|
|
@@ -4051,7 +4054,7 @@ var Xr = class Xr {
|
|
|
4051
4054
|
await this.runPhase(
|
|
4052
4055
|
m,
|
|
4053
4056
|
"finished",
|
|
4054
|
-
async () => this.channel.emit(
|
|
4057
|
+
async () => this.channel.emit(Io, {
|
|
4055
4058
|
storyId: i,
|
|
4056
4059
|
status: Y ? "error" : "success",
|
|
4057
4060
|
reporters: f.reporting.reports
|
|
@@ -4061,7 +4064,7 @@ var Xr = class Xr {
|
|
|
4061
4064
|
this.phase = "errored", this.callbacks.showException(f), await this.runPhase(
|
|
4062
4065
|
m,
|
|
4063
4066
|
"finished",
|
|
4064
|
-
async () => this.channel.emit(
|
|
4067
|
+
async () => this.channel.emit(Io, {
|
|
4065
4068
|
storyId: i,
|
|
4066
4069
|
status: "error",
|
|
4067
4070
|
reporters: []
|
|
@@ -4110,7 +4113,7 @@ s(Xr, "StoryRender");
|
|
|
4110
4113
|
var ie = Xr;
|
|
4111
4114
|
|
|
4112
4115
|
// src/preview-api/modules/preview-web/Preview.tsx
|
|
4113
|
-
var { fetch:
|
|
4116
|
+
var { fetch: Fi } = Pi, Ii = "./index.json", Jr = class Jr {
|
|
4114
4117
|
constructor(e, t, o = B.getChannel(), n = !0) {
|
|
4115
4118
|
this.importFn = e;
|
|
4116
4119
|
this.getProjectAnnotations = t;
|
|
@@ -4131,8 +4134,8 @@ var { fetch: Pi } = Ci, Fi = "./index.json", Jr = class Jr {
|
|
|
4131
4134
|
{
|
|
4132
4135
|
get: /* @__PURE__ */ s((e, t) => {
|
|
4133
4136
|
if (this.storyStoreValue)
|
|
4134
|
-
return
|
|
4135
|
-
throw new
|
|
4137
|
+
return yi("Accessing the Story Store is deprecated and will be removed in 9.0"), this.storyStoreValue[t];
|
|
4138
|
+
throw new Ci();
|
|
4136
4139
|
}, "get")
|
|
4137
4140
|
}
|
|
4138
4141
|
);
|
|
@@ -4151,15 +4154,15 @@ var { fetch: Pi } = Ci, Fi = "./index.json", Jr = class Jr {
|
|
|
4151
4154
|
return this.storeInitializationPromise;
|
|
4152
4155
|
}
|
|
4153
4156
|
setupListeners() {
|
|
4154
|
-
this.channel.on(
|
|
4155
|
-
onUpdateArgs.bind(this)), this.channel.on(
|
|
4156
|
-
channel.on(
|
|
4157
|
+
this.channel.on(Ri, this.onStoryIndexChanged.bind(this)), this.channel.on(wi, this.onUpdateGlobals.bind(this)), this.channel.on(Ei, this.
|
|
4158
|
+
onUpdateArgs.bind(this)), this.channel.on(mi, this.onRequestArgTypesInfo.bind(this)), this.channel.on(Si, this.onResetArgs.bind(this)), this.
|
|
4159
|
+
channel.on(bi, this.onForceReRender.bind(this)), this.channel.on(gi, this.onForceRemount.bind(this));
|
|
4157
4160
|
}
|
|
4158
4161
|
async getProjectAnnotationsOrRenderError() {
|
|
4159
4162
|
try {
|
|
4160
4163
|
let e = await this.getProjectAnnotations();
|
|
4161
4164
|
if (this.renderToCanvas = e.renderToCanvas, !this.renderToCanvas)
|
|
4162
|
-
throw new
|
|
4165
|
+
throw new Ai();
|
|
4163
4166
|
return e;
|
|
4164
4167
|
} catch (e) {
|
|
4165
4168
|
throw this.renderPreviewEntryError("Error reading preview.js:", e), e;
|
|
@@ -4183,10 +4186,10 @@ var { fetch: Pi } = Ci, Fi = "./index.json", Jr = class Jr {
|
|
|
4183
4186
|
}
|
|
4184
4187
|
}
|
|
4185
4188
|
async getStoryIndexFromServer() {
|
|
4186
|
-
let e = await
|
|
4189
|
+
let e = await Fi(Ii);
|
|
4187
4190
|
if (e.status === 200)
|
|
4188
4191
|
return e.json();
|
|
4189
|
-
throw new
|
|
4192
|
+
throw new vi({ text: await e.text() });
|
|
4190
4193
|
}
|
|
4191
4194
|
// If initialization gets as far as the story index, this function runs.
|
|
4192
4195
|
initializeWithStoryIndex(e) {
|
|
@@ -4208,7 +4211,7 @@ var { fetch: Pi } = Ci, Fi = "./index.json", Jr = class Jr {
|
|
|
4208
4211
|
globals: this.storyStoreValue.userGlobals.get() || {},
|
|
4209
4212
|
globalTypes: this.storyStoreValue.projectAnnotations.globalTypes || {}
|
|
4210
4213
|
};
|
|
4211
|
-
this.channel.emit(
|
|
4214
|
+
this.channel.emit(Ti, e);
|
|
4212
4215
|
}
|
|
4213
4216
|
// EVENT HANDLERS
|
|
4214
4217
|
// This happens when a config file gets reloaded
|
|
@@ -4253,7 +4256,7 @@ var { fetch: Pi } = Ci, Fi = "./index.json", Jr = class Jr {
|
|
|
4253
4256
|
throw new W({ methodName: "onUpdateGlobals" });
|
|
4254
4257
|
if (this.storyStoreValue.userGlobals.update(e), t) {
|
|
4255
4258
|
let { initialGlobals: o, storyGlobals: n, userGlobals: i, globals: a } = this.storyStoreValue.getStoryContext(t);
|
|
4256
|
-
this.channel.emit(
|
|
4259
|
+
this.channel.emit(_o, {
|
|
4257
4260
|
initialGlobals: o,
|
|
4258
4261
|
userGlobals: i,
|
|
4259
4262
|
storyGlobals: n,
|
|
@@ -4261,7 +4264,7 @@ var { fetch: Pi } = Ci, Fi = "./index.json", Jr = class Jr {
|
|
|
4261
4264
|
});
|
|
4262
4265
|
} else {
|
|
4263
4266
|
let { initialGlobals: o, globals: n } = this.storyStoreValue.userGlobals;
|
|
4264
|
-
this.channel.emit(
|
|
4267
|
+
this.channel.emit(_o, {
|
|
4265
4268
|
initialGlobals: o,
|
|
4266
4269
|
userGlobals: n,
|
|
4267
4270
|
storyGlobals: {},
|
|
@@ -4281,7 +4284,7 @@ var { fetch: Pi } = Ci, Fi = "./index.json", Jr = class Jr {
|
|
|
4281
4284
|
o.story && o.story.usesMount ? o.remount() : o.rerender()
|
|
4282
4285
|
)
|
|
4283
4286
|
)
|
|
4284
|
-
), this.channel.emit(
|
|
4287
|
+
), this.channel.emit(xi, {
|
|
4285
4288
|
storyId: e,
|
|
4286
4289
|
args: this.storyStoreValue.args.get(e)
|
|
4287
4290
|
});
|
|
@@ -4290,14 +4293,14 @@ var { fetch: Pi } = Ci, Fi = "./index.json", Jr = class Jr {
|
|
|
4290
4293
|
try {
|
|
4291
4294
|
await this.storeInitializationPromise;
|
|
4292
4295
|
let o = await this.storyStoreValue?.loadStory(t);
|
|
4293
|
-
this.channel.emit(
|
|
4296
|
+
this.channel.emit(Mo, {
|
|
4294
4297
|
id: e,
|
|
4295
4298
|
success: !0,
|
|
4296
4299
|
payload: { argTypes: o?.argTypes || {} },
|
|
4297
4300
|
error: null
|
|
4298
4301
|
});
|
|
4299
4302
|
} catch (o) {
|
|
4300
|
-
this.channel.emit(
|
|
4303
|
+
this.channel.emit(Mo, {
|
|
4301
4304
|
id: e,
|
|
4302
4305
|
success: !1,
|
|
4303
4306
|
error: o?.message
|
|
@@ -4370,46 +4373,46 @@ var { fetch: Pi } = Ci, Fi = "./index.json", Jr = class Jr {
|
|
|
4370
4373
|
}
|
|
4371
4374
|
// UTILITIES
|
|
4372
4375
|
renderPreviewEntryError(e, t) {
|
|
4373
|
-
this.previewEntryError = t,
|
|
4376
|
+
this.previewEntryError = t, jo.error(e), jo.error(t), this.channel.emit(hi, t);
|
|
4374
4377
|
}
|
|
4375
4378
|
};
|
|
4376
4379
|
s(Jr, "Preview");
|
|
4377
4380
|
var Se = Jr;
|
|
4378
4381
|
|
|
4379
4382
|
// src/preview-api/modules/preview-web/PreviewWeb.tsx
|
|
4380
|
-
import { global as
|
|
4383
|
+
import { global as hl } from "@storybook/global";
|
|
4381
4384
|
|
|
4382
4385
|
// src/preview-api/modules/preview-web/PreviewWithSelection.tsx
|
|
4383
4386
|
import { logger as er } from "storybook/internal/client-logger";
|
|
4384
4387
|
import {
|
|
4385
|
-
CURRENT_STORY_WAS_SET as
|
|
4386
|
-
DOCS_PREPARED as
|
|
4387
|
-
GLOBALS_UPDATED as
|
|
4388
|
-
PRELOAD_ENTRIES as
|
|
4389
|
-
PREVIEW_KEYDOWN as
|
|
4390
|
-
SET_CURRENT_STORY as
|
|
4391
|
-
STORY_CHANGED as
|
|
4392
|
-
STORY_ERRORED as
|
|
4393
|
-
STORY_MISSING as
|
|
4394
|
-
STORY_PREPARED as
|
|
4395
|
-
STORY_RENDER_PHASE_CHANGED as
|
|
4396
|
-
STORY_SPECIFIED as
|
|
4397
|
-
STORY_THREW_EXCEPTION as
|
|
4398
|
-
STORY_UNCHANGED as
|
|
4399
|
-
UPDATE_QUERY_PARAMS as
|
|
4388
|
+
CURRENT_STORY_WAS_SET as Lo,
|
|
4389
|
+
DOCS_PREPARED as Mi,
|
|
4390
|
+
GLOBALS_UPDATED as No,
|
|
4391
|
+
PRELOAD_ENTRIES as _i,
|
|
4392
|
+
PREVIEW_KEYDOWN as Li,
|
|
4393
|
+
SET_CURRENT_STORY as Ni,
|
|
4394
|
+
STORY_CHANGED as qi,
|
|
4395
|
+
STORY_ERRORED as zi,
|
|
4396
|
+
STORY_MISSING as qo,
|
|
4397
|
+
STORY_PREPARED as Bi,
|
|
4398
|
+
STORY_RENDER_PHASE_CHANGED as zo,
|
|
4399
|
+
STORY_SPECIFIED as Gi,
|
|
4400
|
+
STORY_THREW_EXCEPTION as Vi,
|
|
4401
|
+
STORY_UNCHANGED as Ui,
|
|
4402
|
+
UPDATE_QUERY_PARAMS as Hi
|
|
4400
4403
|
} from "storybook/internal/core-events";
|
|
4401
4404
|
import {
|
|
4402
4405
|
CalledPreviewMethodBeforeInitializationError as tt,
|
|
4403
|
-
EmptyIndexError as
|
|
4404
|
-
MdxFileWithNoCsfReferencesError as
|
|
4405
|
-
NoStoryMatchError as
|
|
4406
|
+
EmptyIndexError as Wi,
|
|
4407
|
+
MdxFileWithNoCsfReferencesError as $i,
|
|
4408
|
+
NoStoryMatchError as Yi
|
|
4406
4409
|
} from "storybook/internal/preview-errors";
|
|
4407
4410
|
|
|
4408
4411
|
// ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
4409
|
-
var
|
|
4412
|
+
var Oi = !1, Qr = "Invariant failed";
|
|
4410
4413
|
function Ze(r, e) {
|
|
4411
4414
|
if (!r) {
|
|
4412
|
-
if (
|
|
4415
|
+
if (Oi)
|
|
4413
4416
|
throw new Error(Qr);
|
|
4414
4417
|
var t = typeof e == "function" ? e() : e, o = t ? "".concat(Qr, ": ").concat(t) : Qr;
|
|
4415
4418
|
throw new Error(o);
|
|
@@ -4418,10 +4421,10 @@ function Ze(r, e) {
|
|
|
4418
4421
|
s(Ze, "invariant");
|
|
4419
4422
|
|
|
4420
4423
|
// src/preview-api/modules/preview-web/render/CsfDocsRender.ts
|
|
4421
|
-
import { DOCS_RENDERED as
|
|
4424
|
+
import { DOCS_RENDERED as ki } from "storybook/internal/core-events";
|
|
4422
4425
|
|
|
4423
4426
|
// src/preview-api/modules/preview-web/docs-context/DocsContext.ts
|
|
4424
|
-
import { isStory as
|
|
4427
|
+
import { isStory as Di } from "storybook/internal/csf";
|
|
4425
4428
|
var Zr = class Zr {
|
|
4426
4429
|
constructor(e, t, o, n) {
|
|
4427
4430
|
this.channel = e;
|
|
@@ -4522,7 +4525,7 @@ CSF file?"
|
|
|
4522
4525
|
if (t)
|
|
4523
4526
|
return { type: "meta", csfFile: t };
|
|
4524
4527
|
let o = this.exportToStory.get(
|
|
4525
|
-
|
|
4528
|
+
Di(e) ? e.input : e
|
|
4526
4529
|
);
|
|
4527
4530
|
return o ? { type: "story", story: o } : { type: "component", component: e };
|
|
4528
4531
|
}
|
|
@@ -4616,7 +4619,7 @@ var et = class et {
|
|
|
4616
4619
|
);
|
|
4617
4620
|
let i = await n.renderer(), { render: a } = i, l = /* @__PURE__ */ s(async () => {
|
|
4618
4621
|
try {
|
|
4619
|
-
await a(o, n, e), this.channel.emit(
|
|
4622
|
+
await a(o, n, e), this.channel.emit(ki, this.id);
|
|
4620
4623
|
} catch (c) {
|
|
4621
4624
|
this.callbacks.showException(c);
|
|
4622
4625
|
}
|
|
@@ -4633,7 +4636,7 @@ s(et, "CsfDocsRender");
|
|
|
4633
4636
|
var je = et;
|
|
4634
4637
|
|
|
4635
4638
|
// src/preview-api/modules/preview-web/render/MdxDocsRender.ts
|
|
4636
|
-
import { DOCS_RENDERED as
|
|
4639
|
+
import { DOCS_RENDERED as ji } from "storybook/internal/core-events";
|
|
4637
4640
|
var rt = class rt {
|
|
4638
4641
|
constructor(e, t, o, n) {
|
|
4639
4642
|
this.channel = e;
|
|
@@ -4680,7 +4683,7 @@ var rt = class rt {
|
|
|
4680
4683
|
);
|
|
4681
4684
|
let i = { ...n, page: this.exports.default }, a = await n.renderer(), { render: l } = a, c = /* @__PURE__ */ s(async () => {
|
|
4682
4685
|
try {
|
|
4683
|
-
await l(o, i, e), this.channel.emit(
|
|
4686
|
+
await l(o, i, e), this.channel.emit(ji, this.id);
|
|
4684
4687
|
} catch (d) {
|
|
4685
4688
|
this.callbacks.showException(d);
|
|
4686
4689
|
}
|
|
@@ -4697,29 +4700,29 @@ s(rt, "MdxDocsRender");
|
|
|
4697
4700
|
var Me = rt;
|
|
4698
4701
|
|
|
4699
4702
|
// src/preview-api/modules/preview-web/PreviewWithSelection.tsx
|
|
4700
|
-
var
|
|
4701
|
-
function
|
|
4703
|
+
var Ki = globalThis;
|
|
4704
|
+
function Xi(r) {
|
|
4702
4705
|
let e = r.composedPath && r.composedPath()[0] || r.target;
|
|
4703
4706
|
return /input|textarea/i.test(e.tagName) || e.getAttribute("contenteditable") !== null;
|
|
4704
4707
|
}
|
|
4705
|
-
s(
|
|
4706
|
-
var
|
|
4707
|
-
function
|
|
4708
|
-
return r?.includes(
|
|
4708
|
+
s(Xi, "focusInInput");
|
|
4709
|
+
var Bo = "attached-mdx", Ji = "unattached-mdx";
|
|
4710
|
+
function Qi({ tags: r }) {
|
|
4711
|
+
return r?.includes(Ji) || r?.includes(Bo);
|
|
4709
4712
|
}
|
|
4710
|
-
s(
|
|
4713
|
+
s(Qi, "isMdxEntry");
|
|
4711
4714
|
function ot(r) {
|
|
4712
4715
|
return r.type === "story";
|
|
4713
4716
|
}
|
|
4714
4717
|
s(ot, "isStoryRender");
|
|
4715
|
-
function
|
|
4718
|
+
function Zi(r) {
|
|
4716
4719
|
return r.type === "docs";
|
|
4717
4720
|
}
|
|
4718
|
-
s(
|
|
4719
|
-
function
|
|
4720
|
-
return
|
|
4721
|
+
s(Zi, "isDocsRender");
|
|
4722
|
+
function ea(r) {
|
|
4723
|
+
return Zi(r) && r.subtype === "csf";
|
|
4721
4724
|
}
|
|
4722
|
-
s(
|
|
4725
|
+
s(ea, "isCsfDocsRender");
|
|
4723
4726
|
var nt = class nt extends Se {
|
|
4724
4727
|
constructor(t, o, n, i) {
|
|
4725
4728
|
super(t, o, void 0, !1);
|
|
@@ -4730,8 +4733,8 @@ var nt = class nt extends Se {
|
|
|
4730
4733
|
this.initialize();
|
|
4731
4734
|
}
|
|
4732
4735
|
setupListeners() {
|
|
4733
|
-
super.setupListeners(),
|
|
4734
|
-
|
|
4736
|
+
super.setupListeners(), Ki.onkeydown = this.onKeydown.bind(this), this.channel.on(Ni, this.onSetCurrentStory.bind(this)), this.channel.on(
|
|
4737
|
+
Hi, this.onUpdateQueryParams.bind(this)), this.channel.on(_i, this.onPreloadStories.bind(this));
|
|
4735
4738
|
}
|
|
4736
4739
|
async setInitialGlobals() {
|
|
4737
4740
|
if (!this.storyStoreValue)
|
|
@@ -4759,14 +4762,14 @@ var nt = class nt extends Se {
|
|
|
4759
4762
|
}
|
|
4760
4763
|
let { storySpecifier: t, args: o } = this.selectionStore.selectionSpecifier, n = this.storyStoreValue.storyIndex.entryFromSpecifier(t);
|
|
4761
4764
|
if (!n) {
|
|
4762
|
-
t === "*" ? this.renderStoryLoadingException(t, new
|
|
4765
|
+
t === "*" ? this.renderStoryLoadingException(t, new Wi()) : this.renderStoryLoadingException(
|
|
4763
4766
|
t,
|
|
4764
|
-
new
|
|
4767
|
+
new Yi({ storySpecifier: t.toString() })
|
|
4765
4768
|
);
|
|
4766
4769
|
return;
|
|
4767
4770
|
}
|
|
4768
4771
|
let { id: i, type: a } = n;
|
|
4769
|
-
this.selectionStore.setSelection({ storyId: i, viewMode: a }), this.channel.emit(
|
|
4772
|
+
this.selectionStore.setSelection({ storyId: i, viewMode: a }), this.channel.emit(Gi, this.selectionStore.selection), this.channel.emit(Lo,
|
|
4770
4773
|
this.selectionStore.selection), await this.renderSelection({ persistedArgs: o });
|
|
4771
4774
|
}
|
|
4772
4775
|
// EVENT HANDLERS
|
|
@@ -4785,15 +4788,15 @@ var nt = class nt extends Se {
|
|
|
4785
4788
|
selectSpecifiedStory();
|
|
4786
4789
|
}
|
|
4787
4790
|
onKeydown(t) {
|
|
4788
|
-
if (!this.storyRenders.find((o) => o.disableKeyListeners) && !
|
|
4791
|
+
if (!this.storyRenders.find((o) => o.disableKeyListeners) && !Xi(t)) {
|
|
4789
4792
|
let { altKey: o, ctrlKey: n, metaKey: i, shiftKey: a, key: l, code: c, keyCode: d } = t;
|
|
4790
|
-
this.channel.emit(
|
|
4793
|
+
this.channel.emit(Li, {
|
|
4791
4794
|
event: { altKey: o, ctrlKey: n, metaKey: i, shiftKey: a, key: l, code: c, keyCode: d }
|
|
4792
4795
|
});
|
|
4793
4796
|
}
|
|
4794
4797
|
}
|
|
4795
4798
|
async onSetCurrentStory(t) {
|
|
4796
|
-
this.selectionStore.setSelection({ viewMode: "story", ...t }), await this.storeInitializationPromise, this.channel.emit(
|
|
4799
|
+
this.selectionStore.setSelection({ viewMode: "story", ...t }), await this.storeInitializationPromise, this.channel.emit(Lo, this.selectionStore.
|
|
4797
4800
|
selection), this.renderSelection();
|
|
4798
4801
|
}
|
|
4799
4802
|
onUpdateQueryParams(t) {
|
|
@@ -4841,7 +4844,7 @@ var nt = class nt extends Se {
|
|
|
4841
4844
|
this.mainStoryCallbacks(i),
|
|
4842
4845
|
i,
|
|
4843
4846
|
"story"
|
|
4844
|
-
) :
|
|
4847
|
+
) : Qi(a) ? d = new Me(
|
|
4845
4848
|
this.channel,
|
|
4846
4849
|
this.storyStoreValue,
|
|
4847
4850
|
a,
|
|
@@ -4864,10 +4867,10 @@ var nt = class nt extends Se {
|
|
|
4864
4867
|
}
|
|
4865
4868
|
let h = !l && u && !d.isEqual(u);
|
|
4866
4869
|
if (t && ot(d) && (Ze(!!d.story), this.storyStoreValue.args.updateFromPersisted(d.story, t)), u && !u.torndown && !l && !h && !c) {
|
|
4867
|
-
this.currentRender = u, this.channel.emit(
|
|
4870
|
+
this.currentRender = u, this.channel.emit(Ui, i), this.view.showMain();
|
|
4868
4871
|
return;
|
|
4869
4872
|
}
|
|
4870
|
-
if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(
|
|
4873
|
+
if (u && await this.teardownRender(u, { viewModeChanged: c }), p && (l || c) && this.channel.emit(qi, i), ot(d)) {
|
|
4871
4874
|
Ze(!!d.story);
|
|
4872
4875
|
let {
|
|
4873
4876
|
parameters: y,
|
|
@@ -4879,28 +4882,28 @@ var nt = class nt extends Se {
|
|
|
4879
4882
|
storyGlobals: f,
|
|
4880
4883
|
globals: T
|
|
4881
4884
|
} = this.storyStoreValue.getStoryContext(d.story);
|
|
4882
|
-
this.channel.emit(
|
|
4885
|
+
this.channel.emit(Bi, {
|
|
4883
4886
|
id: i,
|
|
4884
4887
|
parameters: y,
|
|
4885
4888
|
initialArgs: g,
|
|
4886
4889
|
argTypes: b,
|
|
4887
4890
|
args: m
|
|
4888
|
-
}), this.channel.emit(
|
|
4891
|
+
}), this.channel.emit(No, { userGlobals: S, storyGlobals: f, globals: T, initialGlobals: R });
|
|
4889
4892
|
} else {
|
|
4890
4893
|
let { parameters: y } = this.storyStoreValue.projectAnnotations, { initialGlobals: g, globals: b } = this.storyStoreValue.userGlobals;
|
|
4891
|
-
if (this.channel.emit(
|
|
4894
|
+
if (this.channel.emit(No, {
|
|
4892
4895
|
globals: b,
|
|
4893
4896
|
initialGlobals: g,
|
|
4894
4897
|
storyGlobals: {},
|
|
4895
4898
|
userGlobals: b
|
|
4896
|
-
}),
|
|
4899
|
+
}), ea(d) || d.entry.tags?.includes(Bo)) {
|
|
4897
4900
|
if (!d.csfFiles)
|
|
4898
|
-
throw new
|
|
4901
|
+
throw new $i({ storyId: i });
|
|
4899
4902
|
({ parameters: y } = this.storyStoreValue.preparedMetaFromCSFFile({
|
|
4900
4903
|
csfFile: d.csfFiles[0]
|
|
4901
4904
|
}));
|
|
4902
4905
|
}
|
|
4903
|
-
this.channel.emit(
|
|
4906
|
+
this.channel.emit(Mi, {
|
|
4904
4907
|
id: i,
|
|
4905
4908
|
parameters: y
|
|
4906
4909
|
});
|
|
@@ -4929,21 +4932,21 @@ var nt = class nt extends Se {
|
|
|
4929
4932
|
super.renderPreviewEntryError(t, o), this.view.showErrorDisplay(o);
|
|
4930
4933
|
}
|
|
4931
4934
|
renderMissingStory() {
|
|
4932
|
-
this.view.showNoPreview(), this.channel.emit(
|
|
4935
|
+
this.view.showNoPreview(), this.channel.emit(qo);
|
|
4933
4936
|
}
|
|
4934
4937
|
renderStoryLoadingException(t, o) {
|
|
4935
|
-
er.error(o), this.view.showErrorDisplay(o), this.channel.emit(
|
|
4938
|
+
er.error(o), this.view.showErrorDisplay(o), this.channel.emit(qo, t);
|
|
4936
4939
|
}
|
|
4937
4940
|
// renderException is used if we fail to render the story and it is uncaught by the app layer
|
|
4938
4941
|
renderException(t, o) {
|
|
4939
4942
|
let { name: n = "Error", message: i = String(o), stack: a } = o;
|
|
4940
|
-
this.channel.emit(
|
|
4943
|
+
this.channel.emit(Vi, { name: n, message: i, stack: a }), this.channel.emit(zo, { newPhase: "errored", storyId: t }), this.view.showErrorDisplay(
|
|
4941
4944
|
o), er.error(`Error rendering story '${t}':`), er.error(o);
|
|
4942
4945
|
}
|
|
4943
4946
|
// renderError is used by the various app layers to inform the user they have done something
|
|
4944
4947
|
// wrong -- for instance returned the wrong thing from a story
|
|
4945
4948
|
renderError(t, { title: o, description: n }) {
|
|
4946
|
-
er.error(`Error rendering story ${o}: ${n}`), this.channel.emit(
|
|
4949
|
+
er.error(`Error rendering story ${o}: ${n}`), this.channel.emit(zi, { title: o, description: n }), this.channel.emit(zo, { newPhase: "er\
|
|
4947
4950
|
rored", storyId: t }), this.view.showErrorDisplay({
|
|
4948
4951
|
message: o,
|
|
4949
4952
|
stack: n
|
|
@@ -4955,15 +4958,15 @@ var Te = nt;
|
|
|
4955
4958
|
|
|
4956
4959
|
// src/preview-api/modules/preview-web/UrlStore.ts
|
|
4957
4960
|
var Le = pe(sr(), 1);
|
|
4958
|
-
import { global as
|
|
4961
|
+
import { global as Fa } from "@storybook/global";
|
|
4959
4962
|
|
|
4960
4963
|
// src/preview-api/modules/preview-web/parseArgsParam.ts
|
|
4961
|
-
import { once as
|
|
4962
|
-
var
|
|
4963
|
-
var
|
|
4964
|
-
pt = /* @__PURE__ */ s((r = "", e) => r === null || r === "" || !
|
|
4965
|
-
typeof e == "boolean" ? !0 : typeof e == "string" ?
|
|
4966
|
-
r, t)) : j(e) ? Object.entries(e).every(([t, o]) => pt(t, o)) : !1, "validateArgs"),
|
|
4964
|
+
import { once as va } from "storybook/internal/client-logger";
|
|
4965
|
+
var en = pe(sr(), 1);
|
|
4966
|
+
var Zo = /^[a-zA-Z0-9 _-]*$/, rn = /^-?[0-9]+(\.[0-9]+)?$/, Ca = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, tn = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
|
|
4967
|
+
pt = /* @__PURE__ */ s((r = "", e) => r === null || r === "" || !Zo.test(r) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
|
|
4968
|
+
typeof e == "boolean" ? !0 : typeof e == "string" ? Zo.test(e) || rn.test(e) || Ca.test(e) || tn.test(e) : Array.isArray(e) ? e.every((t) => pt(
|
|
4969
|
+
r, t)) : j(e) ? Object.entries(e).every(([t, o]) => pt(t, o)) : !1, "validateArgs"), Pa = {
|
|
4967
4970
|
delimiter: ";",
|
|
4968
4971
|
// we're parsing a single query param
|
|
4969
4972
|
nesting: !0,
|
|
@@ -4985,17 +4988,17 @@ r, t)) : j(e) ? Object.entries(e).every(([t, o]) => pt(t, o)) : !1, "validateArg
|
|
|
4985
4988
|
return new Date(r.replaceAll(" ", "+").slice(6, -1));
|
|
4986
4989
|
if (r.startsWith("!hex(") && r.endsWith(")"))
|
|
4987
4990
|
return `#${r.slice(5, -1)}`;
|
|
4988
|
-
let e = r.slice(1).match(
|
|
4991
|
+
let e = r.slice(1).match(tn);
|
|
4989
4992
|
if (e)
|
|
4990
4993
|
return r.startsWith("!rgba") || r.startsWith("!RGBA") ? `${e[1]}(${e[2]}, ${e[3]}, ${e[4]}, ${e[5]})` : r.startsWith("!hsla") || r.startsWith(
|
|
4991
4994
|
"!HSLA") ? `${e[1]}(${e[2]}, ${e[3]}%, ${e[4]}%, ${e[5]})` : r.startsWith("!rgb") || r.startsWith("!RGB") ? `${e[1]}(${e[2]}, ${e[3]}\
|
|
4992
4995
|
, ${e[4]})` : `${e[1]}(${e[2]}, ${e[3]}%, ${e[4]}%)`;
|
|
4993
4996
|
}
|
|
4994
|
-
return
|
|
4997
|
+
return rn.test(r) ? Number(r) : r;
|
|
4995
4998
|
}
|
|
4996
4999
|
}, ut = /* @__PURE__ */ s((r) => {
|
|
4997
5000
|
let e = r.split(";").map((t) => t.replace("=", "~").replace(":", "="));
|
|
4998
|
-
return Object.entries((0,
|
|
5001
|
+
return Object.entries((0, en.parse)(e.join(";"), Pa)).reduce((t, [o, n]) => pt(o, n) ? Object.assign(t, { [o]: n }) : (va.warn(F`
|
|
4999
5002
|
Omitted potentially unsafe URL args.
|
|
5000
5003
|
|
|
5001
5004
|
More info: https://storybook.js.org/docs/writing-stories/args#setting-args-through-the-url
|
|
@@ -5003,15 +5006,15 @@ r, t)) : j(e) ? Object.entries(e).every(([t, o]) => pt(t, o)) : !1, "validateArg
|
|
|
5003
5006
|
}, "parseArgsParam");
|
|
5004
5007
|
|
|
5005
5008
|
// src/preview-api/modules/preview-web/UrlStore.ts
|
|
5006
|
-
var { history:
|
|
5007
|
-
function
|
|
5009
|
+
var { history: on, document: Z } = Fa;
|
|
5010
|
+
function Ia(r) {
|
|
5008
5011
|
let e = (r || "").match(/^\/story\/(.+)/);
|
|
5009
5012
|
if (!e)
|
|
5010
5013
|
throw new Error(`Invalid path '${r}', must start with '/story/'`);
|
|
5011
5014
|
return e[1];
|
|
5012
5015
|
}
|
|
5013
|
-
s(
|
|
5014
|
-
var
|
|
5016
|
+
s(Ia, "pathToId");
|
|
5017
|
+
var nn = /* @__PURE__ */ s(({
|
|
5015
5018
|
selection: r,
|
|
5016
5019
|
extraParams: e
|
|
5017
5020
|
}) => {
|
|
@@ -5021,54 +5024,54 @@ var on = /* @__PURE__ */ s(({
|
|
|
5021
5024
|
...e,
|
|
5022
5025
|
...r && { id: r.storyId, viewMode: r.viewMode }
|
|
5023
5026
|
})}`;
|
|
5024
|
-
}, "getQueryString"),
|
|
5027
|
+
}, "getQueryString"), Oa = /* @__PURE__ */ s((r) => {
|
|
5025
5028
|
if (!r)
|
|
5026
5029
|
return;
|
|
5027
|
-
let e =
|
|
5028
|
-
Z.title = r.storyId,
|
|
5029
|
-
}, "setPath"),
|
|
5030
|
+
let e = nn({ selection: r }), { hash: t = "" } = Z.location;
|
|
5031
|
+
Z.title = r.storyId, on.replaceState({}, "", `${Z.location.pathname}${e}${t}`);
|
|
5032
|
+
}, "setPath"), Da = /* @__PURE__ */ s((r) => r != null && typeof r == "object" && Array.isArray(r) === !1, "isObject"), _e = /* @__PURE__ */ s(
|
|
5030
5033
|
(r) => {
|
|
5031
5034
|
if (r !== void 0) {
|
|
5032
5035
|
if (typeof r == "string")
|
|
5033
5036
|
return r;
|
|
5034
5037
|
if (Array.isArray(r))
|
|
5035
5038
|
return _e(r[0]);
|
|
5036
|
-
if (
|
|
5039
|
+
if (Da(r))
|
|
5037
5040
|
return _e(
|
|
5038
5041
|
Object.values(r).filter(Boolean)
|
|
5039
5042
|
);
|
|
5040
5043
|
}
|
|
5041
|
-
}, "getFirstString"),
|
|
5044
|
+
}, "getFirstString"), ka = /* @__PURE__ */ s(() => {
|
|
5042
5045
|
if (typeof Z < "u") {
|
|
5043
5046
|
let r = Z.location.search.slice(1), e = (0, Le.parse)(r), t = typeof e.args == "string" ? ut(e.args) : void 0, o = typeof e.globals == "\
|
|
5044
5047
|
string" ? ut(e.globals) : void 0, n = _e(e.viewMode);
|
|
5045
5048
|
(typeof n != "string" || !n.match(/docs|story/)) && (n = "story");
|
|
5046
|
-
let i = _e(e.path), a = i ?
|
|
5049
|
+
let i = _e(e.path), a = i ? Ia(i) : _e(e.id);
|
|
5047
5050
|
if (a)
|
|
5048
5051
|
return { storySpecifier: a, args: t, globals: o, viewMode: n };
|
|
5049
5052
|
}
|
|
5050
5053
|
return null;
|
|
5051
5054
|
}, "getSelectionSpecifierFromPath"), ft = class ft {
|
|
5052
5055
|
constructor() {
|
|
5053
|
-
this.selectionSpecifier =
|
|
5056
|
+
this.selectionSpecifier = ka();
|
|
5054
5057
|
}
|
|
5055
5058
|
setSelection(e) {
|
|
5056
|
-
this.selection = e,
|
|
5059
|
+
this.selection = e, Oa(this.selection);
|
|
5057
5060
|
}
|
|
5058
5061
|
setQueryParams(e) {
|
|
5059
|
-
let t =
|
|
5060
|
-
|
|
5062
|
+
let t = nn({ extraParams: e }), { hash: o = "" } = Z.location;
|
|
5063
|
+
on.replaceState({}, "", `${Z.location.pathname}${t}${o}`);
|
|
5061
5064
|
}
|
|
5062
5065
|
};
|
|
5063
5066
|
s(ft, "UrlStore");
|
|
5064
5067
|
var xe = ft;
|
|
5065
5068
|
|
|
5066
5069
|
// src/preview-api/modules/preview-web/WebView.ts
|
|
5067
|
-
var
|
|
5068
|
-
import { logger as
|
|
5069
|
-
import { global as
|
|
5070
|
-
var { document: D } =
|
|
5071
|
-
_STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(
|
|
5070
|
+
var Ln = pe(jn(), 1), Nn = pe(sr(), 1);
|
|
5071
|
+
import { logger as yl } from "storybook/internal/client-logger";
|
|
5072
|
+
import { global as ml } from "@storybook/global";
|
|
5073
|
+
var { document: D } = ml, Mn = 100, qn = /* @__PURE__ */ ((i) => (i.MAIN = "MAIN", i.NOPREVIEW = "NOPREVIEW", i.PREPARING_STORY = "PREPARING\
|
|
5074
|
+
_STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(qn || {}), Tt = {
|
|
5072
5075
|
PREPARING_STORY: "sb-show-preparing-story",
|
|
5073
5076
|
PREPARING_DOCS: "sb-show-preparing-docs",
|
|
5074
5077
|
MAIN: "sb-show-main",
|
|
@@ -5078,13 +5081,13 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Nn || {}),
|
|
|
5078
5081
|
centered: "sb-main-centered",
|
|
5079
5082
|
fullscreen: "sb-main-fullscreen",
|
|
5080
5083
|
padded: "sb-main-padded"
|
|
5081
|
-
},
|
|
5084
|
+
}, _n = new Ln.default({
|
|
5082
5085
|
escapeXML: !0
|
|
5083
5086
|
}), Rt = class Rt {
|
|
5084
5087
|
constructor() {
|
|
5085
5088
|
this.testing = !1;
|
|
5086
5089
|
if (typeof D < "u") {
|
|
5087
|
-
let { __SPECIAL_TEST_PARAMETER__: e } = (0,
|
|
5090
|
+
let { __SPECIAL_TEST_PARAMETER__: e } = (0, Nn.parse)(D.location.search.slice(1));
|
|
5088
5091
|
switch (e) {
|
|
5089
5092
|
case "preparing-story": {
|
|
5090
5093
|
this.showPreparingStory(), this.testing = !0;
|
|
@@ -5123,7 +5126,7 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Nn || {}),
|
|
|
5123
5126
|
D.body.classList.remove(this.currentLayoutClass), D.body.classList.add(t), this.currentLayoutClass = t;
|
|
5124
5127
|
}
|
|
5125
5128
|
checkIfLayoutExists(e) {
|
|
5126
|
-
xt[e] ||
|
|
5129
|
+
xt[e] || yl.warn(
|
|
5127
5130
|
F`
|
|
5128
5131
|
The desired layout: ${e} is not a valid option.
|
|
5129
5132
|
The possible options are: ${Object.keys(xt).join(", ")}, none.
|
|
@@ -5131,7 +5134,7 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Nn || {}),
|
|
|
5131
5134
|
);
|
|
5132
5135
|
}
|
|
5133
5136
|
showMode(e) {
|
|
5134
|
-
clearTimeout(this.preparingTimeout), Object.keys(
|
|
5137
|
+
clearTimeout(this.preparingTimeout), Object.keys(qn).forEach((t) => {
|
|
5135
5138
|
t === e ? D.body.classList.add(Tt[t]) : D.body.classList.remove(Tt[t]);
|
|
5136
5139
|
});
|
|
5137
5140
|
}
|
|
@@ -5139,7 +5142,7 @@ _STORY", i.PREPARING_DOCS = "PREPARING_DOCS", i.ERROR = "ERROR", i))(Nn || {}),
|
|
|
5139
5142
|
let o = e, n = t, i = e.split(`
|
|
5140
5143
|
`);
|
|
5141
5144
|
i.length > 1 && ([o] = i, n = i.slice(1).join(`
|
|
5142
|
-
`).replace(/^\n/, "")), D.getElementById("error-message").innerHTML =
|
|
5145
|
+
`).replace(/^\n/, "")), D.getElementById("error-message").innerHTML = _n.toHtml(o), D.getElementById("error-stack").innerHTML = _n.toHtml(n),
|
|
5143
5146
|
this.showMode("ERROR");
|
|
5144
5147
|
}
|
|
5145
5148
|
showNoPreview() {
|
|
@@ -5149,12 +5152,12 @@ true"));
|
|
|
5149
5152
|
showPreparingStory({ immediate: e = !1 } = {}) {
|
|
5150
5153
|
clearTimeout(this.preparingTimeout), e ? this.showMode("PREPARING_STORY") : this.preparingTimeout = setTimeout(
|
|
5151
5154
|
() => this.showMode("PREPARING_STORY"),
|
|
5152
|
-
|
|
5155
|
+
Mn
|
|
5153
5156
|
);
|
|
5154
5157
|
}
|
|
5155
5158
|
showPreparingDocs({ immediate: e = !1 } = {}) {
|
|
5156
5159
|
clearTimeout(this.preparingTimeout), e ? this.showMode("PREPARING_DOCS") : this.preparingTimeout = setTimeout(() => this.showMode("PREPA\
|
|
5157
|
-
RING_DOCS"),
|
|
5160
|
+
RING_DOCS"), Mn);
|
|
5158
5161
|
}
|
|
5159
5162
|
showMain() {
|
|
5160
5163
|
this.showMode("MAIN");
|
|
@@ -5178,15 +5181,15 @@ var wt = class wt extends Te {
|
|
|
5178
5181
|
super(t, o, new xe(), new Re());
|
|
5179
5182
|
this.importFn = t;
|
|
5180
5183
|
this.getProjectAnnotations = o;
|
|
5181
|
-
|
|
5184
|
+
hl.__STORYBOOK_PREVIEW__ = this;
|
|
5182
5185
|
}
|
|
5183
5186
|
};
|
|
5184
5187
|
s(wt, "PreviewWeb");
|
|
5185
5188
|
var fr = wt;
|
|
5186
5189
|
|
|
5187
5190
|
// src/preview-api/modules/preview-web/simulate-pageload.ts
|
|
5188
|
-
import { global as
|
|
5189
|
-
var { document: de } =
|
|
5191
|
+
import { global as gl } from "@storybook/global";
|
|
5192
|
+
var { document: de } = gl, bl = [
|
|
5190
5193
|
"application/javascript",
|
|
5191
5194
|
"application/ecmascript",
|
|
5192
5195
|
"application/x-ecmascript",
|
|
@@ -5205,38 +5208,38 @@ var { document: de } = hl, gl = [
|
|
|
5205
5208
|
"text/x-javascript",
|
|
5206
5209
|
// Support modern javascript
|
|
5207
5210
|
"module"
|
|
5208
|
-
],
|
|
5211
|
+
], Sl = "script", zn = "scripts-root";
|
|
5209
5212
|
function yr() {
|
|
5210
5213
|
let r = de.createEvent("Event");
|
|
5211
5214
|
r.initEvent("DOMContentLoaded", !0, !0), de.dispatchEvent(r);
|
|
5212
5215
|
}
|
|
5213
5216
|
s(yr, "simulateDOMContentLoaded");
|
|
5214
|
-
function
|
|
5217
|
+
function Tl(r, e, t) {
|
|
5215
5218
|
let o = de.createElement("script");
|
|
5216
5219
|
o.type = r.type === "module" ? "module" : "text/javascript", r.src ? (o.onload = e, o.onerror = e, o.src = r.src) : o.textContent = r.innerText,
|
|
5217
5220
|
t ? t.appendChild(o) : de.head.appendChild(o), r.parentNode.removeChild(r), r.src || e();
|
|
5218
5221
|
}
|
|
5219
|
-
s(
|
|
5220
|
-
function
|
|
5222
|
+
s(Tl, "insertScript");
|
|
5223
|
+
function Bn(r, e, t = 0) {
|
|
5221
5224
|
r[t](() => {
|
|
5222
|
-
t++, t === r.length ? e() :
|
|
5225
|
+
t++, t === r.length ? e() : Bn(r, e, t);
|
|
5223
5226
|
});
|
|
5224
5227
|
}
|
|
5225
|
-
s(
|
|
5226
|
-
function
|
|
5227
|
-
let e = de.getElementById(
|
|
5228
|
-
e ? e.innerHTML = "" : (e = de.createElement("div"), e.id =
|
|
5229
|
-
let t = Array.from(r.querySelectorAll(
|
|
5228
|
+
s(Bn, "insertScriptsSequentially");
|
|
5229
|
+
function Gn(r) {
|
|
5230
|
+
let e = de.getElementById(zn);
|
|
5231
|
+
e ? e.innerHTML = "" : (e = de.createElement("div"), e.id = zn, de.body.appendChild(e));
|
|
5232
|
+
let t = Array.from(r.querySelectorAll(Sl));
|
|
5230
5233
|
if (t.length) {
|
|
5231
5234
|
let o = [];
|
|
5232
5235
|
t.forEach((n) => {
|
|
5233
5236
|
let i = n.getAttribute("type");
|
|
5234
|
-
(!i ||
|
|
5235
|
-
}), o.length &&
|
|
5237
|
+
(!i || bl.includes(i)) && o.push((a) => Tl(n, a, e));
|
|
5238
|
+
}), o.length && Bn(o, yr, void 0);
|
|
5236
5239
|
} else
|
|
5237
5240
|
yr();
|
|
5238
5241
|
}
|
|
5239
|
-
s(
|
|
5242
|
+
s(Gn, "simulatePageLoad");
|
|
5240
5243
|
export {
|
|
5241
5244
|
Q as DocsContext,
|
|
5242
5245
|
te as HooksContext,
|
|
@@ -5253,40 +5256,40 @@ export {
|
|
|
5253
5256
|
_ as combineParameters,
|
|
5254
5257
|
ge as composeConfigs,
|
|
5255
5258
|
Hr as composeStepRunners,
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5259
|
+
Qs as composeStories,
|
|
5260
|
+
Ro as composeStory,
|
|
5261
|
+
Zs as createPlaywrightTest,
|
|
5262
|
+
go as decorateStory,
|
|
5260
5263
|
Br as defaultDecorateStory,
|
|
5261
|
-
|
|
5264
|
+
Jn as definePreview,
|
|
5262
5265
|
Je as filterArgTypes,
|
|
5263
5266
|
Ke as getComposedCoreAnnotations,
|
|
5264
|
-
|
|
5267
|
+
yo as getCoreAnnotations,
|
|
5265
5268
|
$r as getCsfFactoryAnnotations,
|
|
5266
5269
|
Oe as inferControls,
|
|
5267
|
-
|
|
5270
|
+
ys as makeDecorator,
|
|
5268
5271
|
hr as mockChannel,
|
|
5269
5272
|
me as normalizeProjectAnnotations,
|
|
5270
5273
|
ye as normalizeStory,
|
|
5271
5274
|
Gr as prepareMeta,
|
|
5272
5275
|
Ie as prepareStory,
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
+
bo as sanitizeStoryContextUpdate,
|
|
5277
|
+
Ws as setDefaultProjectAnnotations,
|
|
5278
|
+
Xs as setProjectAnnotations,
|
|
5276
5279
|
yr as simulateDOMContentLoaded,
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
+
Gn as simulatePageLoad,
|
|
5281
|
+
li as sortStoriesV7,
|
|
5282
|
+
us as useArgs,
|
|
5280
5283
|
Ce as useCallback,
|
|
5281
|
-
|
|
5284
|
+
ds as useChannel,
|
|
5282
5285
|
It as useEffect,
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5286
|
+
fs as useGlobals,
|
|
5287
|
+
ss as useMemo,
|
|
5288
|
+
ps as useParameter,
|
|
5289
|
+
cs as useReducer,
|
|
5290
|
+
is as useRef,
|
|
5291
|
+
ls as useState,
|
|
5289
5292
|
Ge as useStoryContext,
|
|
5290
|
-
|
|
5291
|
-
|
|
5293
|
+
ii as userOrAutoTitle,
|
|
5294
|
+
Co as userOrAutoTitleFromSpecifier
|
|
5292
5295
|
};
|