@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 CHANGED
@@ -5340,18 +5340,26 @@ var require_createMediaStyle_native = __commonJS({
5340
5340
  press: "active"
5341
5341
  }, specifities = new Array(5).fill(0).map(function(_, i) {
5342
5342
  return new Array(i).fill(":root").join("");
5343
- }), createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
5344
- 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) {
5343
+ });
5344
+ function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
5345
+ 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);
5346
+ return [
5347
+ selector,
5348
+ "".concat(presedencePrefix).concat(mediaSelector, " ").concat(selector.replace(":root", ""))
5349
+ ];
5350
+ }
5351
+ var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
5352
+ 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) {
5345
5353
  return rule.replace(identifier, nextIdentifier);
5346
5354
  }).join(";"), isHover = !1;
5347
5355
  if (isNonWindowMedia) {
5348
- var specificity = (priority || 0) + (isGroup ? 1 : 0);
5356
+ var specificity = (priority || 0) + (isGroup || isPlatform ? 1 : 0);
5349
5357
  if (isTheme || isGroup) {
5350
5358
  var _getGroupPropParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), name = _getGroupPropParts.name, media = _getGroupPropParts.media, pseudo = _getGroupPropParts.pseudo;
5351
- groupMediaKey = media, isGroup && (containerName = name);
5352
- 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;
5353
- pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
5354
- 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", ""));
5359
+ groupMediaKey = media;
5360
+ var groupParts = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn);
5361
+ isGroup && (containerName = name), pseudo === "press" && (specificity += 2), pseudo === "hover" && (isHover = !0);
5362
+ var _getThemeOrGroupSelector = _sliced_to_array(getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specifities[specificity]), 2), selector = _getThemeOrGroupSelector[0], nextSelector = _getThemeOrGroupSelector[1];
5355
5363
  styleRule = styleInner.replace(selector, nextSelector);
5356
5364
  } else styleRule = "".concat(specifities[specificity]).concat(styleInner);
5357
5365
  }
@@ -5370,14 +5378,14 @@ var require_createMediaStyle_native = __commonJS({
5370
5378
  ];
5371
5379
  })));
5372
5380
  }
5373
- var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector1 = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector1), precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
5381
+ var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = "".concat(screenStr).concat(mediaSelector), precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
5374
5382
  // this new array should be cached
5375
5383
  specifities[priority]
5376
5384
  ) : (
5377
5385
  // @ts-ignore
5378
5386
  prefixes[mediaKey]
5379
5387
  ), prefix = groupMediaKey ? "@container ".concat(containerName) : "@media";
5380
- 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, "}"));
5388
+ 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, "}"));
5381
5389
  }
5382
5390
  return isHover && (styleRule = "@media (hover:hover){".concat(styleRule, "}")), [
5383
5391
  property,
@@ -7674,6 +7682,65 @@ var require_transformsToString_native = __commonJS({
7674
7682
  }
7675
7683
  });
7676
7684
 
7685
+ // ../web/dist/cjs/helpers/isActivePlatform.native.js
7686
+ var require_isActivePlatform_native = __commonJS({
7687
+ "../web/dist/cjs/helpers/isActivePlatform.native.js"(exports2, module2) {
7688
+ "use strict";
7689
+ function _type_of(obj) {
7690
+ "@swc/helpers - typeof";
7691
+ return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
7692
+ }
7693
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
7694
+ for (var name in all) __defProp2(target, name, {
7695
+ get: all[name],
7696
+ enumerable: !0
7697
+ });
7698
+ }, __copyProps2 = function(to, from, except, desc) {
7699
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
7700
+ if (from && (typeof from > "u" ? "undefined" : _type_of(from)) == "object" || typeof from == "function") try {
7701
+ for (var _loop = function() {
7702
+ var key = _step.value;
7703
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
7704
+ get: function() {
7705
+ return from[key];
7706
+ },
7707
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
7708
+ });
7709
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
7710
+ } catch (err) {
7711
+ _didIteratorError = !0, _iteratorError = err;
7712
+ } finally {
7713
+ try {
7714
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
7715
+ } finally {
7716
+ if (_didIteratorError)
7717
+ throw _iteratorError;
7718
+ }
7719
+ }
7720
+ return to;
7721
+ }, __toCommonJS2 = function(mod) {
7722
+ return __copyProps2(__defProp2({}, "__esModule", {
7723
+ value: !0
7724
+ }), mod);
7725
+ }, isActivePlatform_exports = {};
7726
+ __export2(isActivePlatform_exports, {
7727
+ isActivePlatform: function() {
7728
+ return isActivePlatform;
7729
+ }
7730
+ });
7731
+ module2.exports = __toCommonJS2(isActivePlatform_exports);
7732
+ var import_constants = require_index_native3();
7733
+ function isActivePlatform(key) {
7734
+ var platform = key.slice(10);
7735
+ return (
7736
+ // web, ios, android
7737
+ platform === import_constants.currentPlatform || // web, native
7738
+ platform === "native"
7739
+ );
7740
+ }
7741
+ }
7742
+ });
7743
+
7677
7744
  // ../web/dist/cjs/helpers/getSplitStyles.native.js
