@tamagui/core 2.4.6 → 2.5.0

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.cjs CHANGED
@@ -15520,9 +15520,13 @@ var init_getSplitStyles_native = __esmMin((() => {
15520
15520
  }
15521
15521
  }
15522
15522
  if (keyInit in skipProps && !noSkip && !isHOC) {
15523
- var _driver_animations;
15524
15523
  if (keyInit === "group");
15525
- if (keyInit === "transition" && typeof valInit === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[valInit])) {} else return "continue";
15524
+ if (keyInit === "transition" && typeof valInit === "string") {
15525
+ var _driver_animations;
15526
+ var animationConfig = driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[valInit];
15527
+ if (animationConfig && (driver === null || driver === void 0 ? void 0 : driver.outputStyle) === "css" && process.env.IS_STATIC === "is_static") valInit = `all ${animationConfig}`;
15528
+ else if (animationConfig) return "continue";
15529
+ } else return "continue";
15526
15530
  }
15527
15531
  var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles$1, accept);
15528
15532
  if (!isValidStyleKeyInit) {
@@ -16911,7 +16915,7 @@ function createComponent(staticConfig) {
16911
16915
  setMediaShouldUpdate(componentContext, didGetVariableValue() || hasRuntimeMediaKeys || noClass && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.hasMedia) === true, hasRuntimeMediaKeys ? splitStyles.hasMedia : null);
16912
16916
  var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, pseudoGroups, mediaGroups } = splitStyles || {};
16913
16917
  var propsWithAnimation = props;
16914
- var _ref5 = viewPropsIn || {}, { asChild, children, themeShallow, spaceDirection: _spaceDirection, onPress, onLongPress, onPressIn, onPressOut, onHoverIn, onHoverOut, onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, onFocus, onBlur, separator, passThrough, forceStyle: _forceStyle, onClick, theme: _themeProp } = _ref5, nonTamaguiProps = _objectWithoutProperties(_ref5, _excluded2$1);
16918
+ var _ref5 = viewPropsIn || {}, { asChild, children, themeShallow, spaceDirection: _spaceDirection, onPress, onLongPress, onPressIn, onPressOut, onHoverIn, onHoverOut, onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, onFocus, onBlur, onDidAnimate, separator, passThrough, forceStyle: _forceStyle, onClick, theme: _themeProp } = _ref5, nonTamaguiProps = _objectWithoutProperties(_ref5, _excluded2$1);
16915
16919
  var viewProps = nonTamaguiProps;
16916
16920
  if (props.forceStyle) viewProps.forceStyle = props.forceStyle;
16917
16921
  if (isHOC) {
@@ -16941,7 +16945,8 @@ function createComponent(staticConfig) {
16941
16945
  themeName,
16942
16946
  pseudos: pseudos || null,
16943
16947
  staticConfig,
16944
- stateRef
16948
+ stateRef,
16949
+ onDidAnimate
16945
16950
  });
16946
16951
  if (animations) {
16947
16952
  if (animations.ref) animatedRef = animations.ref;
@@ -17272,6 +17277,7 @@ var init_createComponent_native = __esmMin((() => {
17272
17277
  "onMouseLeave",
17273
17278
  "onFocus",
17274
17279
  "onBlur",
17280
+ "onDidAnimate",
17275
17281
  "separator",
17276
17282
  "passThrough",
17277
17283
  "forceStyle",
@@ -3956,9 +3956,13 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3956
3956
  }
3957
3957
  }
3958
3958
  if (keyInit in skipProps && !noSkip && !isHOC) {
3959
- var _driver_animations;
3960
3959
  if (keyInit === "group");
3961
- if (keyInit === "transition" && typeof valInit === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[valInit])) {} else return "continue";
3960
+ if (keyInit === "transition" && typeof valInit === "string") {
3961
+ var _driver_animations;
3962
+ var animationConfig = driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[valInit];
3963
+ if (animationConfig && (driver === null || driver === void 0 ? void 0 : driver.outputStyle) === "css" && process.env.IS_STATIC === "is_static") valInit = `all ${animationConfig}`;
3964
+ else if (animationConfig) return "continue";
3965
+ } else return "continue";
3962
3966
  }
3963
3967
  var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles$1, accept);
