tamagui 1.129.12-1751449245669 → 1.129.12

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
@@ -3549,81 +3549,6 @@ 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
-
3627
3552
  // ../../core/web/dist/cjs/constants/isDevTools.native.js
3628
3553
  var require_isDevTools_native = __commonJS({
3629
3554
  "../../core/web/dist/cjs/constants/isDevTools.native.js"(exports2, module2) {
@@ -3871,55 +3796,13 @@ var require_ComponentContext_native = __commonJS({
3871
3796
  inText: !1,
3872
3797
  language: null,
3873
3798
  animationDriver: null,
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 GroupContext;
3799
+ setParentFocusState: null,
3800
+ groups: {
3801
+ emit: null,
3802
+ subscribe: null,
3803
+ state: {}
3919
3804
  }
3920
3805
  });
3921
- module2.exports = __toCommonJS2(GroupContext_exports);
3922
- var import_react3 = require("react"), GroupContext = /* @__PURE__ */ (0, import_react3.createContext)(null);
3923
3806
  }
3924
3807
  });
3925
3808
 
@@ -4828,7 +4711,7 @@ var require_normalize_color = __commonJS({
4828
4711
  });
4829
4712
 
4830
4713
  // ../../core/normalize-css-color/dist/cjs/index.native.js
4831
- var require_index_native13 = __commonJS({
4714
+ var require_index_native12 = __commonJS({
4832
4715
  "../../core/normalize-css-color/dist/cjs/index.native.js"(exports2, module2) {
4833
4716
  "use strict";
4834
4717
  var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
@@ -4951,7 +4834,7 @@ var require_normalizeColor_native = __commonJS({
4951
4834
  }
4952
4835
  });
4953
4836
  module2.exports = __toCommonJS2(normalizeColor_exports);
4954
- var import_normalize_css_color = require_index_native13(), import_normalize_css_color2 = require_index_native13(), normalizeColor = function(color, opacity) {
4837
+ var import_normalize_css_color = require_index_native12(), import_normalize_css_color2 = require_index_native12(), normalizeColor = function(color, opacity) {
4955
4838
  if (color) {
4956
4839
  if (color[0] === "$") return color;
4957
4840
  if (color.startsWith("var(")) {
@@ -6527,7 +6410,7 @@ var require_getSplitStyles_native = __commonJS({
6527
6410
  function isValidStyleKey(key, validStyles, accept) {
6528
6411
  return key in validStyles ? !0 : accept && key in accept;
6529
6412
  }
6530
- var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug) {
6413
+ var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, elementType, startedUnhydrated, debug) {
6531
6414
  var _loop = function(keyOg2) {
6532
6415
  var keyInit = keyOg2, valInit = props[keyInit];
6533
6416
  if (keyInit === "children") return viewProps[keyInit] = valInit, "continue";
@@ -6536,7 +6419,7 @@ var require_getSplitStyles_native = __commonJS({
6536
6419
  var accepted = accept[keyInit];
6537
6420
  if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass), "continue";
6538
6421
  }
6539
- if (process.env.NODE_ENV, disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className") return "continue";
6422
+ if (process.env.NODE_ENV, disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys) return "continue";
6540
6423
  if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
6541
6424
  if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
6542
6425
  return "continue";
@@ -6561,7 +6444,7 @@ var require_getSplitStyles_native = __commonJS({
6561
6444
  parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
6562
6445
  ) {
6563
6446
  var name2 = parts[1];
6564
- groupContext != null && groupContext[name2] || (keyInit = keyInit.replace("$group-", "$group-true-"));
6447
+ componentContext != null && componentContext.groups.subscribe && !(componentContext != null && componentContext.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
6565
6448
  }
6566
6449
  }
6567
6450
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
@@ -6587,13 +6470,13 @@ var require_getSplitStyles_native = __commonJS({
6587
6470
  viewProps[key4] = val2;
6588
6471
  return;
6589
6472
  }
6590
- if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" \u{1F4A0} expanded", keyInit, "=>", key4), (0, import_log.log)(val2), console.groupEnd()), val2 != null) {
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)) {
6591
6474
  if (key4 === "pointerEvents") {
6592
6475
  viewProps[key4] = val2;
6593
6476
  return;
6594
6477
  }
6595
6478
  if (!isHOC && isValidStyleKey(key4, validStyles, accept) || import_constants4.isAndroid && key4 === "elevation") {
6596
- mergeStyle(styleState, key4, val2, 1);
6479
+ mergeStyle(styleState, key4, val2);
6597
6480
  return;
6598
6481
  }
6599
6482
  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)) {
@@ -6629,7 +6512,7 @@ var require_getSplitStyles_native = __commonJS({
6629
6512
  try {
6630
6513
  for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
6631
6514
  var psuedoStyle = _step2.value, fullKey = `${psuedoStyle[import_helpers.StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
6632
- addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers.StyleObjectIdentifier];
6515
+ fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers.StyleObjectIdentifier]);
6633
6516
  }
6634
6517
  } catch (err) {
6635
6518
  _didIteratorError2 = !0, _iteratorError2 = err;
@@ -6662,7 +6545,7 @@ var require_getSplitStyles_native = __commonJS({
6662
6545
  var _pseudos1, _key1;
6663
6546
  pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
6664
6547
  }
6665
- mergeStyle(styleState, pkey, _$val, importance);
6548
+ mergeStyle(styleState, pkey, _$val);
6666
6549
  }
6667
6550
  process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
6668
6551
  importance,
@@ -6683,7 +6566,7 @@ var require_getSplitStyles_native = __commonJS({
6683
6566
  if (!val2) return;
6684
6567
  var hasSpace = val2.space, mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
6685
6568
  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;
6686
- process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key4}`, {
6569
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key4}`, {
6687
6570
  key: key4,
6688
6571
  val: val2,
6689
6572
  props,
@@ -6691,15 +6574,15 @@ var require_getSplitStyles_native = __commonJS({
6691
6574
  acceptsClassName,
6692
6575
  componentState,
6693
6576
  mediaState: mediaState3
6694
- });
6695
- var priority = mediaStylesSeen;
6696
- if (mediaStylesSeen += 1, shouldDoClasses) {
6577
+ }), shouldDoClasses) {
6697
6578
  var mediaStyle = getSubStyle(styleState, key4, val2, !1);
6698
6579
  if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
6699
6580
  var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
6700
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})`));
6701
6582
  }
6702
- var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
6583
+ var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
6584
+ mediaStylesSeen += 1;
6585
+ var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
6703
6586
  try {
6704
6587
  for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
6705
6588
  var style3 = _step12.value, property = style3[import_helpers.StyleObjectProperty], isSubStyle = property[0] === "$";
@@ -6707,7 +6590,7 @@ var require_getSplitStyles_native = __commonJS({
6707
6590
  var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
6708
6591
  process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
6709
6592
  var subKey = isSubStyle ? style3[2] : "", fullKey1 = `${style3[import_helpers.StyleObjectProperty]}${subKey}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers.StyleObjectPseudo] || ""}`;
6710
- addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers.StyleObjectIdentifier];
6593
+ fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers.StyleObjectIdentifier]);
6711
6594
  }
6712
6595
  }
6713
6596
  } catch (err) {
@@ -6745,12 +6628,12 @@ var require_getSplitStyles_native = __commonJS({
6745
6628
  scheme,
6746
6629
  val: _$val1,
6747
6630
  oppositeVal
6748
- }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority);
6631
+ }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]);
6749
6632
  }
6750
6633
  } else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
6751
6634
  } else if (isGroupMedia) {
6752
- 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;
6753
- if (!groupState) {
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) {
6754
6637
  process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
6755
6638
  return;
6756
6639
  }
@@ -6758,30 +6641,17 @@ var require_getSplitStyles_native = __commonJS({
6758
6641
  if (groupMediaKey) {
6759
6642
  mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
6760
6643
  var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
6761
- 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}`, {
6762
- ...mediaState1,
6763
- usedKeys: {
6764
- ...styleState.usedKeys
6765
- }
6766
- }), !isActive) {
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) {
6767
6645
  for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
6768
6646
  return;
6769
6647
  }
6770
6648
  importanceBump = 2;
6771
6649
  }
6772
6650
  if (groupPseudoKey) {
6773
- var _this;
6774
6651
  pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
6775
- var componentGroupPseudoState = (_this = componentGroupState || // fallback to context initially
6776
- (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];
6777
- if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`, {
6778
- componentGroupPseudoState: {
6779
- ...componentGroupPseudoState
6780
- },
6781
- usedKeys: {
6782
- ...styleState.usedKeys
6783
- }
6784
- }), !isActive1) {
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) {
6785
6655
  for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
6786
6656
  return;
6787
6657
  }
@@ -6812,8 +6682,6 @@ var require_getSplitStyles_native = __commonJS({
6812
6682
  ...styleState.style
6813
6683
  }), (0, import_log.log)("viewProps", {
6814
6684
  ...viewProps
6815
- }), (0, import_log.log)("transforms", {
6816
- ...styleState.flatTransforms
6817
6685
  });
6818
6686
  } catch {
6819
6687
  }
@@ -6847,7 +6715,7 @@ var require_getSplitStyles_native = __commonJS({
6847
6715
  }
6848
6716
  }));
