@tamagui/core 1.90.0 → 1.90.2

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.
@@ -2933,9 +2933,6 @@ var require_useMedia_native = __commonJS({
2933
2933
  mediaState: function() {
2934
2934
  return mediaState2;
2935
2935
  },
2936
- mergeMediaByImportance: function() {
2937
- return mergeMediaByImportance;
2938
- },
2939
2936
  setMediaShouldUpdate: function() {
2940
2937
  return setMediaShouldUpdate;
2941
2938
  },
@@ -3142,10 +3139,6 @@ var require_useMedia_native = __commonJS({
3142
3139
  var conf = (0, import_config.getConfig)(), importance = isSizeMedia && !conf.settings.mediaPropOrder ? getMediaKeyImportance(mediaKey) : defaultMediaImportance;
3143
3140
  return !importancesUsed[key] || importance > importancesUsed[key] ? importance : null;
3144
3141
  };
3145
- function mergeMediaByImportance(onto, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump) {
3146
- var importance = getMediaImportanceIfMoreImportant(mediaKey, key, importancesUsed, isSizeMedia);
3147
- return importanceBump && (importance = (importance || 0) + importanceBump), importance === null ? !1 : (importancesUsed[key] = importance, onto[key] = value, !0);
3148
- }
3149
3142
  function camelToHyphen(str) {
3150
3143
  return str.replace(/[A-Z]/g, function(m) {
3151
3144
  return "-".concat(m.toLowerCase());
@@ -7277,197 +7270,192 @@ var require_getSplitStyles_native = __commonJS({
7277
7270
  if (!(isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))) {
7278
7271
  var shouldPassProp = !isStyleProp || // is in parent variants
7279
7272
  isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
7280
- if (!(shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) && !(!styleProps.noSkip && keyInit in import_skipProps.skipProps)) {
7281
- (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
7282
- var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
7283
- if (!avoidPropMap) {
7284
- if (!expanded)
7285
- continue;
7286
- var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
7287
- next && (styleState.fontFamily = next);
7273
+ if (shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant) || !styleProps.noSkip && keyInit in import_skipProps.skipProps)
7274
+ continue;
7275
+ (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
7276
+ var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
7277
+ if (!avoidPropMap) {
7278
+ if (!expanded)
7279
+ continue;
7280
+ var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
7281
+ next && (styleState.fontFamily = next);
7282
+ }
7283
+ if (0)
7284
+ try {
7285
+ } catch (e) {
7288
7286
  }
7289
- if (0)
7290
- try {
7291
- } catch (e) {
7287
+ for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) {
7288
+ var _parentStaticConfig_variants1;
7289
+ if (expanded) {
7290
+ var _expanded_i = _sliced_to_array(expanded[i], 2), k = _expanded_i[0], v = _expanded_i[1];
7291
+ key = k, val = v;
7292
+ }
7293
+ if (val != null && !(key in usedKeys)) {
7294
+ 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) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) {
7295
+ var _props_key;
7296
+ viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
7292
7297
  }
7293
- for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) {
7294
- var _parentStaticConfig_variants1;
7295
- if (expanded) {
7296
- var _expanded_i = _sliced_to_array(expanded[i], 2), k = _expanded_i[0], v = _expanded_i[1];
7297
- key = k, val = v;
7298
+ var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants1 = parentStaticConfig.variants) === null || _parentStaticConfig_variants1 === void 0 ? void 0 : _parentStaticConfig_variants1[keyInit]));
7299
+ if (shouldPassThrough1) {
7300
+ passDownProp(viewProps, key, val, isMediaOrPseudo1);
7301
+ continue;
7298
7302
  }
7299
- if (val != null && !(key in usedKeys)) {
7300
- 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) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) {
7301
- var _props_key;
7302
- viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
7303
- }
7304
- var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants1 = parentStaticConfig.variants) === null || _parentStaticConfig_variants1 === void 0 ? void 0 : _parentStaticConfig_variants1[keyInit]));
7305
- if (shouldPassThrough1) {
7306
- passDownProp(viewProps, key, val, isMediaOrPseudo1);
7303
+ if (isPseudo) {
7304
+ if (!val)
7307
7305
  continue;
7308
- }
7309
- if (isPseudo) {
7310
- if (!val)
7311
- continue;
7312
- var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
7313
- if (!descriptor)
7306
+ var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
7307
+ if (!descriptor)
7308
+ continue;
7309
+ if (!shouldDoClasses || IS_STATIC) {
7310
+ var _pseudos, _key;
7311
+ if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), IS_STATIC) {
7312
+ Object.assign(pseudos[key], pseudoStyleObject);
7314
7313
  continue;
7315
- if (!shouldDoClasses || IS_STATIC) {
7316
- var _pseudos, _key;
7317
- if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), IS_STATIC) {
7318
- Object.assign(pseudos[key], pseudoStyleObject);
7319
- continue;
7320
- }
7321
7314
  }
7322
- if (shouldDoClasses && !isExit) {
7323
- var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
7315
+ }
7316
+ if (shouldDoClasses && !isExit) {
7317
+ var pseudoStyles = (0, import_getStylesAtomic.getStyleAtomic)(pseudoStyleObject, descriptor), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
7318
+ try {
7319
+ for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
7320
+ var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle.property).concat(PROP_SPLIT).concat(descriptor.name);
7321
+ fullKey in usedKeys || mergeClassName(transforms, classNames, fullKey, psuedoStyle.identifier, isMediaOrPseudo1, !0);
7322
+ }
7323
+ } catch (err) {
7324
+ _didIteratorError = !0, _iteratorError = err;
7325
+ } finally {
7324
7326
  try {
7325
- for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
7326
- var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle.property).concat(PROP_SPLIT).concat(descriptor.name);
7327
- fullKey in usedKeys || mergeClassName(transforms, classNames, fullKey, psuedoStyle.identifier, isMediaOrPseudo1, !0);
7328
- }
7329
- } catch (err) {
7330
- _didIteratorError = !0, _iteratorError = err;
7327
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
7331
7328
  } finally {
7332
- try {
7333
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
7334
- } finally {
7335
- if (_didIteratorError)
7336
- throw _iteratorError;
7337
- }
7329
+ if (_didIteratorError)
7330
+ throw _iteratorError;
7338
7331
  }
7339
7332
  }
7340
- if (!shouldDoClasses || isExit || isEnter) {
7341
- var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
7342
- isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted);
7343
- var importance = descriptor.priority;
7344
- for (var pkey in pseudoStyleObject) {
7345
- var val1 = pseudoStyleObject[pkey];
7346
- if (isDisabled) {
7347
- var defaultValues = animatableDefaults[pkey];
7348
- defaultValues != null && !(pkey in usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
7349
- } else {
7350
- var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
7351
- if (shouldMerge) {
7352
- var _pseudos1, _key1;
7353
- pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val1, mergeStyle(styleState, pkey, val1);
7354
- }
7333
+ }
7334
+ if (!shouldDoClasses || isExit || isEnter) {
7335
+ var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
7336
+ isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted);
7337
+ var importance = descriptor.priority;
7338
+ for (var pkey in pseudoStyleObject) {
7339
+ var val1 = pseudoStyleObject[pkey];
7340
+ if (isDisabled) {
7341
+ var defaultValues = animatableDefaults[pkey];
7342
+ defaultValues != null && !(pkey in usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
7343
+ } else {
7344
+ var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
7345
+ if (shouldMerge) {
7346
+ var _pseudos1, _key1;
7347
+ pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val1, mergeStyle(styleState, pkey, val1);
7355
7348
  }
7356
7349
  }
7357
- if (!isDisabled)
7358
- for (var key1 in val) {
7359
- var k1 = shorthands[key1] || key1;
7360
- usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
7361
- }
7362
7350
  }
7363
- continue;
7351
+ if (!isDisabled)
7352
+ for (var key1 in val) {
7353
+ var k1 = shorthands[key1] || key1;
7354
+ usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
7355
+ }
7364
7356
  }
7365
- if (isMedia) {
7366
- if (!val)
7357
+ continue;
7358
+ }
7359
+ if (isMedia) {
7360
+ if (!val)
7361
+ continue;
7362
+ if (isMedia === "platform") {
7363
+ var platform = key.slice(10);
7364
+ if (
7365
+ // supports web, ios, android
7366
+ platform !== import_constants.currentPlatform && // supports web, native
7367
+ platform !== "native"
7368
+ )
7367
7369
  continue;
7368
- if (isMedia === "platform") {
7369
- var platform = key.slice(10);
7370
- if (
7371
- // supports web, ios, android
7372
- platform !== import_constants.currentPlatform && // supports web, native
7373
- platform !== "native"
7374
- )
7375
- continue;
7370
+ }
7371
+ hasMedia || (hasMedia = !0);
7372
+ var mediaKeyShort = key.slice(1), hasSpace = val.space;
7373
+ if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
7374
+ var mediaStyle = getSubStyle(styleState, key, val, !1);
7375
+ if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
7376
+ var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
7377
+ importance1 && (space = val.space, usedKeys.space = importance1);
7376
7378
  }
7377
- hasMedia || (hasMedia = !0);
7378
- var mediaStyle = getSubStyle(
7379
- styleState,
7380
- key,
7381
- val,
7382
- // TODO try true like pseudo
7383
- !1
7384
- ), mediaKeyShort = key.slice(1), hasSpace = val.space;
7385
- if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
7386
- if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
7387
- var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
7388
- importance1 && (space = val.space, usedKeys.space = importance1);
7379
+ var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
7380
+ mediaStylesSeen += 1;
7381
+ var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
7382
+ try {
7383
+ for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
7384
+ var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority), fullKey1 = "".concat(style.property).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style.pseudo || "");
7385
+ fullKey1 in usedKeys || mergeClassName(transforms, classNames, fullKey1, out.identifier, !0, !0);
7389
7386
  }
7390
- var mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
7391
- mediaStylesSeen += 1;
7392
- var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
7387
+ } catch (err) {
7388
+ _didIteratorError1 = !0, _iteratorError1 = err;
7389
+ } finally {
7393
7390
  try {
7394
- for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
7395
- var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority), fullKey1 = "".concat(style.property).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style.pseudo || "");
7396
- fullKey1 in usedKeys || mergeClassName(transforms, classNames, fullKey1, out.identifier, !0, !0);
7397
- }
7398
- } catch (err) {
7399
- _didIteratorError1 = !0, _iteratorError1 = err;
7391
+ !_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
7400
7392
  } finally {
7401
- try {
7402
- !_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
7403
- } finally {
7404
- if (_didIteratorError1)
7405
- throw _iteratorError1;
7406
- }
7393
+ if (_didIteratorError1)
7394
+ throw _iteratorError1;
7407
7395
  }