7678
7745
  var require_getSplitStyles_native = __commonJS({
7679
7746
  "../web/dist/cjs/helpers/getSplitStyles.native.js"(exports2, module2) {
@@ -7730,7 +7797,7 @@ var require_getSplitStyles_native = __commonJS({
7730
7797
  }
7731
7798
  });
7732
7799
  module2.exports = __toCommonJS2(getSplitStyles_exports);
7733
- 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();
7800
+ 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();
7734
7801
  function _array_like_to_array(arr, len) {
7735
7802
  (len == null || len > arr.length) && (len = arr.length);
7736
7803
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
@@ -7815,6 +7882,270 @@ var require_getSplitStyles_native = __commonJS({
7815
7882
  return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
7816
7883
  }
7817
7884
  var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
7885
+ var _loop = function(keyOg2) {
7886
+ var _loop22 = function(i3) {
7887
+ var _parentStaticConfig_variants;
7888
+ if (expanded) {
7889
+ var _expanded_i = _sliced_to_array(expanded[i3], 2), k = _expanded_i[0], v = _expanded_i[1];
7890
+ key4 = k, val2 = v;
7891
+ }
7892
+ if (val2 == null || key4 in usedKeys) return "continue";
7893
+ 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)) {
7894
+ var _props_key;
7895
+ viewProps[key4] = (_props_key = props[key4]) !== null && _props_key !== void 0 ? _props_key : val2;
7896
+ }
7897
+ var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
7898
+ if (shouldPassThrough2) return passDownProp(viewProps, key4, val2, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(" - passing down prop ".concat(key4)), (0, import_log.log)({
7899
+ val: val2,
7900
+ after: _object_spread2({}, viewProps[key4])
7901
+ }), console.groupEnd()), "continue";
7902
+ if (isPseudo) {
7903
+ if (!val2) return "continue";
7904
+ var pseudoStyleObject = getSubStyle(styleState, key4, val2, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key4], isEnter = key4 === "enterStyle", isExit = key4 === "exitStyle";
7905
+ if (!descriptor) return "continue";
7906
+ if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
7907
+ var _pseudos, _key;
7908
+ if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key4] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") return Object.assign(pseudos[key4], pseudoStyleObject), "continue";
7909
+ }
7910
+ if (shouldDoClasses && !isExit) {
7911
+ var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor);
7912
+ process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key4), (0, import_log.log)({
7913
+ pseudoStyleObject,
7914
+ pseudoStyles
7915
+ }), console.groupEnd());
7916
+ var _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
7917
+ try {
7918
+ for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
7919
+ var psuedoStyle = _step2.value, fullKey = "".concat(psuedoStyle[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
7920
+ fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[import_helpers.StyleObjectIdentifier], isMediaOrPseudo1, !0));
7921
+ }
7922
+ } catch (err) {
7923
+ _didIteratorError2 = !0, _iteratorError2 = err;
7924
+ } finally {
7925
+ try {
7926
+ !_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
7927
+ } finally {
7928
+ if (_didIteratorError2) throw _iteratorError2;
7929
+ }
7930
+ }
7931
+ }
7932
+ if (!shouldDoClasses || isExit || isEnter) {
7933
+ var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
7934
+ isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key4, {
7935
+ isDisabled
7936
+ }), (0, import_log.log)({
7937
+ pseudoStyleObject,
7938
+ isDisabled,
7939
+ descriptor,
7940
+ componentState
7941
+ }), console.groupEnd());
7942
+ var importance = descriptor.priority;
7943
+ for (var pkey in pseudoStyleObject) {
7944
+ var val12 = pseudoStyleObject[pkey];
7945
+ if (isDisabled) applyDefaultStyle(pkey, styleState);
7946
+ else {
7947
+ var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
7948
+ if (shouldMerge) {
7949
+ var _pseudos1, _key1;
7950
+ pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = val12, mergeStyle(styleState, pkey, val12);
7951
+ }
7952
+ process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
7953
+ importance,
7954
+ curImportance,
7955
+ pkey,
7956
+ val: val12
7957
+ });
7958
+ }
7959
+ }
7960
+ if (!isDisabled) for (var key12 in val2) {
7961
+ var k1 = shorthands[key12] || key12;
7962
+ usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
7963
+ }
7964
+ }
7965
+ return "continue";
7966
+ }
7967
+ if (isMedia) {
7968
+ if (!val2) return "continue";
7969
+ var hasSpace = val2.space, mediaKeyShort = key4.slice(1);
7970
+ 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";
7971
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key4), {
7972
+ key: key4,
7973
+ val: val2,
7974
+ props,
7975
+ shouldDoClasses,
7976
+ acceptsClassName,
7977
+ componentState,
7978
+ mediaState: mediaState2
7979
+ }), shouldDoClasses) {
7980
+ var mediaStyle = getSubStyle(styleState, key4, val2, !1);
7981
+ if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
7982
+ var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
7983
+ importance1 && (space = val2.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("Found more important space for current media ".concat(mediaKeyShort, ": ").concat(val2, " (importance: ").concat(importance1, ")")));
7984
+ }
7985
+ var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
7986
+ mediaStylesSeen += 1;
7987
+ var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
7988
+ try {
7989
+ for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
7990
+ var style3 = _step12.value, property = style3[0];
7991
+ if (!(property[0] === "$" && property.startsWith("$platform") && !(0, import_isActivePlatform.isActivePlatform)(property))) {
7992
+ var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
7993
+ process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
7994
+ var fullKey1 = "".concat(style3[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style3[import_helpers.StyleObjectPseudo] || "");
7995
+ fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[import_helpers.StyleObjectIdentifier], !0, !0));
7996
+ }
7997
+ }
7998
+ } catch (err) {
7999
+ _didIteratorError12 = !0, _iteratorError12 = err;
8000
+ } finally {
8001
+ try {
8002
+ !_iteratorNormalCompletion12 && _iterator12.return != null && _iterator12.return();
8003
+ } finally {
8004
+ if (_didIteratorError12) throw _iteratorError12;
8005
+ }
8006
+ }
8007
+ } else {
8008
+ var mergeMediaStyle = function(key5, val3) {
8009
+ var _styleState4;
8010
+ (_styleState4 = styleState).style || (_styleState4.style = {});
8011
+ var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState2[mediaKeyShort], importanceBump, debug);
8012
+ didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
8013
+ }, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
8014
+ if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
8015
+ if (!mediaState2[mediaKeyShort]) return process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u274C DISABLED ".concat(mediaKeyShort)), "continue";
8016
+ process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u2705 ENABLED ".concat(mediaKeyShort));
8017
+ }
8018
+ var mediaStyle1 = getSubStyle(styleState, key4, val2, !0), importanceBump = 0;
8019
+ if (isThemeMedia) {
8020
+ dynamicThemeAccess = !0;
8021
+ var mediaThemeName = mediaKeyShort.slice(6);
8022
+ if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) return "continue";
8023
+ } else if (isGroupMedia) {
8024
+ var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
8025
+ if (!groupContext) return process.env.NODE_ENV === "development" && debug && (0, import_log.log)("No parent with group prop, skipping styles: ".concat(groupName)), "continue";
8026
+ var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
8027
+ if (groupMediaKey) {
8028
+ mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
8029
+ var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
8030
+ if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP media ".concat(groupMediaKey, " active? ").concat(isActive)), !isActive) {
8031
+ for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
8032
+ return "continue";
8033
+ }
8034
+ importanceBump = 2;
8035
+ }
8036
+ if (groupPseudoKey) {
8037
+ pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
8038
+ var componentGroupPseudoState = (componentGroupState || // fallback to context initially
8039
+ context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
8040
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP pseudo ".concat(groupMediaKey, " active? ").concat(isActive1, ", priority ").concat(priority1)), !isActive1) {
8041
+ for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
8042
+ return "continue";
8043
+ }
8044
+ importanceBump = priority1;
8045
+ }
8046
+ }
8047
+ for (var subKey in mediaStyle1) {
8048
+ if (subKey === "space") {
8049
+ space = valInit.space;
8050
+ continue;
8051
+ }
8052
+ if (subKey[0] === "$") {
8053
+ if (!(0, import_isActivePlatform.isActivePlatform)(subKey)) continue;
8054
+ for (var subSubKey in mediaStyle1[subKey]) mergeMediaStyle(subSubKey, mediaStyle1[subKey][subSubKey]);
8055
+ } else mergeMediaStyle(subKey, mediaStyle1[subKey]);
8056
+ }
8057
+ }
8058
+ return "continue";
8059
+ }
8060
+ if (key4 === "pointerEvents") return viewProps[key4] = val2, "continue";
8061
+ if (
8062
+ // is HOC we can just pass through the styles as props
8063
+ // this fixes issues where style prop got merged with wrong priority
8064
+ !isHOC && (isValidStyleKey(key4, staticConfig) || import_constants.isAndroid && key4 === "elevation")
8065
+ ) return mergeStyle(styleState, key4, val2), "continue";
8066
+ isVariant || (viewProps[key4] = val2);
8067
+ }, keyInit = keyOg2, valInit = props[keyInit];
8068
+ if (accept) {
8069
+ var accepted = accept[keyInit];
8070
+ 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";
8071
+ }
8072
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys) return "continue";
8073
+ if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
8074
+ if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
8075
+ return "continue";
8076
+ }
8077
+ var valInitType = (typeof valInit > "u" ? "undefined" : _type_of(valInit)) > "u" ? "undefined" : _type_of1(valInit), isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
8078
+ if (0) {
8079
+ var isValidClassName, isMediaOrPseudo;
8080
+ if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses) var _styleState3;
8081
+ }
8082
+ if (!isValidStyleKeyInit) {
8083
+ if (!import_constants.isAndroid && keyInit === "elevationAndroid") return "continue";
8084
+ if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
8085
+ else if (keyInit.startsWith("data-")) return "continue";
8086
+ }
8087
+ if (keyInit === "dataSet") {
8088
+ for (var keyInit1 in valInit) viewProps["data-".concat(hyphenate(keyInit1))] = valInit[keyInit1];
8089
+ return "continue";
8090
+ }
8091
+ if (0) var didUseKeyInit;
8092
+ 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);
8093
+ if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
8094
+ var name2 = keyInit.split("-")[1];
8095
+ context != null && context.groups.subscribe && !(context != null && context.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
8096
+ }
8097
+ var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
8098
+ if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) return "continue";
8099
+ var shouldPassProp = !isStyleProp || // is in parent variants
8100
+ 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;
8101
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(" \u{1F511} ".concat(keyOg2).concat(keyInit !== keyOg2 ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), (0, import_log.log)({
8102
+ isVariant,
8103
+ valInit,
8104
+ shouldPassProp
8105
+ }), import_constants.isClient && (0, import_log.log)({
8106
+ variants,
8107
+ variant: variants == null ? void 0 : variants[keyInit],
8108
+ isVariant,
8109
+ isHOCShouldPassThrough,
8110
+ curProps: _object_spread2({}, styleState.curProps),
8111
+ parentStaticConfig
8112
+ })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant) || !noSkip && keyInit in import_skipProps.skipProps) return process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), "continue";
8113
+ (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
8114
+ var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
8115
+ if (!avoidPropMap) {
8116
+ if (!expanded) return "continue";
8117
+ var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
8118
+ next && (styleState.fontFamily = next);
8119
+ }
8120
+ if (process.env.NODE_ENV === "development" && debug === "verbose") {
8121
+ consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
8122
+ try {
8123
+ !import_constants.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
8124
+ expanded,
8125
+ styleProps,
8126
+ componentState,
8127
+ isVariant,
8128
+ variant: variants == null ? void 0 : variants[keyInit],
8129
+ shouldPassProp,
8130
+ isHOCShouldPassThrough,
8131
+ usedKeys: _object_spread2({}, usedKeys),
8132
+ curProps: _object_spread2({}, styleState.curProps)
8133
+ }), (0, import_log.log)("expanded", expanded, `
8134
+ usedKeys`, _object_spread2({}, usedKeys), `
8135
+ current`, _object_spread2({}, styleState.style)));
8136
+ } catch {
8137
+ }
8138
+ console.groupEnd();
8139
+ }
8140
+ for (var key4 = keyInit, val2 = valInit, max = expanded ? expanded.length : 1, i2 = 0; i2 < max; i2++) _loop22(i2);
8141
+ if (process.env.NODE_ENV === "development" && debug === "verbose") {
8142
+ try {
8143
+ (0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", _object_spread2({}, styleState.style)), (0, import_log.log)("transforms", _object_spread2({}, transforms)), (0, import_log.log)("viewProps", _object_spread2({}, viewProps));
8144
+ } catch {
8145
+ }
8146
+ console.groupEnd();
8147
+ }
8148
+ };
7818
8149
  conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
