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