7408
- } else {
7409
- var isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
7410
- if (!isThemeMedia && !isPlatformMedia && !isGroupMedia && !mediaState2[mediaKeyShort])
7396
+ }
7397
+ } else {
7398
+ var mediaStyle1 = getSubStyle(styleState, key, val, !0), isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
7399
+ if (!isThemeMedia && !isPlatformMedia && !isGroupMedia && !mediaState2[mediaKeyShort])
7400
+ continue;
7401
+ var importanceBump = 0;
7402
+ if (isThemeMedia) {
7403
+ dynamicThemeAccess = !0;
7404
+ var mediaThemeName = mediaKeyShort.slice(6);
7405
+ if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
7411
7406
  continue;
7412
- var importanceBump = 0;
7413
- if (isThemeMedia) {
7414
- dynamicThemeAccess = !0;
7415
- var mediaThemeName = mediaKeyShort.slice(6);
7416
- if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
7417
- continue;
7418
- } else if (isGroupMedia) {
7419
- var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
7420
- if (!groupContext)
7407
+ } else if (isGroupMedia) {
7408
+ var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
7409
+ if (!groupContext)
7410
+ continue;
7411
+ var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
7412
+ if (groupMediaKey) {
7413
+ mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
7414
+ var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
7415
+ if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
7421
7416
  continue;
7422
- var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
7423
- if (groupMediaKey) {
7424
- mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
7425
- var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
7426
- if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
7427
- continue;
7428
- importanceBump = 2;
7429
- }
7430
- if (groupPseudoKey) {
7431
- pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
7432
- var componentGroupPseudoState = (componentGroupState || // fallback to context initially
7433
- context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey];
7434
- if (!isActive1)
7435
- continue;
7436
- var priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
7437
- importanceBump = priority1;
7438
- }
7417
+ importanceBump = 2;
7439
7418
  }
7440
- for (var subKey in mediaStyle) {
7441
- var _styleState2;
7442
- if (subKey === "space") {
7443
- space = valInit.space;
7419
+ if (groupPseudoKey) {
7420
+ pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
7421
+ var componentGroupPseudoState = (componentGroupState || // fallback to context initially
7422
+ context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey];
7423
+ if (!isActive1)
7444
7424
  continue;
7445
- }
7446
- (_styleState2 = styleState).style || (_styleState2.style = {}), (0, import_useMedia.mergeMediaByImportance)(styleState.style, mediaKeyShort, subKey, mediaStyle[subKey], usedKeys, mediaState2[mediaKeyShort], importanceBump), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
7425
+ var priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
7426
+ importanceBump = priority1;
7447
7427
  }
7448
7428
  }
7449
- continue;
7450
- }
7451
- if (key === "pointerEvents") {
7452
- viewProps[key] = val;
7453
- continue;
7454
- }
7455
- if (
7456
- // is HOC we can just pass through the styles as props
7457
- // this fixes issues where style prop got merged with wrong priority
7458
- !isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
7459
- ) {
7460
- mergeStyle(styleState, key, val);
7461
- continue;
7429
+ for (var subKey in mediaStyle1) {
7430
+ var _styleState2;
7431
+ if (subKey === "space") {
7432
+ space = valInit.space;
7433
+ continue;
7434
+ }
7435
+ (_styleState2 = styleState).style || (_styleState2.style = {}), mergeMediaByImportance(styleState, mediaKeyShort, subKey, mediaStyle1[subKey], usedKeys, mediaState2[mediaKeyShort], importanceBump), key === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
7436
+ }
7462
7437
  }
7463
- isVariant || (viewProps[key] = val);
7438
+ continue;
7464
7439
  }
7465
- }
7466
- if (0)
7467
- try {
7468
- } catch (e) {
7440
+ if (key === "pointerEvents") {
7441
+ viewProps[key] = val;
7442
+ continue;
7443
+ }
7444
+ if (
7445
+ // is HOC we can just pass through the styles as props
7446
+ // this fixes issues where style prop got merged with wrong priority
7447
+ !isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
7448
+ ) {
7449
+ mergeStyle(styleState, key, val);
7450
+ continue;
7469
7451
  }
7452
+ isVariant || (viewProps[key] = val);
7453
+ }
7470
7454
  }