7819
8150
  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 = {
7820
8151
  // this should go away, right now we're doing really crazy cumulative props,
@@ -7850,311 +8181,24 @@ var require_getSplitStyles_native = __commonJS({
7850
8181
  theme: _object_spread2({}, theme)
7851
8182
  }), console.groupEnd());
7852
8183
  var 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;
7853
- for (var keyOg in props) {
7854
- var keyInit = keyOg, valInit = props[keyInit];
7855
- if (accept) {
7856
- var accepted = accept[keyInit];
7857
- if ((accepted === "style" || accepted === "textStyle") && valInit && ((typeof valInit > "u" ? "undefined" : _type_of(valInit)) > "u" ? "undefined" : _type_of1(valInit)) === "object") {
7858
- viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames);
7859
- continue;
7860
- }
7861
- }
7862
- if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
7863
- if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
7864
- if (keyInit === "group" && !1) var identifier, containerType, containerCSS;
7865
- continue;
7866
- }
7867
- var valInitType = (typeof valInit > "u" ? "undefined" : _type_of(valInit)) > "u" ? "undefined" : _type_of1(valInit), isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
7868
- if (0) {
7869
- var isValidClassName, isMediaOrPseudo;
7870
- if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses) var _styleState;
7871
- }
7872
- if (!isValidStyleKeyInit) {
7873
- if (!import_constants.isAndroid && keyInit === "elevationAndroid") continue;
7874
- if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
7875
- else if (keyInit.startsWith("data-")) continue;
7876
- }
7877
- if (keyInit === "dataSet") {
7878
- for (var keyInit1 in valInit) viewProps["data-".concat(hyphenate(keyInit1))] = valInit[keyInit1];
7879
- continue;
7880
- }
7881
- if (0) var didUseKeyInit;
7882
- 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);
7883
- if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
7884
- var name = keyInit.split("-")[1];
7885
- context != null && context.groups.subscribe && !(context != null && context.groups.state[name]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
7886
- }
7887
- var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
7888
- if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
7889
- var shouldPassProp = !isStyleProp || // is in parent variants
7890
- 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;
7891
- if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(" \u{1F511} ".concat(keyOg).concat(keyInit !== keyOg ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), (0, import_log.log)({
7892
- isVariant,
7893
- valInit,
7894
- shouldPassProp
7895
- }), import_constants.isClient && (0, import_log.log)({
7896
- variants,
7897
- variant: variants == null ? void 0 : variants[keyInit],
7898
- isVariant,
7899
- isHOCShouldPassThrough,
7900
- curProps: _object_spread2({}, styleState.curProps),
7901
- parentStaticConfig
7902
- })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) {
7903
- process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
7904
- continue;
7905
- }
7906
- if (!noSkip && keyInit in import_skipProps.skipProps) {
7907
- process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
7908
- continue;
7909
- }
7910
- (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
7911
- var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
7912
- if (!avoidPropMap) {
7913
- if (!expanded) continue;
7914
- var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
7915
- next && (styleState.fontFamily = next);
7916
- }
7917
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
7918
- consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
7919
- try {
7920
- !import_constants.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
7921
- expanded,
7922
- styleProps,
7923
- componentState,
7924
- isVariant,
7925
- variant: variants == null ? void 0 : variants[keyInit],
7926
- shouldPassProp,
7927
- isHOCShouldPassThrough,
7928
- usedKeys: _object_spread2({}, usedKeys),
7929
- curProps: _object_spread2({}, styleState.curProps)
7930
- }), (0, import_log.log)("expanded", expanded, `
7931
- usedKeys`, _object_spread2({}, usedKeys), `
7932
- current`, _object_spread2({}, styleState.style)));
7933
- } catch {
7934
- }
7935
- console.groupEnd();
7936
- }
7937
- for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) {
7938
- var _parentStaticConfig_variants;
7939
- if (expanded) {
7940
- var _expanded_i = _sliced_to_array(expanded[i], 2), k = _expanded_i[0], v = _expanded_i[1];
7941
- key = k, val = v;
7942
- }
7943
- if (val != null && !(key in usedKeys)) {
7944
- 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)) {
7945
- var _props_key;
7946
- viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
7947
- }
7948
- var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
7949
- if (shouldPassThrough1) {
7950
- passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(" - passing down prop ".concat(key)), (0, import_log.log)({
7951
- val,
7952
- after: _object_spread2({}, viewProps[key])
7953
- }), console.groupEnd());
7954
- continue;
7955
- }
7956
- if (isPseudo) {
7957
- if (!val) continue;
7958
- var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
7959
- if (!descriptor) continue;
7960
- if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
7961
- var _pseudos, _key;
7962
- if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") {
7963
- Object.assign(pseudos[key], pseudoStyleObject);
7964
- continue;
7965
- }
7966
- }
7967
- if (shouldDoClasses && !isExit) {
7968
- var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor);
7969
- process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key), (0, import_log.log)({
7970
- pseudoStyleObject,
7971
- pseudoStyles
7972
- }), console.groupEnd());
7973
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
7974
- try {
7975
- for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
7976
- var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
7977
- fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[import_helpers.StyleObjectIdentifier], isMediaOrPseudo1, !0));
7978
- }
7979
- } catch (err) {
7980
- _didIteratorError = !0, _iteratorError = err;
7981
- } finally {
7982
- try {
7983
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
7984
- } finally {
7985
- if (_didIteratorError) throw _iteratorError;
7986
- }
7987
- }
7988
- }
7989
- if (!shouldDoClasses || isExit || isEnter) {
7990
- var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
7991
- isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key, {
7992
- isDisabled
7993
- }), (0, import_log.log)({
7994
- pseudoStyleObject,
7995
- isDisabled,
7996
- descriptor,
7997
- componentState
7998
- }), console.groupEnd());
7999
- var importance = descriptor.priority;
8000
- for (var pkey in pseudoStyleObject) {
8001
- var val1 = pseudoStyleObject[pkey];
8002
- if (isDisabled) {
8003
- var defaultValues = animatableDefaults[pkey];
8004
- defaultValues != null && !(pkey in usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
8005
- } else {
8006
- var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
8007
- if (shouldMerge) {
8008
- var _pseudos1, _key1;
8009
- pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val1, mergeStyle(styleState, pkey, val1);
8010
- }
8011
- process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
8012
- importance,
8013
- curImportance,
8014
- pkey,
8015
- val: val1
8016
- });
8017
- }
8018
- }
8019
- if (!isDisabled) for (var key1 in val) {
8020
- var k1 = shorthands[key1] || key1;
8021
- usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
8022
- }
8023
- }
8024
- continue;
8025
- }
8026
- if (isMedia) {
8027
- if (!val) continue;
8028
- var hasSpace = val.space, mediaKeyShort = key.slice(1);
8029
- 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") {
8030
- var platform = key.slice(10);
8031
- if (
8032
- // supports web, ios, android
8033
- platform !== import_constants.currentPlatform && // supports web, native
8034
- platform !== "native"
8035
- ) continue;
8036
- }
8037
- if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key), {
8038
- key,
8039
- val,
8040
- props,
8041
- shouldDoClasses,
8042
- acceptsClassName,
8043
- componentState,
8044
- mediaState: mediaState2
8045
- }), shouldDoClasses) {
8046
- var mediaStyle = getSubStyle(styleState, key, val, !1);
8047
- if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
8048
- var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
8049
- importance1 && (space = val.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("Found more important space for current media ".concat(mediaKeyShort, ": ").concat(val, " (importance: ").concat(importance1, ")")));
8050
- }
8051
- var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
8052
- mediaStylesSeen += 1;
8053
- var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
8054
- try {
8055
- for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
8056
- var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
8057
- process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
8058
- var fullKey1 = "".concat(style[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style[import_helpers.StyleObjectPseudo] || "");
8059
- fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[import_helpers.StyleObjectIdentifier], !0, !0));
8060
- }
8061
- } catch (err) {
8062
- _didIteratorError1 = !0, _iteratorError1 = err;
8063
- } finally {
8064
- try {
8065
- !_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
8066
- } finally {
8067
- if (_didIteratorError1) throw _iteratorError1;
8068
- }
8069
- }
8070
- } else {
8071
- var isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
8072
- if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
8073
- if (!mediaState2[mediaKeyShort]) {
8074
- process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u274C DISABLED ".concat(mediaKeyShort));
8075
- continue;
8076
- }
8077
- process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u2705 ENABLED ".concat(mediaKeyShort));
8078
- }
8079
- var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
8080
- if (isThemeMedia) {
8081
- dynamicThemeAccess = !0;
8082
- var mediaThemeName = mediaKeyShort.slice(6);
8083
- if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) continue;
8084
- } else if (isGroupMedia) {
8085
- var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
8086
- if (!groupContext) {
8087
- process.env.NODE_ENV === "development" && debug && (0, import_log.log)("No parent with group prop, skipping styles: ".concat(groupName));
8088
- continue;
8089
- }
8090
- var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
8091
- if (groupMediaKey) {
8092
- mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
8093
- var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
8094
- if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP media ".concat(groupMediaKey, " active? ").concat(isActive)), !isActive) continue;
8095
- importanceBump = 2;
8096
- }
8097
- if (groupPseudoKey) {
8098
- pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
8099
- var componentGroupPseudoState = (componentGroupState || // fallback to context initially
8100
- context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
8101
- if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F3D8}\uFE0F GROUP pseudo ".concat(groupMediaKey, " active? ").concat(isActive1, ", priority ").concat(priority1)), !isActive1) continue;
8102
- importanceBump = priority1;
8103
- }
8104
- }
8105
- for (var subKey in mediaStyle1) {
8106
- var _styleState1;
8107
- if (subKey === "space") {
8108
- space = valInit.space;
8109
- continue;
8110
- }
8111
- (_styleState1 = styleState).style || (_styleState1.style = {}), mergeMediaByImportance(styleState, mediaKeyShort, subKey, mediaStyle1[subKey], usedKeys, mediaState2[mediaKeyShort], importanceBump, debug), key === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
8112
- }
8113
- }
8114
- continue;
8115
- }
8116
- if (key === "pointerEvents") {
8117
- viewProps[key] = val;
8118
- continue;
8119
- }
8120
- if (
8121
- // is HOC we can just pass through the styles as props
8122
- // this fixes issues where style prop got merged with wrong priority
8123
- !isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
8124
- ) {
8125
- mergeStyle(styleState, key, val);
8126
- continue;
8127
- }
8128
- isVariant || (viewProps[key] = val);
8129
- }
8130
- }
8131
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
8132
- try {
8133
- (0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", _object_spread2({}, styleState.style)), (0, import_log.log)("transforms", _object_spread2({}, transforms)), (0, import_log.log)("viewProps", _object_spread2({}, viewProps));
8134
- } catch {
8135
- }
8136
- console.groupEnd();
8137
- }
8138
- }
8139
- }
8140
- }
8184
+ for (var keyOg in props) _loop(keyOg);
8141
8185
  var avoidNormalize = styleProps.noNormalize === !1;
