tamagui 1.129.12-1751388824960 → 1.129.12-1751449245669
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 +383 -273
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +353 -261
- package/dist/test.native.js.map +3 -3
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -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
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
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;
|
|
3804
3919
|
}
|
|
3805
3920
|
});
|
|
3921
|
+
module2.exports = __toCommonJS2(GroupContext_exports);
|
|
3922
|
+
var import_react3 = require("react"), GroupContext = /* @__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
|
|
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 =
|
|
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,7 +6536,7 @@ 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"
|
|
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";
|
|
@@ -6444,7 +6561,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6444
6561
|
parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
|
|
6445
6562
|
) {
|
|
6446
6563
|
var name2 = parts[1];
|
|
6447
|
-
|
|
6564
|
+
groupContext != null && groupContext[name2] || (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
6448
6565
|
}
|
|
6449
6566
|
}
|
|
6450
6567
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
@@ -6470,13 +6587,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6470
6587
|
viewProps[key4] = val2;
|
|
6471
6588
|
return;
|
|
6472
6589
|
}
|
|
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
|
|
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) {
|
|
6474
6591
|
if (key4 === "pointerEvents") {
|
|
6475
6592
|
viewProps[key4] = val2;
|
|
6476
6593
|
return;
|
|
6477
6594
|
}
|
|
6478
6595
|
if (!isHOC && isValidStyleKey(key4, validStyles, accept) || import_constants4.isAndroid && key4 === "elevation") {
|
|
6479
|
-
mergeStyle(styleState, key4, val2);
|
|
6596
|
+
mergeStyle(styleState, key4, val2, 1);
|
|
6480
6597
|
return;
|
|
6481
6598
|
}
|
|
6482
6599
|
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 +6629,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6512
6629
|
try {
|
|
6513
6630
|
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
|
6514
6631
|
var psuedoStyle = _step2.value, fullKey = `${psuedoStyle[import_helpers.StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
|
|
6515
|
-
|
|
6632
|
+
addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers.StyleObjectIdentifier];
|
|
6516
6633
|
}
|
|
6517
6634
|
} catch (err) {
|
|
6518
6635
|
_didIteratorError2 = !0, _iteratorError2 = err;
|
|
@@ -6545,7 +6662,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6545
6662
|
var _pseudos1, _key1;
|
|
6546
6663
|
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
|
|
6547
6664
|
}
|
|
6548
|
-
mergeStyle(styleState, pkey, _$val);
|
|
6665
|
+
mergeStyle(styleState, pkey, _$val, importance);
|
|
6549
6666
|
}
|
|
6550
6667
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
6551
6668
|
importance,
|
|
@@ -6566,7 +6683,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6566
6683
|
if (!val2) return;
|
|
6567
6684
|
var hasSpace = val2.space, mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
|
|
6568
6685
|
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
|
-
|
|
6686
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key4}`, {
|
|
6570
6687
|
key: key4,
|
|
6571
6688
|
val: val2,
|
|
6572
6689
|
props,
|
|
@@ -6574,15 +6691,15 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6574
6691
|
acceptsClassName,
|
|
6575
6692
|
componentState,
|
|
6576
6693
|
mediaState: mediaState3
|
|
6577
|
-
})
|
|
6694
|
+
});
|
|
6695
|
+
var priority = mediaStylesSeen;
|
|
6696
|
+
if (mediaStylesSeen += 1, shouldDoClasses) {
|
|
6578
6697
|
var mediaStyle = getSubStyle(styleState, key4, val2, !1);
|
|
6579
6698
|
if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
|
|
6580
6699
|
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
6581
6700
|
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})`));
|
|
6582
6701
|
}
|
|
6583
|
-
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle),
|
|
6584
|
-
mediaStylesSeen += 1;
|
|
6585
|
-
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
6702
|
+
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
6586
6703
|
try {
|
|
6587
6704
|
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
|
|
6588
6705
|
var style3 = _step12.value, property = style3[import_helpers.StyleObjectProperty], isSubStyle = property[0] === "$";
|
|
@@ -6590,7 +6707,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6590
6707
|
var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
6591
6708
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
6592
6709
|
var subKey = isSubStyle ? style3[2] : "", fullKey1 = `${style3[import_helpers.StyleObjectProperty]}${subKey}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers.StyleObjectPseudo] || ""}`;
|
|
6593
|
-
|
|
6710
|
+
addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers.StyleObjectIdentifier];
|
|
6594
6711
|
}
|
|
6595
6712
|
}
|
|
6596
6713
|
} catch (err) {
|
|
@@ -6628,12 +6745,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6628
6745
|
scheme,
|
|
6629
6746
|
val: _$val1,
|
|
6630
6747
|
oppositeVal
|
|
6631
|
-
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]);
|
|
6748
|
+
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority);
|
|
6632
6749
|
}
|
|
6633
6750
|
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
6634
6751
|
} else if (isGroupMedia) {
|
|
6635
|
-
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name,
|
|
6636
|
-
if (!
|
|
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) {
|
|
6637
6754
|
process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
|
|
6638
6755
|
return;
|
|
6639
6756
|
}
|
|
@@ -6641,8 +6758,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6641
6758
|
if (groupMediaKey) {
|
|
6642
6759
|
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
6643
6760
|
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
6644
|
-
if (!mediaState1 &&
|
|
6645
|
-
...mediaState1
|
|
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
|
+
}
|
|
6646
6766
|
}), !isActive) {
|
|
6647
6767
|
for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
|
|
6648
6768
|
return;
|
|
@@ -6650,11 +6770,17 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6650
6770
|
importanceBump = 2;
|
|
6651
6771
|
}
|
|
6652
6772
|
if (groupPseudoKey) {
|
|
6773
|
+
var _this;
|
|
6653
6774
|
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
6654
|
-
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
6655
|
-
|
|
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];
|
|
6656
6777
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`, {
|
|
6657
|
-
|
|
6778
|
+
componentGroupPseudoState: {
|
|
6779
|
+
...componentGroupPseudoState
|
|
6780
|
+
},
|
|
6781
|
+
usedKeys: {
|
|
6782
|
+
...styleState.usedKeys
|
|
6783
|
+
}
|
|
6658
6784
|
}), !isActive1) {
|
|
6659
6785
|
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
6660
6786
|
return;
|
|
@@ -6686,6 +6812,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6686
6812
|
...styleState.style
|
|
6687
6813
|
}), (0, import_log.log)("viewProps", {
|
|
6688
6814
|
...viewProps
|
|
6815
|
+
}), (0, import_log.log)("transforms", {
|
|
6816
|
+
...styleState.flatTransforms
|
|
6689
6817
|
});
|
|
6690
6818
|
} catch {
|
|
6691
6819
|
}
|
|
@@ -6719,7 +6847,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6719
6847
|
}
|
|
6720
6848
|
}));
|
|
6721
6849
|
}
|
|
6722
|
-
process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants4.isClient && (console.groupCollapsed("getSplitStyles
|
|
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)({
|
|
6723
6851
|
props,
|
|
6724
6852
|
staticConfig,
|
|
6725
6853
|
shouldDoClasses,
|
|
@@ -6730,7 +6858,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6730
6858
|
theme: {
|
|
6731
6859
|
...theme
|
|
6732
6860
|
}
|
|
6733
|
-
})
|
|
6861
|
+
}));
|
|
6734
6862
|
var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
6735
6863
|
for (var keyOg in props) _loop(keyOg);
|
|
6736
6864
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-propsend`;
|
|
@@ -6812,8 +6940,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6812
6940
|
}
|
|
6813
6941
|
} else style2 && (viewProps.style = style2);
|
|
6814
6942
|
}
|
|
6815
|
-
if (process.env.NODE_ENV === "development" && debug
|
|
6816
|
-
console.groupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
6943
|
+
if (process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants4.isClient && import_isDevTools.isDevTools) {
|
|
6944
|
+
console.groupEnd(), console.groupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
6817
6945
|
try {
|
|
6818
6946
|
var logs = {
|
|
6819
6947
|
...result,
|
|
@@ -6839,11 +6967,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6839
6967
|
mergeTransform(target, key, val, !0);
|
|
6840
6968
|
});
|
|
6841
6969
|
}
|
|
6842
|
-
function mergeStyle(styleState, key, val) {
|
|
6843
|
-
var disableNormalize = arguments.length >
|
|
6844
|
-
if (key in import_helpers.stylePropsTransform) {
|
|
6845
|
-
var _styleState;
|
|
6846
|
-
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
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;
|
|
6847
6975
|
} else {
|
|
6848
6976
|
var shouldNormalize = import_constants4.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
6849
6977
|
if (
|
|
@@ -6851,8 +6979,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6851
6979
|
staticConfig.accept && key in staticConfig.accept
|
|
6852
6980
|
) viewProps[key] = out;
|
|
6853
6981
|
else {
|
|
6854
|
-
var _styleState1;
|
|
6855
|
-
(_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
|
|
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
|
|
6856
6984
|
// if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
|
|
6857
6985
|
key === "transform" && Array.isArray(out) ? [
|
|
6858
6986
|
...out
|
|
@@ -6883,8 +7011,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6883
7011
|
}
|
|
6884
7012
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
6885
7013
|
}, useInsertEffectCompat = import_constants4.isWeb ? import_react3.default.useInsertionEffect || import_constants4.useIsomorphicLayoutEffect : function() {
|
|
6886
|
-
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k) {
|
|
6887
|
-
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k);
|
|
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);
|
|
6888
7016
|
return res;
|
|
6889
7017
|
};
|
|
6890
7018
|
function addStyleToInsertRules(rulesToInsert, styleObject) {
|
|
@@ -6929,14 +7057,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6929
7057
|
delete viewProps[key], viewProps[key] = next;
|
|
6930
7058
|
} else viewProps[key] = val;
|
|
6931
7059
|
}
|
|
6932
|
-
function mergeMediaByImportance(styleState, mediaKey, key, value,
|
|
6933
|
-
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key,
|
|
6934
|
-
if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)(`mergeMediaByImportance ${key} importance
|
|
6935
|
-
if (
|
|
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) {
|
|
6936
7064
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
6937
7065
|
if (isDisabled) return !1;
|
|
6938
|
-
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
|
|
6939
|
-
} else mergeStyle(styleState, key, value);
|
|
7066
|
+
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
|
|
7067
|
+
} else mergeStyle(styleState, key, value, importance);
|
|
6940
7068
|
return !0;
|
|
6941
7069
|
}
|
|
6942
7070
|
function normalizeStyle(style) {
|
|
@@ -6949,7 +7077,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6949
7077
|
}
|
|
6950
7078
|
function applyDefaultStyle(pkey, styleState) {
|
|
6951
7079
|
var defaultValues = animatableDefaults[pkey];
|
|
6952
|
-
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
7080
|
+
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues, 1);
|
|
6953
7081
|
}
|
|
6954
7082
|
}
|
|
6955
7083
|
});
|
|
@@ -7070,81 +7198,6 @@ var require_setElementProps_native = __commonJS({
|
|
|
7070
7198
|
}
|
|
7071
7199
|
});
|
|
7072
7200
|
|
|
7073
|
-
// ../../packages/is-equal-shallow/dist/cjs/index.native.js
|
|
7074
|
-
var require_index_native13 = __commonJS({
|
|
7075
|
-
"../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
|
|
7076
|
-
"use strict";
|
|
7077
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7078
|
-
for (var name in all) __defProp2(target, name, {
|
|
7079
|
-
get: all[name],
|
|
7080
|
-
enumerable: !0
|
|
7081
|
-
});
|
|
7082
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
7083
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7084
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
7085
|
-
for (var _loop = function() {
|
|
7086
|
-
var key = _step.value;
|
|
7087
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
7088
|
-
get: function() {
|
|
7089
|
-
return from[key];
|
|
7090
|
-
},
|
|
7091
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
7092
|
-
});
|
|
7093
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
7094
|
-
} catch (err) {
|
|
7095
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
7096
|
-
} finally {
|
|
7097
|
-
try {
|
|
7098
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7099
|
-
} finally {
|
|
7100
|
-
if (_didIteratorError)
|
|
7101
|
-
throw _iteratorError;
|
|
7102
|
-
}
|
|
7103
|
-
}
|
|
7104
|
-
return to;
|
|
7105
|
-
}, __toCommonJS2 = function(mod) {
|
|
7106
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7107
|
-
value: !0
|
|
7108
|
-
}), mod);
|
|
7109
|
-
}, index_exports2 = {};
|
|
7110
|
-
__export2(index_exports2, {
|
|
7111
|
-
isEqualShallow: function() {
|
|
7112
|
-
return isEqualShallow;
|
|
7113
|
-
},
|
|
7114
|
-
mergeIfNotShallowEqual: function() {
|
|
7115
|
-
return mergeIfNotShallowEqual;
|
|
7116
|
-
},
|
|
7117
|
-
useCreateShallowSetState: function() {
|
|
7118
|
-
return useCreateShallowSetState;
|
|
7119
|
-
}
|
|
7120
|
-
});
|
|
7121
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
7122
|
-
var import_react3 = require("react");
|
|
7123
|
-
function useCreateShallowSetState(setter, debug) {
|
|
7124
|
-
return (0, import_react3.useCallback)(function(next) {
|
|
7125
|
-
setter(function(prev) {
|
|
7126
|
-
var update = mergeIfNotShallowEqual(prev, next);
|
|
7127
|
-
if (process.env.NODE_ENV === "development" && debug && update !== prev && (console.groupCollapsed("setStateShallow CHANGE", prev, "=>", update), console.trace(), console.groupEnd(), debug === "break")) debugger;
|
|
7128
|
-
return update;
|
|
7129
|
-
});
|
|
7130
|
-
}, [
|
|
7131
|
-
setter,
|
|
7132
|
-
debug
|
|
7133
|
-
]);
|
|
7134
|
-
}
|
|
7135
|
-
function mergeIfNotShallowEqual(prev, next) {
|
|
7136
|
-
return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
7137
|
-
...prev,
|
|
7138
|
-
...next
|
|
7139
|
-
};
|
|
7140
|
-
}
|
|
7141
|
-
function isEqualShallow(prev, next) {
|
|
7142
|
-
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
7143
|
-
return !0;
|
|
7144
|
-
}
|
|
7145
|
-
}
|
|
7146
|
-
});
|
|
7147
|
-
|
|
7148
7201
|
// ../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js
|
|
7149
7202
|
var require_subscribeToContextGroup_native = __commonJS({
|
|
7150
7203
|
"../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
|
|
@@ -7188,31 +7241,58 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
7188
7241
|
}
|
|
7189
7242
|
});
|
|
7190
7243
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
7191
|
-
var
|
|
7192
|
-
var {
|
|
7244
|
+
var import_is_equal_shallow = require_index_native12(), import_useMedia = require_useMedia_native(), subscribeToContextGroup = function(props) {
|
|
7245
|
+
var { pseudoGroups, mediaGroups, groupContext } = props;
|
|
7193
7246
|
if (pseudoGroups || mediaGroups) {
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
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]) || {
|
|
7197
7273
|
pseudo: {},
|
|
7198
7274
|
media: {}
|
|
7199
7275
|
};
|
|
7200
|
-
if (pseudo && pseudoGroups != null && pseudoGroups.has(
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
next
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
var
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
setStateShallow({
|
|
7211
|
-
group
|
|
7212
|
-
});
|
|
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);
|
|
7213
7286
|
}
|
|
7287
|
+
return didChange ? {
|
|
7288
|
+
group: {
|
|
7289
|
+
...prev.group,
|
|
7290
|
+
[name]: group
|
|
7291
|
+
}
|
|
7292
|
+
} : prev;
|
|
7214
7293
|
});
|
|
7215
|
-
}
|
|
7294
|
+
}) : function() {
|
|
7295
|
+
};
|
|
7216
7296
|
};
|
|
7217
7297
|
}
|
|
7218
7298
|
});
|
|
@@ -8211,8 +8291,8 @@ var require_useComponentState_native = __commonJS({
|
|
|
8211
8291
|
}
|
|
8212
8292
|
});
|
|
8213
8293
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
8214
|
-
var import_constants4 = require_index_native6(), import_is_equal_shallow =
|
|
8215
|
-
var
|
|
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);
|
|
8216
8296
|
stateRef.current || (stateRef.current = {});
|
|
8217
8297
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
8218
8298
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
@@ -8260,26 +8340,6 @@ var require_useComponentState_native = __commonJS({
|
|
|
8260
8340
|
isClassNameDisabled
|
|
8261
8341
|
}));
|
|
8262
8342
|
}
|
|
8263
|
-
if (groupName && !curStateRef.group) {
|
|
8264
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
8265
|
-
curStateRef.group = {
|
|
8266
|
-
listeners,
|
|
8267
|
-
emit(name, state2) {
|
|
8268
|
-
listeners.forEach(function(l) {
|
|
8269
|
-
return l(name, state2);
|
|
8270
|
-
});
|
|
8271
|
-
},
|
|
8272
|
-
subscribe(cb) {
|
|
8273
|
-
return listeners.add(cb), setStateShallow({
|
|
8274
|
-
hasDynGroupChildren: !0
|
|
8275
|
-
}), function() {
|
|
8276
|
-
listeners.delete(cb), listeners.size === 0 && setStateShallow({
|
|
8277
|
-
hasDynGroupChildren: !1
|
|
8278
|
-
});
|
|
8279
|
-
};
|
|
8280
|
-
}
|
|
8281
|
-
};
|
|
8282
|
-
}
|
|
8283
8343
|
return {
|
|
8284
8344
|
startedUnhydrated,
|
|
8285
8345
|
curStateRef,
|
|
@@ -8529,23 +8589,26 @@ var require_createComponent_native = __commonJS({
|
|
|
8529
8589
|
}
|
|
8530
8590
|
});
|
|
8531
8591
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8532
|
-
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(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
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([
|
|
8533
8593
|
"hover",
|
|
8534
8594
|
"press",
|
|
8535
8595
|
"pressIn",
|
|
8536
8596
|
"group",
|
|
8537
|
-
"
|
|
8597
|
+
"focus",
|
|
8598
|
+
"focusWithin",
|
|
8599
|
+
"media",
|
|
8600
|
+
"group"
|
|
8538
8601
|
]);
|
|
8539
8602
|
if (0) var cancelTouches;
|
|
8540
8603
|
var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
8541
8604
|
value: !1
|
|
8542
8605
|
};
|
|
8543
8606
|
import_constants4.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
|
|
8544
|
-
lastInteractionWasKeyboard.value = !0;
|
|
8607
|
+
lastInteractionWasKeyboard.value || (lastInteractionWasKeyboard.value = !0);
|
|
8545
8608
|
}), document.addEventListener("mousedown", function() {
|
|
8546
|
-
lastInteractionWasKeyboard.value = !1;
|
|
8609
|
+
lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
|
|
8547
8610
|
}), document.addEventListener("mousemove", function() {
|
|
8548
|
-
lastInteractionWasKeyboard.value = !1;
|
|
8611
|
+
lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
|
|
8549
8612
|
}));
|
|
8550
8613
|
function createComponent2(staticConfig) {
|
|
8551
8614
|
var _staticConfig_defaultProps, { componentName } = staticConfig, config = null, defaultProps = staticConfig.defaultProps;
|
|
@@ -8576,7 +8639,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8576
8639
|
var _propsIn_datatestrenders, _current, _;
|
|
8577
8640
|
(_ = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _ !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
|
|
8578
8641
|
}
|
|
8579
|
-
var
|
|
8642
|
+
var styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
|
|
8580
8643
|
if (context && (contextValue = import_react3.default.useContext(context), contextValue)) {
|
|
8581
8644
|
process.env.NODE_ENV === "development" && (propsIn == null ? void 0 : propsIn.debug) === "verbose" && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
|
|
8582
8645
|
for (var key in context.props) {
|
|
@@ -8601,7 +8664,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8601
8664
|
var componentName2 = props.componentName || staticConfig.componentName;
|
|
8602
8665
|
process.env.NODE_ENV === "development" && import_constants4.isClient && import_react3.default.useEffect(function() {
|
|
8603
8666
|
var overlay = null, debugVisualizerHandler = function() {
|
|
8604
|
-
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node =
|
|
8667
|
+
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = stateRef.current.host;
|
|
8605
8668
|
if (node) if (show) {
|
|
8606
8669
|
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";
|
|
8607
8670
|
var dataAt = node.getAttribute("data-at") || "", dataIn = node.getAttribute("data-in") || "", tooltip = document.createElement("span");
|
|
@@ -8614,8 +8677,52 @@ var require_createComponent_native = __commonJS({
|
|
|
8614
8677
|
}, [
|
|
8615
8678
|
componentName2
|
|
8616
8679
|
]);
|
|
8617
|
-
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props,
|
|
8618
|
-
|
|
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`;
|
|
8619
8726
|
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;
|
|
8620
8727
|
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
8621
8728
|
// "needsWebStyles" basically with motion we just animate a plain div, but
|
|
@@ -8623,14 +8730,14 @@ var require_createComponent_native = __commonJS({
|
|
|
8623
8730
|
// things declaratively
|
|
8624
8731
|
!animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
8625
8732
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
8626
|
-
process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (
|
|
8733
|
+
process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (stateRef.current.themeShallow = !0);
|
|
8627
8734
|
var themeStateProps = {
|
|
8628
8735
|
componentName: componentName2,
|
|
8629
8736
|
disable: disableTheme,
|
|
8630
|
-
shallow:
|
|
8737
|
+
shallow: stateRef.current.themeShallow,
|
|
8631
8738
|
debug: debugProp
|
|
8632
8739
|
};
|
|
8633
|
-
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof
|
|
8740
|
+
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof stateRef.current.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
|
|
8634
8741
|
return !!stateRef.current.isListeningToTheme;
|
|
8635
8742
|
}), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
8636
8743
|
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()}`;
|
|
@@ -8650,7 +8757,8 @@ var require_createComponent_native = __commonJS({
|
|
|
8650
8757
|
themeStateProps
|
|
8651
8758
|
}), (0, import_log.log)({
|
|
8652
8759
|
contextProps: styledContextProps,
|
|
8653
|
-
overriddenContextProps
|
|
8760
|
+
overriddenContextProps,
|
|
8761
|
+
componentContext
|
|
8654
8762
|
}), (0, import_log.log)({
|
|
8655
8763
|
presence,
|
|
8656
8764
|
isAnimated,
|
|
@@ -8679,32 +8787,53 @@ var require_createComponent_native = __commonJS({
|
|
|
8679
8787
|
noMergeStyle: isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles)
|
|
8680
8788
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
8681
8789
|
process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
|
|
8682
|
-
var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
8683
|
-
if (
|
|
8684
|
-
var
|
|
8685
|
-
|
|
8686
|
-
var
|
|
8687
|
-
|
|
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)
|
|
8688
8798
|
});
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8799
|
+
}
|
|
8800
|
+
}
|
|
8801
|
+
if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8802
|
+
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);
|
|
8701
8830
|
};
|
|
8702
8831
|
}
|
|
8703
|
-
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !
|
|
8832
|
+
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
|
|
8704
8833
|
var _splitStyles;
|
|
8705
8834
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
8706
8835
|
}
|
|
8707
|
-
|
|
8836
|
+
splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
|
|
8708
8837
|
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
8709
8838
|
process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
|
|
8710
8839
|
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
|
|
@@ -8759,18 +8888,18 @@ var require_createComponent_native = __commonJS({
|
|
|
8759
8888
|
}
|
|
8760
8889
|
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.
|
|
8761
8890
|
|
|
8762
|
-
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`,
|
|
8763
|
-
var layout = e.nativeEvent.layout;
|
|
8764
|
-
|
|
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({
|
|
8765
8894
|
layout
|
|
8766
8895
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
8767
8896
|
return {
|
|
8768
8897
|
...prev
|
|
8769
8898
|
};
|
|
8770
8899
|
}), stateRef.current.hasMeasured = !0;
|
|
8771
|
-
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef,
|
|
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) {
|
|
8772
8901
|
return stateRef.current.host = x;
|
|
8773
|
-
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref =
|
|
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) {
|
|
8774
8903
|
typeof item == "string" && item !== `
|
|
8775
8904
|
` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
|
|
8776
8905
|
}), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
|
|
@@ -8792,7 +8921,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8792
8921
|
console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`), console.warn(stateRef.current.host), console.warn(computed), console.groupEnd();
|
|
8793
8922
|
}
|
|
8794
8923
|
}), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
8795
|
-
if (
|
|
8924
|
+
if (state.unmounted === !0 && hasEnterStyle) {
|
|
8796
8925
|
setStateShallow({
|
|
8797
8926
|
unmounted: "should-enter"
|
|
8798
8927
|
});
|
|
@@ -8812,18 +8941,21 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8812
8941
|
});
|
|
8813
8942
|
return;
|
|
8814
8943
|
}
|
|
8815
|
-
var dispose = !disabled && (pseudoGroups || mediaGroups) ? (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
8816
|
-
componentContext,
|
|
8817
|
-
setStateShallow,
|
|
8818
|
-
state,
|
|
8819
|
-
mediaGroups,
|
|
8820
|
-
pseudoGroups
|
|
8821
|
-
}) : null;
|
|
8822
8944
|
return function() {
|
|
8823
|
-
|
|
8945
|
+
componentSetStates.delete(setState);
|
|
8824
8946
|
};
|
|
8825
8947
|
}, [
|
|
8826
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,
|
|
8953
|
+
setStateShallow,
|
|
8954
|
+
mediaGroups,
|
|
8955
|
+
pseudoGroups
|
|
8956
|
+
});
|
|
8957
|
+
}, [
|
|
8958
|
+
allGroupContexts,
|
|
8827
8959
|
disabled,
|
|
8828
8960
|
pseudoGroups ? Object.keys([
|
|
8829
8961
|
...pseudoGroups
|
|
@@ -8831,24 +8963,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8831
8963
|
mediaGroups ? Object.keys([
|
|
8832
8964
|
...mediaGroups
|
|
8833
8965
|
]).join("") : 0
|
|
8834
|
-
]), (0,
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
});
|
|
8841
|
-
var groupContextState = componentContext == null ? void 0 : componentContext.groups;
|
|
8842
|
-
if (groupContextState) {
|
|
8843
|
-
var next = {
|
|
8844
|
-
...groupContextState[groupName],
|
|
8845
|
-
...state
|
|
8846
|
-
};
|
|
8847
|
-
groupContextState[groupName] = next;
|
|
8848
|
-
}
|
|
8849
|
-
}
|
|
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);
|
|
8850
8972
|
}, [
|
|
8851
|
-
|
|
8973
|
+
groupContext,
|
|
8974
|
+
groupEmitter,
|
|
8852
8975
|
state
|
|
8853
8976
|
]);
|
|
8854
8977
|
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);
|
|
@@ -8875,7 +8998,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8875
8998
|
},
|
|
8876
8999
|
onMouseLeave: function(e) {
|
|
8877
9000
|
var next = {};
|
|
8878
|
-
needsHoverState && (next.hover = !1), needsPressState &&
|
|
9001
|
+
needsHoverState && (next.hover = !1), needsPressState && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
8879
9002
|
}
|
|
8880
9003
|
},
|
|
8881
9004
|
onPressIn: attachPress ? function(e) {
|
|
@@ -8953,37 +9076,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8953
9076
|
var useChildrenResult;
|
|
8954
9077
|
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);
|
|
8955
9078
|
var ResetPresence2 = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
|
|
8956
|
-
ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
|
|
9079
|
+
if (ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
|
|
8957
9080
|
children: content
|
|
8958
|
-
})), process.env.NODE_ENV === "development" && time2 && time2`create-element
|
|
8959
|
-
var groupState = curStateRef.group, subGroupContext = import_react3.default.useMemo(function() {
|
|
8960
|
-
var _splitStyles_style, _splitStyles_style1;
|
|
8961
|
-
if (!(!groupState || !groupName)) return groupState.listeners.clear(), {
|
|
8962
|
-
...componentContext.groups,
|
|
8963
|
-
// change reference so as we mutate it doesn't affect siblings etc
|
|
8964
|
-
state: {
|
|
8965
|
-
...componentContext.groups.state,
|
|
8966
|
-
[groupName]: {
|
|
8967
|
-
pseudo: import_defaultComponentState.defaultComponentStateMounted,
|
|
8968
|
-
// capture just initial width and height if they exist
|
|
8969
|
-
// will have top, left, width, height (not x, y)
|
|
8970
|
-
layout: {
|
|
8971
|
-
width: fromPx((_splitStyles_style = splitStyles.style) === null || _splitStyles_style === void 0 ? void 0 : _splitStyles_style.width),
|
|
8972
|
-
height: fromPx((_splitStyles_style1 = splitStyles.style) === null || _splitStyles_style1 === void 0 ? void 0 : _splitStyles_style1.height)
|
|
8973
|
-
}
|
|
8974
|
-
}
|
|
8975
|
-
},
|
|
8976
|
-
emit: groupState.emit,
|
|
8977
|
-
subscribe: groupState.subscribe
|
|
8978
|
-
};
|
|
8979
|
-
}, [
|
|
8980
|
-
groupName
|
|
8981
|
-
]);
|
|
8982
|
-
if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
9081
|
+
})), process.env.NODE_ENV === "development" && time2 && time2`create-element`, "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
8983
9082
|
...componentContext,
|
|
8984
|
-
groups: subGroupContext,
|
|
8985
9083
|
setParentFocusState: setStateShallow,
|
|
8986
9084
|
children: content
|
|
9085
|
+
})), "group" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
9086
|
+
value: allGroupContexts,
|
|
9087
|
+
children: content
|
|
8987
9088
|
})), 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) {
|
|
8988
9089
|
var contextProps = staticConfig.context.props;
|
|
8989
9090
|
for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
|
|
@@ -9010,6 +9111,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9010
9111
|
(0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && (0, import_log.log)({
|
|
9011
9112
|
propsIn,
|
|
9012
9113
|
props,
|
|
9114
|
+
attachPress,
|
|
9013
9115
|
animationStyles,
|
|
9014
9116
|
classNames,
|
|
9015
9117
|
content,
|
|
@@ -9048,6 +9150,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9048
9150
|
delete globalThis.willPrint, time2.print(), time2 = null;
|
|
9049
9151
|
}, 50))), content;
|
|
9050
9152
|
});
|
|
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
|
+
}
|
|
9051
9162
|
staticConfig.componentName && (component.displayName = staticConfig.componentName);
|
|
9052
9163
|
var res = component;
|
|
9053
9164
|
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ import_react3.default.memo(res)), res.staticConfig = staticConfig;
|
|
@@ -10821,13 +10932,8 @@ var require_useConfiguration_native = __commonJS({
|
|
|
10821
10932
|
}
|
|
10822
10933
|
});
|
|
10823
10934
|
module2.exports = __toCommonJS2(useConfiguration_exports);
|
|
10824
|
-
var import_react3 = __toESM2(require("react")),
|
|
10825
|
-
|
|
10826
|
-
return {
|
|
10827
|
-
...restConfig,
|
|
10828
|
-
...restComponentConfig,
|
|
10829
|
-
animationDriver: animationDriver ?? (0, import_config.getConfig)().animations
|
|
10830
|
-
};
|
|
10935
|
+
var import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), useConfiguration2 = function() {
|
|
10936
|
+
return import_react3.default.useContext(import_ComponentContext.ComponentContext);
|
|
10831
10937
|
};
|
|
10832
10938
|
}
|
|
10833
10939
|
});
|
|
@@ -10994,7 +11100,7 @@ var require_useProps_native = __commonJS({
|
|
|
10994
11100
|
}
|
|
10995
11101
|
});
|
|
10996
11102
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
10997
|
-
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();
|
|
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();
|
|
10998
11104
|
function useProps2(props, opts) {
|
|
10999
11105
|
var [propsOut, styleOut] = usePropsAndStyle2(props, {
|
|
11000
11106
|
...opts,
|
|
@@ -11018,7 +11124,7 @@ var require_useProps_native = __commonJS({
|
|
|
11018
11124
|
needsUpdate() {
|
|
11019
11125
|
return !0;
|
|
11020
11126
|
}
|
|
11021
|
-
}), 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 ? (
|
|
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 ? (
|
|
11022
11128
|
// not safe to use mediaState but really marginal to hit this
|
|
11023
11129
|
import_useMedia.mediaState
|
|
11024
11130
|
) : (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state, {
|
|
@@ -11029,7 +11135,7 @@ var require_useProps_native = __commonJS({
|
|
|
11029
11135
|
noClass: !0,
|
|
11030
11136
|
resolveValues: "auto",
|
|
11031
11137
|
...opts
|
|
11032
|
-
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
11138
|
+
}, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
11033
11139
|
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
11034
11140
|
if (!disabled) {
|
|
11035
11141
|
if (state.unmounted) {
|
|
@@ -11038,16 +11144,16 @@ var require_useProps_native = __commonJS({
|
|
|
11038
11144
|
});
|
|
11039
11145
|
return;
|
|
11040
11146
|
}
|
|
11041
|
-
return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
11042
|
-
|
|
11147
|
+
if (groupContext) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
11148
|
+
groupContext,
|
|
11043
11149
|
setStateShallow,
|
|
11044
|
-
state,
|
|
11045
11150
|
mediaGroups,
|
|
11046
11151
|
pseudoGroups
|
|
11047
11152
|
});
|
|
11048
11153
|
}
|
|
11049
11154
|
}, [
|
|
11050
11155
|
disabled,
|
|
11156
|
+
groupContext,
|
|
11051
11157
|
pseudoGroups ? Object.keys([
|
|
11052
11158
|
...pseudoGroups
|
|
11053
11159
|
]).join("") : 0,
|
|
@@ -11628,7 +11734,7 @@ var require_index_native15 = __commonJS({
|
|
|
11628
11734
|
__reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
|
|
11629
11735
|
__reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
|
|
11630
11736
|
__reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
|
|
11631
|
-
__reExport2(index_exports2,
|
|
11737
|
+
__reExport2(index_exports2, require_index_native12(), module2.exports);
|
|
11632
11738
|
var import_insertStyleRule2 = require_insertStyleRule_native();
|
|
11633
11739
|
__reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
|
|
11634
11740
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
@@ -13309,7 +13415,7 @@ var require_index_native19 = __commonJS({
|
|
|
13309
13415
|
}
|
|
13310
13416
|
});
|
|
13311
13417
|
module2.exports = __toCommonJS2(index_exports2);
|
|
13312
|
-
var import_constants4 = require_index_native6(), import_is_equal_shallow =
|
|
13418
|
+
var import_constants4 = require_index_native6(), import_is_equal_shallow = require_index_native12(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
|
|
13313
13419
|
function setOnLayoutStrategy3(state) {
|
|
13314
13420
|
strategy = state;
|
|
13315
13421
|
}
|
|
@@ -13351,7 +13457,9 @@ var require_index_native19 = __commonJS({
|
|
|
13351
13457
|
} else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
|
|
13352
13458
|
var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
|
|
13353
13459
|
if (!cachedRect || // has changed one rect
|
|
13354
|
-
|
|
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))) {
|
|
13355
13463
|
NodeRectCache.set(node, nodeRect), ParentRectCache.set(parentNode, parentRect);
|
|
13356
13464
|
var event = getElementLayoutEvent(nodeRect, parentRect);
|
|
13357
13465
|
avoidUpdates ? queuedUpdates.set(node, function() {
|
|
@@ -18432,7 +18540,9 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18432
18540
|
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) {
|
|
18433
18541
|
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, {
|
|
18434
18542
|
onOverlayComponent: setOverlayComponent
|
|
18435
|
-
}), { 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)()
|
|
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() {
|
|
18436
18546
|
if (animationDriver.supportsCSS) return {};
|
|
18437
18547
|
var [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [
|
|
18438
18548
|
animation
|