tamagui 2.4.4 → 2.4.5-1784066510418

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.
@@ -1,4 +1,4 @@
1
1
  $ tamagui-build
2
- built tamagui in 2222 ms
2
+ built tamagui in 1451 ms
3
3
  Running afterBuild script...
4
- afterBuild completed in 446 ms
4
+ afterBuild completed in 428 ms
package/dist/native.cjs CHANGED
@@ -13275,6 +13275,10 @@ var init_useThemeState_native = __esmMin((() => {
13275
13275
  (0, react$1.useEffect)(function() {
13276
13276
  var r = ref.current;
13277
13277
  var renderVersion = r.renderVersion;
13278
+ if (r.lastSnap && !states.has(r.id)) {
13279
+ states.set(r.id, r.lastSnap);
13280
+ localStates.set(r.id, r.lastSnap);
13281
+ }
13278
13282
  if (r.unsubscribe && r.subscribedParentId !== r.parentId) cleanupThemeSubscription(r);
13279
13283
  if (shouldSubscribeToTheme(r, cascadeOnChange)) {
13280
13284
  if (!r.unsubscribe) {
@@ -15594,6 +15598,21 @@ var init_sortString_native = __esmMin((() => {
15594
15598
  return a < b ? -1 : a > b ? 1 : 0;
15595
15599
  };
15596
15600
  }));
15601
+ //#endregion
15602
+ //#region ../../core/web/dist/esm/helpers/styleProvenance.native.js
15603
+ function setStyleTokenProvenance(style, provenance) {
15604
+ Object.defineProperty(style, provenanceSymbol, {
15605
+ value: provenance,
15606
+ enumerable: false,
15607
+ configurable: true,
15608
+ writable: true
15609
+ });
15610
+ }
15611
+ var STYLE_TOKEN_PROVENANCE_KEY, provenanceSymbol;
15612
+ var init_styleProvenance_native = __esmMin((() => {
15613
+ STYLE_TOKEN_PROVENANCE_KEY = "tamagui.styleTokenProvenance";
15614
+ provenanceSymbol = /* @__PURE__ */ Symbol.for(STYLE_TOKEN_PROVENANCE_KEY);
15615
+ }));
15597
15616
  var init_transformsToString_native = __esmMin((() => {
15598
15617
  init_normalizeValueWithProperty_native();
15599
15618
  }));
@@ -15659,9 +15678,16 @@ function mergeStyle(styleState, key, val, importance) {
15659
15678
  (_styleState2 = styleState).style || (_styleState2.style = {});
15660
15679
  usedKeys[key] = importance;
15661
15680
  styleState.style[key] = key === "transform" && Array.isArray(out) ? [...out] : out;
15681
+ if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
15662
15682
  }
15663
15683
  }
15664
15684
  }
15685
+ function recordStyleTokenProvenance(styleState, key, originalVal) {
15686
+ if (typeof originalVal === "string" && originalVal[0] === "$") {
15687
+ var _styleState;
15688
+ ((_styleState = styleState).tokenProvenance || (_styleState.tokenProvenance = {}))[key] = originalVal;
15689
+ } else if (styleState.tokenProvenance && key in styleState.tokenProvenance) delete styleState.tokenProvenance[key];
15690
+ }
15665
15691
  function passDownProp(viewProps, key, val) {
15666
15692
  if (arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false) {
15667
15693
  var next = _objectSpread2(_objectSpread2({}, viewProps[key]), val);
@@ -15700,7 +15726,7 @@ function applyDefaultStyle(pkey, styleState) {
15700
15726
  var defaultValues = animatableDefaults[pkey];
15701
15727
  if (defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style))) mergeStyle(styleState, pkey, defaultValues, 1);
15702
15728
  }
15703
- var conf, getSplitStyles, getSubStyle, useSplitStyles, defaultColor, animatableDefaults, mergeTransform, mapTransformKeys;
15729
+ var shouldTrackStyleTokenProvenance, conf, getSplitStyles, getSubStyle, useSplitStyles, defaultColor, animatableDefaults, mergeTransform, mapTransformKeys;
15704
15730
  var init_getSplitStyles_native = __esmMin((() => {
15705
15731
  init_index_native$7();
15706
15732
  init_index_native$5();
@@ -15721,8 +15747,10 @@ var init_getSplitStyles_native = __esmMin((() => {
15721
15747
  init_skipProps_native();
15722
15748
  init_sortString_native();
15723
15749
  init_styleOriginalValues_native();
15750
+ init_styleProvenance_native();
15724
15751
  init_transformsToString_native();
15725
15752
  init_objectSpread2();
15753
+ shouldTrackStyleTokenProvenance = false;
15726
15754
  getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver) {
15727
15755
  var _loop = function(keyOg2) {
15728
15756
  var keyInit = keyOg2;
@@ -15790,51 +15818,51 @@ var init_getSplitStyles_native = __esmMin((() => {
15790
15818
  if (valInit && (keyInit === "fontFamily" || keyInit === shorthands["fontFamily"]) && valInit in conf.fontsParsed) styleState.fontFamily = valInit;
15791
15819
  }
15792
15820
  var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
15793
- propMapper(keyInit, valInit, styleState, disablePropMap, function(key5, val2, originalVal) {
15821
+ propMapper(keyInit, valInit, styleState, disablePropMap, function(key6, val2, originalVal) {
15794
15822
  var _parentStaticConfig_variants;
15795
- var isStyledContextProp = styledContext && key5 in styledContext;
15823
+ var isStyledContextProp = styledContext && key6 in styledContext;
15796
15824
  if (!isHOC && disablePropMap && !isStyledContextProp && !isMediaOrPseudo) {
15797
- viewProps[key5] = val2;
15825
+ viewProps[key6] = val2;
15798
15826
  return;
15799
15827
  }
15800
15828
  if (val2 == null) return;
15801
- if (key5 === "pointerEvents") {
15802
- viewProps[key5] = val2;
15829
+ if (key6 === "pointerEvents") {
15830
+ viewProps[key6] = val2;
15803
15831
  return;
15804
15832
  }
15805
- if (!isHOC && isValidStyleKey(key5, validStyles$1, accept) || isAndroid$1 && key5 === "elevation") {
15806
- mergeStyle(styleState, key5, val2, 1, false, originalVal);
15833
+ if (!isHOC && isValidStyleKey(key6, validStyles$1, accept) || isAndroid$1 && key6 === "elevation") {
15834
+ mergeStyle(styleState, key6, val2, 1, false, originalVal);
15807
15835
  return;
15808
15836
  }
15809
- isPseudo = key5 in validPseudoKeys;
15810
- isMedia = isPseudo ? false : getMediaKey(key5);
15837
+ isPseudo = key6 in validPseudoKeys;
15838
+ isMedia = isPseudo ? false : getMediaKey(key6);
15811
15839
  isMediaOrPseudo = Boolean(isMedia || isPseudo);
15812
- isVariant = variants && key5 in variants;
15813
- if (isMedia === "group") key5 = normalizeGroupKey(key5, groupContext);
15814
- if (shouldSkipNativeHoverProp(key5, isMedia)) return;
15815
- if ((inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key5)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened === null || inlineWhenUnflattened === void 0 ? void 0 : inlineWhenUnflattened.has(key5))) {
15840
+ isVariant = variants && key6 in variants;
15841
+ if (isMedia === "group") key6 = normalizeGroupKey(key6, groupContext);
15842
+ if (shouldSkipNativeHoverProp(key6, isMedia)) return;
15843
+ if ((inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key6)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened === null || inlineWhenUnflattened === void 0 ? void 0 : inlineWhenUnflattened.has(key6))) {
15816
15844
  var _props_key;
15817
- viewProps[key5] = (_props_key = props[key5]) !== null && _props_key !== void 0 ? _props_key : val2;
15845
+ viewProps[key6] = (_props_key = props[key6]) !== null && _props_key !== void 0 ? _props_key : val2;
15818
15846
  }
15819
15847
  if (styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]))) {
15820
- passDownProp(viewProps, key5, val2, isMediaOrPseudo);
15848
+ passDownProp(viewProps, key6, val2, isMediaOrPseudo);
15821
15849
  return;
15822
15850
  }
15823
15851
  if (isPseudo) {
15824
15852
  if (!val2) return;
15825
- var pseudoStyleObject = getSubStyle(styleState, key5, val2, styleProps.noClass && !(process.env.IS_STATIC === "is_static"));
15853
+ var pseudoStyleObject = getSubStyle(styleState, key6, val2, styleProps.noClass && !(process.env.IS_STATIC === "is_static"));
15826
15854
  if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
15827
15855
  var _pseudos, _key;
15828
15856
  pseudos || (pseudos = {});
15829
- (_pseudos = pseudos)[_key = key5] || (_pseudos[_key] = {});
15857
+ (_pseudos = pseudos)[_key = key6] || (_pseudos[_key] = {});
15830
15858
  if (process.env.IS_STATIC === "is_static") {
15831
- Object.assign(pseudos[key5], pseudoStyleObject);
15859
+ Object.assign(pseudos[key6], pseudoStyleObject);
15832
15860
  return;
15833
15861
  }
15834
15862
  }
15835
- var descriptor = pseudoDescriptors[key5];
15836
- var isEnter = key5 === "enterStyle";
15837
- var isExit = key5 === "exitStyle";
15863
+ var descriptor = pseudoDescriptors[key6];
15864
+ var isEnter = key6 === "enterStyle";
15865
+ var isExit = key6 === "exitStyle";
15838
15866
  if (!descriptor) return;
15839
15867
  if (shouldDoClasses && !isExit) {
15840
15868
  var pseudoStyles = getStyleAtomic(pseudoStyleObject, descriptor);
@@ -15869,34 +15897,34 @@ var init_getSplitStyles_native = __esmMin((() => {
15869
15897
  if (process.env.IS_STATIC === "is_static") {
15870
15898
  var _pseudos1, _key1;
15871
15899
  pseudos || (pseudos = {});
15872
- (_pseudos1 = pseudos)[_key1 = key5] || (_pseudos1[_key1] = {});
15873
- pseudos[key5][pkey] = _$val;
15900
+ (_pseudos1 = pseudos)[_key1 = key6] || (_pseudos1[_key1] = {});
15901
+ pseudos[key6][pkey] = _$val;
15874
15902
  }
15875
15903
  mergeStyle(styleState, pkey, _$val, importance, false, pseudoOriginalValues === null || pseudoOriginalValues === void 0 ? void 0 : pseudoOriginalValues[pkey]);
15876
15904
  }
15877
15905
  }
15878
15906
  if (!isDisabled) for (var _$key in val2) {
15879
- var k = shorthands[_$key] || _$key;
15880
- styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
15907
+ var k2 = shorthands[_$key] || _$key;
15908
+ styleState.usedKeys[k2] = Math.max(importance, styleState.usedKeys[k2] || 0);
15881
15909
  }
15882
15910
  }
15883
15911
  return;
15884
15912
  }
15885
15913
  if (isMedia) {
15886
15914
  if (!val2) return;
15887
- var mediaKeyShort = key5.slice(isMedia == "theme" ? 7 : 1);
15915
+ var mediaKeyShort = key6.slice(isMedia == "theme" ? 7 : 1);
15888
15916
  hasMedia || (hasMedia = true);
15889
15917
  if (val2["space"] || !shouldDoClasses || styleProps.willBeAnimated) {
15890
15918
  if (!hasMedia || typeof hasMedia === "boolean") hasMedia = /* @__PURE__ */ new Set();
15891
15919
  hasMedia.add(mediaKeyShort);
15892
15920
  }
15893
15921
  if (isMedia === "platform") {
15894
- if (!isActivePlatform(key5)) return;
15922
+ if (!isActivePlatform(key6)) return;
15895
15923
  }
15896
15924
  var priority = mediaStylesSeen;
15897
15925
  mediaStylesSeen += 1;
15898
15926
  if (shouldDoClasses) {
15899
- var mediaStyles = getCSSStylesAtomic(getSubStyle(styleState, key5, val2, false));
15927
+ var mediaStyles = getCSSStylesAtomic(getSubStyle(styleState, key6, val2, false));
15900
15928
  var _iteratorNormalCompletion12 = true, _didIteratorError12 = false, _iteratorError12 = void 0;
15901
15929
  try {
15902
15930
  for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
@@ -15920,14 +15948,14 @@ var init_getSplitStyles_native = __esmMin((() => {
15920
15948
  }
15921
15949
  }
15922
15950
  } else {
15923
- let mergeMediaStyle2 = function(key6, val3, originalVal2) {
15951
+ let mergeMediaStyle2 = function(key7, val3, originalVal2) {
15924
15952
  var _styleState4;
15925
- if (!isValidStyleKey(key6, validStyles$1, accept)) {
15926
- viewProps[key6] = val3;
15953
+ if (!isValidStyleKey(key7, validStyles$1, accept)) {
15954
+ viewProps[key7] = val3;
15927
15955
  return;
15928
15956
  }
15929
15957
  (_styleState4 = styleState).style || (_styleState4.style = {});
15930
- if (mergeMediaByImportance(styleState, mediaKeyShort, key6, val3, mediaState$1[mediaKeyShort], importanceBump, debug, originalVal2) && key6 === "fontFamily") styleState.fontFamily = mediaStyle1.fontFamily;
15958
+ if (mergeMediaByImportance(styleState, mediaKeyShort, key7, val3, mediaState$1[mediaKeyShort], importanceBump, debug, originalVal2) && key7 === "fontFamily") styleState.fontFamily = mediaStyle1.fontFamily;
15931
15959
  };
15932
15960
  var isThemeMedia = isMedia === "theme";
15933
15961
  var isGroupMedia = isMedia === "group";
@@ -15935,7 +15963,7 @@ var init_getSplitStyles_native = __esmMin((() => {
15935
15963
  if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
15936
15964
  if (!mediaState$1[mediaKeyShort]) return;
15937
15965
  }
15938
- var mediaStyle1 = getSubStyle(styleState, key5, val2, true);
15966
+ var mediaStyle1 = getSubStyle(styleState, key6, val2, true);
15939
15967
  var importanceBump = 0;
15940
15968
  if (isThemeMedia) if (supportsDynamicColorIOS && getSetting("fastSchemeChange")) {
15941
15969
  var _styleState3;
@@ -16049,7 +16077,7 @@ var init_getSplitStyles_native = __esmMin((() => {
16049
16077
  }
16050
16078
  if (!isVariant) {
16051
16079
  if (isStyledContextProp) return;
16052
- viewProps[key5] = val2;
16080
+ viewProps[key6] = val2;
16053
16081
  }
16054
16082
  });
16055
16083
  };
@@ -16089,9 +16117,9 @@ var init_getSplitStyles_native = __esmMin((() => {
16089
16117
  };
16090
16118
  if (process.env.IS_STATIC === "is_static") {
16091
16119
  var { fallbackProps } = styleProps;
16092
- if (fallbackProps) styleState.props = new Proxy(props, { get(_, key5, val2) {
16093
- if (!Reflect.has(props, key5)) return Reflect.get(fallbackProps, key5);
16094
- return Reflect.get(props, key5);
16120
+ if (fallbackProps) styleState.props = new Proxy(props, { get(_, key6, val2) {
16121
+ if (!Reflect.has(props, key6)) return Reflect.get(fallbackProps, key6);
16122
+ return Reflect.get(props, key6);
16095
16123
  } });
16096
16124
  }
16097
16125
  var { asChild } = props;
@@ -16130,7 +16158,12 @@ var init_getSplitStyles_native = __esmMin((() => {
16130
16158
  else {
16131
16159
  var _styleState2;
16132
16160
  (_styleState2 = styleState).style || (_styleState2.style = {});
16133
- Object.assign(styleState.style, normalizeStyle(style));
16161
+ var normalized = normalizeStyle(style);
16162
+ Object.assign(styleState.style, normalized);
16163
+ if (shouldTrackStyleTokenProvenance) {
16164
+ var styleOriginals = styleOriginalValues.get(normalized);
16165
+ for (var k in normalized) recordStyleTokenProvenance(styleState, k, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[k]);
16166
+ }
16134
16167
  }
16135
16168
  }
16136
16169
  }
@@ -16154,6 +16187,18 @@ var init_getSplitStyles_native = __esmMin((() => {
16154
16187
  }
16155
16188
  }
16156
16189
  }
16190
+ if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
16191
+ var provenance = {};
16192
+ var hasProvenance = false;
16193
+ for (var key4 in styleState.tokenProvenance) {
16194
+ provenance[key4] = {
16195
+ token: styleState.tokenProvenance[key4],
16196
+ theme: themeName
16197
+ };
16198
+ hasProvenance = true;
16199
+ }
16200
+ if (hasProvenance) setStyleTokenProvenance(styleState.style, provenance);
16201
+ }
16157
16202
  var result = {
16158
16203
  hasMedia,
16159
16204
  fontFamily: styleState.fontFamily,
package/dist/test.cjs CHANGED
@@ -13453,6 +13453,10 @@ var init_useThemeState_native = __esmMin((() => {
13453
13453
  (0, react$1.useEffect)(function() {
13454
13454
  var r = ref.current;
13455
13455
  var renderVersion = r.renderVersion;
13456
+ if (r.lastSnap && !states.has(r.id)) {
13457
+ states.set(r.id, r.lastSnap);
13458
+ localStates.set(r.id, r.lastSnap);
13459
+ }
13456
13460
  if (r.unsubscribe && r.subscribedParentId !== r.parentId) cleanupThemeSubscription(r);
13457
13461
  if (shouldSubscribeToTheme(r, cascadeOnChange)) {
13458
13462
  if (!r.unsubscribe) {
@@ -15773,6 +15777,21 @@ var init_sortString_native = __esmMin((() => {
15773
15777
  return a < b ? -1 : a > b ? 1 : 0;
15774
15778
  };
15775
15779
  }));
15780
+ //#endregion
15781
+ //#region ../../core/web/dist/esm/helpers/styleProvenance.native.js
15782
+ function setStyleTokenProvenance(style, provenance) {
15783
+ Object.defineProperty(style, provenanceSymbol, {
15784
+ value: provenance,
15785
+ enumerable: false,
15786
+ configurable: true,
15787
+ writable: true
15788
+ });
15789
+ }
15790
+ var STYLE_TOKEN_PROVENANCE_KEY, provenanceSymbol;
15791
+ var init_styleProvenance_native = __esmMin((() => {
15792
+ STYLE_TOKEN_PROVENANCE_KEY = "tamagui.styleTokenProvenance";
15793
+ provenanceSymbol = /* @__PURE__ */ Symbol.for(STYLE_TOKEN_PROVENANCE_KEY);
15794
+ }));
15776
15795
  var init_transformsToString_native = __esmMin((() => {
15777
15796
  init_normalizeValueWithProperty_native();
15778
15797
  }));
@@ -15838,9 +15857,16 @@ function mergeStyle(styleState, key, val, importance) {
15838
15857
  (_styleState2 = styleState).style || (_styleState2.style = {});
15839
15858
  usedKeys[key] = importance;
15840
15859
  styleState.style[key] = key === "transform" && Array.isArray(out) ? [...out] : out;
15860
+ if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
15841
15861
  }
15842
15862
  }
15843
15863
  }
15864
+ function recordStyleTokenProvenance(styleState, key, originalVal) {
15865
+ if (typeof originalVal === "string" && originalVal[0] === "$") {
15866
+ var _styleState;
15867
+ ((_styleState = styleState).tokenProvenance || (_styleState.tokenProvenance = {}))[key] = originalVal;
15868
+ } else if (styleState.tokenProvenance && key in styleState.tokenProvenance) delete styleState.tokenProvenance[key];
15869
+ }
15844
15870
  function passDownProp(viewProps, key, val) {
15845
15871
  if (arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false) {
15846
15872
  var next = _objectSpread2(_objectSpread2({}, viewProps[key]), val);
@@ -15879,7 +15905,7 @@ function applyDefaultStyle(pkey, styleState) {
15879
15905
  var defaultValues = animatableDefaults[pkey];
15880
15906
  if (defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style))) mergeStyle(styleState, pkey, defaultValues, 1);
15881
15907
  }
15882
- var conf, getSplitStyles, getSubStyle, useSplitStyles, defaultColor, animatableDefaults, mergeTransform, mapTransformKeys;
15908
+ var shouldTrackStyleTokenProvenance, conf, getSplitStyles, getSubStyle, useSplitStyles, defaultColor, animatableDefaults, mergeTransform, mapTransformKeys;
15883
15909
  var init_getSplitStyles_native = __esmMin((() => {
15884
15910
  init_index_native$7();
15885
15911
  init_index_native$5();
@@ -15900,8 +15926,10 @@ var init_getSplitStyles_native = __esmMin((() => {
15900
15926
  init_skipProps_native();
15901
15927
  init_sortString_native();
15902
15928
  init_styleOriginalValues_native();
15929
+ init_styleProvenance_native();
15903
15930
  init_transformsToString_native();
15904
15931
  init_objectSpread2();
15932
+ shouldTrackStyleTokenProvenance = false;
15905
15933
  getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver) {
15906
15934
  var _loop = function(keyOg2) {
15907
15935
  var keyInit = keyOg2;
@@ -15970,51 +15998,51 @@ var init_getSplitStyles_native = __esmMin((() => {
15970
15998
  if (valInit && (keyInit === "fontFamily" || keyInit === shorthands["fontFamily"]) && valInit in conf.fontsParsed) styleState.fontFamily = valInit;
15971
15999
  }
15972
16000
  var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
15973
- propMapper(keyInit, valInit, styleState, disablePropMap, function(key5, val2, originalVal) {
16001
+ propMapper(keyInit, valInit, styleState, disablePropMap, function(key6, val2, originalVal) {
15974
16002
  var _parentStaticConfig_variants;
15975
- var isStyledContextProp = styledContext && key5 in styledContext;
16003
+ var isStyledContextProp = styledContext && key6 in styledContext;
15976
16004
  if (!isHOC && disablePropMap && !isStyledContextProp && !isMediaOrPseudo) {
15977
- viewProps[key5] = val2;
16005
+ viewProps[key6] = val2;
15978
16006
  return;
15979
16007
  }
15980
16008
  if (val2 == null) return;
15981
- if (key5 === "pointerEvents") {
15982
- viewProps[key5] = val2;
16009
+ if (key6 === "pointerEvents") {
16010
+ viewProps[key6] = val2;
15983
16011
  return;
15984
16012
  }
15985
- if (!isHOC && isValidStyleKey(key5, validStyles$1, accept) || isAndroid$1 && key5 === "elevation") {
15986
- mergeStyle(styleState, key5, val2, 1, false, originalVal);
16013
+ if (!isHOC && isValidStyleKey(key6, validStyles$1, accept) || isAndroid$1 && key6 === "elevation") {
16014
+ mergeStyle(styleState, key6, val2, 1, false, originalVal);
15987
16015
  return;
15988
16016
  }
15989
- isPseudo = key5 in validPseudoKeys;
15990
- isMedia = isPseudo ? false : getMediaKey(key5);
16017
+ isPseudo = key6 in validPseudoKeys;
16018
+ isMedia = isPseudo ? false : getMediaKey(key6);
15991
16019
  isMediaOrPseudo = Boolean(isMedia || isPseudo);
15992
- isVariant = variants && key5 in variants;
15993
- if (isMedia === "group") key5 = normalizeGroupKey(key5, groupContext);
15994
- if (shouldSkipNativeHoverProp(key5, isMedia)) return;
15995
- if ((inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key5)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened === null || inlineWhenUnflattened === void 0 ? void 0 : inlineWhenUnflattened.has(key5))) {
16020
+ isVariant = variants && key6 in variants;
16021
+ if (isMedia === "group") key6 = normalizeGroupKey(key6, groupContext);
16022
+ if (shouldSkipNativeHoverProp(key6, isMedia)) return;
16023
+ if ((inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key6)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened === null || inlineWhenUnflattened === void 0 ? void 0 : inlineWhenUnflattened.has(key6))) {
15996
16024
  var _props_key;
15997
- viewProps[key5] = (_props_key = props[key5]) !== null && _props_key !== void 0 ? _props_key : val2;
16025
+ viewProps[key6] = (_props_key = props[key6]) !== null && _props_key !== void 0 ? _props_key : val2;
15998
16026
  }
15999
16027
  if (styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]))) {
16000
- passDownProp(viewProps, key5, val2, isMediaOrPseudo);
16028
+ passDownProp(viewProps, key6, val2, isMediaOrPseudo);
16001
16029
  return;
16002
16030
  }
16003
16031
  if (isPseudo) {
16004
16032
  if (!val2) return;
16005
- var pseudoStyleObject = getSubStyle(styleState, key5, val2, styleProps.noClass && !(process.env.IS_STATIC === "is_static"));
16033
+ var pseudoStyleObject = getSubStyle(styleState, key6, val2, styleProps.noClass && !(process.env.IS_STATIC === "is_static"));
16006
16034
  if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
16007
16035
  var _pseudos, _key;
16008
16036
  pseudos || (pseudos = {});
16009
- (_pseudos = pseudos)[_key = key5] || (_pseudos[_key] = {});
16037
+ (_pseudos = pseudos)[_key = key6] || (_pseudos[_key] = {});
16010
16038
  if (process.env.IS_STATIC === "is_static") {
16011
- Object.assign(pseudos[key5], pseudoStyleObject);
16039
+ Object.assign(pseudos[key6], pseudoStyleObject);
16012
16040
  return;
16013
16041
  }
16014
16042
  }
16015
- var descriptor = pseudoDescriptors[key5];
16016
- var isEnter = key5 === "enterStyle";
16017
- var isExit = key5 === "exitStyle";
16043
+ var descriptor = pseudoDescriptors[key6];
16044
+ var isEnter = key6 === "enterStyle";
16045
+ var isExit = key6 === "exitStyle";
16018
16046
  if (!descriptor) return;
16019
16047
  if (shouldDoClasses && !isExit) {
16020
16048
  var pseudoStyles = getStyleAtomic(pseudoStyleObject, descriptor);
@@ -16049,34 +16077,34 @@ var init_getSplitStyles_native = __esmMin((() => {
16049
16077
  if (process.env.IS_STATIC === "is_static") {
16050
16078
  var _pseudos1, _key1;
16051
16079
  pseudos || (pseudos = {});
16052
- (_pseudos1 = pseudos)[_key1 = key5] || (_pseudos1[_key1] = {});
16053
- pseudos[key5][pkey] = _$val;
16080
+ (_pseudos1 = pseudos)[_key1 = key6] || (_pseudos1[_key1] = {});
16081
+ pseudos[key6][pkey] = _$val;
16054
16082
  }
16055
16083
  mergeStyle(styleState, pkey, _$val, importance, false, pseudoOriginalValues === null || pseudoOriginalValues === void 0 ? void 0 : pseudoOriginalValues[pkey]);
16056
16084
  }
16057
16085
  }
16058
16086
  if (!isDisabled) for (var _$key in val2) {
16059
- var k = shorthands[_$key] || _$key;
16060
- styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
16087
+ var k2 = shorthands[_$key] || _$key;
16088
+ styleState.usedKeys[k2] = Math.max(importance, styleState.usedKeys[k2] || 0);
16061
16089
  }
16062
16090
  }
16063
16091
  return;
16064
16092
  }
16065
16093
  if (isMedia) {
16066
16094
  if (!val2) return;
16067
- var mediaKeyShort = key5.slice(isMedia == "theme" ? 7 : 1);
16095
+ var mediaKeyShort = key6.slice(isMedia == "theme" ? 7 : 1);
16068
16096
  hasMedia || (hasMedia = true);
16069
16097
  if (val2["space"] || !shouldDoClasses || styleProps.willBeAnimated) {
16070
16098
  if (!hasMedia || typeof hasMedia === "boolean") hasMedia = /* @__PURE__ */ new Set();
16071
16099
  hasMedia.add(mediaKeyShort);
16072
16100
  }
16073
16101
  if (isMedia === "platform") {
16074
- if (!isActivePlatform(key5)) return;
16102
+ if (!isActivePlatform(key6)) return;
16075
16103
  }
16076
16104
  var priority = mediaStylesSeen;
16077
16105
  mediaStylesSeen += 1;
16078
16106
  if (shouldDoClasses) {
16079
- var mediaStyles = getCSSStylesAtomic(getSubStyle(styleState, key5, val2, false));
16107
+ var mediaStyles = getCSSStylesAtomic(getSubStyle(styleState, key6, val2, false));
16080
16108
  var _iteratorNormalCompletion12 = true, _didIteratorError12 = false, _iteratorError12 = void 0;
16081
16109
  try {
16082
16110
  for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
@@ -16100,14 +16128,14 @@ var init_getSplitStyles_native = __esmMin((() => {
16100
16128
  }
16101
16129
  }
16102
16130
  } else {
16103
- let mergeMediaStyle2 = function(key6, val3, originalVal2) {
16131
+ let mergeMediaStyle2 = function(key7, val3, originalVal2) {
16104
16132
  var _styleState4;
16105
- if (!isValidStyleKey(key6, validStyles$1, accept)) {
16106
- viewProps[key6] = val3;
16133
+ if (!isValidStyleKey(key7, validStyles$1, accept)) {
16134
+ viewProps[key7] = val3;
16107
16135
  return;
16108
16136
  }
16109
16137
  (_styleState4 = styleState).style || (_styleState4.style = {});
16110
- if (mergeMediaByImportance(styleState, mediaKeyShort, key6, val3, mediaState$1[mediaKeyShort], importanceBump, debug, originalVal2) && key6 === "fontFamily") styleState.fontFamily = mediaStyle1.fontFamily;
16138
+ if (mergeMediaByImportance(styleState, mediaKeyShort, key7, val3, mediaState$1[mediaKeyShort], importanceBump, debug, originalVal2) && key7 === "fontFamily") styleState.fontFamily = mediaStyle1.fontFamily;
16111
16139
  };
16112
16140
  var isThemeMedia = isMedia === "theme";
16113
16141
  var isGroupMedia = isMedia === "group";
@@ -16115,7 +16143,7 @@ var init_getSplitStyles_native = __esmMin((() => {
16115
16143
  if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
16116
16144
  if (!mediaState$1[mediaKeyShort]) return;
16117
16145
  }
16118
- var mediaStyle1 = getSubStyle(styleState, key5, val2, true);
16146
+ var mediaStyle1 = getSubStyle(styleState, key6, val2, true);
16119
16147
  var importanceBump = 0;
16120
16148
  if (isThemeMedia) if (supportsDynamicColorIOS && getSetting("fastSchemeChange")) {
16121
16149
  var _styleState3;
@@ -16229,7 +16257,7 @@ var init_getSplitStyles_native = __esmMin((() => {
16229
16257
  }
16230
16258
  if (!isVariant) {
16231
16259
  if (isStyledContextProp) return;
16232
- viewProps[key5] = val2;
16260
+ viewProps[key6] = val2;
16233
16261
  }
16234
16262
  });
16235
16263
  };
@@ -16269,9 +16297,9 @@ var init_getSplitStyles_native = __esmMin((() => {
16269
16297
  };
16270
16298
  if (process.env.IS_STATIC === "is_static") {
16271
16299
  var { fallbackProps } = styleProps;
16272
- if (fallbackProps) styleState.props = new Proxy(props, { get(_, key5, val2) {
16273
- if (!Reflect.has(props, key5)) return Reflect.get(fallbackProps, key5);
16274
- return Reflect.get(props, key5);
16300
+ if (fallbackProps) styleState.props = new Proxy(props, { get(_, key6, val2) {
16301
+ if (!Reflect.has(props, key6)) return Reflect.get(fallbackProps, key6);
16302
+ return Reflect.get(props, key6);
16275
16303
  } });
16276
16304
  }
16277
16305
  var { asChild } = props;
@@ -16310,7 +16338,12 @@ var init_getSplitStyles_native = __esmMin((() => {
16310
16338
  else {
16311
16339
  var _styleState2;
16312
16340
  (_styleState2 = styleState).style || (_styleState2.style = {});
16313
- Object.assign(styleState.style, normalizeStyle(style));
16341
+ var normalized = normalizeStyle(style);
16342
+ Object.assign(styleState.style, normalized);
16343
+ if (shouldTrackStyleTokenProvenance) {
16344
+ var styleOriginals = styleOriginalValues.get(normalized);
16345
+ for (var k in normalized) recordStyleTokenProvenance(styleState, k, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[k]);
16346
+ }
16314
16347
  }
16315
16348
  }
16316
16349
  }
@@ -16334,6 +16367,18 @@ var init_getSplitStyles_native = __esmMin((() => {
16334
16367
  }
16335
16368
  }
16336
16369
  }
16370
+ if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
16371
+ var provenance = {};
16372
+ var hasProvenance = false;
16373
+ for (var key4 in styleState.tokenProvenance) {
16374
+ provenance[key4] = {
16375
+ token: styleState.tokenProvenance[key4],
16376
+ theme: themeName
16377
+ };
16378
+ hasProvenance = true;
16379
+ }
16380
+ if (hasProvenance) setStyleTokenProvenance(styleState.style, provenance);
16381
+ }
16337
16382
  var result = {
16338
16383
  hasMedia,
16339
16384
  fontFamily: styleState.fontFamily,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamagui",
3
- "version": "2.4.4",
3
+ "version": "2.4.5-1784066510418",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "description": "Style and UI for React (web and native) meet an optimizing compiler",
6
6
  "repository": {
@@ -77,72 +77,72 @@
77
77
  "check-circular-deps": "npx madge --circular ./src/index.ts"
78
78
  },
79
79
  "dependencies": {
80
- "@tamagui/accordion": "2.4.4",
81
- "@tamagui/adapt": "2.4.4",
82
- "@tamagui/alert-dialog": "2.4.4",
83
- "@tamagui/animate": "2.4.4",
84
- "@tamagui/animate-presence": "2.4.4",
85
- "@tamagui/avatar": "2.4.4",
86
- "@tamagui/button": "2.4.4",
87
- "@tamagui/card": "2.4.4",
88
- "@tamagui/checkbox": "2.4.4",
89
- "@tamagui/collapsible": "2.4.4",
90
- "@tamagui/compose-refs": "2.4.4",
91
- "@tamagui/constants": "2.4.4",
92
- "@tamagui/context-menu": "2.4.4",
93
- "@tamagui/core": "2.4.4",
94
- "@tamagui/create-context": "2.4.4",
95
- "@tamagui/create-menu": "2.4.4",
96
- "@tamagui/dialog": "2.4.4",
97
- "@tamagui/element": "2.4.4",
98
- "@tamagui/elements": "2.4.4",
99
- "@tamagui/fake-react-native": "2.4.4",
100
- "@tamagui/focusable": "2.4.4",
101
- "@tamagui/form": "2.4.4",
102
- "@tamagui/get-button-sized": "2.4.4",
103
- "@tamagui/get-font-sized": "2.4.4",
104
- "@tamagui/get-token": "2.4.4",
105
- "@tamagui/group": "2.4.4",
106
- "@tamagui/helpers-tamagui": "2.4.4",
107
- "@tamagui/image": "2.4.4",
108
- "@tamagui/input": "2.4.4",
109
- "@tamagui/label": "2.4.4",
110
- "@tamagui/linear-gradient": "2.4.4",
111
- "@tamagui/list-item": "2.4.4",
112
- "@tamagui/menu": "2.4.4",
113
- "@tamagui/polyfill-dev": "2.4.4",
114
- "@tamagui/popover": "2.4.4",
115
- "@tamagui/popper": "2.4.4",
116
- "@tamagui/portal": "2.4.4",
117
- "@tamagui/progress": "2.4.4",
118
- "@tamagui/radio-group": "2.4.4",
119
- "@tamagui/react-native-media-driver": "2.4.4",
120
- "@tamagui/scroll-view": "2.4.4",
121
- "@tamagui/select": "2.4.4",
122
- "@tamagui/separator": "2.4.4",
123
- "@tamagui/shapes": "2.4.4",
124
- "@tamagui/sheet": "2.4.4",
125
- "@tamagui/slider": "2.4.4",
126
- "@tamagui/spacer": "2.4.4",
127
- "@tamagui/spinner": "2.4.4",
128
- "@tamagui/stacks": "2.4.4",
129
- "@tamagui/switch": "2.4.4",
130
- "@tamagui/tabs": "2.4.4",
131
- "@tamagui/text": "2.4.4",
132
- "@tamagui/theme": "2.4.4",
133
- "@tamagui/toast": "2.4.4",
134
- "@tamagui/toggle-group": "2.4.4",
135
- "@tamagui/tooltip": "2.4.4",
136
- "@tamagui/use-controllable-state": "2.4.4",
137
- "@tamagui/use-debounce": "2.4.4",
138
- "@tamagui/use-force-update": "2.4.4",
139
- "@tamagui/use-window-dimensions": "2.4.4",
140
- "@tamagui/visually-hidden": "2.4.4",
141
- "@tamagui/font-size": "2.4.4",
142
- "@tamagui/z-index-stack": "2.4.4"
80
+ "@tamagui/accordion": "2.4.5-1784066510418",
81
+ "@tamagui/adapt": "2.4.5-1784066510418",
82
+ "@tamagui/alert-dialog": "2.4.5-1784066510418",
83
+ "@tamagui/animate": "2.4.5-1784066510418",
84
+ "@tamagui/animate-presence": "2.4.5-1784066510418",
85
+ "@tamagui/avatar": "2.4.5-1784066510418",
86
+ "@tamagui/button": "2.4.5-1784066510418",
87
+ "@tamagui/card": "2.4.5-1784066510418",
88
+ "@tamagui/checkbox": "2.4.5-1784066510418",
89
+ "@tamagui/collapsible": "2.4.5-1784066510418",
90
+ "@tamagui/compose-refs": "2.4.5-1784066510418",
91
+ "@tamagui/constants": "2.4.5-1784066510418",
92
+ "@tamagui/context-menu": "2.4.5-1784066510418",
93
+ "@tamagui/core": "2.4.5-1784066510418",
94
+ "@tamagui/create-context": "2.4.5-1784066510418",
95
+ "@tamagui/create-menu": "2.4.5-1784066510418",
96
+ "@tamagui/dialog": "2.4.5-1784066510418",
97
+ "@tamagui/element": "2.4.5-1784066510418",
98
+ "@tamagui/elements": "2.4.5-1784066510418",
99
+ "@tamagui/fake-react-native": "2.4.5-1784066510418",
100
+ "@tamagui/focusable": "2.4.5-1784066510418",
101
+ "@tamagui/form": "2.4.5-1784066510418",
102
+ "@tamagui/get-button-sized": "2.4.5-1784066510418",
103
+ "@tamagui/get-font-sized": "2.4.5-1784066510418",
104
+ "@tamagui/get-token": "2.4.5-1784066510418",
105
+ "@tamagui/group": "2.4.5-1784066510418",
106
+ "@tamagui/helpers-tamagui": "2.4.5-1784066510418",
107
+ "@tamagui/image": "2.4.5-1784066510418",
108
+ "@tamagui/input": "2.4.5-1784066510418",
109
+ "@tamagui/label": "2.4.5-1784066510418",
110
+ "@tamagui/linear-gradient": "2.4.5-1784066510418",
111
+ "@tamagui/list-item": "2.4.5-1784066510418",
112
+ "@tamagui/menu": "2.4.5-1784066510418",
113
+ "@tamagui/polyfill-dev": "2.4.5-1784066510418",
114
+ "@tamagui/popover": "2.4.5-1784066510418",
115
+ "@tamagui/popper": "2.4.5-1784066510418",
116
+ "@tamagui/portal": "2.4.5-1784066510418",
117
+ "@tamagui/progress": "2.4.5-1784066510418",
118
+ "@tamagui/radio-group": "2.4.5-1784066510418",
119
+ "@tamagui/react-native-media-driver": "2.4.5-1784066510418",
120
+ "@tamagui/scroll-view": "2.4.5-1784066510418",
121
+ "@tamagui/select": "2.4.5-1784066510418",
122
+ "@tamagui/separator": "2.4.5-1784066510418",
123
+ "@tamagui/shapes": "2.4.5-1784066510418",
124
+ "@tamagui/sheet": "2.4.5-1784066510418",
125
+ "@tamagui/slider": "2.4.5-1784066510418",
126
+ "@tamagui/spacer": "2.4.5-1784066510418",
127
+ "@tamagui/spinner": "2.4.5-1784066510418",
128
+ "@tamagui/stacks": "2.4.5-1784066510418",
129
+ "@tamagui/switch": "2.4.5-1784066510418",
130
+ "@tamagui/tabs": "2.4.5-1784066510418",
131
+ "@tamagui/text": "2.4.5-1784066510418",
132
+ "@tamagui/theme": "2.4.5-1784066510418",
133
+ "@tamagui/toast": "2.4.5-1784066510418",
134
+ "@tamagui/toggle-group": "2.4.5-1784066510418",
135
+ "@tamagui/tooltip": "2.4.5-1784066510418",
136
+ "@tamagui/use-controllable-state": "2.4.5-1784066510418",
137
+ "@tamagui/use-debounce": "2.4.5-1784066510418",
138
+ "@tamagui/use-force-update": "2.4.5-1784066510418",
139
+ "@tamagui/use-window-dimensions": "2.4.5-1784066510418",
140
+ "@tamagui/visually-hidden": "2.4.5-1784066510418",
141
+ "@tamagui/font-size": "2.4.5-1784066510418",
142
+ "@tamagui/z-index-stack": "2.4.5-1784066510418"
143
143
  },
144
144
  "devDependencies": {
145
- "@tamagui/build": "2.4.4",
145
+ "@tamagui/build": "2.4.5-1784066510418",
146
146
  "react": ">=19",
147
147
  "react-native": "0.83.2",
148
148
  "react-native-web": "^0.21.0"