@tamagui/core 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 +10 -10
package/dist/test.native.js
CHANGED
|
@@ -5426,7 +5426,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5426
5426
|
var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
5427
5427
|
for (var keyOg in props) _loop(keyOg);
|
|
5428
5428
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
5429
|
-
if (
|
|
5429
|
+
if (!avoidNormalize) {
|
|
5430
5430
|
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), !styleProps.noExpand && !styleProps.noMergeStyle && import_constants.isWeb && (!isReactNative || !animationDriver.supportsCSS) && (0, import_getCSSStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
|
|
5431
5431
|
var _styleState;
|
|
5432
5432
|
(_styleState = styleState).style || (_styleState.style = {}), mergeFlatTransforms(styleState.style, styleState.flatTransforms);
|
|
@@ -7184,10 +7184,10 @@ var require_createComponent_native = __commonJS({
|
|
|
7184
7184
|
} : defaultProps, props = propsIn;
|
|
7185
7185
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
7186
7186
|
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;
|
|
7187
|
-
hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders
|
|
7187
|
+
if (hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders) {
|
|
7188
7188
|
var pendingState = NextState.get(stateRef);
|
|
7189
|
-
pendingState && (
|
|
7190
|
-
}
|
|
7189
|
+
pendingState && (NextState.set(stateRef, void 0), componentState.setStateShallow(pendingState));
|
|
7190
|
+
}
|
|
7191
7191
|
var allGroupContexts = (0, import_react3.useMemo)(function() {
|
|
7192
7192
|
var _stateRef_current_group;
|
|
7193
7193
|
if (!groupName || props.passThrough) return groupContextParent;
|
|
@@ -7274,31 +7274,30 @@ var require_createComponent_native = __commonJS({
|
|
|
7274
7274
|
}
|
|
7275
7275
|
}
|
|
7276
7276
|
if (splitStyles && (hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
7277
|
-
var
|
|
7278
|
-
|
|
7279
|
-
NextMedia.set(stateRef, next), updateStyleListener();
|
|
7280
|
-
};
|
|
7281
|
-
var updateStyleListener = function() {
|
|
7277
|
+
var _componentContext, ogSetStateShallow = setStateShallow;
|
|
7278
|
+
stateRef.current.updateStyleListener = function() {
|
|
7282
7279
|
var updatedState = NextState.get(stateRef) || state, mediaState22 = NextMedia.get(stateRef), { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
7283
7280
|
groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
7284
7281
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState22 ? {
|
|
7285
7282
|
...styleProps,
|
|
7286
7283
|
mediaState: mediaState22
|
|
7287
|
-
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
7284
|
+
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), useStyleListener = stateRef.current.useStyleListener;
|
|
7288
7285
|
useStyleListener == null || useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
7289
|
-
}
|
|
7290
|
-
|
|
7286
|
+
}, (_componentContext = componentContext).mediaEmit || (_componentContext.mediaEmit = function(next) {
|
|
7287
|
+
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
7288
|
+
NextMedia.set(stateRef, next), (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
7289
|
+
}), stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
7291
7290
|
var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
7292
7291
|
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
7293
7292
|
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
7294
7293
|
return avoidReRenderKeys.has(key3);
|
|
7295
7294
|
});
|
|
7296
7295
|
if (canAvoidReRender) {
|
|
7297
|
-
var updatedState = {
|
|
7296
|
+
var _stateRef_current_updateStyleListener, _stateRef_current, updatedState = {
|
|
7298
7297
|
...prev,
|
|
7299
7298
|
...next
|
|
7300
7299
|
};
|
|
7301
|
-
NextState.set(stateRef, updatedState), updateStyleListener();
|
|
7300
|
+
NextState.set(stateRef, updatedState), (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
7302
7301
|
} else ogSetStateShallow(next);
|
|
7303
7302
|
}
|
|
7304
7303
|
}, setStateShallow = function(state2) {
|