@tamagui/core 1.127.1 → 1.127.3
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 +19 -14
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +18 -13
- package/dist/test.native.js.map +1 -1
- package/package.json +8 -7
package/dist/native.js
CHANGED
|
@@ -1049,7 +1049,6 @@ var require_constants_native2 = __commonJS({
|
|
|
1049
1049
|
alignItems: "stretch",
|
|
1050
1050
|
flexDirection: "column",
|
|
1051
1051
|
flexBasis: "auto",
|
|
1052
|
-
// @ts-expect-error
|
|
1053
1052
|
boxSizing: "border-box",
|
|
1054
1053
|
position: process.env.TAMAGUI_POSITION_STATIC === "1" ? "static" : "relative",
|
|
1055
1054
|
minHeight: 0,
|
|
@@ -5306,7 +5305,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5306
5305
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
5307
5306
|
return key in validStyles2 ? !0 : accept && key in accept;
|
|
5308
5307
|
}
|
|
5309
|
-
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles,
|
|
5308
|
+
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, elementType, startedUnhydrated, debug) {
|
|
5310
5309
|
var _loop = function(keyOg2) {
|
|
5311
5310
|
var keyInit = keyOg2, valInit = props[keyInit];
|
|
5312
5311
|
if (keyInit === "children") return viewProps[keyInit] = valInit, "continue";
|
|
@@ -5340,7 +5339,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5340
5339
|
parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
|
|
5341
5340
|
) {
|
|
5342
5341
|
var name2 = parts[1];
|
|
5343
|
-
|
|
5342
|
+
componentContext != null && componentContext.groups.subscribe && !(componentContext != null && componentContext.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
5344
5343
|
}
|
|
5345
5344
|
}
|
|
5346
5345
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
@@ -5528,7 +5527,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5528
5527
|
}
|
|
5529
5528
|
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
5530
5529
|
} else if (isGroupMedia) {
|
|
5531
|
-
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext =
|
|
5530
|
+
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = componentContext == null ? void 0 : componentContext.groups.state[groupName];
|
|
5532
5531
|
if (!groupContext) {
|
|
5533
5532
|
process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
|
|
5534
5533
|
return;
|
|
@@ -5546,7 +5545,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5546
5545
|
if (groupPseudoKey) {
|
|
5547
5546
|
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
5548
5547
|
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
5549
|
-
|
|
5548
|
+
componentContext.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
5550
5549
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`), !isActive1) {
|
|
5551
5550
|
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
5552
5551
|
return;
|
|
@@ -5584,7 +5583,9 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5584
5583
|
(0, import_consoleLog.groupEnd)();
|
|
5585
5584
|
}
|
|
5586
5585
|
};
|
|
5587
|
-
conf = conf || (0, import_config.getConfig)()
|
|
5586
|
+
conf = conf || (0, import_config.getConfig)();
|
|
5587
|
+
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
5588
|
+
import_constants2.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
5588
5589
|
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants2.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles);
|
|
5589
5590
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
|
|
5590
5591
|
var styleState = {
|
|
@@ -5598,7 +5599,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5598
5599
|
theme,
|
|
5599
5600
|
usedKeys,
|
|
5600
5601
|
viewProps,
|
|
5601
|
-
context,
|
|
5602
|
+
context: componentContext,
|
|
5602
5603
|
debug
|
|
5603
5604
|
};
|
|
5604
5605
|
if (process.env.IS_STATIC === "is_static") {
|
|
@@ -5692,7 +5693,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5692
5693
|
var style2 = styleState.style;
|
|
5693
5694
|
if (0) {
|
|
5694
5695
|
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
5695
|
-
if (!(styleProps.isAnimated && !
|
|
5696
|
+
if (!(styleProps.isAnimated && !animationDriver.supportsCSSVars && isReactNative) && isReactNative) {
|
|
5696
5697
|
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
5697
5698
|
try {
|
|
5698
5699
|
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
|
|
@@ -7109,8 +7110,12 @@ var require_useComponentState_native = __commonJS({
|
|
|
7109
7110
|
});
|
|
7110
7111
|
},
|
|
7111
7112
|
subscribe(cb) {
|
|
7112
|
-
return listeners.add(cb),
|
|
7113
|
-
|
|
7113
|
+
return listeners.add(cb), setStateShallow({
|
|
7114
|
+
hasDynGroupChildren: !0
|
|
7115
|
+
}), function() {
|
|
7116
|
+
listeners.delete(cb), listeners.size === 0 && setStateShallow({
|
|
7117
|
+
hasDynGroupChildren: !1
|
|
7118
|
+
});
|
|
7114
7119
|
};
|
|
7115
7120
|
}
|
|
7116
7121
|
};
|
|
@@ -7442,7 +7447,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7442
7447
|
}
|
|
7443
7448
|
var componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
|
|
7444
7449
|
if (context && (contextValue = import_react3.default.useContext(context), contextValue)) {
|
|
7445
|
-
process.env.NODE_ENV === "development" && (
|
|
7450
|
+
process.env.NODE_ENV === "development" && (propsIn == null ? void 0 : propsIn.debug) === "verbose" && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
|
|
7446
7451
|
for (var key in context.props) {
|
|
7447
7452
|
var propVal = (0, import_getShorthandValue.getShorthandValue)(propsIn, key);
|
|
7448
7453
|
if (propVal === void 0) {
|
|
@@ -7609,7 +7614,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7609
7614
|
` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
|
|
7610
7615
|
}), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
|
|
7611
7616
|
var { pseudoGroups, mediaGroups } = splitStyles, unPress = function() {
|
|
7612
|
-
|
|
7617
|
+
setStateShallow({
|
|
7613
7618
|
press: !1,
|
|
7614
7619
|
pressIn: !1
|
|
7615
7620
|
});
|
|
@@ -7686,7 +7691,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7686
7691
|
groupName,
|
|
7687
7692
|
state
|
|
7688
7693
|
]);
|
|
7689
|
-
var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState),
|
|
7694
|
+
var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), hasDynamicGroupChildren = !!(groupName && state.hasDynGroupChildren), attachPress = !!(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(hasDynamicGroupChildren || runtimeHoverStyle), attachHover = import_constants2.isWeb && !!(hasDynamicGroupChildren || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(hasDynamicGroupChildren || runtimePressStyle);
|
|
7690
7695
|
process.env.NODE_ENV === "development" && time2 && time2`events-setup`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("\u{1FAA9} events()", {
|
|
7691
7696
|
runtimeFocusStyle,
|
|
7692
7697
|
runtimePressStyle,
|
|
@@ -7714,7 +7719,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7714
7719
|
}
|
|
7715
7720
|
},
|
|
7716
7721
|
onPressIn: attachPress ? function(e) {
|
|
7717
|
-
|
|
7722
|
+
needsPressState && setStateShallow({
|
|
7718
7723
|
press: !0,
|
|
7719
7724
|
pressIn: !0
|
|
7720
7725
|
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants2.isWeb && componentSetStates.add(setState);
|