tamagui 1.129.12 → 1.129.14

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
@@ -2981,39 +2981,39 @@ var require_pseudoDescriptors_native = __commonJS({
2981
2981
  // order of keys here important! in priority order
2982
2982
  hoverStyle: {
2983
2983
  name: "hover",
2984
- priority: 1
2984
+ priority: 2
2985
2985
  },
2986
2986
  pressStyle: {
2987
2987
  name: "active",
2988
2988
  stateKey: "press",
2989
- priority: 2
2989
+ priority: 3
2990
2990
  },
2991
2991
  focusVisibleStyle: {
2992
2992
  name: "focus-visible",
2993
- priority: 3,
2993
+ priority: 4,
2994
2994
  stateKey: "focusVisible"
2995
2995
  },
2996
2996
  focusStyle: {
2997
2997
  name: "focus",
2998
- priority: 3
2998
+ priority: 4
2999
2999
  },
3000
3000
  focusWithinStyle: {
3001
3001
  name: "focus-within",
3002
- priority: 3,
3002
+ priority: 4,
3003
3003
  stateKey: "focusWithin"
3004
3004
  },
3005
3005
  disabledStyle: {
3006
3006
  name: "disabled",
3007
- priority: 4,
3007
+ priority: 5,
3008
3008
  stateKey: "disabled"
3009
3009
  }
3010
3010
  }, pseudoPriorities = {
3011
- hover: 1,
3012
- press: 2,
3013
- focus: 3,
3014
- focusVisible: 3,
3015
- focusWithin: 3,
3016
- disabled: 4
3011
+ hover: pseudoDescriptorsBase.hoverStyle.priority,
3012
+ press: pseudoDescriptorsBase.pressStyle.priority,
3013
+ focus: pseudoDescriptorsBase.focusStyle.priority,
3014
+ focusVisible: pseudoDescriptorsBase.focusVisibleStyle.priority,
3015
+ focusWithin: pseudoDescriptorsBase.focusWithinStyle.priority,
3016
+ disabled: pseudoDescriptorsBase.disabledStyle.priority
3017
3017
  }, pseudoDescriptors = {
3018
3018
  ...pseudoDescriptorsBase,
3019
3019
  enterStyle: {
@@ -3258,9 +3258,9 @@ var require_useMedia_native = __commonJS({
3258
3258
  }
3259
3259
  return res;
3260
3260
  }
3261
- var getMediaImportanceIfMoreImportant = function(mediaKey, key, importancesUsed, isSizeMedia) {
3262
- var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance;
3263
- return !importancesUsed[key] || importance > importancesUsed[key] ? importance : null;
3261
+ var getMediaImportanceIfMoreImportant = function(mediaKey, key, styleState, isSizeMedia) {
3262
+ var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance, usedKeys = styleState.usedKeys;
3263
+ return !usedKeys[key] || importance > usedKeys[key] ? importance : null;
3264
3264
  };
3265
3265
  function camelToHyphen(str) {
3266
3266
  return str.replace(/[A-Z]/g, function(m) {
@@ -3549,6 +3549,81 @@ var require_index_native11 = __commonJS({
3549
3549
  }
3550
3550
  });
3551
3551
 
3552
+ // ../../packages/is-equal-shallow/dist/cjs/index.native.js
3553
+ var require_index_native12 = __commonJS({
3554
+ "../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
3555
+ "use strict";
3556
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
3557
+ for (var name in all) __defProp2(target, name, {
3558
+ get: all[name],
3559
+ enumerable: !0
3560
+ });
3561
+ }, __copyProps2 = function(to, from, except, desc) {
3562
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
3563
+ if (from && typeof from == "object" || typeof from == "function") try {
3564
+ for (var _loop = function() {
3565
+ var key = _step.value;
3566
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
3567
+ get: function() {
3568
+ return from[key];
3569
+ },
3570
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
3571
+ });
3572
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
3573
+ } catch (err) {
3574
+ _didIteratorError = !0, _iteratorError = err;
3575
+ } finally {
3576
+ try {
3577
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
3578
+ } finally {
3579
+ if (_didIteratorError)
3580
+ throw _iteratorError;
3581
+ }
3582
+ }
3583
+ return to;
3584
+ }, __toCommonJS2 = function(mod) {
3585
+ return __copyProps2(__defProp2({}, "__esModule", {
3586
+ value: !0
3587
+ }), mod);
3588
+ }, index_exports2 = {};
3589
+ __export2(index_exports2, {
3590
+ isEqualShallow: function() {
3591
+ return isEqualShallow;
3592
+ },
3593
+ mergeIfNotShallowEqual: function() {
3594
+ return mergeIfNotShallowEqual;
3595
+ },
3596
+ useCreateShallowSetState: function() {
3597
+ return useCreateShallowSetState;
3598
+ }
3599
+ });
3600
+ module2.exports = __toCommonJS2(index_exports2);
3601
+ var import_react3 = require("react");
3602
+ function useCreateShallowSetState(setter, debug) {
3603
+ return (0, import_react3.useCallback)(function(stateOrGetState) {
3604
+ setter(function(prev) {
3605
+ var next = typeof stateOrGetState == "function" ? stateOrGetState(prev) : stateOrGetState, update = mergeIfNotShallowEqual(prev, next);
3606
+ if (process.env.NODE_ENV === "development" && debug && update !== prev && (console.groupCollapsed("setStateShallow CHANGE", "=>", update), console.info("previously", prev), console.trace(), console.groupEnd(), debug === "break")) debugger;
3607
+ return update;
3608
+ });
3609
+ }, [
3610
+ setter,
3611
+ debug
3612
+ ]);
3613
+ }
3614
+ function mergeIfNotShallowEqual(prev, next) {
3615
+ return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
3616
+ ...prev,
3617
+ ...next
3618
+ };
3619
+ }
3620
+ function isEqualShallow(prev, next) {
3621
+ for (var key in next) if (prev[key] !== next[key]) return !1;
3622
+ return !0;
3623
+ }
3624
+ }
3625
+ });
3626
+
3552
3627
  // ../../core/web/dist/cjs/constants/isDevTools.native.js
3553
3628
  var require_isDevTools_native = __commonJS({
3554
3629
  "../../core/web/dist/cjs/constants/isDevTools.native.js"(exports2, module2) {
@@ -3796,13 +3871,55 @@ var require_ComponentContext_native = __commonJS({
3796
3871
  inText: !1,
3797
3872
  language: null,
3798
3873
  animationDriver: null,
3799
- setParentFocusState: null,
3800
- groups: {
3801
- emit: null,
3802
- subscribe: null,
3803
- state: {}
3874
+ setParentFocusState: null
3875
+ });
3876
+ }
3877
+ });
3878
+
3879
+ // ../../core/web/dist/cjs/contexts/GroupContext.native.js
3880
+ var require_GroupContext_native = __commonJS({
3881
+ "../../core/web/dist/cjs/contexts/GroupContext.native.js"(exports2, module2) {
3882
+ "use strict";
3883
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
3884
+ for (var name in all) __defProp2(target, name, {
3885
+ get: all[name],
3886
+ enumerable: !0
3887
+ });
3888
+ }, __copyProps2 = function(to, from, except, desc) {
3889
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
3890
+ if (from && typeof from == "object" || typeof from == "function") try {
3891
+ for (var _loop = function() {
3892
+ var key = _step.value;
3893
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
3894
+ get: function() {
3895
+ return from[key];
3896
+ },
3897
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
3898
+ });
3899
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
3900
+ } catch (err) {
3901
+ _didIteratorError = !0, _iteratorError = err;
3902
+ } finally {
3903
+ try {
3904
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
3905
+ } finally {
3906
+ if (_didIteratorError)
3907
+ throw _iteratorError;
3908
+ }
3909
+ }
3910
+ return to;
3911
+ }, __toCommonJS2 = function(mod) {
3912
+ return __copyProps2(__defProp2({}, "__esModule", {
3913
+ value: !0
3914
+ }), mod);
3915
+ }, GroupContext_exports = {};
3916
+ __export2(GroupContext_exports, {
3917
+ GroupContext: function() {
3918
+ return GroupContext2;
3804
3919
  }
3805
3920
  });
3921
+ module2.exports = __toCommonJS2(GroupContext_exports);
3922
+ var import_react3 = require("react"), GroupContext2 = /* @__PURE__ */ (0, import_react3.createContext)(null);
3806
3923
  }
3807
3924
  });
3808
3925
 
@@ -4711,7 +4828,7 @@ var require_normalize_color = __commonJS({
4711
4828
  });
4712
4829
 
4713
4830
  // ../../core/normalize-css-color/dist/cjs/index.native.js
4714
- var require_index_native12 = __commonJS({
4831
+ var require_index_native13 = __commonJS({
4715
4832
  "../../core/normalize-css-color/dist/cjs/index.native.js"(exports2, module2) {
4716
4833
  "use strict";
4717
4834
  var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
@@ -4834,7 +4951,7 @@ var require_normalizeColor_native = __commonJS({
4834
4951
  }
4835
4952
  });
4836
4953
  module2.exports = __toCommonJS2(normalizeColor_exports);
4837
- var import_normalize_css_color = require_index_native12(), import_normalize_css_color2 = require_index_native12(), normalizeColor = function(color, opacity) {
4954
+ var import_normalize_css_color = require_index_native13(), import_normalize_css_color2 = require_index_native13(), normalizeColor = function(color, opacity) {
4838
4955
  if (color) {
4839
4956
  if (color[0] === "$") return color;
4840
4957
  if (color.startsWith("var(")) {
@@ -6410,7 +6527,7 @@ var require_getSplitStyles_native = __commonJS({
6410
6527
  function isValidStyleKey(key, validStyles, accept) {
6411
6528
  return key in validStyles ? !0 : accept && key in accept;
6412
6529
  }
6413
- var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, elementType, startedUnhydrated, debug) {
6530
+ var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug) {
6414
6531
  var _loop = function(keyOg2) {
6415
6532
  var keyInit = keyOg2, valInit = props[keyInit];
6416
6533
  if (keyInit === "children") return viewProps[keyInit] = valInit, "continue";
@@ -6419,12 +6536,12 @@ var require_getSplitStyles_native = __commonJS({
6419
6536
  var accepted = accept[keyInit];
6420
6537
  if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass), "continue";
6421
6538
  }
6422
- if (process.env.NODE_ENV, disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys) return "continue";
6539
+ if (process.env.NODE_ENV, disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className") return "continue";
6423
6540
  if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
6424
6541
  if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
6425
6542
  return "continue";
6426
6543
  }
6427
- var valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles, accept);
6544
+ var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles, accept);
6428
6545
  if (0) var _viewProps2, _dataSet;
6429
6546
  if (!isValidStyleKeyInit) {
6430
6547
  if (!import_constants4.isAndroid && keyInit === "elevationAndroid") return "continue";
@@ -6438,13 +6555,13 @@ var require_getSplitStyles_native = __commonJS({
6438
6555
  if (0) var didUseKeyInit;
6439
6556
  var isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo);
6440
6557
  if (isMediaOrPseudo && keyInit.startsWith("$group-")) {
6441
- var parts = keyInit.split("-");
6558
+ var parts = keyInit.split("-"), plen = parts.length;
6442
6559
  if (
6443
6560
  // check if its actually a simple group selector to avoid breaking selectors
6444
- parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
6561
+ plen === 2 || plen === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
6445
6562
  ) {
6446
6563
  var name2 = parts[1];
6447
- componentContext != null && componentContext.groups.subscribe && !(componentContext != null && componentContext.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
6564
+ groupContext && !(groupContext != null && groupContext[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
6448
6565
  }
6449
6566
  }
6450
6567
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
@@ -6460,6 +6577,9 @@ var require_getSplitStyles_native = __commonJS({
6460
6577
  variant: variants == null ? void 0 : variants[keyInit],
6461
6578
  isVariant,
6462
6579
  isHOCShouldPassThrough,
6580
+ usedKeys: {
6581
+ ...styleState.usedKeys
6582
+ },
6463
6583
  parentStaticConfig
6464
6584
  })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !noSkip && keyInit in import_skipProps.skipProps) return "continue";
6465
6585
  (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
@@ -6470,13 +6590,13 @@ var require_getSplitStyles_native = __commonJS({
6470
6590
  viewProps[key4] = val2;
6471
6591
  return;
6472
6592
  }
6473
- if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" \u{1F4A0} expanded", keyInit, "=>", key4), (0, import_log.log)(val2), console.groupEnd()), val2 != null && !(key4 in usedKeys)) {
6593
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" \u{1F4A0} expanded", keyInit, "=>", key4), (0, import_log.log)(val2), console.groupEnd()), val2 != null) {
6474
6594
  if (key4 === "pointerEvents") {
6475
6595
  viewProps[key4] = val2;
6476
6596
  return;
6477
6597
  }
6478
6598
  if (!isHOC && isValidStyleKey(key4, validStyles, accept) || import_constants4.isAndroid && key4 === "elevation") {
6479
- mergeStyle(styleState, key4, val2);
6599
+ mergeStyle(styleState, key4, val2, 1);
6480
6600
  return;
6481
6601
  }
6482
6602
  if (isPseudo = key4 in import_helpers.validPseudoKeys, isMedia = !isPseudo && (0, import_useMedia.isMediaKey)(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants && key4 in variants, inlineProps != null && inlineProps.has(key4) || process.env.IS_STATIC === "is_static" && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key4)) {
@@ -6512,7 +6632,7 @@ var require_getSplitStyles_native = __commonJS({
6512
6632
  try {
6513
6633
  for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
6514
6634
  var psuedoStyle = _step2.value, fullKey = `${psuedoStyle[import_helpers.StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
6515
- fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers.StyleObjectIdentifier]);
6635
+ addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers.StyleObjectIdentifier];
6516
6636
  }
6517
6637
  } catch (err) {
6518
6638
  _didIteratorError2 = !0, _iteratorError2 = err;
@@ -6539,13 +6659,13 @@ var require_getSplitStyles_native = __commonJS({
6539
6659
  var _$val = pseudoStyleObject[pkey];
6540
6660
  if (isDisabled) applyDefaultStyle(pkey, styleState);
6541
6661
  else {
6542
- var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
6662
+ var curImportance = styleState.usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
6543
6663
  if (shouldMerge) {
6544
6664
  if (process.env.IS_STATIC === "is_static") {
6545
6665
  var _pseudos1, _key1;
6546
6666
  pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
6547
6667
  }
6548
- mergeStyle(styleState, pkey, _$val);
6668
+ mergeStyle(styleState, pkey, _$val, importance);
6549
6669
  }
6550
6670
  process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
6551
6671
  importance,
@@ -6557,7 +6677,7 @@ var require_getSplitStyles_native = __commonJS({
6557
6677
  }
6558
6678
  if (!isDisabled) for (var _$key in val2) {
6559
6679
  var k = shorthands[_$key] || _$key;
6560
- usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
6680
+ styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
6561
6681
  }
6562
6682
  }
6563
6683
  return;
@@ -6566,7 +6686,7 @@ var require_getSplitStyles_native = __commonJS({
6566
6686
  if (!val2) return;
6567
6687
  var hasSpace = val2.space, mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
6568
6688
  if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && ((!hasMedia || typeof hasMedia == "boolean") && (hasMedia = /* @__PURE__ */ new Set()), hasMedia.add(mediaKeyShort)), isMedia === "platform" && !(0, import_isActivePlatform.isActivePlatform)(key4)) return;
6569
- if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key4}`, {
6689
+ process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key4}`, {
6570
6690
  key: key4,
6571
6691
  val: val2,
6572
6692
  props,
@@ -6574,15 +6694,15 @@ var require_getSplitStyles_native = __commonJS({
6574
6694
  acceptsClassName,
6575
6695
  componentState,
6576
6696
  mediaState: mediaState3
6577
- }), shouldDoClasses) {
6697
+ });
6698
+ var priority = mediaStylesSeen;
6699
+ if (mediaStylesSeen += 1, shouldDoClasses) {
6578
6700
  var mediaStyle = getSubStyle(styleState, key4, val2, !1);
6579
6701
  if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
6580
- var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
6581
- 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 ${mediaKeyShort}: ${val2} (importance: ${importance1})`));
6702
+ var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", styleState, !0);
6703
+ importance1 && (space = val2.space, styleState.usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(`Found more important space for current media ${mediaKeyShort}: ${val2} (importance: ${importance1})`));
6582
6704
  }
6583
- var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
6584
- mediaStylesSeen += 1;
6585
- var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
6705
+ var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
6586
6706
  try {
6587
6707
  for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
6588
6708
  var style3 = _step12.value, property = style3[import_helpers.StyleObjectProperty], isSubStyle = property[0] === "$";
@@ -6590,7 +6710,7 @@ var require_getSplitStyles_native = __commonJS({
6590
6710
  var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
6591
6711
  process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
6592
6712
  var subKey = isSubStyle ? style3[2] : "", fullKey1 = `${style3[import_helpers.StyleObjectProperty]}${subKey}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers.StyleObjectPseudo] || ""}`;
6593
- fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers.StyleObjectIdentifier]);
6713
+ addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers.StyleObjectIdentifier];
6594
6714
  }
6595
6715
  }
6596
6716
  } catch (err) {
@@ -6606,7 +6726,7 @@ var require_getSplitStyles_native = __commonJS({
6606
6726
  var mergeMediaStyle2 = function(key5, val3) {
6607
6727
  var _styleState4;
6608
6728
  (_styleState4 = styleState).style || (_styleState4.style = {});
6609
- var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState3[mediaKeyShort], importanceBump, debug);
6729
+ var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState3[mediaKeyShort], importanceBump, debug);
6610
6730
  didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
6611
6731
  }, mergeMediaStyle = mergeMediaStyle2, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
6612
6732
  if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
@@ -6628,12 +6748,12 @@ var require_getSplitStyles_native = __commonJS({
6628
6748
  scheme,
6629
6749
  val: _$val1,
6630
6750
  oppositeVal
6631
- }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]);
6751
+ }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority);
6632
6752
  }
6633
6753
  } else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
6634
6754
  } else if (isGroupMedia) {
6635
- var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = componentContext == null ? void 0 : componentContext.groups.state[groupName];
6636
- if (!groupContext) {
6755
+ var _groupContext_groupName, _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupState = groupContext == null || (_groupContext_groupName = groupContext[groupName]) === null || _groupContext_groupName === void 0 ? void 0 : _groupContext_groupName.state;
6756
+ if (!groupState) {
6637
6757
  process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
6638
6758
  return;
6639
6759
  }
@@ -6641,17 +6761,30 @@ var require_getSplitStyles_native = __commonJS({
6641
6761
  if (groupMediaKey) {
6642
6762
  mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
6643
6763
  var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
6644
- 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 ${groupMediaKey} active? ${isActive}`), !isActive) {
6764
+ if (!mediaState1 && groupState.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupState.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP media ${groupMediaKey} active? ${isActive}`, {
6765
+ ...mediaState1,
6766
+ usedKeys: {
6767
+ ...styleState.usedKeys
6768
+ }
6769
+ }), !isActive) {
6645
6770
  for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
6646
6771
  return;
6647
6772
  }
6648
6773
  importanceBump = 2;
6649
6774
  }
6650
6775
  if (groupPseudoKey) {
6776
+ var _this;
6651
6777
  pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
6652
- var componentGroupPseudoState = (componentGroupState || // fallback to context initially
6653
- componentContext.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
6654
- if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`), !isActive1) {
6778
+ var componentGroupPseudoState = (_this = componentGroupState || // fallback to context initially
6779
+ (groupContext == null ? void 0 : groupContext[groupName].state)) === null || _this === void 0 ? void 0 : _this.pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
6780
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`, {
6781
+ componentGroupPseudoState: {
6782
+ ...componentGroupPseudoState
6783
+ },
6784
+ usedKeys: {
6785
+ ...styleState.usedKeys
6786
+ }
6787
+ }), !isActive1) {
6655
6788
  for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
6656
6789
  return;
6657
6790
  }
@@ -6682,6 +6815,8 @@ var require_getSplitStyles_native = __commonJS({
6682
6815
  ...styleState.style
6683
6816
  }), (0, import_log.log)("viewProps", {
6684
6817
  ...viewProps
6818
+ }), (0, import_log.log)("transforms", {
6819
+ ...styleState.flatTransforms
6685
6820
  });
6686
6821
  } catch {
6687
6822
  }
@@ -6691,7 +6826,7 @@ var require_getSplitStyles_native = __commonJS({
6691
6826
  conf = conf || (0, import_config.getConfig)();
6692
6827
  var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
6693
6828
  import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6694
- var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
6829
+ var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
6695
6830
  process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
6696
6831
  var styleState = {
6697
6832
  classNames,
@@ -6702,7 +6837,7 @@ var require_getSplitStyles_native = __commonJS({
6702
6837
  staticConfig,
6703
6838
  style: null,
6704
6839
  theme,
6705
- usedKeys,
6840
+ usedKeys: {},
6706
6841
  viewProps,
6707
6842
  context: componentContext,
6708
6843
  debug
@@ -6715,7 +6850,7 @@ var require_getSplitStyles_native = __commonJS({
6715
6850
  }
6716
6851
  }));
6717
6852
  }
6718
- process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants4.isClient && (console.groupCollapsed("getSplitStyles (collapsed)"), (0, import_log.log)({
6853
+ process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants4.isClient && import_isDevTools.isDevTools && (console.groupCollapsed("\u{1F539} getSplitStyles \u{1F447}"), (0, import_log.log)({
6719
6854
  props,
6720
6855
  staticConfig,
6721
6856
  shouldDoClasses,
@@ -6726,7 +6861,7 @@ var require_getSplitStyles_native = __commonJS({
6726
6861
  theme: {
6727
6862
  ...theme
6728
6863
  }
6729
- }), console.groupEnd());
6864
+ }));
6730
6865
  var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
6731
6866
  for (var keyOg in props) _loop(keyOg);
6732
6867
  process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-propsend`;
@@ -6808,8 +6943,8 @@ var require_getSplitStyles_native = __commonJS({
6808
6943
  }
6809
6944
  } else style2 && (viewProps.style = style2);
6810
6945
  }
6811
- if (process.env.NODE_ENV === "development" && debug === "verbose" && import_isDevTools.isDevTools) {
6812
- console.groupCollapsed("\u{1F539} getSplitStyles ===>");
6946
+ if (process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants4.isClient && import_isDevTools.isDevTools) {
6947
+ console.groupEnd(), console.groupCollapsed("\u{1F539} getSplitStyles ===>");
6813
6948
  try {
6814
6949
  var logs = {
6815
6950
  ...result,
@@ -6835,11 +6970,11 @@ var require_getSplitStyles_native = __commonJS({
6835
6970
  mergeTransform(target, key, val, !0);
6836
6971
  });
6837
6972
  }
6838
- function mergeStyle(styleState, key, val) {
6839
- var disableNormalize = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, { viewProps, styleProps, staticConfig } = styleState;
6840
- if (key in import_helpers.stylePropsTransform) {
6973
+ function mergeStyle(styleState, key, val, importance) {
6974
+ var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig, usedKeys } = styleState, existingImportance = usedKeys[key] || 0;
6975
+ if (!(existingImportance > importance)) if (key in import_helpers.stylePropsTransform) {
6841
6976
  var _styleState;
6842
- (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
6977
+ (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
6843
6978
  } else {
6844
6979
  var shouldNormalize = import_constants4.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
6845
6980
  if (
@@ -6848,7 +6983,7 @@ var require_getSplitStyles_native = __commonJS({
6848
6983
  ) viewProps[key] = out;
6849
6984
  else {
6850
6985
  var _styleState1;
6851
- (_styleState1 = styleState).style || (_styleState1.style = {}), styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
6986
+ (_styleState1 = styleState).style || (_styleState1.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
6852
6987
  // if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
6853
6988
  key === "transform" && Array.isArray(out) ? [
6854
6989
  ...out
@@ -6879,8 +7014,8 @@ var require_getSplitStyles_native = __commonJS({
6879
7014
  }
6880
7015
  return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
6881
7016
  }, useInsertEffectCompat = import_constants4.isWeb ? import_react3.default.useInsertionEffect || import_constants4.useIsomorphicLayoutEffect : function() {
6882
- }, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k) {
6883
- var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k);
7017
+ }, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l) {
7018
+ var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l);
6884
7019
  return res;
6885
7020
  };
6886
7021
  function addStyleToInsertRules(rulesToInsert, styleObject) {
@@ -6925,14 +7060,14 @@ var require_getSplitStyles_native = __commonJS({
6925
7060
  delete viewProps[key], viewProps[key] = next;
6926
7061
  } else viewProps[key] = val;
6927
7062
  }
6928
- function mergeMediaByImportance(styleState, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump, debugProp) {
6929
- var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, importancesUsed, isSizeMedia);
6930
- if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)(`mergeMediaByImportance ${key} importance existing ${importancesUsed[key]} next ${importance}`), importance === null) return !1;
6931
- if (importancesUsed[key] = importance, key in import_pseudoDescriptors.pseudoDescriptors) {
7063
+ function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp) {
7064
+ var usedKeys = styleState.usedKeys, importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, styleState, isSizeMedia);
7065
+ if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)(`mergeMediaByImportance ${key} importance usedKey ${usedKeys[key]} next ${importance}`), importance === null) return !1;
7066
+ if (key in import_pseudoDescriptors.pseudoDescriptors) {
6932
7067
  var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
6933
7068
  if (isDisabled) return !1;
6934
- for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
6935
- } else mergeStyle(styleState, key, value);
7069
+ for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
7070
+ } else mergeStyle(styleState, key, value, importance);
6936
7071
  return !0;
6937
7072
  }
6938
7073
  function normalizeStyle(style) {
@@ -6945,7 +7080,7 @@ var require_getSplitStyles_native = __commonJS({
6945
7080
  }
6946
7081
  function applyDefaultStyle(pkey, styleState) {
6947
7082
  var defaultValues = animatableDefaults[pkey];
6948
- defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
7083
+ defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues, 1);
6949
7084
  }
6950
7085
  }
6951
7086
  });
@@ -7066,84 +7201,6 @@ var require_setElementProps_native = __commonJS({
7066
7201
  }
7067
7202
  });
7068
7203
 
7069
- // ../../packages/is-equal-shallow/dist/cjs/index.native.js
7070
- var require_index_native13 = __commonJS({
7071
- "../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
7072
- "use strict";
7073
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
7074
- for (var name in all) __defProp2(target, name, {
7075
- get: all[name],
7076
- enumerable: !0
7077
- });
7078
- }, __copyProps2 = function(to, from, except, desc) {
7079
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
7080
- if (from && typeof from == "object" || typeof from == "function") try {
7081
- for (var _loop = function() {
7082
- var key = _step.value;
7083
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
7084
- get: function() {
7085
- return from[key];
7086
- },
7087
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
7088
- });
7089
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
7090
- } catch (err) {
7091
- _didIteratorError = !0, _iteratorError = err;
7092
- } finally {
7093
- try {
7094
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
7095
- } finally {
7096
- if (_didIteratorError)
7097
- throw _iteratorError;
7098
- }
7099
- }
7100
- return to;
7101
- }, __toCommonJS2 = function(mod) {
7102
- return __copyProps2(__defProp2({}, "__esModule", {
7103
- value: !0
7104
- }), mod);
7105
- }, index_exports2 = {};
7106
- __export2(index_exports2, {
7107
- isEqualShallow: function() {
7108
- return isEqualShallow;
7109
- },
7110
- mergeIfNotShallowEqual: function() {
7111
- return mergeIfNotShallowEqual;
7112
- },
7113
- useCreateShallowSetState: function() {
7114
- return useCreateShallowSetState;
7115
- }
7116
- });
7117
- module2.exports = __toCommonJS2(index_exports2);
7118
- var import_react3 = require("react");
7119
- function useCreateShallowSetState(setter, debugIn) {
7120
- return (0, import_react3.useCallback)(function(next) {
7121
- setter(function(prev) {
7122
- return mergeIfNotShallowEqual(prev, next, debugIn);
7123
- });
7124
- }, [
7125
- setter,
7126
- debugIn
7127
- ]);
7128
- }
7129
- function mergeIfNotShallowEqual(prev, next, debug) {
7130
- if (!prev || !next || isEqualShallow(prev, next)) return prev || next;
7131
- if (process.env.NODE_ENV === "development" && debug && (console.info("setStateShallow CHANGE", {
7132
- prev,
7133
- next
7134
- }), debug === "break")) debugger;
7135
- return {
7136
- ...prev,
7137
- ...next
7138
- };
7139
- }
7140
- function isEqualShallow(prev, next) {
7141
- for (var key in next) if (prev[key] !== next[key]) return !1;
7142
- return !0;
7143
- }
7144
- }
7145
- });
7146
-
7147
7204
  // ../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js
7148
7205
  var require_subscribeToContextGroup_native = __commonJS({
7149
7206
  "../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
@@ -7187,31 +7244,58 @@ var require_subscribeToContextGroup_native = __commonJS({
7187
7244
  }
7188
7245
  });
7189
7246
  module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
7190
- var import_useMedia = require_useMedia_native(), import_is_equal_shallow = require_index_native13(), subscribeToContextGroup = function(param) {
7191
- var { setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
7247
+ var import_is_equal_shallow = require_index_native12(), import_useMedia = require_useMedia_native(), subscribeToContextGroup = function(props) {
7248
+ var { pseudoGroups, mediaGroups, groupContext } = props;
7192
7249
  if (pseudoGroups || mediaGroups) {
7193
- var _componentContext_groups_subscribe, _componentContext_groups;
7194
- 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) {
7195
- var { layout, pseudo } = param2, _state_group, current = ((_state_group = state.group) === null || _state_group === void 0 ? void 0 : _state_group[name]) || {
7250
+ process.env.NODE_ENV === "development" && !groupContext && console.debug("No context group found");
7251
+ var disposables = /* @__PURE__ */ new Set();
7252
+ if (pseudoGroups) for (var _i = 0, _iter = [
7253
+ ...pseudoGroups
7254
+ ]; _i < _iter.length; _i++) {
7255
+ var name = _iter[_i];
7256
+ disposables.add(createGroupListener(name, props));
7257
+ }
7258
+ if (mediaGroups) for (var _i1 = 0, _iter1 = [
7259
+ ...mediaGroups
7260
+ ]; _i1 < _iter1.length; _i1++) {
7261
+ var name1 = _iter1[_i1];
7262
+ disposables.add(createGroupListener(name1, props));
7263
+ }
7264
+ return function() {
7265
+ disposables.forEach(function(d) {
7266
+ return d();
7267
+ });
7268
+ };
7269
+ }
7270
+ }, createGroupListener = function(name, param) {
7271
+ var { setStateShallow, pseudoGroups, mediaGroups, groupContext } = param, parent = groupContext == null ? void 0 : groupContext[name];
7272
+ return parent ? parent.subscribe(function(param2) {
7273
+ var { layout, pseudo } = param2;
7274
+ setStateShallow(function(prev) {
7275
+ var _prev_group, didChange = !1, group = ((_prev_group = prev.group) === null || _prev_group === void 0 ? void 0 : _prev_group[name]) || {
7196
7276
  pseudo: {},
7197
7277
  media: {}
7198
7278
  };
7199
- if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
7200
- else if (layout && mediaGroups) {
7201
- var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(current.media || {}, mediaState3);
7202
- next !== current.media && (Object.assign(current.media, next), persist());
7203
- }
7204
- function persist() {
7205
- var group = {
7206
- ...state.group,
7207
- [name]: current
7208
- };
7209
- setStateShallow({
7210
- group
7211
- });
7279
+ if (pseudo && pseudoGroups != null && pseudoGroups.has(name)) {
7280
+ var _group;
7281
+ (_group = group).pseudo || (_group.pseudo = {});
7282
+ var next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.pseudo, pseudo);
7283
+ next !== group.pseudo && (Object.assign(group.pseudo, pseudo), didChange = !0);
7284
+ } else if (layout && mediaGroups) {
7285
+ var _group1;
7286
+ (_group1 = group).media || (_group1.media = {});
7287
+ var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next1 = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState3);
7288
+ next1 !== group.media && (Object.assign(group.media, next1), didChange = !0);
7212
7289
  }
7290
+ return didChange ? {
7291
+ group: {
7292
+ ...prev.group,
7293
+ [name]: group
7294
+ }
7295
+ } : prev;
7213
7296
  });
7214
- }
7297
+ }) : function() {
7298
+ };
7215
7299
  };
7216
7300
  }
7217
7301
  });
@@ -7305,7 +7389,7 @@ var require_useThemeState_native = __commonJS({
7305
7389
  var _keys_current, _props_needsUpdate, local = localStates.get(id), needsUpdate = isRoot || props.name === "light" || props.name === "dark" || props.name === null ? !0 : HasRenderedOnce.get(keys) ? !(keys == null || (_keys_current = keys.current) === null || _keys_current === void 0) && _keys_current.size ? !0 : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : !0, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
7306
7390
  return PendingUpdate.delete(id), (!local || rerender) && (local = {
7307
7391
  ...next
7308
- }, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id} \u{1FA84} ${rerender}`, local.name, ">", next.name), console.info({
7392
+ }, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id} getSnapshot ${rerender}`, local.name, ">", next.name), console.info({
7309
7393
  props,
7310
7394
  propsKey,
7311
7395
  isRoot,
@@ -7340,7 +7424,7 @@ var require_useThemeState_native = __commonJS({
7340
7424
  themes || (themes = (0, import_config.getConfig)().themes);
7341
7425
  var name = !propsKey && (!lastState || !(lastState != null && lastState.isNew)) ? null : getNewThemeName(parentState == null ? void 0 : parentState.name, props, pendingUpdate === "force" ? !0 : !!needsUpdate), isSameAsParent = parentState && (!name || name === parentState.name), shouldRerender = !!(needsUpdate && (pendingUpdate || (lastState == null ? void 0 : lastState.name) !== (parentState == null ? void 0 : parentState.name)));
7342
7426
  if (process.env.NODE_ENV === "development" && debug && debug !== "profile") {
7343
- var message = ` \xB7 useTheme(${id}) => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
7427
+ var message = ` \xB7 useTheme(${id}) getNextState => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
7344
7428
  console.info(message);
7345
7429
  }
7346
7430
  if (isSameAsParent) return [
@@ -8210,8 +8294,8 @@ var require_useComponentState_native = __commonJS({
8210
8294
  }
8211
8295
  });
8212
8296
  module2.exports = __toCommonJS2(useComponentState_exports);
8213
- var import_constants4 = require_index_native6(), import_is_equal_shallow = require_index_native13(), import_use_did_finish_ssr = require_index_native14(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, param, staticConfig, config) {
8214
- var { animationDriver } = param, _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(needsHydration && !isHydrated), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
8297
+ var import_constants4 = require_index_native6(), import_is_equal_shallow = require_index_native12(), import_use_did_finish_ssr = require_index_native14(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, animationDriver, staticConfig, config) {
8298
+ var _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(needsHydration && !isHydrated), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
8215
8299
  stateRef.current || (stateRef.current = {});
8216
8300
  var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
8217
8301
  !needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
@@ -8234,9 +8318,7 @@ var require_useComponentState_native = __commonJS({
8234
8318
  var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
8235
8319
  ...states[0],
8236
8320
  [props.forceStyle]: !0
8237
- } : states[0], setState = states[1];
8238
- stateRef.current.nextComponentState && (Object.assign(state, stateRef.current.nextComponentState), stateRef.current.nextComponentState = void 0);
8239
- var isAnimated = willBeAnimated;
8321
+ } : states[0], setState = states[1], isAnimated = willBeAnimated;
8240
8322
  import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), state.disabled = disabled, setState(function(_) {
8241
8323
  return {
8242
8324
  ...state
@@ -8259,46 +8341,6 @@ var require_useComponentState_native = __commonJS({
8259
8341
  isClassNameDisabled
8260
8342
  }));
8261
8343
  }
8262
- if (groupName && !curStateRef.group) {
8263
- var listeners = /* @__PURE__ */ new Set();
8264
- curStateRef.group = {
8265
- listeners,
8266
- emit(name, state2) {
8267
- listeners.forEach(function(l) {
8268
- return l(name, state2);
8269
- });
8270
- },
8271
- subscribe(cb) {
8272
- return listeners.add(cb), setStateShallow({
8273
- hasDynGroupChildren: !0
8274
- }), function() {
8275
- listeners.delete(cb), listeners.size === 0 && setStateShallow({
8276
- hasDynGroupChildren: !1
8277
- });
8278
- };
8279
- }
8280
- };
8281
- }
8282
- if (!curStateRef.stateEmitter && hasAnimationProp) {
8283
- var listeners1 = /* @__PURE__ */ new Set();
8284
- curStateRef.stateEmitter = {
8285
- listeners: listeners1,
8286
- emit(state2) {
8287
- listeners1.forEach(function(l) {
8288
- return l(state2);
8289
- });
8290
- },
8291
- subscribe(cb) {
8292
- return listeners1.add(cb), setStateShallow({
8293
- hasDynGroupChildren: !0
8294
- }), function() {
8295
- listeners1.delete(cb), listeners1.size === 0 && setStateShallow({
8296
- hasDynGroupChildren: !1
8297
- });
8298
- };
8299
- }
8300
- };
8301
- }
8302
8344
  return {
8303
8345
  startedUnhydrated,
8304
8346
  curStateRef,
@@ -8548,17 +8590,26 @@ var require_createComponent_native = __commonJS({
8548
8590
  }
8549
8591
  });
8550
8592
  module2.exports = __toCommonJS2(createComponent_exports);
8551
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), time2, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
8593
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_is_equal_shallow = require_index_native12(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), time2, NextState = /* @__PURE__ */ new WeakMap(), debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
8594
+ "hover",
8595
+ "press",
8596
+ "pressIn",
8597
+ "group",
8598
+ "focus",
8599
+ "focusWithin",
8600
+ "media",
8601
+ "group"
8602
+ ]);
8552
8603
  if (0) var cancelTouches;
8553
8604
  var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
8554
8605
  value: !1
8555
8606
  };
8556
- import_constants4.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
8557
- lastInteractionWasKeyboard.value = !0;
8607
+ import_constants4.isWeb && typeof document < "u" && (document.addEventListener("keydown", function() {
8608
+ lastInteractionWasKeyboard.value || (lastInteractionWasKeyboard.value = !0);
8558
8609
  }), document.addEventListener("mousedown", function() {
8559
- lastInteractionWasKeyboard.value = !1;
8610
+ lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
8560
8611
  }), document.addEventListener("mousemove", function() {
8561
- lastInteractionWasKeyboard.value = !1;
8612
+ lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
8562
8613
  }));
8563
8614
  function createComponent2(staticConfig) {
8564
8615
  var _staticConfig_defaultProps, { componentName } = staticConfig, config = null, defaultProps = staticConfig.defaultProps;
@@ -8589,7 +8640,7 @@ var require_createComponent_native = __commonJS({
8589
8640
  var _propsIn_datatestrenders, _current, _;
8590
8641
  (_ = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _ !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
8591
8642
  }
8592
- var componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
8643
+ var styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
8593
8644
  if (context && (contextValue = import_react3.default.useContext(context), contextValue)) {
8594
8645
  process.env.NODE_ENV === "development" && (propsIn == null ? void 0 : propsIn.debug) === "verbose" && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
8595
8646
  for (var key in context.props) {
@@ -8614,7 +8665,7 @@ var require_createComponent_native = __commonJS({
8614
8665
  var componentName2 = props.componentName || staticConfig.componentName;
8615
8666
  process.env.NODE_ENV === "development" && import_constants4.isClient && import_react3.default.useEffect(function() {
8616
8667
  var overlay = null, debugVisualizerHandler = function() {
8617
- var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = curStateRef.host;
8668
+ var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = stateRef.current.host;
8618
8669
  if (node) if (show) {
8619
8670
  overlay = document.createElement("span"), overlay.style.inset = "0px", overlay.style.zIndex = "1000000", overlay.style.position = "absolute", overlay.style.borderColor = "red", overlay.style.borderWidth = "1px", overlay.style.borderStyle = "dotted";
8620
8671
  var dataAt = node.getAttribute("data-at") || "", dataIn = node.getAttribute("data-in") || "", tooltip = document.createElement("span");
@@ -8627,7 +8678,51 @@ var require_createComponent_native = __commonJS({
8627
8678
  }, [
8628
8679
  componentName2
8629
8680
  ]);
8630
- var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState, setStateShallow = componentState.setStateShallow;
8681
+ var componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContextParent = import_react3.default.useContext(import_GroupContext.GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, animationDriver, staticConfig, config), { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState;
8682
+ hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
8683
+ var pendingState = NextState.get(stateRef);
8684
+ pendingState && (setStateShallow(pendingState), NextState.set(stateRef, void 0));
8685
+ });
8686
+ var allGroupContexts = (0, import_react3.useMemo)(function() {
8687
+ var _stateRef_current_group;
8688
+ if (!groupName) return groupContextParent;
8689
+ (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
8690
+ var listeners = /* @__PURE__ */ new Set();
8691
+ return stateRef.current.group = {
8692
+ listeners,
8693
+ emit(state2) {
8694
+ listeners.forEach(function(l) {
8695
+ return l(state2);
8696
+ });
8697
+ },
8698
+ subscribe(cb) {
8699
+ return listeners.add(cb), listeners.size === 1 && setStateShallow({
8700
+ hasDynGroupChildren: !0
8701
+ }), function() {
8702
+ listeners.delete(cb), listeners.size === 0 && setStateShallow({
8703
+ hasDynGroupChildren: !1
8704
+ });
8705
+ };
8706
+ }
8707
+ }, {
8708
+ ...groupContextParent,
8709
+ [groupName]: {
8710
+ state: {
8711
+ pseudo: import_defaultComponentState.defaultComponentStateMounted
8712
+ },
8713
+ subscribe: function(listener) {
8714
+ var _stateRef_current_group2, dispose = (_stateRef_current_group2 = stateRef.current.group) === null || _stateRef_current_group2 === void 0 ? void 0 : _stateRef_current_group2.subscribe(listener);
8715
+ return function() {
8716
+ dispose == null || dispose();
8717
+ };
8718
+ }
8719
+ }
8720
+ };
8721
+ }, [
8722
+ stateRef,
8723
+ groupName,
8724
+ groupContextParent
8725
+ ]), setStateShallow = componentState.setStateShallow;
8631
8726
  process.env.NODE_ENV === "development" && time2 && time2`use-state`;
8632
8727
  var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants4.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
8633
8728
  animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
@@ -8636,14 +8731,14 @@ var require_createComponent_native = __commonJS({
8636
8731
  // things declaratively
8637
8732
  !animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
8638
8733
  var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
8639
- process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (curStateRef.themeShallow = !0);
8734
+ process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (stateRef.current.themeShallow = !0);
8640
8735
  var themeStateProps = {
8641
8736
  componentName: componentName2,
8642
8737
  disable: disableTheme,
8643
- shallow: curStateRef.themeShallow,
8738
+ shallow: stateRef.current.themeShallow,
8644
8739
  debug: debugProp
8645
8740
  };
8646
- if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
8741
+ if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof stateRef.current.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
8647
8742
  return !!stateRef.current.isListeningToTheme;
8648
8743
  }), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
8649
8744
  var name = `${componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (noClass ? "(noClass)" : " ") + (state.press || state.pressIn ? "(PRESSED)" : " ") + (state.hover ? "(HOVERED)" : " ") + (state.focus ? "(FOCUSED)" : " ") + (state.focusWithin ? "(WITHIN FOCUSED)" : " ") + ((presenceState == null ? void 0 : presenceState.isPresent) === !1 ? "(EXIT)" : ""), dataIs = propsIn["data-is"] || "", banner = `<${name} /> ${internalID} ${dataIs ? ` ${dataIs}` : ""} ${type.trim()}`;
@@ -8663,7 +8758,8 @@ var require_createComponent_native = __commonJS({
8663
8758
  themeStateProps
8664
8759
  }), (0, import_log.log)({
8665
8760
  contextProps: styledContextProps,
8666
- overriddenContextProps
8761
+ overriddenContextProps,
8762
+ componentContext
8667
8763
  }), (0, import_log.log)({
8668
8764
  presence,
8669
8765
  isAnimated,
@@ -8692,33 +8788,53 @@ var require_createComponent_native = __commonJS({
8692
8788
  noMergeStyle: isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles)
8693
8789
  }, themeName = (themeState == null ? void 0 : themeState.name) || "";
8694
8790
  process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
8695
- var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
8696
- if (hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders) {
8697
- var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
8698
- setStateShallow = function(next) {
8699
- var avoidReRenderKeys = /* @__PURE__ */ new Set([
8700
- "hover",
8701
- "press",
8702
- "pressIn"
8703
- ]), canAvoidReRender = Object.keys(next).every(function(key3) {
8704
- return avoidReRenderKeys.has(key3);
8791
+ var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
8792
+ if (groupContext) {
8793
+ var groupState = groupContext == null ? void 0 : groupContext.state;
8794
+ if (groupState && groupState.layout === void 0) {
8795
+ var _splitStyles_style, _splitStyles_style1;
8796
+ (!((_splitStyles_style = splitStyles.style) === null || _splitStyles_style === void 0) && _splitStyles_style.width || !((_splitStyles_style1 = splitStyles.style) === null || _splitStyles_style1 === void 0) && _splitStyles_style1.height) && (groupState.layout = {
8797
+ width: fromPx(splitStyles.style.width),
8798
+ height: fromPx(splitStyles.style.height)
8705
8799
  });
8706
- if (canAvoidReRender && styleListener) {
8707
- var updatedState = {
8708
- ...state,
8709
- ...next
8710
- };
8711
- stateRef.current.nextComponentState = updatedState;
8712
- var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
8713
- styleListener(nextStyles.style);
8714
- } else ogSetStateShallow(next);
8800
+ }
8801
+ }
8802
+ if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
8803
+ var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
8804
+ stateRef.current.setStateShallow = function(nextOrGetNext) {
8805
+ var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
8806
+ if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
8807
+ var canAvoidReRender = Object.keys(next).every(function(key3) {
8808
+ return avoidReRenderKeys.has(key3);
8809
+ });
8810
+ if (canAvoidReRender) {
8811
+ var updatedState = {
8812
+ ...prev,
8813
+ ...next
8814
+ };
8815
+ NextState.set(stateRef, updatedState), process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && (console.groupCollapsed("[\u26A1\uFE0F] avoid setState", next, {
8816
+ updatedState,
8817
+ props
8818
+ }), console.info(stateRef.current.host), console.groupEnd());
8819
+ var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
8820
+ if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
8821
+ var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
8822
+ styleListener(nextStyles.style);
8823
+ } else process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && console.info("[\u{1F40C}] re-render", {
8824
+ canAvoidReRender,
8825
+ next
8826
+ }), ogSetStateShallow(next);
8827
+ }
8828
+ }, setStateShallow = function(state2) {
8829
+ var _stateRef_current_setStateShallow, _stateRef_current;
8830
+ (_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
8715
8831
  };
8716
8832
  }
8717
- if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !curStateRef.hasMeasured) {
8833
+ if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
8718
8834
  var _splitStyles;
8719
8835
  (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
8720
8836
  }
8721
- curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
8837
+ splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
8722
8838
  var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
8723
8839
  process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
8724
8840
  var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
@@ -8773,18 +8889,18 @@ var require_createComponent_native = __commonJS({
8773
8889
  }
8774
8890
  process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
8775
8891
 
8776
- If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
8777
- var layout = e.nativeEvent.layout;
8778
- stateRef.current.group.layout = layout, stateRef.current.group.emit(groupName, {
8892
+ If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
8893
+ var _stateRef_current_group, layout = e.nativeEvent.layout;
8894
+ groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
8779
8895
  layout
8780
8896
  }), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
8781
8897
  return {
8782
8898
  ...prev
8783
8899
  };
8784
8900
  }), stateRef.current.hasMeasured = !0;
8785
- })), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curStateRef.willHydrate)) || nonTamaguiProps, curStateRef.composedRef || (curStateRef.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
8901
+ })), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, stateRef.current.willHydrate)) || nonTamaguiProps, stateRef.current.composedRef || (stateRef.current.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
8786
8902
  return stateRef.current.host = x;
8787
- }, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants4.isWeb && !isHOC && import_react3.default.Children.toArray(props.children).forEach(function(item) {
8903
+ }, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = stateRef.current.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants4.isWeb && !isHOC && import_react3.default.Children.toArray(props.children).forEach(function(item) {
8788
8904
  typeof item == "string" && item !== `
8789
8905
  ` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
8790
8906
  }), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
@@ -8826,18 +8942,21 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8826
8942
  });
8827
8943
  return;
8828
8944
  }
8829
- var dispose = !disabled && (pseudoGroups || mediaGroups) ? (0, import_subscribeToContextGroup.subscribeToContextGroup)({
8830
- componentContext,
8831
- setStateShallow,
8832
- state,
8833
- mediaGroups,
8834
- pseudoGroups
8835
- }) : null;
8836
8945
  return function() {
8837
- dispose == null || dispose(), componentSetStates.delete(setState);
8946
+ componentSetStates.delete(setState);
8838
8947
  };
8839
8948
  }, [
8840
8949
  state.unmounted,
8950
+ disabled
8951
+ ]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
8952
+ if (!disabled && !(!pseudoGroups && !mediaGroups) && allGroupContexts) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
8953
+ groupContext: allGroupContexts,
8954
+ setStateShallow,
8955
+ mediaGroups,
8956
+ pseudoGroups
8957
+ });
8958
+ }, [
8959
+ allGroupContexts,
8841
8960
  disabled,
8842
8961
  pseudoGroups ? Object.keys([
8843
8962
  ...pseudoGroups
@@ -8845,24 +8964,13 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8845
8964
  mediaGroups ? Object.keys([
8846
8965
  ...mediaGroups
8847
8966
  ]).join("") : 0
8848
- ]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
8849
- var _curStateRef_group;
8850
- if (groupName) {
8851
- curStateRef.group.emit(groupName, {
8852
- pseudo: state,
8853
- layout: (_curStateRef_group = curStateRef.group) === null || _curStateRef_group === void 0 ? void 0 : _curStateRef_group.layout
8854
- });
8855
- var groupContextState = componentContext == null ? void 0 : componentContext.groups;
8856
- if (groupContextState) {
8857
- var next = {
8858
- ...groupContextState[groupName],
8859
- ...state
8860
- };
8861
- groupContextState[groupName] = next;
8862
- }
8863
- }
8967
+ ]);
8968
+ var groupEmitter = stateRef.current.group;
8969
+ (0, import_constants4.useIsomorphicLayoutEffect)(function() {
8970
+ !groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state);
8864
8971
  }, [
8865
- groupName,
8972
+ groupContext,
8973
+ groupEmitter,
8866
8974
  state
8867
8975
  ]);
