tamagui 1.112.14 → 1.112.16
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 +11 -13
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +11 -13
- package/dist/test.native.js.map +1 -1
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -4777,30 +4777,28 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
4777
4777
|
module2.exports = __toCommonJS2(createMediaStyle_exports);
|
|
4778
4778
|
var import_config = require_config_native(), import_useMedia = require_useMedia_native(), import_getGroupPropParts = require_getGroupPropParts_native(), MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMap = {
|
|
4779
4779
|
press: "active"
|
|
4780
|
-
},
|
|
4780
|
+
}, specificities = new Array(5).fill(0).map(function(_, i) {
|
|
4781
4781
|
return new Array(i).fill(":root").join("");
|
|
4782
4782
|
});
|
|
4783
4783
|
function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
|
|
4784
|
-
var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.
|
|
4784
|
+
var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.lastIndexOf(":root") + 5, selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = (0, import_config.getSetting)("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = groupParts.pseudo ? groupPseudoToPseudoCSSMap[groupParts.pseudo] || groupParts.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${isGroup ? "group_" : ""}${name}${pseudoSelector}`;
|
|
4785
4785
|
return [
|
|
4786
4786
|
selector,
|
|
4787
|
-
`${presedencePrefix}${mediaSelector} ${selector.
|
|
4787
|
+
`${presedencePrefix}${mediaSelector} ${selector.replaceAll(":root", "")}`
|
|
4788
4788
|
];
|
|
4789
4789
|
}
|
|
4790
4790
|
var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
|
|
4791
|
-
var [property, , identifier, , rules] = styleObject, enableMediaPropOrder = (0, import_config.getSetting)("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 = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`, styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map(function(rule) {
|
|
4791
|
+
var [property, , identifier, pseudoIn, rules] = styleObject, enableMediaPropOrder = (0, import_config.getSetting)("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 = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`, styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map(function(rule) {
|
|
4792
4792
|
return rule.replace(identifier, nextIdentifier);
|
|
4793
4793
|
}).join(";"), isHover = !1;
|
|
4794
4794
|
if (isNonWindowMedia) {
|
|
4795
4795
|
var specificity = (priority || 0) + (isGroup || isPlatform ? 1 : 0);
|
|
4796
4796
|
if (isTheme || isGroup) {
|
|
4797
|
-
var { name, media, pseudo } =
|
|
4798
|
-
groupMediaKey = media;
|
|
4799
|
-
var
|
|
4800
|
-
isGroup && (containerName = name), pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
|
|
4801
|
-
var [selector, nextSelector] = getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specifities[specificity]);
|
|
4797
|
+
var groupParts = (0, import_getGroupPropParts.getGroupPropParts)(isTheme ? "theme-" + mediaKeyIn : mediaKeyIn), { name, media, pseudo } = groupParts;
|
|
4798
|
+
groupMediaKey = media, isGroup && (containerName = name), (pseudo === "press" || pseudoIn === "active") && (specificity += 2), pseudo === "hover" && (isHover = !0);
|
|
4799
|
+
var [selector, nextSelector] = getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specificities[specificity]);
|
|
4802
4800
|
styleRule = styleInner.replace(selector, nextSelector);
|
|
4803
|
-
} else styleRule = `${
|
|
4801
|
+
} else styleRule = `${specificities[specificity]}${styleInner}`;
|
|
4804
4802
|
}
|
|
4805
4803
|
if (!isNonWindowMedia || groupMediaKey) {
|
|
4806
4804
|
if (!selectors) {
|
|
@@ -4819,7 +4817,7 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
4819
4817
|
}
|
|
4820
4818
|
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = `${screenStr}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
|
|
4821
4819
|
// this new array should be cached
|
|
4822
|
-
|
|
4820
|
+
specificities[priority]
|
|
4823
4821
|
) : (
|
|
4824
4822
|
// @ts-ignore
|
|
4825
4823
|
prefixes[mediaKey]
|
|
@@ -7116,7 +7114,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7116
7114
|
}
|
|
7117
7115
|
if (isMedia) {
|
|
7118
7116
|
if (!val) return "continue";
|
|
7119
|
-
var hasSpace = val.space, mediaKeyShort = key.slice(1);
|
|
7117
|
+
var hasSpace = val.space, mediaKeyShort = key.slice(isMedia == "theme" ? 7 : 1);
|
|
7120
7118
|
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (typeof hasMedia != "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !(0, import_isActivePlatform.isActivePlatform)(key)) return "continue";
|
|
7121
7119
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {
|
|
7122
7120
|
key,
|
|
@@ -7471,7 +7469,7 @@ current`, {
|
|
|
7471
7469
|
try {
|
|
7472
7470
|
for (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
7473
7471
|
var [skey, sval] = _step.value;
|
|
7474
|
-
!avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
|
|
7472
|
+
skey in import_helpers.validPseudoKeys && (sval = getSubStyle(styleState, skey, sval, avoidMergeTransform)), !avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
|
|
7475
7473
|
}
|
|
7476
7474
|
} catch (err) {
|
|
7477
7475
|
_didIteratorError = !0, _iteratorError = err;
|