tamagui 1.112.15 → 1.112.17
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 +16 -13
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +16 -13
- package/dist/test.native.js.map +1 -1
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -2139,6 +2139,9 @@ var require_config_native = __commonJS({
|
|
|
2139
2139
|
getConfig: function() {
|
|
2140
2140
|
return getConfig3;
|
|
2141
2141
|
},
|
|
2142
|
+
getConfigMaybe: function() {
|
|
2143
|
+
return getConfigMaybe;
|
|
2144
|
+
},
|
|
2142
2145
|
getFont: function() {
|
|
2143
2146
|
return getFont;
|
|
2144
2147
|
},
|
|
@@ -2207,6 +2210,8 @@ Haven't called createTamagui yet.
|
|
|
2207
2210
|
}, getConfig3 = function() {
|
|
2208
2211
|
if (!conf) throw new Error(process.env.NODE_ENV !== "production" ? "Missing tamagui config, you either have a duplicate config, or haven't set it up. Be sure createTamagui is called before rendering. Also, make sure all of your tamagui dependencies are on the same version (`tamagui`, `@tamagui/package-name`, etc.) not just in your package.json, but in your lockfile." : "Err0");
|
|
2209
2212
|
return conf;
|
|
2213
|
+
}, getConfigMaybe = function() {
|
|
2214
|
+
return conf;
|
|
2210
2215
|
}, tokensMerged;
|
|
2211
2216
|
function setTokens(_) {
|
|
2212
2217
|
tokensMerged = _;
|
|
@@ -4777,30 +4782,28 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
4777
4782
|
module2.exports = __toCommonJS2(createMediaStyle_exports);
|
|
4778
4783
|
var import_config = require_config_native(), import_useMedia = require_useMedia_native(), import_getGroupPropParts = require_getGroupPropParts_native(), MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMap = {
|
|
4779
4784
|
press: "active"
|
|
4780
|
-
},
|
|
4785
|
+
}, specificities = new Array(5).fill(0).map(function(_, i) {
|
|
4781
4786
|
return new Array(i).fill(":root").join("");
|
|
4782
4787
|
});
|
|
4783
4788
|
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.
|
|
4789
|
+
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
4790
|
return [
|
|
4786
4791
|
selector,
|
|
4787
|
-
`${presedencePrefix}${mediaSelector} ${selector.
|
|
4792
|
+
`${presedencePrefix}${mediaSelector} ${selector.replaceAll(":root", "")}`
|
|
4788
4793
|
];
|
|
4789
4794
|
}
|
|
4790
4795
|
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) {
|
|
4796
|
+
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
4797
|
return rule.replace(identifier, nextIdentifier);
|
|
4793
4798
|
}).join(";"), isHover = !1;
|
|
4794
4799
|
if (isNonWindowMedia) {
|
|
4795
4800
|
var specificity = (priority || 0) + (isGroup || isPlatform ? 1 : 0);
|
|
4796
4801
|
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]);
|
|
4802
|
+
var groupParts = (0, import_getGroupPropParts.getGroupPropParts)(isTheme ? "theme-" + mediaKeyIn : mediaKeyIn), { name, media, pseudo } = groupParts;
|
|
4803
|
+
groupMediaKey = media, isGroup && (containerName = name), (pseudo === "press" || pseudoIn === "active") && (specificity += 2), pseudo === "hover" && (isHover = !0);
|
|
4804
|
+
var [selector, nextSelector] = getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specificities[specificity]);
|
|
4802
4805
|
styleRule = styleInner.replace(selector, nextSelector);
|
|
4803
|
-
} else styleRule = `${
|
|
4806
|
+
} else styleRule = `${specificities[specificity]}${styleInner}`;
|
|
4804
4807
|
}
|
|
4805
4808
|
if (!isNonWindowMedia || groupMediaKey) {
|
|
4806
4809
|
if (!selectors) {
|
|
@@ -4819,7 +4822,7 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
4819
4822
|
}
|
|
4820
4823
|
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = `${screenStr}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
|
|
4821
4824
|
// this new array should be cached
|
|
4822
|
-
|
|
4825
|
+
specificities[priority]
|
|
4823
4826
|
) : (
|
|
4824
4827
|
// @ts-ignore
|
|
4825
4828
|
prefixes[mediaKey]
|
|
@@ -7116,7 +7119,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7116
7119
|
}
|
|
7117
7120
|
if (isMedia) {
|
|
7118
7121
|
if (!val) return "continue";
|
|
7119
|
-
var hasSpace = val.space, mediaKeyShort = key.slice(1);
|
|
7122
|
+
var hasSpace = val.space, mediaKeyShort = key.slice(isMedia == "theme" ? 7 : 1);
|
|
7120
7123
|
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
7124
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {
|
|
7122
7125
|
key,
|
|
@@ -7471,7 +7474,7 @@ current`, {
|
|
|
7471
7474
|
try {
|
|
7472
7475
|
for (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
7473
7476
|
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);
|
|
7477
|
+
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
7478
|
}
|
|
7476
7479
|
} catch (err) {
|
|
7477
7480
|
_didIteratorError = !0, _iteratorError = err;
|