6849
6717
  }
6850
- 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)({
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)({
6851
6719
  props,
6852
6720
  staticConfig,
6853
6721
  shouldDoClasses,
@@ -6858,7 +6726,7 @@ var require_getSplitStyles_native = __commonJS({
6858
6726
  theme: {
6859
6727
  ...theme
6860
6728
  }
6861
- }));
6729
+ }), console.groupEnd());
6862
6730
  var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
6863
6731
  for (var keyOg in props) _loop(keyOg);
6864
6732
  process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-propsend`;
@@ -6940,8 +6808,8 @@ var require_getSplitStyles_native = __commonJS({
6940
6808
  }
6941
6809
  } else style2 && (viewProps.style = style2);
6942
6810
  }
6943
- if (process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants4.isClient && import_isDevTools.isDevTools) {
6944
- console.groupEnd(), console.groupCollapsed("\u{1F539} getSplitStyles ===>");
6811
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && import_isDevTools.isDevTools) {
6812
+ console.groupCollapsed("\u{1F539} getSplitStyles ===>");
6945
6813
  try {
6946
6814
  var logs = {
6947
6815
  ...result,
@@ -6967,11 +6835,11 @@ var require_getSplitStyles_native = __commonJS({
6967
6835
  mergeTransform(target, key, val, !0);
6968
6836
  });
6969
6837
  }
6970
- function mergeStyle(styleState, key, val, importance) {
6971
- var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig } = styleState, existingImportance = styleState.usedKeys[key];
6972
- if (!(importance < existingImportance)) if (key in import_helpers.stylePropsTransform) {
6973
- var _styleState, _styleState_usedKeys, _key;
6974
- (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), (_styleState_usedKeys = styleState.usedKeys)[_key = key] || (_styleState_usedKeys[_key] = 1), styleState.flatTransforms[key] = val;
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) {
6841
+ var _styleState;
6842
+ (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
6975
6843
  } else {
6976
6844
  var shouldNormalize = import_constants4.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
6977
6845
  if (
@@ -6979,8 +6847,8 @@ var require_getSplitStyles_native = __commonJS({
6979
6847
  staticConfig.accept && key in staticConfig.accept
6980
6848
  ) viewProps[key] = out;
6981
6849
  else {
6982
- var _styleState1, _styleState_usedKeys1, _key1;
6983
- (_styleState1 = styleState).style || (_styleState1.style = {}), (_styleState_usedKeys1 = styleState.usedKeys)[_key1 = key] || (_styleState_usedKeys1[_key1] = 1), styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
6850
+ 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
6984
6852
  // if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
6985
6853
  key === "transform" && Array.isArray(out) ? [
6986
6854
  ...out
@@ -7011,8 +6879,8 @@ var require_getSplitStyles_native = __commonJS({
7011
6879
  }
7012
6880
  return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
7013
6881
  }, useInsertEffectCompat = import_constants4.isWeb ? import_react3.default.useInsertionEffect || import_constants4.useIsomorphicLayoutEffect : function() {
7014
- }, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l) {
7015
- var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l);
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);
7016
6884
  return res;
7017
6885
  };
7018
6886
  function addStyleToInsertRules(rulesToInsert, styleObject) {
@@ -7057,14 +6925,14 @@ var require_getSplitStyles_native = __commonJS({
7057
6925
  delete viewProps[key], viewProps[key] = next;
7058
6926
  } else viewProps[key] = val;
7059
6927
  }
7060
- function mergeMediaByImportance(styleState, mediaKey, key, value, usedKeys, isSizeMedia, importanceBump, debugProp) {
7061
- var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, usedKeys, isSizeMedia);
7062
- 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;
7063
- if (usedKeys[key] = importance, key in import_pseudoDescriptors.pseudoDescriptors) {
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) {
7064
6932
  var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
7065
6933
  if (isDisabled) return !1;
7066
- for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
7067
- } else mergeStyle(styleState, key, value, importance);
6934
+ for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
6935
+ } else mergeStyle(styleState, key, value);
7068
6936
  return !0;
7069
6937
  }
7070
6938
  function normalizeStyle(style) {
@@ -7077,7 +6945,7 @@ var require_getSplitStyles_native = __commonJS({
7077
6945
  }
7078
6946
  function applyDefaultStyle(pkey, styleState) {
7079
6947
  var defaultValues = animatableDefaults[pkey];
7080
- defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues, 1);
6948
+ defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
7081
6949
  }
7082
6950
  }
7083
6951
  });
@@ -7198,6 +7066,84 @@ var require_setElementProps_native = __commonJS({
7198
7066
  }
7199
7067
  });
7200
7068
 
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
+
7201
7147
  // ../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js
7202
7148
  var require_subscribeToContextGroup_native = __commonJS({
7203
7149
  "../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
@@ -7241,58 +7187,31 @@ var require_subscribeToContextGroup_native = __commonJS({
7241
7187
  }
7242
7188
  });
7243
7189
  module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
7244
- var import_is_equal_shallow = require_index_native12(), import_useMedia = require_useMedia_native(), subscribeToContextGroup = function(props) {
7245
- var { pseudoGroups, mediaGroups, groupContext } = props;
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;
7246
7192
  if (pseudoGroups || mediaGroups) {
7247
- process.env.NODE_ENV === "development" && !groupContext && console.debug("No context group found");
7248
- var disposables = /* @__PURE__ */ new Set();
7249
- if (pseudoGroups) for (var _i = 0, _iter = [
7250
- ...pseudoGroups
7251
- ]; _i < _iter.length; _i++) {
7252
- var name = _iter[_i];
7253
- disposables.add(createGroupListener(name, props));
7254
- }
7255
- if (mediaGroups) for (var _i1 = 0, _iter1 = [
7256
- ...mediaGroups
7257
- ]; _i1 < _iter1.length; _i1++) {
7258
- var name1 = _iter1[_i1];
7259
- disposables.add(createGroupListener(name1, props));
7260
- }
7261
- return function() {
7262
- disposables.forEach(function(d) {
7263
- return d();
7264
- });
7265
- };
7266
- }
7267
- }, createGroupListener = function(name, param) {
7268
- var { setStateShallow, pseudoGroups, mediaGroups, groupContext } = param, parent = groupContext == null ? void 0 : groupContext[name];
7269
- return parent ? parent.subscribe(function(param2) {
7270
- var { layout, pseudo } = param2;
7271
- setStateShallow(function(prev) {
7272
- var _prev_group, didChange = !1, group = ((_prev_group = prev.group) === null || _prev_group === void 0 ? void 0 : _prev_group[name]) || {
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]) || {
7273
7196
  pseudo: {},
7274
7197
  media: {}
7275
7198
  };
7276
- if (pseudo && pseudoGroups != null && pseudoGroups.has(name)) {
7277
- var _group;
7278
- (_group = group).pseudo || (_group.pseudo = {});
7279
- var next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.pseudo, pseudo);
7280
- next !== group.pseudo && (Object.assign(group.pseudo, pseudo), didChange = !0);
7281
- } else if (layout && mediaGroups) {
7282
- var _group1;
7283
- (_group1 = group).media || (_group1.media = {});
7284
- var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next1 = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState3);
7285
- next1 !== group.media && (Object.assign(group.media, next1), didChange = !0);
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
+ });
7286
7212
  }
7287
- return didChange ? {
7288
- group: {
7289
- ...prev.group,
7290
- [name]: group
7291
- }
7292
- } : prev;
7293
7213
  });
7294
- }) : function() {
7295
- };
7214
+ }
7296
7215
  };
7297
7216
  }
7298
7217
  });
@@ -7386,7 +7305,7 @@ var require_useThemeState_native = __commonJS({
7386
7305
  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));
7387
7306
  return PendingUpdate.delete(id), (!local || rerender) && (local = {
7388
7307
  ...next
7389
- }, 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({
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({
7390
7309
  props,
7391
7310
  propsKey,
7392
7311
  isRoot,
@@ -7421,7 +7340,7 @@ var require_useThemeState_native = __commonJS({
7421
7340
  themes || (themes = (0, import_config.getConfig)().themes);
7422
7341
  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)));
7423
7342
  if (process.env.NODE_ENV === "development" && debug && debug !== "profile") {
7424
- var message = ` \xB7 useTheme(${id}) getNextState => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
7343
+ var message = ` \xB7 useTheme(${id}) => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
7425
7344
  console.info(message);
7426
7345
  }
7427
7346
  if (isSameAsParent) return [
@@ -8291,8 +8210,8 @@ var require_useComponentState_native = __commonJS({
8291
8210
  }
8292
8211
  });
8293
8212
  module2.exports = __toCommonJS2(useComponentState_exports);
8294
- 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) {
8295
- 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);
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);
8296
8215
  stateRef.current || (stateRef.current = {});
8297
8216
  var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
8298
8217
  !needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
@@ -8316,7 +8235,7 @@ var require_useComponentState_native = __commonJS({
8316
8235
  ...states[0],
8317
8236
  [props.forceStyle]: !0
8318
8237
  } : states[0], setState = states[1];
8319
- stateRef.current.nextComponentState && Object.assign(state, stateRef.current.nextComponentState);
8238
+ stateRef.current.nextComponentState && (Object.assign(state, stateRef.current.nextComponentState), stateRef.current.nextComponentState = void 0);
8320
8239
  var isAnimated = willBeAnimated;
8321
8240
  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(_) {
8322
8241
  return {
@@ -8340,6 +8259,46 @@ var require_useComponentState_native = __commonJS({
8340
8259
  isClassNameDisabled
8341
8260
  }));
8342
8261
  }
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
+ }
8343
8302
  return {
8344
8303
  startedUnhydrated,
8345
8304
  curStateRef,
@@ -8589,26 +8548,17 @@ var require_createComponent_native = __commonJS({
8589
8548
  }
8590
8549
  });
8591
8550
  module2.exports = __toCommonJS2(createComponent_exports);
8592
- 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, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
8593
- "hover",
8594
- "press",
8595
- "pressIn",
8596
- "group",
8597
- "focus",
8598
- "focusWithin",
8599
- "media",
8600
- "group"
8601
- ]);
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();
8602
8552
  if (0) var cancelTouches;
8603
8553
  var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
8604
8554
  value: !1
8605
8555
  };
8606
8556
  import_constants4.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
8607
- lastInteractionWasKeyboard.value || (lastInteractionWasKeyboard.value = !0);
8557
+ lastInteractionWasKeyboard.value = !0;
8608
8558
  }), document.addEventListener("mousedown", function() {
8609
- lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
8559
+ lastInteractionWasKeyboard.value = !1;
8610
8560
  }), document.addEventListener("mousemove", function() {
8611
- lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
8561
+ lastInteractionWasKeyboard.value = !1;
8612
8562
  }));
8613
8563
  function createComponent2(staticConfig) {
8614
8564
  var _staticConfig_defaultProps, { componentName } = staticConfig, config = null, defaultProps = staticConfig.defaultProps;
@@ -8639,7 +8589,7 @@ var require_createComponent_native = __commonJS({
8639
8589
  var _propsIn_datatestrenders, _current, _;
8640
8590
  (_ = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _ !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
8641
8591
  }
8642
- var styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
8592
+ var componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
8643
8593
  if (context && (contextValue = import_react3.default.useContext(context), contextValue)) {
8644
8594
  process.env.NODE_ENV === "development" && (propsIn == null ? void 0 : propsIn.debug) === "verbose" && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
8645
8595
  for (var key in context.props) {
@@ -8664,7 +8614,7 @@ var require_createComponent_native = __commonJS({
8664
8614
  var componentName2 = props.componentName || staticConfig.componentName;
8665
8615
  process.env.NODE_ENV === "development" && import_constants4.isClient && import_react3.default.useEffect(function() {
8666
8616
  var overlay = null, debugVisualizerHandler = function() {
8667
- var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = stateRef.current.host;
8617
+ var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = curStateRef.host;
8668
8618
  if (node) if (show) {
8669
8619
  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";
8670
8620
  var dataAt = node.getAttribute("data-at") || "", dataIn = node.getAttribute("data-in") || "", tooltip = document.createElement("span");
@@ -8677,52 +8627,8 @@ var require_createComponent_native = __commonJS({
8677
8627
  }, [
8678
8628
  componentName2
8679
8629
  ]);
8680
- 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, allGroupContexts = (0, import_react3.useMemo)(function() {
8681
- var _stateRef_current_group;
8682
- if (!groupName) return groupContextParent;
8683
- (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
8684
- var listeners = /* @__PURE__ */ new Set();
8685
- return stateRef.current.group = {
8686
- listeners,
8687
- emit(state2) {
8688
- listeners.forEach(function(l) {
8689
- return l(state2);
8690
- });
8691
- },
8692
- subscribe(cb) {
8693
- return listeners.add(cb), listeners.size === 1 && setStateShallow({
8694
- hasDynGroupChildren: !0
8695
- }), function() {
8696
- listeners.delete(cb), listeners.size === 0 && setStateShallow({
8697
- hasDynGroupChildren: !1
8698
- });
8699
- };
8700
- }
8701
- }, {
8702
- ...groupContextParent,
8703
- [groupName]: {
8704
- state: {
8705
- pseudo: import_defaultComponentState.defaultComponentStateMounted
8706
- },
8707
- subscribe: function(listener) {
8708
- var _stateRef_current_group2, dispose = (_stateRef_current_group2 = stateRef.current.group) === null || _stateRef_current_group2 === void 0 ? void 0 : _stateRef_current_group2.subscribe(listener);
8709
- return function() {
8710
- dispose == null || dispose();
8711
- };
8712
- }
8713
- }
8714
- };
8715
- }, [
8716
- stateRef,
8717
- groupName,
8718
- groupContextParent
8719
- ]), setStateShallow = componentState.setStateShallow, pendingState = stateRef.current.nextComponentState;
8720
- pendingState && (stateRef.current.nextComponentState = void 0, componentState.setState(function(prev) {
8721
- return {
8722
- ...prev,
8723
- ...pendingState
8724
- };
8725
- })), process.env.NODE_ENV === "development" && time2 && time2`use-state`;
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;
8631
+ process.env.NODE_ENV === "development" && time2 && time2`use-state`;
8726
8632
  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;
8727
8633
  animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
8728
8634
  // "needsWebStyles" basically with motion we just animate a plain div, but
@@ -8730,14 +8636,14 @@ var require_createComponent_native = __commonJS({
8730
8636
  // things declaratively
8731
8637
  !animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
8732
8638
  var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
8733
- process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (stateRef.current.themeShallow = !0);
8639
+ process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (curStateRef.themeShallow = !0);
8734
8640
  var themeStateProps = {
8735
8641
  componentName: componentName2,
8736
8642
  disable: disableTheme,
8737
- shallow: stateRef.current.themeShallow,
8643
+ shallow: curStateRef.themeShallow,
8738
8644
  debug: debugProp
8739
8645
  };
8740
- if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof stateRef.current.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
8646
+ if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
8741
8647
  return !!stateRef.current.isListeningToTheme;
8742
8648
  }), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
8743
8649
  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()}`;
