tamagui 2.0.0-1768530912818 → 2.0.0-1768586279389

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.
Files changed (3) hide show
  1. package/dist/native.cjs +122 -39
  2. package/dist/test.cjs +122 -39
  3. package/package.json +57 -57
package/dist/native.cjs CHANGED
@@ -1956,14 +1956,14 @@ function requireNormalizeColor() {
1956
1956
  return (int % 360 + 360) % 360 / 360;
1957
1957
  }
1958
1958
  function parse1(str) {
1959
- const num = parseFloat(str);
1960
- if (num < 0) {
1959
+ const num2 = parseFloat(str);
1960
+ if (num2 < 0) {
1961
1961
  return 0;
1962
1962
  }
1963
- if (num > 1) {
1963
+ if (num2 > 1) {
1964
1964
  return 255;
1965
1965
  }
1966
- return Math.round(num * 255);
1966
+ return Math.round(num2 * 255);
1967
1967
  }
1968
1968
  function parsePercentage(str) {
1969
1969
  const int = parseFloat(str);
@@ -8850,13 +8850,14 @@ var webOnlyStylePropsView = {
8850
8850
  borderLeftStyle: true,
8851
8851
  borderRightStyle: true,
8852
8852
  borderTopStyle: true,
8853
- boxSizing: true,
8853
+ // boxSizing: now supported in RN 0.77+ (New Architecture)
8854
8854
  caretColor: true,
8855
8855
  clipPath: true,
8856
8856
  contain: true,
8857
8857
  containerType: true,
8858
8858
  content: true,
8859
8859
  cursor: true,
8860
+ // NOTE: cursor is supported on iOS 17+ for trackpad/stylus
8860
8861
  float: true,
8861
8862
  mask: true,
8862
8863
  maskBorder: true,
@@ -8875,13 +8876,10 @@ var webOnlyStylePropsView = {
8875
8876
  maskRepeat: true,
8876
8877
  maskSize: true,
8877
8878
  maskType: true,
8878
- mixBlendMode: true,
8879
+ // mixBlendMode: now supported in RN 0.77+ (New Architecture)
8879
8880
  objectFit: true,
8880
8881
  objectPosition: true,
8881
- outlineOffset: true,
8882
- outlineStyle: true,
8883
- outlineWidth: true,
8884
- outlineColor: true,
8882
+ // outline*: now supported in RN 0.77+ (New Architecture)
8885
8883
  overflowBlock: true,
8886
8884
  overflowInline: true,
8887
8885
  overflowX: true,
@@ -8937,7 +8935,7 @@ var textColors = {
8937
8935
  zIndex: {
8938
8936
  zIndex: true
8939
8937
  },
8940
- color: __spreadValues({
8938
+ color: __spreadProps(__spreadValues({
8941
8939
  backgroundColor: true,
8942
8940
  borderColor: true,
8943
8941
  borderBlockStartColor: true,
@@ -8953,7 +8951,10 @@ var textColors = {
8953
8951
  borderEndColor: true,
8954
8952
  borderStartColor: true,
8955
8953
  shadowColor: true
8956
- }, textColors)
8954
+ }, textColors), {
8955
+ // outlineColor is supported on RN 0.77+ (New Architecture)
8956
+ outlineColor: true
8957
+ })
8957
8958
  }, stylePropsUnitless = {
8958
8959
  WebkitLineClamp: true,
8959
8960
  animationIterationCount: true,
@@ -9006,7 +9007,7 @@ var textColors = {
9006
9007
  rotateY: true,
9007
9008
  rotateX: true,
9008
9009
  rotateZ: true
9009
- }, stylePropsView = __spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
9010
+ }, stylePropsView = __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
9010
9011
  backfaceVisibility: true,
9011
9012
  borderBottomEndRadius: true,
9012
9013
  borderBottomStartRadius: true,
@@ -9096,12 +9097,13 @@ var textColors = {
9096
9097
  elevationAndroid: true
9097
9098
  } : {}), {
9098
9099
  boxShadow: true,
9099
- filter: true
9100
- }), !process.env.REACT_NATIVE_PRE_77 && {
9100
+ filter: true,
9101
+ // RN 0.76/0.77+ style props (New Architecture)
9101
9102
  boxSizing: true,
9102
9103
  mixBlendMode: true,
9104
+ isolation: true,
9103
9105
  outlineColor: true,
9104
- outlineSpread: true,
9106
+ outlineOffset: true,
9105
9107
  outlineStyle: true,
9106
9108
  outlineWidth: true
9107
9109
  }), stylePropsFont = {
@@ -9720,9 +9722,58 @@ var _loop = function(parent) {
9720
9722
  EXPANSIONS[parent] = EXPANSIONS[parent].map(function(k) {
9721
9723
  return `${prefix}${k}`;
9722
9724
  });
9725
+ }, num = function(v) {
9726
+ return Number.parseFloat(v) || 0;
9727
+ }, parseBoxShadowStr = function(s2) {
9728
+ return s2.split(/,(?![^(]*\))/).map(function(sh) {
9729
+ var p = sh.trim().split(/\s+/), i = p[0] === "inset" ? 1 : 0, o = {
9730
+ offsetX: num(p[i++]),
9731
+ offsetY: num(p[i++])
9732
+ };
9733
+ return p[0] === "inset" && (o.inset = true), p[i] && /^-?[\d.]/.test(p[i]) && (o.blurRadius = num(p[i++])), p[i] && /^-?[\d.]/.test(p[i]) && (o.spreadDistance = num(p[i++])), p[i] && (o.color = p.slice(i).join(" ")), o;
9734
+ });
9735
+ }, simpleFilters = /* @__PURE__ */ new Set(["brightness", "opacity", "contrast", "grayscale", "invert", "saturate", "sepia", "blur"]), parseFilterStr = function(s2) {
9736
+ var r = [], _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
9737
+ try {
9738
+ for (var _iterator = s2.matchAll(/(\w+)\(([^)]+)\)/g)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
9739
+ var [, fn, val] = _step.value, n = +val || 0;
9740
+ if (simpleFilters.has(fn)) r.push({
9741
+ [fn]: n
9742
+ });
9743
+ else if (fn === "hueRotate" || fn === "hue-rotate") r.push({
9744
+ hueRotate: val
9745
+ });
9746
+ else if (fn === "dropShadow" || fn === "drop-shadow") {
9747
+ var p = val.trim().split(/\s+/), ds = {
9748
+ offsetX: num(p[0]),
9749
+ offsetY: num(p[1])
9750
+ };
9751
+ p[2] && /^-?[\d.]/.test(p[2]) ? (ds.blurRadius = num(p[2]), p[3] && (ds.color = p.slice(3).join(" "))) : p[2] && (ds.color = p.slice(2).join(" ")), r.push({
9752
+ dropShadow: ds
9753
+ });
9754
+ }
9755
+ }
9756
+ } catch (err) {
9757
+ _didIteratorError = true, _iteratorError = err;
9758
+ } finally {
9759
+ try {
9760
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
9761
+ } finally {
9762
+ if (_didIteratorError) throw _iteratorError;
9763
+ }
9764
+ }
9765
+ return r;
9723
9766
  };
9724
9767
  function expandStyle(key, value) {
9725
9768
  if (isAndroid && key === "elevationAndroid") return [["elevation", value]];
9769
+ if (key === "boxShadow") {
9770
+ if (typeof value == "string") return [["boxShadow", parseBoxShadowStr(value)]];
9771
+ if (value && !Array.isArray(value)) return [["boxShadow", [value]]];
9772
+ }
9773
+ if (key === "filter") {
9774
+ if (typeof value == "string") return [["filter", parseFilterStr(value)]];
9775
+ if (value && !Array.isArray(value)) return [["filter", [value]]];
9776
+ }
9726
9777
  if (key in EXPANSIONS) return EXPANSIONS[key].map(function(key2) {
9727
9778
  return [key2, value];
9728
9779
  });
@@ -9731,18 +9782,17 @@ function expandStyle(key, value) {
9731
9782
  });
9732
9783
  if (key in webToNativeDynamicExpansion) return webToNativeDynamicExpansion[key](value);
9733
9784
  }
9734
- var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], xy = ["X", "Y"], EXPANSIONS = __spreadValues({
9785
+ var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], EXPANSIONS = {
9735
9786
  borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
9736
9787
  borderRadius: ["TopLeftRadius", "TopRightRadius", "BottomRightRadius", "BottomLeftRadius"],
9737
9788
  borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
9738
9789
  margin: all,
9739
9790
  marginHorizontal: horiz,
9740
9791
  marginVertical: vert,
9741
- overscrollBehavior: xy,
9742
9792
  padding: all,
9743
9793
  paddingHorizontal: horiz,
9744
9794
  paddingVertical: vert
9745
- }, isWeb);
9795
+ };
9746
9796
  for (var parent in EXPANSIONS) _loop(parent);