8868
8976
  var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), hasDynamicGroupChildren = !!(groupName && state.hasDynGroupChildren), attachPress = !!(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(hasDynamicGroupChildren || runtimeHoverStyle), attachHover = import_constants4.isWeb && !!(hasDynamicGroupChildren || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(hasDynamicGroupChildren || runtimePressStyle);
@@ -8889,7 +8997,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8889
8997
  },
8890
8998
  onMouseLeave: function(e) {
8891
8999
  var next = {};
8892
- needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
9000
+ needsHoverState && (next.hover = !1), needsPressState && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
8893
9001
  }
8894
9002
  },
8895
9003
  onPressIn: attachPress ? function(e) {
@@ -8908,24 +9016,16 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8908
9016
  },
8909
9017
  ...attachFocus && {
8910
9018
  onFocus: function(e) {
8911
- componentContext.setParentFocusState && componentContext.setParentFocusState({
8912
- focusWithin: !0
8913
- }), pseudos != null && pseudos.focusVisibleStyle ? setTimeout(function() {
8914
- setStateShallow({
8915
- focus: !0,
8916
- focusVisible: !!lastInteractionWasKeyboard.value
8917
- });
8918
- }, 0) : setStateShallow({
8919
- focus: !0,
8920
- focusVisible: !1
8921
- }), onFocus == null || onFocus(e);
9019
+ var next = {};
9020
+ componentContext.setParentFocusState && (next.focusWithin = !0), pseudos != null && pseudos.focusVisibleStyle && lastInteractionWasKeyboard.value ? next.focusVisible = !0 : next.focus = !0, setStateShallow(next), onFocus == null || onFocus(e);
8922
9021
  },
8923
9022
  onBlur: function(e) {
8924
9023
  componentContext.setParentFocusState && componentContext.setParentFocusState({
8925
9024
  focusWithin: !1
8926
9025
  }), setStateShallow({
8927
9026
  focus: !1,
8928
- focusVisible: !1
9027
+ focusVisible: !1,
9028
+ focusWithin: !1
8929
9029
  }), onBlur == null || onBlur(e);
8930
9030
  }
8931
9031
  }
