tamagui 1.82.0 → 1.82.1

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/dist/native.js CHANGED
@@ -1429,36 +1429,6 @@ var require_insertStyleRule_native = __commonJS({
1429
1429
  }
1430
1430
  });
1431
1431
 
1432
- // ../web/dist/cjs/helpers/createProxy.native.js
1433
- var require_createProxy_native = __commonJS({
1434
- "../web/dist/cjs/helpers/createProxy.native.js"(exports, module2) {
1435
- "use strict";
1436
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
1437
- for (var name in all)
1438
- __defProp2(target, name, { get: all[name], enumerable: !0 });
1439
- }, __copyProps2 = (to, from, except, desc) => {
1440
- if (from && typeof from == "object" || typeof from == "function")
1441
- for (let key of __getOwnPropNames2(from))
1442
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1443
- return to;
1444
- }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), createProxy_exports = {};
1445
- __export2(createProxy_exports, {
1446
- createProxy: () => createProxy
1447
- });
1448
- module2.exports = __toCommonJS2(createProxy_exports);
1449
- function createProxy(target, handler) {
1450
- return process.env.NODE_ENV === "development" && (typeof target != "object" || !target) && console.warn(
1451
- "Invalid object given for proxy:",
1452
- target,
1453
- `
1454
-
1455
- This can be due to a missing theme or configuration given to Tamagui.`,
1456
- new Error().stack
1457
- ), new Proxy(target || {}, handler);
1458
- }
1459
- }
1460
- });
1461
-
1462
1432
  // ../web/dist/cjs/helpers/matchMedia.native.js
1463
1433
  var require_matchMedia_native = __commonJS({
1464
1434
  "../web/dist/cjs/helpers/matchMedia.native.js"(exports, module2) {
@@ -1547,117 +1517,6 @@ var require_pseudoDescriptors_native = __commonJS({
1547
1517
  }
1548
1518
  });
1549
1519
 
1550
- // ../web/dist/cjs/helpers/objectIdentityKey.native.js
1551
- var require_objectIdentityKey_native = __commonJS({
1552
- "../web/dist/cjs/helpers/objectIdentityKey.native.js"(exports, module2) {
1553
- "use strict";
1554
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
1555
- for (var name in all)
1556
- __defProp2(target, name, { get: all[name], enumerable: !0 });
1557
- }, __copyProps2 = (to, from, except, desc) => {
1558
- if (from && typeof from == "object" || typeof from == "function")
1559
- for (let key of __getOwnPropNames2(from))
1560
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1561
- return to;
1562
- }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), objectIdentityKey_exports = {};
1563
- __export2(objectIdentityKey_exports, {
1564
- objectIdentityKey: () => objectIdentityKey
1565
- });
1566
- module2.exports = __toCommonJS2(objectIdentityKey_exports);
1567
- function objectIdentityKey(obj) {
1568
- let k = "";
1569
- for (let key in obj) {
1570
- k += key;
1571
- let arg = obj[key], type = typeof arg;
1572
- if (!arg || type !== "object" && type !== "function")
1573
- k += type + arg;
1574
- else if (cache.has(arg))
1575
- k += cache.get(arg);
1576
- else {
1577
- let v = Math.random();
1578
- cache.set(arg, v), k += v;
1579
- }
1580
- }
1581
- return k;
1582
- }
1583
- var cache = /* @__PURE__ */ new WeakMap();
1584
- }
1585
- });
1586
-
1587
- // ../web/dist/cjs/helpers/createStyledContext.native.js
1588
- var require_createStyledContext_native = __commonJS({
1589
- "../web/dist/cjs/helpers/createStyledContext.native.js"(exports, module2) {
1590
- "use strict";
1591
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
1592
- for (var name in all)
1593
- __defProp2(target, name, { get: all[name], enumerable: !0 });
1594
- }, __copyProps2 = (to, from, except, desc) => {
1595
- if (from && typeof from == "object" || typeof from == "function")
1596
- for (let key of __getOwnPropNames2(from))
1597
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1598
- return to;
1599
- }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), createStyledContext_exports = {};
1600
- __export2(createStyledContext_exports, {
1601
- createStyledContext: () => createStyledContext2
1602
- });
1603
- module2.exports = __toCommonJS2(createStyledContext_exports);
1604
- var import_react2 = require("react"), import_objectIdentityKey = require_objectIdentityKey_native(), import_jsx_runtime6 = require("react/jsx-runtime");
1605
- function createStyledContext2(defaultValues) {
1606
- let OGContext = (0, import_react2.createContext)(defaultValues), OGProvider2 = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = ({
1607
- children,
1608
- scope,
1609
- ...values
1610
- }) => {
1611
- let next = (0, import_react2.useMemo)(() => ({
1612
- // this ! is a workaround for ts error
1613
- ...defaultValues,
1614
- ...values
1615
- }), [(0, import_objectIdentityKey.objectIdentityKey)(values)]), Provider2 = OGProvider2;
1616
- if (scope) {
1617
- let ScopedContext = scopedContexts.get(scope);
1618
- ScopedContext || (ScopedContext = (0, import_react2.createContext)(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
1619
- }
1620
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Provider2, { value: next, children });
1621
- }, useStyledContext = (scope) => {
1622
- let context = scope ? scopedContexts.get(scope) : OGContext;
1623
- return (0, import_react2.useContext)(context);
1624
- };
1625
- return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
1626
- }
1627
- }
1628
- });
1629
-
1630
- // ../web/dist/cjs/contexts/ComponentContext.native.js
1631
- var require_ComponentContext_native = __commonJS({
1632
- "../web/dist/cjs/contexts/ComponentContext.native.js"(exports, module2) {
1633
- "use strict";
1634
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
1635
- for (var name in all)
1636
- __defProp2(target, name, { get: all[name], enumerable: !0 });
1637
- }, __copyProps2 = (to, from, except, desc) => {
1638
- if (from && typeof from == "object" || typeof from == "function")
1639
- for (let key of __getOwnPropNames2(from))
1640
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1641
- return to;
1642
- }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), ComponentContext_exports = {};
1643
- __export2(ComponentContext_exports, {
1644
- ComponentContext: () => ComponentContext2
1645
- });
1646
- module2.exports = __toCommonJS2(ComponentContext_exports);
1647
- var import_createStyledContext = require_createStyledContext_native(), ComponentContext2 = (0, import_createStyledContext.createStyledContext)({
1648
- disableSSR: void 0,
1649
- inText: !1,
1650
- language: null,
1651
- animationDriver: null,
1652
- groups: {
1653
- emit: null,
1654
- subscribe: null,
1655
- state: {}
1656
- }
1657
- });
1658
- }
1659
- });
1660
-
1661
1520
  // ../web/dist/cjs/hooks/useDisableSSR.native.js
