cssier 0.3.0 → 0.4.0
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/README.md +3 -3
- package/dist/Wbr-kB-50tx8.mjs +809 -0
- package/dist/components/index.js +161 -807
- package/dist/cssier.js +166 -168
- package/dist/hooks/index.js +5 -79
- package/dist/types.d.ts +2 -2
- package/dist/useCssProperty-BPiNucnI.mjs +79 -0
- package/dist/{useStylesheet-42306f27.mjs → useStylesheet-C18JCDAd.mjs} +6 -7
- package/package.json +14 -18
- package/dist/storybook-utils.d.ts +0 -4
package/dist/cssier.js
CHANGED
@@ -1,171 +1,169 @@
|
|
1
|
-
import {
|
2
|
-
import { u as
|
3
|
-
import { A as
|
4
|
-
import "react";
|
5
|
-
import "react/jsx-runtime";
|
1
|
+
import { u as e, a as t } from "./useCssProperty-BPiNucnI.mjs";
|
2
|
+
import { u as o } from "./useStylesheet-C18JCDAd.mjs";
|
3
|
+
import { A as b, a as l, b as n, aG as p, aH as F, bt as u, c as d, d as m, bu as g, B as S, bv as c, e as T, f as D, g as h, h as M, bw as f, i as C, C as P, j as y, aI as H, k as L, aJ as A, l as B, bx as x, m as v, D as I, n as O, o as k, aK as G, p as R, aL as E, q as j, r as w, s as N, t as U, u as V, v as q, aM as z, E as K, by as Q, aN as W, aO as J, aP as X, aQ as Y, aR as Z, aS as _, aT as $, aU as aa, aV as sa, aW as ea, aX as ta, aY as ra, aZ as oa, a_ as ia, a$ as ba, b0 as la, b1 as na, b2 as pa, b3 as Fa, b4 as ua, F as da, w as ma, x as ga, b5 as Sa, y as ca, b6 as Ta, z as Da, b7 as ha, H as Ma, G as fa, I as Ca, J as Pa, K as ya, L as Ha, M as La, N as Aa, O as Ba, bz as xa, P as va, Q as Ia, R as Oa, b8 as ka, bA as Ga, bB as Ra, S as Ea, T as ja, U as wa, V as Na, W as Ua, b9 as Va, ba as qa, bC as za, X as Ka, Y as Qa, Z as Wa, bb as Ja, bc as Xa, bD as Ya, bd as Za, _ as _a, be as $a, $ as as, a0 as ss, a1 as es, a2 as ts, a3 as rs, a4 as os, a5 as is, a6 as bs, bE as ls, bf as ns, bg as ps, a7 as Fs, bh as us, bi as ds, a8 as ms, a9 as gs, aa as Ss, bj as cs, bk as Ts, ab as Ds, ac as hs, ad as Ms, ae as fs, af as Cs, ag as Ps, ah as ys, ai as Hs, aj as Ls, bF as As, ak as Bs, bl as xs, al as vs, am as Is, an as Os, ao as ks, ap as Gs, aF as Rs, bm as Es, bn as js, aq as ws, ar as Ns, as as Us, at as Vs, bo as qs, bp as zs, au as Ks, av as Qs, aw as Ws, ax as Js, ay as Xs, az as Ys, aA as Zs, bq as _s, aB as $s, aC as ae, br as se, aD as ee, aE as te, bs as re, bG as oe } from "./Wbr-kB-50tx8.mjs";
|
6
4
|
export {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
5
|
+
b as A,
|
6
|
+
l as Abbr,
|
7
|
+
n as Address,
|
8
|
+
p as Animate,
|
9
|
+
F as AnimateTransform,
|
10
|
+
u as Area,
|
11
|
+
d as Article,
|
12
|
+
m as Aside,
|
13
|
+
g as Audio,
|
14
|
+
S as B,
|
15
|
+
c as Base,
|
16
|
+
T as Bdi,
|
17
|
+
D as Bdo,
|
18
|
+
h as Blockquote,
|
19
|
+
M as Body,
|
20
|
+
f as Br,
|
21
|
+
C as Button,
|
22
|
+
P as Canvas,
|
23
|
+
y as Caption,
|
24
|
+
H as Circle,
|
25
|
+
L as Cite,
|
26
|
+
A as ClipPath,
|
27
|
+
B as Code,
|
28
|
+
x as Col,
|
31
29
|
v as Colgroup,
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
30
|
+
I as Data,
|
31
|
+
O as Datalist,
|
32
|
+
k as Dd,
|
33
|
+
G as Defs,
|
34
|
+
R as Del,
|
35
|
+
E as Desc,
|
36
|
+
j as Details,
|
37
|
+
w as Dfn,
|
38
|
+
N as Dialog,
|
39
|
+
U as Div,
|
40
|
+
V as Dl,
|
41
|
+
q as Dt,
|
42
|
+
z as Ellipse,
|
43
|
+
K as Em,
|
44
|
+
Q as Embed,
|
45
|
+
W as FeBlend,
|
46
|
+
J as FeColorMatrix,
|
47
|
+
X as FeComponentTransfer,
|
48
|
+
Y as FeComposite,
|
49
|
+
Z as FeConvolveMatrix,
|
50
|
+
_ as FeDiffuseLighting,
|
51
|
+
$ as FeDisplacementMap,
|
52
|
+
aa as FeDistantLight,
|
53
|
+
sa as FeFlood,
|
54
|
+
ea as FeGaussianBlur,
|
55
|
+
ta as FeImage,
|
56
|
+
ra as FeMerge,
|
57
|
+
oa as FeMergeNode,
|
58
|
+
ia as FeMorphology,
|
59
|
+
ba as FeOffset,
|
60
|
+
la as FePointLight,
|
61
|
+
na as FeSpecularLighting,
|
62
|
+
pa as FeSpotLight,
|
63
|
+
Fa as FeTile,
|
64
|
+
ua as FeTurbulence,
|
65
|
+
da as Fieldset,
|
66
|
+
ma as Figcaption,
|
67
|
+
ga as Figure,
|
68
|
+
Sa as Filter,
|
69
|
+
ca as Footer,
|
70
|
+
Ta as ForeignObject,
|
71
|
+
Da as Form,
|
72
|
+
ha as G,
|
73
|
+
Ma as H1,
|
74
|
+
fa as H2,
|
75
|
+
Ca as H3,
|
76
|
+
Pa as H4,
|
77
|
+
ya as H5,
|
78
|
+
Ha as H6,
|
79
|
+
La as Head,
|
80
|
+
Aa as Header,
|
81
|
+
Ba as Hgroup,
|
82
|
+
xa as Hr,
|
83
|
+
va as Html,
|
84
|
+
Ia as I,
|
85
|
+
Oa as Iframe,
|
86
|
+
ka as Image,
|
87
|
+
Ga as Img,
|
88
|
+
Ra as Input,
|
89
|
+
Ea as Ins,
|
90
|
+
ja as Kbd,
|
91
|
+
wa as Label,
|
92
|
+
Na as Legend,
|
93
|
+
Ua as Li,
|
94
|
+
Va as Line,
|
95
|
+
qa as LinearGradient,
|
96
|
+
za as Link,
|
97
|
+
Ka as Main,
|
98
|
+
Qa as Map,
|
99
|
+
Wa as Mark,
|
100
|
+
Ja as Marker,
|
101
|
+
Xa as Mask,
|
102
|
+
Ya as Meta,
|
103
|
+
Za as Metadata,
|
104
|
+
_a as Meter,
|
105
|
+
$a as Mpath,
|
106
|
+
as as Nav,
|
107
|
+
ss as Noscript,
|
108
|
+
es as Object,
|
109
|
+
ts as Ol,
|
110
|
+
rs as Optgroup,
|
111
|
+
os as Option,
|
112
|
+
is as Output,
|
113
|
+
bs as P,
|
114
|
+
ls as Param,
|
115
|
+
ns as Path,
|
116
|
+
ps as Pattern,
|
117
|
+
Fs as Picture,
|
118
|
+
us as Polygon,
|
119
|
+
ds as Polyline,
|
120
|
+
ms as Pre,
|
121
|
+
gs as Progress,
|
122
|
+
Ss as Q,
|
123
|
+
cs as RadialGradient,
|
124
|
+
Ts as Rect,
|
125
|
+
Ds as Rp,
|
126
|
+
hs as Rt,
|
127
|
+
Ms as Ruby,
|
128
|
+
fs as S,
|
129
|
+
Cs as Samp,
|
130
|
+
Ps as Script,
|
131
|
+
ys as Section,
|
132
|
+
Hs as Select,
|
133
|
+
Ls as Small,
|
134
|
+
As as Source,
|
135
|
+
Bs as Span,
|
136
|
+
xs as Stop,
|
137
|
+
vs as Strong,
|
138
|
+
Is as Style,
|
139
|
+
Os as Sub,
|
140
|
+
ks as Summary,
|
141
|
+
Gs as Sup,
|
142
|
+
Rs as Svg,
|
143
|
+
Es as Switch,
|
144
|
+
js as Symbol,
|
145
|
+
ws as Table,
|
146
|
+
Ns as Tbody,
|
147
|
+
Us as Td,
|
148
|
+
Vs as Template,
|
149
|
+
qs as Text,
|
150
|
+
zs as TextPath,
|
151
|
+
Ks as Textarea,
|
152
|
+
Qs as Tfoot,
|
153
|
+
Ws as Th,
|
154
|
+
Js as Thead,
|
155
|
+
Xs as Time,
|
156
|
+
Ys as Title,
|
157
|
+
Zs as Tr,
|
158
|
+
_s as Tspan,
|
159
|
+
$s as U,
|
160
|
+
ae as Ul,
|
161
|
+
se as Use,
|
162
|
+
ee as Var,
|
163
|
+
te as Video,
|
164
|
+
re as View,
|
165
|
+
oe as Wbr,
|
166
|
+
e as useAnimation,
|
167
|
+
t as useCssProperty,
|
168
|
+
o as useStylesheet
|
171
169
|
};
|
package/dist/hooks/index.js
CHANGED
@@ -1,81 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
import { u as
|
3
|
-
import { useState as s, useEffect as d } from "react";
|
4
|
-
function v(t, e) {
|
5
|
-
if (!e) {
|
6
|
-
const y = document.head.querySelector(`style#${t}`);
|
7
|
-
return y && y.remove(), "";
|
8
|
-
}
|
9
|
-
let a = document.head.querySelector(`style#${t}`);
|
10
|
-
console.log(t), a || (a = document.createElement("style"), a.id = t, a.type = "text/css", document.head.appendChild(a));
|
11
|
-
let n = "";
|
12
|
-
n += `@keyframes ${e.name} {`, Object.entries(e.keyframes).forEach(([y, S]) => {
|
13
|
-
n += `${y} {
|
14
|
-
`, n += Object.entries(S).map(([h, C]) => `${h.replace(/[A-Z]/g, (x) => `-${x.toLowerCase()}`)}: ${C}`).join(`;
|
15
|
-
`), n += `
|
16
|
-
}
|
17
|
-
`;
|
18
|
-
}), n += `}
|
19
|
-
`, n += `.${t} {
|
20
|
-
`;
|
21
|
-
const r = e.delay ?? "0s", c = e.direction ?? "normal", i = e.duration ?? "2s", u = e.fillMode ?? "none", l = e.iterationCount ?? "1", m = e.playState ?? "running", f = e.timingFunction ?? "ease";
|
22
|
-
n += ` animation-name: ${e.name};
|
23
|
-
`, e.delay && (n += ` animation-delay: ${r};
|
24
|
-
`), e.direction && (n += ` animation-direction: ${c};
|
25
|
-
`), e.duration && (n += ` animation-duration: ${i};
|
26
|
-
`), e.fillMode && (n += ` animation-fill-mode: ${u};
|
27
|
-
`), e.iterationCount && (n += ` animation-iteration-count: ${l};
|
28
|
-
`), e.playState && (n += ` animation-play-state: ${m};
|
29
|
-
`), e.timingFunction && (n += ` animation-timing-function: ${f};
|
30
|
-
`), n += `}
|
31
|
-
`, a.textContent = n;
|
32
|
-
const g = `${e.name} ${i} ${f} ${r} ${l} ${c} ${u} ${m}`;
|
33
|
-
return [n, g];
|
34
|
-
}
|
35
|
-
function p(t) {
|
36
|
-
const e = Array.isArray(t.syntax) ? t.syntax.join(", ") : t.syntax;
|
37
|
-
return `@property ${t.name} {
|
38
|
-
syntax: ${e};
|
39
|
-
inherits: ${t.inherits};
|
40
|
-
initial-value: ${t.initialValue};
|
41
|
-
}
|
42
|
-
|
43
|
-
body{
|
44
|
-
${t.name}: ${t.initialValue};
|
45
|
-
}
|
46
|
-
`;
|
47
|
-
}
|
48
|
-
function P(t, e) {
|
49
|
-
if (!e) {
|
50
|
-
const r = document.head.querySelector(`style#${t}`);
|
51
|
-
return r && r.remove(), "";
|
52
|
-
}
|
53
|
-
let a = document.head.querySelector(`style#${t}`);
|
54
|
-
a || (a = document.createElement("style"), a.id = t, a.type = "text/css", document.head.appendChild(a));
|
55
|
-
let n = p(e);
|
56
|
-
return a.textContent = n, n;
|
57
|
-
}
|
58
|
-
function k(t, e) {
|
59
|
-
return t == null && e == null ? !0 : !(t == null && typeof e == "object" || e == null && typeof t == "object" || Object.keys(t).length !== Object.keys(e).length || (t == null ? void 0 : t.duration) !== (e == null ? void 0 : e.duration) || (t == null ? void 0 : t.delay) !== (e == null ? void 0 : e.delay) || (t == null ? void 0 : t.direction) !== (e == null ? void 0 : e.direction) || (t == null ? void 0 : t.fillMode) !== (e == null ? void 0 : e.fillMode) || (t == null ? void 0 : t.iterationCount) !== (e == null ? void 0 : e.iterationCount) || (t == null ? void 0 : t.name) !== (e == null ? void 0 : e.name) || (t == null ? void 0 : t.playState) !== (e == null ? void 0 : e.playState) || (t == null ? void 0 : t.timingFunction) !== (e == null ? void 0 : e.timingFunction) || JSON.stringify(t == null ? void 0 : t.keyframes) !== JSON.stringify(e == null ? void 0 : e.keyframes));
|
60
|
-
}
|
61
|
-
function A(t, e) {
|
62
|
-
const [a] = s(() => e ?? $()), [n, r] = s({}), [c, i] = s(""), [u, l] = s("");
|
63
|
-
return d(() => {
|
64
|
-
if (!k(n, t)) {
|
65
|
-
r(t);
|
66
|
-
const [m, f] = v(a, t);
|
67
|
-
i(m), l(f);
|
68
|
-
}
|
69
|
-
}, [a, t, n, i]), [a, u, c];
|
70
|
-
}
|
71
|
-
function F(t, e) {
|
72
|
-
const [a] = s(() => e ?? $()), [n, r] = s("");
|
73
|
-
return d(() => {
|
74
|
-
r(P(a, t));
|
75
|
-
}, [a, r, t]), [a, `var(${t.name})`, n];
|
76
|
-
}
|
1
|
+
import { u as o } from "../useStylesheet-C18JCDAd.mjs";
|
2
|
+
import { u as t, a } from "../useCssProperty-BPiNucnI.mjs";
|
77
3
|
export {
|
78
|
-
|
79
|
-
|
80
|
-
|
4
|
+
t as useAnimation,
|
5
|
+
a as useCssProperty,
|
6
|
+
o as useStylesheet
|
81
7
|
};
|
package/dist/types.d.ts
CHANGED
@@ -24,9 +24,9 @@ export type AnimationDefinition = {
|
|
24
24
|
duration?: CSSProperties['animationDuration'];
|
25
25
|
fillMode?: CSSProperties['animationFillMode'];
|
26
26
|
iterationCount?: CSSProperties['animationIterationCount'];
|
27
|
-
name
|
27
|
+
name?: CSSProperties['animationName'];
|
28
28
|
playState?: CSSProperties['animationPlayState'];
|
29
29
|
timingFunction?: CSSProperties['animationTimingFunction'];
|
30
|
-
keyframes: Record
|
30
|
+
keyframes: Record<`${number}%` | `${number}${number}%` | `${number}${number}${number}%` | 'from' | 'to', ExtendedCssProperties>;
|
31
31
|
};
|
32
32
|
export {};
|
@@ -0,0 +1,79 @@
|
|
1
|
+
import { useState as s, useEffect as $ } from "react";
|
2
|
+
import { g as d } from "./useStylesheet-C18JCDAd.mjs";
|
3
|
+
function x(t, e) {
|
4
|
+
if (!e) {
|
5
|
+
const y = document.head.querySelector(`style#${t}`);
|
6
|
+
return y && y.remove(), "";
|
7
|
+
}
|
8
|
+
let a = document.head.querySelector(`style#${t}`);
|
9
|
+
a || (a = document.createElement("style"), a.id = t, a.type = "text/css", document.head.appendChild(a));
|
10
|
+
let n = "";
|
11
|
+
n += `@keyframes ${(e == null ? void 0 : e.name) || t} {`, Object.entries(e.keyframes).forEach(([y, C]) => {
|
12
|
+
n += `${y} {
|
13
|
+
`, n += Object.entries(C).map(([S, h]) => `${S.replace(/[A-Z]/g, (v) => `-${v.toLowerCase()}`)}: ${h}`).join(`;
|
14
|
+
`), n += `
|
15
|
+
}
|
16
|
+
`;
|
17
|
+
}), n += `}
|
18
|
+
`, n += `.${t} {
|
19
|
+
`;
|
20
|
+
const r = e.delay ?? "0s", u = e.direction ?? "normal", c = e.duration ?? "2s", l = e.fillMode ?? "none", i = e.iterationCount ?? "1", m = e.playState ?? "running", f = e.timingFunction ?? "ease";
|
21
|
+
n += ` animation-name: ${(e == null ? void 0 : e.name) ?? t};
|
22
|
+
`, e.delay && (n += ` animation-delay: ${r};
|
23
|
+
`), e.direction && (n += ` animation-direction: ${u};
|
24
|
+
`), e.duration && (n += ` animation-duration: ${c};
|
25
|
+
`), e.fillMode && (n += ` animation-fill-mode: ${l};
|
26
|
+
`), e.iterationCount && (n += ` animation-iteration-count: ${i};
|
27
|
+
`), e.playState && (n += ` animation-play-state: ${m};
|
28
|
+
`), e.timingFunction && (n += ` animation-timing-function: ${f};
|
29
|
+
`), n += `}
|
30
|
+
`, a.textContent = n;
|
31
|
+
const g = `${e.name ?? t} ${c} ${f} ${r} ${i} ${u} ${l} ${m}`;
|
32
|
+
return [n, g];
|
33
|
+
}
|
34
|
+
function p(t) {
|
35
|
+
const e = Array.isArray(t.syntax) ? t.syntax.join(", ") : t.syntax;
|
36
|
+
return `@property ${t.name} {
|
37
|
+
syntax: ${e};
|
38
|
+
inherits: ${t.inherits};
|
39
|
+
initial-value: ${t.initialValue};
|
40
|
+
}
|
41
|
+
|
42
|
+
body{
|
43
|
+
${t.name}: ${t.initialValue};
|
44
|
+
}
|
45
|
+
`;
|
46
|
+
}
|
47
|
+
function P(t, e) {
|
48
|
+
if (!e) {
|
49
|
+
const r = document.head.querySelector(`style#${t}`);
|
50
|
+
return r && r.remove(), "";
|
51
|
+
}
|
52
|
+
let a = document.head.querySelector(`style#${t}`);
|
53
|
+
a || (a = document.createElement("style"), a.id = t, a.type = "text/css", document.head.appendChild(a));
|
54
|
+
let n = p(e);
|
55
|
+
return a.textContent = n, n;
|
56
|
+
}
|
57
|
+
function k(t, e) {
|
58
|
+
return t == null && e == null ? !0 : !(t == null && typeof e == "object" || e == null && typeof t == "object" || Object.keys(t).length !== Object.keys(e).length || (t == null ? void 0 : t.duration) !== (e == null ? void 0 : e.duration) || (t == null ? void 0 : t.delay) !== (e == null ? void 0 : e.delay) || (t == null ? void 0 : t.direction) !== (e == null ? void 0 : e.direction) || (t == null ? void 0 : t.fillMode) !== (e == null ? void 0 : e.fillMode) || (t == null ? void 0 : t.iterationCount) !== (e == null ? void 0 : e.iterationCount) || (t == null ? void 0 : t.name) !== (e == null ? void 0 : e.name) || (t == null ? void 0 : t.playState) !== (e == null ? void 0 : e.playState) || (t == null ? void 0 : t.timingFunction) !== (e == null ? void 0 : e.timingFunction) || JSON.stringify(t == null ? void 0 : t.keyframes) !== JSON.stringify(e == null ? void 0 : e.keyframes));
|
59
|
+
}
|
60
|
+
function A(t, e) {
|
61
|
+
const [a] = s(() => e ?? d()), [n, r] = s({}), [u, c] = s(""), [l, i] = s("");
|
62
|
+
return $(() => {
|
63
|
+
if (!k(n, t)) {
|
64
|
+
r(t);
|
65
|
+
const [m, f] = x(a, t);
|
66
|
+
c(m), i(f);
|
67
|
+
}
|
68
|
+
}, [a, t, n, c]), [a, l, u];
|
69
|
+
}
|
70
|
+
function F(t, e) {
|
71
|
+
const [a] = s(() => e ?? d()), [n, r] = s("");
|
72
|
+
return $(() => {
|
73
|
+
r(P(a, t));
|
74
|
+
}, [a, r, t]), [a, `var(${t.name})`, n];
|
75
|
+
}
|
76
|
+
export {
|
77
|
+
F as a,
|
78
|
+
A as u
|
79
|
+
};
|
@@ -128,7 +128,7 @@ function s(t, r) {
|
|
128
128
|
let e = "";
|
129
129
|
return Object.entries(r).forEach(([a, i]) => {
|
130
130
|
let n = t;
|
131
|
-
h.includes(a) ? n = `${t}:${a}` : k.includes(a) ? n = `${t}::${a}` : a === "neutral" ||
|
131
|
+
h.includes(a) ? n = `${t}:${a}` : k.includes(a) ? n = `${t}::${a}` : a === "neutral" || console.error(`Invalid pseudo class: ${a}`);
|
132
132
|
const { and: l, ...c } = i;
|
133
133
|
l && (e += s(n, l)), e += `${n} { ${Object.entries(c).map(([u, f]) => `${u.replace(/[A-Z]/g, (d) => `-${d.toLowerCase()}`)}: ${f}`).join("; ")} }`;
|
134
134
|
}), e;
|
@@ -143,7 +143,7 @@ function m(t, r) {
|
|
143
143
|
let a = s(`.${t}`, r);
|
144
144
|
return e.textContent = a, a;
|
145
145
|
}
|
146
|
-
const
|
146
|
+
const y = [
|
147
147
|
"A",
|
148
148
|
"B",
|
149
149
|
"C",
|
@@ -171,13 +171,13 @@ const w = [
|
|
171
171
|
"Y",
|
172
172
|
"Z"
|
173
173
|
];
|
174
|
-
function
|
175
|
-
return new Array(t).fill(0).map(() =>
|
174
|
+
function w(t) {
|
175
|
+
return new Array(t).fill(0).map(() => y[Math.floor(Math.random() * 24)]).join("");
|
176
176
|
}
|
177
177
|
function* g() {
|
178
178
|
const t = [];
|
179
179
|
for (; ; ) {
|
180
|
-
let r =
|
180
|
+
let r = w(6);
|
181
181
|
t.includes(r) || (t.push(r), yield r);
|
182
182
|
}
|
183
183
|
}
|
@@ -186,8 +186,7 @@ function $() {
|
|
186
186
|
return v.next().value;
|
187
187
|
}
|
188
188
|
function p(t, r) {
|
189
|
-
if (t == null && r == null)
|
190
|
-
return !0;
|
189
|
+
if (t == null && r == null) return !0;
|
191
190
|
if (t == null && typeof r == "object" || r == null && typeof t == "object" || Object.keys(t).length !== Object.keys(r).length)
|
192
191
|
return !1;
|
193
192
|
for (const e in t)
|
package/package.json
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "cssier",
|
3
3
|
"private": false,
|
4
|
-
"version": "0.
|
5
|
-
"packageManager": "pnpm@8.4.0",
|
4
|
+
"version": "0.4.0",
|
6
5
|
"repository": {
|
7
6
|
"type": "git",
|
8
7
|
"url": "https://github.com/DanBermanTech/cssier"
|
@@ -28,20 +27,6 @@
|
|
28
27
|
"engines": {
|
29
28
|
"node": "20"
|
30
29
|
},
|
31
|
-
"scripts": {
|
32
|
-
"dev": "storybook dev -p 6006",
|
33
|
-
"build": "npm run generate && storybook build && npm run cleanup",
|
34
|
-
"build:lib": "npm run generate && tsc && vite build && npm run cleanup",
|
35
|
-
"lint": "eslint --ext .js,.jsx,.ts,.tsx --fix",
|
36
|
-
"prettier": "prettier --write \"src/**/*.{ts,tsx,js,mdx}\"",
|
37
|
-
"test": "vitest",
|
38
|
-
"test:cov": "vitest run --coverage",
|
39
|
-
"prepare": "husky install",
|
40
|
-
"prepack": "json -f package.json -I -e \"delete this.devDependencies; delete this.dependencies\"",
|
41
|
-
"prepublishOnly": "npm run build:lib",
|
42
|
-
"generate": "node scripts/generate",
|
43
|
-
"cleanup": "node scripts/cleanup"
|
44
|
-
},
|
45
30
|
"peerDependencies": {
|
46
31
|
"react": ">=18.2.0",
|
47
32
|
"react-dom": ">=18.2.0"
|
@@ -70,5 +55,16 @@
|
|
70
55
|
"hooks",
|
71
56
|
"component",
|
72
57
|
"components"
|
73
|
-
]
|
74
|
-
|
58
|
+
],
|
59
|
+
"scripts": {
|
60
|
+
"dev": "storybook dev -p 6006",
|
61
|
+
"build": "npm run generate && storybook build && npm run cleanup",
|
62
|
+
"build:lib": "npm run generate && tsc && vite build && npm run cleanup",
|
63
|
+
"lint": "eslint --ext .js,.jsx,.ts,.tsx --fix",
|
64
|
+
"prettier": "prettier --write \"src/**/*.{ts,tsx,js,mdx}\"",
|
65
|
+
"test": "vitest",
|
66
|
+
"test:cov": "vitest run --coverage",
|
67
|
+
"generate": "node scripts/generate",
|
68
|
+
"cleanup": "node scripts/cleanup"
|
69
|
+
}
|
70
|
+
}
|