@@ -8967,37 +9067,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8967
9067
  var useChildrenResult;
8968
9068
  import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), process.env.NODE_ENV === "development" && time2 && time2`use-children`, useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
8969
9069
  var ResetPresence2 = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
8970
- ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
9070
+ if (ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
8971
9071
  children: content
8972
- })), process.env.NODE_ENV === "development" && time2 && time2`create-element`;
8973
- var groupState = curStateRef.group, subGroupContext = import_react3.default.useMemo(function() {
8974
- var _splitStyles_style, _splitStyles_style1;
8975
- if (!(!groupState || !groupName)) return groupState.listeners.clear(), {
8976
- ...componentContext.groups,
8977
- // change reference so as we mutate it doesn't affect siblings etc
8978
- state: {
8979
- ...componentContext.groups.state,
8980
- [groupName]: {
8981
- pseudo: import_defaultComponentState.defaultComponentStateMounted,
8982
- // capture just initial width and height if they exist
8983
- // will have top, left, width, height (not x, y)
8984
- layout: {
8985
- width: fromPx((_splitStyles_style = splitStyles.style) === null || _splitStyles_style === void 0 ? void 0 : _splitStyles_style.width),
8986
- height: fromPx((_splitStyles_style1 = splitStyles.style) === null || _splitStyles_style1 === void 0 ? void 0 : _splitStyles_style1.height)
8987
- }
8988
- }
8989
- },
8990
- emit: groupState.emit,
8991
- subscribe: groupState.subscribe
8992
- };
8993
- }, [
8994
- groupName
8995
- ]);
8996
- if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
9072
+ })), process.env.NODE_ENV === "development" && time2 && time2`create-element`, "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
8997
9073
  ...componentContext,