9747
9797
  var cache$2 = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleState) {
9748
9798
  if (cache$2.has(styleState)) return cache$2.get(styleState);
@@ -9882,14 +9932,47 @@ function _type_of$5(obj) {
9882
9932
  "@swc/helpers - typeof";
9883
9933
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
9884
9934
  }
9885
- var shorthandStringProps = {
9886
- boxShadow: 1,
9887
- border: 1,
9888
- borderTop: 1,
9889
- borderRight: 1,
9890
- borderBottom: 1,
9891
- borderLeft: 1,
9892
- background: 1
9935
+ var resolveTok = function(v, cat, sp, ss) {
9936
+ if (typeof v == "string" && v[0] === "$") {
9937
+ var r = getTokenForKey(cat, v, sp, ss);
9938
+ return cat === "size" ? r != null && +r || 0 : r != null ? String(r) : v;
9939
+ }
9940
+ return cat === "size" ? typeof v == "number" ? v : +v || 0 : v;
9941
+ }, boxShadowObjResolve = function(v, sp, ss) {
9942
+ return (Array.isArray(v) ? v : [v]).map(function(o) {
9943
+ return __spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, o.inset && {
9944
+ inset: true
9945
+ }), {
9946
+ offsetX: resolveTok(o.offsetX, "size", sp, ss),
9947
+ offsetY: resolveTok(o.offsetY, "size", sp, ss)
9948
+ }), o.blurRadius != null && {
9949
+ blurRadius: resolveTok(o.blurRadius, "size", sp, ss)
9950
+ }), o.spreadDistance != null && {
9951
+ spreadDistance: resolveTok(o.spreadDistance, "size", sp, ss)
9952
+ }), o.color != null && {
9953
+ color: resolveTok(o.color, "color", sp, ss)
9954
+ });
9955
+ });
9956
+ }, filterObjResolve = function(v, sp, ss) {
9957
+ return (Array.isArray(v) ? v : [v]).map(function(o) {
9958
+ if ("blur" in o) return {
9959
+ blur: resolveTok(o.blur, "size", sp, ss)
9960
+ };
9961
+ if ("dropShadow" in o) {
9962
+ var ds = o.dropShadow;
9963
+ return {
9964
+ dropShadow: __spreadValues(__spreadValues({
9965
+ offsetX: resolveTok(ds.offsetX, "size", sp, ss),
9966
+ offsetY: resolveTok(ds.offsetY, "size", sp, ss)
9967
+ }, ds.blurRadius != null && {
9968
+ blurRadius: resolveTok(ds.blurRadius, "size", sp, ss)
9969
+ }), ds.color != null && {
9970
+ color: resolveTok(ds.color, "color", sp, ss)
9971
+ })
9972
+ };
9973
+ }
9974
+ return o;
9975
+ });
9893
9976
  }, propMapper = function(key, value, styleState, disabled, map) {
9894
9977
  if (disabled) return map(key, value);
9895
9978
  if (lastFontFamilyToken = null, !(!isAndroid && key === "elevationAndroid")) {
@@ -9918,13 +10001,13 @@ var shorthandStringProps = {
9918
10001
  }
9919
10002
  styleProps2.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]);
