@tamagui/core 2.3.1 → 2.3.2-1782110552417

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/core in 829 ms
2
+ built @tamagui/core in 1483 ms
3
3
  Running afterBuild script...
4
- afterBuild completed in 365 ms
4
+ afterBuild completed in 493 ms
package/dist/native.cjs CHANGED
@@ -14173,14 +14173,17 @@ function expandStyle(key, value) {
14173
14173
  }
14174
14174
  return;
14175
14175
  }
14176
- if (key in nativeExpansions) return nativeExpansions[key].map(function(k) {
14176
+ if (key in nativeInlineExpansions) return nativeInlineExpansions[key].map(function(k) {
14177
+ return [k, value];
14178
+ });
14179
+ if (key in universalExpansions) return universalExpansions[key].map(function(k) {
14177
14180
  return [k, value];
14178
14181
  });
14179
14182
  if (key in EXPANSIONS) return EXPANSIONS[key].map(function(k) {
14180
14183
  return [k, value];
14181
14184
  });
14182
14185
  }
14183
- var _loop, resizeModeMap, verticalAlignMap, all, horiz, vert, EXPANSIONS, nativeExpansions;
14186
+ var _loop, resizeModeMap, verticalAlignMap, all, horiz, vert, EXPANSIONS, universalExpansions, nativeInlineExpansions;
14184
14187
  var init_expandStyle_native = __esmMin((() => {
14185
14188
  init_index_native$7();
14186
14189
  init_config_native();
@@ -14243,52 +14246,54 @@ var init_expandStyle_native = __esmMin((() => {
14243
14246
  paddingVertical: vert
14244
14247
  }, false);
14245
14248
  for (var parent in EXPANSIONS) _loop(parent);
14246
- nativeExpansions = {
14249
+ universalExpansions = {
14250
+ inset: [
14251
+ "top",
14252
+ "right",
14253
+ "bottom",
14254
+ "left"
14255
+ ],
14256
+ insetBlock: ["top", "bottom"],
14257
+ insetBlockStart: ["top"],
14258
+ insetBlockEnd: ["bottom"],
14259
+ marginBlock: ["marginTop", "marginBottom"],
14260
+ marginBlockStart: ["marginTop"],
14261
+ marginBlockEnd: ["marginBottom"],
14262
+ paddingBlock: ["paddingTop", "paddingBottom"],
14263
+ paddingBlockStart: ["paddingTop"],
14264
+ paddingBlockEnd: ["paddingBottom"],
14247
14265
  borderBlockColor: ["borderTopColor", "borderBottomColor"],
14248
- borderInlineColor: ["borderEndColor", "borderStartColor"],
14249
14266
  borderBlockWidth: ["borderTopWidth", "borderBottomWidth"],
14250
- borderInlineWidth: ["borderEndWidth", "borderStartWidth"],
14251
14267
  borderBlockStyle: ["borderTopStyle", "borderBottomStyle"],
14252
- borderInlineStyle: ["borderEndStyle", "borderStartStyle"],
14253
14268
  borderBlockStartColor: ["borderTopColor"],
14254
14269
  borderBlockEndColor: ["borderBottomColor"],
14255
- borderInlineStartColor: ["borderStartColor"],
14256
- borderInlineEndColor: ["borderEndColor"],
14257
14270
  borderBlockStartWidth: ["borderTopWidth"],
14258
14271
  borderBlockEndWidth: ["borderBottomWidth"],
14259
- borderInlineStartWidth: ["borderStartWidth"],
14260
- borderInlineEndWidth: ["borderEndWidth"],
14261
14272
  borderBlockStartStyle: ["borderTopStyle"],
14262
14273
  borderBlockEndStyle: ["borderBottomStyle"],
14274
+ minBlockSize: ["minHeight"],
14275
+ maxBlockSize: ["maxHeight"],
14276
+ minInlineSize: ["minWidth"],
14277
+ maxInlineSize: ["maxWidth"],
14278
+ blockSize: ["height"],
14279
+ inlineSize: ["width"]
14280
+ };
14281
+ nativeInlineExpansions = {
14282
+ borderInlineColor: ["borderEndColor", "borderStartColor"],
14283
+ borderInlineWidth: ["borderEndWidth", "borderStartWidth"],
14284
+ borderInlineStyle: ["borderEndStyle", "borderStartStyle"],
14285
+ borderInlineStartColor: ["borderStartColor"],
14286
+ borderInlineEndColor: ["borderEndColor"],
14287
+ borderInlineStartWidth: ["borderStartWidth"],
14288
+ borderInlineEndWidth: ["borderEndWidth"],
14263
14289
  borderInlineStartStyle: ["borderStartStyle"],
14264
14290
  borderInlineEndStyle: ["borderEndStyle"],
14265
- marginBlock: ["marginTop", "marginBottom"],
14266
14291
  marginInline: ["marginEnd", "marginStart"],
14267
- paddingBlock: ["paddingTop", "paddingBottom"],
14268
- paddingInline: ["paddingEnd", "paddingStart"],
14269
- marginBlockStart: ["marginTop"],
14270
- marginBlockEnd: ["marginBottom"],
14271
14292
  marginInlineStart: ["marginStart"],
14272
14293
  marginInlineEnd: ["marginEnd"],
14273
- paddingBlockStart: ["paddingTop"],
14274
- paddingBlockEnd: ["paddingBottom"],
14294
+ paddingInline: ["paddingEnd", "paddingStart"],
14275
14295
  paddingInlineStart: ["paddingStart"],
14276
14296
  paddingInlineEnd: ["paddingEnd"],
14277
- minBlockSize: ["minHeight"],
14278
- maxBlockSize: ["maxHeight"],
14279
- minInlineSize: ["minWidth"],
14280
- maxInlineSize: ["maxWidth"],
14281
- blockSize: ["height"],
14282
- inlineSize: ["width"],
14283
- inset: [
14284
- "top",
14285
- "right",
14286
- "bottom",
14287
- "left"
14288
- ],
14289
- insetBlock: ["top", "bottom"],
14290
- insetBlockStart: ["top"],
14291
- insetBlockEnd: ["bottom"],
14292
14297
  insetInlineStart: ["left"],
14293
14298
  insetInlineEnd: ["right"]
14294
14299
  };
@@ -16903,9 +16908,21 @@ function createComponent(staticConfig) {
16903
16908
  });
16904
16909
  function notifyGroupSubscribers(groupContext, groupEmitter, pseudo) {
16905
16910
  if (!groupContext || !groupEmitter) return;
16906
- var nextState = _objectSpread2(_objectSpread2({}, groupContext.state), {}, { pseudo });
16907
- groupEmitter.emit(nextState);
16908
- groupContext.state = nextState;
16911
+ var prevPseudo = groupContext.state.pseudo;
16912
+ var shouldReplacePseudo = !prevPseudo || "unmounted" in prevPseudo || "group" in prevPseudo || "hasDynGroupChildren" in prevPseudo || "transition" in prevPseudo;
16913
+ var nextPseudo = shouldReplacePseudo ? {} : prevPseudo;
16914
+ var didChange = shouldReplacePseudo;
16915
+ for (var i = 0; i < groupPseudoKeys.length; i++) {
16916
+ var key = groupPseudoKeys[i];
16917
+ var value = pseudo[key];
16918
+ if (nextPseudo[key] !== value) {
16919
+ nextPseudo[key] = value;
16920
+ didChange = true;
16921
+ } else if (didChange) nextPseudo[key] = value;
16922
+ }
16923
+ if (!didChange) return;
16924
+ groupContext.state.pseudo = nextPseudo;
16925
+ groupEmitter.emit(groupContext.state);
16909
16926
  }
16910
16927
  if (staticConfig.componentName) component.displayName = staticConfig.componentName;
16911
16928
  var res = component;
@@ -16937,7 +16954,7 @@ function getRenderElementForPlatform(potential) {
16937
16954
  function isHTMLElement(el) {
16938
16955
  return typeof el["type"] === "string" && el["type"][0] === el["type"][0].toLowerCase();
16939
16956
  }
16940
- var _excluded$2, _excluded2$1, componentSetStates, avoidReRenderKeys, BaseText, BaseView, hasSetupBaseViews, lastInteractionWasKeyboard, lastInteractionWasTouch, fromPx, getCustomRender;
16957
+ var _excluded$2, _excluded2$1, componentSetStates, avoidReRenderKeys, groupPseudoKeys, BaseText, BaseView, hasSetupBaseViews, lastInteractionWasKeyboard, lastInteractionWasTouch, fromPx, getCustomRender;
16941
16958
  var init_createComponent_native = __esmMin((() => {
16942
16959
  init_index_native$4();
16943
16960
  init_index_native$7();
@@ -17008,6 +17025,15 @@ var init_createComponent_native = __esmMin((() => {
17008
17025
  "media",
17009
17026
  "group"
17010
17027
  ]);
17028
+ groupPseudoKeys = [
17029
+ "disabled",
17030
+ "hover",
17031
+ "press",
17032
+ "pressIn",
17033
+ "focus",
17034
+ "focusVisible",
17035
+ "focusWithin"
17036
+ ];
17011
17037
  hasSetupBaseViews = false;
17012
17038
  lastInteractionWasKeyboard = { value: false };
17013
17039
  lastInteractionWasTouch = { value: false };
@@ -2813,7 +2813,10 @@ function expandStyle(key, value) {
2813
2813
  }
2814
2814
  return;
2815
2815
  }
2816
- if (key in nativeExpansions) return nativeExpansions[key].map(function(k) {
2816
+ if (key in nativeInlineExpansions) return nativeInlineExpansions[key].map(function(k) {
2817
+ return [k, value];
2818
+ });
2819
+ if (key in universalExpansions) return universalExpansions[key].map(function(k) {
2817
2820
  return [k, value];
2818
2821
  });
2819
2822
  if (key in EXPANSIONS) return EXPANSIONS[key].map(function(k) {
@@ -2868,52 +2871,54 @@ var EXPANSIONS = _objectSpread2({
2868
2871
  paddingVertical: vert
2869
2872
  }, false);
2870
2873
  for (var parent in EXPANSIONS) _loop(parent);
2871
- var nativeExpansions = {
2874
+ var universalExpansions = {
2875
+ inset: [
2876
+ "top",
2877
+ "right",
2878
+ "bottom",
2879
+ "left"
2880
+ ],
2881
+ insetBlock: ["top", "bottom"],
2882
+ insetBlockStart: ["top"],
2883
+ insetBlockEnd: ["bottom"],
2884
+ marginBlock: ["marginTop", "marginBottom"],
2885
+ marginBlockStart: ["marginTop"],
2886
+ marginBlockEnd: ["marginBottom"],
2887
+ paddingBlock: ["paddingTop", "paddingBottom"],
2888
+ paddingBlockStart: ["paddingTop"],
2889
+ paddingBlockEnd: ["paddingBottom"],
2872
2890
  borderBlockColor: ["borderTopColor", "borderBottomColor"],
2873
- borderInlineColor: ["borderEndColor", "borderStartColor"],
2874
2891
  borderBlockWidth: ["borderTopWidth", "borderBottomWidth"],
2875
- borderInlineWidth: ["borderEndWidth", "borderStartWidth"],
2876
2892
  borderBlockStyle: ["borderTopStyle", "borderBottomStyle"],
2877
- borderInlineStyle: ["borderEndStyle", "borderStartStyle"],
2878
2893
  borderBlockStartColor: ["borderTopColor"],
2879
2894
  borderBlockEndColor: ["borderBottomColor"],
2880
- borderInlineStartColor: ["borderStartColor"],
2881
- borderInlineEndColor: ["borderEndColor"],
2882
2895
  borderBlockStartWidth: ["borderTopWidth"],
2883
2896
  borderBlockEndWidth: ["borderBottomWidth"],
2884
- borderInlineStartWidth: ["borderStartWidth"],
2885
- borderInlineEndWidth: ["borderEndWidth"],
2886
2897
  borderBlockStartStyle: ["borderTopStyle"],
2887
2898
  borderBlockEndStyle: ["borderBottomStyle"],
2899
+ minBlockSize: ["minHeight"],
2900
+ maxBlockSize: ["maxHeight"],
2901
+ minInlineSize: ["minWidth"],
2902
+ maxInlineSize: ["maxWidth"],
2903
+ blockSize: ["height"],
2904
+ inlineSize: ["width"]
2905
+ };
2906
+ var nativeInlineExpansions = {
2907
+ borderInlineColor: ["borderEndColor", "borderStartColor"],
2908
+ borderInlineWidth: ["borderEndWidth", "borderStartWidth"],
2909
+ borderInlineStyle: ["borderEndStyle", "borderStartStyle"],
2910
+ borderInlineStartColor: ["borderStartColor"],
2911
+ borderInlineEndColor: ["borderEndColor"],
2912
+ borderInlineStartWidth: ["borderStartWidth"],
2913
+ borderInlineEndWidth: ["borderEndWidth"],
2888
2914
  borderInlineStartStyle: ["borderStartStyle"],
2889
2915
  borderInlineEndStyle: ["borderEndStyle"],
2890
- marginBlock: ["marginTop", "marginBottom"],
2891
2916
  marginInline: ["marginEnd", "marginStart"],
2892
- paddingBlock: ["paddingTop", "paddingBottom"],
2893
- paddingInline: ["paddingEnd", "paddingStart"],
2894
- marginBlockStart: ["marginTop"],
2895
- marginBlockEnd: ["marginBottom"],
2896
2917
  marginInlineStart: ["marginStart"],
2897
2918
  marginInlineEnd: ["marginEnd"],
2898
- paddingBlockStart: ["paddingTop"],
2899
- paddingBlockEnd: ["paddingBottom"],
2919
+ paddingInline: ["paddingEnd", "paddingStart"],
2900
2920
  paddingInlineStart: ["paddingStart"],
2901
2921
  paddingInlineEnd: ["paddingEnd"],
2902
- minBlockSize: ["minHeight"],
2903
- maxBlockSize: ["maxHeight"],
2904
- minInlineSize: ["minWidth"],
2905
- maxInlineSize: ["maxWidth"],
2906
- blockSize: ["height"],
2907
- inlineSize: ["width"],
2908
- inset: [
2909
- "top",
2910
- "right",
2911
- "bottom",
2912
- "left"
2913
- ],
2914
- insetBlock: ["top", "bottom"],
2915
- insetBlockStart: ["top"],
2916
- insetBlockEnd: ["bottom"],
2917
2922
  insetInlineStart: ["left"],
2918
2923
  insetInlineEnd: ["right"]
2919
2924
  };
@@ -4895,6 +4900,15 @@ var avoidReRenderKeys = /* @__PURE__ */ new Set([
4895
4900
  "media",
4896
4901
  "group"
4897
4902
  ]);
4903
+ var groupPseudoKeys = [
4904
+ "disabled",
4905
+ "hover",
4906
+ "press",
4907
+ "pressIn",
4908
+ "focus",
4909
+ "focusVisible",
4910
+ "focusWithin"
4911
+ ];
4898
4912
  var BaseText;
4899
4913
  var BaseView;
4900
4914
  var hasSetupBaseViews = false;
@@ -5413,9 +5427,21 @@ function createComponent(staticConfig) {
5413
5427
  });
5414
5428
  function notifyGroupSubscribers(groupContext, groupEmitter, pseudo) {
5415
5429
  if (!groupContext || !groupEmitter) return;
5416
- var nextState = _objectSpread2(_objectSpread2({}, groupContext.state), {}, { pseudo });
5417
- groupEmitter.emit(nextState);
5418
- groupContext.state = nextState;
5430
+ var prevPseudo = groupContext.state.pseudo;
5431
+ var shouldReplacePseudo = !prevPseudo || "unmounted" in prevPseudo || "group" in prevPseudo || "hasDynGroupChildren" in prevPseudo || "transition" in prevPseudo;
5432
+ var nextPseudo = shouldReplacePseudo ? {} : prevPseudo;
5433
+ var didChange = shouldReplacePseudo;
5434
+ for (var i = 0; i < groupPseudoKeys.length; i++) {
5435
+ var key = groupPseudoKeys[i];
5436
+ var value = pseudo[key];
5437
+ if (nextPseudo[key] !== value) {
5438
+ nextPseudo[key] = value;
5439
+ didChange = true;
5440
+ } else if (didChange) nextPseudo[key] = value;
5441
+ }
5442
+ if (!didChange) return;
5443
+ groupContext.state.pseudo = nextPseudo;
5444
+ groupEmitter.emit(groupContext.state);
5419
5445
  }
5420
5446
  if (staticConfig.componentName) component.displayName = staticConfig.componentName;
5421
5447
  var res = component;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "2.3.1",
3
+ "version": "2.3.2-1782110552417",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -79,17 +79,17 @@
79
79
  "clean:build": "tamagui-build clean:build"
80
80
  },
81
81
  "dependencies": {
82
- "@tamagui/helpers": "2.3.1",
83
- "@tamagui/react-native-media-driver": "2.3.1",
84
- "@tamagui/react-native-use-pressable": "2.3.1",
85
- "@tamagui/use-element-layout": "2.3.1",
86
- "@tamagui/use-event": "2.3.1",
87
- "@tamagui/web": "2.3.1"
82
+ "@tamagui/helpers": "2.3.2-1782110552417",
83
+ "@tamagui/react-native-media-driver": "2.3.2-1782110552417",
84
+ "@tamagui/react-native-use-pressable": "2.3.2-1782110552417",
85
+ "@tamagui/use-element-layout": "2.3.2-1782110552417",
86
+ "@tamagui/use-event": "2.3.2-1782110552417",
87
+ "@tamagui/web": "2.3.2-1782110552417"
88
88
  },
89
89
  "devDependencies": {
90
- "@tamagui/build": "2.3.1",
91
- "@tamagui/native-bundle": "2.3.1",
92
- "@tamagui/react-native-web-lite": "2.3.1",
90
+ "@tamagui/build": "2.3.2-1782110552417",
91
+ "@tamagui/native-bundle": "2.3.2-1782110552417",
92
+ "@tamagui/react-native-web-lite": "2.3.2-1782110552417",
93
93
  "@testing-library/react": "^16.1.0",
94
94
  "csstype": "^3.0.10",
95
95
  "react": ">=19",