@vertz/ui 0.2.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 +1138 -0
- package/dist/css/public.d.ts +157 -0
- package/dist/css/public.js +18 -0
- package/dist/form/public.d.ts +111 -0
- package/dist/form/public.js +11 -0
- package/dist/index.d.ts +700 -0
- package/dist/index.js +261 -0
- package/dist/internals.d.ts +414 -0
- package/dist/internals.js +268 -0
- package/dist/jsx-runtime/index.d.ts +40 -0
- package/dist/jsx-runtime/index.js +50 -0
- package/dist/query/public.d.ts +58 -0
- package/dist/query/public.js +7 -0
- package/dist/router/public.d.ts +214 -0
- package/dist/router/public.js +21 -0
- package/dist/shared/chunk-bp3v6s9j.js +62 -0
- package/dist/shared/chunk-d8h2eh8d.js +141 -0
- package/dist/shared/chunk-f1ynwam4.js +872 -0
- package/dist/shared/chunk-j8vzvne3.js +153 -0
- package/dist/shared/chunk-pgymxpn1.js +308 -0
- package/dist/shared/chunk-tsdpgmks.js +98 -0
- package/dist/shared/chunk-xd9d7q5p.js +115 -0
- package/dist/shared/chunk-zbbvx05f.js +202 -0
- package/dist/test/index.d.ts +268 -0
- package/dist/test/index.js +236 -0
- package/package.json +76 -0
|
@@ -0,0 +1,872 @@
|
|
|
1
|
+
// src/css/token-tables.ts
|
|
2
|
+
var PROPERTY_MAP = {
|
|
3
|
+
p: { properties: ["padding"], valueType: "spacing" },
|
|
4
|
+
px: { properties: ["padding-inline"], valueType: "spacing" },
|
|
5
|
+
py: { properties: ["padding-block"], valueType: "spacing" },
|
|
6
|
+
pt: { properties: ["padding-top"], valueType: "spacing" },
|
|
7
|
+
pr: { properties: ["padding-right"], valueType: "spacing" },
|
|
8
|
+
pb: { properties: ["padding-bottom"], valueType: "spacing" },
|
|
9
|
+
pl: { properties: ["padding-left"], valueType: "spacing" },
|
|
10
|
+
m: { properties: ["margin"], valueType: "spacing" },
|
|
11
|
+
mx: { properties: ["margin-inline"], valueType: "spacing" },
|
|
12
|
+
my: { properties: ["margin-block"], valueType: "spacing" },
|
|
13
|
+
mt: { properties: ["margin-top"], valueType: "spacing" },
|
|
14
|
+
mr: { properties: ["margin-right"], valueType: "spacing" },
|
|
15
|
+
mb: { properties: ["margin-bottom"], valueType: "spacing" },
|
|
16
|
+
ml: { properties: ["margin-left"], valueType: "spacing" },
|
|
17
|
+
w: { properties: ["width"], valueType: "size" },
|
|
18
|
+
h: { properties: ["height"], valueType: "size" },
|
|
19
|
+
"min-w": { properties: ["min-width"], valueType: "size" },
|
|
20
|
+
"max-w": { properties: ["max-width"], valueType: "size" },
|
|
21
|
+
"min-h": { properties: ["min-height"], valueType: "size" },
|
|
22
|
+
"max-h": { properties: ["max-height"], valueType: "size" },
|
|
23
|
+
bg: { properties: ["background-color"], valueType: "color" },
|
|
24
|
+
text: { properties: ["color"], valueType: "color" },
|
|
25
|
+
border: { properties: ["border-color"], valueType: "color" },
|
|
26
|
+
"border-r": { properties: ["border-right-width"], valueType: "raw" },
|
|
27
|
+
"border-l": { properties: ["border-left-width"], valueType: "raw" },
|
|
28
|
+
"border-t": { properties: ["border-top-width"], valueType: "raw" },
|
|
29
|
+
"border-b": { properties: ["border-bottom-width"], valueType: "raw" },
|
|
30
|
+
rounded: { properties: ["border-radius"], valueType: "radius" },
|
|
31
|
+
shadow: { properties: ["box-shadow"], valueType: "shadow" },
|
|
32
|
+
gap: { properties: ["gap"], valueType: "spacing" },
|
|
33
|
+
items: { properties: ["align-items"], valueType: "alignment" },
|
|
34
|
+
justify: { properties: ["justify-content"], valueType: "alignment" },
|
|
35
|
+
"grid-cols": { properties: ["grid-template-columns"], valueType: "raw" },
|
|
36
|
+
font: { properties: ["font-size"], valueType: "font-size" },
|
|
37
|
+
weight: { properties: ["font-weight"], valueType: "font-weight" },
|
|
38
|
+
leading: { properties: ["line-height"], valueType: "line-height" },
|
|
39
|
+
tracking: { properties: ["letter-spacing"], valueType: "raw" },
|
|
40
|
+
ring: { properties: ["outline"], valueType: "ring" },
|
|
41
|
+
cursor: { properties: ["cursor"], valueType: "raw" },
|
|
42
|
+
transition: { properties: ["transition"], valueType: "raw" },
|
|
43
|
+
resize: { properties: ["resize"], valueType: "raw" },
|
|
44
|
+
opacity: { properties: ["opacity"], valueType: "raw" },
|
|
45
|
+
inset: { properties: ["inset"], valueType: "raw" },
|
|
46
|
+
z: { properties: ["z-index"], valueType: "raw" },
|
|
47
|
+
content: { properties: ["content"], valueType: "content" }
|
|
48
|
+
};
|
|
49
|
+
var KEYWORD_MAP = {
|
|
50
|
+
flex: [{ property: "display", value: "flex" }],
|
|
51
|
+
grid: [{ property: "display", value: "grid" }],
|
|
52
|
+
block: [{ property: "display", value: "block" }],
|
|
53
|
+
inline: [{ property: "display", value: "inline" }],
|
|
54
|
+
hidden: [{ property: "display", value: "none" }],
|
|
55
|
+
"inline-flex": [{ property: "display", value: "inline-flex" }],
|
|
56
|
+
"flex-1": [{ property: "flex", value: "1 1 0%" }],
|
|
57
|
+
"flex-col": [{ property: "flex-direction", value: "column" }],
|
|
58
|
+
"flex-row": [{ property: "flex-direction", value: "row" }],
|
|
59
|
+
"flex-wrap": [{ property: "flex-wrap", value: "wrap" }],
|
|
60
|
+
"flex-nowrap": [{ property: "flex-wrap", value: "nowrap" }],
|
|
61
|
+
fixed: [{ property: "position", value: "fixed" }],
|
|
62
|
+
absolute: [{ property: "position", value: "absolute" }],
|
|
63
|
+
relative: [{ property: "position", value: "relative" }],
|
|
64
|
+
sticky: [{ property: "position", value: "sticky" }],
|
|
65
|
+
uppercase: [{ property: "text-transform", value: "uppercase" }],
|
|
66
|
+
lowercase: [{ property: "text-transform", value: "lowercase" }],
|
|
67
|
+
capitalize: [{ property: "text-transform", value: "capitalize" }],
|
|
68
|
+
"outline-none": [{ property: "outline", value: "none" }]
|
|
69
|
+
};
|
|
70
|
+
var DISPLAY_MAP = {
|
|
71
|
+
flex: "flex",
|
|
72
|
+
grid: "grid",
|
|
73
|
+
block: "block",
|
|
74
|
+
inline: "inline",
|
|
75
|
+
hidden: "none",
|
|
76
|
+
"inline-flex": "inline-flex"
|
|
77
|
+
};
|
|
78
|
+
var SPACING_SCALE = {
|
|
79
|
+
"0": "0",
|
|
80
|
+
"0.5": "0.125rem",
|
|
81
|
+
"1": "0.25rem",
|
|
82
|
+
"1.5": "0.375rem",
|
|
83
|
+
"2": "0.5rem",
|
|
84
|
+
"2.5": "0.625rem",
|
|
85
|
+
"3": "0.75rem",
|
|
86
|
+
"3.5": "0.875rem",
|
|
87
|
+
"4": "1rem",
|
|
88
|
+
"5": "1.25rem",
|
|
89
|
+
"6": "1.5rem",
|
|
90
|
+
"7": "1.75rem",
|
|
91
|
+
"8": "2rem",
|
|
92
|
+
"9": "2.25rem",
|
|
93
|
+
"10": "2.5rem",
|
|
94
|
+
"11": "2.75rem",
|
|
95
|
+
"12": "3rem",
|
|
96
|
+
"14": "3.5rem",
|
|
97
|
+
"16": "4rem",
|
|
98
|
+
"20": "5rem",
|
|
99
|
+
"24": "6rem",
|
|
100
|
+
"28": "7rem",
|
|
101
|
+
"32": "8rem",
|
|
102
|
+
"36": "9rem",
|
|
103
|
+
"40": "10rem",
|
|
104
|
+
"44": "11rem",
|
|
105
|
+
"48": "12rem",
|
|
106
|
+
"52": "13rem",
|
|
107
|
+
"56": "14rem",
|
|
108
|
+
"60": "15rem",
|
|
109
|
+
"64": "16rem",
|
|
110
|
+
"72": "18rem",
|
|
111
|
+
"80": "20rem",
|
|
112
|
+
"96": "24rem",
|
|
113
|
+
auto: "auto"
|
|
114
|
+
};
|
|
115
|
+
var RADIUS_SCALE = {
|
|
116
|
+
none: "0",
|
|
117
|
+
sm: "0.125rem",
|
|
118
|
+
md: "0.375rem",
|
|
119
|
+
lg: "0.5rem",
|
|
120
|
+
xl: "0.75rem",
|
|
121
|
+
"2xl": "1rem",
|
|
122
|
+
"3xl": "1.5rem",
|
|
123
|
+
full: "9999px"
|
|
124
|
+
};
|
|
125
|
+
var SHADOW_SCALE = {
|
|
126
|
+
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
127
|
+
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
128
|
+
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
129
|
+
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
|
130
|
+
"2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
131
|
+
none: "none"
|
|
132
|
+
};
|
|
133
|
+
var FONT_SIZE_SCALE = {
|
|
134
|
+
xs: "0.75rem",
|
|
135
|
+
sm: "0.875rem",
|
|
136
|
+
base: "1rem",
|
|
137
|
+
lg: "1.125rem",
|
|
138
|
+
xl: "1.25rem",
|
|
139
|
+
"2xl": "1.5rem",
|
|
140
|
+
"3xl": "1.875rem",
|
|
141
|
+
"4xl": "2.25rem",
|
|
142
|
+
"5xl": "3rem"
|
|
143
|
+
};
|
|
144
|
+
var FONT_WEIGHT_SCALE = {
|
|
145
|
+
thin: "100",
|
|
146
|
+
extralight: "200",
|
|
147
|
+
light: "300",
|
|
148
|
+
normal: "400",
|
|
149
|
+
medium: "500",
|
|
150
|
+
semibold: "600",
|
|
151
|
+
bold: "700",
|
|
152
|
+
extrabold: "800",
|
|
153
|
+
black: "900"
|
|
154
|
+
};
|
|
155
|
+
var LINE_HEIGHT_SCALE = {
|
|
156
|
+
none: "1",
|
|
157
|
+
tight: "1.25",
|
|
158
|
+
snug: "1.375",
|
|
159
|
+
normal: "1.5",
|
|
160
|
+
relaxed: "1.625",
|
|
161
|
+
loose: "2"
|
|
162
|
+
};
|
|
163
|
+
var ALIGNMENT_MAP = {
|
|
164
|
+
start: "flex-start",
|
|
165
|
+
end: "flex-end",
|
|
166
|
+
center: "center",
|
|
167
|
+
between: "space-between",
|
|
168
|
+
around: "space-around",
|
|
169
|
+
evenly: "space-evenly",
|
|
170
|
+
stretch: "stretch",
|
|
171
|
+
baseline: "baseline"
|
|
172
|
+
};
|
|
173
|
+
var SIZE_KEYWORDS = {
|
|
174
|
+
full: "100%",
|
|
175
|
+
svw: "100svw",
|
|
176
|
+
dvw: "100dvw",
|
|
177
|
+
min: "min-content",
|
|
178
|
+
max: "max-content",
|
|
179
|
+
fit: "fit-content",
|
|
180
|
+
auto: "auto",
|
|
181
|
+
xs: "20rem",
|
|
182
|
+
sm: "24rem",
|
|
183
|
+
md: "28rem",
|
|
184
|
+
lg: "32rem",
|
|
185
|
+
xl: "36rem",
|
|
186
|
+
"2xl": "42rem",
|
|
187
|
+
"3xl": "48rem",
|
|
188
|
+
"4xl": "56rem",
|
|
189
|
+
"5xl": "64rem",
|
|
190
|
+
"6xl": "72rem",
|
|
191
|
+
"7xl": "80rem"
|
|
192
|
+
};
|
|
193
|
+
var HEIGHT_AXIS_PROPERTIES = new Set(["h", "min-h", "max-h"]);
|
|
194
|
+
var COLOR_NAMESPACES = new Set([
|
|
195
|
+
"primary",
|
|
196
|
+
"secondary",
|
|
197
|
+
"accent",
|
|
198
|
+
"background",
|
|
199
|
+
"foreground",
|
|
200
|
+
"muted",
|
|
201
|
+
"surface",
|
|
202
|
+
"destructive",
|
|
203
|
+
"danger",
|
|
204
|
+
"success",
|
|
205
|
+
"warning",
|
|
206
|
+
"info",
|
|
207
|
+
"border",
|
|
208
|
+
"ring",
|
|
209
|
+
"input",
|
|
210
|
+
"card",
|
|
211
|
+
"popover",
|
|
212
|
+
"gray"
|
|
213
|
+
]);
|
|
214
|
+
var CSS_COLOR_KEYWORDS = new Set([
|
|
215
|
+
"transparent",
|
|
216
|
+
"inherit",
|
|
217
|
+
"currentColor",
|
|
218
|
+
"initial",
|
|
219
|
+
"unset",
|
|
220
|
+
"white",
|
|
221
|
+
"black"
|
|
222
|
+
]);
|
|
223
|
+
var CONTENT_MAP = {
|
|
224
|
+
empty: "''",
|
|
225
|
+
none: "none"
|
|
226
|
+
};
|
|
227
|
+
var PSEUDO_PREFIXES = new Set([
|
|
228
|
+
"hover",
|
|
229
|
+
"focus",
|
|
230
|
+
"focus-visible",
|
|
231
|
+
"active",
|
|
232
|
+
"disabled",
|
|
233
|
+
"first",
|
|
234
|
+
"last"
|
|
235
|
+
]);
|
|
236
|
+
var PSEUDO_MAP = {
|
|
237
|
+
hover: ":hover",
|
|
238
|
+
focus: ":focus",
|
|
239
|
+
"focus-visible": ":focus-visible",
|
|
240
|
+
active: ":active",
|
|
241
|
+
disabled: ":disabled",
|
|
242
|
+
first: ":first-child",
|
|
243
|
+
last: ":last-child"
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// src/css/class-generator.ts
|
|
247
|
+
function generateClassName(filePath, blockName) {
|
|
248
|
+
const input = `${filePath}::${blockName}`;
|
|
249
|
+
const hash = djb2Hash(input);
|
|
250
|
+
return `_${hash}`;
|
|
251
|
+
}
|
|
252
|
+
function djb2Hash(str) {
|
|
253
|
+
let hash = 5381;
|
|
254
|
+
for (let i = 0;i < str.length; i++) {
|
|
255
|
+
hash = (hash << 5) + hash + str.charCodeAt(i) | 0;
|
|
256
|
+
}
|
|
257
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// src/css/shorthand-parser.ts
|
|
261
|
+
var DISPLAY_KEYWORDS = new Set(["flex", "grid", "block", "inline", "hidden"]);
|
|
262
|
+
function parseShorthand(input) {
|
|
263
|
+
if (!input || input.trim() === "") {
|
|
264
|
+
throw new ShorthandParseError("Empty shorthand string", input);
|
|
265
|
+
}
|
|
266
|
+
const trimmed = input.trim();
|
|
267
|
+
const parts = splitShorthand(trimmed);
|
|
268
|
+
if (parts.length === 1) {
|
|
269
|
+
const [property] = parts;
|
|
270
|
+
return { property, value: null, pseudo: null };
|
|
271
|
+
}
|
|
272
|
+
if (parts.length === 2) {
|
|
273
|
+
const [first, second] = parts;
|
|
274
|
+
if (PSEUDO_PREFIXES.has(first)) {
|
|
275
|
+
const pseudo = PSEUDO_MAP[first] ?? first;
|
|
276
|
+
if (DISPLAY_KEYWORDS.has(second)) {
|
|
277
|
+
return { property: second, value: null, pseudo };
|
|
278
|
+
}
|
|
279
|
+
return { property: second, value: null, pseudo };
|
|
280
|
+
}
|
|
281
|
+
return { property: first, value: second, pseudo: null };
|
|
282
|
+
}
|
|
283
|
+
if (parts.length === 3) {
|
|
284
|
+
const [first, second, third] = parts;
|
|
285
|
+
if (!PSEUDO_PREFIXES.has(first)) {
|
|
286
|
+
throw new ShorthandParseError(`Unknown pseudo prefix '${first}'. Supported: ${[...PSEUDO_PREFIXES].join(", ")}`, input);
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
property: second,
|
|
290
|
+
value: third,
|
|
291
|
+
pseudo: PSEUDO_MAP[first] ?? first
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
throw new ShorthandParseError(`Too many segments (${parts.length}). Expected 'property:value' or 'pseudo:property:value'`, input);
|
|
295
|
+
}
|
|
296
|
+
function splitShorthand(input) {
|
|
297
|
+
return input.split(":");
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
class ShorthandParseError extends Error {
|
|
301
|
+
input;
|
|
302
|
+
constructor(message, input) {
|
|
303
|
+
super(`Invalid shorthand '${input}': ${message}`);
|
|
304
|
+
this.name = "ShorthandParseError";
|
|
305
|
+
this.input = input;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// src/css/token-resolver.ts
|
|
310
|
+
class TokenResolveError extends Error {
|
|
311
|
+
shorthand;
|
|
312
|
+
constructor(message, shorthand) {
|
|
313
|
+
super(message);
|
|
314
|
+
this.name = "TokenResolveError";
|
|
315
|
+
this.shorthand = shorthand;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
function resolveToken(parsed) {
|
|
319
|
+
const { property, value, pseudo } = parsed;
|
|
320
|
+
const keyword = KEYWORD_MAP[property];
|
|
321
|
+
if (keyword !== undefined && value === null) {
|
|
322
|
+
return { declarations: [...keyword], pseudo };
|
|
323
|
+
}
|
|
324
|
+
const mapping = PROPERTY_MAP[property];
|
|
325
|
+
if (!mapping) {
|
|
326
|
+
throw new TokenResolveError(`Unknown property shorthand '${property}'`, formatShorthand(parsed));
|
|
327
|
+
}
|
|
328
|
+
if (value === null) {
|
|
329
|
+
throw new TokenResolveError(`Property '${property}' requires a value`, formatShorthand(parsed));
|
|
330
|
+
}
|
|
331
|
+
if (property === "text") {
|
|
332
|
+
return { declarations: resolveText(value), pseudo };
|
|
333
|
+
}
|
|
334
|
+
if (property === "font") {
|
|
335
|
+
return { declarations: resolveFont(value), pseudo };
|
|
336
|
+
}
|
|
337
|
+
if (property === "border") {
|
|
338
|
+
return { declarations: resolveBorder(value), pseudo };
|
|
339
|
+
}
|
|
340
|
+
if (property === "ring") {
|
|
341
|
+
return { declarations: resolveRingMulti(value), pseudo };
|
|
342
|
+
}
|
|
343
|
+
const resolvedValue = resolveValue(value, mapping.valueType, property);
|
|
344
|
+
const declarations = mapping.properties.map((prop) => ({
|
|
345
|
+
property: prop,
|
|
346
|
+
value: resolvedValue
|
|
347
|
+
}));
|
|
348
|
+
return { declarations, pseudo };
|
|
349
|
+
}
|
|
350
|
+
function resolveValue(value, valueType, property) {
|
|
351
|
+
switch (valueType) {
|
|
352
|
+
case "spacing":
|
|
353
|
+
return resolveSpacing(value, property);
|
|
354
|
+
case "color":
|
|
355
|
+
return resolveColor(value, property);
|
|
356
|
+
case "radius":
|
|
357
|
+
return resolveRadius(value, property);
|
|
358
|
+
case "shadow":
|
|
359
|
+
return resolveShadow(value, property);
|
|
360
|
+
case "size":
|
|
361
|
+
return resolveSize(value, property);
|
|
362
|
+
case "alignment":
|
|
363
|
+
return resolveAlignment(value, property);
|
|
364
|
+
case "font-size":
|
|
365
|
+
return resolveFontSize(value, property);
|
|
366
|
+
case "font-weight":
|
|
367
|
+
return resolveFontWeight(value, property);
|
|
368
|
+
case "line-height":
|
|
369
|
+
return resolveLineHeight(value, property);
|
|
370
|
+
case "ring":
|
|
371
|
+
return resolveRing(value, property);
|
|
372
|
+
case "content":
|
|
373
|
+
return resolveContent(value, property);
|
|
374
|
+
case "display":
|
|
375
|
+
return value;
|
|
376
|
+
case "raw":
|
|
377
|
+
return resolveRaw(value, property);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function resolveSpacing(value, property) {
|
|
381
|
+
const scaled = SPACING_SCALE[value];
|
|
382
|
+
if (scaled !== undefined)
|
|
383
|
+
return scaled;
|
|
384
|
+
throw new TokenResolveError(`Invalid spacing value '${value}' for '${property}'. Use a spacing scale number (0, 1, 2, 4, 8, etc.) or 'auto'.`, `${property}:${value}`);
|
|
385
|
+
}
|
|
386
|
+
function resolveColor(value, property) {
|
|
387
|
+
const dotIndex = value.indexOf(".");
|
|
388
|
+
if (dotIndex !== -1) {
|
|
389
|
+
const namespace = value.substring(0, dotIndex);
|
|
390
|
+
const shade = value.substring(dotIndex + 1);
|
|
391
|
+
if (COLOR_NAMESPACES.has(namespace)) {
|
|
392
|
+
return `var(--color-${namespace}-${shade})`;
|
|
393
|
+
}
|
|
394
|
+
throw new TokenResolveError(`Unknown color token '${value}'. Known namespaces: ${[...COLOR_NAMESPACES].join(", ")}`, `${property}:${value}`);
|
|
395
|
+
}
|
|
396
|
+
if (COLOR_NAMESPACES.has(value)) {
|
|
397
|
+
return `var(--color-${value})`;
|
|
398
|
+
}
|
|
399
|
+
if (CSS_COLOR_KEYWORDS.has(value)) {
|
|
400
|
+
return value;
|
|
401
|
+
}
|
|
402
|
+
throw new TokenResolveError(`Unknown color token '${value}'. Use a design token name (e.g. 'primary', 'background') or 'primary.700' for shades.`, `${property}:${value}`);
|
|
403
|
+
}
|
|
404
|
+
function resolveRadius(value, property) {
|
|
405
|
+
const scaled = RADIUS_SCALE[value];
|
|
406
|
+
if (scaled !== undefined)
|
|
407
|
+
return scaled;
|
|
408
|
+
throw new TokenResolveError(`Invalid border-radius value '${value}' for '${property}'. Use: ${Object.keys(RADIUS_SCALE).join(", ")}`, `${property}:${value}`);
|
|
409
|
+
}
|
|
410
|
+
function resolveShadow(value, property) {
|
|
411
|
+
const scaled = SHADOW_SCALE[value];
|
|
412
|
+
if (scaled !== undefined)
|
|
413
|
+
return scaled;
|
|
414
|
+
throw new TokenResolveError(`Invalid shadow value '${value}' for '${property}'. Use: ${Object.keys(SHADOW_SCALE).join(", ")}`, `${property}:${value}`);
|
|
415
|
+
}
|
|
416
|
+
function resolveSize(value, property) {
|
|
417
|
+
const spaced = SPACING_SCALE[value];
|
|
418
|
+
if (spaced !== undefined)
|
|
419
|
+
return spaced;
|
|
420
|
+
if (value === "screen") {
|
|
421
|
+
return HEIGHT_AXIS_PROPERTIES.has(property) ? "100vh" : "100vw";
|
|
422
|
+
}
|
|
423
|
+
const keyword = SIZE_KEYWORDS[value];
|
|
424
|
+
if (keyword !== undefined)
|
|
425
|
+
return keyword;
|
|
426
|
+
throw new TokenResolveError(`Invalid size value '${value}' for '${property}'. Use a spacing scale number or keyword (full, screen, min, max, fit, auto).`, `${property}:${value}`);
|
|
427
|
+
}
|
|
428
|
+
function resolveAlignment(value, property) {
|
|
429
|
+
const mapped = ALIGNMENT_MAP[value];
|
|
430
|
+
if (mapped !== undefined)
|
|
431
|
+
return mapped;
|
|
432
|
+
throw new TokenResolveError(`Invalid alignment value '${value}' for '${property}'. Use: ${Object.keys(ALIGNMENT_MAP).join(", ")}`, `${property}:${value}`);
|
|
433
|
+
}
|
|
434
|
+
function resolveFontSize(value, property) {
|
|
435
|
+
const scaled = FONT_SIZE_SCALE[value];
|
|
436
|
+
if (scaled !== undefined)
|
|
437
|
+
return scaled;
|
|
438
|
+
throw new TokenResolveError(`Invalid font-size value '${value}' for '${property}'. Use: ${Object.keys(FONT_SIZE_SCALE).join(", ")}`, `${property}:${value}`);
|
|
439
|
+
}
|
|
440
|
+
function resolveFontWeight(value, property) {
|
|
441
|
+
const scaled = FONT_WEIGHT_SCALE[value];
|
|
442
|
+
if (scaled !== undefined)
|
|
443
|
+
return scaled;
|
|
444
|
+
throw new TokenResolveError(`Invalid font-weight value '${value}' for '${property}'. Use: ${Object.keys(FONT_WEIGHT_SCALE).join(", ")}`, `${property}:${value}`);
|
|
445
|
+
}
|
|
446
|
+
function resolveLineHeight(value, property) {
|
|
447
|
+
const scaled = LINE_HEIGHT_SCALE[value];
|
|
448
|
+
if (scaled !== undefined)
|
|
449
|
+
return scaled;
|
|
450
|
+
throw new TokenResolveError(`Invalid line-height value '${value}' for '${property}'. Use: ${Object.keys(LINE_HEIGHT_SCALE).join(", ")}`, `${property}:${value}`);
|
|
451
|
+
}
|
|
452
|
+
function resolveRing(value, property) {
|
|
453
|
+
const num = Number(value);
|
|
454
|
+
if (Number.isNaN(num) || num < 0) {
|
|
455
|
+
throw new TokenResolveError(`Invalid ring width '${value}' for '${property}'. Use a non-negative number (0, 1, 2, 4, etc.).`, `${property}:${value}`);
|
|
456
|
+
}
|
|
457
|
+
return `${num}px solid var(--color-ring)`;
|
|
458
|
+
}
|
|
459
|
+
function resolveContent(value, property) {
|
|
460
|
+
const mapped = CONTENT_MAP[value];
|
|
461
|
+
if (mapped !== undefined)
|
|
462
|
+
return mapped;
|
|
463
|
+
throw new TokenResolveError(`Invalid content value '${value}' for '${property}'. Use: ${Object.keys(CONTENT_MAP).join(", ")}`, `${property}:${value}`);
|
|
464
|
+
}
|
|
465
|
+
var TEXT_ALIGN_KEYWORDS = new Set(["center", "left", "right", "justify", "start", "end"]);
|
|
466
|
+
function resolveText(value) {
|
|
467
|
+
if (FONT_SIZE_SCALE[value] !== undefined) {
|
|
468
|
+
return [{ property: "font-size", value: FONT_SIZE_SCALE[value] }];
|
|
469
|
+
}
|
|
470
|
+
if (TEXT_ALIGN_KEYWORDS.has(value)) {
|
|
471
|
+
return [{ property: "text-align", value }];
|
|
472
|
+
}
|
|
473
|
+
return [{ property: "color", value: resolveColor(value, "text") }];
|
|
474
|
+
}
|
|
475
|
+
function resolveFont(value) {
|
|
476
|
+
if (FONT_WEIGHT_SCALE[value] !== undefined) {
|
|
477
|
+
return [{ property: "font-weight", value: FONT_WEIGHT_SCALE[value] }];
|
|
478
|
+
}
|
|
479
|
+
return [{ property: "font-size", value: resolveFontSize(value, "font") }];
|
|
480
|
+
}
|
|
481
|
+
function resolveBorder(value) {
|
|
482
|
+
const num = Number(value);
|
|
483
|
+
if (!Number.isNaN(num) && num >= 0) {
|
|
484
|
+
return [{ property: "border-width", value: `${num}px` }];
|
|
485
|
+
}
|
|
486
|
+
return [{ property: "border-color", value: resolveColor(value, "border") }];
|
|
487
|
+
}
|
|
488
|
+
function resolveRingMulti(value) {
|
|
489
|
+
const num = Number(value);
|
|
490
|
+
if (!Number.isNaN(num) && num >= 0) {
|
|
491
|
+
return [{ property: "outline", value: `${num}px solid var(--color-ring)` }];
|
|
492
|
+
}
|
|
493
|
+
return [{ property: "outline-color", value: resolveColor(value, "ring") }];
|
|
494
|
+
}
|
|
495
|
+
function resolveRaw(value, property) {
|
|
496
|
+
if (property === "border-r" || property === "border-l" || property === "border-t" || property === "border-b") {
|
|
497
|
+
const num = Number(value);
|
|
498
|
+
if (!Number.isNaN(num))
|
|
499
|
+
return `${num}px`;
|
|
500
|
+
return value;
|
|
501
|
+
}
|
|
502
|
+
if (property === "transition") {
|
|
503
|
+
const TIMING = "150ms cubic-bezier(0.4, 0, 0.2, 1)";
|
|
504
|
+
const COLOR_PROPS = [
|
|
505
|
+
"color",
|
|
506
|
+
"background-color",
|
|
507
|
+
"border-color",
|
|
508
|
+
"outline-color",
|
|
509
|
+
"text-decoration-color",
|
|
510
|
+
"fill",
|
|
511
|
+
"stroke"
|
|
512
|
+
];
|
|
513
|
+
const TRANSITION_MAP = {
|
|
514
|
+
none: "none",
|
|
515
|
+
all: `all ${TIMING}`,
|
|
516
|
+
colors: COLOR_PROPS.map((p) => `${p} ${TIMING}`).join(", "),
|
|
517
|
+
shadow: `box-shadow ${TIMING}`,
|
|
518
|
+
transform: `transform ${TIMING}`,
|
|
519
|
+
opacity: `opacity ${TIMING}`
|
|
520
|
+
};
|
|
521
|
+
return TRANSITION_MAP[value] ?? value;
|
|
522
|
+
}
|
|
523
|
+
if (property === "tracking") {
|
|
524
|
+
const TRACKING_MAP = {
|
|
525
|
+
tighter: "-0.05em",
|
|
526
|
+
tight: "-0.025em",
|
|
527
|
+
normal: "0em",
|
|
528
|
+
wide: "0.025em",
|
|
529
|
+
wider: "0.05em",
|
|
530
|
+
widest: "0.1em"
|
|
531
|
+
};
|
|
532
|
+
return TRACKING_MAP[value] ?? value;
|
|
533
|
+
}
|
|
534
|
+
if (property === "grid-cols") {
|
|
535
|
+
const num = Number(value);
|
|
536
|
+
if (!Number.isNaN(num) && num > 0)
|
|
537
|
+
return `repeat(${num}, minmax(0, 1fr))`;
|
|
538
|
+
return value;
|
|
539
|
+
}
|
|
540
|
+
if (property === "inset") {
|
|
541
|
+
const spaced = SPACING_SCALE[value];
|
|
542
|
+
if (spaced !== undefined)
|
|
543
|
+
return spaced;
|
|
544
|
+
return value;
|
|
545
|
+
}
|
|
546
|
+
return value;
|
|
547
|
+
}
|
|
548
|
+
function formatShorthand(parsed) {
|
|
549
|
+
const parts = [];
|
|
550
|
+
if (parsed.pseudo)
|
|
551
|
+
parts.push(parsed.pseudo);
|
|
552
|
+
parts.push(parsed.property);
|
|
553
|
+
if (parsed.value)
|
|
554
|
+
parts.push(parsed.value);
|
|
555
|
+
return parts.join(":");
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
// src/css/css.ts
|
|
559
|
+
var DEFAULT_FILE_PATH = "__runtime__";
|
|
560
|
+
var injectedCSS = new Set;
|
|
561
|
+
function injectCSS(cssText) {
|
|
562
|
+
if (!cssText || typeof document === "undefined" || injectedCSS.has(cssText))
|
|
563
|
+
return;
|
|
564
|
+
injectedCSS.add(cssText);
|
|
565
|
+
const style = document.createElement("style");
|
|
566
|
+
style.setAttribute("data-vertz-css", "");
|
|
567
|
+
style.textContent = cssText;
|
|
568
|
+
document.head.appendChild(style);
|
|
569
|
+
}
|
|
570
|
+
function css(input, filePath = DEFAULT_FILE_PATH) {
|
|
571
|
+
const classNames = {};
|
|
572
|
+
const cssRules = [];
|
|
573
|
+
for (const [blockName, entries] of Object.entries(input)) {
|
|
574
|
+
const className = generateClassName(filePath, blockName);
|
|
575
|
+
classNames[blockName] = className;
|
|
576
|
+
const baseDeclarations = [];
|
|
577
|
+
const pseudoDeclarations = new Map;
|
|
578
|
+
const nestedRules = [];
|
|
579
|
+
for (const entry of entries) {
|
|
580
|
+
if (typeof entry === "string") {
|
|
581
|
+
const parsed = parseShorthand(entry);
|
|
582
|
+
const resolved = resolveToken(parsed);
|
|
583
|
+
if (resolved.pseudo) {
|
|
584
|
+
const existing = pseudoDeclarations.get(resolved.pseudo) ?? [];
|
|
585
|
+
existing.push(...resolved.declarations);
|
|
586
|
+
pseudoDeclarations.set(resolved.pseudo, existing);
|
|
587
|
+
} else {
|
|
588
|
+
baseDeclarations.push(...resolved.declarations);
|
|
589
|
+
}
|
|
590
|
+
} else {
|
|
591
|
+
for (const [selector, nestedEntries] of Object.entries(entry)) {
|
|
592
|
+
const nestedDecls = [];
|
|
593
|
+
for (const nestedEntry of nestedEntries) {
|
|
594
|
+
const parsed = parseShorthand(nestedEntry);
|
|
595
|
+
const resolved = resolveToken(parsed);
|
|
596
|
+
nestedDecls.push(...resolved.declarations);
|
|
597
|
+
}
|
|
598
|
+
const resolvedSelector = selector.replace("&", `.${className}`);
|
|
599
|
+
nestedRules.push(formatRule(resolvedSelector, nestedDecls));
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
if (baseDeclarations.length > 0) {
|
|
604
|
+
cssRules.push(formatRule(`.${className}`, baseDeclarations));
|
|
605
|
+
}
|
|
606
|
+
for (const [pseudo, declarations] of pseudoDeclarations) {
|
|
607
|
+
cssRules.push(formatRule(`.${className}${pseudo}`, declarations));
|
|
608
|
+
}
|
|
609
|
+
cssRules.push(...nestedRules);
|
|
610
|
+
}
|
|
611
|
+
const cssText = cssRules.join(`
|
|
612
|
+
`);
|
|
613
|
+
injectCSS(cssText);
|
|
614
|
+
return {
|
|
615
|
+
classNames,
|
|
616
|
+
css: cssText
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
function formatRule(selector, declarations) {
|
|
620
|
+
const props = declarations.map((d) => ` ${d.property}: ${d.value};`).join(`
|
|
621
|
+
`);
|
|
622
|
+
return `${selector} {
|
|
623
|
+
${props}
|
|
624
|
+
}`;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
// src/css/global-css.ts
|
|
628
|
+
function globalCss(input) {
|
|
629
|
+
const rules = [];
|
|
630
|
+
for (const [selector, properties] of Object.entries(input)) {
|
|
631
|
+
const declarations = Object.entries(properties).map(([prop, value]) => {
|
|
632
|
+
const cssProperty = prop.startsWith("--") ? prop : camelToKebab(prop);
|
|
633
|
+
return ` ${cssProperty}: ${value};`;
|
|
634
|
+
}).join(`
|
|
635
|
+
`);
|
|
636
|
+
rules.push(`${selector} {
|
|
637
|
+
${declarations}
|
|
638
|
+
}`);
|
|
639
|
+
}
|
|
640
|
+
const cssText = rules.join(`
|
|
641
|
+
`);
|
|
642
|
+
injectCSS(cssText);
|
|
643
|
+
return {
|
|
644
|
+
css: cssText
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
function camelToKebab(str) {
|
|
648
|
+
return str.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
// src/css/s.ts
|
|
652
|
+
function s(entries) {
|
|
653
|
+
const styles = {};
|
|
654
|
+
for (const entry of entries) {
|
|
655
|
+
const parsed = parseShorthand(entry);
|
|
656
|
+
if (parsed.pseudo) {
|
|
657
|
+
throw new InlineStyleError(`Pseudo-state '${parsed.pseudo}' is not supported in inline styles. Use css() instead.`, entry);
|
|
658
|
+
}
|
|
659
|
+
const resolved = resolveToken(parsed);
|
|
660
|
+
for (const decl of resolved.declarations) {
|
|
661
|
+
styles[kebabToCamel(decl.property)] = decl.value;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
return styles;
|
|
665
|
+
}
|
|
666
|
+
function kebabToCamel(str) {
|
|
667
|
+
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
class InlineStyleError extends Error {
|
|
671
|
+
entry;
|
|
672
|
+
constructor(message, entry) {
|
|
673
|
+
super(message);
|
|
674
|
+
this.name = "InlineStyleError";
|
|
675
|
+
this.entry = entry;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// src/css/theme.ts
|
|
680
|
+
function defineTheme(input) {
|
|
681
|
+
return {
|
|
682
|
+
colors: input.colors,
|
|
683
|
+
spacing: input.spacing
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
function compileTheme(theme) {
|
|
687
|
+
const rootVars = [];
|
|
688
|
+
const darkVars = [];
|
|
689
|
+
const tokenPaths = [];
|
|
690
|
+
for (const [name, values] of Object.entries(theme.colors)) {
|
|
691
|
+
for (const [key, value] of Object.entries(values)) {
|
|
692
|
+
if (key === "DEFAULT") {
|
|
693
|
+
const varName = `--color-${name}`;
|
|
694
|
+
rootVars.push(` ${varName}: ${value};`);
|
|
695
|
+
tokenPaths.push(name);
|
|
696
|
+
} else if (key.startsWith("_")) {
|
|
697
|
+
const variant = key.slice(1);
|
|
698
|
+
const varName = `--color-${name}`;
|
|
699
|
+
if (variant === "dark") {
|
|
700
|
+
darkVars.push(` ${varName}: ${value};`);
|
|
701
|
+
}
|
|
702
|
+
} else {
|
|
703
|
+
const varName = `--color-${name}-${key}`;
|
|
704
|
+
rootVars.push(` ${varName}: ${value};`);
|
|
705
|
+
tokenPaths.push(`${name}.${key}`);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
if (theme.spacing) {
|
|
710
|
+
for (const [name, value] of Object.entries(theme.spacing)) {
|
|
711
|
+
const varName = `--spacing-${name}`;
|
|
712
|
+
rootVars.push(` ${varName}: ${value};`);
|
|
713
|
+
tokenPaths.push(`spacing.${name}`);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
const blocks = [];
|
|
717
|
+
if (rootVars.length > 0) {
|
|
718
|
+
blocks.push(`:root {
|
|
719
|
+
${rootVars.join(`
|
|
720
|
+
`)}
|
|
721
|
+
}`);
|
|
722
|
+
}
|
|
723
|
+
if (darkVars.length > 0) {
|
|
724
|
+
blocks.push(`[data-theme="dark"] {
|
|
725
|
+
${darkVars.join(`
|
|
726
|
+
`)}
|
|
727
|
+
}`);
|
|
728
|
+
}
|
|
729
|
+
return {
|
|
730
|
+
css: blocks.join(`
|
|
731
|
+
`),
|
|
732
|
+
tokens: tokenPaths
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
// src/css/theme-provider.ts
|
|
737
|
+
function ThemeProvider(props) {
|
|
738
|
+
const { theme = "light", children } = props;
|
|
739
|
+
const el = document.createElement("div");
|
|
740
|
+
el.setAttribute("data-theme", theme);
|
|
741
|
+
for (const child of children) {
|
|
742
|
+
if (typeof child === "string") {
|
|
743
|
+
el.appendChild(document.createTextNode(child));
|
|
744
|
+
} else {
|
|
745
|
+
el.appendChild(child);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
return el;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// src/css/variants.ts
|
|
752
|
+
function deriveConfigKey(config) {
|
|
753
|
+
const parts = [];
|
|
754
|
+
for (const entry of config.base) {
|
|
755
|
+
parts.push(typeof entry === "string" ? entry : JSON.stringify(entry));
|
|
756
|
+
}
|
|
757
|
+
const variantNames = Object.keys(config.variants).sort();
|
|
758
|
+
for (const variantName of variantNames) {
|
|
759
|
+
const options = config.variants[variantName];
|
|
760
|
+
if (!options)
|
|
761
|
+
continue;
|
|
762
|
+
const optionNames = Object.keys(options).sort();
|
|
763
|
+
for (const optionName of optionNames) {
|
|
764
|
+
const styles = options[optionName];
|
|
765
|
+
if (!styles)
|
|
766
|
+
continue;
|
|
767
|
+
parts.push(`${variantName}:${optionName}=${styles.map((s2) => typeof s2 === "string" ? s2 : JSON.stringify(s2)).join(",")}`);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
return `__variants__${parts.join("|")}`;
|
|
771
|
+
}
|
|
772
|
+
function variants(config) {
|
|
773
|
+
const { base, variants: variantDefs, defaultVariants, compoundVariants } = config;
|
|
774
|
+
const filePath = deriveConfigKey(config);
|
|
775
|
+
const baseResult = base.length > 0 ? css({ base }, filePath) : { classNames: {}, css: "" };
|
|
776
|
+
const variantResults = {};
|
|
777
|
+
for (const [variantName, options] of Object.entries(variantDefs)) {
|
|
778
|
+
variantResults[variantName] = {};
|
|
779
|
+
for (const [optionName, styles] of Object.entries(options)) {
|
|
780
|
+
if (styles.length > 0) {
|
|
781
|
+
const blockName = `${variantName}_${optionName}`;
|
|
782
|
+
const result = css({ [blockName]: styles }, filePath);
|
|
783
|
+
const className = result.classNames[blockName];
|
|
784
|
+
if (className) {
|
|
785
|
+
variantResults[variantName][optionName] = {
|
|
786
|
+
className,
|
|
787
|
+
css: result.css
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
const compoundResults = [];
|
|
794
|
+
if (compoundVariants) {
|
|
795
|
+
for (let i = 0;i < compoundVariants.length; i++) {
|
|
796
|
+
const compound = compoundVariants[i];
|
|
797
|
+
if (!compound)
|
|
798
|
+
continue;
|
|
799
|
+
const { styles, ...conditions } = compound;
|
|
800
|
+
if (styles.length > 0) {
|
|
801
|
+
const blockName = `compound_${i}`;
|
|
802
|
+
const result = css({ [blockName]: styles }, filePath);
|
|
803
|
+
const className = result.classNames[blockName];
|
|
804
|
+
if (className) {
|
|
805
|
+
compoundResults.push({
|
|
806
|
+
conditions,
|
|
807
|
+
className,
|
|
808
|
+
css: result.css
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
const allCss = [];
|
|
815
|
+
if (baseResult.css)
|
|
816
|
+
allCss.push(baseResult.css);
|
|
817
|
+
for (const options of Object.values(variantResults)) {
|
|
818
|
+
for (const result of Object.values(options)) {
|
|
819
|
+
if (result.css)
|
|
820
|
+
allCss.push(result.css);
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
for (const result of compoundResults) {
|
|
824
|
+
if (result.css)
|
|
825
|
+
allCss.push(result.css);
|
|
826
|
+
}
|
|
827
|
+
const fn = (props) => {
|
|
828
|
+
const classNames = [];
|
|
829
|
+
const baseClassName = baseResult.classNames.base;
|
|
830
|
+
if (baseClassName) {
|
|
831
|
+
classNames.push(baseClassName);
|
|
832
|
+
}
|
|
833
|
+
const resolved = {};
|
|
834
|
+
if (defaultVariants) {
|
|
835
|
+
for (const [key, value] of Object.entries(defaultVariants)) {
|
|
836
|
+
if (value !== undefined) {
|
|
837
|
+
resolved[key] = String(value);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
if (props) {
|
|
842
|
+
for (const [key, value] of Object.entries(props)) {
|
|
843
|
+
if (value !== undefined) {
|
|
844
|
+
resolved[key] = String(value);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
for (const [variantName, optionName] of Object.entries(resolved)) {
|
|
849
|
+
const variantGroup = variantResults[variantName];
|
|
850
|
+
if (variantGroup) {
|
|
851
|
+
const result = variantGroup[optionName];
|
|
852
|
+
if (result) {
|
|
853
|
+
classNames.push(result.className);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
for (const compound of compoundResults) {
|
|
858
|
+
const matches = Object.entries(compound.conditions).every(([key, value]) => {
|
|
859
|
+
return resolved[key] === String(value);
|
|
860
|
+
});
|
|
861
|
+
if (matches) {
|
|
862
|
+
classNames.push(compound.className);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
return classNames.join(" ");
|
|
866
|
+
};
|
|
867
|
+
fn.css = allCss.join(`
|
|
868
|
+
`);
|
|
869
|
+
return fn;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
export { PROPERTY_MAP, KEYWORD_MAP, DISPLAY_MAP, SPACING_SCALE, RADIUS_SCALE, SHADOW_SCALE, FONT_SIZE_SCALE, FONT_WEIGHT_SCALE, LINE_HEIGHT_SCALE, ALIGNMENT_MAP, SIZE_KEYWORDS, HEIGHT_AXIS_PROPERTIES, COLOR_NAMESPACES, CSS_COLOR_KEYWORDS, CONTENT_MAP, PSEUDO_PREFIXES, PSEUDO_MAP, css, globalCss, s, defineTheme, compileTheme, ThemeProvider, variants };
|