@@ -8757,8 +8663,7 @@ var require_createComponent_native = __commonJS({
8757
8663
  themeStateProps
8758
8664
  }), (0, import_log.log)({
8759
8665
  contextProps: styledContextProps,
8760
- overriddenContextProps,
8761
- componentContext
8666
+ overriddenContextProps
8762
8667
  }), (0, import_log.log)({
8763
8668
  presence,
8764
8669
  isAnimated,
@@ -8787,53 +8692,33 @@ var require_createComponent_native = __commonJS({
8787
8692
  noMergeStyle: isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles)
8788
8693
  }, themeName = (themeState == null ? void 0 : themeState.name) || "";
8789
8694
  process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
8790
- 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;
8791
- if (groupContext) {
8792
- var groupState = groupContext == null ? void 0 : groupContext.state;
8793
- if (groupState && groupState.layout === void 0) {
8794
- var _splitStyles_style, _splitStyles_style1;
8795
- (!((_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 = {
8796
- width: fromPx(splitStyles.style.width),
8797
- height: fromPx(splitStyles.style.height)
8798
- });
8799
- }
8800
- }
8801
- if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
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) {
8802
8697
  var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
8803
- stateRef.current.setStateShallow = function(nextOrGetNext) {
8804
- var prev = stateRef.current.nextComponentState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
8805
- if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
8806
- var canAvoidReRender = Object.keys(next).every(function(key3) {
8807
- return avoidReRenderKeys.has(key3);
8808
- });
8809
- if (canAvoidReRender) {
8810
- var updatedState = {
8811
- ...prev,
8812
- ...next
8813
- };
8814
- stateRef.current.nextComponentState = updatedState, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && (console.groupCollapsed("[\u26A1\uFE0F] avoid setState", next, {
8815
- updatedState,
8816
- props
8817
- }), console.info(stateRef.current.host), console.groupEnd());
8818
- var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
8819
- if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
8820
- var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
8821
- styleListener(nextStyles.style);
8822
- } else process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && console.info("[\u{1F40C}] re-render", {
8823
- canAvoidReRender,
8824
- next
8825
- }), ogSetStateShallow(next);
8826
- }
8827
- }, setStateShallow = function(state2) {
8828
- var _stateRef_current_setStateShallow, _stateRef_current;
8829
- (_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
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);
8705
+ });
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);
8830
8715
  };