7455
+ if (0)
7456
+ try {
7457
+ } catch (e) {
7458
+ }
7471
7459
  }
7472
7460
  }
7473
7461
  }
@@ -7500,9 +7488,9 @@ var require_getSplitStyles_native = __commonJS({
7500
7488
  }
7501
7489
  var avoidNormalize = styleProps.noNormalize === !1;
7502
7490
  if (!avoidNormalize) {
7503
- if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.transforms) {
7491
+ if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
7504
7492
  var _styleState4;
7505
- (_styleState4 = styleState).style || (_styleState4.style = {}), Object.entries(styleState.transforms).sort(function(param, param1) {
7493
+ (_styleState4 = styleState).style || (_styleState4.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
7506
7494
  var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
7507
7495
  return a.localeCompare(b);
7508
7496
  }).forEach(function(param) {
@@ -7609,7 +7597,7 @@ var require_getSplitStyles_native = __commonJS({
7609
7597
  classNames[key] = val, (_usedKeys = usedKeys)[_key = key] || (_usedKeys[_key] = 1);
7610
7598
  } else if (key in import_helpers.stylePropsTransform) {
7611
7599
  var _styleState;
7612
- (_styleState = styleState).transforms || (_styleState.transforms = {}), styleState.transforms[key] = val;
7600
+ (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
7613
7601
  } else {
7614
7602
  var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
7615
7603
  if (
@@ -7680,6 +7668,10 @@ var require_getSplitStyles_native = __commonJS({
7680
7668
  } else
7681
7669
  viewProps[key] = val;
7682
7670
  }
7671
+ function mergeMediaByImportance(styleState, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump) {
7672
+ var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, importancesUsed, isSizeMedia);
7673
+ return importanceBump && (importance = (importance || 0) + importanceBump), importance === null ? !1 : (importancesUsed[key] = importance, mergeStyle(styleState, key, value), !0);
7674
+ }
7683
7675
  }
7684
7676
  });
7685
7677
 
@@ -8732,9 +8724,9 @@ var require_createComponent_native = __commonJS({
8732
8724
  };
8733
8725
  disposeGroupsListener = componentContext.groups.subscribe(function(name2, param) {
8734
8726
  var layout = param.layout, pseudo = param.pseudo, persist = function() {
8727
+ var group = _object_spread_props(_object_spread2({}, state.group), _define_property2({}, name2, current));
8735
8728
  setStateShallow({
8736
- // force it to be referentially different so it always updates
8737
- group: _object_spread_props(_object_spread2({}, state.group), _define_property2({}, name2, current))
8729
+ group
8738
8730
  });
8739
8731
  };
8740
8732
  if (pseudo && pseudoGroups != null && pseudoGroups.has(name2))
@@ -8753,18 +8745,18 @@ var require_createComponent_native = __commonJS({
8753
8745
  pseudoGroups ? Object.keys(_to_consumable_array(pseudoGroups)).join("") : 0,
8754
8746
  mediaGroups ? Object.keys(_to_consumable_array(mediaGroups)).join("") : 0
8755
8747
  ]);
8756
- var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = runtimeHoverStyle || onHoverIn || onHoverOut, isHoverable = import_constants.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !!(attachFocus || attachPress || isHoverable || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), events = shouldAttach && !isDisabled && !props.asChild ? _object_spread2(_object_spread_props(_object_spread2({
8748
+ var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimeHoverStyle), events = shouldAttach && !isDisabled && !props.asChild ? _object_spread2(_object_spread_props(_object_spread2({
8757
8749
  onPressOut: attachPress ? function(e) {
8758
8750
  unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
8759
8751
  } : void 0
8760
- }, (isHoverable || attachPress) && {
8752
+ }, (attachHover || attachPress) && {
8761
8753
  onMouseEnter: function(e) {
8762
8754
  var next = {};
8763
- needsHoverState && (next.hover = !0), runtimePressStyle && state.pressIn && (next.press = !0), setStateShallow(next), onHoverIn == null || onHoverIn(e), onMouseEnter == null || onMouseEnter(e);
8755
+ needsHoverState && (next.hover = !0), needsPressState && state.pressIn && (next.press = !0), setStateShallow(next), onHoverIn == null || onHoverIn(e), onMouseEnter == null || onMouseEnter(e);
8764
8756
  },
8765
8757
  onMouseLeave: function(e) {
8766
8758
  var next = {};
8767
- mouseUps.add(unPress), needsHoverState && (next.hover = !1), runtimePressStyle && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
8759
+ mouseUps.add(unPress), needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
8768
8760
  }
8769
8761
  }), {
8770
8762
  onPressIn: attachPress ? function(e) {