1662
1521
  var require_useDisableSSR_native = __commonJS({
1663
1522
  "../web/dist/cjs/hooks/useDisableSSR.native.js"(exports, module2) {
@@ -1672,17 +1531,12 @@ var require_useDisableSSR_native = __commonJS({
1672
1531
  return to;
1673
1532
  }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), useDisableSSR_exports = {};
1674
1533
  __export2(useDisableSSR_exports, {
1675
- getDisableSSR: () => getDisableSSR,
1676
- useDisableSSR: () => useDisableSSR
1534
+ getDisableSSR: () => getDisableSSR
1677
1535
  });
1678
1536
  module2.exports = __toCommonJS2(useDisableSSR_exports);
1679
- var import_react2 = require("react"), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native();
1680
- function useDisableSSR() {
1681
- let componentContext = (0, import_react2.useContext)(import_ComponentContext.ComponentContext);
1682
- return getDisableSSR(componentContext);
1683
- }
1537
+ var import_config = require_config_native();
1684
1538
  function getDisableSSR(componentContext) {
1685
- return componentContext.disableSSR ?? (0, import_config.getConfig)().disableSSR;
1539
+ return (componentContext == null ? void 0 : componentContext.disableSSR) ?? (0, import_config.getConfig)().disableSSR;
1686
1540
  }
1687
1541
  }
1688
1542
  });
@@ -1718,9 +1572,9 @@ var require_useMedia_native = __commonJS({
1718
1572
  useMedia: () => useMedia3
1719
1573
  });
1720
1574
  module2.exports = __toCommonJS2(useMedia_exports);
