tamagui 2.2.0 → 2.3.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/.turbo/turbo-build.log +4 -5
- package/dist/native.cjs +55 -12
- package/dist/test.cjs +55 -12
- package/package.json +65 -65
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
afterBuild completed in [33m409[39m ms
|
|
1
|
+
$ tamagui-build
|
|
2
|
+
built tamagui in 1382 ms
|
|
3
|
+
Running afterBuild script...
|
|
4
|
+
afterBuild completed in 328 ms
|
package/dist/native.cjs
CHANGED
|
@@ -11838,9 +11838,19 @@ var init_constants_native$1 = __esmMin((() => {
|
|
|
11838
11838
|
}[Platform.OS] : void 0) || "native";
|
|
11839
11839
|
}));
|
|
11840
11840
|
//#endregion
|
|
11841
|
+
//#region ../../core/constants/dist/esm/platformDriver.native.js
|
|
11842
|
+
function getPlatformDriver() {
|
|
11843
|
+
return platformDriver;
|
|
11844
|
+
}
|
|
11845
|
+
var platformDriver;
|
|
11846
|
+
var init_platformDriver_native = __esmMin((() => {
|
|
11847
|
+
platformDriver = null;
|
|
11848
|
+
}));
|
|
11849
|
+
//#endregion
|
|
11841
11850
|
//#region ../../core/constants/dist/esm/index.native.js
|
|
11842
11851
|
var init_index_native$7 = __esmMin((() => {
|
|
11843
11852
|
init_constants_native$1();
|
|
11853
|
+
init_platformDriver_native();
|
|
11844
11854
|
}));
|
|
11845
11855
|
//#endregion
|
|
11846
11856
|
//#region ../../core/web/dist/esm/constants/constants.native.js
|
|
@@ -13947,10 +13957,17 @@ function useMainThreadPressEvents(events, viewProps) {
|
|
|
13947
13957
|
ref.current.pressOutTimer = null;
|
|
13948
13958
|
ref.current.longPressTimer = null;
|
|
13949
13959
|
}
|
|
13950
|
-
viewProps.onStartShouldSetResponder
|
|
13951
|
-
|
|
13960
|
+
var userStartShouldSet = viewProps.onStartShouldSetResponder;
|
|
13961
|
+
var userGrant = viewProps.onResponderGrant;
|
|
13962
|
+
var userRelease = viewProps.onResponderRelease;
|
|
13963
|
+
var userTerminate = viewProps.onResponderTerminate;
|
|
13964
|
+
var userTerminationRequest = viewProps.onResponderTerminationRequest;
|
|
13965
|
+
var userMove = viewProps.onResponderMove;
|
|
13966
|
+
viewProps.onStartShouldSetResponder = function(e) {
|
|
13967
|
+
return Boolean(userStartShouldSet === null || userStartShouldSet === void 0 ? void 0 : userStartShouldSet(e)) || !events.disabled;
|
|
13952
13968
|
};
|
|
13953
13969
|
viewProps.onResponderGrant = function(e) {
|
|
13970
|
+
userGrant === null || userGrant === void 0 || userGrant(e);
|
|
13954
13971
|
cleanup();
|
|
13955
13972
|
ref.current.state = "pressing";
|
|
13956
13973
|
if (delayPressIn > 0) ref.current.pressInTimer = setTimeout(function() {
|
|
@@ -13966,6 +13983,7 @@ function useMainThreadPressEvents(events, viewProps) {
|
|
|
13966
13983
|
}, delayLongPress + delayPressIn);
|
|
13967
13984
|
};
|
|
13968
13985
|
viewProps.onResponderRelease = function(e) {
|
|
13986
|
+
userRelease === null || userRelease === void 0 || userRelease(e);
|
|
13969
13987
|
var wasLongPressed = ref.current.state === "longPressed";
|
|
13970
13988
|
cleanup();
|
|
13971
13989
|
if (ref.current.state === "pressing") activate(e);
|
|
@@ -13977,15 +13995,18 @@ function useMainThreadPressEvents(events, viewProps) {
|
|
|
13977
13995
|
ref.current.state = "idle";
|
|
13978
13996
|
};
|
|
13979
13997
|
viewProps.onResponderTerminate = function(e) {
|
|
13998
|
+
userTerminate === null || userTerminate === void 0 || userTerminate(e);
|
|
13980
13999
|
cleanup();
|
|
13981
14000
|
if (ref.current.state === "active" || ref.current.state === "longPressed") deactivate(e);
|
|
13982
14001
|
ref.current.state = "idle";
|
|
13983
14002
|
};
|
|
13984
|
-
viewProps.onResponderTerminationRequest = function() {
|
|
14003
|
+
viewProps.onResponderTerminationRequest = function(e) {
|
|
14004
|
+
if (userTerminationRequest) return userTerminationRequest(e);
|
|
13985
14005
|
return events.cancelable !== false;
|
|
13986
14006
|
};
|
|
13987
14007
|
viewProps.onResponderMove = function(e) {
|
|
13988
14008
|
var _events_onPressMove;
|
|
14009
|
+
userMove === null || userMove === void 0 || userMove(e);
|
|
13989
14010
|
(_events_onPressMove = events.onPressMove) === null || _events_onPressMove === void 0 || _events_onPressMove.call(events, e);
|
|
13990
14011
|
};
|
|
13991
14012
|
}
|
|
@@ -16496,7 +16517,7 @@ var init_useComponentState_native = __esmMin((() => {
|
|
|
16496
16517
|
init_objectSpread2();
|
|
16497
16518
|
useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
16498
16519
|
"use no memo";
|
|
16499
|
-
var _animationDriver_usePresence;
|
|
16520
|
+
var _getPlatformDriver, _animationDriver_usePresence;
|
|
16500
16521
|
var isHydrated = useDidFinishSSR();
|
|
16501
16522
|
var needsHydration = !useIsClientOnly();
|
|
16502
16523
|
var useAnimations = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isStub) ? void 0 : animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useAnimations;
|
|
@@ -16510,8 +16531,9 @@ var init_useComponentState_native = __esmMin((() => {
|
|
|
16510
16531
|
var outputStyle = (_animationDriver_outputStyle = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.outputStyle) !== null && _animationDriver_outputStyle !== void 0 ? _animationDriver_outputStyle : "css";
|
|
16511
16532
|
var curStateRef = stateRef.current;
|
|
16512
16533
|
if (!needsHydration && hasAnimationProp) curStateRef.hasAnimated = true;
|
|
16534
|
+
var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && ("hoverStyle" in props || "pressStyle" in props || "focusStyle" in props));
|
|
16513
16535
|
var willBeAnimatedClient = function() {
|
|
16514
|
-
return Boolean(!!(hasAnimationProp && !isHOC && useAnimations) || curStateRef.hasAnimated);
|
|
16536
|
+
return Boolean(!!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations) || curStateRef.hasAnimated);
|
|
16515
16537
|
}();
|
|
16516
16538
|
var willBeAnimated = willBeAnimatedClient;
|
|
16517
16539
|
if (willBeAnimated && !curStateRef.hasAnimated) curStateRef.hasAnimated = true;
|
|
@@ -16568,7 +16590,8 @@ var init_useComponentState_native = __esmMin((() => {
|
|
|
16568
16590
|
inputStyle,
|
|
16569
16591
|
outputStyle,
|
|
16570
16592
|
willBeAnimated,
|
|
16571
|
-
willBeAnimatedClient
|
|
16593
|
+
willBeAnimatedClient,
|
|
16594
|
+
platformPseudo
|
|
16572
16595
|
};
|
|
16573
16596
|
};
|
|
16574
16597
|
isDisabled = function(props) {
|
|
@@ -16676,13 +16699,30 @@ function createComponent(staticConfig) {
|
|
|
16676
16699
|
}();
|
|
16677
16700
|
var useAnimations = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useAnimations;
|
|
16678
16701
|
var componentState = useComponentState(props, (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig, config);
|
|
16679
|
-
var { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, inputStyle, outputStyle, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState;
|
|
16702
|
+
var { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, inputStyle, outputStyle, willBeAnimated, willBeAnimatedClient, platformPseudo, startedUnhydrated } = componentState;
|
|
16680
16703
|
if (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) useIsomorphicLayoutEffect(function() {
|
|
16704
|
+
var emitted = stateRef.current.prevPseudoState;
|
|
16705
|
+
if (emitted && (emitted.hover || emitted.press || emitted.focus)) {
|
|
16706
|
+
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
16707
|
+
(_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
16708
|
+
}
|
|
16681
16709
|
var pendingState = stateRef.current.nextState;
|
|
16682
16710
|
if (!pendingState) return;
|
|
16683
16711
|
stateRef.current.nextState = void 0;
|
|
16684
16712
|
if (!isEqualShallow(state, pendingState)) componentState.setStateShallow(pendingState);
|
|
16685
16713
|
});
|
|
16714
|
+
useIsomorphicLayoutEffect(function() {
|
|
16715
|
+
var _getPlatformDriver;
|
|
16716
|
+
if (!platformPseudo || props.disabled) return;
|
|
16717
|
+
var pseudoDriver = (_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo;
|
|
16718
|
+
var host = stateRef.current.host;
|
|
16719
|
+
if (!pseudoDriver || !host) return;
|
|
16720
|
+
return pseudoDriver.subscribe(host, function(param) {
|
|
16721
|
+
var { hovered } = param;
|
|
16722
|
+
var _stateRef_current_setStateShallow, _stateRef_current;
|
|
16723
|
+
(_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, { hover: hovered });
|
|
16724
|
+
});
|
|
16725
|
+
}, [platformPseudo, props.disabled]);
|
|
16686
16726
|
var allGroupContexts = (0, react$1.useMemo)(function() {
|
|
16687
16727
|
var _stateRef_current_group_listeners, _stateRef_current_group;
|
|
16688
16728
|
if (!groupName || props.passThrough) return groupContextParent;
|
|
@@ -16778,7 +16818,7 @@ function createComponent(staticConfig) {
|
|
|
16778
16818
|
}
|
|
16779
16819
|
}
|
|
16780
16820
|
var hasEnterExitTransition = props.transition && _type_of$7(props.transition) === "object" && !Array.isArray(props.transition) && ("enter" in props.transition || "exit" in props.transition);
|
|
16781
|
-
if (!isPassthrough && (hasAnimationProp || groupName) && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && !hasEnterExitTransition) {
|
|
16821
|
+
if (!isPassthrough && (hasAnimationProp || groupName || platformPseudo) && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && !hasEnterExitTransition) {
|
|
16782
16822
|
let updateGroupListeners2 = function() {
|
|
16783
16823
|
var updatedState = stateRef.current.nextState;
|
|
16784
16824
|
if (groupContext) {
|
|
@@ -16797,9 +16837,11 @@ function createComponent(staticConfig) {
|
|
|
16797
16837
|
var updatedState = stateRef.current.nextState || state;
|
|
16798
16838
|
var mediaState2 = stateRef.current.nextMedia;
|
|
16799
16839
|
var nextStyles = getSplitStyles(props, staticConfig, theme, themeName, updatedState, mediaState2 ? _objectSpread2(_objectSpread2({}, styleProps), {}, { mediaState: mediaState2 }) : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
16800
|
-
var
|
|
16840
|
+
var _props_transition2;
|
|
16841
|
+
var effectiveTransition2 = resolveEffectivePseudoTransition(stateRef.current.prevPseudoState, updatedState, nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.pseudoTransitions, (_props_transition2 = props.transition) !== null && _props_transition2 !== void 0 ? _props_transition2 : platformPseudo ? "0ms" : void 0);
|
|
16801
16842
|
stateRef.current.prevPseudoState = extractPseudoState(updatedState);
|
|
16802
|
-
|
|
16843
|
+
var hasActivePseudo = Boolean(updatedState.hover || updatedState.press || updatedState.pressIn || updatedState.focus || updatedState.focusWithin);
|
|
16844
|
+
useStyleListener((nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.style) || {}, effectiveTransition2, hasActivePseudo);
|
|
16803
16845
|
};
|
|
16804
16846
|
componentContext.mediaEmitListeners = componentContext.mediaEmitListeners || /* @__PURE__ */ new Set();
|
|
16805
16847
|
if (!stateRef.current.mediaEmitCleanup) {
|
|
@@ -16877,7 +16919,8 @@ function createComponent(staticConfig) {
|
|
|
16877
16919
|
var useStyleEmitter = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) ? function(listener) {
|
|
16878
16920
|
stateRef.current.useStyleListener = listener;
|
|
16879
16921
|
} : void 0;
|
|
16880
|
-
var
|
|
16922
|
+
var _props_transition;
|
|
16923
|
+
var effectiveTransition = resolveEffectivePseudoTransition(stateRef.current.prevPseudoState, state, splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.pseudoTransitions, (_props_transition = props.transition) !== null && _props_transition !== void 0 ? _props_transition : platformPseudo ? "0ms" : void 0);
|
|
16881
16924
|
if (splitStyles) splitStyles.effectiveTransition = effectiveTransition;
|
|
16882
16925
|
stateRef.current.prevPseudoState = extractPseudoState(state);
|
|
16883
16926
|
var animations = useAnimations({
|
|
@@ -16984,7 +17027,7 @@ function createComponent(staticConfig) {
|
|
|
16984
17027
|
var hasDynamicGroupChildren = Boolean(groupName && state.hasDynGroupChildren);
|
|
16985
17028
|
var attachPress = Boolean(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || (pseudos === null || pseudos === void 0 ? void 0 : pseudos.focusVisibleStyle));
|
|
16986
17029
|
var runtimeHoverStyle = !disabled && noClass && (pseudos === null || pseudos === void 0 ? void 0 : pseudos.hoverStyle);
|
|
16987
|
-
var needsHoverState = Boolean(hasDynamicGroupChildren || runtimeHoverStyle);
|
|
17030
|
+
var needsHoverState = Boolean(hasDynamicGroupChildren || runtimeHoverStyle && !platformPseudo);
|
|
16988
17031
|
var attachHover = isNativeDesktop && !!(hasDynamicGroupChildren || needsHoverState || onMouseEnter || onMouseLeave);
|
|
16989
17032
|
var shouldAttach = !disabled && !props.asChild && Boolean(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle);
|
|
16990
17033
|
var needsPressState = Boolean(hasDynamicGroupChildren || runtimePressStyle);
|
package/dist/test.cjs
CHANGED
|
@@ -12016,9 +12016,19 @@ var init_constants_native$1 = __esmMin((() => {
|
|
|
12016
12016
|
}[Platform.OS] : void 0) || "native";
|
|
12017
12017
|
}));
|
|
12018
12018
|
//#endregion
|
|
12019
|
+
//#region ../../core/constants/dist/esm/platformDriver.native.js
|
|
12020
|
+
function getPlatformDriver() {
|
|
12021
|
+
return platformDriver;
|
|
12022
|
+
}
|
|
12023
|
+
var platformDriver;
|
|
12024
|
+
var init_platformDriver_native = __esmMin((() => {
|
|
12025
|
+
platformDriver = null;
|
|
12026
|
+
}));
|
|
12027
|
+
//#endregion
|
|
12019
12028
|
//#region ../../core/constants/dist/esm/index.native.js
|
|
12020
12029
|
var init_index_native$7 = __esmMin((() => {
|
|
12021
12030
|
init_constants_native$1();
|
|
12031
|
+
init_platformDriver_native();
|
|
12022
12032
|
}));
|
|
12023
12033
|
//#endregion
|
|
12024
12034
|
//#region ../../core/web/dist/esm/constants/constants.native.js
|
|
@@ -14125,10 +14135,17 @@ function useMainThreadPressEvents(events, viewProps) {
|
|
|
14125
14135
|
ref.current.pressOutTimer = null;
|
|
14126
14136
|
ref.current.longPressTimer = null;
|
|
14127
14137
|
}
|
|
14128
|
-
viewProps.onStartShouldSetResponder
|
|
14129
|
-
|
|
14138
|
+
var userStartShouldSet = viewProps.onStartShouldSetResponder;
|
|
14139
|
+
var userGrant = viewProps.onResponderGrant;
|
|
14140
|
+
var userRelease = viewProps.onResponderRelease;
|
|
14141
|
+
var userTerminate = viewProps.onResponderTerminate;
|
|
14142
|
+
var userTerminationRequest = viewProps.onResponderTerminationRequest;
|
|
14143
|
+
var userMove = viewProps.onResponderMove;
|
|
14144
|
+
viewProps.onStartShouldSetResponder = function(e) {
|
|
14145
|
+
return Boolean(userStartShouldSet === null || userStartShouldSet === void 0 ? void 0 : userStartShouldSet(e)) || !events.disabled;
|
|
14130
14146
|
};
|
|
14131
14147
|
viewProps.onResponderGrant = function(e) {
|
|
14148
|
+
userGrant === null || userGrant === void 0 || userGrant(e);
|
|
14132
14149
|
cleanup();
|
|
14133
14150
|
ref.current.state = "pressing";
|
|
14134
14151
|
if (delayPressIn > 0) ref.current.pressInTimer = setTimeout(function() {
|
|
@@ -14144,6 +14161,7 @@ function useMainThreadPressEvents(events, viewProps) {
|
|
|
14144
14161
|
}, delayLongPress + delayPressIn);
|
|
14145
14162
|
};
|
|
14146
14163
|
viewProps.onResponderRelease = function(e) {
|
|
14164
|
+
userRelease === null || userRelease === void 0 || userRelease(e);
|
|
14147
14165
|
var wasLongPressed = ref.current.state === "longPressed";
|
|
14148
14166
|
cleanup();
|
|
14149
14167
|
if (ref.current.state === "pressing") activate(e);
|
|
@@ -14155,15 +14173,18 @@ function useMainThreadPressEvents(events, viewProps) {
|
|
|
14155
14173
|
ref.current.state = "idle";
|
|
14156
14174
|
};
|
|
14157
14175
|
viewProps.onResponderTerminate = function(e) {
|
|
14176
|
+
userTerminate === null || userTerminate === void 0 || userTerminate(e);
|
|
14158
14177
|
cleanup();
|
|
14159
14178
|
if (ref.current.state === "active" || ref.current.state === "longPressed") deactivate(e);
|
|
14160
14179
|
ref.current.state = "idle";
|
|
14161
14180
|
};
|
|
14162
|
-
viewProps.onResponderTerminationRequest = function() {
|
|
14181
|
+
viewProps.onResponderTerminationRequest = function(e) {
|
|
14182
|
+
if (userTerminationRequest) return userTerminationRequest(e);
|
|
14163
14183
|
return events.cancelable !== false;
|
|
14164
14184
|
};
|
|
14165
14185
|
viewProps.onResponderMove = function(e) {
|
|
14166
14186
|
var _events_onPressMove;
|
|
14187
|
+
userMove === null || userMove === void 0 || userMove(e);
|
|
14167
14188
|
(_events_onPressMove = events.onPressMove) === null || _events_onPressMove === void 0 || _events_onPressMove.call(events, e);
|
|
14168
14189
|
};
|
|
14169
14190
|
}
|
|
@@ -16676,7 +16697,7 @@ var init_useComponentState_native = __esmMin((() => {
|
|
|
16676
16697
|
init_objectSpread2();
|
|
16677
16698
|
useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
16678
16699
|
"use no memo";
|
|
16679
|
-
var _animationDriver_usePresence;
|
|
16700
|
+
var _getPlatformDriver, _animationDriver_usePresence;
|
|
16680
16701
|
var isHydrated = useDidFinishSSR();
|
|
16681
16702
|
var needsHydration = !useIsClientOnly();
|
|
16682
16703
|
var useAnimations = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isStub) ? void 0 : animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useAnimations;
|
|
@@ -16690,8 +16711,9 @@ var init_useComponentState_native = __esmMin((() => {
|
|
|
16690
16711
|
var outputStyle = (_animationDriver_outputStyle = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.outputStyle) !== null && _animationDriver_outputStyle !== void 0 ? _animationDriver_outputStyle : "css";
|
|
16691
16712
|
var curStateRef = stateRef.current;
|
|
16692
16713
|
if (!needsHydration && hasAnimationProp) curStateRef.hasAnimated = true;
|
|
16714
|
+
var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && ("hoverStyle" in props || "pressStyle" in props || "focusStyle" in props));
|
|
16693
16715
|
var willBeAnimatedClient = function() {
|
|
16694
|
-
return Boolean(!!(hasAnimationProp && !isHOC && useAnimations) || curStateRef.hasAnimated);
|
|
16716
|
+
return Boolean(!!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations) || curStateRef.hasAnimated);
|
|
16695
16717
|
}();
|
|
16696
16718
|
var willBeAnimated = willBeAnimatedClient;
|
|
16697
16719
|
if (willBeAnimated && !curStateRef.hasAnimated) curStateRef.hasAnimated = true;
|
|
@@ -16748,7 +16770,8 @@ var init_useComponentState_native = __esmMin((() => {
|
|
|
16748
16770
|
inputStyle,
|
|
16749
16771
|
outputStyle,
|
|
16750
16772
|
willBeAnimated,
|
|
16751
|
-
willBeAnimatedClient
|
|
16773
|
+
willBeAnimatedClient,
|
|
16774
|
+
platformPseudo
|
|
16752
16775
|
};
|
|
16753
16776
|
};
|
|
16754
16777
|
isDisabled = function(props) {
|
|
@@ -16861,13 +16884,30 @@ function createComponent(staticConfig) {
|
|
|
16861
16884
|
}();
|
|
16862
16885
|
var useAnimations = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useAnimations;
|
|
16863
16886
|
var componentState = useComponentState(props, (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig, config);
|
|
16864
|
-
var { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, inputStyle, outputStyle, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState;
|
|
16887
|
+
var { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, inputStyle, outputStyle, willBeAnimated, willBeAnimatedClient, platformPseudo, startedUnhydrated } = componentState;
|
|
16865
16888
|
if (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) useIsomorphicLayoutEffect(function() {
|
|
16889
|
+
var emitted = stateRef.current.prevPseudoState;
|
|
16890
|
+
if (emitted && (emitted.hover || emitted.press || emitted.focus)) {
|
|
16891
|
+
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
16892
|
+
(_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
16893
|
+
}
|
|
16866
16894
|
var pendingState = stateRef.current.nextState;
|
|
16867
16895
|
if (!pendingState) return;
|
|
16868
16896
|
stateRef.current.nextState = void 0;
|
|
16869
16897
|
if (!isEqualShallow(state, pendingState)) componentState.setStateShallow(pendingState);
|
|
16870
16898
|
});
|
|
16899
|
+
useIsomorphicLayoutEffect(function() {
|
|
16900
|
+
var _getPlatformDriver;
|
|
16901
|
+
if (!platformPseudo || props.disabled) return;
|
|
16902
|
+
var pseudoDriver = (_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo;
|
|
16903
|
+
var host = stateRef.current.host;
|
|
16904
|
+
if (!pseudoDriver || !host) return;
|
|
16905
|
+
return pseudoDriver.subscribe(host, function(param) {
|
|
16906
|
+
var { hovered } = param;
|
|
16907
|
+
var _stateRef_current_setStateShallow, _stateRef_current;
|
|
16908
|
+
(_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, { hover: hovered });
|
|
16909
|
+
});
|
|
16910
|
+
}, [platformPseudo, props.disabled]);
|
|
16871
16911
|
var allGroupContexts = (0, react$1.useMemo)(function() {
|
|
16872
16912
|
var _stateRef_current_group_listeners, _stateRef_current_group;
|
|
16873
16913
|
if (!groupName || props.passThrough) return groupContextParent;
|
|
@@ -16963,7 +17003,7 @@ function createComponent(staticConfig) {
|
|
|
16963
17003
|
}
|
|
16964
17004
|
}
|
|
16965
17005
|
var hasEnterExitTransition = props.transition && _type_of$7(props.transition) === "object" && !Array.isArray(props.transition) && ("enter" in props.transition || "exit" in props.transition);
|
|
16966
|
-
if (!isPassthrough && (hasAnimationProp || groupName) && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && !hasEnterExitTransition) {
|
|
17006
|
+
if (!isPassthrough && (hasAnimationProp || groupName || platformPseudo) && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && !hasEnterExitTransition) {
|
|
16967
17007
|
let updateGroupListeners2 = function() {
|
|
16968
17008
|
var updatedState = stateRef.current.nextState;
|
|
16969
17009
|
if (groupContext) {
|
|
@@ -16982,9 +17022,11 @@ function createComponent(staticConfig) {
|
|
|
16982
17022
|
var updatedState = stateRef.current.nextState || state;
|
|
16983
17023
|
var mediaState2 = stateRef.current.nextMedia;
|
|
16984
17024
|
var nextStyles = getSplitStyles(props, staticConfig, theme, themeName, updatedState, mediaState2 ? _objectSpread2(_objectSpread2({}, styleProps), {}, { mediaState: mediaState2 }) : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver);
|
|
16985
|
-
var
|
|
17025
|
+
var _props_transition2;
|
|
17026
|
+
var effectiveTransition2 = resolveEffectivePseudoTransition(stateRef.current.prevPseudoState, updatedState, nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.pseudoTransitions, (_props_transition2 = props.transition) !== null && _props_transition2 !== void 0 ? _props_transition2 : platformPseudo ? "0ms" : void 0);
|
|
16986
17027
|
stateRef.current.prevPseudoState = extractPseudoState(updatedState);
|
|
16987
|
-
|
|
17028
|
+
var hasActivePseudo = Boolean(updatedState.hover || updatedState.press || updatedState.pressIn || updatedState.focus || updatedState.focusWithin);
|
|
17029
|
+
useStyleListener((nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.style) || {}, effectiveTransition2, hasActivePseudo);
|
|
16988
17030
|
};
|
|
16989
17031
|
componentContext.mediaEmitListeners = componentContext.mediaEmitListeners || /* @__PURE__ */ new Set();
|
|
16990
17032
|
if (!stateRef.current.mediaEmitCleanup) {
|
|
@@ -17062,7 +17104,8 @@ function createComponent(staticConfig) {
|
|
|
17062
17104
|
var useStyleEmitter = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) ? function(listener) {
|
|
17063
17105
|
stateRef.current.useStyleListener = listener;
|
|
17064
17106
|
} : void 0;
|
|
17065
|
-
var
|
|
17107
|
+
var _props_transition;
|
|
17108
|
+
var effectiveTransition = resolveEffectivePseudoTransition(stateRef.current.prevPseudoState, state, splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.pseudoTransitions, (_props_transition = props.transition) !== null && _props_transition !== void 0 ? _props_transition : platformPseudo ? "0ms" : void 0);
|
|
17066
17109
|
if (splitStyles) splitStyles.effectiveTransition = effectiveTransition;
|
|
17067
17110
|
stateRef.current.prevPseudoState = extractPseudoState(state);
|
|
17068
17111
|
var animations = useAnimations({
|
|
@@ -17169,7 +17212,7 @@ function createComponent(staticConfig) {
|
|
|
17169
17212
|
var hasDynamicGroupChildren = Boolean(groupName && state.hasDynGroupChildren);
|
|
17170
17213
|
var attachPress = Boolean(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || (pseudos === null || pseudos === void 0 ? void 0 : pseudos.focusVisibleStyle));
|
|
17171
17214
|
var runtimeHoverStyle = !disabled && noClass && (pseudos === null || pseudos === void 0 ? void 0 : pseudos.hoverStyle);
|
|
17172
|
-
var needsHoverState = Boolean(hasDynamicGroupChildren || runtimeHoverStyle);
|
|
17215
|
+
var needsHoverState = Boolean(hasDynamicGroupChildren || runtimeHoverStyle && !platformPseudo);
|
|
17173
17216
|
var attachHover = isNativeDesktop && !!(hasDynamicGroupChildren || needsHoverState || onMouseEnter || onMouseLeave);
|
|
17174
17217
|
var shouldAttach = !disabled && !props.asChild && Boolean(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle);
|
|
17175
17218
|
var needsPressState = Boolean(hasDynamicGroupChildren || runtimePressStyle);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamagui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
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.
|
|
81
|
-
"@tamagui/adapt": "2.
|
|
82
|
-
"@tamagui/alert-dialog": "2.
|
|
83
|
-
"@tamagui/animate": "2.
|
|
84
|
-
"@tamagui/animate-presence": "2.
|
|
85
|
-
"@tamagui/avatar": "2.
|
|
86
|
-
"@tamagui/button": "2.
|
|
87
|
-
"@tamagui/card": "2.
|
|
88
|
-
"@tamagui/checkbox": "2.
|
|
89
|
-
"@tamagui/collapsible": "2.
|
|
90
|
-
"@tamagui/compose-refs": "2.
|
|
91
|
-
"@tamagui/constants": "2.
|
|
92
|
-
"@tamagui/context-menu": "2.
|
|
93
|
-
"@tamagui/core": "2.
|
|
94
|
-
"@tamagui/create-context": "2.
|
|
95
|
-
"@tamagui/create-menu": "2.
|
|
96
|
-
"@tamagui/dialog": "2.
|
|
97
|
-
"@tamagui/element": "2.
|
|
98
|
-
"@tamagui/elements": "2.
|
|
99
|
-
"@tamagui/fake-react-native": "2.
|
|
100
|
-
"@tamagui/focusable": "2.
|
|
101
|
-
"@tamagui/form": "2.
|
|
102
|
-
"@tamagui/get-button-sized": "2.
|
|
103
|
-
"@tamagui/get-font-sized": "2.
|
|
104
|
-
"@tamagui/get-token": "2.
|
|
105
|
-
"@tamagui/group": "2.
|
|
106
|
-
"@tamagui/helpers-tamagui": "2.
|
|
107
|
-
"@tamagui/image": "2.
|
|
108
|
-
"@tamagui/input": "2.
|
|
109
|
-
"@tamagui/label": "2.
|
|
110
|
-
"@tamagui/linear-gradient": "2.
|
|
111
|
-
"@tamagui/list-item": "2.
|
|
112
|
-
"@tamagui/menu": "2.
|
|
113
|
-
"@tamagui/polyfill-dev": "2.
|
|
114
|
-
"@tamagui/popover": "2.
|
|
115
|
-
"@tamagui/popper": "2.
|
|
116
|
-
"@tamagui/portal": "2.
|
|
117
|
-
"@tamagui/progress": "2.
|
|
118
|
-
"@tamagui/radio-group": "2.
|
|
119
|
-
"@tamagui/react-native-media-driver": "2.
|
|
120
|
-
"@tamagui/scroll-view": "2.
|
|
121
|
-
"@tamagui/select": "2.
|
|
122
|
-
"@tamagui/separator": "2.
|
|
123
|
-
"@tamagui/shapes": "2.
|
|
124
|
-
"@tamagui/sheet": "2.
|
|
125
|
-
"@tamagui/slider": "2.
|
|
126
|
-
"@tamagui/spacer": "2.
|
|
127
|
-
"@tamagui/spinner": "2.
|
|
128
|
-
"@tamagui/stacks": "2.
|
|
129
|
-
"@tamagui/switch": "2.
|
|
130
|
-
"@tamagui/tabs": "2.
|
|
131
|
-
"@tamagui/text": "2.
|
|
132
|
-
"@tamagui/theme": "2.
|
|
133
|
-
"@tamagui/toast": "2.
|
|
134
|
-
"@tamagui/toggle-group": "2.
|
|
135
|
-
"@tamagui/tooltip": "2.
|
|
136
|
-
"@tamagui/use-controllable-state": "2.
|
|
137
|
-
"@tamagui/use-debounce": "2.
|
|
138
|
-
"@tamagui/use-force-update": "2.
|
|
139
|
-
"@tamagui/use-window-dimensions": "2.
|
|
140
|
-
"@tamagui/visually-hidden": "2.
|
|
141
|
-
"@tamagui/font-size": "2.
|
|
142
|
-
"@tamagui/z-index-stack": "2.
|
|
80
|
+
"@tamagui/accordion": "2.3.0",
|
|
81
|
+
"@tamagui/adapt": "2.3.0",
|
|
82
|
+
"@tamagui/alert-dialog": "2.3.0",
|
|
83
|
+
"@tamagui/animate": "2.3.0",
|
|
84
|
+
"@tamagui/animate-presence": "2.3.0",
|
|
85
|
+
"@tamagui/avatar": "2.3.0",
|
|
86
|
+
"@tamagui/button": "2.3.0",
|
|
87
|
+
"@tamagui/card": "2.3.0",
|
|
88
|
+
"@tamagui/checkbox": "2.3.0",
|
|
89
|
+
"@tamagui/collapsible": "2.3.0",
|
|
90
|
+
"@tamagui/compose-refs": "2.3.0",
|
|
91
|
+
"@tamagui/constants": "2.3.0",
|
|
92
|
+
"@tamagui/context-menu": "2.3.0",
|
|
93
|
+
"@tamagui/core": "2.3.0",
|
|
94
|
+
"@tamagui/create-context": "2.3.0",
|
|
95
|
+
"@tamagui/create-menu": "2.3.0",
|
|
96
|
+
"@tamagui/dialog": "2.3.0",
|
|
97
|
+
"@tamagui/element": "2.3.0",
|
|
98
|
+
"@tamagui/elements": "2.3.0",
|
|
99
|
+
"@tamagui/fake-react-native": "2.3.0",
|
|
100
|
+
"@tamagui/focusable": "2.3.0",
|
|
101
|
+
"@tamagui/form": "2.3.0",
|
|
102
|
+
"@tamagui/get-button-sized": "2.3.0",
|
|
103
|
+
"@tamagui/get-font-sized": "2.3.0",
|
|
104
|
+
"@tamagui/get-token": "2.3.0",
|
|
105
|
+
"@tamagui/group": "2.3.0",
|
|
106
|
+
"@tamagui/helpers-tamagui": "2.3.0",
|
|
107
|
+
"@tamagui/image": "2.3.0",
|
|
108
|
+
"@tamagui/input": "2.3.0",
|
|
109
|
+
"@tamagui/label": "2.3.0",
|
|
110
|
+
"@tamagui/linear-gradient": "2.3.0",
|
|
111
|
+
"@tamagui/list-item": "2.3.0",
|
|
112
|
+
"@tamagui/menu": "2.3.0",
|
|
113
|
+
"@tamagui/polyfill-dev": "2.3.0",
|
|
114
|
+
"@tamagui/popover": "2.3.0",
|
|
115
|
+
"@tamagui/popper": "2.3.0",
|
|
116
|
+
"@tamagui/portal": "2.3.0",
|
|
117
|
+
"@tamagui/progress": "2.3.0",
|
|
118
|
+
"@tamagui/radio-group": "2.3.0",
|
|
119
|
+
"@tamagui/react-native-media-driver": "2.3.0",
|
|
120
|
+
"@tamagui/scroll-view": "2.3.0",
|
|
121
|
+
"@tamagui/select": "2.3.0",
|
|
122
|
+
"@tamagui/separator": "2.3.0",
|
|
123
|
+
"@tamagui/shapes": "2.3.0",
|
|
124
|
+
"@tamagui/sheet": "2.3.0",
|
|
125
|
+
"@tamagui/slider": "2.3.0",
|
|
126
|
+
"@tamagui/spacer": "2.3.0",
|
|
127
|
+
"@tamagui/spinner": "2.3.0",
|
|
128
|
+
"@tamagui/stacks": "2.3.0",
|
|
129
|
+
"@tamagui/switch": "2.3.0",
|
|
130
|
+
"@tamagui/tabs": "2.3.0",
|
|
131
|
+
"@tamagui/text": "2.3.0",
|
|
132
|
+
"@tamagui/theme": "2.3.0",
|
|
133
|
+
"@tamagui/toast": "2.3.0",
|
|
134
|
+
"@tamagui/toggle-group": "2.3.0",
|
|
135
|
+
"@tamagui/tooltip": "2.3.0",
|
|
136
|
+
"@tamagui/use-controllable-state": "2.3.0",
|
|
137
|
+
"@tamagui/use-debounce": "2.3.0",
|
|
138
|
+
"@tamagui/use-force-update": "2.3.0",
|
|
139
|
+
"@tamagui/use-window-dimensions": "2.3.0",
|
|
140
|
+
"@tamagui/visually-hidden": "2.3.0",
|
|
141
|
+
"@tamagui/font-size": "2.3.0",
|
|
142
|
+
"@tamagui/z-index-stack": "2.3.0"
|
|
143
143
|
},
|
|
144
144
|
"devDependencies": {
|
|
145
|
-
"@tamagui/build": "2.
|
|
145
|
+
"@tamagui/build": "2.3.0",
|
|
146
146
|
"react": ">=19",
|
|
147
147
|
"react-native": "0.83.2",
|
|
148
148
|
"react-native-web": "^0.21.0"
|