8831
8716
  }
8832
- if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
8717
+ if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !curStateRef.hasMeasured) {
8833
8718
  var _splitStyles;
8834
8719
  (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
8835
8720
  }
8836
- splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
8721
+ curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
8837
8722
  var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
8838
8723
  process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
8839
8724
  var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
@@ -8888,18 +8773,18 @@ var require_createComponent_native = __commonJS({
8888
8773
  }
8889
8774
  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.
8890
8775
 
8891
- 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) {
8892
- var _stateRef_current_group, layout = e.nativeEvent.layout;
8893
- groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
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, {
8894
8779
  layout
8895
8780
  }), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
8896
8781
  return {
8897
8782
  ...prev
8898
8783
  };
8899
8784
  }), stateRef.current.hasMeasured = !0;
8900
- })), 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) {
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
8786
  return stateRef.current.host = x;
8902
- }, 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) {
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
8788
  typeof item == "string" && item !== `
8904
8789
  ` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
8905
8790
  }), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
@@ -8941,21 +8826,18 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8941
8826
  });
8942
8827
  return;
8943
8828
  }
8944
- return function() {
8945
- componentSetStates.delete(setState);
8946
- };
8947
- }, [
8948
- state.unmounted,
8949
- disabled
8950
- ]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
8951
- if (!disabled && !(!pseudoGroups && !mediaGroups) && allGroupContexts) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
8952
- groupContext: allGroupContexts,
8829
+ var dispose = !disabled && (pseudoGroups || mediaGroups) ? (0, import_subscribeToContextGroup.subscribeToContextGroup)({
8830
+ componentContext,
8953
8831
  setStateShallow,
8832
+ state,
8954
8833
  mediaGroups,
8955
8834
  pseudoGroups
8956
- });
8835
+ }) : null;
8836
+ return function() {
8837
+ dispose == null || dispose(), componentSetStates.delete(setState);
8838
+ };
8957
8839
  }, [
8958
- allGroupContexts,
8840
+ state.unmounted,
8959
8841
  disabled,
8960
8842
  pseudoGroups ? Object.keys([
8961
8843
  ...pseudoGroups
@@ -8963,15 +8845,24 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8963
8845
  mediaGroups ? Object.keys([
8964
8846
  ...mediaGroups
8965
8847
  ]).join("") : 0
8966
- ]), hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_react3.useEffect)(function() {
8967
- stateRef.current.nextComponentState = void 0;
8968
- });
8969
- var groupEmitter = stateRef.current.group;
8970
- (0, import_constants4.useIsomorphicLayoutEffect)(function() {
8971
- !groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state);
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
+ }
8972
8864
  }, [
8973
- groupContext,
8974
- groupEmitter,
8865
+ groupName,
8975
8866
  state
8976
8867
  ]);