1721
- var import_constants4 = require_index_native(), import_react2 = require("react"), import_config = require_config_native(), import_createProxy = require_createProxy_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native(), mediaState3 = (
1575
+ var import_constants4 = require_index_native(), import_react2 = require("react"), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native(), mediaState3 = (
1722
1576
  // development only safeguard
1723
- process.env.NODE_ENV === "development" ? (0, import_createProxy.createProxy)(
1577
+ process.env.NODE_ENV === "development" ? new Proxy(
1724
1578
  {},
1725
1579
  {
1726
1580
  get(target, key) {
@@ -1792,7 +1646,7 @@ var require_useMedia_native = __commonJS({
1792
1646
  return listeners.add(subscriber), () => listeners.delete(subscriber);
1793
1647
  }
1794
1648
  function useMedia3(uid, componentContext) {
1795
- let internal = (0, import_react2.useRef)(), initialState = ((componentContext ? (0, import_useDisableSSR.getDisableSSR)(componentContext) : (0, import_useDisableSSR.useDisableSSR)()) || !import_constants4.isWeb ? mediaState3 : initState) || {}, state = (0, import_react2.useSyncExternalStore)(
1649
+ let internal = (0, import_react2.useRef)(), initialState = ((0, import_useDisableSSR.getDisableSSR)(componentContext) || !import_constants4.isWeb ? mediaState3 : initState) || {}, state = (0, import_react2.useSyncExternalStore)(
1796
1650
  subscribe,
1797
1651
  () => {
1798
1652
  if (!internal.current)
@@ -1990,6 +1844,117 @@ var require_constants_native2 = __commonJS({
1990
1844
  }
1991
1845
  });
1992
1846
 
1847
+ // ../web/dist/cjs/helpers/objectIdentityKey.native.js
1848
+ var require_objectIdentityKey_native = __commonJS({
1849
+ "../web/dist/cjs/helpers/objectIdentityKey.native.js"(exports, module2) {
1850
+ "use strict";
1851
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
1852
+ for (var name in all)
1853
+ __defProp2(target, name, { get: all[name], enumerable: !0 });
1854
+ }, __copyProps2 = (to, from, except, desc) => {
1855
+ if (from && typeof from == "object" || typeof from == "function")
1856
+ for (let key of __getOwnPropNames2(from))
1857
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1858
+ return to;
1859
+ }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), objectIdentityKey_exports = {};
1860
+ __export2(objectIdentityKey_exports, {
1861
+ objectIdentityKey: () => objectIdentityKey
1862
+ });
1863
+ module2.exports = __toCommonJS2(objectIdentityKey_exports);
1864
+ function objectIdentityKey(obj) {
1865
+ let k = "";
1866
+ for (let key in obj) {
1867
+ k += key;
1868
+ let arg = obj[key], type = typeof arg;
1869
+ if (!arg || type !== "object" && type !== "function")
1870
+ k += type + arg;
1871
+ else if (cache.has(arg))
1872
+ k += cache.get(arg);
1873
+ else {
1874
+ let v = Math.random();
1875
+ cache.set(arg, v), k += v;
1876
+ }
1877
+ }
1878
+ return k;
1879
+ }
1880
+ var cache = /* @__PURE__ */ new WeakMap();
1881
+ }
1882
+ });
1883
+
1884
+ // ../web/dist/cjs/helpers/createStyledContext.native.js
1885
+ var require_createStyledContext_native = __commonJS({
1886
+ "../web/dist/cjs/helpers/createStyledContext.native.js"(exports, module2) {
1887
+ "use strict";
1888
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
1889
+ for (var name in all)
1890
+ __defProp2(target, name, { get: all[name], enumerable: !0 });
1891
+ }, __copyProps2 = (to, from, except, desc) => {
1892
+ if (from && typeof from == "object" || typeof from == "function")
1893
+ for (let key of __getOwnPropNames2(from))
1894
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1895
+ return to;
1896
+ }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), createStyledContext_exports = {};
1897
+ __export2(createStyledContext_exports, {
1898
+ createStyledContext: () => createStyledContext2
1899
+ });
1900
+ module2.exports = __toCommonJS2(createStyledContext_exports);
1901
+ var import_react2 = require("react"), import_objectIdentityKey = require_objectIdentityKey_native(), import_jsx_runtime6 = require("react/jsx-runtime");
1902
+ function createStyledContext2(defaultValues) {
1903
+ let OGContext = (0, import_react2.createContext)(defaultValues), OGProvider2 = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), Provider = ({
1904
+ children,
1905
+ scope,
1906
+ ...values
1907
+ }) => {
1908
+ let next = (0, import_react2.useMemo)(() => ({
1909
+ // this ! is a workaround for ts error
1910
+ ...defaultValues,
1911
+ ...values
1912
+ }), [(0, import_objectIdentityKey.objectIdentityKey)(values)]), Provider2 = OGProvider2;
1913
+ if (scope) {
1914
+ let ScopedContext = scopedContexts.get(scope);
1915
+ ScopedContext || (ScopedContext = (0, import_react2.createContext)(defaultValues), scopedContexts.set(scope, ScopedContext)), Provider2 = ScopedContext.Provider;
1916
+ }
1917
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Provider2, { value: next, children });
1918
+ }, useStyledContext = (scope) => {
1919
+ let context = scope ? scopedContexts.get(scope) : OGContext;
1920
+ return (0, import_react2.useContext)(context);
1921
+ };
1922
+ return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
1923
+ }
1924
+ }
1925
+ });
1926
+
1927
+ // ../web/dist/cjs/contexts/ComponentContext.native.js
1928
+ var require_ComponentContext_native = __commonJS({
1929
+ "../web/dist/cjs/contexts/ComponentContext.native.js"(exports, module2) {
1930
+ "use strict";
1931
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
1932
+ for (var name in all)
1933
+ __defProp2(target, name, { get: all[name], enumerable: !0 });
1934
+ }, __copyProps2 = (to, from, except, desc) => {
1935
+ if (from && typeof from == "object" || typeof from == "function")
1936
+ for (let key of __getOwnPropNames2(from))
1937
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1938
+ return to;
1939
+ }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), ComponentContext_exports = {};
1940
+ __export2(ComponentContext_exports, {
1941
+ ComponentContext: () => ComponentContext2
1942
+ });
1943
+ module2.exports = __toCommonJS2(ComponentContext_exports);
1944
+ var import_createStyledContext = require_createStyledContext_native(), ComponentContext2 = (0, import_createStyledContext.createStyledContext)({
1945
+ disableSSR: void 0,
1946
+ inText: !1,
1947
+ language: null,
1948
+ animationDriver: null,
1949
+ groups: {
1950
+ emit: null,
1951
+ subscribe: null,
1952
+ state: {}
1953
+ }
1954
+ });
1955
+ }
1956
+ });
1957
+
1993
1958
  // ../web/dist/cjs/defaultComponentState.native.js
1994
1959
  var require_defaultComponentState_native = __commonJS({
1995
1960
  "../web/dist/cjs/defaultComponentState.native.js"(exports, module2) {
@@ -2768,10 +2733,10 @@ var require_normalizeColor_native = __commonJS({
2768
2733
  rgba: () => import_normalize_css_color2.rgba
2769
2734
  });
2770
2735
  module2.exports = __toCommonJS2(normalizeColor_exports);
2771
- var import_constants4 = require_index_native(), import_normalize_css_color = require_index_native11(), import_normalize_css_color2 = require_index_native11(), normalizeColor = (color, opacity) => {
2736
+ var import_normalize_css_color = require_index_native11(), import_normalize_css_color2 = require_index_native11(), normalizeColor = (color, opacity) => {
2772
2737
  if (!color)
2773
2738
  return;
2774
- if (color[0] === "$" || color[0] === "v" && color.startsWith("var(") || import_constants4.isWeb && opacity === 1)
2739
+ if (color[0] === "$" || color.startsWith("var("))
2775
2740
  return color;
2776
2741
  let colorProcessed = (0, import_normalize_css_color.normalizeCSSColor)(color);
2777
2742
  if (colorProcessed != null) {
@@ -2897,7 +2862,7 @@ var require_expandStyles_native = __commonJS({
2897
2862
  function fixStyles(style) {
2898
2863
  "elevationAndroid" in style && (style.elevation = style.elevationAndroid, delete style.elevationAndroid), (style.shadowRadius || style.shadowColor || style.shadowOpacity || style.shadowOffset) && Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
2899
2864
  for (let key in borderDefaults)
2900
- key in style && !style[borderDefaults[key]] && (style[borderDefaults[key]] = "solid");
2865
+ key in style && (style[borderDefaults[key]] ||= "solid");
2901
2866
  }
2902
2867
  var nativeStyle = import_constants4.isWeb ? null : "borderStyle", borderDefaults = {
2903
2868
  borderWidth: "borderStyle",
@@ -3072,7 +3037,7 @@ var require_getVariantExtras_native = __commonJS({
3072
3037
  getVariantExtras: () => getVariantExtras
3073
3038
  });
3074
3039
  module2.exports = __toCommonJS2(getVariantExtras_exports);
3075
- var import_createVariable = require_createVariable_native(), import_createProxy = require_createProxy_native();
3040
+ var import_createVariable = require_createVariable_native();
3076
3041
  function getVariantExtras(styleState) {
3077
3042
  let { curProps, conf, context, theme } = styleState, fonts = conf.fontsParsed;
3078
3043
  context != null && context.language && (fonts = getFontsForLanguage(conf.fontsParsed, context.language));
@@ -3087,7 +3052,7 @@ var require_getVariantExtras_native = __commonJS({
3087
3052
  font: fonts[fontFamily] || fonts[styleState.conf.defaultFont],
3088
3053
  // TODO do this in splitstlye
3089
3054
  // we avoid passing in default props for media queries because that would confuse things like SizableText.size:
3090
- props: (0, import_createProxy.createProxy)(curProps, {
3055
+ props: new Proxy(curProps, {
3091
3056
  // handles shorthands
3092
3057
  get(target, key) {
3093
3058
  let shorthand = conf.inverseShorthands[key];
@@ -3162,7 +3127,7 @@ var require_propMapper_native = __commonJS({
3162
3127
  module2.exports = __toCommonJS2(propMapper_exports);
3163
3128
  var import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_config = require_config_native(), import_isDevTools = require_isDevTools_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_expandStylesAndRemoveNullishValues = require_expandStylesAndRemoveNullishValues_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
3164
3129
  var _a;
3165
- if (!import_constants4.isAndroid && key === "elevationAndroid")
3130
+ if (lastFontFamilyToken = null, !import_constants4.isAndroid && key === "elevationAndroid")
3166
3131
  return;
3167
3132
  if (value === "unset") {
3168
3133
  let unsetVal = (_a = styleStateIn.conf.unset) == null ? void 0 : _a[key];
@@ -3191,7 +3156,7 @@ var require_propMapper_native = __commonJS({
3191
3156
  let result = (styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value)) || [
3192
3157
  [key, value]
3193
3158
  ];
3194
- return key === "fontFamily" && fontFamilyCache.set(result, lastFontFamilyToken), result;
3159
+ return key === "fontFamily" && lastFontFamilyToken && fontFamilyCache.set(result, lastFontFamilyToken), result;
3195
3160
  }
3196
3161
  }, resolveVariants = (key, value, styleProps, styleState, parentVariantKey) => {
3197
3162
  let { staticConfig, conf, debug } = styleState, { variants } = staticConfig;
@@ -3935,9 +3900,8 @@ var require_proxyThemeVariables_native = __commonJS({
3935
3900
  proxyThemeVariables: () => proxyThemeVariables
3936
3901
  });
3937
3902
  module2.exports = __toCommonJS2(proxyThemeVariables_exports);
3938
- var import_createProxy = require_createProxy_native();
3939
3903
  function proxyThemeVariables(obj) {
3940
- return (0, import_createProxy.createProxy)(obj || {}, {
3904
+ return new Proxy(obj || {}, {
3941
3905
  has(target, key) {
3942
3906
  return Reflect.has(target, removeStarting$(key));
3943
3907
  },
@@ -4121,28 +4085,6 @@ var require_ThemeManager_native = __commonJS({
4121
4085
  }
4122
4086
  });
4123
4087
 
4124
- // ../web/dist/cjs/hooks/getThemeUnwrapped.native.js
4125
- var require_getThemeUnwrapped_native = __commonJS({
4126
- "../web/dist/cjs/hooks/getThemeUnwrapped.native.js"(exports, module2) {
4127
- "use strict";
4128
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
4129
- for (var name in all)
4130
- __defProp2(target, name, { get: all[name], enumerable: !0 });
4131
- }, __copyProps2 = (to, from, except, desc) => {
4132
- if (from && typeof from == "object" || typeof from == "function")
4133
- for (let key of __getOwnPropNames2(from))
4134
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
4135
- return to;
4136
- }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), getThemeUnwrapped_exports = {};
4137
- __export2(getThemeUnwrapped_exports, {
4138
- GetThemeUnwrapped: () => GetThemeUnwrapped,
4139
- getThemeUnwrapped: () => getThemeUnwrapped
4140
- });
4141
- module2.exports = __toCommonJS2(getThemeUnwrapped_exports);
4142
- var getThemeUnwrapped = (theme) => (theme == null ? void 0 : theme[GetThemeUnwrapped]) || theme, GetThemeUnwrapped = Symbol();
4143
- }
4144
- });
4145
-
4146
4088
  // ../web/dist/cjs/hooks/useTheme.native.js
4147
4089
  var require_useTheme_native = __commonJS({
4148
4090
  "../web/dist/cjs/hooks/useTheme.native.js"(exports, module2) {
@@ -4164,7 +4106,7 @@ var require_useTheme_native = __commonJS({
4164
4106
  useThemeWithState: () => useThemeWithState
4165
4107
  });
4166
4108
  module2.exports = __toCommonJS2(useTheme_exports);
4167
- var import_constants4 = require_index_native(), import_react2 = require("react"), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_createProxy = require_createProxy_native(), import_createShallowSetState = require_createShallowSetState_native(), import_ThemeManager = require_ThemeManager_native(), import_ThemeManagerContext = require_ThemeManagerContext_native(), import_getThemeUnwrapped = require_getThemeUnwrapped_native(), emptyProps = { name: null }, cached;
4109
+ var import_constants4 = require_index_native(), import_react2 = require("react"), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_createShallowSetState = require_createShallowSetState_native(), import_ThemeManager = require_ThemeManager_native(), import_ThemeManagerContext = require_ThemeManagerContext_native(), emptyProps = { name: null }, cached;
4168
4110
  function getDefaultThemeProxied() {
4169
4111
  if (cached)
4170
4112
  return cached;
@@ -4205,7 +4147,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
4205
4147
  function track(key) {
4206
4148
  keys && !keys.includes(key) && (keys.push(key), process.env.NODE_ENV === "development" && debug && console.info(` \u{1F3A8} useTheme() tracking new key: ${key}`));
4207
4149
  }
4208
- return (0, import_createProxy.createProxy)(theme, {
4150
+ return new Proxy(theme, {
4209
4151
  has(_, key) {
4210
4152
  if (Reflect.has(theme, key))
4211
4153
  return !0;
@@ -4213,8 +4155,6 @@ If this is intended and you are using Tamagui without any themes, you can disabl
4213
4155
  return key[0] === "$" && (key = key.slice(1)), themeManager == null ? void 0 : themeManager.allKeys.has(key);
4214
4156
  },
4215
4157
  get(_, key) {
4216
- if (key === import_getThemeUnwrapped.GetThemeUnwrapped)
4217
- return theme;
4218
4158
  if (
4219
4159
  // dont ask me, idk why but on hermes you can see that useTheme()[undefined] passes in STRING undefined to proxy
4220
4160
  // if someone is crazy enough to use "undefined" as a theme key then this not working is on them
@@ -5438,11 +5378,10 @@ var require_proxyThemeToParents_native = __commonJS({
5438
5378
  }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), proxyThemeToParents_exports = {};
5439
5379
  __export2(proxyThemeToParents_exports, {
5440
5380
  proxyThemeToParents: () => proxyThemeToParents,
5441
- proxyThemesToParents: () => proxyThemesToParents,
5442
- themesRaw: () => themesRaw
5381
+ proxyThemesToParents: () => proxyThemesToParents
5443
5382
  });
5444
5383
  module2.exports = __toCommonJS2(proxyThemeToParents_exports);
5445
- var import_config = require_config_native(), import_getThemeUnwrapped = require_getThemeUnwrapped_native(), themesRaw = {};
5384
+ var import_config = require_config_native(), themesRaw = {};
5446
5385
  function proxyThemesToParents(dedupedThemes) {
5447
5386
  for (let { names, theme } of dedupedThemes)
5448
5387
  for (let name of names)
@@ -5459,9 +5398,7 @@ var require_proxyThemeToParents_native = __commonJS({
5459
5398
  let cur = [], parents = themeName.split("_").slice(0, -1).map((part) => (cur.push(part), cur.join("_"))), numParents = parents.length;
5460
5399
  return new Proxy(theme, {
5461
5400
  get(target, key) {
5462
- if (key === import_getThemeUnwrapped.GetThemeUnwrapped)
5463
- return theme;
5464
- if (key == null || // dont ask me, idk why but on hermes you can see that useTheme()[undefined] passes in STRING undefined to proxy
5401
+ if (!key || // dont ask me, idk why but on hermes you can see that useTheme()[undefined] passes in STRING undefined to proxy
5465
5402
  // if someone is crazy enough to use "undefined" as a theme key then this not working is on them
5466
5403
  key == "undefined" || Reflect.has(target, key))
5467
5404
  return Reflect.get(target, key);
@@ -5470,7 +5407,7 @@ var require_proxyThemeToParents_native = __commonJS({
5470
5407
  if (parent && Reflect.has(parent, key))
5471
5408
  return Reflect.get(parent, key);
5472
5409
  }
5473
- return (0, import_config.getTokenObject)(key) ?? Reflect.get(target, key);
5410
+ return (0, import_config.getTokenObject)(key);
5474
5411
  }
5475
5412
  });
5476
5413
  }
@@ -5521,14 +5458,14 @@ var require_themes_native = __commonJS({
5521
5458
  module2.exports = __toCommonJS2(themes_exports);
5522
5459
  var import_createVariable = require_createVariable_native();
5523
5460
  function ensureThemeVariable(theme, key) {
5524
- let val = theme[key], themeKey = key;
5525
- (0, import_createVariable.isVariable)(val) ? val.name !== themeKey && (theme[key] = (0, import_createVariable.createVariable)({
5461
+ let val = theme[key];
5462
+ (0, import_createVariable.isVariable)(val) ? val.name !== key && (theme[key] = (0, import_createVariable.createVariable)({
5526
5463
  key: val.name,
5527
- name: themeKey,
5464
+ name: key,
5528
5465
  val: val.val
5529
5466
  })) : theme[key] = (0, import_createVariable.createVariable)({
5530
- key: themeKey,
5531
- name: themeKey,
5467
+ key,
5468
+ name: key,
5532
5469
  val
5533
5470
  });
5534
5471
  }
@@ -5878,31 +5815,18 @@ var require_mergeVariants_native = __commonJS({
5878
5815
  mergeVariants: () => mergeVariants
5879
5816
  });
5880
5817
  module2.exports = __toCommonJS2(mergeVariants_exports);
5881
- var mergeVariants = (parentVariants, ourVariants) => {
5818
+ var mergeVariants = (parentVariants, ourVariants, level = 0) => {
5882
5819
  let variants = {};
5883
5820
  for (let key in ourVariants) {
5884
5821
  let parentVariant = parentVariants == null ? void 0 : parentVariants[key], ourVariant = ourVariants[key];
5885
- if (!parentVariant || typeof ourVariant == "function") {
5886
- variants[key] = ourVariant;
5887
- continue;
5888
- }
5889
- if (parentVariant && !ourVariant) {
5890
- variants[key] = parentVariant[key];
5891
- continue;
5892
- }
5893
- variants[key] = {};
5894
- for (let subKey in ourVariant) {
5895
- let val = ourVariant[subKey], parentVal = parentVariant == null ? void 0 : parentVariant[subKey];
5896
- typeof val == "function" || !parentVal || typeof parentVal == "function" ? variants[key][subKey] = val : variants[key][subKey] = {
5897
- // keep order
5898
- ...parentVal,
5899
- ...val
5900
- };
5901
- }
5902
- parentVariant && (variants[key] = {
5822
+ !parentVariant || typeof ourVariant == "function" ? variants[key] = ourVariant : parentVariant && !ourVariant ? variants[key] = parentVariant[key] : level === 0 ? variants[key] = mergeVariants(
5823
+ parentVariant,
5824
+ ourVariant,
5825
+ level + 1
5826
+ ) : variants[key] = {
5903
5827
  ...parentVariant,
5904
- ...variants[key]
5905
- });
5828
+ ...ourVariant
5829
+ };
5906
5830
  }
5907
5831
  return {
5908
5832
  ...parentVariants,
@@ -7985,26 +7909,27 @@ var require_index_native15 = __commonJS({
7985
7909
  return viewProps;
7986
7910
  },
7987
7911
  useEvents(viewProps, events, { pseudos }, setStateShallow, staticConfig) {
7988
- if (events)
7989
- if (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur), staticConfig.isInput) {
7912
+ if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput) {
7913
+ if (events) {
7990
7914
  let { onPressIn, onPressOut, onPress } = events, inputEvents = {
7991
7915
  onPressIn,
7992
7916
  onPressOut: onPressOut || onPress
7993
7917
  };
7994
7918
  onPressOut && onPress && (inputEvents.onPressOut = (0, import_web.composeEventHandlers)(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
7995
- } else {
7996
- viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
7997
- let pressability = (0, import_Pressability.usePressability)(events);
7998
- if (process.env.NODE_ENV === "development" && viewProps.debug && console.info(
7999
- `Checking for press ${!!events.onPress} then applying pressability props: ${Object.keys(
8000
- pressability || {}
8001
- )}`
8002
- ), events.onPress)
8003
- for (let key in pressability) {
8004
- let og = viewProps[key], val = pressability[key];
8005
- viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
8006
- }
8007
7919
  }
7920
+ } else {
7921
+ events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
7922
+ let pressability = (0, import_Pressability.usePressability)(events);
7923
+ if (events && (process.env.NODE_ENV === "development" && viewProps.debug && console.info(
7924
+ `Checking for press ${!!events.onPress} then applying pressability props: ${Object.keys(
7925
+ pressability || {}
7926
+ )}`
7927
+ ), events.onPress))
7928
+ for (let key in pressability) {
7929
+ let og = viewProps[key], val = pressability[key];
7930
+ viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
7931
+ }
7932
+ }
8008
7933
  },
8009
7934
  useChildren(elementType, children, viewProps, events, staticConfig) {
8010
7935
  if (process.env.NODE_ENV !== "test") {
@@ -11995,7 +11920,7 @@ var require_getFontSize_native = __commonJS({
11995
11920
  }, getFontSizeToken = (inSize, opts) => {
11996
11921
  if (typeof inSize == "number")
11997
11922
  return null;
11998
- let relativeSize = (opts == null ? void 0 : opts.relativeSize) || 0, fontSize = (0, import_core13.getConfig)().fontsParsed[(opts == null ? void 0 : opts.font) || "$body"].size, size2 = inSize || ("$true" in fontSize ? "$true" : "$4"), sizeTokens = Object.keys(fontSize), foundIndex = sizeTokens.indexOf(size2);
11923
+ let relativeSize = (opts == null ? void 0 : opts.relativeSize) || 0, fontSize = (0, import_core13.getConfig)().fontsParsed[(opts == null ? void 0 : opts.font) || "$body"].size, size2 = (inSize === "$true" ? "$4" : inSize) || ("$true" in fontSize ? "$true" : "$4"), sizeTokens = Object.keys(fontSize), foundIndex = sizeTokens.indexOf(size2);
11999
11924
  foundIndex === -1 && size2.endsWith(".5") && (foundIndex = sizeTokens.indexOf(size2.replace(".5", ""))), process.env.NODE_ENV === "development" && foundIndex === -1 && console.warn("No font size found", size2, opts, "in size tokens", sizeTokens);
12000
11925
  let tokenIndex = Math.min(
12001
11926
  Math.max(0, foundIndex + relativeSize),
@@ -12271,7 +12196,9 @@ var require_Button_native = __commonJS({
12271
12196
  ellipse,
12272
12197
  maxFontSizeMultiplier,
12273
12198
  ...restProps
12274
- } = propsActive, size2 = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size2 == "number" ? size2 * 0.5 : (0, import_font_size.getFontSize)(size2)) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
12199
+ } = propsActive, size2 = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size2 == "number" ? size2 * 0.5 : (0, import_font_size.getFontSize)(size2, {
12200
+ font: (fontFamily == null ? void 0 : fontFamily[0]) === "$" ? fontFamily : void 0
12201
+ })) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
12275
12202
  size: iconSize,
12276
12203
  color
12277
12204
  }), [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon), spaceSize = space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace, contents = noTextWrap ? [propsIn.children] : (0, import_text2.wrapChildrenInText)(
@@ -13698,7 +13625,7 @@ var require_Group_native = __commonJS({
13698
13625
  borderRadius,
13699
13626
  forceUseItem,
13700
13627
  ...restProps
13701
- } = (0, import_core13.getExpandedShorthands)(activeProps), vertical = orientation === "vertical", [itemChildrenCount, setItemChildrenCount] = (0, import_use_controllable_state.useControllableState)({
13628
+ } = activeProps, vertical = orientation === "vertical", [itemChildrenCount, setItemChildrenCount] = (0, import_use_controllable_state.useControllableState)({
13702
13629
  defaultProp: forceUseItem ? 1 : 0
13703
13630
  }), isUsingItems = itemChildrenCount > 0, radius = borderRadius ?? (size2 ? (0, import_core13.getVariableValue)((0, import_core13.getTokens)().radius[size2]) - 1 : void 0), disablePassBorderRadius = disablePassBorderRadiusProp ?? radius === void 0, childrenArray = import_react2.Children.toArray(childrenProp), children = isUsingItems ? import_react2.Children.toArray(childrenProp).filter(import_react2.isValidElement) : childrenArray.map((child, i) => {
13704
13631
  if (!(0, import_react2.isValidElement)(child))
@@ -16947,10 +16874,12 @@ var require_Select_native = __commonJS({
16947
16874
  {
16948
16875
  ...!props.unstyled && {
16949
16876
  size: itemParentContext.size,
16950
- ellipse: !0
16877
+ ellipse: !0,
16878
+ // we don't want events from the portalled `SelectValue` children to bubble
16879
+ // through the item they came from
16880
+ pointerEvents: "none"
16951
16881
  },
16952
16882
  ref: composedRefs,
16953
- pointerEvents: "none",
16954
16883
  ...props,
16955
16884
  children: unwrapSelectItem(selectValueChildren)
16956
16885
  }