@kbach/react 0.5.32 → 0.5.34
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 +13 -1
- package/dist/{chunk-X6FH5QTD.mjs → chunk-6AUSWRH2.mjs} +1 -1
- package/dist/{chunk-VZD4672I.mjs → chunk-LMCUZ3HI.mjs} +2 -2
- package/dist/{chunk-SOBLKZGE.mjs → chunk-T3SOZ6AO.mjs} +454 -434
- package/dist/index.js +450 -434
- package/dist/index.mjs +2 -2
- package/dist/jsx-dev-runtime.js +450 -434
- package/dist/jsx-dev-runtime.mjs +3 -3
- package/dist/jsx-runtime.js +450 -434
- package/dist/jsx-runtime.mjs +3 -3
- package/dist/vite-plugin.js +483 -493
- package/dist/vite-plugin.mjs +21 -49
- package/kbach-react.md +778 -0
- package/package.json +2 -2
- package/KBACH.md +0 -952
|
@@ -543,6 +543,13 @@ var defaultTheme = {
|
|
|
543
543
|
|
|
544
544
|
// src/core/platform.ts
|
|
545
545
|
var isWeb = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
546
|
+
var _cssGenMode = false;
|
|
547
|
+
function setCSSGenMode(on) {
|
|
548
|
+
_cssGenMode = on;
|
|
549
|
+
}
|
|
550
|
+
function getEffectiveIsWeb() {
|
|
551
|
+
return isWeb || _cssGenMode;
|
|
552
|
+
}
|
|
546
553
|
function toNativeValue(raw) {
|
|
547
554
|
if (/^-?\d+(\.\d+)?px$/.test(raw)) return parseFloat(raw);
|
|
548
555
|
if (/^-?\d+(\.\d+)?rem$/.test(raw)) return parseFloat(raw) * 16;
|
|
@@ -1360,8 +1367,12 @@ function hexToRgba(hex, alpha) {
|
|
|
1360
1367
|
}
|
|
1361
1368
|
function resolveSpacing(value, negative, spacing, isArbitrary) {
|
|
1362
1369
|
if (isArbitrary) {
|
|
1363
|
-
const resolved =
|
|
1364
|
-
|
|
1370
|
+
const resolved = getEffectiveIsWeb() ? value : toNativeValue(value);
|
|
1371
|
+
if (negative) {
|
|
1372
|
+
if (typeof resolved === "number") return -resolved;
|
|
1373
|
+
if (typeof resolved === "string" && /^\d/.test(resolved)) return `-${resolved}`;
|
|
1374
|
+
}
|
|
1375
|
+
return resolved;
|
|
1365
1376
|
}
|
|
1366
1377
|
const raw = spacing[value];
|
|
1367
1378
|
if (raw === void 0) return null;
|
|
@@ -1373,7 +1384,7 @@ function resolveSpacing(value, negative, spacing, isArbitrary) {
|
|
|
1373
1384
|
return raw;
|
|
1374
1385
|
}
|
|
1375
1386
|
function resolveSizing(value, spacing, isArbitrary) {
|
|
1376
|
-
if (isArbitrary) return
|
|
1387
|
+
if (isArbitrary) return getEffectiveIsWeb() ? value : toNativeValue(value);
|
|
1377
1388
|
const raw = spacing[value];
|
|
1378
1389
|
if (raw !== void 0) return raw;
|
|
1379
1390
|
if (/^\d+\/\d+$/.test(value)) {
|
|
@@ -1383,356 +1394,364 @@ function resolveSizing(value, spacing, isArbitrary) {
|
|
|
1383
1394
|
return null;
|
|
1384
1395
|
}
|
|
1385
1396
|
function resolveRadius(value, radii, isArbitrary) {
|
|
1386
|
-
if (isArbitrary) return
|
|
1397
|
+
if (isArbitrary) return getEffectiveIsWeb() ? value : toNativeValue(value);
|
|
1387
1398
|
const key = value === "" ? "DEFAULT" : value;
|
|
1388
1399
|
return radii[key] ?? null;
|
|
1389
1400
|
}
|
|
1390
1401
|
function resolveFontSize(value, fontSizes, isArbitrary) {
|
|
1391
|
-
if (isArbitrary) return
|
|
1402
|
+
if (isArbitrary) return getEffectiveIsWeb() ? value : toNativeValue(value);
|
|
1392
1403
|
return fontSizes[value] ?? null;
|
|
1393
1404
|
}
|
|
1394
1405
|
var FILTER_COMPOSE = "var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)";
|
|
1395
1406
|
var BACKDROP_FILTER_COMPOSE = "var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)";
|
|
1396
|
-
var
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
}
|
|
1407
|
+
var _standalone = null;
|
|
1408
|
+
function buildStandalone() {
|
|
1409
|
+
const web = getEffectiveIsWeb();
|
|
1410
|
+
return {
|
|
1411
|
+
// Display
|
|
1412
|
+
// React Native only supports display:'flex'|'none'. Setting 'flex' explicitly is
|
|
1413
|
+
// a no-op normally, but is needed to re-show an element that was hidden via `hidden`.
|
|
1414
|
+
// `grid`, `inline-*`, `contents`, `flow-root` have no native equivalent.
|
|
1415
|
+
flex: { display: "flex" },
|
|
1416
|
+
block: web ? { display: "block" } : null,
|
|
1417
|
+
"inline-block": web ? { display: "inline-block" } : null,
|
|
1418
|
+
inline: web ? { display: "inline" } : null,
|
|
1419
|
+
grid: web ? { display: "grid" } : null,
|
|
1420
|
+
grd: web ? { display: "grid" } : null,
|
|
1421
|
+
"inline-flex": { display: web ? "inline-flex" : "flex" },
|
|
1422
|
+
"inline-grid": web ? { display: "inline-grid" } : null,
|
|
1423
|
+
hidden: { display: "none" },
|
|
1424
|
+
contents: web ? { display: "contents" } : null,
|
|
1425
|
+
"flow-root": web ? { display: "flow-root" } : null,
|
|
1426
|
+
// Flex direction (both web and native)
|
|
1427
|
+
"flex-row": { flexDirection: "row" },
|
|
1428
|
+
"flex-col": { flexDirection: "column" },
|
|
1429
|
+
"flex-row-reverse": { flexDirection: "row-reverse" },
|
|
1430
|
+
"flex-col-reverse": { flexDirection: "column-reverse" },
|
|
1431
|
+
// Flex wrap (both)
|
|
1432
|
+
"flex-wrap": { flexWrap: "wrap" },
|
|
1433
|
+
"flex-wrap-reverse": { flexWrap: "wrap-reverse" },
|
|
1434
|
+
"flex-nowrap": { flexWrap: "nowrap" },
|
|
1435
|
+
// Flex grow / shrink (both)
|
|
1436
|
+
"flex-grow": { flexGrow: 1 },
|
|
1437
|
+
"flex-grow-0": { flexGrow: 0 },
|
|
1438
|
+
"flex-shrink": { flexShrink: 1 },
|
|
1439
|
+
"flex-shrink-0": { flexShrink: 0 },
|
|
1440
|
+
// Align items (both)
|
|
1441
|
+
"items-start": { alignItems: "flex-start" },
|
|
1442
|
+
"items-end": { alignItems: "flex-end" },
|
|
1443
|
+
"items-center": { alignItems: "center" },
|
|
1444
|
+
"items-baseline": { alignItems: "baseline" },
|
|
1445
|
+
"items-stretch": { alignItems: "stretch" },
|
|
1446
|
+
// Justify content (both)
|
|
1447
|
+
"justify-start": { justifyContent: "flex-start" },
|
|
1448
|
+
"justify-end": { justifyContent: "flex-end" },
|
|
1449
|
+
"justify-center": { justifyContent: "center" },
|
|
1450
|
+
"justify-between": { justifyContent: "space-between" },
|
|
1451
|
+
"justify-around": { justifyContent: "space-around" },
|
|
1452
|
+
"justify-evenly": { justifyContent: "space-evenly" },
|
|
1453
|
+
// Align content (both)
|
|
1454
|
+
"content-start": { alignContent: "flex-start" },
|
|
1455
|
+
"content-end": { alignContent: "flex-end" },
|
|
1456
|
+
"content-center": { alignContent: "center" },
|
|
1457
|
+
"content-between": { alignContent: "space-between" },
|
|
1458
|
+
"content-around": { alignContent: "space-around" },
|
|
1459
|
+
"content-evenly": { alignContent: "space-evenly" },
|
|
1460
|
+
"content-stretch": { alignContent: "stretch" },
|
|
1461
|
+
// Align self (both)
|
|
1462
|
+
"self-auto": { alignSelf: "auto" },
|
|
1463
|
+
"self-start": { alignSelf: "flex-start" },
|
|
1464
|
+
"self-end": { alignSelf: "flex-end" },
|
|
1465
|
+
"self-center": { alignSelf: "center" },
|
|
1466
|
+
"self-stretch": { alignSelf: "stretch" },
|
|
1467
|
+
"self-baseline": { alignSelf: "baseline" },
|
|
1468
|
+
// Text align (both)
|
|
1469
|
+
"text-left": { textAlign: "left" },
|
|
1470
|
+
"text-right": { textAlign: "right" },
|
|
1471
|
+
"text-center": { textAlign: "center" },
|
|
1472
|
+
"text-justify": { textAlign: "justify" },
|
|
1473
|
+
// Font weight shortcuts (both)
|
|
1474
|
+
"font-thin": { fontWeight: "100" },
|
|
1475
|
+
"font-extralight": { fontWeight: "200" },
|
|
1476
|
+
"font-light": { fontWeight: "300" },
|
|
1477
|
+
"font-normal": { fontWeight: "400" },
|
|
1478
|
+
"font-medium": { fontWeight: "500" },
|
|
1479
|
+
"font-semibold": { fontWeight: "600" },
|
|
1480
|
+
"font-bold": { fontWeight: "700" },
|
|
1481
|
+
"font-extrabold": { fontWeight: "800" },
|
|
1482
|
+
"font-black": { fontWeight: "900" },
|
|
1483
|
+
// Text decoration (overline is web-only)
|
|
1484
|
+
underline: { textDecorationLine: "underline" },
|
|
1485
|
+
overline: web ? { textDecorationLine: "overline" } : null,
|
|
1486
|
+
"line-through": { textDecorationLine: "line-through" },
|
|
1487
|
+
"no-underline": { textDecorationLine: "none" },
|
|
1488
|
+
// Text transform (both)
|
|
1489
|
+
uppercase: { textTransform: "uppercase" },
|
|
1490
|
+
lowercase: { textTransform: "lowercase" },
|
|
1491
|
+
capitalize: { textTransform: "capitalize" },
|
|
1492
|
+
"normal-case": { textTransform: "none" },
|
|
1493
|
+
// Font style (both)
|
|
1494
|
+
italic: { fontStyle: "italic" },
|
|
1495
|
+
"non-italic": { fontStyle: "normal" },
|
|
1496
|
+
// Position (fixed/sticky/static are web-only; RN only supports relative/absolute)
|
|
1497
|
+
relative: { position: "relative" },
|
|
1498
|
+
absolute: { position: "absolute" },
|
|
1499
|
+
fixed: web ? { position: "fixed" } : null,
|
|
1500
|
+
sticky: web ? { position: "sticky" } : null,
|
|
1501
|
+
static: web ? { position: "static" } : null,
|
|
1502
|
+
// Visibility (no `visibility` prop on native; use opacity instead)
|
|
1503
|
+
visible: web ? { visibility: "visible" } : null,
|
|
1504
|
+
invisible: web ? { visibility: "hidden" } : { opacity: 0 },
|
|
1505
|
+
// Overflow (RN supports 'hidden' | 'visible' | 'scroll'; not 'auto')
|
|
1506
|
+
"overflow-hidden": { overflow: "hidden" },
|
|
1507
|
+
"overflow-visible": { overflow: "visible" },
|
|
1508
|
+
"overflow-scroll": { overflow: "scroll" },
|
|
1509
|
+
"overflow-auto": web ? { overflow: "auto" } : { overflow: "scroll" },
|
|
1510
|
+
// overflowX / overflowY are web-only
|
|
1511
|
+
"overflow-x-hidden": web ? { overflowX: "hidden" } : null,
|
|
1512
|
+
"overflow-x-scroll": web ? { overflowX: "scroll" } : null,
|
|
1513
|
+
"overflow-x-auto": web ? { overflowX: "auto" } : null,
|
|
1514
|
+
"overflow-y-hidden": web ? { overflowY: "hidden" } : null,
|
|
1515
|
+
"overflow-y-scroll": web ? { overflowY: "scroll" } : null,
|
|
1516
|
+
"overflow-y-auto": web ? { overflowY: "auto" } : null,
|
|
1517
|
+
// Object fit (web-only; use resizeMode prop on RN Image)
|
|
1518
|
+
"object-contain": web ? { objectFit: "contain" } : null,
|
|
1519
|
+
"object-cover": web ? { objectFit: "cover" } : null,
|
|
1520
|
+
"object-fill": web ? { objectFit: "fill" } : null,
|
|
1521
|
+
"object-none": web ? { objectFit: "none" } : null,
|
|
1522
|
+
"object-scale-down": web ? { objectFit: "scale-down" } : null,
|
|
1523
|
+
// Border style (both)
|
|
1524
|
+
"border-solid": { borderStyle: "solid" },
|
|
1525
|
+
"border-dashed": { borderStyle: "dashed" },
|
|
1526
|
+
"border-dotted": { borderStyle: "dotted" },
|
|
1527
|
+
"border-none": { borderWidth: 0 },
|
|
1528
|
+
// Border sides default width (both)
|
|
1529
|
+
"border-t": { borderTopWidth: 1 },
|
|
1530
|
+
"border-r": { borderRightWidth: 1 },
|
|
1531
|
+
"border-b": { borderBottomWidth: 1 },
|
|
1532
|
+
"border-l": { borderLeftWidth: 1 },
|
|
1533
|
+
// Cursor (web-only)
|
|
1534
|
+
"cursor-auto": web ? { cursor: "auto" } : null,
|
|
1535
|
+
"cursor-default": web ? { cursor: "default" } : null,
|
|
1536
|
+
"cursor-pointer": web ? { cursor: "pointer" } : null,
|
|
1537
|
+
"cursor-wait": web ? { cursor: "wait" } : null,
|
|
1538
|
+
"cursor-text": web ? { cursor: "text" } : null,
|
|
1539
|
+
"cursor-move": web ? { cursor: "move" } : null,
|
|
1540
|
+
"cursor-not-allowed": web ? { cursor: "not-allowed" } : null,
|
|
1541
|
+
// User select (web-only)
|
|
1542
|
+
"select-none": web ? { userSelect: "none" } : null,
|
|
1543
|
+
"select-text": web ? { userSelect: "text" } : null,
|
|
1544
|
+
"select-all": web ? { userSelect: "all" } : null,
|
|
1545
|
+
"select-auto": web ? { userSelect: "auto" } : null,
|
|
1546
|
+
// Pointer events (both)
|
|
1547
|
+
"pointer-events-none": { pointerEvents: "none" },
|
|
1548
|
+
"pointer-events-auto": { pointerEvents: "auto" },
|
|
1549
|
+
// Whitespace (web-only; RN Text uses numberOfLines prop instead)
|
|
1550
|
+
"whitespace-normal": web ? { whiteSpace: "normal" } : null,
|
|
1551
|
+
"whitespace-nowrap": web ? { whiteSpace: "nowrap" } : null,
|
|
1552
|
+
"whitespace-pre": web ? { whiteSpace: "pre" } : null,
|
|
1553
|
+
"whitespace-pre-wrap": web ? { whiteSpace: "pre-wrap" } : null,
|
|
1554
|
+
"whitespace-pre-line": web ? { whiteSpace: "pre-line" } : null,
|
|
1555
|
+
// Word break (web-only)
|
|
1556
|
+
"break-normal": web ? { overflowWrap: "normal", wordBreak: "normal" } : null,
|
|
1557
|
+
"break-words": web ? { overflowWrap: "break-word" } : null,
|
|
1558
|
+
"break-all": web ? { wordBreak: "break-all" } : null,
|
|
1559
|
+
// Misc web-only
|
|
1560
|
+
truncate: web ? { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } : null,
|
|
1561
|
+
"box-border": web ? { boxSizing: "border-box" } : null,
|
|
1562
|
+
"box-content": web ? { boxSizing: "content-box" } : null,
|
|
1563
|
+
"appearance-none": web ? { appearance: "none" } : null,
|
|
1564
|
+
"outline-none": web ? { outline: "none", outlineOffset: "0" } : null,
|
|
1565
|
+
outline: web ? { outline: "2px solid transparent", outlineOffset: "2px" } : null,
|
|
1566
|
+
resize: web ? { resize: "both" } : null,
|
|
1567
|
+
"resize-none": web ? { resize: "none" } : null,
|
|
1568
|
+
"resize-y": web ? { resize: "vertical" } : null,
|
|
1569
|
+
"resize-x": web ? { resize: "horizontal" } : null,
|
|
1570
|
+
antialiased: web ? { WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale" } : null,
|
|
1571
|
+
"subpixel-antialiased": web ? { WebkitFontSmoothing: "subpixel-antialiased", MozOsxFontSmoothing: "auto" } : null,
|
|
1572
|
+
"overflow-ellipsis": web ? { textOverflow: "ellipsis" } : null,
|
|
1573
|
+
"sr-only": web ? {
|
|
1574
|
+
position: "absolute",
|
|
1575
|
+
width: 1,
|
|
1576
|
+
height: 1,
|
|
1577
|
+
padding: 0,
|
|
1578
|
+
margin: -1,
|
|
1579
|
+
overflow: "hidden",
|
|
1580
|
+
clip: "rect(0,0,0,0)",
|
|
1581
|
+
whiteSpace: "nowrap",
|
|
1582
|
+
border: 0
|
|
1583
|
+
} : null,
|
|
1584
|
+
"not-sr-only": web ? {
|
|
1585
|
+
position: "static",
|
|
1586
|
+
width: "auto",
|
|
1587
|
+
height: "auto",
|
|
1588
|
+
padding: 0,
|
|
1589
|
+
margin: 0,
|
|
1590
|
+
overflow: "visible",
|
|
1591
|
+
clip: "auto",
|
|
1592
|
+
whiteSpace: "normal"
|
|
1593
|
+
} : null,
|
|
1594
|
+
// Lists (web-only)
|
|
1595
|
+
"list-none": web ? { listStyleType: "none" } : null,
|
|
1596
|
+
"list-disc": web ? { listStyleType: "disc" } : null,
|
|
1597
|
+
"list-decimal": web ? { listStyleType: "decimal" } : null,
|
|
1598
|
+
// Background clip (web-only)
|
|
1599
|
+
"bg-clip-border": web ? { backgroundClip: "border-box" } : null,
|
|
1600
|
+
"bg-clip-padding": web ? { backgroundClip: "padding-box" } : null,
|
|
1601
|
+
"bg-clip-content": web ? { backgroundClip: "content-box" } : null,
|
|
1602
|
+
"bg-clip-text": web ? { backgroundClip: "text", WebkitBackgroundClip: "text" } : null,
|
|
1603
|
+
// Background image
|
|
1604
|
+
"bg-none": web ? { backgroundImage: "none" } : null,
|
|
1605
|
+
// Background size (web-only)
|
|
1606
|
+
"bg-auto": web ? { backgroundSize: "auto" } : null,
|
|
1607
|
+
"bg-cover": web ? { backgroundSize: "cover" } : null,
|
|
1608
|
+
"bg-contain": web ? { backgroundSize: "contain" } : null,
|
|
1609
|
+
// Background position (web-only)
|
|
1610
|
+
"bg-center": web ? { backgroundPosition: "center" } : null,
|
|
1611
|
+
"bg-top": web ? { backgroundPosition: "top" } : null,
|
|
1612
|
+
"bg-bottom": web ? { backgroundPosition: "bottom" } : null,
|
|
1613
|
+
"bg-left": web ? { backgroundPosition: "left" } : null,
|
|
1614
|
+
"bg-right": web ? { backgroundPosition: "right" } : null,
|
|
1615
|
+
"bg-left-top": web ? { backgroundPosition: "left top" } : null,
|
|
1616
|
+
"bg-left-bottom": web ? { backgroundPosition: "left bottom" } : null,
|
|
1617
|
+
"bg-right-top": web ? { backgroundPosition: "right top" } : null,
|
|
1618
|
+
"bg-right-bottom": web ? { backgroundPosition: "right bottom" } : null,
|
|
1619
|
+
// Background repeat (web-only)
|
|
1620
|
+
"bg-repeat": web ? { backgroundRepeat: "repeat" } : null,
|
|
1621
|
+
"bg-no-repeat": web ? { backgroundRepeat: "no-repeat" } : null,
|
|
1622
|
+
"bg-repeat-x": web ? { backgroundRepeat: "repeat-x" } : null,
|
|
1623
|
+
"bg-repeat-y": web ? { backgroundRepeat: "repeat-y" } : null,
|
|
1624
|
+
"bg-repeat-round": web ? { backgroundRepeat: "round" } : null,
|
|
1625
|
+
"bg-repeat-space": web ? { backgroundRepeat: "space" } : null,
|
|
1626
|
+
// Background attachment (web-only)
|
|
1627
|
+
"bg-fixed": web ? { backgroundAttachment: "fixed" } : null,
|
|
1628
|
+
"bg-local": web ? { backgroundAttachment: "local" } : null,
|
|
1629
|
+
"bg-scroll": web ? { backgroundAttachment: "scroll" } : null,
|
|
1630
|
+
// Object position (web-only)
|
|
1631
|
+
"object-center": web ? { objectPosition: "center" } : null,
|
|
1632
|
+
"object-top": web ? { objectPosition: "top" } : null,
|
|
1633
|
+
"object-bottom": web ? { objectPosition: "bottom" } : null,
|
|
1634
|
+
"object-left": web ? { objectPosition: "left" } : null,
|
|
1635
|
+
"object-right": web ? { objectPosition: "right" } : null,
|
|
1636
|
+
"object-left-top": web ? { objectPosition: "left top" } : null,
|
|
1637
|
+
"object-left-bottom": web ? { objectPosition: "left bottom" } : null,
|
|
1638
|
+
"object-right-top": web ? { objectPosition: "right top" } : null,
|
|
1639
|
+
"object-right-bottom": web ? { objectPosition: "right bottom" } : null,
|
|
1640
|
+
// Table (web-only)
|
|
1641
|
+
table: web ? { display: "table" } : null,
|
|
1642
|
+
"table-auto": web ? { tableLayout: "auto" } : null,
|
|
1643
|
+
"table-fixed": web ? { tableLayout: "fixed" } : null,
|
|
1644
|
+
"caption-top": web ? { captionSide: "top" } : null,
|
|
1645
|
+
"caption-bottom": web ? { captionSide: "bottom" } : null,
|
|
1646
|
+
"border-collapse": web ? { borderCollapse: "collapse" } : null,
|
|
1647
|
+
"border-separate": web ? { borderCollapse: "separate" } : null,
|
|
1648
|
+
// List style position (web-only)
|
|
1649
|
+
"list-inside": web ? { listStylePosition: "inside" } : null,
|
|
1650
|
+
"list-outside": web ? { listStylePosition: "outside" } : null,
|
|
1651
|
+
// Font variant numeric (web-only)
|
|
1652
|
+
"normal-nums": web ? { fontVariantNumeric: "normal" } : null,
|
|
1653
|
+
ordinal: web ? { fontVariantNumeric: "ordinal" } : null,
|
|
1654
|
+
"slashed-zero": web ? { fontVariantNumeric: "slashed-zero" } : null,
|
|
1655
|
+
"lining-nums": web ? { fontVariantNumeric: "lining-nums" } : null,
|
|
1656
|
+
"oldstyle-nums": web ? { fontVariantNumeric: "oldstyle-nums" } : null,
|
|
1657
|
+
"proportional-nums": web ? { fontVariantNumeric: "proportional-nums" } : null,
|
|
1658
|
+
"tabular-nums": web ? { fontVariantNumeric: "tabular-nums" } : null,
|
|
1659
|
+
"diagonal-fractions": web ? { fontVariantNumeric: "diagonal-fractions" } : null,
|
|
1660
|
+
"stacked-fractions": web ? { fontVariantNumeric: "stacked-fractions" } : null,
|
|
1661
|
+
// Isolation (web-only)
|
|
1662
|
+
isolate: web ? { isolation: "isolate" } : null,
|
|
1663
|
+
"isolation-auto": web ? { isolation: "auto" } : null,
|
|
1664
|
+
// Backface visibility (both iOS and Android)
|
|
1665
|
+
"backface-visible": { backfaceVisibility: "visible" },
|
|
1666
|
+
"backface-hidden": { backfaceVisibility: "hidden" },
|
|
1667
|
+
// CSS filters — standalone = default/full effect (web-only)
|
|
1668
|
+
grayscale: web ? { "--tw-grayscale": "grayscale(100%)", filter: FILTER_COMPOSE } : null,
|
|
1669
|
+
invert: web ? { "--tw-invert": "invert(100%)", filter: FILTER_COMPOSE } : null,
|
|
1670
|
+
sepia: web ? { "--tw-sepia": "sepia(100%)", filter: FILTER_COMPOSE } : null,
|
|
1671
|
+
// Divide none
|
|
1672
|
+
"divide-none": web ? { __divideX: 0, __divideY: 0 } : null,
|
|
1673
|
+
// Group / peer markers (no-op: no style emitted; just ensures isKnownUtility returns true)
|
|
1674
|
+
group: web ? {} : null,
|
|
1675
|
+
peer: web ? {} : null,
|
|
1676
|
+
// Text-wrap (web-only)
|
|
1677
|
+
"text-wrap": web ? { textWrap: "wrap" } : null,
|
|
1678
|
+
"text-nowrap": web ? { textWrap: "nowrap" } : null,
|
|
1679
|
+
"text-balance": web ? { textWrap: "balance" } : null,
|
|
1680
|
+
"text-pretty": web ? { textWrap: "pretty" } : null,
|
|
1681
|
+
// Screen sizing (vw values are web-only; vh values work cross-platform via spacing scale for h-*)
|
|
1682
|
+
"w-screen": web ? { width: "100vw" } : null,
|
|
1683
|
+
"min-h-screen": { minHeight: "100vh" },
|
|
1684
|
+
"max-h-screen": { maxHeight: "100vh" },
|
|
1685
|
+
"min-w-screen": web ? { minWidth: "100vw" } : null,
|
|
1686
|
+
"max-w-screen": web ? { maxWidth: "100vw" } : null,
|
|
1687
|
+
// max-w named container sizes (mirrors Tailwind's container scale)
|
|
1688
|
+
"max-w-none": { maxWidth: "none" },
|
|
1689
|
+
"max-w-xs": { maxWidth: 320 },
|
|
1690
|
+
"max-w-sm": { maxWidth: 384 },
|
|
1691
|
+
"max-w-md": { maxWidth: 448 },
|
|
1692
|
+
"max-w-lg": { maxWidth: 512 },
|
|
1693
|
+
"max-w-xl": { maxWidth: 576 },
|
|
1694
|
+
"max-w-2xl": { maxWidth: 672 },
|
|
1695
|
+
"max-w-3xl": { maxWidth: 768 },
|
|
1696
|
+
"max-w-4xl": { maxWidth: 896 },
|
|
1697
|
+
"max-w-5xl": { maxWidth: 1024 },
|
|
1698
|
+
"max-w-6xl": { maxWidth: 1152 },
|
|
1699
|
+
"max-w-7xl": { maxWidth: 1280 },
|
|
1700
|
+
"max-w-prose": web ? { maxWidth: "65ch" } : null,
|
|
1701
|
+
// Extended cursors (web-only)
|
|
1702
|
+
"cursor-grab": web ? { cursor: "grab" } : null,
|
|
1703
|
+
"cursor-grabbing": web ? { cursor: "grabbing" } : null,
|
|
1704
|
+
"cursor-zoom-in": web ? { cursor: "zoom-in" } : null,
|
|
1705
|
+
"cursor-zoom-out": web ? { cursor: "zoom-out" } : null,
|
|
1706
|
+
"cursor-crosshair": web ? { cursor: "crosshair" } : null,
|
|
1707
|
+
"cursor-help": web ? { cursor: "help" } : null,
|
|
1708
|
+
"cursor-none": web ? { cursor: "none" } : null,
|
|
1709
|
+
// Overflow clip (web-only)
|
|
1710
|
+
"overflow-clip": web ? { overflow: "clip" } : null,
|
|
1711
|
+
"overflow-x-clip": web ? { overflowX: "clip" } : null,
|
|
1712
|
+
"overflow-y-clip": web ? { overflowY: "clip" } : null,
|
|
1713
|
+
// Scroll behavior (web-only)
|
|
1714
|
+
"scroll-smooth": web ? { scrollBehavior: "smooth" } : null,
|
|
1715
|
+
"scroll-auto": web ? { scrollBehavior: "auto" } : null,
|
|
1716
|
+
// Float (web-only)
|
|
1717
|
+
"float-left": web ? { float: "left" } : null,
|
|
1718
|
+
"float-right": web ? { float: "right" } : null,
|
|
1719
|
+
"float-start": web ? { float: "inline-start" } : null,
|
|
1720
|
+
"float-end": web ? { float: "inline-end" } : null,
|
|
1721
|
+
"float-none": web ? { float: "none" } : null,
|
|
1722
|
+
// Clear (web-only)
|
|
1723
|
+
"clear-left": web ? { clear: "left" } : null,
|
|
1724
|
+
"clear-right": web ? { clear: "right" } : null,
|
|
1725
|
+
"clear-both": web ? { clear: "both" } : null,
|
|
1726
|
+
"clear-start": web ? { clear: "inline-start" } : null,
|
|
1727
|
+
"clear-end": web ? { clear: "inline-end" } : null,
|
|
1728
|
+
"clear-none": web ? { clear: "none" } : null,
|
|
1729
|
+
// Vertical align (web-only)
|
|
1730
|
+
"align-baseline": web ? { verticalAlign: "baseline" } : null,
|
|
1731
|
+
"align-top": web ? { verticalAlign: "top" } : null,
|
|
1732
|
+
"align-middle": web ? { verticalAlign: "middle" } : null,
|
|
1733
|
+
"align-bottom": web ? { verticalAlign: "bottom" } : null,
|
|
1734
|
+
"align-text-top": web ? { verticalAlign: "text-top" } : null,
|
|
1735
|
+
"align-text-bottom": web ? { verticalAlign: "text-bottom" } : null,
|
|
1736
|
+
"align-sub": web ? { verticalAlign: "sub" } : null,
|
|
1737
|
+
"align-super": web ? { verticalAlign: "super" } : null,
|
|
1738
|
+
// Touch action (web-only)
|
|
1739
|
+
"touch-auto": web ? { touchAction: "auto" } : null,
|
|
1740
|
+
"touch-none": web ? { touchAction: "none" } : null,
|
|
1741
|
+
"touch-pan-x": web ? { touchAction: "pan-x" } : null,
|
|
1742
|
+
"touch-pan-y": web ? { touchAction: "pan-y" } : null,
|
|
1743
|
+
"touch-pan-left": web ? { touchAction: "pan-left" } : null,
|
|
1744
|
+
"touch-pan-right": web ? { touchAction: "pan-right" } : null,
|
|
1745
|
+
"touch-pan-up": web ? { touchAction: "pan-up" } : null,
|
|
1746
|
+
"touch-pan-down": web ? { touchAction: "pan-down" } : null,
|
|
1747
|
+
"touch-pinch-zoom": web ? { touchAction: "pinch-zoom" } : null,
|
|
1748
|
+
"touch-manipulation": web ? { touchAction: "manipulation" } : null
|
|
1749
|
+
};
|
|
1750
|
+
}
|
|
1751
|
+
function getStandalone() {
|
|
1752
|
+
if (!_standalone) _standalone = buildStandalone();
|
|
1753
|
+
return _standalone;
|
|
1754
|
+
}
|
|
1736
1755
|
var RESOLVERS = {
|
|
1737
1756
|
// ── Background ─────────────────────────────────────────────────────────────
|
|
1738
1757
|
bg: ({ value, isArbitrary }, { colors }) => {
|
|
@@ -1740,7 +1759,7 @@ var RESOLVERS = {
|
|
|
1740
1759
|
return color ? { backgroundColor: color } : null;
|
|
1741
1760
|
},
|
|
1742
1761
|
"bg-opacity": ({ value }, _) => {
|
|
1743
|
-
if (!
|
|
1762
|
+
if (!getEffectiveIsWeb()) return null;
|
|
1744
1763
|
const v = parseFloat(value) / 100;
|
|
1745
1764
|
return isNaN(v) ? null : { "--bg-opacity": v };
|
|
1746
1765
|
},
|
|
@@ -1750,7 +1769,7 @@ var RESOLVERS = {
|
|
|
1750
1769
|
if (!isArbitrary && size !== null) return { fontSize: size };
|
|
1751
1770
|
if (isArbitrary) {
|
|
1752
1771
|
if (/^\d/.test(value) || /^(calc|min|max|clamp)/.test(value)) {
|
|
1753
|
-
return { fontSize:
|
|
1772
|
+
return { fontSize: getEffectiveIsWeb() ? value : toNativeValue(value) };
|
|
1754
1773
|
}
|
|
1755
1774
|
return { color: value };
|
|
1756
1775
|
}
|
|
@@ -1758,7 +1777,7 @@ var RESOLVERS = {
|
|
|
1758
1777
|
return color ? { color } : null;
|
|
1759
1778
|
},
|
|
1760
1779
|
"text-opacity": ({ value }, _) => {
|
|
1761
|
-
if (!
|
|
1780
|
+
if (!getEffectiveIsWeb()) return null;
|
|
1762
1781
|
const v = parseFloat(value) / 100;
|
|
1763
1782
|
return isNaN(v) ? null : { "--text-opacity": v };
|
|
1764
1783
|
},
|
|
@@ -1954,7 +1973,7 @@ var RESOLVERS = {
|
|
|
1954
1973
|
},
|
|
1955
1974
|
// ── Grid template columns/rows (Tailwind-style aliases, web-only) ──────────
|
|
1956
1975
|
"grid-cols": ({ value, isArbitrary }) => {
|
|
1957
|
-
if (!
|
|
1976
|
+
if (!getEffectiveIsWeb()) return null;
|
|
1958
1977
|
if (!value) return null;
|
|
1959
1978
|
if (isArbitrary) return { display: "grid", gridTemplateColumns: value };
|
|
1960
1979
|
if (value === "none") return { display: "grid", gridTemplateColumns: "none" };
|
|
@@ -1963,7 +1982,7 @@ var RESOLVERS = {
|
|
|
1963
1982
|
return { display: "grid", gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` };
|
|
1964
1983
|
},
|
|
1965
1984
|
"grid-rows": ({ value, isArbitrary }) => {
|
|
1966
|
-
if (!
|
|
1985
|
+
if (!getEffectiveIsWeb()) return null;
|
|
1967
1986
|
if (!value) return null;
|
|
1968
1987
|
if (isArbitrary) return { gridTemplateRows: value };
|
|
1969
1988
|
if (value === "none") return { gridTemplateRows: "none" };
|
|
@@ -1973,7 +1992,7 @@ var RESOLVERS = {
|
|
|
1973
1992
|
},
|
|
1974
1993
|
// ── Grid auto flow (web-only) ─────────────────────────────────────────────
|
|
1975
1994
|
"grid-flow": ({ value }) => {
|
|
1976
|
-
if (!
|
|
1995
|
+
if (!getEffectiveIsWeb()) return null;
|
|
1977
1996
|
const flows = {
|
|
1978
1997
|
row: "row",
|
|
1979
1998
|
col: "column",
|
|
@@ -1986,7 +2005,7 @@ var RESOLVERS = {
|
|
|
1986
2005
|
},
|
|
1987
2006
|
// ── Grid auto sizing (web-only) ───────────────────────────────────────────
|
|
1988
2007
|
"auto-cols": ({ value, isArbitrary }) => {
|
|
1989
|
-
if (!
|
|
2008
|
+
if (!getEffectiveIsWeb()) return null;
|
|
1990
2009
|
if (isArbitrary) return { gridAutoColumns: value };
|
|
1991
2010
|
const presets = {
|
|
1992
2011
|
auto: "auto",
|
|
@@ -1998,7 +2017,7 @@ var RESOLVERS = {
|
|
|
1998
2017
|
return v ? { gridAutoColumns: v } : null;
|
|
1999
2018
|
},
|
|
2000
2019
|
"auto-rows": ({ value, isArbitrary }) => {
|
|
2001
|
-
if (!
|
|
2020
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2002
2021
|
if (isArbitrary) return { gridAutoRows: value };
|
|
2003
2022
|
const presets = {
|
|
2004
2023
|
auto: "auto",
|
|
@@ -2011,54 +2030,54 @@ var RESOLVERS = {
|
|
|
2011
2030
|
},
|
|
2012
2031
|
// ── Grid column placement (web-only) ──────────────────────────────────────
|
|
2013
2032
|
"col-span": ({ value }) => {
|
|
2014
|
-
if (!
|
|
2033
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2015
2034
|
if (value === "full") return { gridColumn: "1 / -1" };
|
|
2016
2035
|
const n = parseInt(value, 10);
|
|
2017
2036
|
return isNaN(n) ? null : { gridColumn: `span ${n} / span ${n}` };
|
|
2018
2037
|
},
|
|
2019
2038
|
"col-start": ({ value, isArbitrary }) => {
|
|
2020
|
-
if (!
|
|
2039
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2021
2040
|
if (value === "auto") return { gridColumnStart: "auto" };
|
|
2022
2041
|
if (isArbitrary) return { gridColumnStart: value };
|
|
2023
2042
|
const n = parseInt(value, 10);
|
|
2024
2043
|
return isNaN(n) ? null : { gridColumnStart: n };
|
|
2025
2044
|
},
|
|
2026
2045
|
"col-end": ({ value, isArbitrary }) => {
|
|
2027
|
-
if (!
|
|
2046
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2028
2047
|
if (value === "auto") return { gridColumnEnd: "auto" };
|
|
2029
2048
|
if (isArbitrary) return { gridColumnEnd: value };
|
|
2030
2049
|
const n = parseInt(value, 10);
|
|
2031
2050
|
return isNaN(n) ? null : { gridColumnEnd: n };
|
|
2032
2051
|
},
|
|
2033
2052
|
col: ({ value, isArbitrary }) => {
|
|
2034
|
-
if (!
|
|
2053
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2035
2054
|
if (!value || value === "auto") return { gridColumn: "auto" };
|
|
2036
2055
|
if (isArbitrary) return { gridColumn: value };
|
|
2037
2056
|
return null;
|
|
2038
2057
|
},
|
|
2039
2058
|
// ── Grid row placement (web-only) ─────────────────────────────────────────
|
|
2040
2059
|
"row-span": ({ value }) => {
|
|
2041
|
-
if (!
|
|
2060
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2042
2061
|
if (value === "full") return { gridRow: "1 / -1" };
|
|
2043
2062
|
const n = parseInt(value, 10);
|
|
2044
2063
|
return isNaN(n) ? null : { gridRow: `span ${n} / span ${n}` };
|
|
2045
2064
|
},
|
|
2046
2065
|
"row-start": ({ value, isArbitrary }) => {
|
|
2047
|
-
if (!
|
|
2066
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2048
2067
|
if (value === "auto") return { gridRowStart: "auto" };
|
|
2049
2068
|
if (isArbitrary) return { gridRowStart: value };
|
|
2050
2069
|
const n = parseInt(value, 10);
|
|
2051
2070
|
return isNaN(n) ? null : { gridRowStart: n };
|
|
2052
2071
|
},
|
|
2053
2072
|
"row-end": ({ value, isArbitrary }) => {
|
|
2054
|
-
if (!
|
|
2073
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2055
2074
|
if (value === "auto") return { gridRowEnd: "auto" };
|
|
2056
2075
|
if (isArbitrary) return { gridRowEnd: value };
|
|
2057
2076
|
const n = parseInt(value, 10);
|
|
2058
2077
|
return isNaN(n) ? null : { gridRowEnd: n };
|
|
2059
2078
|
},
|
|
2060
2079
|
row: ({ value, isArbitrary }) => {
|
|
2061
|
-
if (!
|
|
2080
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2062
2081
|
if (!value || value === "auto") return { gridRow: "auto" };
|
|
2063
2082
|
if (isArbitrary) return { gridRow: value };
|
|
2064
2083
|
return null;
|
|
@@ -2066,7 +2085,7 @@ var RESOLVERS = {
|
|
|
2066
2085
|
// ── Grid alignment (web-only) ──────────────────────────────────────────────
|
|
2067
2086
|
// place-items is shorthand for align-items + justify-items on a grid container
|
|
2068
2087
|
"place-items": ({ value }) => {
|
|
2069
|
-
if (!
|
|
2088
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2070
2089
|
const map = {
|
|
2071
2090
|
start: "start",
|
|
2072
2091
|
end: "end",
|
|
@@ -2078,7 +2097,7 @@ var RESOLVERS = {
|
|
|
2078
2097
|
},
|
|
2079
2098
|
// place-content is shorthand for align-content + justify-content on a grid container
|
|
2080
2099
|
"place-content": ({ value }) => {
|
|
2081
|
-
if (!
|
|
2100
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2082
2101
|
const map = {
|
|
2083
2102
|
start: "start",
|
|
2084
2103
|
end: "end",
|
|
@@ -2093,7 +2112,7 @@ var RESOLVERS = {
|
|
|
2093
2112
|
},
|
|
2094
2113
|
// justify-items controls inline-axis alignment of grid items within their cells
|
|
2095
2114
|
"justify-items": ({ value }) => {
|
|
2096
|
-
if (!
|
|
2115
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2097
2116
|
const map = {
|
|
2098
2117
|
start: "start",
|
|
2099
2118
|
end: "end",
|
|
@@ -2104,7 +2123,7 @@ var RESOLVERS = {
|
|
|
2104
2123
|
},
|
|
2105
2124
|
// place-self is shorthand for align-self + justify-self on a grid item
|
|
2106
2125
|
"place-self": ({ value }) => {
|
|
2107
|
-
if (!
|
|
2126
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2108
2127
|
const map = {
|
|
2109
2128
|
auto: "auto",
|
|
2110
2129
|
start: "start",
|
|
@@ -2116,7 +2135,7 @@ var RESOLVERS = {
|
|
|
2116
2135
|
},
|
|
2117
2136
|
// justify-self controls inline-axis self-alignment of a grid item
|
|
2118
2137
|
"justify-self": ({ value }) => {
|
|
2119
|
-
if (!
|
|
2138
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2120
2139
|
const map = {
|
|
2121
2140
|
auto: "auto",
|
|
2122
2141
|
start: "start",
|
|
@@ -2128,7 +2147,7 @@ var RESOLVERS = {
|
|
|
2128
2147
|
},
|
|
2129
2148
|
// ── CSS Filters (composable via CSS variables, web-only) ─────────────────
|
|
2130
2149
|
blur: ({ value, isArbitrary }) => {
|
|
2131
|
-
if (!
|
|
2150
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2132
2151
|
const sizes = {
|
|
2133
2152
|
"": "blur(8px)",
|
|
2134
2153
|
sm: "blur(4px)",
|
|
@@ -2143,43 +2162,43 @@ var RESOLVERS = {
|
|
|
2143
2162
|
return v !== void 0 ? { "--tw-blur": v, filter: FILTER_COMPOSE } : null;
|
|
2144
2163
|
},
|
|
2145
2164
|
brightness: ({ value, isArbitrary }) => {
|
|
2146
|
-
if (!
|
|
2165
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2147
2166
|
const v = isArbitrary ? `brightness(${value})` : `brightness(${parseFloat(value) / 100})`;
|
|
2148
2167
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-brightness": v, filter: FILTER_COMPOSE };
|
|
2149
2168
|
},
|
|
2150
2169
|
contrast: ({ value, isArbitrary }) => {
|
|
2151
|
-
if (!
|
|
2170
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2152
2171
|
const v = isArbitrary ? `contrast(${value})` : `contrast(${parseFloat(value) / 100})`;
|
|
2153
2172
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-contrast": v, filter: FILTER_COMPOSE };
|
|
2154
2173
|
},
|
|
2155
2174
|
grayscale: ({ value }) => {
|
|
2156
|
-
if (!
|
|
2175
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2157
2176
|
const v = value === "0" ? "grayscale(0)" : "grayscale(100%)";
|
|
2158
2177
|
return { "--tw-grayscale": v, filter: FILTER_COMPOSE };
|
|
2159
2178
|
},
|
|
2160
2179
|
"hue-rotate": ({ value, negative, isArbitrary }) => {
|
|
2161
|
-
if (!
|
|
2180
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2162
2181
|
const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
|
|
2163
2182
|
if (isNaN(parseFloat(deg)) && !isArbitrary) return null;
|
|
2164
2183
|
return { "--tw-hue-rotate": `hue-rotate(${deg})`, filter: FILTER_COMPOSE };
|
|
2165
2184
|
},
|
|
2166
2185
|
invert: ({ value }) => {
|
|
2167
|
-
if (!
|
|
2186
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2168
2187
|
const v = value === "0" ? "invert(0)" : "invert(100%)";
|
|
2169
2188
|
return { "--tw-invert": v, filter: FILTER_COMPOSE };
|
|
2170
2189
|
},
|
|
2171
2190
|
saturate: ({ value, isArbitrary }) => {
|
|
2172
|
-
if (!
|
|
2191
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2173
2192
|
const v = isArbitrary ? `saturate(${value})` : `saturate(${parseFloat(value) / 100})`;
|
|
2174
2193
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-saturate": v, filter: FILTER_COMPOSE };
|
|
2175
2194
|
},
|
|
2176
2195
|
sepia: ({ value }) => {
|
|
2177
|
-
if (!
|
|
2196
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2178
2197
|
const v = value === "0" ? "sepia(0)" : "sepia(100%)";
|
|
2179
2198
|
return { "--tw-sepia": v, filter: FILTER_COMPOSE };
|
|
2180
2199
|
},
|
|
2181
2200
|
"drop-shadow": ({ value, isArbitrary }) => {
|
|
2182
|
-
if (!
|
|
2201
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2183
2202
|
if (isArbitrary) return { "--tw-drop-shadow": `drop-shadow(${value.replace(/_/g, " ")})`, filter: FILTER_COMPOSE };
|
|
2184
2203
|
const presets = {
|
|
2185
2204
|
"": "drop-shadow(0 1px 2px rgb(0 0 0/0.1)) drop-shadow(0 1px 1px rgb(0 0 0/0.06))",
|
|
@@ -2195,14 +2214,14 @@ var RESOLVERS = {
|
|
|
2195
2214
|
},
|
|
2196
2215
|
// Arbitrary full filter string: filter-[blur(4px)_grayscale(1)]
|
|
2197
2216
|
filter: ({ value, isArbitrary }) => {
|
|
2198
|
-
if (!
|
|
2217
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2199
2218
|
if (isArbitrary) return { filter: value.replace(/_/g, " ") };
|
|
2200
2219
|
if (value === "none") return { filter: "none" };
|
|
2201
2220
|
return null;
|
|
2202
2221
|
},
|
|
2203
2222
|
// ── Backdrop Filters (composable via CSS variables, web-only) ────────────
|
|
2204
2223
|
"backdrop-blur": ({ value, isArbitrary }) => {
|
|
2205
|
-
if (!
|
|
2224
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2206
2225
|
const sizes = {
|
|
2207
2226
|
"": "blur(8px)",
|
|
2208
2227
|
sm: "blur(4px)",
|
|
@@ -2217,52 +2236,52 @@ var RESOLVERS = {
|
|
|
2217
2236
|
return v !== void 0 ? { "--tw-backdrop-blur": v, backdropFilter: BACKDROP_FILTER_COMPOSE } : null;
|
|
2218
2237
|
},
|
|
2219
2238
|
"backdrop-brightness": ({ value, isArbitrary }) => {
|
|
2220
|
-
if (!
|
|
2239
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2221
2240
|
const v = isArbitrary ? `brightness(${value})` : `brightness(${parseFloat(value) / 100})`;
|
|
2222
2241
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-brightness": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2223
2242
|
},
|
|
2224
2243
|
"backdrop-contrast": ({ value, isArbitrary }) => {
|
|
2225
|
-
if (!
|
|
2244
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2226
2245
|
const v = isArbitrary ? `contrast(${value})` : `contrast(${parseFloat(value) / 100})`;
|
|
2227
2246
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-contrast": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2228
2247
|
},
|
|
2229
2248
|
"backdrop-grayscale": ({ value }) => {
|
|
2230
|
-
if (!
|
|
2249
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2231
2250
|
return { "--tw-backdrop-grayscale": value === "0" ? "grayscale(0)" : "grayscale(100%)", backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2232
2251
|
},
|
|
2233
2252
|
"backdrop-hue-rotate": ({ value, negative, isArbitrary }) => {
|
|
2234
|
-
if (!
|
|
2253
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2235
2254
|
const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
|
|
2236
2255
|
if (isNaN(parseFloat(deg)) && !isArbitrary) return null;
|
|
2237
2256
|
return { "--tw-backdrop-hue-rotate": `hue-rotate(${deg})`, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2238
2257
|
},
|
|
2239
2258
|
"backdrop-invert": ({ value }) => {
|
|
2240
|
-
if (!
|
|
2259
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2241
2260
|
return { "--tw-backdrop-invert": value === "0" ? "invert(0)" : "invert(100%)", backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2242
2261
|
},
|
|
2243
2262
|
"backdrop-opacity": ({ value, isArbitrary }) => {
|
|
2244
|
-
if (!
|
|
2263
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2245
2264
|
const v = isArbitrary ? `opacity(${value})` : `opacity(${parseFloat(value) / 100})`;
|
|
2246
2265
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-opacity": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2247
2266
|
},
|
|
2248
2267
|
"backdrop-saturate": ({ value, isArbitrary }) => {
|
|
2249
|
-
if (!
|
|
2268
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2250
2269
|
const v = isArbitrary ? `saturate(${value})` : `saturate(${parseFloat(value) / 100})`;
|
|
2251
2270
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-saturate": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2252
2271
|
},
|
|
2253
2272
|
"backdrop-sepia": ({ value }) => {
|
|
2254
|
-
if (!
|
|
2273
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2255
2274
|
return { "--tw-backdrop-sepia": value === "0" ? "sepia(0)" : "sepia(100%)", backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2256
2275
|
},
|
|
2257
2276
|
"backdrop-filter": ({ value, isArbitrary }) => {
|
|
2258
|
-
if (!
|
|
2277
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2259
2278
|
if (isArbitrary) return { backdropFilter: value.replace(/_/g, " ") };
|
|
2260
2279
|
if (value === "none") return { backdropFilter: "none" };
|
|
2261
2280
|
return null;
|
|
2262
2281
|
},
|
|
2263
2282
|
// ── Background gradient (CSS variable gradient stops, web-only) ──────────
|
|
2264
2283
|
"bg-gradient-to": ({ value }) => {
|
|
2265
|
-
if (!
|
|
2284
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2266
2285
|
const directions = {
|
|
2267
2286
|
t: "to top",
|
|
2268
2287
|
tr: "to top right",
|
|
@@ -2280,7 +2299,7 @@ var RESOLVERS = {
|
|
|
2280
2299
|
};
|
|
2281
2300
|
},
|
|
2282
2301
|
from: ({ value, isArbitrary }, { colors }) => {
|
|
2283
|
-
if (!
|
|
2302
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2284
2303
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2285
2304
|
if (!color) return null;
|
|
2286
2305
|
return {
|
|
@@ -2289,7 +2308,7 @@ var RESOLVERS = {
|
|
|
2289
2308
|
};
|
|
2290
2309
|
},
|
|
2291
2310
|
via: ({ value, isArbitrary }, { colors }) => {
|
|
2292
|
-
if (!
|
|
2311
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2293
2312
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2294
2313
|
if (!color) return null;
|
|
2295
2314
|
return {
|
|
@@ -2298,7 +2317,7 @@ var RESOLVERS = {
|
|
|
2298
2317
|
};
|
|
2299
2318
|
},
|
|
2300
2319
|
to: ({ value, isArbitrary }, { colors }) => {
|
|
2301
|
-
if (!
|
|
2320
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2302
2321
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2303
2322
|
if (!color) return null;
|
|
2304
2323
|
return { "--tw-gradient-to": color };
|
|
@@ -2307,23 +2326,23 @@ var RESOLVERS = {
|
|
|
2307
2326
|
"skew-x": ({ value, negative, isArbitrary }) => {
|
|
2308
2327
|
const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
|
|
2309
2328
|
if (!isArbitrary && isNaN(parseFloat(value))) return null;
|
|
2310
|
-
return
|
|
2329
|
+
return getEffectiveIsWeb() ? { transform: `skewX(${deg})` } : { transform: [{ skewX: deg }] };
|
|
2311
2330
|
},
|
|
2312
2331
|
"skew-y": ({ value, negative, isArbitrary }) => {
|
|
2313
2332
|
const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
|
|
2314
2333
|
if (!isArbitrary && isNaN(parseFloat(value))) return null;
|
|
2315
|
-
return
|
|
2334
|
+
return getEffectiveIsWeb() ? { transform: `skewY(${deg})` } : { transform: [{ skewY: deg }] };
|
|
2316
2335
|
},
|
|
2317
2336
|
// Arbitrary full transform string: transform-[rotate(45deg)_scale(1.5)]
|
|
2318
2337
|
transform: ({ value, isArbitrary }) => {
|
|
2319
|
-
if (!
|
|
2338
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2320
2339
|
if (isArbitrary) return { transform: value.replace(/_/g, " ") };
|
|
2321
2340
|
if (value === "none") return { transform: "none" };
|
|
2322
2341
|
return null;
|
|
2323
2342
|
},
|
|
2324
2343
|
// Transform origin
|
|
2325
2344
|
origin: ({ value, isArbitrary }) => {
|
|
2326
|
-
if (!
|
|
2345
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2327
2346
|
if (isArbitrary) return { transformOrigin: value.replace(/_/g, " ") };
|
|
2328
2347
|
const origins = {
|
|
2329
2348
|
center: "center",
|
|
@@ -2340,7 +2359,7 @@ var RESOLVERS = {
|
|
|
2340
2359
|
},
|
|
2341
2360
|
// ── Text decoration advanced (web-only) ───────────────────────────────────
|
|
2342
2361
|
decoration: ({ value, isArbitrary }, { colors }) => {
|
|
2343
|
-
if (!
|
|
2362
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2344
2363
|
if (isArbitrary) {
|
|
2345
2364
|
if (/^\d/.test(value) || value.startsWith("calc(")) return { textDecorationThickness: value };
|
|
2346
2365
|
return { textDecorationColor: value };
|
|
@@ -2367,7 +2386,7 @@ var RESOLVERS = {
|
|
|
2367
2386
|
return color ? { textDecorationColor: color } : null;
|
|
2368
2387
|
},
|
|
2369
2388
|
"underline-offset": ({ value, isArbitrary }) => {
|
|
2370
|
-
if (!
|
|
2389
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2371
2390
|
if (isArbitrary) return { textUnderlineOffset: value };
|
|
2372
2391
|
const offsets = {
|
|
2373
2392
|
auto: "auto",
|
|
@@ -2381,7 +2400,7 @@ var RESOLVERS = {
|
|
|
2381
2400
|
},
|
|
2382
2401
|
// ── Outline extended (web-only) ───────────────────────────────────────────
|
|
2383
2402
|
outline: ({ value, isArbitrary }, { colors }) => {
|
|
2384
|
-
if (!
|
|
2403
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2385
2404
|
if (!value) return { outline: "2px solid transparent", outlineOffset: "2px" };
|
|
2386
2405
|
if (value === "none") return { outline: "none", outlineOffset: "0" };
|
|
2387
2406
|
if (isArbitrary) {
|
|
@@ -2394,14 +2413,14 @@ var RESOLVERS = {
|
|
|
2394
2413
|
return color ? { outlineColor: color } : null;
|
|
2395
2414
|
},
|
|
2396
2415
|
"outline-offset": ({ value, isArbitrary }) => {
|
|
2397
|
-
if (!
|
|
2416
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2398
2417
|
if (isArbitrary) return { outlineOffset: value };
|
|
2399
2418
|
const offsets = { "0": "0px", "1": "1px", "2": "2px", "4": "4px", "8": "8px" };
|
|
2400
2419
|
return offsets[value] ? { outlineOffset: offsets[value] } : null;
|
|
2401
2420
|
},
|
|
2402
2421
|
// ── Columns (web-only) ─────────────────────────────────────────────────────
|
|
2403
2422
|
columns: ({ value, isArbitrary }) => {
|
|
2404
|
-
if (!
|
|
2423
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2405
2424
|
if (isArbitrary) return { columnCount: value };
|
|
2406
2425
|
if (value === "auto") return { columnCount: "auto" };
|
|
2407
2426
|
const n = parseInt(value, 10);
|
|
@@ -2425,7 +2444,7 @@ var RESOLVERS = {
|
|
|
2425
2444
|
},
|
|
2426
2445
|
// ── Mix / background blend mode (web-only) ───────────────────────────────
|
|
2427
2446
|
"mix-blend": ({ value }) => {
|
|
2428
|
-
if (!
|
|
2447
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2429
2448
|
const modes = [
|
|
2430
2449
|
"normal",
|
|
2431
2450
|
"multiply",
|
|
@@ -2448,7 +2467,7 @@ var RESOLVERS = {
|
|
|
2448
2467
|
return modes.includes(value) ? { mixBlendMode: value } : null;
|
|
2449
2468
|
},
|
|
2450
2469
|
"bg-blend": ({ value }) => {
|
|
2451
|
-
if (!
|
|
2470
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2452
2471
|
const modes = [
|
|
2453
2472
|
"normal",
|
|
2454
2473
|
"multiply",
|
|
@@ -2471,7 +2490,7 @@ var RESOLVERS = {
|
|
|
2471
2490
|
},
|
|
2472
2491
|
// ── Will-change (web-only) ─────────────────────────────────────────────────
|
|
2473
2492
|
"will-change": ({ value, isArbitrary }) => {
|
|
2474
|
-
if (!
|
|
2493
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2475
2494
|
if (isArbitrary) return { willChange: value.replace(/_/g, ", ") };
|
|
2476
2495
|
const presets = {
|
|
2477
2496
|
auto: "auto",
|
|
@@ -2485,21 +2504,21 @@ var RESOLVERS = {
|
|
|
2485
2504
|
// These return special __divide* markers that resolver.ts converts to
|
|
2486
2505
|
// .cls > * + * { border-... } CSS rules. No inline style is applied.
|
|
2487
2506
|
"divide-x": ({ value, isArbitrary }) => {
|
|
2488
|
-
if (!
|
|
2507
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2489
2508
|
if (value === "reverse") return null;
|
|
2490
2509
|
if (!value) return { __divideX: 1 };
|
|
2491
2510
|
const n = parseFloat(value);
|
|
2492
2511
|
return isNaN(n) ? null : { __divideX: n };
|
|
2493
2512
|
},
|
|
2494
2513
|
"divide-y": ({ value, isArbitrary }) => {
|
|
2495
|
-
if (!
|
|
2514
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2496
2515
|
if (value === "reverse") return null;
|
|
2497
2516
|
if (!value) return { __divideY: 1 };
|
|
2498
2517
|
const n = parseFloat(value);
|
|
2499
2518
|
return isNaN(n) ? null : { __divideY: n };
|
|
2500
2519
|
},
|
|
2501
2520
|
divide: ({ value, isArbitrary }, { colors }) => {
|
|
2502
|
-
if (!
|
|
2521
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2503
2522
|
if (isArbitrary) return { __divideColor: value };
|
|
2504
2523
|
const styleTokens = {
|
|
2505
2524
|
solid: "solid",
|
|
@@ -2516,7 +2535,7 @@ var RESOLVERS = {
|
|
|
2516
2535
|
// Named presets give cross-platform shadow; arbitrary is web-only.
|
|
2517
2536
|
"text-shadow": ({ value, isArbitrary }, { colors }) => {
|
|
2518
2537
|
if (value === "none") {
|
|
2519
|
-
return
|
|
2538
|
+
return getEffectiveIsWeb() ? { textShadow: "none" } : { textShadowColor: "transparent", textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 0 };
|
|
2520
2539
|
}
|
|
2521
2540
|
const webPresets = {
|
|
2522
2541
|
"": "0 2px 4px rgba(0,0,0,0.3)",
|
|
@@ -2533,15 +2552,15 @@ var RESOLVERS = {
|
|
|
2533
2552
|
xl: { textShadowColor: "rgba(0,0,0,0.5)", textShadowOffset: { width: 0, height: 16 }, textShadowRadius: 32 }
|
|
2534
2553
|
};
|
|
2535
2554
|
if (value in webPresets) {
|
|
2536
|
-
if (
|
|
2555
|
+
if (getEffectiveIsWeb()) return { textShadow: webPresets[value] };
|
|
2537
2556
|
return nativePresets[value] ?? null;
|
|
2538
2557
|
}
|
|
2539
2558
|
if (isArbitrary) {
|
|
2540
|
-
return
|
|
2559
|
+
return getEffectiveIsWeb() ? { textShadow: value.replace(/_/g, " ") } : null;
|
|
2541
2560
|
}
|
|
2542
2561
|
const color = resolveColor(value, colors, false);
|
|
2543
2562
|
if (color) {
|
|
2544
|
-
return
|
|
2563
|
+
return getEffectiveIsWeb() ? { textShadow: `0 2px 4px ${color}` } : { textShadowColor: color };
|
|
2545
2564
|
}
|
|
2546
2565
|
return null;
|
|
2547
2566
|
},
|
|
@@ -2549,13 +2568,13 @@ var RESOLVERS = {
|
|
|
2549
2568
|
perspective: ({ value, isArbitrary }) => {
|
|
2550
2569
|
if (isArbitrary) {
|
|
2551
2570
|
const numPx = parseFloat(value);
|
|
2552
|
-
if (
|
|
2571
|
+
if (getEffectiveIsWeb()) return { transform: `perspective(${value})` };
|
|
2553
2572
|
return isNaN(numPx) ? null : { transform: [{ perspective: numPx }] };
|
|
2554
2573
|
}
|
|
2555
|
-
if (value === "none") return
|
|
2574
|
+
if (value === "none") return getEffectiveIsWeb() ? { transform: "none" } : null;
|
|
2556
2575
|
const n = parseFloat(value);
|
|
2557
2576
|
if (isNaN(n)) return null;
|
|
2558
|
-
return
|
|
2577
|
+
return getEffectiveIsWeb() ? { transform: `perspective(${n}px)` } : { transform: [{ perspective: n }] };
|
|
2559
2578
|
},
|
|
2560
2579
|
// ── Tint color (native-only, for Image and icon components) ──────────────
|
|
2561
2580
|
tint: ({ value, isArbitrary }, { colors }) => {
|
|
@@ -2573,7 +2592,7 @@ var RESOLVERS = {
|
|
|
2573
2592
|
// resolver.ts detects __keyframe, injects the rule, then strips the marker
|
|
2574
2593
|
// so it never reaches element inline styles.
|
|
2575
2594
|
animate: ({ value, isArbitrary }) => {
|
|
2576
|
-
if (!
|
|
2595
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2577
2596
|
if (isArbitrary) return { animation: value.replace(/_/g, " ") };
|
|
2578
2597
|
const defs = {
|
|
2579
2598
|
none: { animation: "none" },
|
|
@@ -2599,7 +2618,7 @@ var RESOLVERS = {
|
|
|
2599
2618
|
},
|
|
2600
2619
|
// ── Line-clamp (web-only) ─────────────────────────────────────────────────
|
|
2601
2620
|
"line-clamp": ({ value }) => {
|
|
2602
|
-
if (!
|
|
2621
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2603
2622
|
if (value === "none") return { overflow: "visible", display: "block", WebkitLineClamp: "unset" };
|
|
2604
2623
|
const n = parseInt(value, 10);
|
|
2605
2624
|
if (isNaN(n) || n < 1) return null;
|
|
@@ -2612,14 +2631,14 @@ var RESOLVERS = {
|
|
|
2612
2631
|
},
|
|
2613
2632
|
// ── Caret color (web-only) ────────────────────────────────────────────────
|
|
2614
2633
|
caret: ({ value, isArbitrary }, { colors }) => {
|
|
2615
|
-
if (!
|
|
2634
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2616
2635
|
if (value === "auto" || value === "transparent") return { caretColor: value };
|
|
2617
2636
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2618
2637
|
return color ? { caretColor: color } : null;
|
|
2619
2638
|
},
|
|
2620
2639
|
// ── Accent color (web-only) ───────────────────────────────────────────────
|
|
2621
2640
|
accent: ({ value, isArbitrary }, { colors }) => {
|
|
2622
|
-
if (!
|
|
2641
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2623
2642
|
if (value === "auto") return { accentColor: "auto" };
|
|
2624
2643
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2625
2644
|
return color ? { accentColor: color } : null;
|
|
@@ -2703,7 +2722,7 @@ var RESOLVERS = {
|
|
|
2703
2722
|
}
|
|
2704
2723
|
const v = zIndex[value];
|
|
2705
2724
|
if (v !== void 0) {
|
|
2706
|
-
if (v === "auto") return
|
|
2725
|
+
if (v === "auto") return getEffectiveIsWeb() ? { zIndex: "auto" } : null;
|
|
2707
2726
|
return { zIndex: v };
|
|
2708
2727
|
}
|
|
2709
2728
|
const n = parseInt(value);
|
|
@@ -2732,13 +2751,13 @@ var RESOLVERS = {
|
|
|
2732
2751
|
},
|
|
2733
2752
|
// ── Line height ────────────────────────────────────────────────────────────
|
|
2734
2753
|
leading: ({ value, isArbitrary }, { lineHeight }) => {
|
|
2735
|
-
if (isArbitrary) return { lineHeight:
|
|
2754
|
+
if (isArbitrary) return { lineHeight: getEffectiveIsWeb() ? value : toNativeValue(value) };
|
|
2736
2755
|
const v = lineHeight[value];
|
|
2737
2756
|
return v !== void 0 ? { lineHeight: v } : null;
|
|
2738
2757
|
},
|
|
2739
2758
|
// ── Letter spacing ─────────────────────────────────────────────────────────
|
|
2740
2759
|
tracking: ({ value, isArbitrary }, { letterSpacing }) => {
|
|
2741
|
-
if (isArbitrary) return { letterSpacing:
|
|
2760
|
+
if (isArbitrary) return { letterSpacing: getEffectiveIsWeb() ? value : toNativeValue(value) };
|
|
2742
2761
|
const v = letterSpacing[value];
|
|
2743
2762
|
return v !== void 0 ? { letterSpacing: v } : null;
|
|
2744
2763
|
},
|
|
@@ -2753,34 +2772,34 @@ var RESOLVERS = {
|
|
|
2753
2772
|
scale: ({ value, isArbitrary }) => {
|
|
2754
2773
|
const n = isArbitrary ? parseFloat(value) : parseFloat(value) / 100;
|
|
2755
2774
|
if (isNaN(n)) return null;
|
|
2756
|
-
return
|
|
2775
|
+
return getEffectiveIsWeb() ? { transform: `scale(${n})` } : { transform: [{ scale: n }] };
|
|
2757
2776
|
},
|
|
2758
2777
|
"scale-x": ({ value, isArbitrary }) => {
|
|
2759
2778
|
const n = isArbitrary ? parseFloat(value) : parseFloat(value) / 100;
|
|
2760
2779
|
if (isNaN(n)) return null;
|
|
2761
|
-
return
|
|
2780
|
+
return getEffectiveIsWeb() ? { transform: `scaleX(${n})` } : { transform: [{ scaleX: n }] };
|
|
2762
2781
|
},
|
|
2763
2782
|
"scale-y": ({ value, isArbitrary }) => {
|
|
2764
2783
|
const n = isArbitrary ? parseFloat(value) : parseFloat(value) / 100;
|
|
2765
2784
|
if (isNaN(n)) return null;
|
|
2766
|
-
return
|
|
2785
|
+
return getEffectiveIsWeb() ? { transform: `scaleY(${n})` } : { transform: [{ scaleY: n }] };
|
|
2767
2786
|
},
|
|
2768
2787
|
// ── Rotate ─────────────────────────────────────────────────────────────────
|
|
2769
2788
|
rotate: ({ value, negative, isArbitrary }) => {
|
|
2770
2789
|
if (isArbitrary) {
|
|
2771
2790
|
const finalValue = negative ? `-${value}` : value;
|
|
2772
|
-
return
|
|
2791
|
+
return getEffectiveIsWeb() ? { transform: `rotate(${finalValue})` } : { transform: [{ rotate: finalValue }] };
|
|
2773
2792
|
}
|
|
2774
2793
|
const deg = parseFloat(value);
|
|
2775
2794
|
if (isNaN(deg)) return null;
|
|
2776
2795
|
const finalDeg = negative ? -deg : deg;
|
|
2777
|
-
return
|
|
2796
|
+
return getEffectiveIsWeb() ? { transform: `rotate(${finalDeg}deg)` } : { transform: [{ rotate: `${finalDeg}deg` }] };
|
|
2778
2797
|
},
|
|
2779
2798
|
// ── Translate ──────────────────────────────────────────────────────────────
|
|
2780
2799
|
"translate-x": ({ value, negative, isArbitrary }, { spacing }) => {
|
|
2781
2800
|
const v = resolveSpacing(value, negative, spacing, isArbitrary);
|
|
2782
2801
|
if (v === null) return null;
|
|
2783
|
-
if (
|
|
2802
|
+
if (getEffectiveIsWeb()) return { transform: `translateX(${v})` };
|
|
2784
2803
|
if (typeof v === "string") {
|
|
2785
2804
|
const n = parseFloat(v);
|
|
2786
2805
|
return isNaN(n) ? null : { transform: [{ translateX: n }] };
|
|
@@ -2790,7 +2809,7 @@ var RESOLVERS = {
|
|
|
2790
2809
|
"translate-y": ({ value, negative, isArbitrary }, { spacing }) => {
|
|
2791
2810
|
const v = resolveSpacing(value, negative, spacing, isArbitrary);
|
|
2792
2811
|
if (v === null) return null;
|
|
2793
|
-
if (
|
|
2812
|
+
if (getEffectiveIsWeb()) return { transform: `translateY(${v})` };
|
|
2794
2813
|
if (typeof v === "string") {
|
|
2795
2814
|
const n = parseFloat(v);
|
|
2796
2815
|
return isNaN(n) ? null : { transform: [{ translateY: n }] };
|
|
@@ -2803,12 +2822,12 @@ var RESOLVERS = {
|
|
|
2803
2822
|
const presets = { auto: "auto", square: 1, video: 16 / 9 };
|
|
2804
2823
|
if (!(value in presets)) return null;
|
|
2805
2824
|
const v = presets[value];
|
|
2806
|
-
if (v === "auto") return
|
|
2825
|
+
if (v === "auto") return getEffectiveIsWeb() ? { aspectRatio: "auto" } : null;
|
|
2807
2826
|
return { aspectRatio: v };
|
|
2808
2827
|
},
|
|
2809
2828
|
// ── Transition (web-only; use Animated API on native) ─────────────────────
|
|
2810
2829
|
transition: ({ value }) => {
|
|
2811
|
-
if (!
|
|
2830
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2812
2831
|
const presets = {
|
|
2813
2832
|
"": "color 150ms, background-color 150ms, border-color 150ms, opacity 150ms, box-shadow 150ms",
|
|
2814
2833
|
all: "all 150ms",
|
|
@@ -2822,18 +2841,18 @@ var RESOLVERS = {
|
|
|
2822
2841
|
return v !== void 0 ? { transition: v } : null;
|
|
2823
2842
|
},
|
|
2824
2843
|
duration: ({ value, isArbitrary }) => {
|
|
2825
|
-
if (!
|
|
2844
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2826
2845
|
const ms = isArbitrary ? value : `${value}ms`;
|
|
2827
2846
|
return { transitionDuration: ms };
|
|
2828
2847
|
},
|
|
2829
2848
|
delay: ({ value, isArbitrary }) => {
|
|
2830
|
-
if (!
|
|
2849
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2831
2850
|
const ms = isArbitrary ? value : `${value}ms`;
|
|
2832
2851
|
return { transitionDelay: ms };
|
|
2833
2852
|
},
|
|
2834
2853
|
// ── Ring (web-only: box-shadow outline ring) ──────────────────────────────
|
|
2835
2854
|
ring: ({ value, isArbitrary }, { colors }) => {
|
|
2836
|
-
if (!
|
|
2855
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2837
2856
|
const DEFAULT_COLOR = "rgba(59, 130, 246, 0.5)";
|
|
2838
2857
|
const DEFAULT_WIDTH = 3;
|
|
2839
2858
|
if (!value) {
|
|
@@ -2860,7 +2879,7 @@ var RESOLVERS = {
|
|
|
2860
2879
|
return null;
|
|
2861
2880
|
},
|
|
2862
2881
|
"ring-offset": ({ value, isArbitrary }, _theme) => {
|
|
2863
|
-
if (!
|
|
2882
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2864
2883
|
const DEFAULT_RING_COLOR = "rgba(59, 130, 246, 0.5)";
|
|
2865
2884
|
const DEFAULT_RING_WIDTH = 3;
|
|
2866
2885
|
const offsetTokens = { "0": 0, "1": 1, "2": 2, "4": 4, "8": 8 };
|
|
@@ -2889,7 +2908,7 @@ function resolveUtility(parsed, theme) {
|
|
|
2889
2908
|
if (parsed.utility === "inline-grid") {
|
|
2890
2909
|
return { display: "inline-grid" };
|
|
2891
2910
|
}
|
|
2892
|
-
if (parsed.utility in
|
|
2911
|
+
if (parsed.utility in getStandalone()) return getStandalone()[parsed.utility] ?? null;
|
|
2893
2912
|
}
|
|
2894
2913
|
const resolver = PLUGIN_RESOLVERS[parsed.utility] ?? RESOLVERS[parsed.utility];
|
|
2895
2914
|
if (resolver) return resolver(parsed, theme);
|
|
@@ -2905,7 +2924,7 @@ function getPluginStandaloneMap() {
|
|
|
2905
2924
|
return PLUGIN_STANDALONE;
|
|
2906
2925
|
}
|
|
2907
2926
|
function isKnownUtility(utility) {
|
|
2908
|
-
return utility in
|
|
2927
|
+
return utility in getStandalone() || utility in RESOLVERS || utility in PLUGIN_STANDALONE || utility in PLUGIN_RESOLVERS;
|
|
2909
2928
|
}
|
|
2910
2929
|
|
|
2911
2930
|
// src/core/cache.ts
|
|
@@ -3538,6 +3557,7 @@ export {
|
|
|
3538
3557
|
defaultColors,
|
|
3539
3558
|
defaultTheme,
|
|
3540
3559
|
isWeb,
|
|
3560
|
+
setCSSGenMode,
|
|
3541
3561
|
parseClass,
|
|
3542
3562
|
parseClasses,
|
|
3543
3563
|
syncGlobalWidth,
|