@tamagui/core 1.106.0 → 1.108.0
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 +376 -328
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +312 -253
- package/dist/test.native.js.map +3 -3
- package/package.json +6 -6
package/dist/test.native.js
CHANGED
|
@@ -5002,18 +5002,26 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
5002
5002
|
press: "active"
|
|
5003
5003
|
}, specifities = new Array(5).fill(0).map(function(_, i) {
|
|
5004
5004
|
return new Array(i).fill(":root").join("");
|
|
5005
|
-
})
|
|
5006
|
-
|
|
5005
|
+
});
|
|
5006
|
+
function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
|
|
5007
|
+
var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.indexOf(":root"), 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 ? ":".concat(pseudoSelectorName) : "", presedencePrefix = ":root".concat(precedenceImportancePrefix).concat(precedenceSpace), mediaSelector = ".t_".concat(isGroup ? "group_" : "").concat(name).concat(pseudoSelector);
|
|
5008
|
+
return [
|
|
5009
|
+
selector,
|
|
5010
|
+
"".concat(presedencePrefix).concat(mediaSelector, " ").concat(selector.replace(":root", ""))
|
|
5011
|
+
];
|
|
5012
|
+
}
|
|
5013
|
+
var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
|
|
5014
|
+
var _styleObject = _sliced_to_array(styleObject, 5), property = _styleObject[0], identifier = _styleObject[2], rules = _styleObject[4], 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 = "".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) {
|
|
5007
5015
|
return rule.replace(identifier, nextIdentifier);
|
|
5008
5016
|
}).join(";"), isHover = !1;
|
|
5009
5017
|
if (isNonWindowMedia) {
|
|
5010
|
-
var specificity = (priority || 0) + (isGroup ? 1 : 0);
|
|
5018
|
+
var specificity = (priority || 0) + (isGroup || isPlatform ? 1 : 0);
|
|
5011
5019
|
if (isTheme || isGroup) {
|
|
5012
5020
|
var _getGroupPropParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), name = _getGroupPropParts.name, media = _getGroupPropParts.media, pseudo = _getGroupPropParts.pseudo;
|
|
5013
|
-
groupMediaKey = media
|
|
5014
|
-
var
|
|
5015
|
-
pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
|
|
5016
|
-
var
|
|
5021
|
+
groupMediaKey = media;
|
|
5022
|
+
var groupParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn);
|
|
5023
|
+
isGroup && (containerName = name), pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
|
|
5024
|
+
var _getThemeOrGroupSelector = _sliced_to_array(getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specifities[specificity]), 2), selector = _getThemeOrGroupSelector[0], nextSelector = _getThemeOrGroupSelector[1];
|
|
5017
5025
|
styleRule = styleInner.replace(selector, nextSelector);
|
|
5018
5026
|
} else styleRule = "".concat(specifities[specificity]).concat(styleInner);
|
|
5019
5027
|
}
|
|
@@ -5032,14 +5040,14 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
5032
5040
|
];
|
|
5033
5041
|
})));
|
|
5034
5042
|
}
|
|
5035
|
-
var mediaKey = groupMediaKey || mediaKeyIn,
|
|
5043
|
+
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector), precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
|
|
5036
5044
|
// this new array should be cached
|
|
5037
5045
|
specifities[priority]
|
|
5038
5046
|
) : (
|
|
5039
5047
|
// @ts-ignore
|
|
5040
5048
|
prefixes[mediaKey]
|
|
5041
5049
|
), prefix = groupMediaKey ? "@container ".concat(containerName) : "@media";
|
|
5042
|
-
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(
|
|
5050
|
+
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((0, import_config.getSetting)("webContainerType") || "inline-size", ") {").concat(styleRule, "}"));
|
|
5043
5051
|
}
|
|
5044
5052
|
return isHover && (styleRule = "@media (hover:hover){".concat(styleRule, "}")), [
|
|
5045
5053
|
property,
|
|
@@ -7289,6 +7297,65 @@ var require_transformsToString_native = __commonJS({
|
|
|
7289
7297
|
}
|
|
7290
7298
|
});
|
|
7291
7299
|
|
|
7300
|
+
// ../web/dist/cjs/helpers/isActivePlatform.native.js
|
|
7301
|
+
var require_isActivePlatform_native = __commonJS({
|
|
7302
|
+
"../web/dist/cjs/helpers/isActivePlatform.native.js"(exports2, module2) {
|
|
7303
|
+
"use strict";
|
|
7304
|
+
function _type_of(obj) {
|
|
7305
|
+
"@swc/helpers - typeof";
|
|
7306
|
+
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
7307
|
+
}
|
|
7308
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7309
|
+
for (var name in all) __defProp2(target, name, {
|
|
7310
|
+
get: all[name],
|
|
7311
|
+
enumerable: !0
|
|
7312
|
+
});
|
|
7313
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
7314
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7315
|
+
if (from && (typeof from > "u" ? "undefined" : _type_of(from)) == "object" || typeof from == "function") try {
|
|
7316
|
+
for (var _loop = function() {
|
|
7317
|
+
var key = _step.value;
|
|
7318
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
7319
|
+
get: function() {
|
|
7320
|
+
return from[key];
|
|
7321
|
+
},
|
|
7322
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
7323
|
+
});
|
|
7324
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
7325
|
+
} catch (err) {
|
|
7326
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
7327
|
+
} finally {
|
|
7328
|
+
try {
|
|
7329
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7330
|
+
} finally {
|
|
7331
|
+
if (_didIteratorError)
|
|
7332
|
+
throw _iteratorError;
|
|
7333
|
+
}
|
|
7334
|
+
}
|
|
7335
|
+
return to;
|
|
7336
|
+
}, __toCommonJS2 = function(mod) {
|
|
7337
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7338
|
+
value: !0
|
|
7339
|
+
}), mod);
|
|
7340
|
+
}, isActivePlatform_exports = {};
|
|
7341
|
+
__export2(isActivePlatform_exports, {
|
|
7342
|
+
isActivePlatform: function() {
|
|
7343
|
+
return isActivePlatform;
|
|
7344
|
+
}
|
|
7345
|
+
});
|
|
7346
|
+
module2.exports = __toCommonJS2(isActivePlatform_exports);
|
|
7347
|
+
var import_constants = require_index_native3();
|
|
7348
|
+
function isActivePlatform(key) {
|
|
7349
|
+
var platform = key.slice(10);
|
|
7350
|
+
return (
|
|
7351
|
+
// web, ios, android
|
|
7352
|
+
platform === import_constants.currentPlatform || // web, native
|
|
7353
|
+
platform === "native"
|
|
7354
|
+
);
|
|
7355
|
+
}
|
|
7356
|
+
}
|
|
7357
|
+
});
|
|
7358
|
+
|
|
7292
7359
|
// ../web/dist/cjs/helpers/getSplitStyles.native.js
|
|
7293
7360
|
var require_getSplitStyles_native = __commonJS({
|
|
7294
7361
|
"../web/dist/cjs/helpers/getSplitStyles.native.js"(exports2, module2) {
|
|
@@ -7345,7 +7412,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7345
7412
|
}
|
|
7346
7413
|
});
|
|
7347
7414
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
7348
|
-
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_react3 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_transformsToString = require_transformsToString_native();
|
|
7415
|
+
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_react3 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_transformsToString = require_transformsToString_native(), import_isActivePlatform = require_isActivePlatform_native();
|
|
7349
7416
|
function _array_like_to_array(arr, len) {
|
|
7350
7417
|
(len == null || len > arr.length) && (len = arr.length);
|
|
7351
7418
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -7430,6 +7497,207 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7430
7497
|
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
7431
7498
|
}
|
|
7432
7499
|
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
|
|
7500
|
+
var _loop = function(keyOg2) {
|
|
7501
|
+
var _loop22 = function(i3) {
|
|
7502
|
+
var _parentStaticConfig_variants;
|
|
7503
|
+
if (expanded) {
|
|
7504
|
+
var _expanded_i = _sliced_to_array(expanded[i3], 2), k = _expanded_i[0], v = _expanded_i[1];
|
|
7505
|
+
key4 = k, val2 = v;
|
|
7506
|
+
}
|
|
7507
|
+
if (val2 == null || key4 in usedKeys) return "continue";
|
|
7508
|
+
if (isPseudo = key4 in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key4), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key4 in variants, inlineProps != null && inlineProps.has(key4) || process.env.IS_STATIC === "is_static" && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key4)) {
|
|
7509
|
+
var _props_key;
|
|
7510
|
+
viewProps[key4] = (_props_key = props[key4]) !== null && _props_key !== void 0 ? _props_key : val2;
|
|
7511
|
+
}
|
|
7512
|
+
var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
|
|
7513
|
+
if (shouldPassThrough2) return passDownProp(viewProps, key4, val2, isMediaOrPseudo1), "continue";
|
|
7514
|
+
if (isPseudo) {
|
|
7515
|
+
if (!val2) return "continue";
|
|
7516
|
+
var pseudoStyleObject = getSubStyle(styleState, key4, val2, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key4], isEnter = key4 === "enterStyle", isExit = key4 === "exitStyle";
|
|
7517
|
+
if (!descriptor) return "continue";
|
|
7518
|
+
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
7519
|
+
var _pseudos, _key;
|
|
7520
|
+
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key4] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") return Object.assign(pseudos[key4], pseudoStyleObject), "continue";
|
|
7521
|
+
}
|
|
7522
|
+
if (shouldDoClasses && !isExit) {
|
|
7523
|
+
var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor), _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
|
|
7524
|
+
try {
|
|
7525
|
+
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
|
7526
|
+
var psuedoStyle = _step2.value, fullKey = "".concat(psuedoStyle[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
|
|
7527
|
+
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[import_helpers.StyleObjectIdentifier], isMediaOrPseudo1, !0));
|
|
7528
|
+
}
|
|
7529
|
+
} catch (err) {
|
|
7530
|
+
_didIteratorError2 = !0, _iteratorError2 = err;
|
|
7531
|
+
} finally {
|
|
7532
|
+
try {
|
|
7533
|
+
!_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
|
|
7534
|
+
} finally {
|
|
7535
|
+
if (_didIteratorError2) throw _iteratorError2;
|
|
7536
|
+
}
|
|
7537
|
+
}
|
|
7538
|
+
}
|
|
7539
|
+
if (!shouldDoClasses || isExit || isEnter) {
|
|
7540
|
+
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
7541
|
+
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0);
|
|
7542
|
+
var importance = descriptor.priority;
|
|
7543
|
+
for (var pkey in pseudoStyleObject) {
|
|
7544
|
+
var val12 = pseudoStyleObject[pkey];
|
|
7545
|
+
if (isDisabled) applyDefaultStyle(pkey, styleState);
|
|
7546
|
+
else {
|
|
7547
|
+
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
7548
|
+
if (shouldMerge) {
|
|
7549
|
+
var _pseudos1, _key1;
|
|
7550
|
+
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = val12, mergeStyle(styleState, pkey, val12);
|
|
7551
|
+
}
|
|
7552
|
+
}
|
|
7553
|
+
}
|
|
7554
|
+
if (!isDisabled) for (var key12 in val2) {
|
|
7555
|
+
var k1 = shorthands[key12] || key12;
|
|
7556
|
+
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
|
|
7557
|
+
}
|
|
7558
|
+
}
|
|
7559
|
+
return "continue";
|
|
7560
|
+
}
|
|
7561
|
+
if (isMedia) {
|
|
7562
|
+
if (!val2) return "continue";
|
|
7563
|
+
var hasSpace = val2.space, mediaKeyShort = key4.slice(1);
|
|
7564
|
+
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (((typeof hasMedia > "u" ? "undefined" : _type_of(hasMedia)) > "u" ? "undefined" : _type_of1(hasMedia)) !== "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !(0, import_isActivePlatform.isActivePlatform)(key4)) return "continue";
|
|
7565
|
+
if (shouldDoClasses) {
|
|
7566
|
+
var mediaStyle = getSubStyle(styleState, key4, val2, !1);
|
|
7567
|
+
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
7568
|
+
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
7569
|
+
importance1 && (space = val2.space, usedKeys.space = importance1);
|
|
7570
|
+
}
|
|
7571
|
+
var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
|
|
7572
|
+
mediaStylesSeen += 1;
|
|
7573
|
+
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
7574
|
+
try {
|
|
7575
|
+
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
|
|
7576
|
+
var style3 = _step12.value, property = style3[0];
|
|
7577
|
+
if (!(property[0] === "$" && property.startsWith("$platform") && !(0, import_isActivePlatform.isActivePlatform)(property))) {
|
|
7578
|
+
var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority), fullKey1 = "".concat(style3[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style3[import_helpers.StyleObjectPseudo] || "");
|
|
7579
|
+
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[import_helpers.StyleObjectIdentifier], !0, !0));
|
|
7580
|
+
}
|
|
7581
|
+
}
|
|
7582
|
+
} catch (err) {
|
|
7583
|
+
_didIteratorError12 = !0, _iteratorError12 = err;
|
|
7584
|
+
} finally {
|
|
7585
|
+
try {
|
|
7586
|
+
!_iteratorNormalCompletion12 && _iterator12.return != null && _iterator12.return();
|
|
7587
|
+
} finally {
|
|
7588
|
+
if (_didIteratorError12) throw _iteratorError12;
|
|
7589
|
+
}
|
|
7590
|
+
}
|
|
7591
|
+
} else {
|
|
7592
|
+
var mergeMediaStyle = function(key5, val3) {
|
|
7593
|
+
var _styleState4;
|
|
7594
|
+
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
7595
|
+
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState2[mediaKeyShort], importanceBump, debug);
|
|
7596
|
+
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
7597
|
+
}, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
7598
|
+
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia && !mediaState2[mediaKeyShort])
|
|
7599
|
+
return "continue";
|
|
7600
|
+
var mediaStyle1 = getSubStyle(styleState, key4, val2, !0), importanceBump = 0;
|
|
7601
|
+
if (isThemeMedia) {
|
|
7602
|
+
dynamicThemeAccess = !0;
|
|
7603
|
+
var mediaThemeName = mediaKeyShort.slice(6);
|
|
7604
|
+
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) return "continue";
|
|
7605
|
+
} else if (isGroupMedia) {
|
|
7606
|
+
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
7607
|
+
if (!groupContext) return "continue";
|
|
7608
|
+
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
7609
|
+
if (groupMediaKey) {
|
|
7610
|
+
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
7611
|
+
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
7612
|
+
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive) {
|
|
7613
|
+
for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
|
|
7614
|
+
return "continue";
|
|
7615
|
+
}
|
|
7616
|
+
importanceBump = 2;
|
|
7617
|
+
}
|
|
7618
|
+
if (groupPseudoKey) {
|
|
7619
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
7620
|
+
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
7621
|
+
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
7622
|
+
if (!isActive1) {
|
|
7623
|
+
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
7624
|
+
return "continue";
|
|
7625
|
+
}
|
|
7626
|
+
importanceBump = priority1;
|
|
7627
|
+
}
|
|
7628
|
+
}
|
|
7629
|
+
for (var subKey in mediaStyle1) {
|
|
7630
|
+
if (subKey === "space") {
|
|
7631
|
+
space = valInit.space;
|
|
7632
|
+
continue;
|
|
7633
|
+
}
|
|
7634
|
+
if (subKey[0] === "$") {
|
|
7635
|
+
if (!(0, import_isActivePlatform.isActivePlatform)(subKey)) continue;
|
|
7636
|
+
for (var subSubKey in mediaStyle1[subKey]) mergeMediaStyle(subSubKey, mediaStyle1[subKey][subSubKey]);
|
|
7637
|
+
} else mergeMediaStyle(subKey, mediaStyle1[subKey]);
|
|
7638
|
+
}
|
|
7639
|
+
}
|
|
7640
|
+
return "continue";
|
|
7641
|
+
}
|
|
7642
|
+
if (key4 === "pointerEvents") return viewProps[key4] = val2, "continue";
|
|
7643
|
+
if (
|
|
7644
|
+
// is HOC we can just pass through the styles as props
|
|
7645
|
+
// this fixes issues where style prop got merged with wrong priority
|
|
7646
|
+
!isHOC && (isValidStyleKey(key4, staticConfig) || import_constants.isAndroid && key4 === "elevation")
|
|
7647
|
+
) return mergeStyle(styleState, key4, val2), "continue";
|
|
7648
|
+
isVariant || (viewProps[key4] = val2);
|
|
7649
|
+
}, keyInit = keyOg2, valInit = props[keyInit];
|
|
7650
|
+
if (accept) {
|
|
7651
|
+
var accepted = accept[keyInit];
|
|
7652
|
+
if ((accepted === "style" || accepted === "textStyle") && valInit && ((typeof valInit > "u" ? "undefined" : _type_of(valInit)) > "u" ? "undefined" : _type_of1(valInit)) === "object") return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames), "continue";
|
|
7653
|
+
}
|
|
7654
|
+
if (disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys) return "continue";
|
|
7655
|
+
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
|
|
7656
|
+
if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
|
|
7657
|
+
return "continue";
|
|
7658
|
+
}
|
|
7659
|
+
var valInitType = (typeof valInit > "u" ? "undefined" : _type_of(valInit)) > "u" ? "undefined" : _type_of1(valInit), isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
7660
|
+
if (0) {
|
|
7661
|
+
var isValidClassName, isMediaOrPseudo;
|
|
7662
|
+
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses) var _styleState3;
|
|
7663
|
+
}
|
|
7664
|
+
if (!isValidStyleKeyInit) {
|
|
7665
|
+
if (!import_constants.isAndroid && keyInit === "elevationAndroid") return "continue";
|
|
7666
|
+
if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
|
|
7667
|
+
else if (keyInit.startsWith("data-")) return "continue";
|
|
7668
|
+
}
|
|
7669
|
+
if (keyInit === "dataSet") {
|
|
7670
|
+
for (var keyInit1 in valInit) viewProps["data-".concat(hyphenate(keyInit1))] = valInit[keyInit1];
|
|
7671
|
+
return "continue";
|
|
7672
|
+
}
|
|
7673
|
+
if (0) var didUseKeyInit;
|
|
7674
|
+
var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
|
|
7675
|
+
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
|
|
7676
|
+
var name2 = keyInit.split("-")[1];
|
|
7677
|
+
context != null && context.groups.subscribe && !(context != null && context.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
7678
|
+
}
|
|
7679
|
+
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
|
|
7680
|
+
if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) return "continue";
|
|
7681
|
+
var shouldPassProp = !isStyleProp || // is in parent variants
|
|
7682
|
+
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
7683
|
+
if (shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant) || !noSkip && keyInit in import_skipProps.skipProps) return "continue";
|
|
7684
|
+
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
7685
|
+
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
|
|
7686
|
+
if (!avoidPropMap) {
|
|
7687
|
+
if (!expanded) return "continue";
|
|
7688
|
+
var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
7689
|
+
next && (styleState.fontFamily = next);
|
|
7690
|
+
}
|
|
7691
|
+
if (0)
|
|
7692
|
+
try {
|
|
7693
|
+
} catch (e) {
|
|
7694
|
+
}
|
|
7695
|
+
for (var key4 = keyInit, val2 = valInit, max = expanded ? expanded.length : 1, i2 = 0; i2 < max; i2++) _loop22(i2);
|
|
7696
|
+
if (0)
|
|
7697
|
+
try {
|
|
7698
|
+
} catch (e) {
|
|
7699
|
+
}
|
|
7700
|
+
};
|
|
7433
7701
|
conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
7434
7702
|
var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, curPropsState, styleState = {
|
|
7435
7703
|
// this should go away, right now we're doing really crazy cumulative props,
|
|
@@ -7454,237 +7722,24 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7454
7722
|
debug,
|
|
7455
7723
|
skipThemeTokenResolution
|
|
7456
7724
|
}, asChild = props.asChild, accept = staticConfig.accept, noSkip = styleProps.noSkip, disableExpandShorthands = styleProps.disableExpandShorthands, noExpand = styleProps.noExpand, webContainerType = conf.settings.webContainerType, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
7457
|
-
for (var keyOg in props)
|
|
7458
|
-
var keyInit = keyOg, valInit = props[keyInit];
|
|
7459
|
-
if (accept) {
|
|
7460
|
-
var accepted = accept[keyInit];
|
|
7461
|
-
if ((accepted === "style" || accepted === "textStyle") && valInit && ((typeof valInit > "u" ? "undefined" : _type_of(valInit)) > "u" ? "undefined" : _type_of1(valInit)) === "object") {
|
|
7462
|
-
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames);
|
|
7463
|
-
continue;
|
|
7464
|
-
}
|
|
7465
|
-
}
|
|
7466
|
-
if (disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
|
|
7467
|
-
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
|
|
7468
|
-
if (keyInit === "group" && !1) var identifier, containerType, containerCSS;
|
|
7469
|
-
continue;
|
|
7470
|
-
}
|
|
7471
|
-
var valInitType = (typeof valInit > "u" ? "undefined" : _type_of(valInit)) > "u" ? "undefined" : _type_of1(valInit), isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
7472
|
-
if (0) {
|
|
7473
|
-
var isValidClassName, isMediaOrPseudo;
|
|
7474
|
-
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses) var _styleState;
|
|
7475
|
-
}
|
|
7476
|
-
if (!isValidStyleKeyInit) {
|
|
7477
|
-
if (!import_constants.isAndroid && keyInit === "elevationAndroid") continue;
|
|
7478
|
-
if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
|
|
7479
|
-
else if (keyInit.startsWith("data-")) continue;
|
|
7480
|
-
}
|
|
7481
|
-
if (keyInit === "dataSet") {
|
|
7482
|
-
for (var keyInit1 in valInit) viewProps["data-".concat(hyphenate(keyInit1))] = valInit[keyInit1];
|
|
7483
|
-
continue;
|
|
7484
|
-
}
|
|
7485
|
-
if (0) var didUseKeyInit;
|
|
7486
|
-
var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
|
|
7487
|
-
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
|
|
7488
|
-
var name = keyInit.split("-")[1];
|
|
7489
|
-
context != null && context.groups.subscribe && !(context != null && context.groups.state[name]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
7490
|
-
}
|
|
7491
|
-
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
|
|
7492
|
-
if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
|
|
7493
|
-
var shouldPassProp = !isStyleProp || // is in parent variants
|
|
7494
|
-
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
7495
|
-
if (shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant) || !noSkip && keyInit in import_skipProps.skipProps)
|
|
7496
|
-
continue;
|
|
7497
|
-
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
7498
|
-
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
|
|
7499
|
-
if (!avoidPropMap) {
|
|
7500
|
-
if (!expanded) continue;
|
|
7501
|
-
var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
7502
|
-
next && (styleState.fontFamily = next);
|
|
7503
|
-
}
|
|
7504
|
-
if (0)
|
|
7505
|
-
try {
|
|
7506
|
-
} catch (e) {
|
|
7507
|
-
}
|
|
7508
|
-
for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) {
|
|
7509
|
-
var _parentStaticConfig_variants;
|
|
7510
|
-
if (expanded) {
|
|
7511
|
-
var _expanded_i = _sliced_to_array(expanded[i], 2), k = _expanded_i[0], v = _expanded_i[1];
|
|
7512
|
-
key = k, val = v;
|
|
7513
|
-
}
|
|
7514
|
-
if (val != null && !(key in usedKeys)) {
|
|
7515
|
-
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key in variants, inlineProps != null && inlineProps.has(key) || process.env.IS_STATIC === "is_static" && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) {
|
|
7516
|
-
var _props_key;
|
|
7517
|
-
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
|
|
7518
|
-
}
|
|
7519
|
-
var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
|
|
7520
|
-
if (shouldPassThrough1) {
|
|
7521
|
-
passDownProp(viewProps, key, val, isMediaOrPseudo1);
|
|
7522
|
-
continue;
|
|
7523
|
-
}
|
|
7524
|
-
if (isPseudo) {
|
|
7525
|
-
if (!val) continue;
|
|
7526
|
-
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
7527
|
-
if (!descriptor) continue;
|
|
7528
|
-
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
7529
|
-
var _pseudos, _key;
|
|
7530
|
-
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") {
|
|
7531
|
-
Object.assign(pseudos[key], pseudoStyleObject);
|
|
7532
|
-
continue;
|
|
7533
|
-
}
|
|
7534
|
-
}
|
|
7535
|
-
if (shouldDoClasses && !isExit) {
|
|
7536
|
-
var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7537
|
-
try {
|
|
7538
|
-
for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
7539
|
-
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
|
|
7540
|
-
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[import_helpers.StyleObjectIdentifier], isMediaOrPseudo1, !0));
|
|
7541
|
-
}
|
|
7542
|
-
} catch (err) {
|
|
7543
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
7544
|
-
} finally {
|
|
7545
|
-
try {
|
|
7546
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7547
|
-
} finally {
|
|
7548
|
-
if (_didIteratorError) throw _iteratorError;
|
|
7549
|
-
}
|
|
7550
|
-
}
|
|
7551
|
-
}
|
|
7552
|
-
if (!shouldDoClasses || isExit || isEnter) {
|
|
7553
|
-
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
7554
|
-
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0);
|
|
7555
|
-
var importance = descriptor.priority;
|
|
7556
|
-
for (var pkey in pseudoStyleObject) {
|
|
7557
|
-
var val1 = pseudoStyleObject[pkey];
|
|
7558
|
-
if (isDisabled) {
|
|
7559
|
-
var defaultValues = animatableDefaults[pkey];
|
|
7560
|
-
defaultValues != null && !(pkey in usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
7561
|
-
} else {
|
|
7562
|
-
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
7563
|
-
if (shouldMerge) {
|
|
7564
|
-
var _pseudos1, _key1;
|
|
7565
|
-
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val1, mergeStyle(styleState, pkey, val1);
|
|
7566
|
-
}
|
|
7567
|
-
}
|
|
7568
|
-
}
|
|
7569
|
-
if (!isDisabled) for (var key1 in val) {
|
|
7570
|
-
var k1 = shorthands[key1] || key1;
|
|
7571
|
-
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
|
|
7572
|
-
}
|
|
7573
|
-
}
|
|
7574
|
-
continue;
|
|
7575
|
-
}
|
|
7576
|
-
if (isMedia) {
|
|
7577
|
-
if (!val) continue;
|
|
7578
|
-
var hasSpace = val.space, mediaKeyShort = key.slice(1);
|
|
7579
|
-
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (((typeof hasMedia > "u" ? "undefined" : _type_of(hasMedia)) > "u" ? "undefined" : _type_of1(hasMedia)) !== "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform") {
|
|
7580
|
-
var platform = key.slice(10);
|
|
7581
|
-
if (
|
|
7582
|
-
// supports web, ios, android
|
|
7583
|
-
platform !== import_constants.currentPlatform && // supports web, native
|
|
7584
|
-
platform !== "native"
|
|
7585
|
-
) continue;
|
|
7586
|
-
}
|
|
7587
|
-
if (shouldDoClasses) {
|
|
7588
|
-
var mediaStyle = getSubStyle(styleState, key, val, !1);
|
|
7589
|
-
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
7590
|
-
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
7591
|
-
importance1 && (space = val.space, usedKeys.space = importance1);
|
|
7592
|
-
}
|
|
7593
|
-
var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
|
|
7594
|
-
mediaStylesSeen += 1;
|
|
7595
|
-
var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
|
|
7596
|
-
try {
|
|
7597
|
-
for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
|
|
7598
|
-
var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority), fullKey1 = "".concat(style[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style[import_helpers.StyleObjectPseudo] || "");
|
|
7599
|
-
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[import_helpers.StyleObjectIdentifier], !0, !0));
|
|
7600
|
-
}
|
|
7601
|
-
} catch (err) {
|
|
7602
|
-
_didIteratorError1 = !0, _iteratorError1 = err;
|
|
7603
|
-
} finally {
|
|
7604
|
-
try {
|
|
7605
|
-
!_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
|
|
7606
|
-
} finally {
|
|
7607
|
-
if (_didIteratorError1) throw _iteratorError1;
|
|
7608
|
-
}
|
|
7609
|
-
}
|
|
7610
|
-
} else {
|
|
7611
|
-
var isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
7612
|
-
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia && !mediaState2[mediaKeyShort])
|
|
7613
|
-
continue;
|
|
7614
|
-
var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
|
|
7615
|
-
if (isThemeMedia) {
|
|
7616
|
-
dynamicThemeAccess = !0;
|
|
7617
|
-
var mediaThemeName = mediaKeyShort.slice(6);
|
|
7618
|
-
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) continue;
|
|
7619
|
-
} else if (isGroupMedia) {
|
|
7620
|
-
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
7621
|
-
if (!groupContext)
|
|
7622
|
-
continue;
|
|
7623
|
-
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
7624
|
-
if (groupMediaKey) {
|
|
7625
|
-
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
7626
|
-
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
7627
|
-
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive) continue;
|
|
7628
|
-
importanceBump = 2;
|
|
7629
|
-
}
|
|
7630
|
-
if (groupPseudoKey) {
|
|
7631
|
-
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
7632
|
-
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
7633
|
-
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
7634
|
-
if (!isActive1) continue;
|
|
7635
|
-
importanceBump = priority1;
|
|
7636
|
-
}
|
|
7637
|
-
}
|
|
7638
|
-
for (var subKey in mediaStyle1) {
|
|
7639
|
-
var _styleState1;
|
|
7640
|
-
if (subKey === "space") {
|
|
7641
|
-
space = valInit.space;
|
|
7642
|
-
continue;
|
|
7643
|
-
}
|
|
7644
|
-
(_styleState1 = styleState).style || (_styleState1.style = {}), mergeMediaByImportance(styleState, mediaKeyShort, subKey, mediaStyle1[subKey], usedKeys, mediaState2[mediaKeyShort], importanceBump, debug), key === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
7645
|
-
}
|
|
7646
|
-
}
|
|
7647
|
-
continue;
|
|
7648
|
-
}
|
|
7649
|
-
if (key === "pointerEvents") {
|
|
7650
|
-
viewProps[key] = val;
|
|
7651
|
-
continue;
|
|
7652
|
-
}
|
|
7653
|
-
if (
|
|
7654
|
-
// is HOC we can just pass through the styles as props
|
|
7655
|
-
// this fixes issues where style prop got merged with wrong priority
|
|
7656
|
-
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
|
|
7657
|
-
) {
|
|
7658
|
-
mergeStyle(styleState, key, val);
|
|
7659
|
-
continue;
|
|
7660
|
-
}
|
|
7661
|
-
isVariant || (viewProps[key] = val);
|
|
7662
|
-
}
|
|
7663
|
-
}
|
|
7664
|
-
if (0)
|
|
7665
|
-
try {
|
|
7666
|
-
} catch (e) {
|
|
7667
|
-
}
|
|
7668
|
-
}
|
|
7669
|
-
}
|
|
7670
|
-
}
|
|
7725
|
+
for (var keyOg in props) _loop(keyOg);
|
|
7671
7726
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
7672
7727
|
if (!avoidNormalize) {
|
|
7673
7728
|
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants.isWeb && !isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
|
|
7674
|
-
var
|
|
7675
|
-
(
|
|
7729
|
+
var _styleState;
|
|
7730
|
+
(_styleState = styleState).style || (_styleState.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
|
|
7676
7731
|
var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
|
|
7677
7732
|
return a.localeCompare(b);
|
|
7678
7733
|
}).forEach(function(param) {
|
|
7679
|
-
var _param = _sliced_to_array(param, 2),
|
|
7680
|
-
mergeTransform(styleState.style,
|
|
7734
|
+
var _param = _sliced_to_array(param, 2), key4 = _param[0], val2 = _param[1];
|
|
7735
|
+
mergeTransform(styleState.style, key4, val2, !0);
|
|
7681
7736
|
});
|
|
7682
7737
|
}
|
|
7683
7738
|
if (parentSplitStyles) {
|
|
7684
|
-
if (0) for (var
|
|
7685
|
-
if (!shouldDoClasses) for (var
|
|
7686
|
-
var
|
|
7687
|
-
|
|
7739
|
+
if (0) for (var key in parentSplitStyles.classNames) var val;
|
|
7740
|
+
if (!shouldDoClasses) for (var key1 in parentSplitStyles.style) {
|
|
7741
|
+
var _styleState1;
|
|
7742
|
+
key1 in classNames || styleState.style && key1 in styleState.style || ((_styleState1 = styleState).style || (_styleState1.style = {}), styleState.style[key1] = parentSplitStyles.style[key1]);
|
|
7688
7743
|
}
|
|
7689
7744
|
}
|
|
7690
7745
|
}
|
|
@@ -7693,9 +7748,9 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7693
7748
|
if (styleState.style && shouldDoClasses) {
|
|
7694
7749
|
var retainedStyles, shouldRetain;
|
|
7695
7750
|
if (!styleState.style.$$css) {
|
|
7696
|
-
var atomic,
|
|
7751
|
+
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
7697
7752
|
try {
|
|
7698
|
-
for (var
|
|
7753
|
+
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _atomicStyle, key2, value, identifier, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
7699
7754
|
} catch (err) {
|
|
7700
7755
|
} finally {
|
|
7701
7756
|
try {
|
|
@@ -7704,8 +7759,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7704
7759
|
}
|
|
7705
7760
|
}
|
|
7706
7761
|
if (transforms) for (var namespace in transforms) {
|
|
7707
|
-
var _transforms_namespace, hash,
|
|
7708
|
-
if (import_constants.isClient && !insertedTransforms[
|
|
7762
|
+
var _transforms_namespace, hash, val1, identifier1;
|
|
7763
|
+
if (import_constants.isClient && !insertedTransforms[identifier1]) var rule;
|
|
7709
7764
|
}
|
|
7710
7765
|
}
|
|
7711
7766
|
if (isReactNative) {
|
|
@@ -7714,20 +7769,20 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7714
7769
|
}
|
|
7715
7770
|
var styleProp = props.style;
|
|
7716
7771
|
if (styleProp) if (isHOC) viewProps.style = normalizeStyle(styleProp);
|
|
7717
|
-
else for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1,
|
|
7718
|
-
var
|
|
7719
|
-
if (
|
|
7772
|
+
else for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i = 0; i < len; i++) {
|
|
7773
|
+
var style = isArray ? styleProp[i] : styleProp;
|
|
7774
|
+
if (style) if (style.$$css) Object.assign(styleState.classNames, style);
|
|
7720
7775
|
else {
|
|
7721
|
-
var
|
|
7722
|
-
(
|
|
7776
|
+
var _styleState2;
|
|
7777
|
+
(_styleState2 = styleState).style || (_styleState2.style = {}), Object.assign(styleState.style, normalizeStyle(style));
|
|
7723
7778
|
}
|
|
7724
7779
|
}
|
|
7725
|
-
var
|
|
7726
|
-
if (
|
|
7727
|
-
var _getFont, faceInfo = (_getFont = (0, import_config.getFont)(
|
|
7780
|
+
var style1 = styleState.style;
|
|
7781
|
+
if (style1 != null && style1.fontFamily) {
|
|
7782
|
+
var _getFont, faceInfo = (_getFont = (0, import_config.getFont)(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
7728
7783
|
if (faceInfo) {
|
|
7729
|
-
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight, overrideFace = (_faceInfo_style_fontWeight = faceInfo[
|
|
7730
|
-
overrideFace && (
|
|
7784
|
+
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight, overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 || (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
|
|
7785
|
+
overrideFace && (style1.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style1.fontWeight, delete style1.fontStyle);
|
|
7731
7786
|
}
|
|
7732
7787
|
}
|
|
7733
7788
|
var result = {
|
|
@@ -7744,13 +7799,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7744
7799
|
mediaGroups
|
|
7745
7800
|
}, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
7746
7801
|
if (!asChildExceptStyleLike) {
|
|
7747
|
-
var
|
|
7802
|
+
var style2 = styleState.style;
|
|
7748
7803
|
if (0) {
|
|
7749
7804
|
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
7750
7805
|
if (!styleProps.noMergeStyle && !(styleProps.isAnimated && !conf.animations.supportsCSSVars && isReactNative) && isReactNative) {
|
|
7751
|
-
var cnStyles,
|
|
7806
|
+
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
7752
7807
|
try {
|
|
7753
|
-
for (var
|
|
7808
|
+
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
|
|
7754
7809
|
} catch (err) {
|
|
7755
7810
|
} finally {
|
|
7756
7811
|
try {
|
|
@@ -7758,12 +7813,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7758
7813
|
}
|
|
7759
7814
|
}
|
|
7760
7815
|
}
|
|
7761
|
-
} else
|
|
7816
|
+
} else style2 && !styleProps.noMergeStyle && (viewProps.style = style2);
|
|
7762
7817
|
}
|
|
7763
7818
|
if (0)
|
|
7764
7819
|
try {
|
|
7765
7820
|
var logs;
|
|
7766
|
-
for (var
|
|
7821
|
+
for (var key3 in logs) ;
|
|
7767
7822
|
} catch (e) {
|
|
7768
7823
|
}
|
|
7769
7824
|
return result;
|
|
@@ -7876,6 +7931,10 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7876
7931
|
}
|
|
7877
7932
|
return import_constants.isWeb && Array.isArray(out.transform) && (out.transform = (0, import_transformsToString.transformsToString)(out.transform)), (0, import_expandStyles.fixStyles)(out), out;
|
|
7878
7933
|
}
|
|
7934
|
+
function applyDefaultStyle(pkey, styleState) {
|
|
7935
|
+
var defaultValues = animatableDefaults[pkey];
|
|
7936
|
+
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
7937
|
+
}
|
|
7879
7938
|
}
|
|
7880
7939
|
});
|
|
7881
7940
|
|
|
@@ -9364,11 +9423,11 @@ var require_createComponent_native = __commonJS({
|
|
|
9364
9423
|
}, subscribeToContextGroup = function(param) {
|
|
9365
9424
|
var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? !1 : _param_disabled, setStateShallow = param.setStateShallow, pseudoGroups = param.pseudoGroups, mediaGroups = param.mediaGroups, componentContext = param.componentContext, state = param.state;
|
|
9366
9425
|
if (pseudoGroups || mediaGroups) {
|
|
9367
|
-
var _componentContext_groups, current = {
|
|
9426
|
+
var _componentContext_groups_subscribe, _componentContext_groups, current = {
|
|
9368
9427
|
pseudo: {},
|
|
9369
9428
|
media: {}
|
|
9370
9429
|
};
|
|
9371
|
-
return (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 ? void 0 :
|
|
9430
|
+
return (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 || (_componentContext_groups_subscribe = _componentContext_groups.subscribe) === null || _componentContext_groups_subscribe === void 0 ? void 0 : _componentContext_groups_subscribe.call(_componentContext_groups, function(name, param2) {
|
|
9372
9431
|
var layout = param2.layout, pseudo = param2.pseudo, persist = function() {
|
|
9373
9432
|
var group = _object_spread_props(_object_spread2({}, state.group), _define_property2({}, name, current));
|
|
9374
9433
|
setStateShallow({
|