tamagui 1.105.4 → 1.105.6
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 +22 -14
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +17 -13
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -5433,18 +5433,22 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
5433
5433
|
}
|
|
5434
5434
|
var MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMap = {
|
|
5435
5435
|
press: "active"
|
|
5436
|
-
},
|
|
5437
|
-
|
|
5436
|
+
}, specifities = new Array(5).fill(0).map(function(_, i) {
|
|
5437
|
+
return new Array(i).fill(":root").join("");
|
|
5438
|
+
}), createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
|
|
5439
|
+
var _styleObject = _sliced_to_array(styleObject, 5), property = _styleObject[0], _value = _styleObject[1], identifier = _styleObject[2], _pseudo = _styleObject[3], rules = _styleObject[4], conf = (0, import_config.getConfig)(), enableMediaPropOrder = conf.settings.mediaPropOrder, isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = "".concat(ogPrefix).concat(MEDIA_SEP).concat(mediaKeyIn.replace("-", "")).concat(negKey).concat(MEDIA_SEP), styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map(function(rule) {
|
|
5438
5440
|
return rule.replace(identifier, nextIdentifier);
|
|
5439
|
-
}).join(";");
|
|
5441
|
+
}).join(";"), isHover = !1;
|
|
5440
5442
|
if (isNonWindowMedia) {
|
|
5441
|
-
var
|
|
5443
|
+
var specificity = (priority || 0) + (isGroup ? 1 : 0);
|
|
5442
5444
|
if (isTheme || isGroup) {
|
|
5443
|
-
var
|
|
5444
|
-
groupMediaKey =
|
|
5445
|
-
var
|
|
5445
|
+
var _getGroupPropParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), name = _getGroupPropParts.name, media = _getGroupPropParts.media, pseudo = _getGroupPropParts.pseudo;
|
|
5446
|
+
groupMediaKey = media, isGroup && (containerName = name);
|
|
5447
|
+
var groupClassName = (isGroup ? "group_" : "") + name, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = (0, import_config.getSetting)("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = pseudo ? groupPseudoToPseudoCSSMap[pseudo] || pseudo : void 0;
|
|
5448
|
+
pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
|
|
5449
|
+
var pseudoSelector = pseudoSelectorName ? ":".concat(pseudoSelectorName) : "", presedencePrefix = ":root".concat(specifities[specificity]).concat(precedenceSpace), mediaSelector = ".t_".concat(groupClassName).concat(pseudoSelector), nextSelector = "".concat(presedencePrefix).concat(mediaSelector, " ").concat(selector.replace(":root", ""));
|
|
5446
5450
|
styleRule = styleInner.replace(selector, nextSelector);
|
|
5447
|
-
} else styleRule = "".concat(
|
|
5451
|
+
} else styleRule = "".concat(specifities[specificity]).concat(styleInner);
|
|
5448
5452
|
}
|
|
5449
5453
|
if (!isNonWindowMedia || groupMediaKey) {
|
|
5450
5454
|
if (!selectors) {
|
|
@@ -5461,16 +5465,16 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
5461
5465
|
];
|
|
5462
5466
|
})));
|
|
5463
5467
|
}
|
|
5464
|
-
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector1 = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector1),
|
|
5468
|
+
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector1 = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector1), precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
|
|
5465
5469
|
// this new array should be cached
|
|
5466
|
-
|
|
5470
|
+
specifities[priority]
|
|
5467
5471
|
) : (
|
|
5468
5472
|
// @ts-ignore
|
|
5469
5473
|
prefixes[mediaKey]
|
|
5470
5474
|
), prefix = groupMediaKey ? "@container ".concat(containerName) : "@media";
|
|
5471
|
-
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", " and ".concat(mediaQuery, " {")).replace("and screen and", "and") : styleRule = "".concat(prefix, " ").concat(mediaQuery, "{").concat(
|
|
5475
|
+
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", " and ".concat(mediaQuery, " {")).replace("and screen and", "and") : styleRule = "".concat(prefix, " ").concat(mediaQuery, "{").concat(precedenceImportancePrefix).concat(styleInner, "}"), groupMediaKey && (styleRule = "@supports (contain: ".concat(conf.settings.webContainerType || "inline-size", ") {").concat(styleRule, "}"));
|
|
5472
5476
|
}
|
|
5473
|
-
return [
|
|
5477
|
+
return isHover && (styleRule = "@media (hover:hover){".concat(styleRule, "}")), [
|
|
5474
5478
|
property,
|
|
5475
5479
|
void 0,
|
|
5476
5480
|
nextIdentifier,
|
|
@@ -9639,7 +9643,11 @@ var require_createComponent_native = __commonJS({
|
|
|
9639
9643
|
var shouldAvoidClasses = !import_constants4.isWeb;
|
|
9640
9644
|
if (import_constants4.isWeb) {
|
|
9641
9645
|
var disableClassName = props.disableClassName, isAnimatedAndHydrated = isAnimated && !supportsCSSVars && didHydrateOnce && !import_constants4.isServer, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || didHydrateOnce), isDisabledManually = disableClassName && !import_constants4.isServer && didHydrateOnce && state.unmounted === !0;
|
|
9642
|
-
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (shouldAvoidClasses = !0)
|
|
9646
|
+
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (shouldAvoidClasses = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
9647
|
+
isAnimatedAndHydrated,
|
|
9648
|
+
isDisabledManually,
|
|
9649
|
+
isClassNameDisabled
|
|
9650
|
+
}));
|
|
9643
9651
|
}
|
|
9644
9652
|
var groupName = props.group;
|
|
9645
9653
|
if (groupName && !curStateRef.group) {
|
|
@@ -11673,7 +11681,7 @@ var require_styled_native = __commonJS({
|
|
|
11673
11681
|
}
|
|
11674
11682
|
}
|
|
11675
11683
|
(parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps = _object_spread9({}, parentDefaultProps, parentDefaultVariants, defaultProps, defaultVariants)), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
11676
|
-
var isText = !!(staticExtractionOptions != null && staticExtractionOptions.isText || parentStaticConfig != null && parentStaticConfig.isText), acceptsClassName = acceptsClassNameProp
|
|
11684
|
+
var isText = !!(staticExtractionOptions != null && staticExtractionOptions.isText || parentStaticConfig != null && parentStaticConfig.isText), _staticExtractionOptions_acceptsClassName, _ref, acceptsClassName = (_ref = (_staticExtractionOptions_acceptsClassName = staticExtractionOptions == null ? void 0 : staticExtractionOptions.acceptsClassName) !== null && _staticExtractionOptions_acceptsClassName !== void 0 ? _staticExtractionOptions_acceptsClassName : acceptsClassNameProp) !== null && _ref !== void 0 ? _ref : isPlainStyledComponent || isReactNative || (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig == null ? void 0 : parentStaticConfig.acceptsClassName), conf = _object_spread_props8(_object_spread9(_object_spread_props8(_object_spread9({}, parentStaticConfig, staticExtractionOptions, !isPlainStyledComponent && {
|
|
11677
11685
|
Component
|
|
11678
11686
|
}), {
|
|
11679
11687
|
// @ts-expect-error
|