typewritingclass 0.3.2 → 0.3.4
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 +48 -5
- package/dist/index.cjs +471 -76
- package/dist/index.d.cts +156 -729
- package/dist/index.d.ts +156 -729
- package/dist/index.js +538 -143
- package/dist/rule.d.cts +1 -1
- package/dist/rule.d.ts +1 -1
- package/dist/runtime.d.cts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/{types-C2b7lqJA.d.cts → types-B-eG4WLT.d.cts} +170 -1
- package/dist/{types-C2b7lqJA.d.ts → types-B-eG4WLT.d.ts} +170 -1
- package/package.json +5 -3
- package/preflight.css +203 -0
package/dist/index.js
CHANGED
|
@@ -47,33 +47,55 @@ import {
|
|
|
47
47
|
zinc
|
|
48
48
|
} from "./chunk-XEHQXLQR.js";
|
|
49
49
|
import {
|
|
50
|
+
_2xl,
|
|
51
|
+
_3xl,
|
|
52
|
+
_4xl,
|
|
53
|
+
_5xl,
|
|
54
|
+
_6xl,
|
|
55
|
+
_7xl,
|
|
56
|
+
_8xl,
|
|
57
|
+
_9xl,
|
|
58
|
+
base,
|
|
59
|
+
black_,
|
|
60
|
+
bold,
|
|
61
|
+
extrabold,
|
|
62
|
+
extralight,
|
|
50
63
|
fontFamilies,
|
|
51
64
|
letterSpacings,
|
|
52
|
-
|
|
65
|
+
lg,
|
|
66
|
+
light,
|
|
67
|
+
lineHeights,
|
|
68
|
+
medium,
|
|
69
|
+
normal,
|
|
70
|
+
semibold,
|
|
71
|
+
sm,
|
|
72
|
+
thin,
|
|
73
|
+
xl,
|
|
74
|
+
xs
|
|
53
75
|
} from "./chunk-LARVCDO3.js";
|
|
54
76
|
import {
|
|
55
77
|
maxWidths
|
|
56
78
|
} from "./chunk-U2LSMKZS.js";
|
|
57
79
|
import {
|
|
58
80
|
DEFAULT as DEFAULT2,
|
|
59
|
-
_2xl as
|
|
81
|
+
_2xl as _2xl3,
|
|
60
82
|
inner,
|
|
61
|
-
lg as
|
|
83
|
+
lg as lg3,
|
|
62
84
|
md as md2,
|
|
63
85
|
none as none2,
|
|
64
|
-
sm as
|
|
65
|
-
xl as
|
|
86
|
+
sm as sm3,
|
|
87
|
+
xl as xl3
|
|
66
88
|
} from "./chunk-IL3LVS32.js";
|
|
67
89
|
import {
|
|
68
90
|
DEFAULT,
|
|
69
|
-
_2xl,
|
|
70
|
-
_3xl,
|
|
91
|
+
_2xl as _2xl2,
|
|
92
|
+
_3xl as _3xl2,
|
|
71
93
|
full,
|
|
72
|
-
lg,
|
|
94
|
+
lg as lg2,
|
|
73
95
|
md,
|
|
74
96
|
none,
|
|
75
|
-
sm,
|
|
76
|
-
xl
|
|
97
|
+
sm as sm2,
|
|
98
|
+
xl as xl2
|
|
77
99
|
} from "./chunk-YHDPOIUZ.js";
|
|
78
100
|
import {
|
|
79
101
|
createTheme
|
|
@@ -129,7 +151,7 @@ function cx(...args) {
|
|
|
129
151
|
function _cxCore(args) {
|
|
130
152
|
return args.map((arg) => {
|
|
131
153
|
if (typeof arg === "string") return arg;
|
|
132
|
-
if (typeof arg === "function") return String(arg);
|
|
154
|
+
if (typeof arg === "function" && arg._tag !== "StyleRule") return String(arg);
|
|
133
155
|
const layerNum = arg._layer ?? nextLayer();
|
|
134
156
|
const className = generateHash(arg, layerNum);
|
|
135
157
|
register(className, arg, layerNum);
|
|
@@ -230,6 +252,340 @@ function isDynamic(v) {
|
|
|
230
252
|
return typeof v === "object" && v !== null && "_tag" in v && v._tag === "DynamicValue";
|
|
231
253
|
}
|
|
232
254
|
|
|
255
|
+
// src/tokens.ts
|
|
256
|
+
var colorScaleNames = [
|
|
257
|
+
"slate",
|
|
258
|
+
"gray",
|
|
259
|
+
"zinc",
|
|
260
|
+
"neutral",
|
|
261
|
+
"stone",
|
|
262
|
+
"red",
|
|
263
|
+
"orange",
|
|
264
|
+
"amber",
|
|
265
|
+
"yellow",
|
|
266
|
+
"lime",
|
|
267
|
+
"green",
|
|
268
|
+
"emerald",
|
|
269
|
+
"teal",
|
|
270
|
+
"cyan",
|
|
271
|
+
"sky",
|
|
272
|
+
"blue",
|
|
273
|
+
"indigo",
|
|
274
|
+
"violet",
|
|
275
|
+
"purple",
|
|
276
|
+
"fuchsia",
|
|
277
|
+
"pink",
|
|
278
|
+
"rose"
|
|
279
|
+
];
|
|
280
|
+
var shades = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"];
|
|
281
|
+
var colorTokens = {};
|
|
282
|
+
for (const name of colorScaleNames) {
|
|
283
|
+
for (const shade of shades) {
|
|
284
|
+
colorTokens[`${name}${shade}`] = `${name}-${shade}`;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
colorTokens["white"] = "white";
|
|
288
|
+
colorTokens["black"] = "black";
|
|
289
|
+
colorTokens["transparent"] = "transparent";
|
|
290
|
+
colorTokens["current"] = "current";
|
|
291
|
+
var radiusTokens = {
|
|
292
|
+
sm: "sm",
|
|
293
|
+
md: "md",
|
|
294
|
+
lg: "lg",
|
|
295
|
+
xl: "xl",
|
|
296
|
+
_2xl: "2xl",
|
|
297
|
+
_3xl: "3xl",
|
|
298
|
+
full: "full",
|
|
299
|
+
none: "none"
|
|
300
|
+
};
|
|
301
|
+
var shadowTokens = {
|
|
302
|
+
sm: "sm",
|
|
303
|
+
md: "md",
|
|
304
|
+
lg: "lg",
|
|
305
|
+
xl: "xl",
|
|
306
|
+
_2xl: "2xl",
|
|
307
|
+
inner: "inner",
|
|
308
|
+
none: "none"
|
|
309
|
+
};
|
|
310
|
+
var textSizeTokens = {
|
|
311
|
+
xs,
|
|
312
|
+
sm,
|
|
313
|
+
base,
|
|
314
|
+
lg,
|
|
315
|
+
xl,
|
|
316
|
+
_2xl,
|
|
317
|
+
_3xl,
|
|
318
|
+
_4xl,
|
|
319
|
+
_5xl,
|
|
320
|
+
_6xl,
|
|
321
|
+
_7xl,
|
|
322
|
+
_8xl,
|
|
323
|
+
_9xl
|
|
324
|
+
};
|
|
325
|
+
var fontWeightTokens = {
|
|
326
|
+
thin,
|
|
327
|
+
extralight,
|
|
328
|
+
light,
|
|
329
|
+
normal,
|
|
330
|
+
medium,
|
|
331
|
+
semibold,
|
|
332
|
+
bold,
|
|
333
|
+
extrabold,
|
|
334
|
+
black: black_
|
|
335
|
+
};
|
|
336
|
+
var trackingTokens = {
|
|
337
|
+
tighter: "tighter",
|
|
338
|
+
tight: "tight",
|
|
339
|
+
normal: "normal",
|
|
340
|
+
wide: "wide",
|
|
341
|
+
wider: "wider",
|
|
342
|
+
widest: "widest"
|
|
343
|
+
};
|
|
344
|
+
var leadingTokens = {
|
|
345
|
+
none: "none",
|
|
346
|
+
tight: "tight",
|
|
347
|
+
snug: "snug",
|
|
348
|
+
normal: "normal",
|
|
349
|
+
relaxed: "relaxed",
|
|
350
|
+
loose: "loose",
|
|
351
|
+
_3: "3",
|
|
352
|
+
_4: "4",
|
|
353
|
+
_5: "5",
|
|
354
|
+
_6: "6",
|
|
355
|
+
_7: "7",
|
|
356
|
+
_8: "8",
|
|
357
|
+
_9: "9",
|
|
358
|
+
_10: "10"
|
|
359
|
+
};
|
|
360
|
+
var fontFamilyTokens = {
|
|
361
|
+
sans: "sans",
|
|
362
|
+
serif: "serif",
|
|
363
|
+
mono: "mono"
|
|
364
|
+
};
|
|
365
|
+
var alignItemsTokens = {
|
|
366
|
+
center: "center",
|
|
367
|
+
start: "flex-start",
|
|
368
|
+
end: "flex-end",
|
|
369
|
+
baseline: "baseline",
|
|
370
|
+
stretch: "stretch"
|
|
371
|
+
};
|
|
372
|
+
var justifyTokens = {
|
|
373
|
+
center: "center",
|
|
374
|
+
start: "flex-start",
|
|
375
|
+
end: "flex-end",
|
|
376
|
+
between: "space-between",
|
|
377
|
+
around: "space-around",
|
|
378
|
+
evenly: "space-evenly",
|
|
379
|
+
stretch: "stretch"
|
|
380
|
+
};
|
|
381
|
+
var displayTokens = {
|
|
382
|
+
block: "block",
|
|
383
|
+
inline: "inline",
|
|
384
|
+
inlineBlock: "inline-block",
|
|
385
|
+
flex: "flex",
|
|
386
|
+
inlineFlex: "inline-flex",
|
|
387
|
+
grid: "grid",
|
|
388
|
+
inlineGrid: "inline-grid",
|
|
389
|
+
none: "none",
|
|
390
|
+
contents: "contents",
|
|
391
|
+
table: "table",
|
|
392
|
+
flowRoot: "flow-root"
|
|
393
|
+
};
|
|
394
|
+
var overflowTokens = {
|
|
395
|
+
auto: "auto",
|
|
396
|
+
hidden: "hidden",
|
|
397
|
+
visible: "visible",
|
|
398
|
+
scroll: "scroll",
|
|
399
|
+
clip: "clip"
|
|
400
|
+
};
|
|
401
|
+
var cursorTokens = {
|
|
402
|
+
auto: "auto",
|
|
403
|
+
default: "default",
|
|
404
|
+
pointer: "pointer",
|
|
405
|
+
wait: "wait",
|
|
406
|
+
text: "text",
|
|
407
|
+
move: "move",
|
|
408
|
+
help: "help",
|
|
409
|
+
notAllowed: "not-allowed",
|
|
410
|
+
none: "none",
|
|
411
|
+
progress: "progress",
|
|
412
|
+
cell: "cell",
|
|
413
|
+
crosshair: "crosshair",
|
|
414
|
+
grab: "grab",
|
|
415
|
+
grabbing: "grabbing",
|
|
416
|
+
colResize: "col-resize",
|
|
417
|
+
rowResize: "row-resize",
|
|
418
|
+
noDrop: "no-drop",
|
|
419
|
+
zoomIn: "zoom-in",
|
|
420
|
+
zoomOut: "zoom-out"
|
|
421
|
+
};
|
|
422
|
+
var textAlignTokens = {
|
|
423
|
+
left: "left",
|
|
424
|
+
center: "center",
|
|
425
|
+
right: "right",
|
|
426
|
+
justify: "justify",
|
|
427
|
+
start: "start",
|
|
428
|
+
end: "end"
|
|
429
|
+
};
|
|
430
|
+
var objectFitTokens = {
|
|
431
|
+
contain: "contain",
|
|
432
|
+
cover: "cover",
|
|
433
|
+
fill: "fill",
|
|
434
|
+
none: "none",
|
|
435
|
+
scaleDown: "scale-down"
|
|
436
|
+
};
|
|
437
|
+
var selfTokens = {
|
|
438
|
+
auto: "auto",
|
|
439
|
+
start: "flex-start",
|
|
440
|
+
end: "flex-end",
|
|
441
|
+
center: "center",
|
|
442
|
+
stretch: "stretch",
|
|
443
|
+
baseline: "baseline"
|
|
444
|
+
};
|
|
445
|
+
var textWrapTokens = {
|
|
446
|
+
wrap: "wrap",
|
|
447
|
+
nowrap: "nowrap",
|
|
448
|
+
balance: "balance",
|
|
449
|
+
pretty: "pretty"
|
|
450
|
+
};
|
|
451
|
+
var textOverflowTokens = {
|
|
452
|
+
ellipsis: "ellipsis",
|
|
453
|
+
clip: "clip"
|
|
454
|
+
};
|
|
455
|
+
var textTransformTokens = {
|
|
456
|
+
uppercase: "uppercase",
|
|
457
|
+
lowercase: "lowercase",
|
|
458
|
+
capitalize: "capitalize",
|
|
459
|
+
none: "none"
|
|
460
|
+
};
|
|
461
|
+
var UTIL_TOKENS = {
|
|
462
|
+
// Color utilities
|
|
463
|
+
bg: { tokens: colorTokens, supportsOpacity: true },
|
|
464
|
+
textColor: { tokens: colorTokens, supportsOpacity: true },
|
|
465
|
+
borderColor: { tokens: colorTokens, supportsOpacity: true },
|
|
466
|
+
shadowColor: { tokens: colorTokens, supportsOpacity: true },
|
|
467
|
+
ringColor: { tokens: colorTokens, supportsOpacity: true },
|
|
468
|
+
outlineColor: { tokens: colorTokens, supportsOpacity: true },
|
|
469
|
+
accentColor: { tokens: colorTokens, supportsOpacity: true },
|
|
470
|
+
caretColor: { tokens: colorTokens, supportsOpacity: true },
|
|
471
|
+
divideColor: { tokens: colorTokens, supportsOpacity: true },
|
|
472
|
+
textDecorationColor: { tokens: colorTokens, supportsOpacity: true },
|
|
473
|
+
gradientFrom: { tokens: colorTokens },
|
|
474
|
+
gradientVia: { tokens: colorTokens },
|
|
475
|
+
gradientTo: { tokens: colorTokens },
|
|
476
|
+
// Radius utilities
|
|
477
|
+
rounded: { tokens: radiusTokens },
|
|
478
|
+
roundedT: { tokens: radiusTokens },
|
|
479
|
+
roundedB: { tokens: radiusTokens },
|
|
480
|
+
roundedL: { tokens: radiusTokens },
|
|
481
|
+
roundedR: { tokens: radiusTokens },
|
|
482
|
+
roundedTL: { tokens: radiusTokens },
|
|
483
|
+
roundedTR: { tokens: radiusTokens },
|
|
484
|
+
roundedBR: { tokens: radiusTokens },
|
|
485
|
+
roundedBL: { tokens: radiusTokens },
|
|
486
|
+
roundedSS: { tokens: radiusTokens },
|
|
487
|
+
roundedSE: { tokens: radiusTokens },
|
|
488
|
+
roundedEE: { tokens: radiusTokens },
|
|
489
|
+
roundedES: { tokens: radiusTokens },
|
|
490
|
+
// Shadow
|
|
491
|
+
shadow: { tokens: shadowTokens },
|
|
492
|
+
// Typography
|
|
493
|
+
text: { tokens: textSizeTokens },
|
|
494
|
+
font: { tokens: fontWeightTokens },
|
|
495
|
+
tracking: { tokens: trackingTokens },
|
|
496
|
+
leading: { tokens: leadingTokens },
|
|
497
|
+
fontFamily: { tokens: fontFamilyTokens },
|
|
498
|
+
// Layout enums
|
|
499
|
+
items: { tokens: alignItemsTokens },
|
|
500
|
+
justify: { tokens: justifyTokens },
|
|
501
|
+
display: { tokens: displayTokens },
|
|
502
|
+
overflow: { tokens: overflowTokens },
|
|
503
|
+
overflowX: { tokens: overflowTokens },
|
|
504
|
+
overflowY: { tokens: overflowTokens },
|
|
505
|
+
cursor: { tokens: cursorTokens },
|
|
506
|
+
textAlign: { tokens: textAlignTokens },
|
|
507
|
+
objectFit: { tokens: objectFitTokens },
|
|
508
|
+
self: { tokens: selfTokens },
|
|
509
|
+
textWrap: { tokens: textWrapTokens },
|
|
510
|
+
textOverflow: { tokens: textOverflowTokens },
|
|
511
|
+
textTransform: { tokens: textTransformTokens }
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
// src/utilities/colors.ts
|
|
515
|
+
var colorMap = {};
|
|
516
|
+
var colorScales = {
|
|
517
|
+
slate,
|
|
518
|
+
gray,
|
|
519
|
+
zinc,
|
|
520
|
+
neutral,
|
|
521
|
+
stone,
|
|
522
|
+
red,
|
|
523
|
+
orange,
|
|
524
|
+
amber,
|
|
525
|
+
yellow,
|
|
526
|
+
lime,
|
|
527
|
+
green,
|
|
528
|
+
emerald,
|
|
529
|
+
teal,
|
|
530
|
+
cyan,
|
|
531
|
+
sky,
|
|
532
|
+
blue,
|
|
533
|
+
indigo,
|
|
534
|
+
violet,
|
|
535
|
+
purple,
|
|
536
|
+
fuchsia,
|
|
537
|
+
pink,
|
|
538
|
+
rose
|
|
539
|
+
};
|
|
540
|
+
for (const [name, scale2] of Object.entries(colorScales)) {
|
|
541
|
+
for (const [shade, hex] of Object.entries(scale2)) {
|
|
542
|
+
colorMap[`${name}-${shade}`] = hex;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
colorMap["white"] = white;
|
|
546
|
+
colorMap["black"] = black;
|
|
547
|
+
colorMap["transparent"] = "transparent";
|
|
548
|
+
colorMap["current"] = "currentColor";
|
|
549
|
+
function resolveColor(value) {
|
|
550
|
+
return colorMap[value] ?? value;
|
|
551
|
+
}
|
|
552
|
+
function resolveColorWithOpacity(colorKey, opacity2) {
|
|
553
|
+
const hex = resolveColor(colorKey);
|
|
554
|
+
if (!/^#[0-9a-fA-F]{6}$/.test(hex)) return hex;
|
|
555
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
556
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
557
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
558
|
+
const alpha = opacity2 > 1 ? opacity2 / 100 : opacity2;
|
|
559
|
+
return `rgb(${r} ${g} ${b} / ${alpha})`;
|
|
560
|
+
}
|
|
561
|
+
function bg(color) {
|
|
562
|
+
if (isDynamic(color)) {
|
|
563
|
+
return createDynamicRule(
|
|
564
|
+
{ "background-color": `var(${color.__id})` },
|
|
565
|
+
{ [color.__id]: String(color.__value) }
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
return createRule({ "background-color": resolveColor(color) });
|
|
569
|
+
}
|
|
570
|
+
function textColor(color) {
|
|
571
|
+
if (isDynamic(color)) {
|
|
572
|
+
return createDynamicRule(
|
|
573
|
+
{ color: `var(${color.__id})` },
|
|
574
|
+
{ [color.__id]: String(color.__value) }
|
|
575
|
+
);
|
|
576
|
+
}
|
|
577
|
+
return createRule({ color: resolveColor(color) });
|
|
578
|
+
}
|
|
579
|
+
function borderColor(color) {
|
|
580
|
+
if (isDynamic(color)) {
|
|
581
|
+
return createDynamicRule(
|
|
582
|
+
{ "border-color": `var(${color.__id})` },
|
|
583
|
+
{ [color.__id]: String(color.__value) }
|
|
584
|
+
);
|
|
585
|
+
}
|
|
586
|
+
return createRule({ "border-color": resolveColor(color) });
|
|
587
|
+
}
|
|
588
|
+
|
|
233
589
|
// src/utilities/spacing.ts
|
|
234
590
|
function sp(value) {
|
|
235
591
|
if (isDynamic(value)) return value;
|
|
@@ -336,72 +692,6 @@ function spaceYReverse() {
|
|
|
336
692
|
return wrapWithSelectorTemplate(rule, "& > :not([hidden]) ~ :not([hidden])");
|
|
337
693
|
}
|
|
338
694
|
|
|
339
|
-
// src/utilities/colors.ts
|
|
340
|
-
var colorMap = {};
|
|
341
|
-
var colorScales = {
|
|
342
|
-
slate,
|
|
343
|
-
gray,
|
|
344
|
-
zinc,
|
|
345
|
-
neutral,
|
|
346
|
-
stone,
|
|
347
|
-
red,
|
|
348
|
-
orange,
|
|
349
|
-
amber,
|
|
350
|
-
yellow,
|
|
351
|
-
lime,
|
|
352
|
-
green,
|
|
353
|
-
emerald,
|
|
354
|
-
teal,
|
|
355
|
-
cyan,
|
|
356
|
-
sky,
|
|
357
|
-
blue,
|
|
358
|
-
indigo,
|
|
359
|
-
violet,
|
|
360
|
-
purple,
|
|
361
|
-
fuchsia,
|
|
362
|
-
pink,
|
|
363
|
-
rose
|
|
364
|
-
};
|
|
365
|
-
for (const [name, scale2] of Object.entries(colorScales)) {
|
|
366
|
-
for (const [shade, hex] of Object.entries(scale2)) {
|
|
367
|
-
colorMap[`${name}-${shade}`] = hex;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
colorMap["white"] = white;
|
|
371
|
-
colorMap["black"] = black;
|
|
372
|
-
colorMap["transparent"] = "transparent";
|
|
373
|
-
colorMap["current"] = "currentColor";
|
|
374
|
-
function resolveColor(value) {
|
|
375
|
-
return colorMap[value] ?? value;
|
|
376
|
-
}
|
|
377
|
-
function bg(color) {
|
|
378
|
-
if (isDynamic(color)) {
|
|
379
|
-
return createDynamicRule(
|
|
380
|
-
{ "background-color": `var(${color.__id})` },
|
|
381
|
-
{ [color.__id]: String(color.__value) }
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
return createRule({ "background-color": resolveColor(color) });
|
|
385
|
-
}
|
|
386
|
-
function textColor(color) {
|
|
387
|
-
if (isDynamic(color)) {
|
|
388
|
-
return createDynamicRule(
|
|
389
|
-
{ color: `var(${color.__id})` },
|
|
390
|
-
{ [color.__id]: String(color.__value) }
|
|
391
|
-
);
|
|
392
|
-
}
|
|
393
|
-
return createRule({ color: resolveColor(color) });
|
|
394
|
-
}
|
|
395
|
-
function borderColor(color) {
|
|
396
|
-
if (isDynamic(color)) {
|
|
397
|
-
return createDynamicRule(
|
|
398
|
-
{ "border-color": `var(${color.__id})` },
|
|
399
|
-
{ [color.__id]: String(color.__value) }
|
|
400
|
-
);
|
|
401
|
-
}
|
|
402
|
-
return createRule({ "border-color": resolveColor(color) });
|
|
403
|
-
}
|
|
404
|
-
|
|
405
695
|
// src/utilities/typography.ts
|
|
406
696
|
var trackingMap = { ...letterSpacings };
|
|
407
697
|
var leadingMap = { ...lineHeights };
|
|
@@ -939,13 +1229,13 @@ function px2(value) {
|
|
|
939
1229
|
}
|
|
940
1230
|
var radiusMap = {
|
|
941
1231
|
none,
|
|
942
|
-
sm,
|
|
1232
|
+
sm: sm2,
|
|
943
1233
|
DEFAULT,
|
|
944
1234
|
md,
|
|
945
|
-
lg,
|
|
946
|
-
xl,
|
|
947
|
-
"2xl":
|
|
948
|
-
"3xl":
|
|
1235
|
+
lg: lg2,
|
|
1236
|
+
xl: xl2,
|
|
1237
|
+
"2xl": _2xl2,
|
|
1238
|
+
"3xl": _3xl2,
|
|
949
1239
|
full
|
|
950
1240
|
};
|
|
951
1241
|
function resolveRadius(value) {
|
|
@@ -1202,12 +1492,12 @@ function divideYReverse() {
|
|
|
1202
1492
|
|
|
1203
1493
|
// src/utilities/effects.ts
|
|
1204
1494
|
var shadowMap = {
|
|
1205
|
-
sm:
|
|
1495
|
+
sm: sm3,
|
|
1206
1496
|
DEFAULT: DEFAULT2,
|
|
1207
1497
|
md: md2,
|
|
1208
|
-
lg:
|
|
1209
|
-
xl:
|
|
1210
|
-
"2xl":
|
|
1498
|
+
lg: lg3,
|
|
1499
|
+
xl: xl3,
|
|
1500
|
+
"2xl": _2xl3,
|
|
1211
1501
|
inner,
|
|
1212
1502
|
none: none2
|
|
1213
1503
|
};
|
|
@@ -1866,11 +2156,11 @@ function has_(selector) {
|
|
|
1866
2156
|
}
|
|
1867
2157
|
|
|
1868
2158
|
// src/modifiers/responsive.ts
|
|
1869
|
-
var
|
|
2159
|
+
var sm4 = (rule) => wrapWithMediaQuery(rule, "(min-width: 640px)");
|
|
1870
2160
|
var md3 = (rule) => wrapWithMediaQuery(rule, "(min-width: 768px)");
|
|
1871
|
-
var
|
|
1872
|
-
var
|
|
1873
|
-
var
|
|
2161
|
+
var lg4 = (rule) => wrapWithMediaQuery(rule, "(min-width: 1024px)");
|
|
2162
|
+
var xl4 = (rule) => wrapWithMediaQuery(rule, "(min-width: 1280px)");
|
|
2163
|
+
var _2xl4 = (rule) => wrapWithMediaQuery(rule, "(min-width: 1536px)");
|
|
1874
2164
|
var maxSm = (rule) => wrapWithMediaQuery(rule, "(max-width: 639px)");
|
|
1875
2165
|
var maxMd = (rule) => wrapWithMediaQuery(rule, "(max-width: 767px)");
|
|
1876
2166
|
var maxLg = (rule) => wrapWithMediaQuery(rule, "(max-width: 1023px)");
|
|
@@ -2328,11 +2618,11 @@ var MODS = {
|
|
|
2328
2618
|
target,
|
|
2329
2619
|
open: open_,
|
|
2330
2620
|
// Responsive
|
|
2331
|
-
sm:
|
|
2621
|
+
sm: sm4,
|
|
2332
2622
|
md: md3,
|
|
2333
|
-
lg:
|
|
2334
|
-
xl:
|
|
2335
|
-
_2xl:
|
|
2623
|
+
lg: lg4,
|
|
2624
|
+
xl: xl4,
|
|
2625
|
+
_2xl: _2xl4,
|
|
2336
2626
|
maxSm,
|
|
2337
2627
|
maxMd,
|
|
2338
2628
|
maxLg,
|
|
@@ -2490,9 +2780,38 @@ function createChain(rules, pendingMods) {
|
|
|
2490
2780
|
}
|
|
2491
2781
|
if (name in UTILS) {
|
|
2492
2782
|
const utilFn = UTILS[name];
|
|
2783
|
+
const tokenConfig = UTIL_TOKENS[name];
|
|
2493
2784
|
return new Proxy(function() {
|
|
2494
2785
|
}, {
|
|
2495
2786
|
get(_t, innerProp) {
|
|
2787
|
+
if (typeof innerProp === "symbol") {
|
|
2788
|
+
const rule2 = utilFn();
|
|
2789
|
+
const modified2 = applyMods(rule2, pendingMods);
|
|
2790
|
+
return createChain([...rules, modified2], [])[innerProp];
|
|
2791
|
+
}
|
|
2792
|
+
if (tokenConfig && innerProp in tokenConfig.tokens) {
|
|
2793
|
+
const tokenArg = tokenConfig.tokens[innerProp];
|
|
2794
|
+
if (tokenConfig.supportsOpacity) {
|
|
2795
|
+
const rule3 = utilFn(tokenArg);
|
|
2796
|
+
const modified3 = applyMods(rule3, pendingMods);
|
|
2797
|
+
const chainWithRule = createChain([...rules, modified3], []);
|
|
2798
|
+
return new Proxy(function() {
|
|
2799
|
+
}, {
|
|
2800
|
+
get(_t2, chainProp) {
|
|
2801
|
+
return chainWithRule[chainProp];
|
|
2802
|
+
},
|
|
2803
|
+
apply(_t2, _this2, args) {
|
|
2804
|
+
const colorWithOpacity = resolveColorWithOpacity(tokenArg, args[0]);
|
|
2805
|
+
const opacityRule = utilFn(colorWithOpacity);
|
|
2806
|
+
const modifiedOpacity = applyMods(opacityRule, pendingMods);
|
|
2807
|
+
return createChain([...rules, modifiedOpacity], []);
|
|
2808
|
+
}
|
|
2809
|
+
});
|
|
2810
|
+
}
|
|
2811
|
+
const rule2 = utilFn(tokenArg);
|
|
2812
|
+
const modified2 = applyMods(rule2, pendingMods);
|
|
2813
|
+
return createChain([...rules, modified2], []);
|
|
2814
|
+
}
|
|
2496
2815
|
const rule = utilFn();
|
|
2497
2816
|
const modified = applyMods(rule, pendingMods);
|
|
2498
2817
|
return createChain([...rules, modified], [])[innerProp];
|
|
@@ -2541,10 +2860,86 @@ function googleFonts(family, options) {
|
|
|
2541
2860
|
}
|
|
2542
2861
|
return family;
|
|
2543
2862
|
}
|
|
2863
|
+
|
|
2864
|
+
// src/standalone.ts
|
|
2865
|
+
function createStandaloneProxy(utilFn, config) {
|
|
2866
|
+
return new Proxy(utilFn, {
|
|
2867
|
+
get(_target, prop) {
|
|
2868
|
+
if (typeof prop === "symbol") return utilFn[prop];
|
|
2869
|
+
if (prop in config.tokens) {
|
|
2870
|
+
const tokenArg = config.tokens[prop];
|
|
2871
|
+
const rule = utilFn(tokenArg);
|
|
2872
|
+
if (config.supportsOpacity) {
|
|
2873
|
+
return new Proxy(function() {
|
|
2874
|
+
}, {
|
|
2875
|
+
get(_t, ruleProp) {
|
|
2876
|
+
return rule[ruleProp];
|
|
2877
|
+
},
|
|
2878
|
+
apply(_t, _this, args) {
|
|
2879
|
+
return utilFn(resolveColorWithOpacity(tokenArg, args[0]));
|
|
2880
|
+
}
|
|
2881
|
+
});
|
|
2882
|
+
}
|
|
2883
|
+
return rule;
|
|
2884
|
+
}
|
|
2885
|
+
return utilFn[prop];
|
|
2886
|
+
},
|
|
2887
|
+
apply(_target, _this, args) {
|
|
2888
|
+
return utilFn(...args);
|
|
2889
|
+
}
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
// src/index.ts
|
|
2894
|
+
var bg2 = createStandaloneProxy(bg, UTIL_TOKENS.bg);
|
|
2895
|
+
var textColor2 = createStandaloneProxy(textColor, UTIL_TOKENS.textColor);
|
|
2896
|
+
var borderColor2 = createStandaloneProxy(borderColor, UTIL_TOKENS.borderColor);
|
|
2897
|
+
var shadowColor2 = createStandaloneProxy(shadowColor, UTIL_TOKENS.shadowColor);
|
|
2898
|
+
var ringColor2 = createStandaloneProxy(ringColor, UTIL_TOKENS.ringColor);
|
|
2899
|
+
var outlineColor2 = createStandaloneProxy(outlineColor, UTIL_TOKENS.outlineColor);
|
|
2900
|
+
var accentColor2 = createStandaloneProxy(accentColor, UTIL_TOKENS.accentColor);
|
|
2901
|
+
var caretColor2 = createStandaloneProxy(caretColor, UTIL_TOKENS.caretColor);
|
|
2902
|
+
var divideColor2 = createStandaloneProxy(divideColor, UTIL_TOKENS.divideColor);
|
|
2903
|
+
var textDecorationColor2 = createStandaloneProxy(textDecorationColor, UTIL_TOKENS.textDecorationColor);
|
|
2904
|
+
var gradientFrom2 = createStandaloneProxy(gradientFrom, UTIL_TOKENS.gradientFrom);
|
|
2905
|
+
var gradientVia2 = createStandaloneProxy(gradientVia, UTIL_TOKENS.gradientVia);
|
|
2906
|
+
var gradientTo2 = createStandaloneProxy(gradientTo, UTIL_TOKENS.gradientTo);
|
|
2907
|
+
var rounded2 = createStandaloneProxy(rounded, UTIL_TOKENS.rounded);
|
|
2908
|
+
var roundedT2 = createStandaloneProxy(roundedT, UTIL_TOKENS.roundedT);
|
|
2909
|
+
var roundedB2 = createStandaloneProxy(roundedB, UTIL_TOKENS.roundedB);
|
|
2910
|
+
var roundedL2 = createStandaloneProxy(roundedL, UTIL_TOKENS.roundedL);
|
|
2911
|
+
var roundedR2 = createStandaloneProxy(roundedR, UTIL_TOKENS.roundedR);
|
|
2912
|
+
var roundedTL2 = createStandaloneProxy(roundedTL, UTIL_TOKENS.roundedTL);
|
|
2913
|
+
var roundedTR2 = createStandaloneProxy(roundedTR, UTIL_TOKENS.roundedTR);
|
|
2914
|
+
var roundedBR2 = createStandaloneProxy(roundedBR, UTIL_TOKENS.roundedBR);
|
|
2915
|
+
var roundedBL2 = createStandaloneProxy(roundedBL, UTIL_TOKENS.roundedBL);
|
|
2916
|
+
var roundedSS2 = createStandaloneProxy(roundedSS, UTIL_TOKENS.roundedSS);
|
|
2917
|
+
var roundedSE2 = createStandaloneProxy(roundedSE, UTIL_TOKENS.roundedSE);
|
|
2918
|
+
var roundedEE2 = createStandaloneProxy(roundedEE, UTIL_TOKENS.roundedEE);
|
|
2919
|
+
var roundedES2 = createStandaloneProxy(roundedES, UTIL_TOKENS.roundedES);
|
|
2920
|
+
var shadow2 = createStandaloneProxy(shadow, UTIL_TOKENS.shadow);
|
|
2921
|
+
var text2 = createStandaloneProxy(text, UTIL_TOKENS.text);
|
|
2922
|
+
var font2 = createStandaloneProxy(font, UTIL_TOKENS.font);
|
|
2923
|
+
var tracking2 = createStandaloneProxy(tracking, UTIL_TOKENS.tracking);
|
|
2924
|
+
var leading2 = createStandaloneProxy(leading, UTIL_TOKENS.leading);
|
|
2925
|
+
var fontFamily2 = createStandaloneProxy(fontFamily, UTIL_TOKENS.fontFamily);
|
|
2926
|
+
var textAlign2 = createStandaloneProxy(textAlign, UTIL_TOKENS.textAlign);
|
|
2927
|
+
var textTransform2 = createStandaloneProxy(textTransform, UTIL_TOKENS.textTransform);
|
|
2928
|
+
var textOverflow2 = createStandaloneProxy(textOverflow, UTIL_TOKENS.textOverflow);
|
|
2929
|
+
var textWrap2 = createStandaloneProxy(textWrap, UTIL_TOKENS.textWrap);
|
|
2930
|
+
var display2 = createStandaloneProxy(display, UTIL_TOKENS.display);
|
|
2931
|
+
var items2 = createStandaloneProxy(items, UTIL_TOKENS.items);
|
|
2932
|
+
var justify2 = createStandaloneProxy(justify, UTIL_TOKENS.justify);
|
|
2933
|
+
var self2 = createStandaloneProxy(self, UTIL_TOKENS.self);
|
|
2934
|
+
var overflow2 = createStandaloneProxy(overflow, UTIL_TOKENS.overflow);
|
|
2935
|
+
var overflowX2 = createStandaloneProxy(overflowX, UTIL_TOKENS.overflowX);
|
|
2936
|
+
var overflowY2 = createStandaloneProxy(overflowY, UTIL_TOKENS.overflowY);
|
|
2937
|
+
var cursor2 = createStandaloneProxy(cursor, UTIL_TOKENS.cursor);
|
|
2938
|
+
var objectFit2 = createStandaloneProxy(objectFit, UTIL_TOKENS.objectFit);
|
|
2544
2939
|
export {
|
|
2545
|
-
|
|
2940
|
+
_2xl4 as _2xl,
|
|
2546
2941
|
absolute,
|
|
2547
|
-
accentColor,
|
|
2942
|
+
accentColor2 as accentColor,
|
|
2548
2943
|
active,
|
|
2549
2944
|
after,
|
|
2550
2945
|
alignContent,
|
|
@@ -2576,7 +2971,7 @@ export {
|
|
|
2576
2971
|
backdropSepia,
|
|
2577
2972
|
backdrop_,
|
|
2578
2973
|
before,
|
|
2579
|
-
bg,
|
|
2974
|
+
bg2 as bg,
|
|
2580
2975
|
bgAttachment,
|
|
2581
2976
|
bgBlendMode,
|
|
2582
2977
|
bgClip,
|
|
@@ -2590,7 +2985,7 @@ export {
|
|
|
2590
2985
|
border,
|
|
2591
2986
|
borderB,
|
|
2592
2987
|
borderCollapse,
|
|
2593
|
-
borderColor,
|
|
2988
|
+
borderColor2 as borderColor,
|
|
2594
2989
|
borderE,
|
|
2595
2990
|
borderL,
|
|
2596
2991
|
borderR,
|
|
@@ -2611,7 +3006,7 @@ export {
|
|
|
2611
3006
|
breakInside,
|
|
2612
3007
|
brightness,
|
|
2613
3008
|
captionSide,
|
|
2614
|
-
caretColor,
|
|
3009
|
+
caretColor2 as caretColor,
|
|
2615
3010
|
checked,
|
|
2616
3011
|
clear_,
|
|
2617
3012
|
colEnd,
|
|
@@ -2625,7 +3020,7 @@ export {
|
|
|
2625
3020
|
contrastLess,
|
|
2626
3021
|
contrastMore,
|
|
2627
3022
|
createTheme,
|
|
2628
|
-
cursor,
|
|
3023
|
+
cursor2 as cursor,
|
|
2629
3024
|
cx,
|
|
2630
3025
|
dark,
|
|
2631
3026
|
data,
|
|
@@ -2634,8 +3029,8 @@ export {
|
|
|
2634
3029
|
delay,
|
|
2635
3030
|
diagonalFractions,
|
|
2636
3031
|
disabled,
|
|
2637
|
-
display,
|
|
2638
|
-
divideColor,
|
|
3032
|
+
display2 as display,
|
|
3033
|
+
divideColor2 as divideColor,
|
|
2639
3034
|
divideStyle,
|
|
2640
3035
|
divideX,
|
|
2641
3036
|
divideXReverse,
|
|
@@ -2672,8 +3067,8 @@ export {
|
|
|
2672
3067
|
focus,
|
|
2673
3068
|
focusVisible,
|
|
2674
3069
|
focusWithin,
|
|
2675
|
-
font,
|
|
2676
|
-
fontFamily,
|
|
3070
|
+
font2 as font,
|
|
3071
|
+
fontFamily2 as fontFamily,
|
|
2677
3072
|
forcedColorAdjust,
|
|
2678
3073
|
forcedColors,
|
|
2679
3074
|
gap,
|
|
@@ -2681,9 +3076,9 @@ export {
|
|
|
2681
3076
|
gapY,
|
|
2682
3077
|
generateCSS,
|
|
2683
3078
|
googleFonts,
|
|
2684
|
-
gradientFrom,
|
|
2685
|
-
gradientTo,
|
|
2686
|
-
gradientVia,
|
|
3079
|
+
gradientFrom2 as gradientFrom,
|
|
3080
|
+
gradientTo2 as gradientTo,
|
|
3081
|
+
gradientVia2 as gradientVia,
|
|
2687
3082
|
grayscale,
|
|
2688
3083
|
grid,
|
|
2689
3084
|
gridCols,
|
|
@@ -2724,17 +3119,17 @@ export {
|
|
|
2724
3119
|
isolate,
|
|
2725
3120
|
isolationAuto,
|
|
2726
3121
|
italic,
|
|
2727
|
-
items,
|
|
2728
|
-
justify,
|
|
3122
|
+
items2 as items,
|
|
3123
|
+
justify2 as justify,
|
|
2729
3124
|
justifyItems,
|
|
2730
3125
|
justifySelf,
|
|
2731
3126
|
landscape,
|
|
2732
3127
|
lastChild,
|
|
2733
3128
|
lastOfType,
|
|
2734
3129
|
layer,
|
|
2735
|
-
leading,
|
|
3130
|
+
leading2 as leading,
|
|
2736
3131
|
left,
|
|
2737
|
-
|
|
3132
|
+
lg4 as lg,
|
|
2738
3133
|
lineClamp,
|
|
2739
3134
|
liningNums,
|
|
2740
3135
|
listStyleImage,
|
|
@@ -2767,7 +3162,7 @@ export {
|
|
|
2767
3162
|
normalNums,
|
|
2768
3163
|
notItalic,
|
|
2769
3164
|
notSrOnly,
|
|
2770
|
-
objectFit,
|
|
3165
|
+
objectFit2 as objectFit,
|
|
2771
3166
|
objectPosition,
|
|
2772
3167
|
odd,
|
|
2773
3168
|
oldstyleNums,
|
|
@@ -2779,14 +3174,14 @@ export {
|
|
|
2779
3174
|
ordinal,
|
|
2780
3175
|
outOfRange,
|
|
2781
3176
|
outline,
|
|
2782
|
-
outlineColor,
|
|
3177
|
+
outlineColor2 as outlineColor,
|
|
2783
3178
|
outlineNone,
|
|
2784
3179
|
outlineOffset,
|
|
2785
3180
|
outlineStyle,
|
|
2786
3181
|
outlineWidth,
|
|
2787
|
-
overflow,
|
|
2788
|
-
overflowX,
|
|
2789
|
-
overflowY,
|
|
3182
|
+
overflow2 as overflow,
|
|
3183
|
+
overflowX2 as overflowX,
|
|
3184
|
+
overflowY2 as overflowY,
|
|
2790
3185
|
overscrollBehavior,
|
|
2791
3186
|
overscrollX,
|
|
2792
3187
|
overscrollY,
|
|
@@ -2832,24 +3227,24 @@ export {
|
|
|
2832
3227
|
resize,
|
|
2833
3228
|
right,
|
|
2834
3229
|
ring,
|
|
2835
|
-
ringColor,
|
|
3230
|
+
ringColor2 as ringColor,
|
|
2836
3231
|
ringInset,
|
|
2837
3232
|
ringOffsetColor,
|
|
2838
3233
|
ringOffsetWidth,
|
|
2839
3234
|
rotate,
|
|
2840
|
-
rounded,
|
|
2841
|
-
roundedB,
|
|
2842
|
-
roundedBL,
|
|
2843
|
-
roundedBR,
|
|
2844
|
-
roundedEE,
|
|
2845
|
-
roundedES,
|
|
2846
|
-
roundedL,
|
|
2847
|
-
roundedR,
|
|
2848
|
-
roundedSE,
|
|
2849
|
-
roundedSS,
|
|
2850
|
-
roundedT,
|
|
2851
|
-
roundedTL,
|
|
2852
|
-
roundedTR,
|
|
3235
|
+
rounded2 as rounded,
|
|
3236
|
+
roundedB2 as roundedB,
|
|
3237
|
+
roundedBL2 as roundedBL,
|
|
3238
|
+
roundedBR2 as roundedBR,
|
|
3239
|
+
roundedEE2 as roundedEE,
|
|
3240
|
+
roundedES2 as roundedES,
|
|
3241
|
+
roundedL2 as roundedL,
|
|
3242
|
+
roundedR2 as roundedR,
|
|
3243
|
+
roundedSE2 as roundedSE,
|
|
3244
|
+
roundedSS2 as roundedSS,
|
|
3245
|
+
roundedT2 as roundedT,
|
|
3246
|
+
roundedTL2 as roundedTL,
|
|
3247
|
+
roundedTR2 as roundedTR,
|
|
2853
3248
|
rowEnd,
|
|
2854
3249
|
rowSpan,
|
|
2855
3250
|
rowStart,
|
|
@@ -2875,17 +3270,17 @@ export {
|
|
|
2875
3270
|
scrollPaddingY,
|
|
2876
3271
|
select,
|
|
2877
3272
|
selection_,
|
|
2878
|
-
self,
|
|
3273
|
+
self2 as self,
|
|
2879
3274
|
sepia,
|
|
2880
3275
|
setTheme,
|
|
2881
|
-
shadow,
|
|
2882
|
-
shadowColor,
|
|
3276
|
+
shadow2 as shadow,
|
|
3277
|
+
shadowColor2 as shadowColor,
|
|
2883
3278
|
shrink,
|
|
2884
3279
|
size,
|
|
2885
3280
|
skewX,
|
|
2886
3281
|
skewY,
|
|
2887
3282
|
slashedZero,
|
|
2888
|
-
|
|
3283
|
+
sm4 as sm,
|
|
2889
3284
|
snapAlign,
|
|
2890
3285
|
snapStop,
|
|
2891
3286
|
snapType,
|
|
@@ -2905,21 +3300,21 @@ export {
|
|
|
2905
3300
|
tableLayout,
|
|
2906
3301
|
tabularNums,
|
|
2907
3302
|
target,
|
|
2908
|
-
text,
|
|
2909
|
-
textAlign,
|
|
2910
|
-
textColor,
|
|
3303
|
+
text2 as text,
|
|
3304
|
+
textAlign2 as textAlign,
|
|
3305
|
+
textColor2 as textColor,
|
|
2911
3306
|
textDecoration,
|
|
2912
|
-
textDecorationColor,
|
|
3307
|
+
textDecorationColor2 as textDecorationColor,
|
|
2913
3308
|
textDecorationStyle,
|
|
2914
3309
|
textDecorationThickness,
|
|
2915
3310
|
textIndent,
|
|
2916
|
-
textOverflow,
|
|
2917
|
-
textTransform,
|
|
3311
|
+
textOverflow2 as textOverflow,
|
|
3312
|
+
textTransform2 as textTransform,
|
|
2918
3313
|
textUnderlineOffset,
|
|
2919
|
-
textWrap,
|
|
3314
|
+
textWrap2 as textWrap,
|
|
2920
3315
|
top,
|
|
2921
3316
|
touchAction,
|
|
2922
|
-
tracking,
|
|
3317
|
+
tracking2 as tracking,
|
|
2923
3318
|
transformGpu,
|
|
2924
3319
|
transformNone,
|
|
2925
3320
|
transformOrigin,
|
|
@@ -2943,6 +3338,6 @@ export {
|
|
|
2943
3338
|
whitespace,
|
|
2944
3339
|
willChange,
|
|
2945
3340
|
wordBreak,
|
|
2946
|
-
|
|
3341
|
+
xl4 as xl,
|
|
2947
3342
|
z
|
|
2948
3343
|
};
|