tamagui 1.133.0 → 1.134.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.js +32 -19
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +25 -12
- package/dist/test.native.js.map +2 -2
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -3660,10 +3660,11 @@ var require_mergeProps_native = __commonJS({
|
|
|
3660
3660
|
};
|
|
3661
3661
|
function mergeProp(out, defaultProps, props, key) {
|
|
3662
3662
|
var val = props[key];
|
|
3663
|
-
defaultProps && key in defaultProps && (key in import_pseudoDescriptors.pseudoDescriptors || key[0] === "$") &&
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
}
|
|
3663
|
+
if (defaultProps && key in defaultProps && (key in import_pseudoDescriptors.pseudoDescriptors || key[0] === "$") && val && typeof val == "object") {
|
|
3664
|
+
var defaultVal = defaultProps[key];
|
|
3665
|
+
defaultVal && typeof defaultVal == "object" && (val = mergeProps(defaultVal, val));
|
|
3666
|
+
}
|
|
3667
|
+
out[key] = val;
|
|
3667
3668
|
}
|
|
3668
3669
|
}
|
|
3669
3670
|
});
|
|
@@ -6533,7 +6534,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6533
6534
|
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
6534
6535
|
var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
|
|
6535
6536
|
if ((0, import_propMapper.propMapper)(keyInit, valInit, styleState, disablePropMap, function(key4, val2) {
|
|
6536
|
-
var _parentStaticConfig_variants, isStyledContextProp =
|
|
6537
|
+
var _parentStaticConfig_variants, isStyledContextProp = styledContext && key4 in styledContext;
|
|
6537
6538
|
if (!isHOC && disablePropMap && !isStyledContextProp && !isMediaOrPseudo) {
|
|
6538
6539
|
viewProps[key4] = val2;
|
|
6539
6540
|
return;
|
|
@@ -6799,7 +6800,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6799
6800
|
}
|
|
6800
6801
|
}));
|
|
6801
6802
|
}
|
|
6802
|
-
process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug
|
|
6803
|
+
process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug === "verbose" && import_constants4.isClient && import_isDevTools.isDevTools && (console.groupCollapsed("\u{1F539} getSplitStyles \u{1F447}"), (0, import_log.log)({
|
|
6803
6804
|
props,
|
|
6804
6805
|
staticConfig,
|
|
6805
6806
|
shouldDoClasses,
|
|
@@ -6811,7 +6812,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6811
6812
|
...theme
|
|
6812
6813
|
}
|
|
6813
6814
|
}));
|
|
6814
|
-
var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
6815
|
+
var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand, styledContext } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
6815
6816
|
for (var keyOg in props) _loop(keyOg);
|
|
6816
6817
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-propsend`;
|
|
6817
6818
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
@@ -6892,7 +6893,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6892
6893
|
}
|
|
6893
6894
|
} else style2 && (viewProps.style = style2);
|
|
6894
6895
|
}
|
|
6895
|
-
if (process.env.NODE_ENV === "development" && debug
|
|
6896
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && import_constants4.isClient && import_isDevTools.isDevTools) {
|
|
6896
6897
|
console.groupEnd(), console.groupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
6897
6898
|
try {
|
|
6898
6899
|
var logs = {
|
|
@@ -7279,7 +7280,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7279
7280
|
var _keys_current, _props_needsUpdate, local = localStates.get(id), needsUpdate = props.passThrough ? !1 : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? !0 : HasRenderedOnce.get(keys) ? !(keys == null || (_keys_current = keys.current) === null || _keys_current === void 0) && _keys_current.size ? !0 : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : !0, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
|
|
7280
7281
|
return PendingUpdate.delete(id), (!local || rerender) && (local = {
|
|
7281
7282
|
...next
|
|
7282
|
-
}, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug
|
|
7283
|
+
}, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug === "verbose" && (console.groupCollapsed(` ${id} getSnapshot ${rerender}`, local.name, ">", next.name), console.info({
|
|
7283
7284
|
props,
|
|
7284
7285
|
propsKey,
|
|
7285
7286
|
isRoot,
|
|
@@ -7300,7 +7301,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7300
7301
|
HadTheme.get(keys) && scheduleUpdate(id), HadTheme.set(keys, !1);
|
|
7301
7302
|
return;
|
|
7302
7303
|
}
|
|
7303
|
-
if (process.env.NODE_ENV === "development" && props.debug
|
|
7304
|
+
if (process.env.NODE_ENV === "development" && props.debug === "verbose") {
|
|
7304
7305
|
var _states_get;
|
|
7305
7306
|
console.warn(` \xB7 useTheme(${id}) scheduleUpdate`, propsKey, (_states_get = states.get(id)) === null || _states_get === void 0 ? void 0 : _states_get.name);
|
|
7306
7307
|
}
|
|
@@ -7319,7 +7320,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7319
7320
|
];
|
|
7320
7321
|
themes || (themes = (0, import_config.getConfig)().themes);
|
|
7321
7322
|
var name = !propsKey && (!lastState || !(lastState != null && lastState.isNew)) ? null : getNewThemeName(parentState == null ? void 0 : parentState.name, props, pendingUpdate === "force" ? !0 : !!needsUpdate), isSameAsParent = parentState && (!name || name === parentState.name), shouldRerender = !!(needsUpdate && (pendingUpdate || (lastState == null ? void 0 : lastState.name) !== (parentState == null ? void 0 : parentState.name)));
|
|
7322
|
-
if (process.env.NODE_ENV === "development" && debug
|
|
7323
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
7323
7324
|
var message = ` \xB7 useTheme(${id}) getNextState => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
|
|
7324
7325
|
console.info(message);
|
|
7325
7326
|
}
|
|
@@ -7363,7 +7364,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7363
7364
|
nextState
|
|
7364
7365
|
];
|
|
7365
7366
|
var shouldAvoidRerender = pendingUpdate !== "force" && lastState && !needsUpdate && nextState.name === lastState.name;
|
|
7366
|
-
return process.env.NODE_ENV === "development" && debug
|
|
7367
|
+
return process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(` \xB7 useTheme(${id}) \u23ED\uFE0F ${name} shouldAvoidRerender: ${shouldAvoidRerender}`), console.info({
|
|
7367
7368
|
lastState,
|
|
7368
7369
|
needsUpdate,
|
|
7369
7370
|
nextState,
|
|
@@ -8240,7 +8241,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
8240
8241
|
if (!isHydrated) noClass = !1;
|
|
8241
8242
|
else if (import_constants4.isWeb && isHydrated) {
|
|
8242
8243
|
var isAnimatedAndHydrated = isAnimated && isHydrated, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
8243
|
-
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
8244
|
+
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0, process.env.NODE_ENV === "development" && props.debug === "verbose" && (0, import_log.log)("avoiding className", {
|
|
8244
8245
|
isAnimatedAndHydrated,
|
|
8245
8246
|
isDisabledManually,
|
|
8246
8247
|
isClassNameDisabled
|
|
@@ -8545,7 +8546,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8545
8546
|
var _propsIn_datatestrenders, _current, _;
|
|
8546
8547
|
(_ = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _ !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
|
|
8547
8548
|
}
|
|
8548
|
-
var { context, isReactNative } = staticConfig, styledContextValue = context ? import_react3.default.useContext(context) : void 0, overriddenContextProps = null
|
|
8549
|
+
var { context, isReactNative } = staticConfig, debugProp = propsIn.debug, styledContextValue = context ? import_react3.default.useContext(context) : void 0, overriddenContextProps = null;
|
|
8549
8550
|
if (0)
|
|
8550
8551
|
var timer;
|
|
8551
8552
|
process.env.NODE_ENV === "development" && time2 && time2`non-tamagui time (ignore)`;
|
|
@@ -8681,7 +8682,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8681
8682
|
isExiting,
|
|
8682
8683
|
isAnimated,
|
|
8683
8684
|
willBeAnimated,
|
|
8684
|
-
styledContext:
|
|
8685
|
+
styledContext: styledContextValue
|
|
8685
8686
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
8686
8687
|
process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
|
|
8687
8688
|
var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
|
|
@@ -24459,7 +24460,8 @@ var require_Popper_native = __commonJS({
|
|
|
24459
24460
|
update: context.update,
|
|
24460
24461
|
context: context.context,
|
|
24461
24462
|
getFloatingProps: context.getFloatingProps,
|
|
24462
|
-
getReferenceProps: context.getReferenceProps
|
|
24463
|
+
getReferenceProps: context.getReferenceProps,
|
|
24464
|
+
open: context.open
|
|
24463
24465
|
};
|
|
24464
24466
|
}
|
|
24465
24467
|
var checkFloating = {
|
|
@@ -24528,9 +24530,11 @@ var require_Popper_native = __commonJS({
|
|
|
24528
24530
|
arrowStyle: middlewareData.arrow,
|
|
24529
24531
|
onArrowSize: setArrowSize,
|
|
24530
24532
|
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
24533
|
+
open: !!open,
|
|
24531
24534
|
...floating
|
|
24532
24535
|
};
|
|
24533
24536
|
}, [
|
|
24537
|
+
open,
|
|
24534
24538
|
size2,
|
|
24535
24539
|
floating.x,
|
|
24536
24540
|
floating.y,
|
|
@@ -24602,7 +24606,7 @@ var require_Popper_native = __commonJS({
|
|
|
24602
24606
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
24603
24607
|
}
|
|
24604
24608
|
}), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24605
|
-
var { scope, enableAnimationForPositionChange, children, passThrough, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size2 } =
|
|
24609
|
+
var { scope, enableAnimationForPositionChange, children, passThrough, ...rest } = props, context = usePopperContext(scope), { strategy, placement, refs, x, y, getFloatingProps, size: size2, isPositioned } = context, contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), [needsMeasure, setNeedsMeasure] = React4.useState(enableAnimationForPositionChange);
|
|
24606
24610
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
24607
24611
|
needsMeasure && x && y && setNeedsMeasure(!1);
|
|
24608
24612
|
}, [
|
|
@@ -24611,7 +24615,16 @@ var require_Popper_native = __commonJS({
|
|
|
24611
24615
|
x,
|
|
24612
24616
|
y
|
|
24613
24617
|
]);
|
|
24614
|
-
var hide2 = x === 0 && y === 0,
|
|
24618
|
+
var hide2 = x === 0 && y === 0, disableAnimationProp = (
|
|
24619
|
+
// if they want to animate also when re-positioning allow it
|
|
24620
|
+
enableAnimationForPositionChange === "even-when-repositioning" ? needsMeasure : !isPositioned || needsMeasure
|
|
24621
|
+
), [disableAnimation, setDisableAnimation] = React4.useState(disableAnimationProp);
|
|
24622
|
+
React4.useEffect(function() {
|
|
24623
|
+
setDisableAnimation(disableAnimationProp);
|
|
24624
|
+
}, [
|
|
24625
|
+
disableAnimationProp
|
|
24626
|
+
]);
|
|
24627
|
+
var frameProps = {
|
|
24615
24628
|
ref: contentRefs,
|
|
24616
24629
|
x: x || 0,
|
|
24617
24630
|
y: y || 0,
|
|
@@ -24621,7 +24634,7 @@ var require_Popper_native = __commonJS({
|
|
|
24621
24634
|
opacity: 1,
|
|
24622
24635
|
...enableAnimationForPositionChange && {
|
|
24623
24636
|
animation: rest.animation,
|
|
24624
|
-
animateOnly:
|
|
24637
|
+
animateOnly: disableAnimation ? [] : rest.animateOnly,
|
|
24625
24638
|
// apply animation but disable it on initial render to avoid animating from 0 to the first position
|
|
24626
24639
|
animatePresence: !1
|
|
24627
24640
|
},
|