@tamagui/core 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 +6 -6
package/dist/test.native.js
CHANGED
|
@@ -4319,30 +4319,28 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
4319
4319
|
module2.exports = __toCommonJS2(createMediaStyle_exports);
|
|
4320
4320
|
var import_config = require_config_native(), import_useMedia = require_useMedia_native(), import_getGroupPropParts = require_getGroupPropParts_native(), MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMap = {
|
|
4321
4321
|
press: "active"
|
|
4322
|
-
},
|
|
4322
|
+
}, specificities = new Array(5).fill(0).map(function(_, i) {
|
|
4323
4323
|
return new Array(i).fill(":root").join("");
|
|
4324
4324
|
});
|
|
4325
4325
|
function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
|
|
4326
|
-
var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.
|
|
4326
|
+
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}`;
|
|
4327
4327
|
return [
|
|
4328
4328
|
selector,
|
|
4329
|
-
`${presedencePrefix}${mediaSelector} ${selector.
|
|
4329
|
+
`${presedencePrefix}${mediaSelector} ${selector.replaceAll(":root", "")}`
|
|
4330
4330
|
];
|
|
4331
4331
|
}
|
|
4332
4332
|
var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
|
|
4333
|
-
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) {
|
|
4333
|
+
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) {
|
|
4334
4334
|
return rule.replace(identifier, nextIdentifier);
|
|
4335
4335
|
}).join(";"), isHover = !1;
|
|
4336
4336
|
if (isNonWindowMedia) {
|
|
4337
4337
|
var specificity = (priority || 0) + (isGroup || isPlatform ? 1 : 0);
|
|
4338
4338
|
if (isTheme || isGroup) {
|
|
4339
|
-
var { name, media, pseudo } =
|
|
4340
|
-
groupMediaKey = media;
|
|
4341
|
-
var
|
|
4342
|
-
isGroup && (containerName = name), pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
|
|
4343
|
-
var [selector, nextSelector] = getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specifities[specificity]);
|
|
4339
|
+
var groupParts = (0, import_getGroupPropParts.getGroupPropParts)(isTheme ? "theme-" + mediaKeyIn : mediaKeyIn), { name, media, pseudo } = groupParts;
|
|
4340
|
+
groupMediaKey = media, isGroup && (containerName = name), (pseudo === "press" || pseudoIn === "active") && (specificity += 2), pseudo === "hover" && (isHover = !0);
|
|
4341
|
+
var [selector, nextSelector] = getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specificities[specificity]);
|
|
4344
4342
|
styleRule = styleInner.replace(selector, nextSelector);
|
|
4345
|
-
} else styleRule = `${
|
|
4343
|
+
} else styleRule = `${specificities[specificity]}${styleInner}`;
|
|
4346
4344
|
}
|
|
4347
4345
|
if (!isNonWindowMedia || groupMediaKey) {
|
|
4348
4346
|
if (!selectors) {
|
|
@@ -4361,7 +4359,7 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
4361
4359
|
}
|
|
4362
4360
|
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = `${screenStr}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
|
|
4363
4361
|
// this new array should be cached
|
|
4364
|
-
|
|
4362
|
+
specificities[priority]
|
|
4365
4363
|
) : (
|
|
4366
4364
|
// @ts-ignore
|
|
4367
4365
|
prefixes[mediaKey]
|
|
@@ -6595,7 +6593,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6595
6593
|
}
|
|
6596
6594
|
if (isMedia) {
|
|
6597
6595
|
if (!val) return "continue";
|
|
6598
|
-
var hasSpace = val.space, mediaKeyShort = key.slice(1);
|
|
6596
|
+
var hasSpace = val.space, mediaKeyShort = key.slice(isMedia == "theme" ? 7 : 1);
|
|
6599
6597
|
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (typeof hasMedia != "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !(0, import_isActivePlatform.isActivePlatform)(key)) return "continue";
|
|
6600
6598
|
if (shouldDoClasses) {
|
|
6601
6599
|
var mediaStyle = getSubStyle(styleState, key, val, !1);
|
|
@@ -6880,7 +6878,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6880
6878
|
try {
|
|
6881
6879
|
for (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
6882
6880
|
var [skey, sval] = _step.value;
|
|
6883
|
-
!avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
|
|
6881
|
+
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);
|
|
6884
6882
|
}
|
|
6885
6883
|
} catch (err) {
|
|
6886
6884
|
_didIteratorError = !0, _iteratorError = err;
|