8142
8186
  if (!avoidNormalize) {
8143
8187
  if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants.isWeb && !isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
8144
- var _styleState2;
8145
- (_styleState2 = styleState).style || (_styleState2.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
8188
+ var _styleState;
8189
+ (_styleState = styleState).style || (_styleState.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
8146
8190
  var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
8147
8191
  return a.localeCompare(b);
8148
8192
  }).forEach(function(param) {
8149
- var _param = _sliced_to_array(param, 2), key6 = _param[0], val4 = _param[1];
8150
- mergeTransform(styleState.style, key6, val4, !0);
8193
+ var _param = _sliced_to_array(param, 2), key4 = _param[0], val2 = _param[1];
8194
+ mergeTransform(styleState.style, key4, val2, !0);
8151
8195
  });
8152
8196
  }
8153
8197
  if (parentSplitStyles) {
8154
- if (0) for (var key2 in parentSplitStyles.classNames) var val2;
8155
- if (!shouldDoClasses) for (var key3 in parentSplitStyles.style) {
8156
- var _styleState3;
8157
- key3 in classNames || styleState.style && key3 in styleState.style || ((_styleState3 = styleState).style || (_styleState3.style = {}), styleState.style[key3] = parentSplitStyles.style[key3]);
8198
+ if (0) for (var key in parentSplitStyles.classNames) var val;
8199
+ if (!shouldDoClasses) for (var key1 in parentSplitStyles.style) {
8200
+ var _styleState1;
8201
+ key1 in classNames || styleState.style && key1 in styleState.style || ((_styleState1 = styleState).style || (_styleState1.style = {}), styleState.style[key1] = parentSplitStyles.style[key1]);
8158
8202
  }
8159
8203
  }
8160
8204
  }