8998
- groups: subGroupContext,
8999
9074
  setParentFocusState: setStateShallow,
9000
9075
  children: content
9076
+ })), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GroupContext.GroupContext.Provider, {
9077
+ value: allGroupContexts,
9078
+ children: content
9001
9079
  })), process.env.NODE_ENV === "development" && time2 && time2`group-context`, content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time2 && time2`themed-children`, staticConfig.context) {
9002
9080
  var contextProps = staticConfig.context.props;
9003
9081
  for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
@@ -9024,6 +9102,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9024
9102
  (0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && (0, import_log.log)({
9025
9103
  propsIn,
9026
9104
  props,
9105
+ attachPress,
9027
9106
  animationStyles,
9028
9107
  classNames,
9029
9108
  content,
@@ -9062,6 +9141,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9062
9141
  delete globalThis.willPrint, time2.print(), time2 = null;
9063
9142
  }, 50))), content;
9064
9143
  });
9144
+ function notifyGroupSubscribers(groupContext, groupEmitter, pseudo) {
9145
+ if (!(!groupContext || !groupEmitter)) {
9146
+ var nextState = {
9147
+ ...groupContext.state,
9148
+ pseudo
9149
+ };
9150
+ groupEmitter.emit(nextState), groupContext.state = nextState;
9151
+ }
9152
+ }
9065
9153
  staticConfig.componentName && (component.displayName = staticConfig.componentName);