3964
3968
  if (!isValidStyleKeyInit) {
@@ -5136,6 +5140,7 @@ var _excluded$2 = [
5136
5140
  "onMouseLeave",
5137
5141
  "onFocus",
5138
5142
  "onBlur",
5143
+ "onDidAnimate",
5139
5144
  "separator",
5140
5145
  "passThrough",
5141
5146
  "forceStyle",
@@ -5425,7 +5430,7 @@ function createComponent(staticConfig) {
5425
5430
  setMediaShouldUpdate(componentContext, didGetVariableValue() || hasRuntimeMediaKeys || noClass && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.hasMedia) === true, hasRuntimeMediaKeys ? splitStyles.hasMedia : null);
5426
5431
  var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, pseudoGroups, mediaGroups } = splitStyles || {};
5427
5432
  var propsWithAnimation = props;
5428
- var _ref5 = viewPropsIn || {}, { asChild, children, themeShallow, spaceDirection: _spaceDirection, onPress, onLongPress, onPressIn, onPressOut, onHoverIn, onHoverOut, onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, onFocus, onBlur, separator, passThrough, forceStyle: _forceStyle, onClick, theme: _themeProp } = _ref5, nonTamaguiProps = _objectWithoutProperties(_ref5, _excluded2$1);
5433
+ var _ref5 = viewPropsIn || {}, { asChild, children, themeShallow, spaceDirection: _spaceDirection, onPress, onLongPress, onPressIn, onPressOut, onHoverIn, onHoverOut, onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, onFocus, onBlur, onDidAnimate, separator, passThrough, forceStyle: _forceStyle, onClick, theme: _themeProp } = _ref5, nonTamaguiProps = _objectWithoutProperties(_ref5, _excluded2$1);
5429
5434
  var viewProps = nonTamaguiProps;
5430
5435
  if (props.forceStyle) viewProps.forceStyle = props.forceStyle;
5431
5436
  if (isHOC) {
@@ -5455,7 +5460,8 @@ function createComponent(staticConfig) {
5455
5460
  themeName,
5456
5461
  pseudos: pseudos || null,
5457
5462
  staticConfig,
5458
- stateRef
5463
+ stateRef,
5464
+ onDidAnimate
5459
5465
  });
5460
5466
  if (animations) {
5461
5467
  if (animations.ref) animatedRef = animations.ref;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "2.4.6",
3
+ "version": "2.5.0",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -9,7 +9,7 @@
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "https://github.com/tamagui/tamagui.git",
12
- "directory": "packages/core"
12
+ "directory": "code/core/core"
13
13
  },
14
14
  "source": "src/index.tsx",
15
15
  "type": "module",
@@ -79,17 +79,17 @@
79
79
  "clean:build": "tamagui-build clean:build"
80
80
  },
81
81
  "dependencies": {
82
- "@tamagui/helpers": "2.4.6",
83
- "@tamagui/react-native-media-driver": "2.4.6",
84
- "@tamagui/react-native-use-pressable": "2.4.6",
85
- "@tamagui/use-element-layout": "2.4.6",
86
- "@tamagui/use-event": "2.4.6",
87
- "@tamagui/web": "2.4.6"
82
+ "@tamagui/helpers": "2.5.0",
83
+ "@tamagui/react-native-media-driver": "2.5.0",
84
+ "@tamagui/react-native-use-pressable": "2.5.0",
85
+ "@tamagui/use-element-layout": "2.5.0",
86
+ "@tamagui/use-event": "2.5.0",
87
+ "@tamagui/web": "2.5.0"
88
88
  },
89
89
  "devDependencies": {
90
- "@tamagui/build": "2.4.6",
91
- "@tamagui/native-bundle": "2.4.6",
92
- "@tamagui/react-native-web-lite": "2.4.6",
90
+ "@tamagui/build": "2.5.0",
91
+ "@tamagui/native-bundle": "2.5.0",
92
+ "@tamagui/react-native-web-lite": "2.5.0",
93
93
  "@testing-library/react": "^16.1.0",
94
94
  "csstype": "^3.0.10",
95
95
  "react": ">=19",