@@ -8163,9 +8207,9 @@ current`, _object_spread2({}, styleState.style)));
8163
8207
  if (styleState.style && shouldDoClasses) {
8164
8208
  var retainedStyles, shouldRetain;
8165
8209
  if (!styleState.style.$$css) {
8166
- var atomic, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2;
8210
+ var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
8167
8211
  try {
8168
- for (var _iterator2, _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) var atomicStyle, _props_animateOnly, _atomicStyle, key4, value, identifier1, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
8212
+ for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _atomicStyle, key2, value, identifier, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
8169
8213
  } catch (err) {
8170
8214
  } finally {
8171
8215
  try {
@@ -8174,8 +8218,8 @@ current`, _object_spread2({}, styleState.style)));
8174
8218
  }
8175
8219
  }
8176
8220
  if (transforms) for (var namespace in transforms) {
8177
- var _transforms_namespace, hash, val3, identifier2;
8178
- if (import_constants.isClient && !insertedTransforms[identifier2]) var rule;
8221
+ var _transforms_namespace, hash, val1, identifier1;
8222
+ if (import_constants.isClient && !insertedTransforms[identifier1]) var rule;
8179
8223
  }
8180
8224
  }
8181
8225
  if (isReactNative) {
@@ -8184,22 +8228,22 @@ current`, _object_spread2({}, styleState.style)));
8184
8228
  }
8185
8229
  var styleProp = props.style;
8186
8230
  if (styleProp) if (isHOC) viewProps.style = normalizeStyle(styleProp);
8187
- else for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i1 = 0; i1 < len; i1++) {
8188
- var style1 = isArray ? styleProp[i1] : styleProp;
8189
- if (style1) if (style1.$$css) Object.assign(styleState.classNames, style1);
8231
+ else for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i = 0; i < len; i++) {
8232
+ var style = isArray ? styleProp[i] : styleProp;
8233
+ if (style) if (style.$$css) Object.assign(styleState.classNames, style);
8190
8234
  else {
8191
- var _styleState4;
8192
- (_styleState4 = styleState).style || (_styleState4.style = {}), Object.assign(styleState.style, normalizeStyle(style1));
8235
+ var _styleState2;
8236
+ (_styleState2 = styleState).style || (_styleState2.style = {}), Object.assign(styleState.style, normalizeStyle(style));
8193
8237
  }
8194
8238
  }
8195
- var style2 = styleState.style;
8196
- if (style2 != null && style2.fontFamily) {
8197
- var _getFont, faceInfo = (_getFont = (0, import_config.getFont)(style2.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
8239
+ var style1 = styleState.style;
8240
+ if (style1 != null && style1.fontFamily) {
8241
+ var _getFont, faceInfo = (_getFont = (0, import_config.getFont)(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
8198
8242
  if (faceInfo) {
8199
- var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight, overrideFace = (_faceInfo_style_fontWeight = faceInfo[style2.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 || (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style2.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
8200
- overrideFace && (style2.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style2.fontWeight, delete style2.fontStyle);
8243
+ 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;
8244
+ overrideFace && (style1.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style1.fontWeight, delete style1.fontStyle);
8201
8245
  }
8202
- process.env.NODE_ENV === "development" && debug && debug !== "profile" && (0, import_log.log)("Found fontFamily native: ".concat(style2.fontFamily), faceInfo);
8246
+ process.env.NODE_ENV === "development" && debug && debug !== "profile" && (0, import_log.log)("Found fontFamily native: ".concat(style1.fontFamily), faceInfo);
8203
8247
  }
8204
8248
  var result = {
8205
8249
  space,
@@ -8215,13 +8259,13 @@ current`, _object_spread2({}, styleState.style)));
8215
8259
  mediaGroups