9920
10003
  var originalValue = value;
9921
- if (value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : (
9922
- /* Handle CSS shorthand strings with embedded $variables (e.g., boxShadow="0 0 10px $red") */
9923
- key in shorthandStringProps && typeof value == "string" && value.includes("$") ? value = value.replace(/\$[\w.-]+/g, function(token) {
9924
- var resolved = getTokenForKey("color", token, styleProps2, styleState);
9925
- return resolved != null ? String(resolved) : token;
9926
- }) : isVariable(value) ? value = resolveVariableValue(key, value, styleProps2.resolveValues) : isRemValue(value) && (value = resolveRem(value))
9927
- )), value != null) {
10004
+ if (value != null && (key === "boxShadow" && (typeof value > "u" ? "undefined" : _type_of$5(value)) === "object" ? value = boxShadowObjResolve(value, styleProps2, styleState) : key === "filter" && (typeof value > "u" ? "undefined" : _type_of$5(value)) === "object" ? value = filterObjResolve(value, styleProps2, styleState) : typeof value == "string" && value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : key === "boxShadow" && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(t2) {
10005
+ var cat = /^\$-?\d/.test(t2) ? "size" : "color", r = getTokenForKey(cat, t2, styleProps2, styleState);
10006
+ return r != null ? String(r) : t2;
10007
+ }) : key === "filter" && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(t2) {
10008
+ var cat = /^\$-?\d/.test(t2) ? "size" : "color", r = getTokenForKey(cat, t2, styleProps2, styleState);
10009
+ return r != null ? String(r) : t2;
10010
+ }) : isVariable(value) ? value = resolveVariableValue(key, value, styleProps2.resolveValues) : isRemValue(value) && (value = resolveRem(value))), value != null) {
9928
10011
  key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
9929
10012
  var expanded = styleProps2.noExpand ? null : expandStyle(key, value);
9930
10013
  if (expanded) for (var max2 = expanded.length, i = 0; i < max2; i++) {
@@ -13037,13 +13120,13 @@ var getElevation = function(size, extras) {
13037
13120
  var {
13038
13121
  theme,
13039
13122
  tokens
13040
- } = param, num = 0;
13123
+ } = param, num2 = 0;
13041
13124
  if (val === true) {
13042
13125
  var _$val = getVariableValue(tokens.size.true);
13043
- typeof _$val == "number" ? num = _$val : num = 10;
13044
- } else num = +val;
13045
- if (num !== 0) {
13046
- var [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)], shadow = __spreadValues({
13126
+ typeof _$val == "number" ? num2 = _$val : num2 = 10;
13127
+ } else num2 = +val;
13128
+ if (num2 !== 0) {
13129
+ var [height, shadowRadius] = [Math.round(num2 / 4 + 1), Math.round(num2 / 2 + 2)], shadow = __spreadValues({
13047
13130
  shadowColor: theme.shadowColor,
13048
13131
  shadowRadius,
13049
13132
  shadowOffset: {
package/dist/test.cjs CHANGED
@@ -2188,14 +2188,14 @@ function requireNormalizeColor() {
2188
2188
  return (int % 360 + 360) % 360 / 360;
2189
2189
  }
2190
2190
  function parse1(str) {
2191
- const num = parseFloat(str);
2192
- if (num < 0) {
2191
+ const num2 = parseFloat(str);
2192
+ if (num2 < 0) {
2193
2193
  return 0;
2194
2194
  }
2195
- if (num > 1) {
2195
+ if (num2 > 1) {
2196
2196
  return 255;
2197
2197
  }
2198
- return Math.round(num * 255);
2198
+ return Math.round(num2 * 255);
2199
2199
  }
2200
2200
  function parsePercentage(str) {
2201
2201
  const int = parseFloat(str);
@@ -9232,13 +9232,14 @@ var webOnlyStylePropsView = {
9232
9232
  borderLeftStyle: true,
9233
9233
  borderRightStyle: true,
9234
9234
  borderTopStyle: true,
9235
- boxSizing: true,
9235
+ // boxSizing: now supported in RN 0.77+ (New Architecture)
9236
9236
  caretColor: true,
9237
9237
  clipPath: true,
9238
9238
  contain: true,
9239
9239
  containerType: true,
9240
9240
  content: true,
9241
9241
  cursor: true,
9242
+ // NOTE: cursor is supported on iOS 17+ for trackpad/stylus
9242
9243
  float: true,
9243
9244
  mask: true,
9244
9245
  maskBorder: true,
@@ -9257,13 +9258,10 @@ var webOnlyStylePropsView = {
9257
9258
  maskRepeat: true,
9258
9259
  maskSize: true,
9259
9260
  maskType: true,
9260
- mixBlendMode: true,
9261
+ // mixBlendMode: now supported in RN 0.77+ (New Architecture)
9261
9262
  objectFit: true,
9262
9263
  objectPosition: true,
9263
- outlineOffset: true,
9264
- outlineStyle: true,
9265
- outlineWidth: true,
9266
- outlineColor: true,
9264
+ // outline*: now supported in RN 0.77+ (New Architecture)
9267
9265
  overflowBlock: true,
9268
9266
  overflowInline: true,
9269
9267
  overflowX: true,
@@ -9319,7 +9317,7 @@ var textColors = {
9319
9317
  zIndex: {
9320
9318
  zIndex: true
9321
9319
  },
9322
- color: __spreadValues({
9320
+ color: __spreadProps(__spreadValues({
9323
9321
  backgroundColor: true,
9324
9322
  borderColor: true,
9325
9323
  borderBlockStartColor: true,
@@ -9335,7 +9333,10 @@ var textColors = {
9335
9333
  borderEndColor: true,
9336
9334
  borderStartColor: true,
9337
9335
  shadowColor: true
9338
- }, textColors)
9336
+ }, textColors), {
9337
+ // outlineColor is supported on RN 0.77+ (New Architecture)
9338
+ outlineColor: true
9339
+ })
9339
9340
  }, stylePropsUnitless = {
9340
9341
  WebkitLineClamp: true,
9341
9342
  animationIterationCount: true,
@@ -9388,7 +9389,7 @@ var textColors = {
9388
9389
  rotateY: true,
9389
9390
  rotateX: true,
9390
9391
  rotateZ: true
9391
- }, stylePropsView = __spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
9392
+ }, stylePropsView = __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
9392
9393
  backfaceVisibility: true,
9393
9394
  borderBottomEndRadius: true,
9394
9395
  borderBottomStartRadius: true,
@@ -9478,12 +9479,13 @@ var textColors = {
9478
9479
  elevationAndroid: true
9479
9480
  } : {}), {
9480
9481
  boxShadow: true,
9481
- filter: true
9482
- }), !process.env.REACT_NATIVE_PRE_77 && {
9482
+ filter: true,
9483
+ // RN 0.76/0.77+ style props (New Architecture)
9483
9484
  boxSizing: true,
9484
9485
  mixBlendMode: true,
9486
+ isolation: true,
9485
9487
  outlineColor: true,
9486
- outlineSpread: true,
9488
+ outlineOffset: true,
9487
9489
  outlineStyle: true,
9488
9490
  outlineWidth: true
9489
9491
  }), stylePropsFont = {
@@ -10102,9 +10104,58 @@ var _loop = function(parent) {
10102
10104
  EXPANSIONS[parent] = EXPANSIONS[parent].map(function(k) {
10103
10105
  return `${prefix}${k}`;
10104
10106
  });
10107
+ }, num = function(v) {
10108
+ return Number.parseFloat(v) || 0;
10109
+ }, parseBoxShadowStr = function(s2) {
10110
+ return s2.split(/,(?![^(]*\))/).map(function(sh) {
10111
+ var p = sh.trim().split(/\s+/), i = p[0] === "inset" ? 1 : 0, o = {
10112
+ offsetX: num(p[i++]),
10113
+ offsetY: num(p[i++])
10114
+ };
10115
+ return p[0] === "inset" && (o.inset = true), p[i] && /^-?[\d.]/.test(p[i]) && (o.blurRadius = num(p[i++])), p[i] && /^-?[\d.]/.test(p[i]) && (o.spreadDistance = num(p[i++])), p[i] && (o.color = p.slice(i).join(" ")), o;
10116
+ });
10117
+ }, simpleFilters = /* @__PURE__ */ new Set(["brightness", "opacity", "contrast", "grayscale", "invert", "saturate", "sepia", "blur"]), parseFilterStr = function(s2) {
10118
+ var r = [], _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
10119
+ try {
10120
+ for (var _iterator = s2.matchAll(/(\w+)\(([^)]+)\)/g)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
10121
+ var [, fn, val] = _step.value, n = +val || 0;
10122
+ if (simpleFilters.has(fn)) r.push({
10123
+ [fn]: n
10124
+ });
10125
+ else if (fn === "hueRotate" || fn === "hue-rotate") r.push({
10126
+ hueRotate: val
10127
+ });
10128
+ else if (fn === "dropShadow" || fn === "drop-shadow") {
10129
+ var p = val.trim().split(/\s+/), ds = {
10130
+ offsetX: num(p[0]),
10131
+ offsetY: num(p[1])
10132
+ };
10133
+ p[2] && /^-?[\d.]/.test(p[2]) ? (ds.blurRadius = num(p[2]), p[3] && (ds.color = p.slice(3).join(" "))) : p[2] && (ds.color = p.slice(2).join(" ")), r.push({
10134
+ dropShadow: ds
10135
+ });
10136
+ }
10137
+ }
10138
+ } catch (err) {
10139
+ _didIteratorError = true, _iteratorError = err;
10140
+ } finally {
10141
+ try {
10142
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
10143
+ } finally {
10144
+ if (_didIteratorError) throw _iteratorError;
10145
+ }
10146
+ }
10147
+ return r;
10105
10148
  };
10106
10149
  function expandStyle(key, value) {
10107
10150
  if (isAndroid && key === "elevationAndroid") return [["elevation", value]];
10151
+ if (key === "boxShadow") {
10152
+ if (typeof value == "string") return [["boxShadow", parseBoxShadowStr(value)]];
10153
+ if (value && !Array.isArray(value)) return [["boxShadow", [value]]];
10154
+ }
10155
+ if (key === "filter") {
10156
+ if (typeof value == "string") return [["filter", parseFilterStr(value)]];
10157
+ if (value && !Array.isArray(value)) return [["filter", [value]]];
10158
+ }
10108
10159
  if (key in EXPANSIONS) return EXPANSIONS[key].map(function(key2) {
10109
10160
  return [key2, value];
10110
10161
  });
@@ -10113,18 +10164,17 @@ function expandStyle(key, value) {
10113
10164
  });
10114
10165
  if (key in webToNativeDynamicExpansion) return webToNativeDynamicExpansion[key](value);
10115
10166
  }
10116
- var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], xy = ["X", "Y"], EXPANSIONS = __spreadValues({
10167
+ var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], EXPANSIONS = {
10117
10168
  borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
10118
10169
  borderRadius: ["TopLeftRadius", "TopRightRadius", "BottomRightRadius", "BottomLeftRadius"],
10119
10170
  borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
10120
10171
  margin: all,
10121
10172
  marginHorizontal: horiz,
10122
10173
  marginVertical: vert,
10123
- overscrollBehavior: xy,
10124
10174
  padding: all,
10125
10175
  paddingHorizontal: horiz,
10126
10176
  paddingVertical: vert
10127
- }, isWeb);
10177
+ };
10128
10178
  for (var parent in EXPANSIONS) _loop(parent);
10129
10179
  var cache$2 = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleState) {
10130
10180
  if (cache$2.has(styleState)) return cache$2.get(styleState);
@@ -10265,14 +10315,47 @@ function _type_of$5(obj) {
10265
10315
  "@swc/helpers - typeof";
10266
10316
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
10267
10317
  }
10268
- var shorthandStringProps = {
10269
- boxShadow: 1,
10270
- border: 1,
10271
- borderTop: 1,
10272
- borderRight: 1,
10273
- borderBottom: 1,
10274
- borderLeft: 1,
10275
- background: 1
10318
+ var resolveTok = function(v, cat, sp, ss) {
10319
+ if (typeof v == "string" && v[0] === "$") {
10320
+ var r = getTokenForKey(cat, v, sp, ss);
10321
+ return cat === "size" ? r != null && +r || 0 : r != null ? String(r) : v;
10322
+ }
10323
+ return cat === "size" ? typeof v == "number" ? v : +v || 0 : v;
10324
+ }, boxShadowObjResolve = function(v, sp, ss) {
10325
+ return (Array.isArray(v) ? v : [v]).map(function(o) {
10326
+ return __spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, o.inset && {
10327
+ inset: true
10328
+ }), {
10329
+ offsetX: resolveTok(o.offsetX, "size", sp, ss),
10330
+ offsetY: resolveTok(o.offsetY, "size", sp, ss)
10331
+ }), o.blurRadius != null && {
10332
+ blurRadius: resolveTok(o.blurRadius, "size", sp, ss)
10333
+ }), o.spreadDistance != null && {
10334
+ spreadDistance: resolveTok(o.spreadDistance, "size", sp, ss)
10335
+ }), o.color != null && {
10336
+ color: resolveTok(o.color, "color", sp, ss)
10337
+ });
10338
+ });
10339
+ }, filterObjResolve = function(v, sp, ss) {
10340
+ return (Array.isArray(v) ? v : [v]).map(function(o) {
10341
+ if ("blur" in o) return {
10342
+ blur: resolveTok(o.blur, "size", sp, ss)
10343
+ };
10344
+ if ("dropShadow" in o) {
10345
+ var ds = o.dropShadow;
10346
+ return {
10347
+ dropShadow: __spreadValues(__spreadValues({
10348
+ offsetX: resolveTok(ds.offsetX, "size", sp, ss),
10349
+ offsetY: resolveTok(ds.offsetY, "size", sp, ss)
10350
+ }, ds.blurRadius != null && {
10351
+ blurRadius: resolveTok(ds.blurRadius, "size", sp, ss)
10352
+ }), ds.color != null && {
10353
+ color: resolveTok(ds.color, "color", sp, ss)
10354
+ })
10355
+ };
10356
+ }
10357
+ return o;
10358
+ });
10276
10359
  }, propMapper = function(key, value, styleState, disabled, map) {
10277
10360
  if (disabled) return map(key, value);
10278
10361
  if (lastFontFamilyToken = null, !(!isAndroid && key === "elevationAndroid")) {
@@ -10301,13 +10384,13 @@ var shorthandStringProps = {
10301
10384
  }
10302
10385
  styleProps2.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]);
10303
10386
  var originalValue = value;
10304
- if (value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : (
10305
- /* Handle CSS shorthand strings with embedded $variables (e.g., boxShadow="0 0 10px $red") */
10306
- key in shorthandStringProps && typeof value == "string" && value.includes("$") ? value = value.replace(/\$[\w.-]+/g, function(token) {
10307
- var resolved = getTokenForKey("color", token, styleProps2, styleState);
10308
- return resolved != null ? String(resolved) : token;
10309
- }) : isVariable(value) ? value = resolveVariableValue(key, value, styleProps2.resolveValues) : isRemValue(value) && (value = resolveRem(value))
10310
- )), value != null) {
10387
+ if (value != null && (key === "boxShadow" && (typeof value > "u" ? "undefined" : _type_of$5(value)) === "object" ? value = boxShadowObjResolve(value, styleProps2, styleState) : key === "filter" && (typeof value > "u" ? "undefined" : _type_of$5(value)) === "object" ? value = filterObjResolve(value, styleProps2, styleState) : typeof value == "string" && value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : key === "boxShadow" && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(t2) {
10388
+ var cat = /^\$-?\d/.test(t2) ? "size" : "color", r = getTokenForKey(cat, t2, styleProps2, styleState);
10389
+ return r != null ? String(r) : t2;
10390
+ }) : key === "filter" && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(t2) {
10391
+ var cat = /^\$-?\d/.test(t2) ? "size" : "color", r = getTokenForKey(cat, t2, styleProps2, styleState);
10392
+ return r != null ? String(r) : t2;
10393
+ }) : isVariable(value) ? value = resolveVariableValue(key, value, styleProps2.resolveValues) : isRemValue(value) && (value = resolveRem(value))), value != null) {
10311
10394
  key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
10312
10395
  var expanded = styleProps2.noExpand ? null : expandStyle(key, value);
10313
10396
  if (expanded) for (var max2 = expanded.length, i = 0; i < max2; i++) {
@@ -13230,13 +13313,13 @@ var getElevation = function(size, extras) {
13230
13313
  var {
13231
13314
  theme,
13232
13315
  tokens
13233
- } = param, num = 0;
13316
+ } = param, num2 = 0;
13234
13317
  if (val === true) {
13235
13318
  var _$val = getVariableValue(tokens.size.true);
13236
- typeof _$val == "number" ? num = _$val : num = 10;
13237
- } else num = +val;
13238
- if (num !== 0) {
13239
- var [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)], shadow = __spreadValues({
13319
+ typeof _$val == "number" ? num2 = _$val : num2 = 10;
13320
+ } else num2 = +val;
13321
+ if (num2 !== 0) {
13322
+ var [height, shadowRadius] = [Math.round(num2 / 4 + 1), Math.round(num2 / 2 + 2)], shadow = __spreadValues({
13240
13323
  shadowColor: theme.shadowColor,
13241
13324
  shadowRadius,
13242
13325
  shadowOffset: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamagui",
3
- "version": "2.0.0-1768530912818",
3
+ "version": "2.0.0-1768586279389",
4
4
  "type": "module",
5
5
  "description": "Style and UI for React (web and native) meet an optimizing compiler",
6
6
  "removeSideEffects": true,
@@ -88,64 +88,64 @@
88
88
  }
89
89
  },
90
90
  "dependencies": {
91
- "@tamagui/accordion": "2.0.0-1768530912818",
92
- "@tamagui/adapt": "2.0.0-1768530912818",
93
- "@tamagui/alert-dialog": "2.0.0-1768530912818",
94
- "@tamagui/animate-presence": "2.0.0-1768530912818",
95
- "@tamagui/avatar": "2.0.0-1768530912818",
96
- "@tamagui/button": "2.0.0-1768530912818",
97
- "@tamagui/card": "2.0.0-1768530912818",
98
- "@tamagui/checkbox": "2.0.0-1768530912818",
99
- "@tamagui/compose-refs": "2.0.0-1768530912818",
100
- "@tamagui/constants": "2.0.0-1768530912818",
101
- "@tamagui/core": "2.0.0-1768530912818",
102
- "@tamagui/create-context": "2.0.0-1768530912818",
103
- "@tamagui/dialog": "2.0.0-1768530912818",
104
- "@tamagui/elements": "2.0.0-1768530912818",
105
- "@tamagui/fake-react-native": "2.0.0-1768530912818",
106
- "@tamagui/focusable": "2.0.0-1768530912818",
107
- "@tamagui/font-size": "2.0.0-1768530912818",
108
- "@tamagui/form": "2.0.0-1768530912818",
109
- "@tamagui/get-button-sized": "2.0.0-1768530912818",
110
- "@tamagui/get-font-sized": "2.0.0-1768530912818",
111
- "@tamagui/get-token": "2.0.0-1768530912818",
112
- "@tamagui/group": "2.0.0-1768530912818",
113
- "@tamagui/helpers-tamagui": "2.0.0-1768530912818",
114
- "@tamagui/image": "2.0.0-1768530912818",
115
- "@tamagui/input": "2.0.0-1768530912818",
116
- "@tamagui/label": "2.0.0-1768530912818",
117
- "@tamagui/linear-gradient": "2.0.0-1768530912818",
118
- "@tamagui/list-item": "2.0.0-1768530912818",
119
- "@tamagui/polyfill-dev": "2.0.0-1768530912818",
120
- "@tamagui/popover": "2.0.0-1768530912818",
121
- "@tamagui/popper": "2.0.0-1768530912818",
122
- "@tamagui/portal": "2.0.0-1768530912818",
123
- "@tamagui/progress": "2.0.0-1768530912818",
124
- "@tamagui/radio-group": "2.0.0-1768530912818",
125
- "@tamagui/react-native-media-driver": "2.0.0-1768530912818",
126
- "@tamagui/scroll-view": "2.0.0-1768530912818",
127
- "@tamagui/select": "2.0.0-1768530912818",
128
- "@tamagui/separator": "2.0.0-1768530912818",
129
- "@tamagui/shapes": "2.0.0-1768530912818",
130
- "@tamagui/sheet": "2.0.0-1768530912818",
131
- "@tamagui/slider": "2.0.0-1768530912818",
132
- "@tamagui/spacer": "2.0.0-1768530912818",
133
- "@tamagui/stacks": "2.0.0-1768530912818",
134
- "@tamagui/switch": "2.0.0-1768530912818",
135
- "@tamagui/tabs": "2.0.0-1768530912818",
136
- "@tamagui/text": "2.0.0-1768530912818",
137
- "@tamagui/theme": "2.0.0-1768530912818",
138
- "@tamagui/toggle-group": "2.0.0-1768530912818",
139
- "@tamagui/tooltip": "2.0.0-1768530912818",
140
- "@tamagui/use-controllable-state": "2.0.0-1768530912818",
141
- "@tamagui/use-debounce": "2.0.0-1768530912818",
142
- "@tamagui/use-force-update": "2.0.0-1768530912818",
143
- "@tamagui/use-window-dimensions": "2.0.0-1768530912818",
144
- "@tamagui/visually-hidden": "2.0.0-1768530912818",
145
- "@tamagui/z-index-stack": "2.0.0-1768530912818"
91
+ "@tamagui/accordion": "2.0.0-1768586279389",
92
+ "@tamagui/adapt": "2.0.0-1768586279389",
93
+ "@tamagui/alert-dialog": "2.0.0-1768586279389",
94
+ "@tamagui/animate-presence": "2.0.0-1768586279389",
95
+ "@tamagui/avatar": "2.0.0-1768586279389",
96
+ "@tamagui/button": "2.0.0-1768586279389",
97
+ "@tamagui/card": "2.0.0-1768586279389",
98
+ "@tamagui/checkbox": "2.0.0-1768586279389",
99
+ "@tamagui/compose-refs": "2.0.0-1768586279389",
100
+ "@tamagui/constants": "2.0.0-1768586279389",
101
+ "@tamagui/core": "2.0.0-1768586279389",
102
+ "@tamagui/create-context": "2.0.0-1768586279389",
103
+ "@tamagui/dialog": "2.0.0-1768586279389",
104
+ "@tamagui/elements": "2.0.0-1768586279389",
105
+ "@tamagui/fake-react-native": "2.0.0-1768586279389",
106
+ "@tamagui/focusable": "2.0.0-1768586279389",
107
+ "@tamagui/font-size": "2.0.0-1768586279389",
108
+ "@tamagui/form": "2.0.0-1768586279389",
109
+ "@tamagui/get-button-sized": "2.0.0-1768586279389",
110
+ "@tamagui/get-font-sized": "2.0.0-1768586279389",
111
+ "@tamagui/get-token": "2.0.0-1768586279389",
112
+ "@tamagui/group": "2.0.0-1768586279389",
113
+ "@tamagui/helpers-tamagui": "2.0.0-1768586279389",
114
+ "@tamagui/image": "2.0.0-1768586279389",
115
+ "@tamagui/input": "2.0.0-1768586279389",
116
+ "@tamagui/label": "2.0.0-1768586279389",
117
+ "@tamagui/linear-gradient": "2.0.0-1768586279389",
118
+ "@tamagui/list-item": "2.0.0-1768586279389",
119
+ "@tamagui/polyfill-dev": "2.0.0-1768586279389",
120
+ "@tamagui/popover": "2.0.0-1768586279389",
121
+ "@tamagui/popper": "2.0.0-1768586279389",
122
+ "@tamagui/portal": "2.0.0-1768586279389",
123
+ "@tamagui/progress": "2.0.0-1768586279389",
124
+ "@tamagui/radio-group": "2.0.0-1768586279389",
125
+ "@tamagui/react-native-media-driver": "2.0.0-1768586279389",
126
+ "@tamagui/scroll-view": "2.0.0-1768586279389",
127
+ "@tamagui/select": "2.0.0-1768586279389",
128
+ "@tamagui/separator": "2.0.0-1768586279389",
129
+ "@tamagui/shapes": "2.0.0-1768586279389",
130
+ "@tamagui/sheet": "2.0.0-1768586279389",
131
+ "@tamagui/slider": "2.0.0-1768586279389",
132
+ "@tamagui/spacer": "2.0.0-1768586279389",
133
+ "@tamagui/stacks": "2.0.0-1768586279389",
134
+ "@tamagui/switch": "2.0.0-1768586279389",
135
+ "@tamagui/tabs": "2.0.0-1768586279389",
136
+ "@tamagui/text": "2.0.0-1768586279389",
137
+ "@tamagui/theme": "2.0.0-1768586279389",
138
+ "@tamagui/toggle-group": "2.0.0-1768586279389",
139
+ "@tamagui/tooltip": "2.0.0-1768586279389",
140
+ "@tamagui/use-controllable-state": "2.0.0-1768586279389",
141
+ "@tamagui/use-debounce": "2.0.0-1768586279389",
142
+ "@tamagui/use-force-update": "2.0.0-1768586279389",
143
+ "@tamagui/use-window-dimensions": "2.0.0-1768586279389",
144
+ "@tamagui/visually-hidden": "2.0.0-1768586279389",
145
+ "@tamagui/z-index-stack": "2.0.0-1768586279389"
146
146
  },
147
147
  "devDependencies": {
148
- "@tamagui/build": "2.0.0-1768530912818",
148
+ "@tamagui/build": "2.0.0-1768586279389",
149
149
  "react": "*",
150
150
  "react-native": "0.81.5",
151
151
  "react-native-web": "^0.21.0"