@salty-css/react 0.0.1-alpha.29 → 0.0.1-alpha.292
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 +469 -26
- package/class-name-client.cjs +1 -0
- package/class-name-client.d.ts +7 -0
- package/class-name-client.js +15 -0
- package/class-name.cjs +1 -0
- package/class-name.d.ts +10 -0
- package/class-name.js +20 -0
- package/clsx-C11secjj.cjs +1 -0
- package/clsx-OuTLNxxd.js +16 -0
- package/config.cjs +1 -0
- package/config.d.ts +1 -0
- package/config.js +1 -0
- package/dynamic-styles.cjs +2 -0
- package/dynamic-styles.d.ts +23 -0
- package/dynamic-styles.js +29 -0
- package/element-factory-BPI0pGIH.cjs +1 -0
- package/element-factory-D5vMsSwp.js +56 -0
- package/element-factory.d.ts +3 -3
- package/helpers.cjs +1 -0
- package/helpers.d.ts +1 -0
- package/helpers.js +1 -0
- package/index.cjs +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/keyframes.cjs +1 -1
- package/keyframes.d.ts +1 -22
- package/keyframes.js +1 -30
- package/media.cjs +1 -1
- package/media.d.ts +1 -71
- package/media.js +1 -85
- package/package.json +32 -3
- package/styled-client.cjs +1 -1
- package/styled-client.d.ts +3 -3
- package/styled-client.js +3 -5
- package/styled.cjs +1 -1
- package/styled.d.ts +5 -5
- package/styled.js +8 -65
- package/dash-case-B_odFlTl.cjs +0 -1
- package/dash-case-CGJ_UIZz.js +0 -6
- package/element-factory-WgNOpLmJ.cjs +0 -1
- package/element-factory-uEk4VrqP.js +0 -59
- package/parse-styles-SPT4zc_H.cjs +0 -7
- package/parse-styles-T74HIH4_.js +0 -85
package/parse-styles-T74HIH4_.js
DELETED
@@ -1,85 +0,0 @@
|
|
1
|
-
import { d as V } from "./dash-case-CGJ_UIZz.js";
|
2
|
-
const E = (r) => String.fromCharCode(r + (r > 25 ? 39 : 97)), T = (r, s) => {
|
3
|
-
let t = "", n;
|
4
|
-
for (n = Math.abs(r); n > 52; n = n / 52 | 0) t = E(n % 52) + t;
|
5
|
-
return t = E(n % 52) + t, t.length < s ? t = t.padStart(s, "a") : t.length > s && (t = t.slice(-s)), t;
|
6
|
-
}, W = (r, s) => {
|
7
|
-
let t = s.length;
|
8
|
-
for (; t; ) r = r * 33 ^ s.charCodeAt(--t);
|
9
|
-
return r;
|
10
|
-
}, x = (r, s = 3) => {
|
11
|
-
const t = W(5381, JSON.stringify(r)) >>> 0;
|
12
|
-
return T(t, s);
|
13
|
-
}, H = (r, s) => {
|
14
|
-
if (typeof r != "string") return { result: r };
|
15
|
-
if (!s) return { result: r };
|
16
|
-
const t = [];
|
17
|
-
return Object.values(s).forEach((n) => {
|
18
|
-
const { pattern: c, transform: a } = n;
|
19
|
-
r = r.replace(c, (d) => {
|
20
|
-
const { value: i, css: m } = a(d);
|
21
|
-
return m && t.push(m), i;
|
22
|
-
});
|
23
|
-
}), { result: r, additionalCss: t };
|
24
|
-
}, M = (r) => typeof r != "string" ? { result: r } : /\{[^{}]+\}/g.test(r) ? { result: r.replace(/\{([^{}]+)\}/g, (...n) => `var(--${V(n[1].replaceAll(".", "-"))})`) } : { result: r }, $ = (r, s, t, n) => {
|
25
|
-
if (!r) return "";
|
26
|
-
const c = [], a = Object.entries(r).reduce((i, [m, e]) => {
|
27
|
-
const o = m.trim();
|
28
|
-
if (typeof e == "function" && (e = e()), typeof e == "object") {
|
29
|
-
if (!e) return i;
|
30
|
-
if (o === "variants")
|
31
|
-
return Object.entries(e).forEach(([f, p]) => {
|
32
|
-
p && Object.entries(p).forEach(([l, b]) => {
|
33
|
-
if (!b) return;
|
34
|
-
const j = `${s}.${f}-${l}`, S = $(b, j, t);
|
35
|
-
c.push(S);
|
36
|
-
});
|
37
|
-
}), i;
|
38
|
-
if (o === "defaultVariants")
|
39
|
-
return i;
|
40
|
-
if (o === "compoundVariants")
|
41
|
-
return e.forEach((f) => {
|
42
|
-
const { css: p, ...l } = f, b = Object.entries(l).reduce((S, [N, P]) => `${S}.${N}-${P}`, s), j = $(p, b, t);
|
43
|
-
c.push(j);
|
44
|
-
}), i;
|
45
|
-
if (o.startsWith("@")) {
|
46
|
-
const f = $(e, s, t), p = `${o} {
|
47
|
-
${f.replace(`
|
48
|
-
`, `
|
49
|
-
`)}
|
50
|
-
}`;
|
51
|
-
return c.push(p), i;
|
52
|
-
}
|
53
|
-
const u = m.includes("&") ? o.replace("&", s) : o.startsWith(":") ? `${s}${o}` : `${s} ${o}`, h = $(e, u, t);
|
54
|
-
return c.push(h), i;
|
55
|
-
}
|
56
|
-
if (n != null && n.templates && n.templates[o]) {
|
57
|
-
const h = e.split(".").reduce((p, l) => p[l], n.templates[o]), f = $(h, "");
|
58
|
-
return `${i}${f}`;
|
59
|
-
}
|
60
|
-
const g = o.startsWith("-") ? o : V(o), y = (u, h = ";") => i = `${i}${u}${h}`, O = (u) => y(`${g}:${u}`);
|
61
|
-
if (typeof e == "number") return O(e);
|
62
|
-
if (typeof e != "string")
|
63
|
-
if ("toString" in e) e = e.toString();
|
64
|
-
else return i;
|
65
|
-
const { modifiers: A } = n || {}, k = function* () {
|
66
|
-
yield M(e), yield H(e, A);
|
67
|
-
}();
|
68
|
-
for (const { result: u, additionalCss: h = [] } of k)
|
69
|
-
e = u, h.forEach((f) => {
|
70
|
-
const p = $(f, "");
|
71
|
-
y(p, "");
|
72
|
-
});
|
73
|
-
return O(e);
|
74
|
-
}, "");
|
75
|
-
if (!a) return c.join(`
|
76
|
-
`);
|
77
|
-
if (!s) return a;
|
78
|
-
let d = "";
|
79
|
-
return t !== void 0 ? d = `@layer l${t} { ${s} { ${a} } }` : d = `${s} { ${a} }`, [d, ...c].join(`
|
80
|
-
`);
|
81
|
-
};
|
82
|
-
export {
|
83
|
-
$ as p,
|
84
|
-
x as t
|
85
|
-
};
|