8216
8260
  }, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
8217
8261
  if (!asChildExceptStyleLike) {
8218
- var style3 = styleState.style;
8262
+ var style2 = styleState.style;
8219
8263
  if (0) {
8220
8264
  var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
8221
8265
  if (!styleProps.noMergeStyle && !(styleProps.isAnimated && !conf.animations.supportsCSSVars && isReactNative) && isReactNative) {
8222
- var cnStyles, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3;
8266
+ var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
8223
8267
  try {
8224
- for (var _iterator3, _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = !0) var name1;
8268
+ for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
8225
8269
  } catch (err) {
8226
8270
  } finally {
8227
8271
  try {
@@ -8229,7 +8273,7 @@ current`, _object_spread2({}, styleState.style)));
8229
8273
  }
8230
8274
  }
8231
8275
  }
8232
- } else style3 && !styleProps.noMergeStyle && (viewProps.style = style3);
8276
+ } else style2 && !styleProps.noMergeStyle && (viewProps.style = style2);
8233
8277
  }
8234
8278
  if (process.env.NODE_ENV === "development" && debug === "verbose" && import_isDevTools.isDevTools) {
8235
8279
  consoleGroupCollapsed("\u{1F539} getSplitStyles ===>");
@@ -8242,7 +8286,7 @@ current`, _object_spread2({}, styleState.style)));
8242
8286
  rulesToInsert,
8243
8287
  parentSplitStyles
8244
8288
  });
8245
- for (var key5 in logs) (0, import_log.log)(key5, logs[key5]);
8289
+ for (var key3 in logs) (0, import_log.log)(key3, logs[key3]);
8246
8290
  } catch {
8247
8291
  }
