storybook 9.0.0-beta.4 → 9.0.0-beta.5
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/assets/server/base-preview-head.html +2 -1
- package/dist/babel/index.cjs +15060 -14974
- package/dist/babel/index.d.ts +37 -18
- package/dist/babel/index.js +15097 -15011
- package/dist/bin/index.cjs +44 -44
- package/dist/bin/index.js +44 -44
- package/dist/builder-manager/index.cjs +104 -99
- package/dist/builder-manager/index.js +103 -98
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/cli/index.cjs +19438 -19340
- package/dist/cli/index.js +19449 -19351
- package/dist/common/index.cjs +4997 -4925
- package/dist/common/index.js +5088 -5012
- package/dist/components/index.cjs +4581 -4419
- package/dist/components/index.d.ts +12 -12
- package/dist/components/index.js +3847 -3681
- package/dist/core-server/index.cjs +6358 -6274
- package/dist/core-server/index.js +6406 -6318
- package/dist/core-server/presets/common-manager.js +3863 -3468
- package/dist/core-server/presets/common-preset.cjs +2302 -2236
- package/dist/core-server/presets/common-preset.js +2389 -2319
- package/dist/docs-tools/index.cjs +484 -464
- package/dist/docs-tools/index.js +502 -482
- package/dist/highlight/index.cjs +19 -18
- package/dist/highlight/index.d.ts +4 -5
- package/dist/highlight/index.js +3 -2
- package/dist/highlight/preview.cjs +311 -307
- package/dist/highlight/preview.js +293 -289
- package/dist/instrumenter/index.cjs +561 -559
- package/dist/instrumenter/index.js +1551 -1498
- package/dist/manager/globals-module-info.cjs +1 -0
- package/dist/manager/globals-module-info.js +1 -0
- package/dist/manager/globals-runtime.js +19639 -19374
- package/dist/manager/runtime.js +4372 -4133
- package/dist/manager-api/index.cjs +2375 -2319
- package/dist/manager-api/index.js +1722 -1666
- package/dist/node-logger/index.cjs +25 -25
- package/dist/node-logger/index.js +25 -25
- package/dist/preview/runtime.js +12774 -12699
- package/dist/preview-api/index.cjs +1113 -1094
- package/dist/preview-api/index.js +1161 -1142
- package/dist/router/index.cjs +1366 -1347
- package/dist/router/index.js +594 -575
- package/dist/server-errors.cjs +6 -6
- package/dist/server-errors.js +6 -6
- package/dist/telemetry/index.cjs +696 -691
- package/dist/telemetry/index.js +764 -759
- package/dist/test/index.cjs +69 -70
- package/dist/test/index.d.ts +1216 -74
- package/dist/test/index.js +128 -130
- package/dist/test/preview.cjs +16 -16
- package/dist/test/preview.js +15 -15
- package/dist/theming/create.cjs +16 -17
- package/dist/theming/create.js +346 -228
- package/dist/theming/index.cjs +16 -17
- package/dist/theming/index.js +948 -839
- package/package.json +4 -12
package/dist/theming/create.js
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
var
|
|
2
|
-
var n = (r, e) =>
|
|
1
|
+
var se = Object.defineProperty;
|
|
2
|
+
var n = (r, e) => se(r, "name", { value: e, configurable: !0 });
|
|
3
3
|
|
|
4
4
|
// ../node_modules/@babel/runtime/helpers/esm/extends.js
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function l() {
|
|
6
|
+
return l = Object.assign ? Object.assign.bind() : function(r) {
|
|
7
7
|
for (var e = 1; e < arguments.length; e++) {
|
|
8
8
|
var t = arguments[e];
|
|
9
9
|
for (var a in t) ({}).hasOwnProperty.call(t, a) && (r[a] = t[a]);
|
|
10
10
|
}
|
|
11
11
|
return r;
|
|
12
|
-
},
|
|
12
|
+
}, l.apply(null, arguments);
|
|
13
13
|
}
|
|
14
|
-
n(
|
|
14
|
+
n(l, "_extends");
|
|
15
15
|
|
|
16
16
|
// ../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
17
|
-
function
|
|
17
|
+
function V(r) {
|
|
18
18
|
if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19
19
|
return r;
|
|
20
20
|
}
|
|
21
|
-
n(
|
|
21
|
+
n(V, "_assertThisInitialized");
|
|
22
22
|
|
|
23
23
|
// ../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
24
|
-
function
|
|
25
|
-
return
|
|
24
|
+
function v(r, e) {
|
|
25
|
+
return v = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, a) {
|
|
26
26
|
return t.__proto__ = a, t;
|
|
27
|
-
},
|
|
27
|
+
}, v(r, e);
|
|
28
28
|
}
|
|
29
|
-
n(
|
|
29
|
+
n(v, "_setPrototypeOf");
|
|
30
30
|
|
|
31
31
|
// ../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
32
|
-
function
|
|
33
|
-
r.prototype = Object.create(e.prototype), r.prototype.constructor = r,
|
|
32
|
+
function N(r, e) {
|
|
33
|
+
r.prototype = Object.create(e.prototype), r.prototype.constructor = r, v(r, e);
|
|
34
34
|
}
|
|
35
|
-
n(
|
|
35
|
+
n(N, "_inheritsLoose");
|
|
36
36
|
|
|
37
37
|
// ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
38
|
-
function
|
|
39
|
-
return
|
|
38
|
+
function R(r) {
|
|
39
|
+
return R = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
40
40
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
41
|
-
},
|
|
41
|
+
}, R(r);
|
|
42
42
|
}
|
|
43
|
-
n(
|
|
43
|
+
n(R, "_getPrototypeOf");
|
|
44
44
|
|
|
45
45
|
// ../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
|
|
46
|
-
function
|
|
46
|
+
function G(r) {
|
|
47
47
|
try {
|
|
48
48
|
return Function.toString.call(r).indexOf("[native code]") !== -1;
|
|
49
49
|
} catch {
|
|
50
50
|
return typeof r == "function";
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
n(
|
|
53
|
+
n(G, "_isNativeFunction");
|
|
54
54
|
|
|
55
55
|
// ../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
|
|
56
|
-
function
|
|
56
|
+
function k() {
|
|
57
57
|
try {
|
|
58
58
|
var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
59
59
|
}));
|
|
60
60
|
} catch {
|
|
61
61
|
}
|
|
62
|
-
return (
|
|
62
|
+
return (k = /* @__PURE__ */ n(function() {
|
|
63
63
|
return !!r;
|
|
64
64
|
}, "_isNativeReflectConstruct"))();
|
|
65
65
|
}
|
|
66
|
-
n(
|
|
66
|
+
n(k, "_isNativeReflectConstruct");
|
|
67
67
|
|
|
68
68
|
// ../node_modules/@babel/runtime/helpers/esm/construct.js
|
|
69
|
-
function
|
|
70
|
-
if (
|
|
69
|
+
function Q(r, e, t) {
|
|
70
|
+
if (k()) return Reflect.construct.apply(null, arguments);
|
|
71
71
|
var a = [null];
|
|
72
72
|
a.push.apply(a, e);
|
|
73
73
|
var i = new (r.bind.apply(r, a))();
|
|
74
|
-
return t &&
|
|
74
|
+
return t && v(i, t.prototype), i;
|
|
75
75
|
}
|
|
76
|
-
n(
|
|
76
|
+
n(Q, "_construct");
|
|
77
77
|
|
|
78
78
|
// ../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
|
|
79
|
-
function
|
|
79
|
+
function j(r) {
|
|
80
80
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
81
|
-
return
|
|
82
|
-
if (a === null || !
|
|
81
|
+
return j = /* @__PURE__ */ n(function(a) {
|
|
82
|
+
if (a === null || !G(a)) return a;
|
|
83
83
|
if (typeof a != "function") throw new TypeError("Super expression must either be null or a function");
|
|
84
84
|
if (e !== void 0) {
|
|
85
85
|
if (e.has(a)) return e.get(a);
|
|
86
86
|
e.set(a, i);
|
|
87
87
|
}
|
|
88
88
|
function i() {
|
|
89
|
-
return
|
|
89
|
+
return Q(a, arguments, R(this).constructor);
|
|
90
90
|
}
|
|
91
91
|
return n(i, "Wrapper"), i.prototype = Object.create(a.prototype, {
|
|
92
92
|
constructor: {
|
|
@@ -95,13 +95,13 @@ function C(r) {
|
|
|
95
95
|
writable: !0,
|
|
96
96
|
configurable: !0
|
|
97
97
|
}
|
|
98
|
-
}),
|
|
99
|
-
}, "_wrapNativeSuper"),
|
|
98
|
+
}), v(i, a);
|
|
99
|
+
}, "_wrapNativeSuper"), j(r);
|
|
100
100
|
}
|
|
101
|
-
n(
|
|
101
|
+
n(j, "_wrapNativeSuper");
|
|
102
102
|
|
|
103
103
|
// ../node_modules/polished/dist/polished.esm.js
|
|
104
|
-
var
|
|
104
|
+
var fe = {
|
|
105
105
|
1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0\
|
|
106
106
|
.4, lightness: 0.75 }).
|
|
107
107
|
|
|
@@ -334,45 +334,78 @@ n please supply them in simple values, e.g. animation('rotate', '2s').
|
|
|
334
334
|
78: `base must be set in "px" or "%" but you set it in "%s".
|
|
335
335
|
`
|
|
336
336
|
};
|
|
337
|
-
function
|
|
337
|
+
function pe() {
|
|
338
338
|
for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++)
|
|
339
339
|
e[t] = arguments[t];
|
|
340
340
|
var a = e[0], i = [], o;
|
|
341
341
|
for (o = 1; o < e.length; o += 1)
|
|
342
342
|
i.push(e[o]);
|
|
343
|
-
return i.forEach(function(
|
|
344
|
-
a = a.replace(/%[a-z]/,
|
|
343
|
+
return i.forEach(function(u) {
|
|
344
|
+
a = a.replace(/%[a-z]/, u);
|
|
345
345
|
}), a;
|
|
346
346
|
}
|
|
347
|
-
n(
|
|
347
|
+
n(pe, "format");
|
|
348
348
|
var d = /* @__PURE__ */ function(r) {
|
|
349
|
-
|
|
349
|
+
N(e, r);
|
|
350
350
|
function e(t) {
|
|
351
|
-
for (var a, i = arguments.length, o = new Array(i > 1 ? i - 1 : 0),
|
|
352
|
-
o[
|
|
353
|
-
return a = r.call(this,
|
|
351
|
+
for (var a, i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), u = 1; u < i; u++)
|
|
352
|
+
o[u - 1] = arguments[u];
|
|
353
|
+
return a = r.call(this, pe.apply(void 0, [fe[t]].concat(o))) || this, V(a);
|
|
354
354
|
}
|
|
355
355
|
return n(e, "PolishedError"), e;
|
|
356
|
-
}(/* @__PURE__ */
|
|
357
|
-
function
|
|
356
|
+
}(/* @__PURE__ */ j(Error));
|
|
357
|
+
function Y(r, e) {
|
|
358
|
+
return r.substr(-e.length) === e;
|
|
359
|
+
}
|
|
360
|
+
n(Y, "endsWith");
|
|
361
|
+
var le = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
|
|
362
|
+
function J(r) {
|
|
363
|
+
if (typeof r != "string") return r;
|
|
364
|
+
var e = r.match(le);
|
|
365
|
+
return e ? parseFloat(r) : r;
|
|
366
|
+
}
|
|
367
|
+
n(J, "stripUnit");
|
|
368
|
+
var de = /* @__PURE__ */ n(function(e) {
|
|
369
|
+
return function(t, a) {
|
|
370
|
+
a === void 0 && (a = "16px");
|
|
371
|
+
var i = t, o = a;
|
|
372
|
+
if (typeof t == "string") {
|
|
373
|
+
if (!Y(t, "px"))
|
|
374
|
+
throw new d(69, e, t);
|
|
375
|
+
i = J(t);
|
|
376
|
+
}
|
|
377
|
+
if (typeof a == "string") {
|
|
378
|
+
if (!Y(a, "px"))
|
|
379
|
+
throw new d(70, e, a);
|
|
380
|
+
o = J(a);
|
|
381
|
+
}
|
|
382
|
+
if (typeof i == "string")
|
|
383
|
+
throw new d(71, t, e);
|
|
384
|
+
if (typeof o == "string")
|
|
385
|
+
throw new d(72, a, e);
|
|
386
|
+
return "" + i / o + e;
|
|
387
|
+
};
|
|
388
|
+
}, "pxtoFactory"), X = de, Mr = X("em");
|
|
389
|
+
var Pr = X("rem");
|
|
390
|
+
function $(r) {
|
|
358
391
|
return Math.round(r * 255);
|
|
359
392
|
}
|
|
360
|
-
n(
|
|
361
|
-
function
|
|
362
|
-
return
|
|
393
|
+
n($, "colorToInt");
|
|
394
|
+
function ce(r, e, t) {
|
|
395
|
+
return $(r) + "," + $(e) + "," + $(t);
|
|
363
396
|
}
|
|
364
|
-
n(
|
|
365
|
-
function
|
|
366
|
-
if (a === void 0 && (a =
|
|
397
|
+
n(ce, "convertToInt");
|
|
398
|
+
function T(r, e, t, a) {
|
|
399
|
+
if (a === void 0 && (a = ce), e === 0)
|
|
367
400
|
return a(t, t, t);
|
|
368
|
-
var i = (r % 360 + 360) % 360 / 60, o = (1 - Math.abs(2 * t - 1)) * e,
|
|
369
|
-
i >= 0 && i < 1 ? (f = o, p =
|
|
370
|
-
i >= 4 && i < 5 ? (f =
|
|
371
|
-
var
|
|
372
|
-
return a(
|
|
373
|
-
}
|
|
374
|
-
n(
|
|
375
|
-
var
|
|
401
|
+
var i = (r % 360 + 360) % 360 / 60, o = (1 - Math.abs(2 * t - 1)) * e, u = o * (1 - Math.abs(i % 2 - 1)), f = 0, p = 0, g = 0;
|
|
402
|
+
i >= 0 && i < 1 ? (f = o, p = u) : i >= 1 && i < 2 ? (f = u, p = o) : i >= 2 && i < 3 ? (p = o, g = u) : i >= 3 && i < 4 ? (p = u, g = o) :
|
|
403
|
+
i >= 4 && i < 5 ? (f = u, g = o) : i >= 5 && i < 6 && (f = o, g = u);
|
|
404
|
+
var b = t - o / 2, h = f + b, c = p + b, A = g + b;
|
|
405
|
+
return a(h, c, A);
|
|
406
|
+
}
|
|
407
|
+
n(T, "hslToRgb");
|
|
408
|
+
var Z = {
|
|
376
409
|
aliceblue: "f0f8ff",
|
|
377
410
|
antiquewhite: "faebd7",
|
|
378
411
|
aqua: "00ffff",
|
|
@@ -522,26 +555,26 @@ var G = {
|
|
|
522
555
|
yellow: "ff0",
|
|
523
556
|
yellowgreen: "9acd32"
|
|
524
557
|
};
|
|
525
|
-
function
|
|
558
|
+
function me(r) {
|
|
526
559
|
if (typeof r != "string") return r;
|
|
527
560
|
var e = r.toLowerCase();
|
|
528
|
-
return
|
|
561
|
+
return Z[e] ? "#" + Z[e] : r;
|
|
529
562
|
}
|
|
530
|
-
n(
|
|
531
|
-
var
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
function
|
|
563
|
+
n(me, "nameToHex");
|
|
564
|
+
var ge = /^#[a-fA-F0-9]{6}$/, he = /^#[a-fA-F0-9]{8}$/, be = /^#[a-fA-F0-9]{3}$/, ve = /^#[a-fA-F0-9]{4}$/, B = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,
|
|
565
|
+
ye = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, we = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,
|
|
566
|
+
xe = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
567
|
+
function F(r) {
|
|
535
568
|
if (typeof r != "string")
|
|
536
569
|
throw new d(3);
|
|
537
|
-
var e =
|
|
538
|
-
if (e.match(
|
|
570
|
+
var e = me(r);
|
|
571
|
+
if (e.match(ge))
|
|
539
572
|
return {
|
|
540
573
|
red: parseInt("" + e[1] + e[2], 16),
|
|
541
574
|
green: parseInt("" + e[3] + e[4], 16),
|
|
542
575
|
blue: parseInt("" + e[5] + e[6], 16)
|
|
543
576
|
};
|
|
544
|
-
if (e.match(
|
|
577
|
+
if (e.match(he)) {
|
|
545
578
|
var t = parseFloat((parseInt("" + e[7] + e[8], 16) / 255).toFixed(2));
|
|
546
579
|
return {
|
|
547
580
|
red: parseInt("" + e[1] + e[2], 16),
|
|
@@ -550,13 +583,13 @@ function $(r) {
|
|
|
550
583
|
alpha: t
|
|
551
584
|
};
|
|
552
585
|
}
|
|
553
|
-
if (e.match(
|
|
586
|
+
if (e.match(be))
|
|
554
587
|
return {
|
|
555
588
|
red: parseInt("" + e[1] + e[1], 16),
|
|
556
589
|
green: parseInt("" + e[2] + e[2], 16),
|
|
557
590
|
blue: parseInt("" + e[3] + e[3], 16)
|
|
558
591
|
};
|
|
559
|
-
if (e.match(
|
|
592
|
+
if (e.match(ve)) {
|
|
560
593
|
var a = parseFloat((parseInt("" + e[4] + e[4], 16) / 255).toFixed(2));
|
|
561
594
|
return {
|
|
562
595
|
red: parseInt("" + e[1] + e[1], 16),
|
|
@@ -565,14 +598,14 @@ function $(r) {
|
|
|
565
598
|
alpha: a
|
|
566
599
|
};
|
|
567
600
|
}
|
|
568
|
-
var i =
|
|
601
|
+
var i = B.exec(e);
|
|
569
602
|
if (i)
|
|
570
603
|
return {
|
|
571
604
|
red: parseInt("" + i[1], 10),
|
|
572
605
|
green: parseInt("" + i[2], 10),
|
|
573
606
|
blue: parseInt("" + i[3], 10)
|
|
574
607
|
};
|
|
575
|
-
var o =
|
|
608
|
+
var o = ye.exec(e.substring(0, 50));
|
|
576
609
|
if (o)
|
|
577
610
|
return {
|
|
578
611
|
red: parseInt("" + o[1], 10),
|
|
@@ -580,48 +613,48 @@ function $(r) {
|
|
|
580
613
|
blue: parseInt("" + o[3], 10),
|
|
581
614
|
alpha: parseFloat("" + o[4]) > 1 ? parseFloat("" + o[4]) / 100 : parseFloat("" + o[4])
|
|
582
615
|
};
|
|
583
|
-
var
|
|
584
|
-
if (
|
|
585
|
-
var f = parseInt("" +
|
|
586
|
-
exec(
|
|
587
|
-
if (!
|
|
588
|
-
throw new d(4, e,
|
|
616
|
+
var u = we.exec(e);
|
|
617
|
+
if (u) {
|
|
618
|
+
var f = parseInt("" + u[1], 10), p = parseInt("" + u[2], 10) / 100, g = parseInt("" + u[3], 10) / 100, b = "rgb(" + T(f, p, g) + ")", h = B.
|
|
619
|
+
exec(b);
|
|
620
|
+
if (!h)
|
|
621
|
+
throw new d(4, e, b);
|
|
589
622
|
return {
|
|
590
|
-
red: parseInt("" +
|
|
591
|
-
green: parseInt("" +
|
|
592
|
-
blue: parseInt("" +
|
|
623
|
+
red: parseInt("" + h[1], 10),
|
|
624
|
+
green: parseInt("" + h[2], 10),
|
|
625
|
+
blue: parseInt("" + h[3], 10)
|
|
593
626
|
};
|
|
594
627
|
}
|
|
595
|
-
var c =
|
|
628
|
+
var c = xe.exec(e.substring(0, 50));
|
|
596
629
|
if (c) {
|
|
597
|
-
var A = parseInt("" + c[1], 10),
|
|
598
|
-
|
|
599
|
-
if (!
|
|
600
|
-
throw new d(4, e,
|
|
630
|
+
var A = parseInt("" + c[1], 10), oe = parseInt("" + c[2], 10) / 100, ue = parseInt("" + c[3], 10) / 100, U = "rgb(" + T(A, oe, ue) + ")",
|
|
631
|
+
I = B.exec(U);
|
|
632
|
+
if (!I)
|
|
633
|
+
throw new d(4, e, U);
|
|
601
634
|
return {
|
|
602
|
-
red: parseInt("" +
|
|
603
|
-
green: parseInt("" +
|
|
604
|
-
blue: parseInt("" +
|
|
635
|
+
red: parseInt("" + I[1], 10),
|
|
636
|
+
green: parseInt("" + I[2], 10),
|
|
637
|
+
blue: parseInt("" + I[3], 10),
|
|
605
638
|
alpha: parseFloat("" + c[4]) > 1 ? parseFloat("" + c[4]) / 100 : parseFloat("" + c[4])
|
|
606
639
|
};
|
|
607
640
|
}
|
|
608
641
|
throw new d(5);
|
|
609
642
|
}
|
|
610
|
-
n(
|
|
611
|
-
function
|
|
612
|
-
var e = r.red / 255, t = r.green / 255, a = r.blue / 255, i = Math.max(e, t, a), o = Math.min(e, t, a),
|
|
643
|
+
n(F, "parseToRgb");
|
|
644
|
+
function Se(r) {
|
|
645
|
+
var e = r.red / 255, t = r.green / 255, a = r.blue / 255, i = Math.max(e, t, a), o = Math.min(e, t, a), u = (i + o) / 2;
|
|
613
646
|
if (i === o)
|
|
614
647
|
return r.alpha !== void 0 ? {
|
|
615
648
|
hue: 0,
|
|
616
649
|
saturation: 0,
|
|
617
|
-
lightness:
|
|
650
|
+
lightness: u,
|
|
618
651
|
alpha: r.alpha
|
|
619
652
|
} : {
|
|
620
653
|
hue: 0,
|
|
621
654
|
saturation: 0,
|
|
622
|
-
lightness:
|
|
655
|
+
lightness: u
|
|
623
656
|
};
|
|
624
|
-
var f, p = i - o,
|
|
657
|
+
var f, p = i - o, g = u > 0.5 ? p / (2 - i - o) : p / (i + o);
|
|
625
658
|
switch (i) {
|
|
626
659
|
case e:
|
|
627
660
|
f = (t - a) / p + (t < a ? 6 : 0);
|
|
@@ -635,142 +668,227 @@ function he(r) {
|
|
|
635
668
|
}
|
|
636
669
|
return f *= 60, r.alpha !== void 0 ? {
|
|
637
670
|
hue: f,
|
|
638
|
-
saturation:
|
|
639
|
-
lightness:
|
|
671
|
+
saturation: g,
|
|
672
|
+
lightness: u,
|
|
640
673
|
alpha: r.alpha
|
|
641
674
|
} : {
|
|
642
675
|
hue: f,
|
|
643
|
-
saturation:
|
|
644
|
-
lightness:
|
|
676
|
+
saturation: g,
|
|
677
|
+
lightness: u
|
|
645
678
|
};
|
|
646
679
|
}
|
|
647
|
-
n(
|
|
648
|
-
function
|
|
649
|
-
return
|
|
680
|
+
n(Se, "rgbToHsl");
|
|
681
|
+
function y(r) {
|
|
682
|
+
return Se(F(r));
|
|
650
683
|
}
|
|
651
|
-
n(
|
|
652
|
-
var
|
|
684
|
+
n(y, "parseToHsl");
|
|
685
|
+
var Fe = /* @__PURE__ */ n(function(e) {
|
|
653
686
|
return e.length === 7 && e[1] === e[2] && e[3] === e[4] && e[5] === e[6] ? "#" + e[1] + e[3] + e[5] : e;
|
|
654
|
-
}, "reduceHexValue"),
|
|
655
|
-
function
|
|
687
|
+
}, "reduceHexValue"), P = Fe;
|
|
688
|
+
function x(r) {
|
|
656
689
|
var e = r.toString(16);
|
|
657
690
|
return e.length === 1 ? "0" + e : e;
|
|
658
691
|
}
|
|
659
|
-
n(
|
|
660
|
-
function
|
|
661
|
-
return
|
|
692
|
+
n(x, "numberToHex");
|
|
693
|
+
function M(r) {
|
|
694
|
+
return x(Math.round(r * 255));
|
|
662
695
|
}
|
|
663
|
-
n(
|
|
664
|
-
function
|
|
665
|
-
return
|
|
696
|
+
n(M, "colorToHex");
|
|
697
|
+
function Ce(r, e, t) {
|
|
698
|
+
return P("#" + M(r) + M(e) + M(t));
|
|
666
699
|
}
|
|
667
|
-
n(
|
|
668
|
-
function
|
|
669
|
-
return
|
|
700
|
+
n(Ce, "convertToHex");
|
|
701
|
+
function O(r, e, t) {
|
|
702
|
+
return T(r, e, t, Ce);
|
|
670
703
|
}
|
|
671
|
-
n(
|
|
672
|
-
function
|
|
704
|
+
n(O, "hslToHex");
|
|
705
|
+
function ze(r, e, t) {
|
|
673
706
|
if (typeof r == "number" && typeof e == "number" && typeof t == "number")
|
|
674
|
-
return
|
|
707
|
+
return O(r, e, t);
|
|
675
708
|
if (typeof r == "object" && e === void 0 && t === void 0)
|
|
676
|
-
return
|
|
709
|
+
return O(r.hue, r.saturation, r.lightness);
|
|
677
710
|
throw new d(1);
|
|
678
711
|
}
|
|
679
|
-
n(
|
|
680
|
-
function
|
|
712
|
+
n(ze, "hsl");
|
|
713
|
+
function Ae(r, e, t, a) {
|
|
681
714
|
if (typeof r == "number" && typeof e == "number" && typeof t == "number" && typeof a == "number")
|
|
682
|
-
return a >= 1 ?
|
|
715
|
+
return a >= 1 ? O(r, e, t) : "rgba(" + T(r, e, t) + "," + a + ")";
|
|
683
716
|
if (typeof r == "object" && e === void 0 && t === void 0 && a === void 0)
|
|
684
|
-
return r.alpha >= 1 ?
|
|
717
|
+
return r.alpha >= 1 ? O(r.hue, r.saturation, r.lightness) : "rgba(" + T(r.hue, r.saturation, r.lightness) + "," + r.alpha + ")";
|
|
685
718
|
throw new d(2);
|
|
686
719
|
}
|
|
687
|
-
n(
|
|
688
|
-
function
|
|
720
|
+
n(Ae, "hsla");
|
|
721
|
+
function E(r, e, t) {
|
|
689
722
|
if (typeof r == "number" && typeof e == "number" && typeof t == "number")
|
|
690
|
-
return
|
|
723
|
+
return P("#" + x(r) + x(e) + x(t));
|
|
691
724
|
if (typeof r == "object" && e === void 0 && t === void 0)
|
|
692
|
-
return
|
|
725
|
+
return P("#" + x(r.red) + x(r.green) + x(r.blue));
|
|
693
726
|
throw new d(6);
|
|
694
727
|
}
|
|
695
|
-
n(
|
|
696
|
-
function
|
|
728
|
+
n(E, "rgb");
|
|
729
|
+
function S(r, e, t, a) {
|
|
697
730
|
if (typeof r == "string" && typeof e == "number") {
|
|
698
|
-
var i =
|
|
731
|
+
var i = F(r);
|
|
699
732
|
return "rgba(" + i.red + "," + i.green + "," + i.blue + "," + e + ")";
|
|
700
733
|
} else {
|
|
701
734
|
if (typeof r == "number" && typeof e == "number" && typeof t == "number" && typeof a == "number")
|
|
702
|
-
return a >= 1 ?
|
|
735
|
+
return a >= 1 ? E(r, e, t) : "rgba(" + r + "," + e + "," + t + "," + a + ")";
|
|
703
736
|
if (typeof r == "object" && e === void 0 && t === void 0 && a === void 0)
|
|
704
|
-
return r.alpha >= 1 ?
|
|
737
|
+
return r.alpha >= 1 ? E(r.red, r.green, r.blue) : "rgba(" + r.red + "," + r.green + "," + r.blue + "," + r.alpha + ")";
|
|
705
738
|
}
|
|
706
739
|
throw new d(7);
|
|
707
740
|
}
|
|
708
|
-
n(
|
|
709
|
-
var
|
|
741
|
+
n(S, "rgba");
|
|
742
|
+
var Te = /* @__PURE__ */ n(function(e) {
|
|
710
743
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && (typeof e.alpha != "number" || typeof e.alpha >
|
|
711
744
|
"u");
|
|
712
|
-
}, "isRgb"),
|
|
745
|
+
}, "isRgb"), Ie = /* @__PURE__ */ n(function(e) {
|
|
713
746
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && typeof e.alpha == "number";
|
|
714
|
-
}, "isRgba"),
|
|
747
|
+
}, "isRgba"), Re = /* @__PURE__ */ n(function(e) {
|
|
715
748
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && (typeof e.alpha != "number" || typeof e.
|
|
716
749
|
alpha > "u");
|
|
717
|
-
}, "isHsl"),
|
|
750
|
+
}, "isHsl"), je = /* @__PURE__ */ n(function(e) {
|
|
718
751
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && typeof e.alpha == "number";
|
|
719
752
|
}, "isHsla");
|
|
720
|
-
function
|
|
753
|
+
function w(r) {
|
|
721
754
|
if (typeof r != "object") throw new d(8);
|
|
722
|
-
if (
|
|
723
|
-
if (
|
|
724
|
-
if (
|
|
725
|
-
if (
|
|
755
|
+
if (Ie(r)) return S(r);
|
|
756
|
+
if (Te(r)) return E(r);
|
|
757
|
+
if (je(r)) return Ae(r);
|
|
758
|
+
if (Re(r)) return ze(r);
|
|
726
759
|
throw new d(8);
|
|
727
760
|
}
|
|
728
|
-
n(
|
|
729
|
-
function
|
|
761
|
+
n(w, "toColorString");
|
|
762
|
+
function K(r, e, t) {
|
|
730
763
|
return /* @__PURE__ */ n(function() {
|
|
731
764
|
var i = t.concat(Array.prototype.slice.call(arguments));
|
|
732
|
-
return i.length >= e ? r.apply(this, i) :
|
|
765
|
+
return i.length >= e ? r.apply(this, i) : K(r, e, i);
|
|
733
766
|
}, "fn");
|
|
734
767
|
}
|
|
735
|
-
n(
|
|
736
|
-
function
|
|
737
|
-
return
|
|
768
|
+
n(K, "curried");
|
|
769
|
+
function m(r) {
|
|
770
|
+
return K(r, r.length, []);
|
|
738
771
|
}
|
|
739
|
-
n(
|
|
740
|
-
function
|
|
772
|
+
n(m, "curry");
|
|
773
|
+
function Oe(r, e) {
|
|
774
|
+
if (e === "transparent") return e;
|
|
775
|
+
var t = y(e);
|
|
776
|
+
return w(l({}, t, {
|
|
777
|
+
hue: t.hue + parseFloat(r)
|
|
778
|
+
}));
|
|
779
|
+
}
|
|
780
|
+
n(Oe, "adjustHue");
|
|
781
|
+
var Er = m(Oe);
|
|
782
|
+
function C(r, e, t) {
|
|
741
783
|
return Math.max(r, Math.min(e, t));
|
|
742
784
|
}
|
|
743
|
-
n(
|
|
744
|
-
function
|
|
785
|
+
n(C, "guard");
|
|
786
|
+
function ke(r, e) {
|
|
745
787
|
if (e === "transparent") return e;
|
|
746
|
-
var t =
|
|
747
|
-
return
|
|
748
|
-
lightness:
|
|
788
|
+
var t = y(e);
|
|
789
|
+
return w(l({}, t, {
|
|
790
|
+
lightness: C(0, 1, t.lightness - parseFloat(r))
|
|
749
791
|
}));
|
|
750
792
|
}
|
|
751
|
-
n(
|
|
752
|
-
var
|
|
753
|
-
function
|
|
793
|
+
n(ke, "darken");
|
|
794
|
+
var $e = m(ke), _ = $e;
|
|
795
|
+
function Be(r, e) {
|
|
754
796
|
if (e === "transparent") return e;
|
|
755
|
-
var t =
|
|
756
|
-
return
|
|
757
|
-
|
|
797
|
+
var t = y(e);
|
|
798
|
+
return w(l({}, t, {
|
|
799
|
+
saturation: C(0, 1, t.saturation - parseFloat(r))
|
|
758
800
|
}));
|
|
759
801
|
}
|
|
760
|
-
n(
|
|
761
|
-
var
|
|
762
|
-
function
|
|
802
|
+
n(Be, "desaturate");
|
|
803
|
+
var Hr = m(Be);
|
|
804
|
+
function Me(r, e) {
|
|
805
|
+
if (e === "transparent") return e;
|
|
806
|
+
var t = y(e);
|
|
807
|
+
return w(l({}, t, {
|
|
808
|
+
lightness: C(0, 1, t.lightness + parseFloat(r))
|
|
809
|
+
}));
|
|
810
|
+
}
|
|
811
|
+
n(Me, "lighten");
|
|
812
|
+
var Pe = m(Me), ee = Pe;
|
|
813
|
+
function Ee(r, e, t) {
|
|
814
|
+
if (e === "transparent") return t;
|
|
815
|
+
if (t === "transparent") return e;
|
|
816
|
+
if (r === 0) return t;
|
|
817
|
+
var a = F(e), i = l({}, a, {
|
|
818
|
+
alpha: typeof a.alpha == "number" ? a.alpha : 1
|
|
819
|
+
}), o = F(t), u = l({}, o, {
|
|
820
|
+
alpha: typeof o.alpha == "number" ? o.alpha : 1
|
|
821
|
+
}), f = i.alpha - u.alpha, p = parseFloat(r) * 2 - 1, g = p * f === -1 ? p : p + f, b = 1 + p * f, h = (g / b + 1) / 2, c = 1 - h, A = {
|
|
822
|
+
red: Math.floor(i.red * h + u.red * c),
|
|
823
|
+
green: Math.floor(i.green * h + u.green * c),
|
|
824
|
+
blue: Math.floor(i.blue * h + u.blue * c),
|
|
825
|
+
alpha: i.alpha * parseFloat(r) + u.alpha * (1 - parseFloat(r))
|
|
826
|
+
};
|
|
827
|
+
return S(A);
|
|
828
|
+
}
|
|
829
|
+
n(Ee, "mix");
|
|
830
|
+
var He = m(Ee), re = He;
|
|
831
|
+
function Le(r, e) {
|
|
832
|
+
if (e === "transparent") return e;
|
|
833
|
+
var t = F(e), a = typeof t.alpha == "number" ? t.alpha : 1, i = l({}, t, {
|
|
834
|
+
alpha: C(0, 1, (a * 100 + parseFloat(r) * 100) / 100)
|
|
835
|
+
});
|
|
836
|
+
return S(i);
|
|
837
|
+
}
|
|
838
|
+
n(Le, "opacify");
|
|
839
|
+
var Lr = m(Le);
|
|
840
|
+
function De(r, e) {
|
|
841
|
+
if (e === "transparent") return e;
|
|
842
|
+
var t = y(e);
|
|
843
|
+
return w(l({}, t, {
|
|
844
|
+
saturation: C(0, 1, t.saturation + parseFloat(r))
|
|
845
|
+
}));
|
|
846
|
+
}
|
|
847
|
+
n(De, "saturate");
|
|
848
|
+
var Dr = m(De);
|
|
849
|
+
function We(r, e) {
|
|
850
|
+
return e === "transparent" ? e : w(l({}, y(e), {
|
|
851
|
+
hue: parseFloat(r)
|
|
852
|
+
}));
|
|
853
|
+
}
|
|
854
|
+
n(We, "setHue");
|
|
855
|
+
var Wr = m(We);
|
|
856
|
+
function qe(r, e) {
|
|
857
|
+
return e === "transparent" ? e : w(l({}, y(e), {
|
|
858
|
+
lightness: parseFloat(r)
|
|
859
|
+
}));
|
|
860
|
+
}
|
|
861
|
+
n(qe, "setLightness");
|
|
862
|
+
var qr = m(qe);
|
|
863
|
+
function Ue(r, e) {
|
|
864
|
+
return e === "transparent" ? e : w(l({}, y(e), {
|
|
865
|
+
saturation: parseFloat(r)
|
|
866
|
+
}));
|
|
867
|
+
}
|
|
868
|
+
n(Ue, "setSaturation");
|
|
869
|
+
var Ur = m(Ue);
|
|
870
|
+
function Ve(r, e) {
|
|
871
|
+
return e === "transparent" ? e : re(parseFloat(r), "rgb(0, 0, 0)", e);
|
|
872
|
+
}
|
|
873
|
+
n(Ve, "shade");
|
|
874
|
+
var Vr = m(Ve);
|
|
875
|
+
function Ne(r, e) {
|
|
876
|
+
return e === "transparent" ? e : re(parseFloat(r), "rgb(255, 255, 255)", e);
|
|
877
|
+
}
|
|
878
|
+
n(Ne, "tint");
|
|
879
|
+
var Nr = m(Ne);
|
|
880
|
+
function Ge(r, e) {
|
|
763
881
|
if (e === "transparent") return e;
|
|
764
|
-
var t =
|
|
765
|
-
alpha:
|
|
882
|
+
var t = F(e), a = typeof t.alpha == "number" ? t.alpha : 1, i = l({}, t, {
|
|
883
|
+
alpha: C(0, 1, +(a * 100 - parseFloat(r) * 100).toFixed(2) / 100)
|
|
766
884
|
});
|
|
767
|
-
return
|
|
885
|
+
return S(i);
|
|
768
886
|
}
|
|
769
|
-
n(
|
|
770
|
-
var
|
|
887
|
+
n(Ge, "transparentize");
|
|
888
|
+
var Qe = m(Ge), te = Qe;
|
|
771
889
|
|
|
772
890
|
// src/theming/base.ts
|
|
773
|
-
var
|
|
891
|
+
var s = {
|
|
774
892
|
// Official color palette
|
|
775
893
|
primary: "#FF4785",
|
|
776
894
|
// coral
|
|
@@ -808,20 +926,20 @@ var u = {
|
|
|
808
926
|
positiveText: "#448028",
|
|
809
927
|
negativeText: "#D43900",
|
|
810
928
|
warningText: "#A15C20"
|
|
811
|
-
},
|
|
929
|
+
}, H = {
|
|
812
930
|
app: "#F6F9FC",
|
|
813
|
-
bar:
|
|
814
|
-
content:
|
|
815
|
-
preview:
|
|
931
|
+
bar: s.lightest,
|
|
932
|
+
content: s.lightest,
|
|
933
|
+
preview: s.lightest,
|
|
816
934
|
gridCellSize: 10,
|
|
817
|
-
hoverable:
|
|
935
|
+
hoverable: te(0.9, s.secondary),
|
|
818
936
|
// hover state for items in a list
|
|
819
937
|
// Notification, error, and warning backgrounds
|
|
820
938
|
positive: "#E1FFD4",
|
|
821
939
|
negative: "#FEDED2",
|
|
822
940
|
warning: "#FFF5CF",
|
|
823
941
|
critical: "#FF4400"
|
|
824
|
-
},
|
|
942
|
+
}, z = {
|
|
825
943
|
fonts: {
|
|
826
944
|
base: [
|
|
827
945
|
'"Nunito Sans"',
|
|
@@ -867,7 +985,7 @@ var u = {
|
|
|
867
985
|
};
|
|
868
986
|
|
|
869
987
|
// src/theming/themes/dark.ts
|
|
870
|
-
var
|
|
988
|
+
var Ye = {
|
|
871
989
|
base: "dark",
|
|
872
990
|
// Storybook-specific color palette
|
|
873
991
|
colorPrimary: "#FF4785",
|
|
@@ -877,20 +995,20 @@ var Oe = {
|
|
|
877
995
|
// UI
|
|
878
996
|
appBg: "#222425",
|
|
879
997
|
appContentBg: "#1B1C1D",
|
|
880
|
-
appPreviewBg:
|
|
998
|
+
appPreviewBg: s.lightest,
|
|
881
999
|
appBorderColor: "rgba(255,255,255,.1)",
|
|
882
1000
|
appBorderRadius: 4,
|
|
883
1001
|
// Fonts
|
|
884
|
-
fontBase:
|
|
885
|
-
fontCode:
|
|
1002
|
+
fontBase: z.fonts.base,
|
|
1003
|
+
fontCode: z.fonts.mono,
|
|
886
1004
|
// Text colors
|
|
887
1005
|
textColor: "#C9CDCF",
|
|
888
1006
|
textInverseColor: "#222425",
|
|
889
1007
|
textMutedColor: "#798186",
|
|
890
1008
|
// Toolbar default and active colors
|
|
891
|
-
barTextColor:
|
|
892
|
-
barHoverColor:
|
|
893
|
-
barSelectedColor:
|
|
1009
|
+
barTextColor: s.mediumdark,
|
|
1010
|
+
barHoverColor: s.secondary,
|
|
1011
|
+
barSelectedColor: s.secondary,
|
|
894
1012
|
barBg: "#292C2E",
|
|
895
1013
|
// Form colors
|
|
896
1014
|
buttonBg: "#222425",
|
|
@@ -899,12 +1017,12 @@ var Oe = {
|
|
|
899
1017
|
booleanSelectedBg: "#2E3438",
|
|
900
1018
|
inputBg: "#1B1C1D",
|
|
901
1019
|
inputBorder: "rgba(255,255,255,.1)",
|
|
902
|
-
inputTextColor:
|
|
1020
|
+
inputTextColor: s.lightest,
|
|
903
1021
|
inputBorderRadius: 4
|
|
904
|
-
},
|
|
1022
|
+
}, ne = Ye;
|
|
905
1023
|
|
|
906
1024
|
// src/theming/themes/light.ts
|
|
907
|
-
var
|
|
1025
|
+
var Je = {
|
|
908
1026
|
base: "light",
|
|
909
1027
|
// Storybook-specific color palette
|
|
910
1028
|
colorPrimary: "#FF4785",
|
|
@@ -912,63 +1030,63 @@ var ke = {
|
|
|
912
1030
|
colorSecondary: "#029CFD",
|
|
913
1031
|
// ocean
|
|
914
1032
|
// UI
|
|
915
|
-
appBg:
|
|
916
|
-
appContentBg:
|
|
917
|
-
appPreviewBg:
|
|
918
|
-
appBorderColor:
|
|
1033
|
+
appBg: H.app,
|
|
1034
|
+
appContentBg: s.lightest,
|
|
1035
|
+
appPreviewBg: s.lightest,
|
|
1036
|
+
appBorderColor: s.border,
|
|
919
1037
|
appBorderRadius: 4,
|
|
920
1038
|
// Fonts
|
|
921
|
-
fontBase:
|
|
922
|
-
fontCode:
|
|
1039
|
+
fontBase: z.fonts.base,
|
|
1040
|
+
fontCode: z.fonts.mono,
|
|
923
1041
|
// Text colors
|
|
924
|
-
textColor:
|
|
925
|
-
textInverseColor:
|
|
926
|
-
textMutedColor:
|
|
1042
|
+
textColor: s.darkest,
|
|
1043
|
+
textInverseColor: s.lightest,
|
|
1044
|
+
textMutedColor: s.dark,
|
|
927
1045
|
// Toolbar default and active colors
|
|
928
|
-
barTextColor:
|
|
929
|
-
barHoverColor:
|
|
930
|
-
barSelectedColor:
|
|
931
|
-
barBg:
|
|
1046
|
+
barTextColor: s.mediumdark,
|
|
1047
|
+
barHoverColor: s.secondary,
|
|
1048
|
+
barSelectedColor: s.secondary,
|
|
1049
|
+
barBg: s.lightest,
|
|
932
1050
|
// Form colors
|
|
933
|
-
buttonBg:
|
|
934
|
-
buttonBorder:
|
|
935
|
-
booleanBg:
|
|
936
|
-
booleanSelectedBg:
|
|
937
|
-
inputBg:
|
|
938
|
-
inputBorder:
|
|
939
|
-
inputTextColor:
|
|
1051
|
+
buttonBg: H.app,
|
|
1052
|
+
buttonBorder: s.medium,
|
|
1053
|
+
booleanBg: s.mediumlight,
|
|
1054
|
+
booleanSelectedBg: s.lightest,
|
|
1055
|
+
inputBg: s.lightest,
|
|
1056
|
+
inputBorder: s.border,
|
|
1057
|
+
inputTextColor: s.darkest,
|
|
940
1058
|
inputBorderRadius: 4
|
|
941
|
-
},
|
|
1059
|
+
}, L = Je;
|
|
942
1060
|
|
|
943
1061
|
// src/theming/utils.ts
|
|
944
|
-
import { logger as
|
|
945
|
-
import { global as
|
|
946
|
-
var { window:
|
|
947
|
-
var
|
|
1062
|
+
import { logger as Ze } from "storybook/internal/client-logger";
|
|
1063
|
+
import { global as Xe } from "@storybook/global";
|
|
1064
|
+
var { window: D } = Xe;
|
|
1065
|
+
var Ke = /* @__PURE__ */ n((r) => typeof r != "string" ? (Ze.warn(
|
|
948
1066
|
`Color passed to theme object should be a string. Instead ${r}(${typeof r}) was passed.`
|
|
949
|
-
), !1) : !0, "isColorString"),
|
|
950
|
-
(r, e) => r === "darken" ?
|
|
951
|
-
if (!
|
|
1067
|
+
), !1) : !0, "isColorString"), _e = /* @__PURE__ */ n((r) => !/(gradient|var|calc)/.test(r), "isValidColorForPolished"), er = /* @__PURE__ */ n(
|
|
1068
|
+
(r, e) => r === "darken" ? S(`${_(1, e)}`, 0.95) : r === "lighten" ? S(`${ee(1, e)}`, 0.95) : e, "applyPolished"), ae = /* @__PURE__ */ n((r) => (e) => {
|
|
1069
|
+
if (!Ke(e) || !_e(e))
|
|
952
1070
|
return e;
|
|
953
1071
|
try {
|
|
954
|
-
return
|
|
1072
|
+
return er(r, e);
|
|
955
1073
|
} catch {
|
|
956
1074
|
return e;
|
|
957
1075
|
}
|
|
958
|
-
}, "colorFactory"),
|
|
1076
|
+
}, "colorFactory"), nt = ae("lighten"), at = ae("darken"), ie = /* @__PURE__ */ n(() => !D || !D.matchMedia ? "light" : D.matchMedia("(prefe\
|
|
959
1077
|
rs-color-scheme: dark)").matches ? "dark" : "light", "getPreferredColorScheme");
|
|
960
1078
|
|
|
961
1079
|
// src/theming/create.ts
|
|
962
|
-
var
|
|
963
|
-
light:
|
|
964
|
-
dark:
|
|
965
|
-
normal:
|
|
966
|
-
},
|
|
1080
|
+
var W = {
|
|
1081
|
+
light: L,
|
|
1082
|
+
dark: ne,
|
|
1083
|
+
normal: L
|
|
1084
|
+
}, q = ie(), pt = /* @__PURE__ */ n((r = { base: q }, e) => {
|
|
967
1085
|
let t = {
|
|
968
|
-
...
|
|
969
|
-
...
|
|
1086
|
+
...W[q],
|
|
1087
|
+
...W[r.base] || {},
|
|
970
1088
|
...r,
|
|
971
|
-
base:
|
|
1089
|
+
base: W[r.base] ? r.base : q
|
|
972
1090
|
};
|
|
973
1091
|
return {
|
|
974
1092
|
...e,
|
|
@@ -977,6 +1095,6 @@ var L = {
|
|
|
977
1095
|
};
|
|
978
1096
|
}, "create");
|
|
979
1097
|
export {
|
|
980
|
-
|
|
981
|
-
|
|
1098
|
+
pt as create,
|
|
1099
|
+
W as themes
|
|
982
1100
|
};
|