9066
9154
  var res = component;
9067
9155
  (process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ import_react3.default.memo(res)), res.staticConfig = staticConfig;
@@ -10835,13 +10923,8 @@ var require_useConfiguration_native = __commonJS({
10835
10923
  }
10836
10924
  });
10837
10925
  module2.exports = __toCommonJS2(useConfiguration_exports);
10838
- var import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), useConfiguration2 = function() {
10839
- var { groups, animationDriver, ...restComponentConfig } = import_react3.default.useContext(import_ComponentContext.ComponentContext), { animations, ...restConfig } = (0, import_config.getConfig)();
10840
- return {
10841
- ...restConfig,
10842
- ...restComponentConfig,
10843
- animationDriver: animationDriver ?? (0, import_config.getConfig)().animations
10844
- };
10926
+ var import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), useConfiguration2 = function() {
10927
+ return import_react3.default.useContext(import_ComponentContext.ComponentContext);
10845
10928
  };
10846
10929
  }
10847
10930
  });
@@ -11008,7 +11091,7 @@ var require_useProps_native = __commonJS({
11008
11091
  }
11009
11092
  });
11010
11093
  module2.exports = __toCommonJS2(useProps_exports);
11011
- var import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_getSplitStyles = require_getSplitStyles_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_Stack = require_Stack_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native();
11094
+ var import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_getSplitStyles = require_getSplitStyles_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_Stack = require_Stack_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native();
11012
11095
  function useProps2(props, opts) {
11013
11096
  var [propsOut, styleOut] = usePropsAndStyle2(props, {
11014
11097
  ...opts,
@@ -11032,7 +11115,7 @@ var require_useProps_native = __commonJS({
11032
11115
  needsUpdate() {
11033
11116
  return !0;
11034
11117
  }
11035
- }), componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), { state, disabled, setStateShallow } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, (0, import_config.getConfig)()), mediaStateNow = opts != null && opts.noMedia ? (
11118
+ }), componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContext = import_react3.default.useContext(import_GroupContext.GroupContext), { state, disabled, setStateShallow } = (0, import_useComponentState.useComponentState)(props, componentContext.animationDriver, staticConfig, (0, import_config.getConfig)()), mediaStateNow = opts != null && opts.noMedia ? (
11036
11119
  // not safe to use mediaState but really marginal to hit this
11037
11120
  import_useMedia.mediaState
11038
11121
  ) : (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state, {
@@ -11043,7 +11126,7 @@ var require_useProps_native = __commonJS({
11043
11126
  noClass: !0,
11044
11127
  resolveValues: "auto",
11045
11128
  ...opts
11046
- }, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
11129
+ }, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
11047
11130
  return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
11048
11131
  if (!disabled) {
11049
11132
  if (state.unmounted) {
@@ -11052,16 +11135,16 @@ var require_useProps_native = __commonJS({
11052
11135
  });
11053
11136
  return;
11054
11137
  }
11055
- return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
11056
- componentContext,
11138
+ if (groupContext) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
11139
+ groupContext,
11057
11140
  setStateShallow,
11058
- state,
11059
11141
  mediaGroups,
11060
11142
  pseudoGroups
11061
11143
  });
11062
11144
  }