8248
8292
  console.groupEnd();
@@ -8357,6 +8401,10 @@ current`, _object_spread2({}, styleState.style)));
8357
8401
  }
8358
8402
  return import_constants.isWeb && Array.isArray(out.transform) && (out.transform = (0, import_transformsToString.transformsToString)(out.transform)), (0, import_expandStyles.fixStyles)(out), out;
8359
8403
  }
8404
+ function applyDefaultStyle(pkey, styleState) {
8405
+ var defaultValues = animatableDefaults[pkey];
8406
+ defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
8407
+ }
8360
8408
  }
8361
8409
  });
8362
8410
 
@@ -10182,11 +10230,11 @@ If you meant to do this, you can disable this warning - either change untilMeasu
10182
10230
  }, subscribeToContextGroup = function(param) {
10183
10231
  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;
10184
10232
  if (pseudoGroups || mediaGroups) {
10185
- var _componentContext_groups, current = {
10233
+ var _componentContext_groups_subscribe, _componentContext_groups, current = {
10186
10234
  pseudo: {},
10187
10235
  media: {}
10188
10236
  };
10189
- return process.env.NODE_ENV === "development" && !componentContext.groups && console.debug("No context group found"), (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 ? void 0 : _componentContext_groups.subscribe(function(name, param2) {
10237
+ return process.env.NODE_ENV === "development" && !componentContext.groups && console.debug("No context group found"), (_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) {
10190
10238
  var layout = param2.layout, pseudo = param2.pseudo, persist = function() {
10191
10239
  var group = _object_spread_props(_object_spread2({}, state.group), _define_property2({}, name, current));
10192
10240
  setStateShallow({