8977
8868
  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);
@@ -8998,7 +8889,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8998
8889
  },
8999
8890
  onMouseLeave: function(e) {
9000
8891
  var next = {};
9001
- needsHoverState && (next.hover = !1), needsPressState && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
8892
+ needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
9002
8893
  }
9003
8894
  },
9004
8895
  onPressIn: attachPress ? function(e) {
@@ -9076,15 +8967,37 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9076
8967
  var useChildrenResult;
9077
8968
  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);
9078
8969
  var ResetPresence2 = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
9079
- if (ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
8970
+ ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
9080
8971
  children: content
9081
- })), process.env.NODE_ENV === "development" && time2 && time2`create-element`, "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
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, {
9082
8997
  ...componentContext,
8998
+ groups: subGroupContext,
9083
8999
  setParentFocusState: setStateShallow,
9084
9000
  children: content
9085
- })), "group" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GroupContext.GroupContext.Provider, {
9086
- value: allGroupContexts,
9087
- children: content
9088
9001
  })), 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) {
9089
9002
  var contextProps = staticConfig.context.props;
9090
9003
  for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
@@ -9111,7 +9024,6 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9111
9024
  (0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && (0, import_log.log)({
9112
9025
  propsIn,
9113
9026
  props,
9114
- attachPress,
9115
9027
  animationStyles,
9116
9028
  classNames,
9117
9029
  content,
@@ -9150,15 +9062,6 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9150
9062
  delete globalThis.willPrint, time2.print(), time2 = null;
9151
9063
  }, 50))), content;