11063
11145
  }, [
11064
11146
  disabled,
11147
+ groupContext,
11065
11148
  pseudoGroups ? Object.keys([
11066
11149
  ...pseudoGroups
11067
11150
  ]).join("") : 0,
@@ -11639,10 +11722,11 @@ var require_index_native15 = __commonJS({
11639
11722
  var import_config = require_config_native(), import_insertStyleRule = require_insertStyleRule_native();
11640
11723
  __reExport2(index_exports2, require_constants_native2(), module2.exports);
11641
11724
  __reExport2(index_exports2, require_ComponentContext_native(), module2.exports);
11725
+ __reExport2(index_exports2, require_GroupContext_native(), module2.exports);
11642
11726
  __reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
11643
11727
  __reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
11644
11728
  __reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
11645
- __reExport2(index_exports2, require_index_native13(), module2.exports);
11729
+ __reExport2(index_exports2, require_index_native12(), module2.exports);
11646
11730
  var import_insertStyleRule2 = require_insertStyleRule_native();
11647
11731
  __reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
11648
11732
  __reExport2(index_exports2, require_expandStyles_native(), module2.exports);
@@ -13323,7 +13407,7 @@ var require_index_native19 = __commonJS({
13323
13407
  }
13324
13408
  });
13325
13409
  module2.exports = __toCommonJS2(index_exports2);
13326
- var import_constants4 = require_index_native6(), import_is_equal_shallow = require_index_native13(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
13410
+ var import_constants4 = require_index_native6(), import_is_equal_shallow = require_index_native12(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
13327
13411
  function setOnLayoutStrategy3(state) {
13328
13412
  strategy = state;
13329
13413
  }
@@ -13365,7 +13449,9 @@ var require_index_native19 = __commonJS({
13365
13449
  } else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
13366
13450
  var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
13367
13451
  if (!cachedRect || // has changed one rect
13368
- !(0, import_is_equal_shallow.isEqualShallow)(cachedRect, nodeRect) && (!cachedParentRect || !(0, import_is_equal_shallow.isEqualShallow)(cachedParentRect, parentRect))) {
13452
+ // @ts-expect-error DOMRectReadOnly can go into object
13453
+ !(0, import_is_equal_shallow.isEqualShallow)(cachedRect, nodeRect) && // @ts-expect-error DOMRectReadOnly can go into object
13454
+ (!cachedParentRect || !(0, import_is_equal_shallow.isEqualShallow)(cachedParentRect, parentRect))) {
13369
13455
  NodeRectCache.set(node, nodeRect), ParentRectCache.set(parentNode, parentRect);
13370
13456
  var event = getElementLayoutEvent(nodeRect, parentRect);
13371
13457
  avoidUpdates ? queuedUpdates.set(node, function() {
@@ -18446,7 +18532,9 @@ var require_SheetImplementationCustom_native = __commonJS({
18446
18532
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_animate_presence = require_index_native4(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_portal2 = require_index_native30(), import_react3 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_contexts = require_contexts_native(), import_helpers = require_helpers_native2(), import_SheetContext = require_SheetContext_native(), import_useSheetOpenState = require_useSheetOpenState_native(), import_useSheetProviderProps = require_useSheetProviderProps_native(), hiddenSize = 10000.1, sheetHiddenStyleSheet = null, relativeDimensionTo = import_constants4.isWeb ? "window" : "screen", SheetImplementationCustom = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
18447
18533
  var parentSheet = import_react3.default.useContext(import_contexts.ParentSheetContext), { animation, animationConfig: animationConfigProp, modal = !1, zIndex = parentSheet.zIndex + 1, moveOnKeyboardChange = !1, unmountChildrenWhenHidden = !1, portalProps, containerComponent: ContainerComponent = import_react3.default.Fragment } = props, state = (0, import_useSheetOpenState.useSheetOpenState)(props), [overlayComponent, setOverlayComponent] = import_react3.default.useState(null), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
18448
18534
  onOverlayComponent: setOverlayComponent
18449
- }), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(void 0), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef, providerProps.contentRef), { animationDriver } = (0, import_core12.useConfiguration)(), animationConfig = function() {
18535
+ }), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(void 0), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef, providerProps.contentRef), { animationDriver } = (0, import_core12.useConfiguration)();
18536
+ if (!animationDriver) throw new Error("Sheet reqiures an animation driver to be set");
18537
+ var animationConfig = function() {
18450
18538
  if (animationDriver.supportsCSS) return {};
18451
18539
  var [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [
18452
18540
  animation
@@ -30698,6 +30786,7 @@ __export(index_exports, {
30698
30786
  EnsureFlexed: () => EnsureFlexed,
30699
30787
  Fieldset: () => Fieldset,
30700
30788
  FontLanguage: () => import_core11.FontLanguage,
30789
+ GroupContext: () => import_core11.GroupContext,
30701
30790
  Input: () => Input,
30702
30791
  InputFrame: () => InputFrame,
30703
30792
  Spacer: () => import_core11.Spacer,
@@ -31128,6 +31217,7 @@ var import_core11 = __toESM(require_index_native20());
31128
31217
  EnsureFlexed,
31129
31218
  Fieldset,
31130
31219
  FontLanguage,
31220
+ GroupContext,
31131
31221
  Input,
31132
31222
  InputFrame,
31133
31223
  Spacer,