tamagui 1.132.1-1752373919725 → 1.132.2
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.js +13 -14
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +13 -14
- package/dist/test.native.js.map +2 -2
- package/package.json +55 -55
package/dist/test.native.js
CHANGED
|
@@ -6529,7 +6529,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6529
6529
|
var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
6530
6530
|
for (var keyOg in props) _loop(keyOg);
|
|
6531
6531
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
6532
|
-
if (
|
|
6532
|
+
if (!avoidNormalize) {
|
|
6533
6533
|
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), !styleProps.noExpand && !styleProps.noMergeStyle && import_constants4.isWeb && (!isReactNative || !animationDriver.supportsCSS) && (0, import_getCSSStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
|
|
6534
6534
|
var _styleState;
|
|
6535
6535
|
(_styleState = styleState).style || (_styleState.style = {}), mergeFlatTransforms(styleState.style, styleState.flatTransforms);
|
|
@@ -8287,10 +8287,10 @@ var require_createComponent_native = __commonJS({
|
|
|
8287
8287
|
} : defaultProps, props = propsIn;
|
|
8288
8288
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
8289
8289
|
var componentName2 = props.componentName || staticConfig.componentName, componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContextParent = import_react3.default.useContext(import_GroupContext.GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, animationDriver, staticConfig, config), { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState;
|
|
8290
|
-
hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders
|
|
8290
|
+
if (hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8291
8291
|
var pendingState = NextState.get(stateRef);
|
|
8292
|
-
pendingState && (
|
|
8293
|
-
}
|
|
8292
|
+
pendingState && (NextState.set(stateRef, void 0), componentState.setStateShallow(pendingState));
|
|
8293
|
+
}
|
|
8294
8294
|
var allGroupContexts = (0, import_react3.useMemo)(function() {
|
|
8295
8295
|
var _stateRef_current_group;
|
|
8296
8296
|
if (!groupName || props.passThrough) return groupContextParent;
|
|
@@ -8377,31 +8377,30 @@ var require_createComponent_native = __commonJS({
|
|
|
8377
8377
|
}
|
|
8378
8378
|
}
|
|
8379
8379
|
if (splitStyles && (hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8380
|
-
var
|
|
8381
|
-
|
|
8382
|
-
NextMedia.set(stateRef, next), updateStyleListener();
|
|
8383
|
-
};
|
|
8384
|
-
var updateStyleListener = function() {
|
|
8380
|
+
var _componentContext, ogSetStateShallow = setStateShallow;
|
|
8381
|
+
stateRef.current.updateStyleListener = function() {
|
|
8385
8382
|
var updatedState = NextState.get(stateRef) || state, mediaState22 = NextMedia.get(stateRef), { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
8386
8383
|
groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
8387
8384
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState22 ? {
|
|
8388
8385
|
...styleProps,
|
|
8389
8386
|
mediaState: mediaState22
|
|
8390
|
-
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
8387
|
+
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), useStyleListener = stateRef.current.useStyleListener;
|
|
8391
8388
|
useStyleListener == null || useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
8392
|
-
}
|
|
8393
|
-
|
|
8389
|
+
}, (_componentContext = componentContext).mediaEmit || (_componentContext.mediaEmit = function(next) {
|
|
8390
|
+
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
8391
|
+
NextMedia.set(stateRef, next), (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
8392
|
+
}), stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
8394
8393
|
var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
8395
8394
|
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
8396
8395
|
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
8397
8396
|
return avoidReRenderKeys.has(key3);
|
|
8398
8397
|
});
|
|
8399
8398
|
if (canAvoidReRender) {
|
|
8400
|
-
var updatedState = {
|
|
8399
|
+
var _stateRef_current_updateStyleListener, _stateRef_current, updatedState = {
|
|
8401
8400
|
...prev,
|
|
8402
8401
|
...next
|
|
8403
8402
|
};
|
|
8404
|
-
NextState.set(stateRef, updatedState), updateStyleListener();
|
|
8403
|
+
NextState.set(stateRef, updatedState), (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
8405
8404
|
} else ogSetStateShallow(next);
|
|
8406
8405
|
}
|
|
8407
8406
|
}, setStateShallow = function(state2) {
|