9152
9064
  });
9153
- function notifyGroupSubscribers(groupContext, groupEmitter, pseudo) {
9154
- if (!(!groupContext || !groupEmitter)) {
9155
- var nextState = {
9156
- ...groupContext.state,
9157
- pseudo
9158
- };
9159
- groupEmitter.emit(nextState), groupContext.state = nextState;
9160
- }
9161
- }
9162
9065
  staticConfig.componentName && (component.displayName = staticConfig.componentName);
9163
9066
  var res = component;
9164
9067
  (process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ import_react3.default.memo(res)), res.staticConfig = staticConfig;
@@ -10932,8 +10835,13 @@ var require_useConfiguration_native = __commonJS({
10932
10835
  }
10933
10836
  });
10934
10837
  module2.exports = __toCommonJS2(useConfiguration_exports);
10935
- var import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), useConfiguration2 = function() {
10936
- return import_react3.default.useContext(import_ComponentContext.ComponentContext);
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
+ };
10937
10845
  };
10938
10846
  }
10939
10847
  });
@@ -11100,7 +11008,7 @@ var require_useProps_native = __commonJS({
11100
11008
  }
11101
11009
  });
11102
11010
  module2.exports = __toCommonJS2(useProps_exports);
11103
- 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();
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();
11104
11012
  function useProps2(props, opts) {
11105
11013
  var [propsOut, styleOut] = usePropsAndStyle2(props, {
11106
11014
  ...opts,
@@ -11124,7 +11032,7 @@ var require_useProps_native = __commonJS({
11124
11032
  needsUpdate() {
11125
11033
  return !0;
11126
11034
  }
11127
- }), 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 ? (
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 ? (
11128
11036
  // not safe to use mediaState but really marginal to hit this
11129
11037
  import_useMedia.mediaState
11130
11038
  ) : (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state, {
@@ -11135,7 +11043,7 @@ var require_useProps_native = __commonJS({
11135
11043
  noClass: !0,
11136
11044
  resolveValues: "auto",
11137
11045
  ...opts
11138
- }, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
11046
+ }, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
11139
11047
  return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
11140
11048
  if (!disabled) {
11141
11049
  if (state.unmounted) {
@@ -11144,16 +11052,16 @@ var require_useProps_native = __commonJS({
11144
11052
  });
11145
11053
  return;
11146
11054
  }
11147
- if (groupContext) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
11148
- groupContext,
11055
+ return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
11056
+ componentContext,
11149
11057
  setStateShallow,
11058
+ state,
11150
11059
  mediaGroups,
11151
11060
  pseudoGroups
11152
11061
  });
11153
11062
  }
11154
11063
  }, [
11155
11064
  disabled,
11156
- groupContext,
11157
11065
  pseudoGroups ? Object.keys([
11158
11066
  ...pseudoGroups
11159
11067
  ]).join("") : 0,
@@ -11734,7 +11642,7 @@ var require_index_native15 = __commonJS({
11734
11642
  __reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
11735
11643
  __reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
11736
11644
  __reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
11737
- __reExport2(index_exports2, require_index_native12(), module2.exports);
11645
+ __reExport2(index_exports2, require_index_native13(), module2.exports);
11738
11646
  var import_insertStyleRule2 = require_insertStyleRule_native();
11739
11647
  __reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
11740
11648
  __reExport2(index_exports2, require_expandStyles_native(), module2.exports);
@@ -13415,7 +13323,7 @@ var require_index_native19 = __commonJS({
13415
13323
  }
13416
13324
  });
13417
13325
  module2.exports = __toCommonJS2(index_exports2);
13418
- var import_constants4 = require_index_native6(), import_is_equal_shallow = require_index_native12(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
13326
+ var import_constants4 = require_index_native6(), import_is_equal_shallow = require_index_native13(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
13419
13327
  function setOnLayoutStrategy3(state) {
13420
13328
  strategy = state;
13421
13329
  }
@@ -13457,9 +13365,7 @@ var require_index_native19 = __commonJS({
13457
13365
  } else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
13458
13366
  var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
13459
13367
  if (!cachedRect || // has changed one rect
13460
- // @ts-expect-error DOMRectReadOnly can go into object
13461
- !(0, import_is_equal_shallow.isEqualShallow)(cachedRect, nodeRect) && // @ts-expect-error DOMRectReadOnly can go into object
13462
- (!cachedParentRect || !(0, import_is_equal_shallow.isEqualShallow)(cachedParentRect, parentRect))) {
13368
+ !(0, import_is_equal_shallow.isEqualShallow)(cachedRect, nodeRect) && (!cachedParentRect || !(0, import_is_equal_shallow.isEqualShallow)(cachedParentRect, parentRect))) {
13463
13369
  NodeRectCache.set(node, nodeRect), ParentRectCache.set(parentNode, parentRect);
13464
13370
  var event = getElementLayoutEvent(nodeRect, parentRect);
13465
13371
  avoidUpdates ? queuedUpdates.set(node, function() {
@@ -18540,9 +18446,7 @@ var require_SheetImplementationCustom_native = __commonJS({
18540
18446
  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) {
18541
18447
  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, {
18542
18448
  onOverlayComponent: setOverlayComponent
18543
- }), { 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)();
18544
- if (!animationDriver) throw new Error("Sheet reqiures an animation driver to be set");
18545
- var animationConfig = function() {
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() {
18546
18450
  if (animationDriver.supportsCSS) return {};
18547
18451
  var [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [
18548
18452
  animation