@tamagui/core 1.105.5 → 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 +6 -6
package/dist/test.native.js
CHANGED
|
@@ -4989,18 +4989,22 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
4989
4989
|
}
|
|
4990
4990
|
var MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMap = {
|
|
4991
4991
|
press: "active"
|
|
4992
|
-
},
|
|
4993
|
-
|
|
4992
|
+
}, specifities = new Array(5).fill(0).map(function(_, i) {
|
|
4993
|
+
return new Array(i).fill(":root").join("");
|
|
4994
|
+
}), createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
|
|
4995
|
+
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) {
|
|
4994
4996
|
return rule.replace(identifier, nextIdentifier);
|
|
4995
|
-
}).join(";");
|
|
4997
|
+
}).join(";"), isHover = !1;
|
|
4996
4998
|
if (isNonWindowMedia) {
|
|
4997
|
-
var
|
|
4999
|
+
var specificity = (priority || 0) + (isGroup ? 1 : 0);
|
|
4998
5000
|
if (isTheme || isGroup) {
|
|
4999
|
-
var
|
|
5000
|
-
groupMediaKey =
|
|
5001
|
-
var
|
|
5001
|
+
var _getGroupPropParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), name = _getGroupPropParts.name, media = _getGroupPropParts.media, pseudo = _getGroupPropParts.pseudo;
|
|
5002
|
+
groupMediaKey = media, isGroup && (containerName = name);
|
|
5003
|
+
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;
|
|
5004
|
+
pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
|
|
5005
|
+
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", ""));
|
|
5002
5006
|
styleRule = styleInner.replace(selector, nextSelector);
|
|
5003
|
-
} else styleRule = "".concat(
|
|
5007
|
+
} else styleRule = "".concat(specifities[specificity]).concat(styleInner);
|
|
5004
5008
|
}
|
|
5005
5009
|
if (!isNonWindowMedia || groupMediaKey) {
|
|
5006
5010
|
if (!selectors) {
|
|
@@ -5017,16 +5021,16 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
5017
5021
|
];
|
|
5018
5022
|
})));
|
|
5019
5023
|
}
|
|
5020
|
-
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector1 = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector1),
|
|
5024
|
+
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector1 = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector1), precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
|
|
5021
5025
|
// this new array should be cached
|
|
5022
|
-
|
|
5026
|
+
specifities[priority]
|
|
5023
5027
|
) : (
|
|
5024
5028
|
// @ts-ignore
|
|
5025
5029
|
prefixes[mediaKey]
|
|
5026
5030
|
), prefix = groupMediaKey ? "@container ".concat(containerName) : "@media";
|
|
5027
|
-
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", " and ".concat(mediaQuery, " {")).replace("and screen and", "and") : styleRule = "".concat(prefix, " ").concat(mediaQuery, "{").concat(
|
|
5031
|
+
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, "}"));
|
|
5028
5032
|
}
|
|
5029
|
-
return [
|
|
5033
|
+
return isHover && (styleRule = "@media (hover:hover){".concat(styleRule, "}")), [
|
|
5030
5034
|
property,
|
|
5031
5035
|
void 0,
|
|
5032
5036
|
nextIdentifier,
|
|
@@ -10750,7 +10754,7 @@ var require_styled_native = __commonJS({
|
|
|
10750
10754
|
}
|
|
10751
10755
|
}
|
|
10752
10756
|
(parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps = _object_spread2({}, parentDefaultProps, parentDefaultVariants, defaultProps, defaultVariants)), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
10753
|
-
var isText = !!(staticExtractionOptions != null && staticExtractionOptions.isText || parentStaticConfig != null && parentStaticConfig.isText), acceptsClassName = acceptsClassNameProp
|
|
10757
|
+
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_props(_object_spread2(_object_spread_props(_object_spread2({}, parentStaticConfig, staticExtractionOptions, !isPlainStyledComponent && {
|
|
10754
10758
|
Component
|
|
10755
10759
|
}), {
|
|
10756
10760
|
// @ts-expect-error
|