@kbach/react 0.5.33 → 0.5.35
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-VZD4672I.mjs → chunk-65BTN2UR.mjs} +2 -2
- package/dist/{chunk-X6FH5QTD.mjs → chunk-VRYE5CAE.mjs} +1 -1
- package/dist/{chunk-SOBLKZGE.mjs → chunk-YU55J6F6.mjs} +477 -437
- package/dist/index.js +472 -437
- package/dist/index.mjs +2 -2
- package/dist/jsx-dev-runtime.js +472 -437
- package/dist/jsx-dev-runtime.mjs +3 -3
- package/dist/jsx-runtime.js +472 -437
- package/dist/jsx-runtime.mjs +3 -3
- package/dist/vite-plugin.js +489 -450
- package/dist/vite-plugin.mjs +6 -3
- package/kbach-react.md +778 -0
- package/package.json +2 -2
- package/KBACH.md +0 -952
package/dist/index.js
CHANGED
|
@@ -709,6 +709,10 @@ var LRUCache = class {
|
|
|
709
709
|
|
|
710
710
|
// src/core/platform.ts
|
|
711
711
|
var isWeb = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
712
|
+
var _cssGenMode = false;
|
|
713
|
+
function getEffectiveIsWeb() {
|
|
714
|
+
return isWeb || _cssGenMode;
|
|
715
|
+
}
|
|
712
716
|
function toNativeValue(raw) {
|
|
713
717
|
if (/^-?\d+(\.\d+)?px$/.test(raw)) return parseFloat(raw);
|
|
714
718
|
if (/^-?\d+(\.\d+)?rem$/.test(raw)) return parseFloat(raw) * 16;
|
|
@@ -1408,7 +1412,7 @@ function parseClass(className) {
|
|
|
1408
1412
|
const bracketStart = remaining.lastIndexOf("-[");
|
|
1409
1413
|
if (bracketStart > 0 && remaining.endsWith("]")) {
|
|
1410
1414
|
const utility = remaining.slice(0, bracketStart);
|
|
1411
|
-
const value = remaining.slice(bracketStart + 2, -1);
|
|
1415
|
+
const value = remaining.slice(bracketStart + 2, -1).replace(/_/g, " ");
|
|
1412
1416
|
return { original: trimmed, modifiers, negative, important, utility, value, isArbitrary: true };
|
|
1413
1417
|
}
|
|
1414
1418
|
if (STANDALONE_UTILITIES.has(remaining)) {
|
|
@@ -1437,10 +1441,29 @@ function parseClass(className) {
|
|
|
1437
1441
|
}
|
|
1438
1442
|
return { original: trimmed, modifiers, negative, important, utility: remaining, value: "", isArbitrary: false };
|
|
1439
1443
|
}
|
|
1444
|
+
function splitClassTokens(classString) {
|
|
1445
|
+
const tokens = [];
|
|
1446
|
+
let current = "";
|
|
1447
|
+
let depth = 0;
|
|
1448
|
+
for (let i = 0; i < classString.length; i++) {
|
|
1449
|
+
const ch = classString[i];
|
|
1450
|
+
if (ch === "[") depth++;
|
|
1451
|
+
else if (ch === "]") depth--;
|
|
1452
|
+
if (/\s/.test(ch) && depth === 0) {
|
|
1453
|
+
if (current) {
|
|
1454
|
+
tokens.push(current);
|
|
1455
|
+
current = "";
|
|
1456
|
+
}
|
|
1457
|
+
} else {
|
|
1458
|
+
current += ch;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
if (current) tokens.push(current);
|
|
1462
|
+
return tokens;
|
|
1463
|
+
}
|
|
1440
1464
|
function parseClasses(classString) {
|
|
1441
1465
|
const results = [];
|
|
1442
|
-
for (const token of classString
|
|
1443
|
-
if (!token) continue;
|
|
1466
|
+
for (const token of splitClassTokens(classString)) {
|
|
1444
1467
|
const parsed = parseClass(token);
|
|
1445
1468
|
if (parsed) results.push(parsed);
|
|
1446
1469
|
}
|
|
@@ -1526,8 +1549,12 @@ function hexToRgba(hex, alpha) {
|
|
|
1526
1549
|
}
|
|
1527
1550
|
function resolveSpacing(value, negative, spacing, isArbitrary) {
|
|
1528
1551
|
if (isArbitrary) {
|
|
1529
|
-
const resolved =
|
|
1530
|
-
|
|
1552
|
+
const resolved = getEffectiveIsWeb() ? value : toNativeValue(value);
|
|
1553
|
+
if (negative) {
|
|
1554
|
+
if (typeof resolved === "number") return -resolved;
|
|
1555
|
+
if (typeof resolved === "string" && /^\d/.test(resolved)) return `-${resolved}`;
|
|
1556
|
+
}
|
|
1557
|
+
return resolved;
|
|
1531
1558
|
}
|
|
1532
1559
|
const raw = spacing[value];
|
|
1533
1560
|
if (raw === void 0) return null;
|
|
@@ -1539,7 +1566,7 @@ function resolveSpacing(value, negative, spacing, isArbitrary) {
|
|
|
1539
1566
|
return raw;
|
|
1540
1567
|
}
|
|
1541
1568
|
function resolveSizing(value, spacing, isArbitrary) {
|
|
1542
|
-
if (isArbitrary) return
|
|
1569
|
+
if (isArbitrary) return getEffectiveIsWeb() ? value : toNativeValue(value);
|
|
1543
1570
|
const raw = spacing[value];
|
|
1544
1571
|
if (raw !== void 0) return raw;
|
|
1545
1572
|
if (/^\d+\/\d+$/.test(value)) {
|
|
@@ -1549,356 +1576,364 @@ function resolveSizing(value, spacing, isArbitrary) {
|
|
|
1549
1576
|
return null;
|
|
1550
1577
|
}
|
|
1551
1578
|
function resolveRadius(value, radii, isArbitrary) {
|
|
1552
|
-
if (isArbitrary) return
|
|
1579
|
+
if (isArbitrary) return getEffectiveIsWeb() ? value : toNativeValue(value);
|
|
1553
1580
|
const key = value === "" ? "DEFAULT" : value;
|
|
1554
1581
|
return radii[key] ?? null;
|
|
1555
1582
|
}
|
|
1556
1583
|
function resolveFontSize(value, fontSizes, isArbitrary) {
|
|
1557
|
-
if (isArbitrary) return
|
|
1584
|
+
if (isArbitrary) return getEffectiveIsWeb() ? value : toNativeValue(value);
|
|
1558
1585
|
return fontSizes[value] ?? null;
|
|
1559
1586
|
}
|
|
1560
1587
|
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,)";
|
|
1561
1588
|
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,)";
|
|
1562
|
-
var
|
|
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
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
}
|
|
1589
|
+
var _standalone = null;
|
|
1590
|
+
function buildStandalone() {
|
|
1591
|
+
const web = getEffectiveIsWeb();
|
|
1592
|
+
return {
|
|
1593
|
+
// Display
|
|
1594
|
+
// React Native only supports display:'flex'|'none'. Setting 'flex' explicitly is
|
|
1595
|
+
// a no-op normally, but is needed to re-show an element that was hidden via `hidden`.
|
|
1596
|
+
// `grid`, `inline-*`, `contents`, `flow-root` have no native equivalent.
|
|
1597
|
+
flex: { display: "flex" },
|
|
1598
|
+
block: web ? { display: "block" } : null,
|
|
1599
|
+
"inline-block": web ? { display: "inline-block" } : null,
|
|
1600
|
+
inline: web ? { display: "inline" } : null,
|
|
1601
|
+
grid: web ? { display: "grid" } : null,
|
|
1602
|
+
grd: web ? { display: "grid" } : null,
|
|
1603
|
+
"inline-flex": { display: web ? "inline-flex" : "flex" },
|
|
1604
|
+
"inline-grid": web ? { display: "inline-grid" } : null,
|
|
1605
|
+
hidden: { display: "none" },
|
|
1606
|
+
contents: web ? { display: "contents" } : null,
|
|
1607
|
+
"flow-root": web ? { display: "flow-root" } : null,
|
|
1608
|
+
// Flex direction (both web and native)
|
|
1609
|
+
"flex-row": { flexDirection: "row" },
|
|
1610
|
+
"flex-col": { flexDirection: "column" },
|
|
1611
|
+
"flex-row-reverse": { flexDirection: "row-reverse" },
|
|
1612
|
+
"flex-col-reverse": { flexDirection: "column-reverse" },
|
|
1613
|
+
// Flex wrap (both)
|
|
1614
|
+
"flex-wrap": { flexWrap: "wrap" },
|
|
1615
|
+
"flex-wrap-reverse": { flexWrap: "wrap-reverse" },
|
|
1616
|
+
"flex-nowrap": { flexWrap: "nowrap" },
|
|
1617
|
+
// Flex grow / shrink (both)
|
|
1618
|
+
"flex-grow": { flexGrow: 1 },
|
|
1619
|
+
"flex-grow-0": { flexGrow: 0 },
|
|
1620
|
+
"flex-shrink": { flexShrink: 1 },
|
|
1621
|
+
"flex-shrink-0": { flexShrink: 0 },
|
|
1622
|
+
// Align items (both)
|
|
1623
|
+
"items-start": { alignItems: "flex-start" },
|
|
1624
|
+
"items-end": { alignItems: "flex-end" },
|
|
1625
|
+
"items-center": { alignItems: "center" },
|
|
1626
|
+
"items-baseline": { alignItems: "baseline" },
|
|
1627
|
+
"items-stretch": { alignItems: "stretch" },
|
|
1628
|
+
// Justify content (both)
|
|
1629
|
+
"justify-start": { justifyContent: "flex-start" },
|
|
1630
|
+
"justify-end": { justifyContent: "flex-end" },
|
|
1631
|
+
"justify-center": { justifyContent: "center" },
|
|
1632
|
+
"justify-between": { justifyContent: "space-between" },
|
|
1633
|
+
"justify-around": { justifyContent: "space-around" },
|
|
1634
|
+
"justify-evenly": { justifyContent: "space-evenly" },
|
|
1635
|
+
// Align content (both)
|
|
1636
|
+
"content-start": { alignContent: "flex-start" },
|
|
1637
|
+
"content-end": { alignContent: "flex-end" },
|
|
1638
|
+
"content-center": { alignContent: "center" },
|
|
1639
|
+
"content-between": { alignContent: "space-between" },
|
|
1640
|
+
"content-around": { alignContent: "space-around" },
|
|
1641
|
+
"content-evenly": { alignContent: "space-evenly" },
|
|
1642
|
+
"content-stretch": { alignContent: "stretch" },
|
|
1643
|
+
// Align self (both)
|
|
1644
|
+
"self-auto": { alignSelf: "auto" },
|
|
1645
|
+
"self-start": { alignSelf: "flex-start" },
|
|
1646
|
+
"self-end": { alignSelf: "flex-end" },
|
|
1647
|
+
"self-center": { alignSelf: "center" },
|
|
1648
|
+
"self-stretch": { alignSelf: "stretch" },
|
|
1649
|
+
"self-baseline": { alignSelf: "baseline" },
|
|
1650
|
+
// Text align (both)
|
|
1651
|
+
"text-left": { textAlign: "left" },
|
|
1652
|
+
"text-right": { textAlign: "right" },
|
|
1653
|
+
"text-center": { textAlign: "center" },
|
|
1654
|
+
"text-justify": { textAlign: "justify" },
|
|
1655
|
+
// Font weight shortcuts (both)
|
|
1656
|
+
"font-thin": { fontWeight: "100" },
|
|
1657
|
+
"font-extralight": { fontWeight: "200" },
|
|
1658
|
+
"font-light": { fontWeight: "300" },
|
|
1659
|
+
"font-normal": { fontWeight: "400" },
|
|
1660
|
+
"font-medium": { fontWeight: "500" },
|
|
1661
|
+
"font-semibold": { fontWeight: "600" },
|
|
1662
|
+
"font-bold": { fontWeight: "700" },
|
|
1663
|
+
"font-extrabold": { fontWeight: "800" },
|
|
1664
|
+
"font-black": { fontWeight: "900" },
|
|
1665
|
+
// Text decoration (overline is web-only)
|
|
1666
|
+
underline: { textDecorationLine: "underline" },
|
|
1667
|
+
overline: web ? { textDecorationLine: "overline" } : null,
|
|
1668
|
+
"line-through": { textDecorationLine: "line-through" },
|
|
1669
|
+
"no-underline": { textDecorationLine: "none" },
|
|
1670
|
+
// Text transform (both)
|
|
1671
|
+
uppercase: { textTransform: "uppercase" },
|
|
1672
|
+
lowercase: { textTransform: "lowercase" },
|
|
1673
|
+
capitalize: { textTransform: "capitalize" },
|
|
1674
|
+
"normal-case": { textTransform: "none" },
|
|
1675
|
+
// Font style (both)
|
|
1676
|
+
italic: { fontStyle: "italic" },
|
|
1677
|
+
"non-italic": { fontStyle: "normal" },
|
|
1678
|
+
// Position (fixed/sticky/static are web-only; RN only supports relative/absolute)
|
|
1679
|
+
relative: { position: "relative" },
|
|
1680
|
+
absolute: { position: "absolute" },
|
|
1681
|
+
fixed: web ? { position: "fixed" } : null,
|
|
1682
|
+
sticky: web ? { position: "sticky" } : null,
|
|
1683
|
+
static: web ? { position: "static" } : null,
|
|
1684
|
+
// Visibility (no `visibility` prop on native; use opacity instead)
|
|
1685
|
+
visible: web ? { visibility: "visible" } : null,
|
|
1686
|
+
invisible: web ? { visibility: "hidden" } : { opacity: 0 },
|
|
1687
|
+
// Overflow (RN supports 'hidden' | 'visible' | 'scroll'; not 'auto')
|
|
1688
|
+
"overflow-hidden": { overflow: "hidden" },
|
|
1689
|
+
"overflow-visible": { overflow: "visible" },
|
|
1690
|
+
"overflow-scroll": { overflow: "scroll" },
|
|
1691
|
+
"overflow-auto": web ? { overflow: "auto" } : { overflow: "scroll" },
|
|
1692
|
+
// overflowX / overflowY are web-only
|
|
1693
|
+
"overflow-x-hidden": web ? { overflowX: "hidden" } : null,
|
|
1694
|
+
"overflow-x-scroll": web ? { overflowX: "scroll" } : null,
|
|
1695
|
+
"overflow-x-auto": web ? { overflowX: "auto" } : null,
|
|
1696
|
+
"overflow-y-hidden": web ? { overflowY: "hidden" } : null,
|
|
1697
|
+
"overflow-y-scroll": web ? { overflowY: "scroll" } : null,
|
|
1698
|
+
"overflow-y-auto": web ? { overflowY: "auto" } : null,
|
|
1699
|
+
// Object fit (web-only; use resizeMode prop on RN Image)
|
|
1700
|
+
"object-contain": web ? { objectFit: "contain" } : null,
|
|
1701
|
+
"object-cover": web ? { objectFit: "cover" } : null,
|
|
1702
|
+
"object-fill": web ? { objectFit: "fill" } : null,
|
|
1703
|
+
"object-none": web ? { objectFit: "none" } : null,
|
|
1704
|
+
"object-scale-down": web ? { objectFit: "scale-down" } : null,
|
|
1705
|
+
// Border style (both)
|
|
1706
|
+
"border-solid": { borderStyle: "solid" },
|
|
1707
|
+
"border-dashed": { borderStyle: "dashed" },
|
|
1708
|
+
"border-dotted": { borderStyle: "dotted" },
|
|
1709
|
+
"border-none": { borderWidth: 0 },
|
|
1710
|
+
// Border sides default width (both)
|
|
1711
|
+
"border-t": { borderTopWidth: 1 },
|
|
1712
|
+
"border-r": { borderRightWidth: 1 },
|
|
1713
|
+
"border-b": { borderBottomWidth: 1 },
|
|
1714
|
+
"border-l": { borderLeftWidth: 1 },
|
|
1715
|
+
// Cursor (web-only)
|
|
1716
|
+
"cursor-auto": web ? { cursor: "auto" } : null,
|
|
1717
|
+
"cursor-default": web ? { cursor: "default" } : null,
|
|
1718
|
+
"cursor-pointer": web ? { cursor: "pointer" } : null,
|
|
1719
|
+
"cursor-wait": web ? { cursor: "wait" } : null,
|
|
1720
|
+
"cursor-text": web ? { cursor: "text" } : null,
|
|
1721
|
+
"cursor-move": web ? { cursor: "move" } : null,
|
|
1722
|
+
"cursor-not-allowed": web ? { cursor: "not-allowed" } : null,
|
|
1723
|
+
// User select (web-only)
|
|
1724
|
+
"select-none": web ? { userSelect: "none" } : null,
|
|
1725
|
+
"select-text": web ? { userSelect: "text" } : null,
|
|
1726
|
+
"select-all": web ? { userSelect: "all" } : null,
|
|
1727
|
+
"select-auto": web ? { userSelect: "auto" } : null,
|
|
1728
|
+
// Pointer events (both)
|
|
1729
|
+
"pointer-events-none": { pointerEvents: "none" },
|
|
1730
|
+
"pointer-events-auto": { pointerEvents: "auto" },
|
|
1731
|
+
// Whitespace (web-only; RN Text uses numberOfLines prop instead)
|
|
1732
|
+
"whitespace-normal": web ? { whiteSpace: "normal" } : null,
|
|
1733
|
+
"whitespace-nowrap": web ? { whiteSpace: "nowrap" } : null,
|
|
1734
|
+
"whitespace-pre": web ? { whiteSpace: "pre" } : null,
|
|
1735
|
+
"whitespace-pre-wrap": web ? { whiteSpace: "pre-wrap" } : null,
|
|
1736
|
+
"whitespace-pre-line": web ? { whiteSpace: "pre-line" } : null,
|
|
1737
|
+
// Word break (web-only)
|
|
1738
|
+
"break-normal": web ? { overflowWrap: "normal", wordBreak: "normal" } : null,
|
|
1739
|
+
"break-words": web ? { overflowWrap: "break-word" } : null,
|
|
1740
|
+
"break-all": web ? { wordBreak: "break-all" } : null,
|
|
1741
|
+
// Misc web-only
|
|
1742
|
+
truncate: web ? { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } : null,
|
|
1743
|
+
"box-border": web ? { boxSizing: "border-box" } : null,
|
|
1744
|
+
"box-content": web ? { boxSizing: "content-box" } : null,
|
|
1745
|
+
"appearance-none": web ? { appearance: "none" } : null,
|
|
1746
|
+
"outline-none": web ? { outline: "none", outlineOffset: "0" } : null,
|
|
1747
|
+
outline: web ? { outline: "2px solid transparent", outlineOffset: "2px" } : null,
|
|
1748
|
+
resize: web ? { resize: "both" } : null,
|
|
1749
|
+
"resize-none": web ? { resize: "none" } : null,
|
|
1750
|
+
"resize-y": web ? { resize: "vertical" } : null,
|
|
1751
|
+
"resize-x": web ? { resize: "horizontal" } : null,
|
|
1752
|
+
antialiased: web ? { WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale" } : null,
|
|
1753
|
+
"subpixel-antialiased": web ? { WebkitFontSmoothing: "subpixel-antialiased", MozOsxFontSmoothing: "auto" } : null,
|
|
1754
|
+
"overflow-ellipsis": web ? { textOverflow: "ellipsis" } : null,
|
|
1755
|
+
"sr-only": web ? {
|
|
1756
|
+
position: "absolute",
|
|
1757
|
+
width: 1,
|
|
1758
|
+
height: 1,
|
|
1759
|
+
padding: 0,
|
|
1760
|
+
margin: -1,
|
|
1761
|
+
overflow: "hidden",
|
|
1762
|
+
clip: "rect(0,0,0,0)",
|
|
1763
|
+
whiteSpace: "nowrap",
|
|
1764
|
+
border: 0
|
|
1765
|
+
} : null,
|
|
1766
|
+
"not-sr-only": web ? {
|
|
1767
|
+
position: "static",
|
|
1768
|
+
width: "auto",
|
|
1769
|
+
height: "auto",
|
|
1770
|
+
padding: 0,
|
|
1771
|
+
margin: 0,
|
|
1772
|
+
overflow: "visible",
|
|
1773
|
+
clip: "auto",
|
|
1774
|
+
whiteSpace: "normal"
|
|
1775
|
+
} : null,
|
|
1776
|
+
// Lists (web-only)
|
|
1777
|
+
"list-none": web ? { listStyleType: "none" } : null,
|
|
1778
|
+
"list-disc": web ? { listStyleType: "disc" } : null,
|
|
1779
|
+
"list-decimal": web ? { listStyleType: "decimal" } : null,
|
|
1780
|
+
// Background clip (web-only)
|
|
1781
|
+
"bg-clip-border": web ? { backgroundClip: "border-box" } : null,
|
|
1782
|
+
"bg-clip-padding": web ? { backgroundClip: "padding-box" } : null,
|
|
1783
|
+
"bg-clip-content": web ? { backgroundClip: "content-box" } : null,
|
|
1784
|
+
"bg-clip-text": web ? { backgroundClip: "text", WebkitBackgroundClip: "text" } : null,
|
|
1785
|
+
// Background image
|
|
1786
|
+
"bg-none": web ? { backgroundImage: "none" } : null,
|
|
1787
|
+
// Background size (web-only)
|
|
1788
|
+
"bg-auto": web ? { backgroundSize: "auto" } : null,
|
|
1789
|
+
"bg-cover": web ? { backgroundSize: "cover" } : null,
|
|
1790
|
+
"bg-contain": web ? { backgroundSize: "contain" } : null,
|
|
1791
|
+
// Background position (web-only)
|
|
1792
|
+
"bg-center": web ? { backgroundPosition: "center" } : null,
|
|
1793
|
+
"bg-top": web ? { backgroundPosition: "top" } : null,
|
|
1794
|
+
"bg-bottom": web ? { backgroundPosition: "bottom" } : null,
|
|
1795
|
+
"bg-left": web ? { backgroundPosition: "left" } : null,
|
|
1796
|
+
"bg-right": web ? { backgroundPosition: "right" } : null,
|
|
1797
|
+
"bg-left-top": web ? { backgroundPosition: "left top" } : null,
|
|
1798
|
+
"bg-left-bottom": web ? { backgroundPosition: "left bottom" } : null,
|
|
1799
|
+
"bg-right-top": web ? { backgroundPosition: "right top" } : null,
|
|
1800
|
+
"bg-right-bottom": web ? { backgroundPosition: "right bottom" } : null,
|
|
1801
|
+
// Background repeat (web-only)
|
|
1802
|
+
"bg-repeat": web ? { backgroundRepeat: "repeat" } : null,
|
|
1803
|
+
"bg-no-repeat": web ? { backgroundRepeat: "no-repeat" } : null,
|
|
1804
|
+
"bg-repeat-x": web ? { backgroundRepeat: "repeat-x" } : null,
|
|
1805
|
+
"bg-repeat-y": web ? { backgroundRepeat: "repeat-y" } : null,
|
|
1806
|
+
"bg-repeat-round": web ? { backgroundRepeat: "round" } : null,
|
|
1807
|
+
"bg-repeat-space": web ? { backgroundRepeat: "space" } : null,
|
|
1808
|
+
// Background attachment (web-only)
|
|
1809
|
+
"bg-fixed": web ? { backgroundAttachment: "fixed" } : null,
|
|
1810
|
+
"bg-local": web ? { backgroundAttachment: "local" } : null,
|
|
1811
|
+
"bg-scroll": web ? { backgroundAttachment: "scroll" } : null,
|
|
1812
|
+
// Object position (web-only)
|
|
1813
|
+
"object-center": web ? { objectPosition: "center" } : null,
|
|
1814
|
+
"object-top": web ? { objectPosition: "top" } : null,
|
|
1815
|
+
"object-bottom": web ? { objectPosition: "bottom" } : null,
|
|
1816
|
+
"object-left": web ? { objectPosition: "left" } : null,
|
|
1817
|
+
"object-right": web ? { objectPosition: "right" } : null,
|
|
1818
|
+
"object-left-top": web ? { objectPosition: "left top" } : null,
|
|
1819
|
+
"object-left-bottom": web ? { objectPosition: "left bottom" } : null,
|
|
1820
|
+
"object-right-top": web ? { objectPosition: "right top" } : null,
|
|
1821
|
+
"object-right-bottom": web ? { objectPosition: "right bottom" } : null,
|
|
1822
|
+
// Table (web-only)
|
|
1823
|
+
table: web ? { display: "table" } : null,
|
|
1824
|
+
"table-auto": web ? { tableLayout: "auto" } : null,
|
|
1825
|
+
"table-fixed": web ? { tableLayout: "fixed" } : null,
|
|
1826
|
+
"caption-top": web ? { captionSide: "top" } : null,
|
|
1827
|
+
"caption-bottom": web ? { captionSide: "bottom" } : null,
|
|
1828
|
+
"border-collapse": web ? { borderCollapse: "collapse" } : null,
|
|
1829
|
+
"border-separate": web ? { borderCollapse: "separate" } : null,
|
|
1830
|
+
// List style position (web-only)
|
|
1831
|
+
"list-inside": web ? { listStylePosition: "inside" } : null,
|
|
1832
|
+
"list-outside": web ? { listStylePosition: "outside" } : null,
|
|
1833
|
+
// Font variant numeric (web-only)
|
|
1834
|
+
"normal-nums": web ? { fontVariantNumeric: "normal" } : null,
|
|
1835
|
+
ordinal: web ? { fontVariantNumeric: "ordinal" } : null,
|
|
1836
|
+
"slashed-zero": web ? { fontVariantNumeric: "slashed-zero" } : null,
|
|
1837
|
+
"lining-nums": web ? { fontVariantNumeric: "lining-nums" } : null,
|
|
1838
|
+
"oldstyle-nums": web ? { fontVariantNumeric: "oldstyle-nums" } : null,
|
|
1839
|
+
"proportional-nums": web ? { fontVariantNumeric: "proportional-nums" } : null,
|
|
1840
|
+
"tabular-nums": web ? { fontVariantNumeric: "tabular-nums" } : null,
|
|
1841
|
+
"diagonal-fractions": web ? { fontVariantNumeric: "diagonal-fractions" } : null,
|
|
1842
|
+
"stacked-fractions": web ? { fontVariantNumeric: "stacked-fractions" } : null,
|
|
1843
|
+
// Isolation (web-only)
|
|
1844
|
+
isolate: web ? { isolation: "isolate" } : null,
|
|
1845
|
+
"isolation-auto": web ? { isolation: "auto" } : null,
|
|
1846
|
+
// Backface visibility (both iOS and Android)
|
|
1847
|
+
"backface-visible": { backfaceVisibility: "visible" },
|
|
1848
|
+
"backface-hidden": { backfaceVisibility: "hidden" },
|
|
1849
|
+
// CSS filters — standalone = default/full effect (web-only)
|
|
1850
|
+
grayscale: web ? { "--tw-grayscale": "grayscale(100%)", filter: FILTER_COMPOSE } : null,
|
|
1851
|
+
invert: web ? { "--tw-invert": "invert(100%)", filter: FILTER_COMPOSE } : null,
|
|
1852
|
+
sepia: web ? { "--tw-sepia": "sepia(100%)", filter: FILTER_COMPOSE } : null,
|
|
1853
|
+
// Divide none
|
|
1854
|
+
"divide-none": web ? { __divideX: 0, __divideY: 0 } : null,
|
|
1855
|
+
// Group / peer markers (no-op: no style emitted; just ensures isKnownUtility returns true)
|
|
1856
|
+
group: web ? {} : null,
|
|
1857
|
+
peer: web ? {} : null,
|
|
1858
|
+
// Text-wrap (web-only)
|
|
1859
|
+
"text-wrap": web ? { textWrap: "wrap" } : null,
|
|
1860
|
+
"text-nowrap": web ? { textWrap: "nowrap" } : null,
|
|
1861
|
+
"text-balance": web ? { textWrap: "balance" } : null,
|
|
1862
|
+
"text-pretty": web ? { textWrap: "pretty" } : null,
|
|
1863
|
+
// Screen sizing (vw values are web-only; vh values work cross-platform via spacing scale for h-*)
|
|
1864
|
+
"w-screen": web ? { width: "100vw" } : null,
|
|
1865
|
+
"min-h-screen": { minHeight: "100vh" },
|
|
1866
|
+
"max-h-screen": { maxHeight: "100vh" },
|
|
1867
|
+
"min-w-screen": web ? { minWidth: "100vw" } : null,
|
|
1868
|
+
"max-w-screen": web ? { maxWidth: "100vw" } : null,
|
|
1869
|
+
// max-w named container sizes (mirrors Tailwind's container scale)
|
|
1870
|
+
"max-w-none": { maxWidth: "none" },
|
|
1871
|
+
"max-w-xs": { maxWidth: 320 },
|
|
1872
|
+
"max-w-sm": { maxWidth: 384 },
|
|
1873
|
+
"max-w-md": { maxWidth: 448 },
|
|
1874
|
+
"max-w-lg": { maxWidth: 512 },
|
|
1875
|
+
"max-w-xl": { maxWidth: 576 },
|
|
1876
|
+
"max-w-2xl": { maxWidth: 672 },
|
|
1877
|
+
"max-w-3xl": { maxWidth: 768 },
|
|
1878
|
+
"max-w-4xl": { maxWidth: 896 },
|
|
1879
|
+
"max-w-5xl": { maxWidth: 1024 },
|
|
1880
|
+
"max-w-6xl": { maxWidth: 1152 },
|
|
1881
|
+
"max-w-7xl": { maxWidth: 1280 },
|
|
1882
|
+
"max-w-prose": web ? { maxWidth: "65ch" } : null,
|
|
1883
|
+
// Extended cursors (web-only)
|
|
1884
|
+
"cursor-grab": web ? { cursor: "grab" } : null,
|
|
1885
|
+
"cursor-grabbing": web ? { cursor: "grabbing" } : null,
|
|
1886
|
+
"cursor-zoom-in": web ? { cursor: "zoom-in" } : null,
|
|
1887
|
+
"cursor-zoom-out": web ? { cursor: "zoom-out" } : null,
|
|
1888
|
+
"cursor-crosshair": web ? { cursor: "crosshair" } : null,
|
|
1889
|
+
"cursor-help": web ? { cursor: "help" } : null,
|
|
1890
|
+
"cursor-none": web ? { cursor: "none" } : null,
|
|
1891
|
+
// Overflow clip (web-only)
|
|
1892
|
+
"overflow-clip": web ? { overflow: "clip" } : null,
|
|
1893
|
+
"overflow-x-clip": web ? { overflowX: "clip" } : null,
|
|
1894
|
+
"overflow-y-clip": web ? { overflowY: "clip" } : null,
|
|
1895
|
+
// Scroll behavior (web-only)
|
|
1896
|
+
"scroll-smooth": web ? { scrollBehavior: "smooth" } : null,
|
|
1897
|
+
"scroll-auto": web ? { scrollBehavior: "auto" } : null,
|
|
1898
|
+
// Float (web-only)
|
|
1899
|
+
"float-left": web ? { float: "left" } : null,
|
|
1900
|
+
"float-right": web ? { float: "right" } : null,
|
|
1901
|
+
"float-start": web ? { float: "inline-start" } : null,
|
|
1902
|
+
"float-end": web ? { float: "inline-end" } : null,
|
|
1903
|
+
"float-none": web ? { float: "none" } : null,
|
|
1904
|
+
// Clear (web-only)
|
|
1905
|
+
"clear-left": web ? { clear: "left" } : null,
|
|
1906
|
+
"clear-right": web ? { clear: "right" } : null,
|
|
1907
|
+
"clear-both": web ? { clear: "both" } : null,
|
|
1908
|
+
"clear-start": web ? { clear: "inline-start" } : null,
|
|
1909
|
+
"clear-end": web ? { clear: "inline-end" } : null,
|
|
1910
|
+
"clear-none": web ? { clear: "none" } : null,
|
|
1911
|
+
// Vertical align (web-only)
|
|
1912
|
+
"align-baseline": web ? { verticalAlign: "baseline" } : null,
|
|
1913
|
+
"align-top": web ? { verticalAlign: "top" } : null,
|
|
1914
|
+
"align-middle": web ? { verticalAlign: "middle" } : null,
|
|
1915
|
+
"align-bottom": web ? { verticalAlign: "bottom" } : null,
|
|
1916
|
+
"align-text-top": web ? { verticalAlign: "text-top" } : null,
|
|
1917
|
+
"align-text-bottom": web ? { verticalAlign: "text-bottom" } : null,
|
|
1918
|
+
"align-sub": web ? { verticalAlign: "sub" } : null,
|
|
1919
|
+
"align-super": web ? { verticalAlign: "super" } : null,
|
|
1920
|
+
// Touch action (web-only)
|
|
1921
|
+
"touch-auto": web ? { touchAction: "auto" } : null,
|
|
1922
|
+
"touch-none": web ? { touchAction: "none" } : null,
|
|
1923
|
+
"touch-pan-x": web ? { touchAction: "pan-x" } : null,
|
|
1924
|
+
"touch-pan-y": web ? { touchAction: "pan-y" } : null,
|
|
1925
|
+
"touch-pan-left": web ? { touchAction: "pan-left" } : null,
|
|
1926
|
+
"touch-pan-right": web ? { touchAction: "pan-right" } : null,
|
|
1927
|
+
"touch-pan-up": web ? { touchAction: "pan-up" } : null,
|
|
1928
|
+
"touch-pan-down": web ? { touchAction: "pan-down" } : null,
|
|
1929
|
+
"touch-pinch-zoom": web ? { touchAction: "pinch-zoom" } : null,
|
|
1930
|
+
"touch-manipulation": web ? { touchAction: "manipulation" } : null
|
|
1931
|
+
};
|
|
1932
|
+
}
|
|
1933
|
+
function getStandalone() {
|
|
1934
|
+
if (!_standalone) _standalone = buildStandalone();
|
|
1935
|
+
return _standalone;
|
|
1936
|
+
}
|
|
1902
1937
|
var RESOLVERS = {
|
|
1903
1938
|
// ── Background ─────────────────────────────────────────────────────────────
|
|
1904
1939
|
bg: ({ value, isArbitrary }, { colors }) => {
|
|
@@ -1906,7 +1941,7 @@ var RESOLVERS = {
|
|
|
1906
1941
|
return color ? { backgroundColor: color } : null;
|
|
1907
1942
|
},
|
|
1908
1943
|
"bg-opacity": ({ value }, _) => {
|
|
1909
|
-
if (!
|
|
1944
|
+
if (!getEffectiveIsWeb()) return null;
|
|
1910
1945
|
const v = parseFloat(value) / 100;
|
|
1911
1946
|
return isNaN(v) ? null : { "--bg-opacity": v };
|
|
1912
1947
|
},
|
|
@@ -1916,7 +1951,7 @@ var RESOLVERS = {
|
|
|
1916
1951
|
if (!isArbitrary && size !== null) return { fontSize: size };
|
|
1917
1952
|
if (isArbitrary) {
|
|
1918
1953
|
if (/^\d/.test(value) || /^(calc|min|max|clamp)/.test(value)) {
|
|
1919
|
-
return { fontSize:
|
|
1954
|
+
return { fontSize: getEffectiveIsWeb() ? value : toNativeValue(value) };
|
|
1920
1955
|
}
|
|
1921
1956
|
return { color: value };
|
|
1922
1957
|
}
|
|
@@ -1924,7 +1959,7 @@ var RESOLVERS = {
|
|
|
1924
1959
|
return color ? { color } : null;
|
|
1925
1960
|
},
|
|
1926
1961
|
"text-opacity": ({ value }, _) => {
|
|
1927
|
-
if (!
|
|
1962
|
+
if (!getEffectiveIsWeb()) return null;
|
|
1928
1963
|
const v = parseFloat(value) / 100;
|
|
1929
1964
|
return isNaN(v) ? null : { "--text-opacity": v };
|
|
1930
1965
|
},
|
|
@@ -2120,7 +2155,7 @@ var RESOLVERS = {
|
|
|
2120
2155
|
},
|
|
2121
2156
|
// ── Grid template columns/rows (Tailwind-style aliases, web-only) ──────────
|
|
2122
2157
|
"grid-cols": ({ value, isArbitrary }) => {
|
|
2123
|
-
if (!
|
|
2158
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2124
2159
|
if (!value) return null;
|
|
2125
2160
|
if (isArbitrary) return { display: "grid", gridTemplateColumns: value };
|
|
2126
2161
|
if (value === "none") return { display: "grid", gridTemplateColumns: "none" };
|
|
@@ -2129,7 +2164,7 @@ var RESOLVERS = {
|
|
|
2129
2164
|
return { display: "grid", gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` };
|
|
2130
2165
|
},
|
|
2131
2166
|
"grid-rows": ({ value, isArbitrary }) => {
|
|
2132
|
-
if (!
|
|
2167
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2133
2168
|
if (!value) return null;
|
|
2134
2169
|
if (isArbitrary) return { gridTemplateRows: value };
|
|
2135
2170
|
if (value === "none") return { gridTemplateRows: "none" };
|
|
@@ -2139,7 +2174,7 @@ var RESOLVERS = {
|
|
|
2139
2174
|
},
|
|
2140
2175
|
// ── Grid auto flow (web-only) ─────────────────────────────────────────────
|
|
2141
2176
|
"grid-flow": ({ value }) => {
|
|
2142
|
-
if (!
|
|
2177
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2143
2178
|
const flows = {
|
|
2144
2179
|
row: "row",
|
|
2145
2180
|
col: "column",
|
|
@@ -2152,7 +2187,7 @@ var RESOLVERS = {
|
|
|
2152
2187
|
},
|
|
2153
2188
|
// ── Grid auto sizing (web-only) ───────────────────────────────────────────
|
|
2154
2189
|
"auto-cols": ({ value, isArbitrary }) => {
|
|
2155
|
-
if (!
|
|
2190
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2156
2191
|
if (isArbitrary) return { gridAutoColumns: value };
|
|
2157
2192
|
const presets = {
|
|
2158
2193
|
auto: "auto",
|
|
@@ -2164,7 +2199,7 @@ var RESOLVERS = {
|
|
|
2164
2199
|
return v ? { gridAutoColumns: v } : null;
|
|
2165
2200
|
},
|
|
2166
2201
|
"auto-rows": ({ value, isArbitrary }) => {
|
|
2167
|
-
if (!
|
|
2202
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2168
2203
|
if (isArbitrary) return { gridAutoRows: value };
|
|
2169
2204
|
const presets = {
|
|
2170
2205
|
auto: "auto",
|
|
@@ -2177,54 +2212,54 @@ var RESOLVERS = {
|
|
|
2177
2212
|
},
|
|
2178
2213
|
// ── Grid column placement (web-only) ──────────────────────────────────────
|
|
2179
2214
|
"col-span": ({ value }) => {
|
|
2180
|
-
if (!
|
|
2215
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2181
2216
|
if (value === "full") return { gridColumn: "1 / -1" };
|
|
2182
2217
|
const n = parseInt(value, 10);
|
|
2183
2218
|
return isNaN(n) ? null : { gridColumn: `span ${n} / span ${n}` };
|
|
2184
2219
|
},
|
|
2185
2220
|
"col-start": ({ value, isArbitrary }) => {
|
|
2186
|
-
if (!
|
|
2221
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2187
2222
|
if (value === "auto") return { gridColumnStart: "auto" };
|
|
2188
2223
|
if (isArbitrary) return { gridColumnStart: value };
|
|
2189
2224
|
const n = parseInt(value, 10);
|
|
2190
2225
|
return isNaN(n) ? null : { gridColumnStart: n };
|
|
2191
2226
|
},
|
|
2192
2227
|
"col-end": ({ value, isArbitrary }) => {
|
|
2193
|
-
if (!
|
|
2228
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2194
2229
|
if (value === "auto") return { gridColumnEnd: "auto" };
|
|
2195
2230
|
if (isArbitrary) return { gridColumnEnd: value };
|
|
2196
2231
|
const n = parseInt(value, 10);
|
|
2197
2232
|
return isNaN(n) ? null : { gridColumnEnd: n };
|
|
2198
2233
|
},
|
|
2199
2234
|
col: ({ value, isArbitrary }) => {
|
|
2200
|
-
if (!
|
|
2235
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2201
2236
|
if (!value || value === "auto") return { gridColumn: "auto" };
|
|
2202
2237
|
if (isArbitrary) return { gridColumn: value };
|
|
2203
2238
|
return null;
|
|
2204
2239
|
},
|
|
2205
2240
|
// ── Grid row placement (web-only) ─────────────────────────────────────────
|
|
2206
2241
|
"row-span": ({ value }) => {
|
|
2207
|
-
if (!
|
|
2242
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2208
2243
|
if (value === "full") return { gridRow: "1 / -1" };
|
|
2209
2244
|
const n = parseInt(value, 10);
|
|
2210
2245
|
return isNaN(n) ? null : { gridRow: `span ${n} / span ${n}` };
|
|
2211
2246
|
},
|
|
2212
2247
|
"row-start": ({ value, isArbitrary }) => {
|
|
2213
|
-
if (!
|
|
2248
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2214
2249
|
if (value === "auto") return { gridRowStart: "auto" };
|
|
2215
2250
|
if (isArbitrary) return { gridRowStart: value };
|
|
2216
2251
|
const n = parseInt(value, 10);
|
|
2217
2252
|
return isNaN(n) ? null : { gridRowStart: n };
|
|
2218
2253
|
},
|
|
2219
2254
|
"row-end": ({ value, isArbitrary }) => {
|
|
2220
|
-
if (!
|
|
2255
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2221
2256
|
if (value === "auto") return { gridRowEnd: "auto" };
|
|
2222
2257
|
if (isArbitrary) return { gridRowEnd: value };
|
|
2223
2258
|
const n = parseInt(value, 10);
|
|
2224
2259
|
return isNaN(n) ? null : { gridRowEnd: n };
|
|
2225
2260
|
},
|
|
2226
2261
|
row: ({ value, isArbitrary }) => {
|
|
2227
|
-
if (!
|
|
2262
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2228
2263
|
if (!value || value === "auto") return { gridRow: "auto" };
|
|
2229
2264
|
if (isArbitrary) return { gridRow: value };
|
|
2230
2265
|
return null;
|
|
@@ -2232,7 +2267,7 @@ var RESOLVERS = {
|
|
|
2232
2267
|
// ── Grid alignment (web-only) ──────────────────────────────────────────────
|
|
2233
2268
|
// place-items is shorthand for align-items + justify-items on a grid container
|
|
2234
2269
|
"place-items": ({ value }) => {
|
|
2235
|
-
if (!
|
|
2270
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2236
2271
|
const map = {
|
|
2237
2272
|
start: "start",
|
|
2238
2273
|
end: "end",
|
|
@@ -2244,7 +2279,7 @@ var RESOLVERS = {
|
|
|
2244
2279
|
},
|
|
2245
2280
|
// place-content is shorthand for align-content + justify-content on a grid container
|
|
2246
2281
|
"place-content": ({ value }) => {
|
|
2247
|
-
if (!
|
|
2282
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2248
2283
|
const map = {
|
|
2249
2284
|
start: "start",
|
|
2250
2285
|
end: "end",
|
|
@@ -2259,7 +2294,7 @@ var RESOLVERS = {
|
|
|
2259
2294
|
},
|
|
2260
2295
|
// justify-items controls inline-axis alignment of grid items within their cells
|
|
2261
2296
|
"justify-items": ({ value }) => {
|
|
2262
|
-
if (!
|
|
2297
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2263
2298
|
const map = {
|
|
2264
2299
|
start: "start",
|
|
2265
2300
|
end: "end",
|
|
@@ -2270,7 +2305,7 @@ var RESOLVERS = {
|
|
|
2270
2305
|
},
|
|
2271
2306
|
// place-self is shorthand for align-self + justify-self on a grid item
|
|
2272
2307
|
"place-self": ({ value }) => {
|
|
2273
|
-
if (!
|
|
2308
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2274
2309
|
const map = {
|
|
2275
2310
|
auto: "auto",
|
|
2276
2311
|
start: "start",
|
|
@@ -2282,7 +2317,7 @@ var RESOLVERS = {
|
|
|
2282
2317
|
},
|
|
2283
2318
|
// justify-self controls inline-axis self-alignment of a grid item
|
|
2284
2319
|
"justify-self": ({ value }) => {
|
|
2285
|
-
if (!
|
|
2320
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2286
2321
|
const map = {
|
|
2287
2322
|
auto: "auto",
|
|
2288
2323
|
start: "start",
|
|
@@ -2294,7 +2329,7 @@ var RESOLVERS = {
|
|
|
2294
2329
|
},
|
|
2295
2330
|
// ── CSS Filters (composable via CSS variables, web-only) ─────────────────
|
|
2296
2331
|
blur: ({ value, isArbitrary }) => {
|
|
2297
|
-
if (!
|
|
2332
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2298
2333
|
const sizes = {
|
|
2299
2334
|
"": "blur(8px)",
|
|
2300
2335
|
sm: "blur(4px)",
|
|
@@ -2309,43 +2344,43 @@ var RESOLVERS = {
|
|
|
2309
2344
|
return v !== void 0 ? { "--tw-blur": v, filter: FILTER_COMPOSE } : null;
|
|
2310
2345
|
},
|
|
2311
2346
|
brightness: ({ value, isArbitrary }) => {
|
|
2312
|
-
if (!
|
|
2347
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2313
2348
|
const v = isArbitrary ? `brightness(${value})` : `brightness(${parseFloat(value) / 100})`;
|
|
2314
2349
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-brightness": v, filter: FILTER_COMPOSE };
|
|
2315
2350
|
},
|
|
2316
2351
|
contrast: ({ value, isArbitrary }) => {
|
|
2317
|
-
if (!
|
|
2352
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2318
2353
|
const v = isArbitrary ? `contrast(${value})` : `contrast(${parseFloat(value) / 100})`;
|
|
2319
2354
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-contrast": v, filter: FILTER_COMPOSE };
|
|
2320
2355
|
},
|
|
2321
2356
|
grayscale: ({ value }) => {
|
|
2322
|
-
if (!
|
|
2357
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2323
2358
|
const v = value === "0" ? "grayscale(0)" : "grayscale(100%)";
|
|
2324
2359
|
return { "--tw-grayscale": v, filter: FILTER_COMPOSE };
|
|
2325
2360
|
},
|
|
2326
2361
|
"hue-rotate": ({ value, negative, isArbitrary }) => {
|
|
2327
|
-
if (!
|
|
2362
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2328
2363
|
const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
|
|
2329
2364
|
if (isNaN(parseFloat(deg)) && !isArbitrary) return null;
|
|
2330
2365
|
return { "--tw-hue-rotate": `hue-rotate(${deg})`, filter: FILTER_COMPOSE };
|
|
2331
2366
|
},
|
|
2332
2367
|
invert: ({ value }) => {
|
|
2333
|
-
if (!
|
|
2368
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2334
2369
|
const v = value === "0" ? "invert(0)" : "invert(100%)";
|
|
2335
2370
|
return { "--tw-invert": v, filter: FILTER_COMPOSE };
|
|
2336
2371
|
},
|
|
2337
2372
|
saturate: ({ value, isArbitrary }) => {
|
|
2338
|
-
if (!
|
|
2373
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2339
2374
|
const v = isArbitrary ? `saturate(${value})` : `saturate(${parseFloat(value) / 100})`;
|
|
2340
2375
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-saturate": v, filter: FILTER_COMPOSE };
|
|
2341
2376
|
},
|
|
2342
2377
|
sepia: ({ value }) => {
|
|
2343
|
-
if (!
|
|
2378
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2344
2379
|
const v = value === "0" ? "sepia(0)" : "sepia(100%)";
|
|
2345
2380
|
return { "--tw-sepia": v, filter: FILTER_COMPOSE };
|
|
2346
2381
|
},
|
|
2347
2382
|
"drop-shadow": ({ value, isArbitrary }) => {
|
|
2348
|
-
if (!
|
|
2383
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2349
2384
|
if (isArbitrary) return { "--tw-drop-shadow": `drop-shadow(${value.replace(/_/g, " ")})`, filter: FILTER_COMPOSE };
|
|
2350
2385
|
const presets = {
|
|
2351
2386
|
"": "drop-shadow(0 1px 2px rgb(0 0 0/0.1)) drop-shadow(0 1px 1px rgb(0 0 0/0.06))",
|
|
@@ -2361,14 +2396,14 @@ var RESOLVERS = {
|
|
|
2361
2396
|
},
|
|
2362
2397
|
// Arbitrary full filter string: filter-[blur(4px)_grayscale(1)]
|
|
2363
2398
|
filter: ({ value, isArbitrary }) => {
|
|
2364
|
-
if (!
|
|
2399
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2365
2400
|
if (isArbitrary) return { filter: value.replace(/_/g, " ") };
|
|
2366
2401
|
if (value === "none") return { filter: "none" };
|
|
2367
2402
|
return null;
|
|
2368
2403
|
},
|
|
2369
2404
|
// ── Backdrop Filters (composable via CSS variables, web-only) ────────────
|
|
2370
2405
|
"backdrop-blur": ({ value, isArbitrary }) => {
|
|
2371
|
-
if (!
|
|
2406
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2372
2407
|
const sizes = {
|
|
2373
2408
|
"": "blur(8px)",
|
|
2374
2409
|
sm: "blur(4px)",
|
|
@@ -2383,52 +2418,52 @@ var RESOLVERS = {
|
|
|
2383
2418
|
return v !== void 0 ? { "--tw-backdrop-blur": v, backdropFilter: BACKDROP_FILTER_COMPOSE } : null;
|
|
2384
2419
|
},
|
|
2385
2420
|
"backdrop-brightness": ({ value, isArbitrary }) => {
|
|
2386
|
-
if (!
|
|
2421
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2387
2422
|
const v = isArbitrary ? `brightness(${value})` : `brightness(${parseFloat(value) / 100})`;
|
|
2388
2423
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-brightness": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2389
2424
|
},
|
|
2390
2425
|
"backdrop-contrast": ({ value, isArbitrary }) => {
|
|
2391
|
-
if (!
|
|
2426
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2392
2427
|
const v = isArbitrary ? `contrast(${value})` : `contrast(${parseFloat(value) / 100})`;
|
|
2393
2428
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-contrast": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2394
2429
|
},
|
|
2395
2430
|
"backdrop-grayscale": ({ value }) => {
|
|
2396
|
-
if (!
|
|
2431
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2397
2432
|
return { "--tw-backdrop-grayscale": value === "0" ? "grayscale(0)" : "grayscale(100%)", backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2398
2433
|
},
|
|
2399
2434
|
"backdrop-hue-rotate": ({ value, negative, isArbitrary }) => {
|
|
2400
|
-
if (!
|
|
2435
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2401
2436
|
const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
|
|
2402
2437
|
if (isNaN(parseFloat(deg)) && !isArbitrary) return null;
|
|
2403
2438
|
return { "--tw-backdrop-hue-rotate": `hue-rotate(${deg})`, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2404
2439
|
},
|
|
2405
2440
|
"backdrop-invert": ({ value }) => {
|
|
2406
|
-
if (!
|
|
2441
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2407
2442
|
return { "--tw-backdrop-invert": value === "0" ? "invert(0)" : "invert(100%)", backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2408
2443
|
},
|
|
2409
2444
|
"backdrop-opacity": ({ value, isArbitrary }) => {
|
|
2410
|
-
if (!
|
|
2445
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2411
2446
|
const v = isArbitrary ? `opacity(${value})` : `opacity(${parseFloat(value) / 100})`;
|
|
2412
2447
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-opacity": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2413
2448
|
},
|
|
2414
2449
|
"backdrop-saturate": ({ value, isArbitrary }) => {
|
|
2415
|
-
if (!
|
|
2450
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2416
2451
|
const v = isArbitrary ? `saturate(${value})` : `saturate(${parseFloat(value) / 100})`;
|
|
2417
2452
|
return isNaN(parseFloat(value)) && !isArbitrary ? null : { "--tw-backdrop-saturate": v, backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2418
2453
|
},
|
|
2419
2454
|
"backdrop-sepia": ({ value }) => {
|
|
2420
|
-
if (!
|
|
2455
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2421
2456
|
return { "--tw-backdrop-sepia": value === "0" ? "sepia(0)" : "sepia(100%)", backdropFilter: BACKDROP_FILTER_COMPOSE };
|
|
2422
2457
|
},
|
|
2423
2458
|
"backdrop-filter": ({ value, isArbitrary }) => {
|
|
2424
|
-
if (!
|
|
2459
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2425
2460
|
if (isArbitrary) return { backdropFilter: value.replace(/_/g, " ") };
|
|
2426
2461
|
if (value === "none") return { backdropFilter: "none" };
|
|
2427
2462
|
return null;
|
|
2428
2463
|
},
|
|
2429
2464
|
// ── Background gradient (CSS variable gradient stops, web-only) ──────────
|
|
2430
2465
|
"bg-gradient-to": ({ value }) => {
|
|
2431
|
-
if (!
|
|
2466
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2432
2467
|
const directions = {
|
|
2433
2468
|
t: "to top",
|
|
2434
2469
|
tr: "to top right",
|
|
@@ -2446,7 +2481,7 @@ var RESOLVERS = {
|
|
|
2446
2481
|
};
|
|
2447
2482
|
},
|
|
2448
2483
|
from: ({ value, isArbitrary }, { colors }) => {
|
|
2449
|
-
if (!
|
|
2484
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2450
2485
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2451
2486
|
if (!color) return null;
|
|
2452
2487
|
return {
|
|
@@ -2455,7 +2490,7 @@ var RESOLVERS = {
|
|
|
2455
2490
|
};
|
|
2456
2491
|
},
|
|
2457
2492
|
via: ({ value, isArbitrary }, { colors }) => {
|
|
2458
|
-
if (!
|
|
2493
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2459
2494
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2460
2495
|
if (!color) return null;
|
|
2461
2496
|
return {
|
|
@@ -2464,7 +2499,7 @@ var RESOLVERS = {
|
|
|
2464
2499
|
};
|
|
2465
2500
|
},
|
|
2466
2501
|
to: ({ value, isArbitrary }, { colors }) => {
|
|
2467
|
-
if (!
|
|
2502
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2468
2503
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2469
2504
|
if (!color) return null;
|
|
2470
2505
|
return { "--tw-gradient-to": color };
|
|
@@ -2473,23 +2508,23 @@ var RESOLVERS = {
|
|
|
2473
2508
|
"skew-x": ({ value, negative, isArbitrary }) => {
|
|
2474
2509
|
const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
|
|
2475
2510
|
if (!isArbitrary && isNaN(parseFloat(value))) return null;
|
|
2476
|
-
return
|
|
2511
|
+
return getEffectiveIsWeb() ? { transform: `skewX(${deg})` } : { transform: [{ skewX: deg }] };
|
|
2477
2512
|
},
|
|
2478
2513
|
"skew-y": ({ value, negative, isArbitrary }) => {
|
|
2479
2514
|
const deg = isArbitrary ? value : `${(negative ? -1 : 1) * parseFloat(value)}deg`;
|
|
2480
2515
|
if (!isArbitrary && isNaN(parseFloat(value))) return null;
|
|
2481
|
-
return
|
|
2516
|
+
return getEffectiveIsWeb() ? { transform: `skewY(${deg})` } : { transform: [{ skewY: deg }] };
|
|
2482
2517
|
},
|
|
2483
2518
|
// Arbitrary full transform string: transform-[rotate(45deg)_scale(1.5)]
|
|
2484
2519
|
transform: ({ value, isArbitrary }) => {
|
|
2485
|
-
if (!
|
|
2520
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2486
2521
|
if (isArbitrary) return { transform: value.replace(/_/g, " ") };
|
|
2487
2522
|
if (value === "none") return { transform: "none" };
|
|
2488
2523
|
return null;
|
|
2489
2524
|
},
|
|
2490
2525
|
// Transform origin
|
|
2491
2526
|
origin: ({ value, isArbitrary }) => {
|
|
2492
|
-
if (!
|
|
2527
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2493
2528
|
if (isArbitrary) return { transformOrigin: value.replace(/_/g, " ") };
|
|
2494
2529
|
const origins = {
|
|
2495
2530
|
center: "center",
|
|
@@ -2506,7 +2541,7 @@ var RESOLVERS = {
|
|
|
2506
2541
|
},
|
|
2507
2542
|
// ── Text decoration advanced (web-only) ───────────────────────────────────
|
|
2508
2543
|
decoration: ({ value, isArbitrary }, { colors }) => {
|
|
2509
|
-
if (!
|
|
2544
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2510
2545
|
if (isArbitrary) {
|
|
2511
2546
|
if (/^\d/.test(value) || value.startsWith("calc(")) return { textDecorationThickness: value };
|
|
2512
2547
|
return { textDecorationColor: value };
|
|
@@ -2533,7 +2568,7 @@ var RESOLVERS = {
|
|
|
2533
2568
|
return color ? { textDecorationColor: color } : null;
|
|
2534
2569
|
},
|
|
2535
2570
|
"underline-offset": ({ value, isArbitrary }) => {
|
|
2536
|
-
if (!
|
|
2571
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2537
2572
|
if (isArbitrary) return { textUnderlineOffset: value };
|
|
2538
2573
|
const offsets = {
|
|
2539
2574
|
auto: "auto",
|
|
@@ -2547,7 +2582,7 @@ var RESOLVERS = {
|
|
|
2547
2582
|
},
|
|
2548
2583
|
// ── Outline extended (web-only) ───────────────────────────────────────────
|
|
2549
2584
|
outline: ({ value, isArbitrary }, { colors }) => {
|
|
2550
|
-
if (!
|
|
2585
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2551
2586
|
if (!value) return { outline: "2px solid transparent", outlineOffset: "2px" };
|
|
2552
2587
|
if (value === "none") return { outline: "none", outlineOffset: "0" };
|
|
2553
2588
|
if (isArbitrary) {
|
|
@@ -2560,14 +2595,14 @@ var RESOLVERS = {
|
|
|
2560
2595
|
return color ? { outlineColor: color } : null;
|
|
2561
2596
|
},
|
|
2562
2597
|
"outline-offset": ({ value, isArbitrary }) => {
|
|
2563
|
-
if (!
|
|
2598
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2564
2599
|
if (isArbitrary) return { outlineOffset: value };
|
|
2565
2600
|
const offsets = { "0": "0px", "1": "1px", "2": "2px", "4": "4px", "8": "8px" };
|
|
2566
2601
|
return offsets[value] ? { outlineOffset: offsets[value] } : null;
|
|
2567
2602
|
},
|
|
2568
2603
|
// ── Columns (web-only) ─────────────────────────────────────────────────────
|
|
2569
2604
|
columns: ({ value, isArbitrary }) => {
|
|
2570
|
-
if (!
|
|
2605
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2571
2606
|
if (isArbitrary) return { columnCount: value };
|
|
2572
2607
|
if (value === "auto") return { columnCount: "auto" };
|
|
2573
2608
|
const n = parseInt(value, 10);
|
|
@@ -2591,7 +2626,7 @@ var RESOLVERS = {
|
|
|
2591
2626
|
},
|
|
2592
2627
|
// ── Mix / background blend mode (web-only) ───────────────────────────────
|
|
2593
2628
|
"mix-blend": ({ value }) => {
|
|
2594
|
-
if (!
|
|
2629
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2595
2630
|
const modes = [
|
|
2596
2631
|
"normal",
|
|
2597
2632
|
"multiply",
|
|
@@ -2614,7 +2649,7 @@ var RESOLVERS = {
|
|
|
2614
2649
|
return modes.includes(value) ? { mixBlendMode: value } : null;
|
|
2615
2650
|
},
|
|
2616
2651
|
"bg-blend": ({ value }) => {
|
|
2617
|
-
if (!
|
|
2652
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2618
2653
|
const modes = [
|
|
2619
2654
|
"normal",
|
|
2620
2655
|
"multiply",
|
|
@@ -2637,7 +2672,7 @@ var RESOLVERS = {
|
|
|
2637
2672
|
},
|
|
2638
2673
|
// ── Will-change (web-only) ─────────────────────────────────────────────────
|
|
2639
2674
|
"will-change": ({ value, isArbitrary }) => {
|
|
2640
|
-
if (!
|
|
2675
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2641
2676
|
if (isArbitrary) return { willChange: value.replace(/_/g, ", ") };
|
|
2642
2677
|
const presets = {
|
|
2643
2678
|
auto: "auto",
|
|
@@ -2651,21 +2686,21 @@ var RESOLVERS = {
|
|
|
2651
2686
|
// These return special __divide* markers that resolver.ts converts to
|
|
2652
2687
|
// .cls > * + * { border-... } CSS rules. No inline style is applied.
|
|
2653
2688
|
"divide-x": ({ value, isArbitrary }) => {
|
|
2654
|
-
if (!
|
|
2689
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2655
2690
|
if (value === "reverse") return null;
|
|
2656
2691
|
if (!value) return { __divideX: 1 };
|
|
2657
2692
|
const n = parseFloat(value);
|
|
2658
2693
|
return isNaN(n) ? null : { __divideX: n };
|
|
2659
2694
|
},
|
|
2660
2695
|
"divide-y": ({ value, isArbitrary }) => {
|
|
2661
|
-
if (!
|
|
2696
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2662
2697
|
if (value === "reverse") return null;
|
|
2663
2698
|
if (!value) return { __divideY: 1 };
|
|
2664
2699
|
const n = parseFloat(value);
|
|
2665
2700
|
return isNaN(n) ? null : { __divideY: n };
|
|
2666
2701
|
},
|
|
2667
2702
|
divide: ({ value, isArbitrary }, { colors }) => {
|
|
2668
|
-
if (!
|
|
2703
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2669
2704
|
if (isArbitrary) return { __divideColor: value };
|
|
2670
2705
|
const styleTokens = {
|
|
2671
2706
|
solid: "solid",
|
|
@@ -2682,7 +2717,7 @@ var RESOLVERS = {
|
|
|
2682
2717
|
// Named presets give cross-platform shadow; arbitrary is web-only.
|
|
2683
2718
|
"text-shadow": ({ value, isArbitrary }, { colors }) => {
|
|
2684
2719
|
if (value === "none") {
|
|
2685
|
-
return
|
|
2720
|
+
return getEffectiveIsWeb() ? { textShadow: "none" } : { textShadowColor: "transparent", textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 0 };
|
|
2686
2721
|
}
|
|
2687
2722
|
const webPresets = {
|
|
2688
2723
|
"": "0 2px 4px rgba(0,0,0,0.3)",
|
|
@@ -2699,15 +2734,15 @@ var RESOLVERS = {
|
|
|
2699
2734
|
xl: { textShadowColor: "rgba(0,0,0,0.5)", textShadowOffset: { width: 0, height: 16 }, textShadowRadius: 32 }
|
|
2700
2735
|
};
|
|
2701
2736
|
if (value in webPresets) {
|
|
2702
|
-
if (
|
|
2737
|
+
if (getEffectiveIsWeb()) return { textShadow: webPresets[value] };
|
|
2703
2738
|
return nativePresets[value] ?? null;
|
|
2704
2739
|
}
|
|
2705
2740
|
if (isArbitrary) {
|
|
2706
|
-
return
|
|
2741
|
+
return getEffectiveIsWeb() ? { textShadow: value.replace(/_/g, " ") } : null;
|
|
2707
2742
|
}
|
|
2708
2743
|
const color = resolveColor(value, colors, false);
|
|
2709
2744
|
if (color) {
|
|
2710
|
-
return
|
|
2745
|
+
return getEffectiveIsWeb() ? { textShadow: `0 2px 4px ${color}` } : { textShadowColor: color };
|
|
2711
2746
|
}
|
|
2712
2747
|
return null;
|
|
2713
2748
|
},
|
|
@@ -2715,13 +2750,13 @@ var RESOLVERS = {
|
|
|
2715
2750
|
perspective: ({ value, isArbitrary }) => {
|
|
2716
2751
|
if (isArbitrary) {
|
|
2717
2752
|
const numPx = parseFloat(value);
|
|
2718
|
-
if (
|
|
2753
|
+
if (getEffectiveIsWeb()) return { transform: `perspective(${value})` };
|
|
2719
2754
|
return isNaN(numPx) ? null : { transform: [{ perspective: numPx }] };
|
|
2720
2755
|
}
|
|
2721
|
-
if (value === "none") return
|
|
2756
|
+
if (value === "none") return getEffectiveIsWeb() ? { transform: "none" } : null;
|
|
2722
2757
|
const n = parseFloat(value);
|
|
2723
2758
|
if (isNaN(n)) return null;
|
|
2724
|
-
return
|
|
2759
|
+
return getEffectiveIsWeb() ? { transform: `perspective(${n}px)` } : { transform: [{ perspective: n }] };
|
|
2725
2760
|
},
|
|
2726
2761
|
// ── Tint color (native-only, for Image and icon components) ──────────────
|
|
2727
2762
|
tint: ({ value, isArbitrary }, { colors }) => {
|
|
@@ -2739,7 +2774,7 @@ var RESOLVERS = {
|
|
|
2739
2774
|
// resolver.ts detects __keyframe, injects the rule, then strips the marker
|
|
2740
2775
|
// so it never reaches element inline styles.
|
|
2741
2776
|
animate: ({ value, isArbitrary }) => {
|
|
2742
|
-
if (!
|
|
2777
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2743
2778
|
if (isArbitrary) return { animation: value.replace(/_/g, " ") };
|
|
2744
2779
|
const defs = {
|
|
2745
2780
|
none: { animation: "none" },
|
|
@@ -2765,7 +2800,7 @@ var RESOLVERS = {
|
|
|
2765
2800
|
},
|
|
2766
2801
|
// ── Line-clamp (web-only) ─────────────────────────────────────────────────
|
|
2767
2802
|
"line-clamp": ({ value }) => {
|
|
2768
|
-
if (!
|
|
2803
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2769
2804
|
if (value === "none") return { overflow: "visible", display: "block", WebkitLineClamp: "unset" };
|
|
2770
2805
|
const n = parseInt(value, 10);
|
|
2771
2806
|
if (isNaN(n) || n < 1) return null;
|
|
@@ -2778,14 +2813,14 @@ var RESOLVERS = {
|
|
|
2778
2813
|
},
|
|
2779
2814
|
// ── Caret color (web-only) ────────────────────────────────────────────────
|
|
2780
2815
|
caret: ({ value, isArbitrary }, { colors }) => {
|
|
2781
|
-
if (!
|
|
2816
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2782
2817
|
if (value === "auto" || value === "transparent") return { caretColor: value };
|
|
2783
2818
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2784
2819
|
return color ? { caretColor: color } : null;
|
|
2785
2820
|
},
|
|
2786
2821
|
// ── Accent color (web-only) ───────────────────────────────────────────────
|
|
2787
2822
|
accent: ({ value, isArbitrary }, { colors }) => {
|
|
2788
|
-
if (!
|
|
2823
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2789
2824
|
if (value === "auto") return { accentColor: "auto" };
|
|
2790
2825
|
const color = resolveColor(value, colors, isArbitrary);
|
|
2791
2826
|
return color ? { accentColor: color } : null;
|
|
@@ -2869,7 +2904,7 @@ var RESOLVERS = {
|
|
|
2869
2904
|
}
|
|
2870
2905
|
const v = zIndex[value];
|
|
2871
2906
|
if (v !== void 0) {
|
|
2872
|
-
if (v === "auto") return
|
|
2907
|
+
if (v === "auto") return getEffectiveIsWeb() ? { zIndex: "auto" } : null;
|
|
2873
2908
|
return { zIndex: v };
|
|
2874
2909
|
}
|
|
2875
2910
|
const n = parseInt(value);
|
|
@@ -2898,13 +2933,13 @@ var RESOLVERS = {
|
|
|
2898
2933
|
},
|
|
2899
2934
|
// ── Line height ────────────────────────────────────────────────────────────
|
|
2900
2935
|
leading: ({ value, isArbitrary }, { lineHeight }) => {
|
|
2901
|
-
if (isArbitrary) return { lineHeight:
|
|
2936
|
+
if (isArbitrary) return { lineHeight: getEffectiveIsWeb() ? value : toNativeValue(value) };
|
|
2902
2937
|
const v = lineHeight[value];
|
|
2903
2938
|
return v !== void 0 ? { lineHeight: v } : null;
|
|
2904
2939
|
},
|
|
2905
2940
|
// ── Letter spacing ─────────────────────────────────────────────────────────
|
|
2906
2941
|
tracking: ({ value, isArbitrary }, { letterSpacing }) => {
|
|
2907
|
-
if (isArbitrary) return { letterSpacing:
|
|
2942
|
+
if (isArbitrary) return { letterSpacing: getEffectiveIsWeb() ? value : toNativeValue(value) };
|
|
2908
2943
|
const v = letterSpacing[value];
|
|
2909
2944
|
return v !== void 0 ? { letterSpacing: v } : null;
|
|
2910
2945
|
},
|
|
@@ -2919,34 +2954,34 @@ var RESOLVERS = {
|
|
|
2919
2954
|
scale: ({ value, isArbitrary }) => {
|
|
2920
2955
|
const n = isArbitrary ? parseFloat(value) : parseFloat(value) / 100;
|
|
2921
2956
|
if (isNaN(n)) return null;
|
|
2922
|
-
return
|
|
2957
|
+
return getEffectiveIsWeb() ? { transform: `scale(${n})` } : { transform: [{ scale: n }] };
|
|
2923
2958
|
},
|
|
2924
2959
|
"scale-x": ({ value, isArbitrary }) => {
|
|
2925
2960
|
const n = isArbitrary ? parseFloat(value) : parseFloat(value) / 100;
|
|
2926
2961
|
if (isNaN(n)) return null;
|
|
2927
|
-
return
|
|
2962
|
+
return getEffectiveIsWeb() ? { transform: `scaleX(${n})` } : { transform: [{ scaleX: n }] };
|
|
2928
2963
|
},
|
|
2929
2964
|
"scale-y": ({ value, isArbitrary }) => {
|
|
2930
2965
|
const n = isArbitrary ? parseFloat(value) : parseFloat(value) / 100;
|
|
2931
2966
|
if (isNaN(n)) return null;
|
|
2932
|
-
return
|
|
2967
|
+
return getEffectiveIsWeb() ? { transform: `scaleY(${n})` } : { transform: [{ scaleY: n }] };
|
|
2933
2968
|
},
|
|
2934
2969
|
// ── Rotate ─────────────────────────────────────────────────────────────────
|
|
2935
2970
|
rotate: ({ value, negative, isArbitrary }) => {
|
|
2936
2971
|
if (isArbitrary) {
|
|
2937
2972
|
const finalValue = negative ? `-${value}` : value;
|
|
2938
|
-
return
|
|
2973
|
+
return getEffectiveIsWeb() ? { transform: `rotate(${finalValue})` } : { transform: [{ rotate: finalValue }] };
|
|
2939
2974
|
}
|
|
2940
2975
|
const deg = parseFloat(value);
|
|
2941
2976
|
if (isNaN(deg)) return null;
|
|
2942
2977
|
const finalDeg = negative ? -deg : deg;
|
|
2943
|
-
return
|
|
2978
|
+
return getEffectiveIsWeb() ? { transform: `rotate(${finalDeg}deg)` } : { transform: [{ rotate: `${finalDeg}deg` }] };
|
|
2944
2979
|
},
|
|
2945
2980
|
// ── Translate ──────────────────────────────────────────────────────────────
|
|
2946
2981
|
"translate-x": ({ value, negative, isArbitrary }, { spacing }) => {
|
|
2947
2982
|
const v = resolveSpacing(value, negative, spacing, isArbitrary);
|
|
2948
2983
|
if (v === null) return null;
|
|
2949
|
-
if (
|
|
2984
|
+
if (getEffectiveIsWeb()) return { transform: `translateX(${v})` };
|
|
2950
2985
|
if (typeof v === "string") {
|
|
2951
2986
|
const n = parseFloat(v);
|
|
2952
2987
|
return isNaN(n) ? null : { transform: [{ translateX: n }] };
|
|
@@ -2956,7 +2991,7 @@ var RESOLVERS = {
|
|
|
2956
2991
|
"translate-y": ({ value, negative, isArbitrary }, { spacing }) => {
|
|
2957
2992
|
const v = resolveSpacing(value, negative, spacing, isArbitrary);
|
|
2958
2993
|
if (v === null) return null;
|
|
2959
|
-
if (
|
|
2994
|
+
if (getEffectiveIsWeb()) return { transform: `translateY(${v})` };
|
|
2960
2995
|
if (typeof v === "string") {
|
|
2961
2996
|
const n = parseFloat(v);
|
|
2962
2997
|
return isNaN(n) ? null : { transform: [{ translateY: n }] };
|
|
@@ -2969,12 +3004,12 @@ var RESOLVERS = {
|
|
|
2969
3004
|
const presets = { auto: "auto", square: 1, video: 16 / 9 };
|
|
2970
3005
|
if (!(value in presets)) return null;
|
|
2971
3006
|
const v = presets[value];
|
|
2972
|
-
if (v === "auto") return
|
|
3007
|
+
if (v === "auto") return getEffectiveIsWeb() ? { aspectRatio: "auto" } : null;
|
|
2973
3008
|
return { aspectRatio: v };
|
|
2974
3009
|
},
|
|
2975
3010
|
// ── Transition (web-only; use Animated API on native) ─────────────────────
|
|
2976
3011
|
transition: ({ value }) => {
|
|
2977
|
-
if (!
|
|
3012
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2978
3013
|
const presets = {
|
|
2979
3014
|
"": "color 150ms, background-color 150ms, border-color 150ms, opacity 150ms, box-shadow 150ms",
|
|
2980
3015
|
all: "all 150ms",
|
|
@@ -2988,18 +3023,18 @@ var RESOLVERS = {
|
|
|
2988
3023
|
return v !== void 0 ? { transition: v } : null;
|
|
2989
3024
|
},
|
|
2990
3025
|
duration: ({ value, isArbitrary }) => {
|
|
2991
|
-
if (!
|
|
3026
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2992
3027
|
const ms = isArbitrary ? value : `${value}ms`;
|
|
2993
3028
|
return { transitionDuration: ms };
|
|
2994
3029
|
},
|
|
2995
3030
|
delay: ({ value, isArbitrary }) => {
|
|
2996
|
-
if (!
|
|
3031
|
+
if (!getEffectiveIsWeb()) return null;
|
|
2997
3032
|
const ms = isArbitrary ? value : `${value}ms`;
|
|
2998
3033
|
return { transitionDelay: ms };
|
|
2999
3034
|
},
|
|
3000
3035
|
// ── Ring (web-only: box-shadow outline ring) ──────────────────────────────
|
|
3001
3036
|
ring: ({ value, isArbitrary }, { colors }) => {
|
|
3002
|
-
if (!
|
|
3037
|
+
if (!getEffectiveIsWeb()) return null;
|
|
3003
3038
|
const DEFAULT_COLOR = "rgba(59, 130, 246, 0.5)";
|
|
3004
3039
|
const DEFAULT_WIDTH = 3;
|
|
3005
3040
|
if (!value) {
|
|
@@ -3026,7 +3061,7 @@ var RESOLVERS = {
|
|
|
3026
3061
|
return null;
|
|
3027
3062
|
},
|
|
3028
3063
|
"ring-offset": ({ value, isArbitrary }, _theme) => {
|
|
3029
|
-
if (!
|
|
3064
|
+
if (!getEffectiveIsWeb()) return null;
|
|
3030
3065
|
const DEFAULT_RING_COLOR = "rgba(59, 130, 246, 0.5)";
|
|
3031
3066
|
const DEFAULT_RING_WIDTH = 3;
|
|
3032
3067
|
const offsetTokens = { "0": 0, "1": 1, "2": 2, "4": 4, "8": 8 };
|
|
@@ -3055,7 +3090,7 @@ function resolveUtility(parsed, theme) {
|
|
|
3055
3090
|
if (parsed.utility === "inline-grid") {
|
|
3056
3091
|
return { display: "inline-grid" };
|
|
3057
3092
|
}
|
|
3058
|
-
if (parsed.utility in
|
|
3093
|
+
if (parsed.utility in getStandalone()) return getStandalone()[parsed.utility] ?? null;
|
|
3059
3094
|
}
|
|
3060
3095
|
const resolver = PLUGIN_RESOLVERS[parsed.utility] ?? RESOLVERS[parsed.utility];
|
|
3061
3096
|
if (resolver) return resolver(parsed, theme);
|
|
@@ -3071,7 +3106,7 @@ function getPluginStandaloneMap() {
|
|
|
3071
3106
|
return PLUGIN_STANDALONE;
|
|
3072
3107
|
}
|
|
3073
3108
|
function isKnownUtility(utility) {
|
|
3074
|
-
return utility in
|
|
3109
|
+
return utility in getStandalone() || utility in RESOLVERS || utility in PLUGIN_STANDALONE || utility in PLUGIN_RESOLVERS;
|
|
3075
3110
|
}
|
|
3076
3111
|
|
|
3077
3112
|
// src/core/responsiveStore.ts
|