@jasonshimmy/custom-elements-runtime 2.2.0 → 2.2.2
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/custom-elements-runtime.cjs.js +9 -4
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +1026 -951
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.transitions.cjs.js +1 -1
- package/dist/custom-elements-runtime.transitions.es.js +3 -3
- package/dist/prose.css +1 -0
- package/dist/style.css +1 -1
- package/dist/transitions-Bv8lUAOe.cjs +237 -0
- package/dist/transitions-Bv8lUAOe.cjs.map +1 -0
- package/dist/{transitions-CbxTVf1F.js → transitions-m6FraTTL.js} +557 -377
- package/dist/transitions-m6FraTTL.js.map +1 -0
- package/dist/variables.css +1 -1
- package/package.json +3 -2
- package/dist/transitions-BO7bCYYx.cjs +0 -119
- package/dist/transitions-BO7bCYYx.cjs.map +0 -1
- package/dist/transitions-CbxTVf1F.js.map +0 -1
|
@@ -1,21 +1,145 @@
|
|
|
1
|
-
import { anchorBlock as
|
|
2
|
-
|
|
1
|
+
import { anchorBlock as ye } from "./custom-elements-runtime.directives.es.js";
|
|
2
|
+
const $e = `/*
|
|
3
|
+
* Custom Elements Variables CSS
|
|
4
|
+
* CSS variables for colors and fonts
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:root,
|
|
8
|
+
:host {
|
|
9
|
+
/* Font families (match runtime defaults in src/lib/runtime/style.ts) */
|
|
10
|
+
--cer-font-sans:
|
|
11
|
+
ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
|
|
12
|
+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
|
|
13
|
+
--cer-font-serif: ui-serif, Georgia, 'Times New Roman', Times, serif;
|
|
14
|
+
--cer-font-mono:
|
|
15
|
+
ui-monospace, 'SFMono-Regular', Menlo, Monaco, 'Roboto Mono', 'Courier New',
|
|
16
|
+
monospace;
|
|
17
|
+
|
|
18
|
+
/* Default outline style */
|
|
19
|
+
--cer-outline-style: solid;
|
|
20
|
+
|
|
21
|
+
/* Colors */
|
|
22
|
+
--cer-color-transparent: transparent;
|
|
23
|
+
--cer-color-current: currentColor;
|
|
24
|
+
--cer-color-black: #000000;
|
|
25
|
+
--cer-color-white: #ffffff;
|
|
26
|
+
--cer-color-inherit: inherit;
|
|
27
|
+
|
|
28
|
+
/* neutral */
|
|
29
|
+
--cer-color-neutral-50: #fafafa;
|
|
30
|
+
--cer-color-neutral-100: #f4f4f5;
|
|
31
|
+
--cer-color-neutral-200: #e4e4e7;
|
|
32
|
+
--cer-color-neutral-300: #d4d4d8;
|
|
33
|
+
--cer-color-neutral-400: #9f9fa9;
|
|
34
|
+
--cer-color-neutral-500: #71717b;
|
|
35
|
+
--cer-color-neutral-600: #52525c;
|
|
36
|
+
--cer-color-neutral-700: #3f3f46;
|
|
37
|
+
--cer-color-neutral-800: #27272a;
|
|
38
|
+
--cer-color-neutral-900: #18181b;
|
|
39
|
+
--cer-color-neutral-950: #09090b;
|
|
40
|
+
|
|
41
|
+
/* primary */
|
|
42
|
+
--cer-color-primary-50: #eff6ff;
|
|
43
|
+
--cer-color-primary-100: #dbeafe;
|
|
44
|
+
--cer-color-primary-200: #bfdbfe;
|
|
45
|
+
--cer-color-primary-300: #93c5fd;
|
|
46
|
+
--cer-color-primary-400: #60a5fa;
|
|
47
|
+
--cer-color-primary-500: #3b82f6;
|
|
48
|
+
--cer-color-primary-600: #2563eb;
|
|
49
|
+
--cer-color-primary-700: #1d4ed8;
|
|
50
|
+
--cer-color-primary-800: #1e40af;
|
|
51
|
+
--cer-color-primary-900: #1e3a8a;
|
|
52
|
+
--cer-color-primary-950: #172554;
|
|
53
|
+
|
|
54
|
+
/* secondary */
|
|
55
|
+
--cer-color-secondary-50: #eef2ff;
|
|
56
|
+
--cer-color-secondary-100: #e0e7ff;
|
|
57
|
+
--cer-color-secondary-200: #c7d2fe;
|
|
58
|
+
--cer-color-secondary-300: #a5b4fc;
|
|
59
|
+
--cer-color-secondary-400: #818cf8;
|
|
60
|
+
--cer-color-secondary-500: #6366f1;
|
|
61
|
+
--cer-color-secondary-600: #4f46e5;
|
|
62
|
+
--cer-color-secondary-700: #4338ca;
|
|
63
|
+
--cer-color-secondary-800: #3730a3;
|
|
64
|
+
--cer-color-secondary-900: #312e81;
|
|
65
|
+
--cer-color-secondary-950: #1e1b4b;
|
|
66
|
+
|
|
67
|
+
/* success */
|
|
68
|
+
--cer-color-success-50: #f0fdf4;
|
|
69
|
+
--cer-color-success-100: #dcfce7;
|
|
70
|
+
--cer-color-success-200: #bbf7d0;
|
|
71
|
+
--cer-color-success-300: #86efac;
|
|
72
|
+
--cer-color-success-400: #4ade80;
|
|
73
|
+
--cer-color-success-500: #22c55e;
|
|
74
|
+
--cer-color-success-600: #16a34a;
|
|
75
|
+
--cer-color-success-700: #15803d;
|
|
76
|
+
--cer-color-success-800: #166534;
|
|
77
|
+
--cer-color-success-900: #14532d;
|
|
78
|
+
--cer-color-success-950: #052e16;
|
|
79
|
+
|
|
80
|
+
/* info */
|
|
81
|
+
--cer-color-info-50: #f0f9ff;
|
|
82
|
+
--cer-color-info-100: #e0f2fe;
|
|
83
|
+
--cer-color-info-200: #bae6fd;
|
|
84
|
+
--cer-color-info-300: #7dd3fc;
|
|
85
|
+
--cer-color-info-400: #38bdf8;
|
|
86
|
+
--cer-color-info-500: #0ea5e9;
|
|
87
|
+
--cer-color-info-600: #0284c7;
|
|
88
|
+
--cer-color-info-700: #0369a1;
|
|
89
|
+
--cer-color-info-800: #075985;
|
|
90
|
+
--cer-color-info-900: #0c4a6e;
|
|
91
|
+
--cer-color-info-950: #082f49;
|
|
92
|
+
|
|
93
|
+
/* warning */
|
|
94
|
+
--cer-color-warning-50: #fffbeb;
|
|
95
|
+
--cer-color-warning-100: #fef3c7;
|
|
96
|
+
--cer-color-warning-200: #fde68a;
|
|
97
|
+
--cer-color-warning-300: #fcd34d;
|
|
98
|
+
--cer-color-warning-400: #fbbf24;
|
|
99
|
+
--cer-color-warning-500: #f59e0b;
|
|
100
|
+
--cer-color-warning-600: #d97706;
|
|
101
|
+
--cer-color-warning-700: #b45309;
|
|
102
|
+
--cer-color-warning-800: #92400e;
|
|
103
|
+
--cer-color-warning-900: #78350f;
|
|
104
|
+
--cer-color-warning-950: #451a03;
|
|
105
|
+
|
|
106
|
+
/* error */
|
|
107
|
+
--cer-color-error-50: #fef2f2;
|
|
108
|
+
--cer-color-error-100: #fee2e2;
|
|
109
|
+
--cer-color-error-200: #fecaca;
|
|
110
|
+
--cer-color-error-300: #fca5a5;
|
|
111
|
+
--cer-color-error-400: #f87171;
|
|
112
|
+
--cer-color-error-500: #ef4444;
|
|
113
|
+
--cer-color-error-600: #dc2626;
|
|
114
|
+
--cer-color-error-700: #b91c1c;
|
|
115
|
+
--cer-color-error-800: #991b1b;
|
|
116
|
+
--cer-color-error-900: #7f1d1d;
|
|
117
|
+
--cer-color-error-950: #450a0a;
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
function ke(e, ...r) {
|
|
3
121
|
let o = "";
|
|
4
|
-
for (let
|
|
5
|
-
o += e[
|
|
122
|
+
for (let n = 0; n < e.length; n++)
|
|
123
|
+
o += e[n], n < r.length && (o += r[n]);
|
|
6
124
|
return o;
|
|
7
125
|
}
|
|
8
|
-
function
|
|
126
|
+
function ge(e) {
|
|
9
127
|
return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
|
|
10
128
|
}
|
|
11
|
-
let
|
|
12
|
-
function
|
|
13
|
-
return
|
|
129
|
+
let K = null;
|
|
130
|
+
function Ie() {
|
|
131
|
+
return K || (typeof CSSStyleSheet > "u" ? K = {
|
|
132
|
+
cssRules: [],
|
|
133
|
+
replaceSync: () => {
|
|
134
|
+
},
|
|
135
|
+
toString: () => ge(pe)
|
|
136
|
+
} : (K = new CSSStyleSheet(), K.replaceSync(ge(pe)))), K;
|
|
14
137
|
}
|
|
15
138
|
function De(e) {
|
|
16
139
|
return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
|
|
17
140
|
}
|
|
18
|
-
const
|
|
141
|
+
const pe = ke`
|
|
142
|
+
${$e}
|
|
19
143
|
:host,
|
|
20
144
|
*,
|
|
21
145
|
::before,
|
|
@@ -132,7 +256,7 @@ const we = xe`
|
|
|
132
256
|
[hidden] {
|
|
133
257
|
display: none;
|
|
134
258
|
}
|
|
135
|
-
`,
|
|
259
|
+
`, je = {
|
|
136
260
|
// Existing semantic colors
|
|
137
261
|
neutral: {
|
|
138
262
|
50: "#fafafa",
|
|
@@ -230,17 +354,17 @@ const we = xe`
|
|
|
230
354
|
black: { DEFAULT: "#000000" },
|
|
231
355
|
transparent: { DEFAULT: "transparent" },
|
|
232
356
|
current: { DEFAULT: "currentColor" }
|
|
233
|
-
},
|
|
234
|
-
Object.entries(
|
|
357
|
+
}, xe = Object.fromEntries(
|
|
358
|
+
Object.entries(je).map(([e, r]) => [
|
|
235
359
|
e,
|
|
236
360
|
Object.fromEntries(
|
|
237
|
-
Object.entries(r).map(([o,
|
|
361
|
+
Object.entries(r).map(([o, n]) => [
|
|
238
362
|
o,
|
|
239
|
-
`var(--cer-color-${e}${o === "DEFAULT" ? "" : `-${o}`}, ${
|
|
363
|
+
`var(--cer-color-${e}${o === "DEFAULT" ? "" : `-${o}`}, ${n})`
|
|
240
364
|
])
|
|
241
365
|
)
|
|
242
366
|
])
|
|
243
|
-
),
|
|
367
|
+
), I = "0.25rem", Se = {
|
|
244
368
|
"3xs": 64,
|
|
245
369
|
"2xs": 72,
|
|
246
370
|
xs: 80,
|
|
@@ -285,7 +409,7 @@ const we = xe`
|
|
|
285
409
|
gap: ["gap"],
|
|
286
410
|
"gap-x": ["column-gap"],
|
|
287
411
|
"gap-y": ["row-gap"]
|
|
288
|
-
},
|
|
412
|
+
}, Te = () => {
|
|
289
413
|
const e = {};
|
|
290
414
|
e["@container"] = "container-type:inline-size;", [
|
|
291
415
|
"block",
|
|
@@ -409,8 +533,8 @@ const we = xe`
|
|
|
409
533
|
["text-7xl", "4.5rem", "1"],
|
|
410
534
|
["text-8xl", "6rem", "1"],
|
|
411
535
|
["text-9xl", "8rem", "1"]
|
|
412
|
-
].forEach(([t, a,
|
|
413
|
-
e[t] = `font-size:${a};line-height:var(--cer-line-height,${
|
|
536
|
+
].forEach(([t, a, d]) => {
|
|
537
|
+
e[t] = `font-size:${a};line-height:var(--cer-line-height,${d});`;
|
|
414
538
|
}), [
|
|
415
539
|
["tracking-tighter", "-0.05em"],
|
|
416
540
|
["tracking-tight", "-0.025em"],
|
|
@@ -438,8 +562,8 @@ const we = xe`
|
|
|
438
562
|
].forEach(([t, a]) => {
|
|
439
563
|
e[t] = `line-height:${a};--cer-line-height:${a};line-height:var(--cer-line-height,${a});`;
|
|
440
564
|
});
|
|
441
|
-
const
|
|
442
|
-
for (const t of
|
|
565
|
+
const s = [0, 1, 2, 4, 6, 8];
|
|
566
|
+
for (const t of s) {
|
|
443
567
|
const a = `${t}px`;
|
|
444
568
|
e[`outline-${t}`] = `outline-style:var(--cer-outline-style);outline-width:${a};`, e[`outline-offset-${t}`] = `outline-offset:${a};`, e[`border-${t}`] = `border-width:${a};`, e[`border-t-${t}`] = `border-top-width:${a};`, e[`border-r-${t}`] = `border-right-width:${a};`, e[`border-b-${t}`] = `border-bottom-width:${a};`, e[`border-l-${t}`] = `border-left-width:${a};`, e[`border-x-${t}`] = `border-left-width:${a};border-right-width:${a};`, e[`border-y-${t}`] = `border-top-width:${a};border-bottom-width:${a};`;
|
|
445
569
|
}
|
|
@@ -480,8 +604,8 @@ const we = xe`
|
|
|
480
604
|
full: 9999
|
|
481
605
|
};
|
|
482
606
|
for (const [t, a] of Object.entries(u)) {
|
|
483
|
-
const
|
|
484
|
-
e[`rounded-${t}`] = `border-radius:${
|
|
607
|
+
const d = a === 9999 ? "9999px" : `${a / 16}rem`;
|
|
608
|
+
e[`rounded-${t}`] = `border-radius:${d};`, e[`rounded-t-${t}`] = `border-top-left-radius:${d};border-top-right-radius:${d};`, e[`rounded-r-${t}`] = `border-top-right-radius:${d};border-bottom-right-radius:${d};`, e[`rounded-b-${t}`] = `border-bottom-left-radius:${d};border-bottom-right-radius:${d};`, e[`rounded-l-${t}`] = `border-top-left-radius:${d};border-bottom-left-radius:${d};`, e[`rounded-tl-${t}`] = `border-top-left-radius:${d};`, e[`rounded-tr-${t}`] = `border-top-right-radius:${d};`, e[`rounded-br-${t}`] = `border-bottom-right-radius:${d};`, e[`rounded-bl-${t}`] = `border-bottom-left-radius:${d};`;
|
|
485
609
|
}
|
|
486
610
|
Object.assign(e, {
|
|
487
611
|
"shadow-none": "--cer-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--cer-shadow-color, #0000);",
|
|
@@ -509,7 +633,7 @@ const we = xe`
|
|
|
509
633
|
"overflow-y-visible": "overflow-y:visible;",
|
|
510
634
|
"overflow-y-scroll": "overflow-y:scroll;"
|
|
511
635
|
});
|
|
512
|
-
const
|
|
636
|
+
const m = [
|
|
513
637
|
"auto",
|
|
514
638
|
"default",
|
|
515
639
|
"pointer",
|
|
@@ -521,7 +645,7 @@ const we = xe`
|
|
|
521
645
|
"grab",
|
|
522
646
|
"grabbing"
|
|
523
647
|
];
|
|
524
|
-
for (const t of
|
|
648
|
+
for (const t of m) e[`cursor-${t}`] = `cursor:${t};`;
|
|
525
649
|
for (const t of [0, 10, 20, 30, 40, 50]) e[`z-${t}`] = `z-index:${t};`;
|
|
526
650
|
Object.assign(e, {
|
|
527
651
|
"sr-only": "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;",
|
|
@@ -557,8 +681,8 @@ const we = xe`
|
|
|
557
681
|
"mx-auto": "margin-inline:auto;",
|
|
558
682
|
"my-auto": "margin-block:auto;"
|
|
559
683
|
});
|
|
560
|
-
for (const [t, a] of Object.entries(
|
|
561
|
-
e[`max-w-${t}`] = `max-width:calc(${
|
|
684
|
+
for (const [t, a] of Object.entries(Se))
|
|
685
|
+
e[`max-w-${t}`] = `max-width:calc(${I} * ${a});`, e[`min-w-${t}`] = `min-width:calc(${I} * ${a});`, e[`w-${t}`] = `width:calc(${I} * ${a});`, e[`max-h-${t}`] = `max-height:calc(${I} * ${a});`, e[`min-h-${t}`] = `min-height:calc(${I} * ${a});`, e[`h-${t}`] = `height:calc(${I} * ${a});`;
|
|
562
686
|
Object.assign(e, {
|
|
563
687
|
transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
|
|
564
688
|
"transition-none": "transition-property:none;",
|
|
@@ -675,33 +799,33 @@ const we = xe`
|
|
|
675
799
|
"bg-conic-at-l": "background-image:conic-gradient(from 0deg at left, var(--cer-gradient-stops));",
|
|
676
800
|
"bg-conic-at-tl": "background-image:conic-gradient(from 0deg at top left, var(--cer-gradient-stops));"
|
|
677
801
|
}), e;
|
|
678
|
-
}, re =
|
|
679
|
-
function
|
|
802
|
+
}, re = Te();
|
|
803
|
+
function M(e, r) {
|
|
680
804
|
let o = 0;
|
|
681
|
-
for (let
|
|
682
|
-
const
|
|
683
|
-
if (
|
|
684
|
-
else if ((
|
|
685
|
-
else if (o === 0 && (
|
|
686
|
-
return e.slice(0,
|
|
805
|
+
for (let n = 0; n < e.length; n++) {
|
|
806
|
+
const c = e[n];
|
|
807
|
+
if (c === "[" || c === "(") o++;
|
|
808
|
+
else if ((c === "]" || c === ")") && o > 0) o--;
|
|
809
|
+
else if (o === 0 && (c === ">" || c === "+" || c === "~" || c === " "))
|
|
810
|
+
return e.slice(0, n) + r + e.slice(n);
|
|
687
811
|
}
|
|
688
812
|
return e + r;
|
|
689
813
|
}
|
|
690
|
-
const
|
|
814
|
+
const Ce = {
|
|
691
815
|
before: (e, r) => `${e}::before{${r}}`,
|
|
692
816
|
after: (e, r) => `${e}::after{${r}}`,
|
|
693
|
-
hover: (e, r) => `${
|
|
694
|
-
focus: (e, r) => `${
|
|
695
|
-
active: (e, r) => `${
|
|
696
|
-
disabled: (e, r) => `${
|
|
697
|
-
visited: (e, r) => `${
|
|
698
|
-
checked: (e, r) => `${
|
|
699
|
-
first: (e, r) => `${
|
|
700
|
-
last: (e, r) => `${
|
|
701
|
-
odd: (e, r) => `${
|
|
702
|
-
even: (e, r) => `${
|
|
703
|
-
"focus-within": (e, r) => `${
|
|
704
|
-
"focus-visible": (e, r) => `${
|
|
817
|
+
hover: (e, r) => `${M(e, ":hover")}{${r}}`,
|
|
818
|
+
focus: (e, r) => `${M(e, ":focus")}{${r}}`,
|
|
819
|
+
active: (e, r) => `${M(e, ":active")}{${r}}`,
|
|
820
|
+
disabled: (e, r) => `${M(e, ":disabled")}{${r}}`,
|
|
821
|
+
visited: (e, r) => `${M(e, ":visited")}{${r}}`,
|
|
822
|
+
checked: (e, r) => `${M(e, ":checked")}{${r}}`,
|
|
823
|
+
first: (e, r) => `${M(e, ":first-child")}{${r}}`,
|
|
824
|
+
last: (e, r) => `${M(e, ":last-child")}{${r}}`,
|
|
825
|
+
odd: (e, r) => `${M(e, ":nth-child(odd)")}{${r}}`,
|
|
826
|
+
even: (e, r) => `${M(e, ":nth-child(even)")}{${r}}`,
|
|
827
|
+
"focus-within": (e, r) => `${M(e, ":focus-within")}{${r}}`,
|
|
828
|
+
"focus-visible": (e, r) => `${M(e, ":focus-visible")}{${r}}`,
|
|
705
829
|
"group-hover": (e, r) => `.group:hover ${e}{${r}}`,
|
|
706
830
|
"group-focus": (e, r) => `.group:focus ${e}{${r}}`,
|
|
707
831
|
"group-active": (e, r) => `.group:active ${e}{${r}}`,
|
|
@@ -717,7 +841,7 @@ const je = {
|
|
|
717
841
|
xl: "(min-width:1280px)",
|
|
718
842
|
"2xl": "(min-width:1536px)",
|
|
719
843
|
dark: "(prefers-color-scheme: dark)"
|
|
720
|
-
},
|
|
844
|
+
}, me = {
|
|
721
845
|
xs: "(min-width:20rem)",
|
|
722
846
|
sm: "(min-width:24rem)",
|
|
723
847
|
md: "(min-width:28rem)",
|
|
@@ -729,7 +853,7 @@ const je = {
|
|
|
729
853
|
"5xl": "(min-width:64rem)",
|
|
730
854
|
"6xl": "(min-width:72rem)",
|
|
731
855
|
"7xl": "(min-width:80rem)"
|
|
732
|
-
},
|
|
856
|
+
}, ne = ["sm", "md", "lg", "xl", "2xl"], ie = [
|
|
733
857
|
"xs",
|
|
734
858
|
"sm",
|
|
735
859
|
"md",
|
|
@@ -743,45 +867,47 @@ const je = {
|
|
|
743
867
|
"7xl"
|
|
744
868
|
];
|
|
745
869
|
function ae(e) {
|
|
746
|
-
const r = e.startsWith("-"), o = r ? e.slice(1) : e,
|
|
747
|
-
if (
|
|
748
|
-
const
|
|
749
|
-
if (!te[
|
|
750
|
-
if (
|
|
751
|
-
const [t, a] =
|
|
870
|
+
const r = e.startsWith("-"), o = r ? e.slice(1) : e, n = o.lastIndexOf("-");
|
|
871
|
+
if (n === -1) return null;
|
|
872
|
+
const c = o.slice(0, n), s = o.slice(n + 1);
|
|
873
|
+
if (!te[c]) return null;
|
|
874
|
+
if (s.includes("/")) {
|
|
875
|
+
const [t, a] = s.split("/").map(($) => parseFloat($));
|
|
752
876
|
if (Number.isNaN(t) || Number.isNaN(a) || a === 0)
|
|
753
877
|
return null;
|
|
754
|
-
const
|
|
755
|
-
return te[
|
|
878
|
+
const d = t / a * 100;
|
|
879
|
+
return te[c].map(($) => `${$}:${d}%;`).join("");
|
|
756
880
|
}
|
|
757
|
-
const u = parseFloat(
|
|
881
|
+
const u = parseFloat(s);
|
|
758
882
|
if (Number.isNaN(u)) return null;
|
|
759
|
-
const
|
|
760
|
-
return te[
|
|
883
|
+
const m = r ? "-" : "";
|
|
884
|
+
return te[c].map((t) => `${t}:calc(${m}${I} * ${u});`).join("");
|
|
761
885
|
}
|
|
762
|
-
function
|
|
763
|
-
const r = e.startsWith("-"),
|
|
764
|
-
if (!
|
|
765
|
-
const [,
|
|
766
|
-
if (
|
|
886
|
+
function ce(e) {
|
|
887
|
+
const r = e.startsWith("-"), n = (r ? e.slice(1) : e).match(/^space-(x|y)-(.+)$/);
|
|
888
|
+
if (!n) return null;
|
|
889
|
+
const [, c, s] = n, u = c === "x";
|
|
890
|
+
if (s === "reverse")
|
|
767
891
|
return u ? "--cer-space-x-reverse:1;" : "--cer-space-y-reverse:1;";
|
|
768
|
-
if (
|
|
769
|
-
const [
|
|
770
|
-
if (Number.isNaN(
|
|
892
|
+
if (s.includes("/")) {
|
|
893
|
+
const [d, $] = s.split("/").map((A) => parseFloat(A));
|
|
894
|
+
if (Number.isNaN(d) || Number.isNaN($) || $ === 0)
|
|
771
895
|
return null;
|
|
772
|
-
const
|
|
773
|
-
return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${
|
|
896
|
+
const v = d / $ * 100, C = r ? "-" : "";
|
|
897
|
+
return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${C}${v}% * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${C}${v}% * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${C}${v}% * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${C}${v}% * var(--cer-space-y-reverse));}`;
|
|
774
898
|
}
|
|
775
|
-
const
|
|
776
|
-
if (Number.isNaN(
|
|
777
|
-
const a = `calc(${r ? "-" : ""}${
|
|
899
|
+
const m = parseFloat(s);
|
|
900
|
+
if (Number.isNaN(m)) return null;
|
|
901
|
+
const a = `calc(${r ? "-" : ""}${I} * ${m})`;
|
|
778
902
|
return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${a} * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${a} * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${a} * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${a} * var(--cer-space-y-reverse));}`;
|
|
779
903
|
}
|
|
780
|
-
function
|
|
781
|
-
|
|
904
|
+
function J(e) {
|
|
905
|
+
let r = e.replace("#", "");
|
|
906
|
+
r.length === 3 && (r = r.split("").map((n) => n + n).join(""));
|
|
907
|
+
const o = parseInt(r, 16);
|
|
782
908
|
return `${o >> 16 & 255} ${o >> 8 & 255} ${o & 255}`;
|
|
783
909
|
}
|
|
784
|
-
const
|
|
910
|
+
const Ae = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Fe = {
|
|
785
911
|
bg: "background-color",
|
|
786
912
|
decoration: "text-decoration-color",
|
|
787
913
|
text: "color",
|
|
@@ -792,56 +918,89 @@ const Te = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
|
|
|
792
918
|
fill: "fill",
|
|
793
919
|
stroke: "stroke"
|
|
794
920
|
};
|
|
795
|
-
function
|
|
796
|
-
const r =
|
|
921
|
+
function Oe(e) {
|
|
922
|
+
const r = Ae.exec(e);
|
|
797
923
|
if (!r) return null;
|
|
798
|
-
const [, o,
|
|
799
|
-
if (!
|
|
800
|
-
if (o === "shadow") return `--cer-shadow-color:${
|
|
801
|
-
const u =
|
|
802
|
-
return u ? `${u}:${
|
|
924
|
+
const [, o, n, c = "DEFAULT"] = r, s = xe[n]?.[c];
|
|
925
|
+
if (!s) return null;
|
|
926
|
+
if (o === "shadow") return `--cer-shadow-color:${s};`;
|
|
927
|
+
const u = Fe[o];
|
|
928
|
+
return u ? `${u}:${s};` : null;
|
|
803
929
|
}
|
|
804
|
-
function
|
|
930
|
+
function Ee(e) {
|
|
805
931
|
const r = e.indexOf("/");
|
|
806
932
|
if (r === -1) return { base: e };
|
|
807
|
-
const o = e.slice(0, r),
|
|
808
|
-
return isNaN(
|
|
933
|
+
const o = e.slice(0, r), n = e.slice(r + 1), c = parseInt(n, 10);
|
|
934
|
+
return isNaN(c) || c < 0 || c > 100 ? { base: o } : { base: o, opacity: c / 100 };
|
|
809
935
|
}
|
|
810
|
-
function
|
|
811
|
-
const { base: r, opacity: o } =
|
|
812
|
-
if (
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
936
|
+
function se(e) {
|
|
937
|
+
const { base: r, opacity: o } = Ee(e), n = Oe(r);
|
|
938
|
+
if (n) {
|
|
939
|
+
if (o !== void 0) {
|
|
940
|
+
if (n.includes("var(")) {
|
|
941
|
+
const u = /var\([^)]*\)/.exec(n);
|
|
942
|
+
if (u) {
|
|
943
|
+
const m = u[0], t = o * 100, a = `color-mix(in srgb, ${m} ${t}%, rgba(0 0 0 / 0) ${100 - t}%)`, d = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(m), $ = /^([a-z-]+):/.exec(n), v = $ ? $[1] : "background-color";
|
|
944
|
+
if (d) {
|
|
945
|
+
const A = `rgb(${J(d[0])} / ${o})`, f = m.replace(
|
|
946
|
+
/#([0-9a-f]{6}|[0-9a-f]{3})/i,
|
|
947
|
+
A
|
|
948
|
+
);
|
|
949
|
+
return `${v}:${f};__CE_COLOR_MIX_SPLIT__${v}:${a};`;
|
|
950
|
+
}
|
|
951
|
+
return `${v}:${a};`;
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
const s = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(n);
|
|
955
|
+
if (s) {
|
|
956
|
+
const u = J(s[0]);
|
|
957
|
+
return n.replace(
|
|
958
|
+
/#([0-9a-f]{6}|[0-9a-f]{3})/i,
|
|
959
|
+
`rgb(${u} / ${o})`
|
|
960
|
+
);
|
|
961
|
+
}
|
|
817
962
|
}
|
|
963
|
+
return n;
|
|
818
964
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
965
|
+
const c = Z(r);
|
|
966
|
+
if (c && o !== void 0) {
|
|
967
|
+
if (c.includes("var(")) {
|
|
968
|
+
const u = /var\([^)]*\)/.exec(c);
|
|
969
|
+
if (u) {
|
|
970
|
+
const m = u[0], t = o * 100, a = `color-mix(in srgb, ${m} ${t}%, rgba(0 0 0 / 0) ${100 - t}%)`, d = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(m), $ = /^([a-z-]+):/.exec(c), v = $ ? $[1] : null;
|
|
971
|
+
if (d && v) {
|
|
972
|
+
const A = `rgb(${J(d[0])} / ${o})`, f = m.replace(
|
|
973
|
+
/#([0-9a-f]{6}|[0-9a-f]{3})/i,
|
|
974
|
+
A
|
|
975
|
+
);
|
|
976
|
+
return `${v}:${f};__CE_COLOR_MIX_SPLIT__${v}:${a};`;
|
|
977
|
+
}
|
|
978
|
+
return c.replace(m, a);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
const s = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(c);
|
|
982
|
+
if (s) {
|
|
983
|
+
const u = J(s[0]);
|
|
984
|
+
return c.replace(
|
|
985
|
+
/#([0-9a-f]{6}|[0-9a-f]{3})/i,
|
|
827
986
|
`rgb(${u} / ${o})`
|
|
828
987
|
);
|
|
829
988
|
}
|
|
830
989
|
}
|
|
831
|
-
return
|
|
990
|
+
return c;
|
|
832
991
|
}
|
|
833
|
-
function
|
|
992
|
+
function le(e) {
|
|
834
993
|
const r = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
|
|
835
994
|
if (!r) return null;
|
|
836
|
-
const [, o,
|
|
837
|
-
if (!
|
|
995
|
+
const [, o, n, c = "DEFAULT"] = r, s = xe[n]?.[c];
|
|
996
|
+
if (!s) return null;
|
|
838
997
|
switch (o) {
|
|
839
998
|
case "from":
|
|
840
|
-
return `--cer-gradient-from:${
|
|
999
|
+
return `--cer-gradient-from:${s} var(--cer-gradient-from-position);--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), var(--cer-gradient-to);`;
|
|
841
1000
|
case "to":
|
|
842
|
-
return `--cer-gradient-to:${
|
|
1001
|
+
return `--cer-gradient-to:${s} var(--cer-gradient-to-position);`;
|
|
843
1002
|
case "via":
|
|
844
|
-
return `--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${
|
|
1003
|
+
return `--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${s} var(--cer-gradient-via-position), var(--cer-gradient-to);`;
|
|
845
1004
|
default:
|
|
846
1005
|
return null;
|
|
847
1006
|
}
|
|
@@ -852,17 +1011,17 @@ function de(e) {
|
|
|
852
1011
|
const o = parseInt(r[1], 10);
|
|
853
1012
|
return o < 0 || o > 100 ? null : `opacity:${o / 100};`;
|
|
854
1013
|
}
|
|
855
|
-
function
|
|
1014
|
+
function Z(e) {
|
|
856
1015
|
if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
|
|
857
|
-
const u = e.slice(1, -1).trim(),
|
|
858
|
-
if (
|
|
859
|
-
const t = u.slice(0,
|
|
860
|
-
let a = u.slice(
|
|
1016
|
+
const u = e.slice(1, -1).trim(), m = u.indexOf(":");
|
|
1017
|
+
if (m === -1) return null;
|
|
1018
|
+
const t = u.slice(0, m).trim();
|
|
1019
|
+
let a = u.slice(m + 1).trim();
|
|
861
1020
|
return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(t) ? (a = a.replace(/_/g, " "), a = a.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), a = a.replace(/^'([^']*)'$/g, '"$1"'), `${t}:${a};`) : null;
|
|
862
1021
|
}
|
|
863
1022
|
const r = e.indexOf("-[");
|
|
864
1023
|
if (r <= 0 || !e.endsWith("]")) return null;
|
|
865
|
-
const o = e.slice(0, r),
|
|
1024
|
+
const o = e.slice(0, r), n = e.slice(r + 2, -1).replace(/_/g, " "), c = {
|
|
866
1025
|
bg: "background-color",
|
|
867
1026
|
shadow: "box-shadow",
|
|
868
1027
|
p: "padding",
|
|
@@ -903,15 +1062,15 @@ function Q(e) {
|
|
|
903
1062
|
opacity: "opacity"
|
|
904
1063
|
};
|
|
905
1064
|
if (o === "text")
|
|
906
|
-
return /^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(
|
|
907
|
-
if (o === "rotate") return `transform:rotate(${
|
|
908
|
-
if (o === "scale") return `transform:scale(${
|
|
909
|
-
if (o === "translate-x") return `transform:translateX(${
|
|
910
|
-
if (o === "translate-y") return `transform:translateY(${
|
|
911
|
-
const
|
|
912
|
-
return
|
|
1065
|
+
return /^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n) ? `font-size:${n};` : `color:${n};`;
|
|
1066
|
+
if (o === "rotate") return `transform:rotate(${n});`;
|
|
1067
|
+
if (o === "scale") return `transform:scale(${n});`;
|
|
1068
|
+
if (o === "translate-x") return `transform:translateX(${n});`;
|
|
1069
|
+
if (o === "translate-y") return `transform:translateY(${n});`;
|
|
1070
|
+
const s = c[o] ?? o.replace(/_/g, "-");
|
|
1071
|
+
return s && n ? `${s}:${n};` : null;
|
|
913
1072
|
}
|
|
914
|
-
function
|
|
1073
|
+
function _e(e) {
|
|
915
1074
|
if (e.startsWith("[") && e.endsWith("]")) {
|
|
916
1075
|
const o = e.slice(1, -1);
|
|
917
1076
|
return o.includes("&") ? o : e;
|
|
@@ -923,44 +1082,44 @@ function Ce(e) {
|
|
|
923
1082
|
}
|
|
924
1083
|
return null;
|
|
925
1084
|
}
|
|
926
|
-
function
|
|
1085
|
+
function be(e) {
|
|
927
1086
|
return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
|
|
928
1087
|
}
|
|
929
|
-
function
|
|
1088
|
+
function ze(e) {
|
|
930
1089
|
const r = /class\s*=\s*(['"])([\s\S]*?)\1/g, o = [];
|
|
931
|
-
let
|
|
932
|
-
for (;
|
|
933
|
-
const
|
|
934
|
-
|
|
1090
|
+
let n;
|
|
1091
|
+
for (; n = r.exec(e); ) {
|
|
1092
|
+
const c = n[2].split(/\s+/).filter(Boolean);
|
|
1093
|
+
c.length && o.push(...c);
|
|
935
1094
|
}
|
|
936
1095
|
return o;
|
|
937
1096
|
}
|
|
938
|
-
const
|
|
939
|
-
function
|
|
940
|
-
const r = Date.now(), o =
|
|
941
|
-
if (o && r - o.timestamp <
|
|
1097
|
+
const G = /* @__PURE__ */ new Map(), Re = 16, he = 1e3;
|
|
1098
|
+
function Le(e) {
|
|
1099
|
+
const r = Date.now(), o = G.get(e);
|
|
1100
|
+
if (o && r - o.timestamp < Re)
|
|
942
1101
|
return o.css;
|
|
943
|
-
const
|
|
944
|
-
if (!
|
|
945
|
-
const
|
|
946
|
-
const
|
|
947
|
-
if (
|
|
948
|
-
const
|
|
949
|
-
return u[
|
|
1102
|
+
const n = ze(e);
|
|
1103
|
+
if (!n.length) return "";
|
|
1104
|
+
const c = new Set(n), s = [[], [], [], []], u = {}, m = (f, p = !1) => {
|
|
1105
|
+
const g = p ? `dark|${f}` : f;
|
|
1106
|
+
if (g in u) return u[g];
|
|
1107
|
+
const b = $(f, p);
|
|
1108
|
+
return u[g] = b, b;
|
|
950
1109
|
}, t = (f) => {
|
|
951
|
-
const p = f.some((
|
|
952
|
-
(
|
|
953
|
-
),
|
|
954
|
-
return f.length ? !p && !
|
|
1110
|
+
const p = f.some((k) => ne.includes(k)), g = f.some(
|
|
1111
|
+
(k) => k.startsWith("@") && (ie.includes(k.slice(1)) || k.match(/^@\[.+\]$/))
|
|
1112
|
+
), b = f.includes("dark");
|
|
1113
|
+
return f.length ? !p && !b && !g ? 1 : b && (p || g) ? 3 : 2 : 0;
|
|
955
1114
|
}, a = (f) => {
|
|
956
1115
|
const p = [];
|
|
957
|
-
let
|
|
958
|
-
for (let
|
|
959
|
-
const
|
|
960
|
-
|
|
1116
|
+
let g = "", b = 0;
|
|
1117
|
+
for (let k = 0; k < f.length; k++) {
|
|
1118
|
+
const x = f[k];
|
|
1119
|
+
x === "[" || x === "(" ? b++ : (x === "]" || x === ")") && b--, x === ":" && b === 0 ? (p.push(g), g = "") : g += x;
|
|
961
1120
|
}
|
|
962
|
-
return
|
|
963
|
-
},
|
|
1121
|
+
return g && p.push(g), p;
|
|
1122
|
+
}, d = {
|
|
964
1123
|
hover: ":hover",
|
|
965
1124
|
focus: ":focus",
|
|
966
1125
|
active: ":active",
|
|
@@ -973,144 +1132,144 @@ function ze(e) {
|
|
|
973
1132
|
even: ":nth-child(even)",
|
|
974
1133
|
"focus-within": ":focus-within",
|
|
975
1134
|
"focus-visible": ":focus-visible"
|
|
976
|
-
},
|
|
977
|
-
const
|
|
978
|
-
let
|
|
979
|
-
for (const
|
|
980
|
-
let
|
|
981
|
-
if (
|
|
982
|
-
|
|
1135
|
+
}, $ = (f, p = !1) => {
|
|
1136
|
+
const g = a(f);
|
|
1137
|
+
let b = "", k = !1;
|
|
1138
|
+
for (const i of g) {
|
|
1139
|
+
let y = i;
|
|
1140
|
+
if (y.startsWith("!") && (k = !0, y = y.slice(1)), re[y] || ae(y) || ce(y) || de(y) || se(y) || le(y) || Z(y)) {
|
|
1141
|
+
b = i;
|
|
983
1142
|
break;
|
|
984
1143
|
}
|
|
985
1144
|
}
|
|
986
|
-
if (!
|
|
987
|
-
const
|
|
988
|
-
if (!
|
|
989
|
-
const
|
|
990
|
-
let h =
|
|
991
|
-
p && (h = h.filter((
|
|
992
|
-
const
|
|
993
|
-
let
|
|
994
|
-
const
|
|
995
|
-
for (const
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
`.peer:${
|
|
999
|
-
),
|
|
1000
|
-
h = h.filter((
|
|
1001
|
-
const
|
|
1002
|
-
let
|
|
1003
|
-
for (const
|
|
1004
|
-
if (
|
|
1145
|
+
if (!b) return null;
|
|
1146
|
+
const x = b.replace(/^!/, ""), O = re[x] ?? ae(x) ?? ce(x) ?? de(x) ?? se(x) ?? le(x) ?? Z(x);
|
|
1147
|
+
if (!O) return null;
|
|
1148
|
+
const T = g.indexOf(b);
|
|
1149
|
+
let h = T >= 0 ? g.slice(0, T) : [];
|
|
1150
|
+
p && (h = h.filter((i) => i !== "dark"));
|
|
1151
|
+
const R = `.${be(f)}`, _ = k ? O.replace(/;/g, " !important;") : O, w = "__SUBJECT__";
|
|
1152
|
+
let l = w;
|
|
1153
|
+
const P = [];
|
|
1154
|
+
for (const i of h)
|
|
1155
|
+
i.startsWith("group-") ? (l = `.group:${i.slice(6)} ${l}`, P.push(i)) : i.startsWith("peer-") && (l = l.replace(
|
|
1156
|
+
w,
|
|
1157
|
+
`.peer:${i.slice(5)}~${w}`
|
|
1158
|
+
), P.push(i));
|
|
1159
|
+
h = h.filter((i) => !P.includes(i));
|
|
1160
|
+
const W = [], V = [];
|
|
1161
|
+
let S = null;
|
|
1162
|
+
for (const i of h) {
|
|
1163
|
+
if (i === "dark" || ne.includes(i) || i.startsWith("@") && (ie.includes(i.slice(1)) || i.match(/^@\[.+\]$/)))
|
|
1005
1164
|
continue;
|
|
1006
|
-
const
|
|
1007
|
-
if (
|
|
1008
|
-
|
|
1165
|
+
const y = _e(i);
|
|
1166
|
+
if (y) {
|
|
1167
|
+
S = y;
|
|
1009
1168
|
continue;
|
|
1010
1169
|
}
|
|
1011
|
-
const F =
|
|
1170
|
+
const F = d[i];
|
|
1012
1171
|
if (F) {
|
|
1013
|
-
|
|
1172
|
+
S ? V.push(F) : W.push(F);
|
|
1014
1173
|
continue;
|
|
1015
1174
|
}
|
|
1016
|
-
const
|
|
1017
|
-
typeof
|
|
1175
|
+
const E = Ce[i];
|
|
1176
|
+
typeof E == "function" && (l = E(l, _).split("{")[0]);
|
|
1018
1177
|
}
|
|
1019
|
-
const
|
|
1020
|
-
function
|
|
1021
|
-
if (!
|
|
1022
|
-
let F = 0,
|
|
1023
|
-
if (
|
|
1024
|
-
let
|
|
1025
|
-
for (;
|
|
1026
|
-
for (;
|
|
1027
|
-
const
|
|
1028
|
-
if (
|
|
1029
|
-
return
|
|
1178
|
+
const D = W.join(""), L = V.join("");
|
|
1179
|
+
function Q(i, y) {
|
|
1180
|
+
if (!y) return i;
|
|
1181
|
+
let F = 0, E = 0;
|
|
1182
|
+
if (i.length && (i[0] === ">" || i[0] === "+" || i[0] === "~" || i[0] === " ")) {
|
|
1183
|
+
let j = 1;
|
|
1184
|
+
for (; j < i.length && i[j] === " "; ) j++;
|
|
1185
|
+
for (; j < i.length; j++) {
|
|
1186
|
+
const z = i[j];
|
|
1187
|
+
if (z === "[" ? F++ : z === "]" && F > 0 ? F-- : z === "(" ? E++ : z === ")" && E > 0 && E--, F === 0 && E === 0 && (i[j] === ">" || i[j] === "+" || i[j] === "~" || i[j] === " "))
|
|
1188
|
+
return i.slice(0, j) + y + i.slice(j);
|
|
1030
1189
|
}
|
|
1031
|
-
return
|
|
1190
|
+
return i + y;
|
|
1032
1191
|
}
|
|
1033
|
-
for (let
|
|
1034
|
-
const
|
|
1035
|
-
if (
|
|
1036
|
-
return
|
|
1192
|
+
for (let j = 0; j < i.length; j++) {
|
|
1193
|
+
const z = i[j];
|
|
1194
|
+
if (z === "[" ? F++ : z === "]" && F > 0 ? F-- : z === "(" ? E++ : z === ")" && E > 0 && E--, F === 0 && E === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
|
|
1195
|
+
return i.slice(0, j) + y + i.slice(j);
|
|
1037
1196
|
}
|
|
1038
|
-
return
|
|
1197
|
+
return i + y;
|
|
1039
1198
|
}
|
|
1040
|
-
if (
|
|
1041
|
-
if (
|
|
1042
|
-
const
|
|
1043
|
-
if (
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1199
|
+
if (S)
|
|
1200
|
+
if (S.includes("&")) {
|
|
1201
|
+
const i = S.indexOf("&"), y = S.slice(0, i), F = S.slice(i + 1), E = w + D;
|
|
1202
|
+
if (W.length === 0)
|
|
1203
|
+
l = l.replace(
|
|
1204
|
+
w,
|
|
1205
|
+
y + E + L + F
|
|
1047
1206
|
);
|
|
1048
1207
|
else {
|
|
1049
|
-
const
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1208
|
+
const j = Q(F, L);
|
|
1209
|
+
l = l.replace(
|
|
1210
|
+
w,
|
|
1211
|
+
y + E + j
|
|
1053
1212
|
);
|
|
1054
1213
|
}
|
|
1055
1214
|
} else
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
`${
|
|
1059
|
-
),
|
|
1215
|
+
l = l.replace(
|
|
1216
|
+
w,
|
|
1217
|
+
`${S}${w + D}`
|
|
1218
|
+
), L && (l = l.replace(w, `${w}${L}`));
|
|
1060
1219
|
else
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1220
|
+
l = l.replace(
|
|
1221
|
+
w,
|
|
1222
|
+
w + D + L
|
|
1064
1223
|
);
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
(n) => ie.includes(n)
|
|
1224
|
+
l = l.replace(new RegExp(w, "g"), R);
|
|
1225
|
+
const fe = "__CE_COLOR_MIX_SPLIT__", ve = _.includes(fe) ? _.split(fe).map((i) => `${l}{${i}}`) : [`${l}{${_}}`], Y = h.filter(
|
|
1226
|
+
(i) => ne.includes(i)
|
|
1069
1227
|
), ee = h.filter(
|
|
1070
|
-
(
|
|
1071
|
-
),
|
|
1072
|
-
let
|
|
1073
|
-
if (
|
|
1228
|
+
(i) => i.startsWith("@") && (ie.includes(i.slice(1)) || i.match(/^@\[.+\]$/))
|
|
1229
|
+
), q = Y.length ? Y[Y.length - 1] : null, H = ee.length ? ee[ee.length - 1] : null, ue = h.includes("dark");
|
|
1230
|
+
let N = "", U = "";
|
|
1231
|
+
if (ue && q ? N = `@media (prefers-color-scheme: dark) and ${oe[q]}` : ue ? N = "@media (prefers-color-scheme: dark)" : q && (N = `@media ${oe[q]}`), H)
|
|
1074
1232
|
if (H.startsWith("@[") && H.endsWith("]")) {
|
|
1075
|
-
const
|
|
1076
|
-
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(
|
|
1233
|
+
const i = H.slice(2, -1);
|
|
1234
|
+
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(i))
|
|
1077
1235
|
return null;
|
|
1078
|
-
|
|
1236
|
+
U = `@container (min-width:${i})`;
|
|
1079
1237
|
} else {
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1238
|
+
const i = H.slice(1);
|
|
1239
|
+
U = `@container ${me[i] || `(min-width:${i})`}`;
|
|
1082
1240
|
}
|
|
1083
|
-
|
|
1241
|
+
const we = (i) => N && U ? `${N}${U}{${i}}` : N ? `${N}{${i}}` : U ? `${U}{${i}}` : i;
|
|
1242
|
+
return ve.map(we).join("");
|
|
1084
1243
|
};
|
|
1085
|
-
for (const f of
|
|
1086
|
-
const p = a(f),
|
|
1087
|
-
(
|
|
1244
|
+
for (const f of c) {
|
|
1245
|
+
const p = a(f), g = p.find(
|
|
1246
|
+
(T) => re[T.replace(/^!/, "")] || ae(T.replace(/^!/, "")) || ce(T.replace(/^!/, "")) || de(T.replace(/^!/, "")) || se(T.replace(/^!/, "")) || le(T.replace(/^!/, "")) || Z(T.replace(/^!/, ""))
|
|
1088
1247
|
);
|
|
1089
|
-
if (!
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1248
|
+
if (!g) continue;
|
|
1249
|
+
const b = p.indexOf(g), k = b >= 0 ? p.slice(0, b) : [], x = t(k), O = m(f);
|
|
1250
|
+
O && s[x].push(O);
|
|
1092
1251
|
}
|
|
1093
|
-
const
|
|
1094
|
-
for (const f of
|
|
1095
|
-
if (
|
|
1096
|
-
if (
|
|
1097
|
-
const
|
|
1098
|
-
|
|
1252
|
+
const v = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
|
|
1253
|
+
for (const f of c)
|
|
1254
|
+
if (v.test(f)) {
|
|
1255
|
+
if (s.flat().join("").includes(`.${be(f)}`)) continue;
|
|
1256
|
+
const g = m(f);
|
|
1257
|
+
g && s[0].push(g);
|
|
1099
1258
|
}
|
|
1100
|
-
const
|
|
1101
|
-
const
|
|
1102
|
-
const
|
|
1259
|
+
const C = (f) => f.sort((p, g) => {
|
|
1260
|
+
const b = (R) => {
|
|
1261
|
+
const _ = {
|
|
1103
1262
|
sm: 640,
|
|
1104
1263
|
md: 768,
|
|
1105
1264
|
lg: 1024,
|
|
1106
1265
|
xl: 1280,
|
|
1107
1266
|
"2xl": 1536
|
|
1108
1267
|
};
|
|
1109
|
-
for (const [
|
|
1110
|
-
if (
|
|
1268
|
+
for (const [w, l] of Object.entries(_))
|
|
1269
|
+
if (R.includes(`@media ${oe[w]}`)) return l;
|
|
1111
1270
|
return -1;
|
|
1112
|
-
},
|
|
1113
|
-
const
|
|
1271
|
+
}, k = (R) => {
|
|
1272
|
+
const _ = {
|
|
1114
1273
|
xs: 320,
|
|
1115
1274
|
// 20rem
|
|
1116
1275
|
sm: 384,
|
|
@@ -1134,27 +1293,27 @@ function ze(e) {
|
|
|
1134
1293
|
"7xl": 1280
|
|
1135
1294
|
// 80rem
|
|
1136
1295
|
};
|
|
1137
|
-
for (const [
|
|
1138
|
-
if (
|
|
1139
|
-
if (
|
|
1140
|
-
const
|
|
1141
|
-
if (
|
|
1142
|
-
const
|
|
1143
|
-
return
|
|
1296
|
+
for (const [w, l] of Object.entries(_))
|
|
1297
|
+
if (R.includes(`@container ${me[w]}`)) return l;
|
|
1298
|
+
if (R.includes("@container (min-width:")) {
|
|
1299
|
+
const w = /@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(R);
|
|
1300
|
+
if (w) {
|
|
1301
|
+
const l = parseFloat(w[1]), P = w[2];
|
|
1302
|
+
return P === "rem" || P === "em" ? l * 16 : l;
|
|
1144
1303
|
}
|
|
1145
1304
|
}
|
|
1146
1305
|
return -1;
|
|
1147
|
-
},
|
|
1148
|
-
return
|
|
1306
|
+
}, x = b(p), O = b(g), T = k(p), h = k(g);
|
|
1307
|
+
return x >= 0 && O >= 0 && x !== O ? x - O : T >= 0 && h >= 0 && T !== h ? T - h : 0;
|
|
1149
1308
|
});
|
|
1150
|
-
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1309
|
+
s[2] = C(s[2]), s[3] = C(s[3]);
|
|
1310
|
+
const A = s.flat().join("");
|
|
1311
|
+
return G.size >= he && Array.from(G.keys()).slice(
|
|
1153
1312
|
0,
|
|
1154
|
-
Math.floor(
|
|
1155
|
-
).forEach((p) =>
|
|
1313
|
+
Math.floor(he / 2)
|
|
1314
|
+
).forEach((p) => G.delete(p)), G.set(e, { css: A, timestamp: r }), A;
|
|
1156
1315
|
}
|
|
1157
|
-
const
|
|
1316
|
+
const X = {
|
|
1158
1317
|
/** Simple fade in/out */
|
|
1159
1318
|
fade: {
|
|
1160
1319
|
enterFrom: "opacity-0",
|
|
@@ -1246,181 +1405,202 @@ const q = {
|
|
|
1246
1405
|
leaveTo: "rotate-[90deg] opacity-0"
|
|
1247
1406
|
}
|
|
1248
1407
|
};
|
|
1249
|
-
function
|
|
1408
|
+
function Ne(e, r) {
|
|
1250
1409
|
const {
|
|
1251
1410
|
preset: o,
|
|
1252
|
-
show:
|
|
1253
|
-
mode:
|
|
1254
|
-
duration:
|
|
1411
|
+
show: n,
|
|
1412
|
+
mode: c = "default",
|
|
1413
|
+
duration: s,
|
|
1255
1414
|
appear: u = !1,
|
|
1256
|
-
css:
|
|
1415
|
+
css: m = !0,
|
|
1257
1416
|
name: t,
|
|
1258
1417
|
enterFrom: a,
|
|
1259
|
-
enterActive:
|
|
1260
|
-
enterTo:
|
|
1261
|
-
leaveFrom:
|
|
1262
|
-
leaveActive:
|
|
1263
|
-
leaveTo:
|
|
1418
|
+
enterActive: d,
|
|
1419
|
+
enterTo: $,
|
|
1420
|
+
leaveFrom: v,
|
|
1421
|
+
leaveActive: C,
|
|
1422
|
+
leaveTo: A,
|
|
1264
1423
|
onBeforeEnter: f,
|
|
1265
1424
|
onEnter: p,
|
|
1266
|
-
onAfterEnter:
|
|
1267
|
-
onEnterCancelled:
|
|
1268
|
-
onBeforeLeave:
|
|
1269
|
-
onLeave:
|
|
1270
|
-
onAfterLeave:
|
|
1271
|
-
onLeaveCancelled:
|
|
1425
|
+
onAfterEnter: g,
|
|
1426
|
+
onEnterCancelled: b,
|
|
1427
|
+
onBeforeLeave: k,
|
|
1428
|
+
onLeave: x,
|
|
1429
|
+
onAfterLeave: O,
|
|
1430
|
+
onLeaveCancelled: T
|
|
1272
1431
|
} = e;
|
|
1273
1432
|
let h;
|
|
1274
|
-
o &&
|
|
1433
|
+
o && X[o] ? (h = { ...X[o] }, a && (h.enterFrom = a), d && (h.enterActive = d), $ && (h.enterTo = $), v && (h.leaveFrom = v), C && (h.leaveActive = C), A && (h.leaveTo = A)) : h = {
|
|
1275
1434
|
enterFrom: a,
|
|
1276
|
-
enterActive:
|
|
1277
|
-
enterTo:
|
|
1278
|
-
leaveFrom:
|
|
1279
|
-
leaveActive:
|
|
1280
|
-
leaveTo:
|
|
1435
|
+
enterActive: d,
|
|
1436
|
+
enterTo: $,
|
|
1437
|
+
leaveFrom: v,
|
|
1438
|
+
leaveActive: C,
|
|
1439
|
+
leaveTo: A
|
|
1281
1440
|
};
|
|
1282
|
-
const
|
|
1283
|
-
return
|
|
1284
|
-
name:
|
|
1441
|
+
const R = t || (o ? `transition-${o}` : "transition"), _ = ye(n ? r : [], R);
|
|
1442
|
+
return _._transition = {
|
|
1443
|
+
name: R,
|
|
1285
1444
|
classes: h,
|
|
1286
|
-
mode:
|
|
1287
|
-
duration:
|
|
1445
|
+
mode: c,
|
|
1446
|
+
duration: s,
|
|
1288
1447
|
appear: u,
|
|
1289
|
-
css:
|
|
1290
|
-
state:
|
|
1448
|
+
css: m,
|
|
1449
|
+
state: n ? "visible" : "hidden",
|
|
1291
1450
|
hooks: {
|
|
1292
1451
|
onBeforeEnter: f,
|
|
1293
1452
|
onEnter: p,
|
|
1294
|
-
onAfterEnter:
|
|
1295
|
-
onEnterCancelled:
|
|
1296
|
-
onBeforeLeave:
|
|
1297
|
-
onLeave:
|
|
1298
|
-
onAfterLeave:
|
|
1299
|
-
onLeaveCancelled:
|
|
1453
|
+
onAfterEnter: g,
|
|
1454
|
+
onEnterCancelled: b,
|
|
1455
|
+
onBeforeLeave: k,
|
|
1456
|
+
onLeave: x,
|
|
1457
|
+
onAfterLeave: O,
|
|
1458
|
+
onLeaveCancelled: T
|
|
1300
1459
|
}
|
|
1301
|
-
},
|
|
1460
|
+
}, _;
|
|
1302
1461
|
}
|
|
1303
1462
|
function Be(e, r) {
|
|
1304
1463
|
const {
|
|
1305
1464
|
tag: o = "div",
|
|
1306
|
-
moveClass:
|
|
1307
|
-
preset:
|
|
1308
|
-
show:
|
|
1465
|
+
moveClass: n = "transition-transform duration-300",
|
|
1466
|
+
preset: c,
|
|
1467
|
+
show: s = !0,
|
|
1309
1468
|
mode: u = "default",
|
|
1310
|
-
duration:
|
|
1469
|
+
duration: m,
|
|
1311
1470
|
appear: t = !1,
|
|
1312
1471
|
css: a = !0,
|
|
1313
|
-
name:
|
|
1314
|
-
class:
|
|
1315
|
-
style:
|
|
1316
|
-
enterFrom:
|
|
1317
|
-
enterActive:
|
|
1472
|
+
name: d,
|
|
1473
|
+
class: $,
|
|
1474
|
+
style: v,
|
|
1475
|
+
enterFrom: C,
|
|
1476
|
+
enterActive: A,
|
|
1318
1477
|
enterTo: f,
|
|
1319
1478
|
leaveFrom: p,
|
|
1320
|
-
leaveActive:
|
|
1321
|
-
leaveTo:
|
|
1322
|
-
onBeforeEnter:
|
|
1323
|
-
onEnter:
|
|
1324
|
-
onAfterEnter:
|
|
1325
|
-
onEnterCancelled:
|
|
1479
|
+
leaveActive: g,
|
|
1480
|
+
leaveTo: b,
|
|
1481
|
+
onBeforeEnter: k,
|
|
1482
|
+
onEnter: x,
|
|
1483
|
+
onAfterEnter: O,
|
|
1484
|
+
onEnterCancelled: T,
|
|
1326
1485
|
onBeforeLeave: h,
|
|
1327
|
-
onLeave:
|
|
1328
|
-
onAfterLeave:
|
|
1329
|
-
onLeaveCancelled:
|
|
1486
|
+
onLeave: R,
|
|
1487
|
+
onAfterLeave: _,
|
|
1488
|
+
onLeaveCancelled: w
|
|
1330
1489
|
} = e;
|
|
1331
|
-
let
|
|
1332
|
-
|
|
1333
|
-
enterFrom:
|
|
1334
|
-
enterActive:
|
|
1490
|
+
let l;
|
|
1491
|
+
c && X[c] ? (l = { ...X[c] }, C && (l.enterFrom = C), A && (l.enterActive = A), f && (l.enterTo = f), p && (l.leaveFrom = p), g && (l.leaveActive = g), b && (l.leaveTo = b)) : l = {
|
|
1492
|
+
enterFrom: C,
|
|
1493
|
+
enterActive: A,
|
|
1335
1494
|
enterTo: f,
|
|
1336
1495
|
leaveFrom: p,
|
|
1337
|
-
leaveActive:
|
|
1338
|
-
leaveTo:
|
|
1496
|
+
leaveActive: g,
|
|
1497
|
+
leaveTo: b
|
|
1339
1498
|
};
|
|
1340
|
-
const
|
|
1341
|
-
for (const
|
|
1342
|
-
if (
|
|
1343
|
-
const
|
|
1344
|
-
for (const
|
|
1345
|
-
if (
|
|
1346
|
-
const
|
|
1347
|
-
...
|
|
1348
|
-
key:
|
|
1499
|
+
const P = d || (c ? `transition-group-${c}` : "transition-group"), W = [];
|
|
1500
|
+
for (const S of s ? r : [])
|
|
1501
|
+
if (S && typeof S == "object" && S.tag === "#anchor") {
|
|
1502
|
+
const D = Array.isArray(S.children) ? S.children : [];
|
|
1503
|
+
for (const L of D)
|
|
1504
|
+
if (L && typeof L == "object") {
|
|
1505
|
+
const Q = {
|
|
1506
|
+
...L,
|
|
1507
|
+
key: S.key || L.key,
|
|
1349
1508
|
props: {
|
|
1350
|
-
...
|
|
1351
|
-
_anchorKey:
|
|
1509
|
+
...L.props,
|
|
1510
|
+
_anchorKey: S.key
|
|
1352
1511
|
// Preserve original anchor key
|
|
1353
1512
|
}
|
|
1354
1513
|
};
|
|
1355
|
-
|
|
1514
|
+
W.push(Q);
|
|
1356
1515
|
} else
|
|
1357
|
-
|
|
1516
|
+
W.push(L);
|
|
1358
1517
|
} else
|
|
1359
|
-
|
|
1518
|
+
W.push(S);
|
|
1360
1519
|
const V = (() => {
|
|
1361
|
-
if (
|
|
1362
|
-
return typeof
|
|
1520
|
+
if (v)
|
|
1521
|
+
return typeof v == "string" ? v : Object.entries(v).map(([S, D]) => `${S}: ${D}`).join("; ");
|
|
1363
1522
|
})();
|
|
1364
1523
|
return {
|
|
1365
1524
|
tag: o,
|
|
1366
|
-
children:
|
|
1367
|
-
key:
|
|
1525
|
+
children: W,
|
|
1526
|
+
key: P,
|
|
1368
1527
|
props: {
|
|
1369
1528
|
attrs: {
|
|
1370
|
-
|
|
1529
|
+
...$ ? { class: $ } : {},
|
|
1371
1530
|
...V ? { style: V } : {}
|
|
1372
1531
|
},
|
|
1373
1532
|
_transitionGroup: {
|
|
1374
|
-
name:
|
|
1375
|
-
classes:
|
|
1376
|
-
moveClass:
|
|
1533
|
+
name: P,
|
|
1534
|
+
classes: l,
|
|
1535
|
+
moveClass: n,
|
|
1377
1536
|
mode: u,
|
|
1378
|
-
duration:
|
|
1537
|
+
duration: m,
|
|
1379
1538
|
appear: t,
|
|
1380
1539
|
css: a,
|
|
1381
1540
|
hooks: {
|
|
1382
|
-
onBeforeEnter:
|
|
1383
|
-
onEnter:
|
|
1384
|
-
onAfterEnter:
|
|
1385
|
-
onEnterCancelled:
|
|
1541
|
+
onBeforeEnter: k,
|
|
1542
|
+
onEnter: x,
|
|
1543
|
+
onAfterEnter: O,
|
|
1544
|
+
onEnterCancelled: T,
|
|
1386
1545
|
onBeforeLeave: h,
|
|
1387
|
-
onLeave:
|
|
1388
|
-
onAfterLeave:
|
|
1389
|
-
onLeaveCancelled:
|
|
1546
|
+
onLeave: R,
|
|
1547
|
+
onAfterLeave: _,
|
|
1548
|
+
onLeaveCancelled: w
|
|
1390
1549
|
}
|
|
1391
1550
|
}
|
|
1392
1551
|
}
|
|
1393
1552
|
};
|
|
1394
1553
|
}
|
|
1395
|
-
function
|
|
1554
|
+
function Ue(e) {
|
|
1396
1555
|
return { ...e };
|
|
1397
1556
|
}
|
|
1398
|
-
let
|
|
1399
|
-
function
|
|
1400
|
-
if (!
|
|
1557
|
+
let B = null;
|
|
1558
|
+
function Me() {
|
|
1559
|
+
if (!B) {
|
|
1560
|
+
if (typeof CSSStyleSheet > "u")
|
|
1561
|
+
return B = {
|
|
1562
|
+
cssRules: [],
|
|
1563
|
+
replaceSync: () => {
|
|
1564
|
+
},
|
|
1565
|
+
toString: () => ""
|
|
1566
|
+
}, B;
|
|
1401
1567
|
const e = [];
|
|
1402
|
-
Object.values(
|
|
1403
|
-
|
|
1568
|
+
Object.values(X).forEach((n) => {
|
|
1569
|
+
n.enterFrom && e.push(n.enterFrom), n.enterActive && e.push(n.enterActive), n.enterTo && e.push(n.enterTo), n.leaveFrom && e.push(n.leaveFrom), n.leaveActive && e.push(n.leaveActive), n.leaveTo && e.push(n.leaveTo);
|
|
1404
1570
|
});
|
|
1405
|
-
const r = `<div class="${e.join(" ")}"></div>`, o =
|
|
1406
|
-
|
|
1571
|
+
const r = `<div class="${e.join(" ")}"></div>`, o = Le(r);
|
|
1572
|
+
try {
|
|
1573
|
+
B = new CSSStyleSheet(), B.replaceSync(o);
|
|
1574
|
+
} catch {
|
|
1575
|
+
B = {
|
|
1576
|
+
cssRules: [],
|
|
1577
|
+
replaceSync: () => {
|
|
1578
|
+
},
|
|
1579
|
+
toString: () => o || ""
|
|
1580
|
+
};
|
|
1581
|
+
}
|
|
1407
1582
|
}
|
|
1408
|
-
return
|
|
1583
|
+
return B;
|
|
1409
1584
|
}
|
|
1410
|
-
function
|
|
1411
|
-
|
|
1585
|
+
function Pe() {
|
|
1586
|
+
if (!(typeof window > "u" || typeof CSSStyleSheet > "u"))
|
|
1587
|
+
try {
|
|
1588
|
+
Me();
|
|
1589
|
+
} catch {
|
|
1590
|
+
}
|
|
1412
1591
|
}
|
|
1413
|
-
|
|
1592
|
+
Pe();
|
|
1414
1593
|
export {
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1594
|
+
Ne as T,
|
|
1595
|
+
Me as a,
|
|
1596
|
+
pe as b,
|
|
1597
|
+
ke as c,
|
|
1598
|
+
Be as d,
|
|
1599
|
+
Ue as e,
|
|
1600
|
+
Ie as g,
|
|
1601
|
+
Le as j,
|
|
1602
|
+
ge as m,
|
|
1423
1603
|
De as s,
|
|
1424
|
-
|
|
1604
|
+
X as t
|
|
1425
1605
|
};
|
|
1426
|
-
//# sourceMappingURL=transitions-
|
|
1606
|
+
//# sourceMappingURL=transitions-m6FraTTL.js.map
|