@tamagui/core 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 +380 -272
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +350 -260
- package/dist/test.native.js.map +3 -3
- package/package.json +9 -9
package/dist/native.js
CHANGED
|
@@ -2450,6 +2450,81 @@ var require_index_native4 = __commonJS({
|
|
|
2450
2450
|
}
|
|
2451
2451
|
});
|
|
2452
2452
|
|
|
2453
|
+
// ../../packages/is-equal-shallow/dist/cjs/index.native.js
|
|
2454
|
+
var require_index_native5 = __commonJS({
|
|
2455
|
+
"../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
|
|
2456
|
+
"use strict";
|
|
2457
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2458
|
+
for (var name in all) __defProp2(target, name, {
|
|
2459
|
+
get: all[name],
|
|
2460
|
+
enumerable: !0
|
|
2461
|
+
});
|
|
2462
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
2463
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2464
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2465
|
+
for (var _loop = function() {
|
|
2466
|
+
var key = _step.value;
|
|
2467
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2468
|
+
get: function() {
|
|
2469
|
+
return from[key];
|
|
2470
|
+
},
|
|
2471
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2472
|
+
});
|
|
2473
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2474
|
+
} catch (err) {
|
|
2475
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2476
|
+
} finally {
|
|
2477
|
+
try {
|
|
2478
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2479
|
+
} finally {
|
|
2480
|
+
if (_didIteratorError)
|
|
2481
|
+
throw _iteratorError;
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
return to;
|
|
2485
|
+
}, __toCommonJS2 = function(mod) {
|
|
2486
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2487
|
+
value: !0
|
|
2488
|
+
}), mod);
|
|
2489
|
+
}, index_exports2 = {};
|
|
2490
|
+
__export2(index_exports2, {
|
|
2491
|
+
isEqualShallow: function() {
|
|
2492
|
+
return isEqualShallow;
|
|
2493
|
+
},
|
|
2494
|
+
mergeIfNotShallowEqual: function() {
|
|
2495
|
+
return mergeIfNotShallowEqual;
|
|
2496
|
+
},
|
|
2497
|
+
useCreateShallowSetState: function() {
|
|
2498
|
+
return useCreateShallowSetState;
|
|
2499
|
+
}
|
|
2500
|
+
});
|
|
2501
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
2502
|
+
var import_react3 = require("react");
|
|
2503
|
+
function useCreateShallowSetState(setter, debug) {
|
|
2504
|
+
return (0, import_react3.useCallback)(function(stateOrGetState) {
|
|
2505
|
+
setter(function(prev) {
|
|
2506
|
+
var next = typeof stateOrGetState == "function" ? stateOrGetState(prev) : stateOrGetState, update = mergeIfNotShallowEqual(prev, next);
|
|
2507
|
+
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;
|
|
2508
|
+
return update;
|
|
2509
|
+
});
|
|
2510
|
+
}, [
|
|
2511
|
+
setter,
|
|
2512
|
+
debug
|
|
2513
|
+
]);
|
|
2514
|
+
}
|
|
2515
|
+
function mergeIfNotShallowEqual(prev, next) {
|
|
2516
|
+
return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
2517
|
+
...prev,
|
|
2518
|
+
...next
|
|
2519
|
+
};
|
|
2520
|
+
}
|
|
2521
|
+
function isEqualShallow(prev, next) {
|
|
2522
|
+
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
2523
|
+
return !0;
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
});
|
|
2527
|
+
|
|
2453
2528
|
// ../web/dist/cjs/constants/isDevTools.native.js
|
|
2454
2529
|
var require_isDevTools_native = __commonJS({
|
|
2455
2530
|
"../web/dist/cjs/constants/isDevTools.native.js"(exports2, module2) {
|
|
@@ -2697,13 +2772,55 @@ var require_ComponentContext_native = __commonJS({
|
|
|
2697
2772
|
inText: !1,
|
|
2698
2773
|
language: null,
|
|
2699
2774
|
animationDriver: null,
|
|
2700
|
-
setParentFocusState: null
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2775
|
+
setParentFocusState: null
|
|
2776
|
+
});
|
|
2777
|
+
}
|
|
2778
|
+
});
|
|
2779
|
+
|
|
2780
|
+
// ../web/dist/cjs/contexts/GroupContext.native.js
|
|
2781
|
+
var require_GroupContext_native = __commonJS({
|
|
2782
|
+
"../web/dist/cjs/contexts/GroupContext.native.js"(exports2, module2) {
|
|
2783
|
+
"use strict";
|
|
2784
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2785
|
+
for (var name in all) __defProp2(target, name, {
|
|
2786
|
+
get: all[name],
|
|
2787
|
+
enumerable: !0
|
|
2788
|
+
});
|
|
2789
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
2790
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2791
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2792
|
+
for (var _loop = function() {
|
|
2793
|
+
var key = _step.value;
|
|
2794
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2795
|
+
get: function() {
|
|
2796
|
+
return from[key];
|
|
2797
|
+
},
|
|
2798
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2799
|
+
});
|
|
2800
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2801
|
+
} catch (err) {
|
|
2802
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2803
|
+
} finally {
|
|
2804
|
+
try {
|
|
2805
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2806
|
+
} finally {
|
|
2807
|
+
if (_didIteratorError)
|
|
2808
|
+
throw _iteratorError;
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
return to;
|
|
2812
|
+
}, __toCommonJS2 = function(mod) {
|
|
2813
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2814
|
+
value: !0
|
|
2815
|
+
}), mod);
|
|
2816
|
+
}, GroupContext_exports = {};
|
|
2817
|
+
__export2(GroupContext_exports, {
|
|
2818
|
+
GroupContext: function() {
|
|
2819
|
+
return GroupContext;
|
|
2705
2820
|
}
|
|
2706
2821
|
});
|
|
2822
|
+
module2.exports = __toCommonJS2(GroupContext_exports);
|
|
2823
|
+
var import_react3 = require("react"), GroupContext = /* @__PURE__ */ (0, import_react3.createContext)(null);
|
|
2707
2824
|
}
|
|
2708
2825
|
});
|
|
2709
2826
|
|
|
@@ -3612,7 +3729,7 @@ var require_normalize_color = __commonJS({
|
|
|
3612
3729
|
});
|
|
3613
3730
|
|
|
3614
3731
|
// ../normalize-css-color/dist/cjs/index.native.js
|
|
3615
|
-
var
|
|
3732
|
+
var require_index_native6 = __commonJS({
|
|
3616
3733
|
"../normalize-css-color/dist/cjs/index.native.js"(exports2, module2) {
|
|
3617
3734
|
"use strict";
|
|
3618
3735
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -3735,7 +3852,7 @@ var require_normalizeColor_native = __commonJS({
|
|
|
3735
3852
|
}
|
|
3736
3853
|
});
|
|
3737
3854
|
module2.exports = __toCommonJS2(normalizeColor_exports);
|
|
3738
|
-
var import_normalize_css_color =
|
|
3855
|
+
var import_normalize_css_color = require_index_native6(), import_normalize_css_color2 = require_index_native6(), normalizeColor = function(color, opacity) {
|
|
3739
3856
|
if (color) {
|
|
3740
3857
|
if (color[0] === "$") return color;
|
|
3741
3858
|
if (color.startsWith("var(")) {
|
|
@@ -5311,7 +5428,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5311
5428
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
5312
5429
|
return key in validStyles2 ? !0 : accept && key in accept;
|
|
5313
5430
|
}
|
|
5314
|
-
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, elementType, startedUnhydrated, debug) {
|
|
5431
|
+
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug) {
|
|
5315
5432
|
var _loop = function(keyOg2) {
|
|
5316
5433
|
var keyInit = keyOg2, valInit = props[keyInit];
|
|
5317
5434
|
if (keyInit === "children") return viewProps[keyInit] = valInit, "continue";
|
|
@@ -5320,7 +5437,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5320
5437
|
var accepted = accept[keyInit];
|
|
5321
5438
|
if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass), "continue";
|
|
5322
5439
|
}
|
|
5323
|
-
if (process.env.NODE_ENV, disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className"
|
|
5440
|
+
if (process.env.NODE_ENV, disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className") return "continue";
|
|
5324
5441
|
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
|
|
5325
5442
|
if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
|
|
5326
5443
|
return "continue";
|
|
@@ -5345,7 +5462,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5345
5462
|
parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
|
|
5346
5463
|
) {
|
|
5347
5464
|
var name2 = parts[1];
|
|
5348
|
-
|
|
5465
|
+
groupContext != null && groupContext[name2] || (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
5349
5466
|
}
|
|
5350
5467
|
}
|
|
5351
5468
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
@@ -5371,13 +5488,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5371
5488
|
viewProps[key4] = val2;
|
|
5372
5489
|
return;
|
|
5373
5490
|
}
|
|
5374
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" \u{1F4A0} expanded", keyInit, "=>", key4), (0, import_log.log)(val2), console.groupEnd()), val2 != null
|
|
5491
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" \u{1F4A0} expanded", keyInit, "=>", key4), (0, import_log.log)(val2), console.groupEnd()), val2 != null) {
|
|
5375
5492
|
if (key4 === "pointerEvents") {
|
|
5376
5493
|
viewProps[key4] = val2;
|
|
5377
5494
|
return;
|
|
5378
5495
|
}
|
|
5379
5496
|
if (!isHOC && isValidStyleKey(key4, validStyles2, accept) || import_constants.isAndroid && key4 === "elevation") {
|
|
5380
|
-
mergeStyle(styleState, key4, val2);
|
|
5497
|
+
mergeStyle(styleState, key4, val2, 1);
|
|
5381
5498
|
return;
|
|
5382
5499
|
}
|
|
5383
5500
|
if (isPseudo = key4 in import_helpers2.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)) {
|
|
@@ -5413,7 +5530,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5413
5530
|
try {
|
|
5414
5531
|
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
|
5415
5532
|
var psuedoStyle = _step2.value, fullKey = `${psuedoStyle[import_helpers2.StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
|
|
5416
|
-
|
|
5533
|
+
addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers2.StyleObjectIdentifier];
|
|
5417
5534
|
}
|
|
5418
5535
|
} catch (err) {
|
|
5419
5536
|
_didIteratorError2 = !0, _iteratorError2 = err;
|
|
@@ -5446,7 +5563,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5446
5563
|
var _pseudos1, _key1;
|
|
5447
5564
|
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
|
|
5448
5565
|
}
|
|
5449
|
-
mergeStyle(styleState, pkey, _$val);
|
|
5566
|
+
mergeStyle(styleState, pkey, _$val, importance);
|
|
5450
5567
|
}
|
|
5451
5568
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
5452
5569
|
importance,
|
|
@@ -5467,7 +5584,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5467
5584
|
if (!val2) return;
|
|
5468
5585
|
var hasSpace = val2.space, mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
|
|
5469
5586
|
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;
|
|
5470
|
-
|
|
5587
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key4}`, {
|
|
5471
5588
|
key: key4,
|
|
5472
5589
|
val: val2,
|
|
5473
5590
|
props,
|
|
@@ -5475,15 +5592,15 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5475
5592
|
acceptsClassName,
|
|
5476
5593
|
componentState,
|
|
5477
5594
|
mediaState: mediaState2
|
|
5478
|
-
})
|
|
5595
|
+
});
|
|
5596
|
+
var priority = mediaStylesSeen;
|
|
5597
|
+
if (mediaStylesSeen += 1, shouldDoClasses) {
|
|
5479
5598
|
var mediaStyle = getSubStyle(styleState, key4, val2, !1);
|
|
5480
5599
|
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
5481
5600
|
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
5482
5601
|
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})`));
|
|
5483
5602
|
}
|
|
5484
|
-
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle),
|
|
5485
|
-
mediaStylesSeen += 1;
|
|
5486
|
-
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
5603
|
+
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
5487
5604
|
try {
|
|
5488
5605
|
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
|
|
5489
5606
|
var style3 = _step12.value, property = style3[import_helpers2.StyleObjectProperty], isSubStyle = property[0] === "$";
|
|
@@ -5491,7 +5608,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5491
5608
|
var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
5492
5609
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
5493
5610
|
var subKey = isSubStyle ? style3[2] : "", fullKey1 = `${style3[import_helpers2.StyleObjectProperty]}${subKey}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers2.StyleObjectPseudo] || ""}`;
|
|
5494
|
-
|
|
5611
|
+
addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers2.StyleObjectIdentifier];
|
|
5495
5612
|
}
|
|
5496
5613
|
}
|
|
5497
5614
|
} catch (err) {
|
|
@@ -5529,12 +5646,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5529
5646
|
scheme,
|
|
5530
5647
|
val: _$val1,
|
|
5531
5648
|
oppositeVal
|
|
5532
|
-
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]);
|
|
5649
|
+
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority);
|
|
5533
5650
|
}
|
|
5534
5651
|
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
5535
5652
|
} else if (isGroupMedia) {
|
|
5536
|
-
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name,
|
|
5537
|
-
if (!
|
|
5653
|
+
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;
|
|
5654
|
+
if (!groupState) {
|
|
5538
5655
|
process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
|
|
5539
5656
|
return;
|
|
5540
5657
|
}
|
|
@@ -5542,8 +5659,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5542
5659
|
if (groupMediaKey) {
|
|
5543
5660
|
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
5544
5661
|
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
5545
|
-
if (!mediaState1 &&
|
|
5546
|
-
...mediaState1
|
|
5662
|
+
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}`, {
|
|
5663
|
+
...mediaState1,
|
|
5664
|
+
usedKeys: {
|
|
5665
|
+
...styleState.usedKeys
|
|
5666
|
+
}
|
|
5547
5667
|
}), !isActive) {
|
|
5548
5668
|
for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
|
|
5549
5669
|
return;
|
|
@@ -5551,11 +5671,17 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5551
5671
|
importanceBump = 2;
|
|
5552
5672
|
}
|
|
5553
5673
|
if (groupPseudoKey) {
|
|
5674
|
+
var _this;
|
|
5554
5675
|
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
5555
|
-
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
5556
|
-
|
|
5676
|
+
var componentGroupPseudoState = (_this = componentGroupState || // fallback to context initially
|
|
5677
|
+
(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];
|
|
5557
5678
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`, {
|
|
5558
|
-
|
|
5679
|
+
componentGroupPseudoState: {
|
|
5680
|
+
...componentGroupPseudoState
|
|
5681
|
+
},
|
|
5682
|
+
usedKeys: {
|
|
5683
|
+
...styleState.usedKeys
|
|
5684
|
+
}
|
|
5559
5685
|
}), !isActive1) {
|
|
5560
5686
|
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
5561
5687
|
return;
|
|
@@ -5587,6 +5713,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5587
5713
|
...styleState.style
|
|
5588
5714
|
}), (0, import_log.log)("viewProps", {
|
|
5589
5715
|
...viewProps
|
|
5716
|
+
}), (0, import_log.log)("transforms", {
|
|
5717
|
+
...styleState.flatTransforms
|
|
5590
5718
|
});
|
|
5591
5719
|
} catch {
|
|
5592
5720
|
}
|
|
@@ -5620,7 +5748,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5620
5748
|
}
|
|
5621
5749
|
}));
|
|
5622
5750
|
}
|
|
5623
|
-
process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants.isClient && (console.groupCollapsed("getSplitStyles
|
|
5751
|
+
process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants.isClient && import_isDevTools.isDevTools && (console.groupCollapsed("\u{1F539} getSplitStyles \u{1F447}"), (0, import_log.log)({
|
|
5624
5752
|
props,
|
|
5625
5753
|
staticConfig,
|
|
5626
5754
|
shouldDoClasses,
|
|
@@ -5631,7 +5759,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5631
5759
|
theme: {
|
|
5632
5760
|
...theme
|
|
5633
5761
|
}
|
|
5634
|
-
})
|
|
5762
|
+
}));
|
|
5635
5763
|
var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
5636
5764
|
for (var keyOg in props) _loop(keyOg);
|
|
5637
5765
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-propsend`;
|
|
@@ -5713,8 +5841,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5713
5841
|
}
|
|
5714
5842
|
} else style2 && (viewProps.style = style2);
|
|
5715
5843
|
}
|
|
5716
|
-
if (process.env.NODE_ENV === "development" && debug
|
|
5717
|
-
console.groupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
5844
|
+
if (process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants.isClient && import_isDevTools.isDevTools) {
|
|
5845
|
+
console.groupEnd(), console.groupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
5718
5846
|
try {
|
|
5719
5847
|
var logs = {
|
|
5720
5848
|
...result,
|
|
@@ -5740,11 +5868,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5740
5868
|
mergeTransform(target, key, val, !0);
|
|
5741
5869
|
});
|
|
5742
5870
|
}
|
|
5743
|
-
function mergeStyle(styleState, key, val) {
|
|
5744
|
-
var disableNormalize = arguments.length >
|
|
5745
|
-
if (key in import_helpers2.stylePropsTransform) {
|
|
5746
|
-
var _styleState;
|
|
5747
|
-
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
5871
|
+
function mergeStyle(styleState, key, val, importance) {
|
|
5872
|
+
var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig } = styleState, existingImportance = styleState.usedKeys[key];
|
|
5873
|
+
if (!(importance < existingImportance)) if (key in import_helpers2.stylePropsTransform) {
|
|
5874
|
+
var _styleState, _styleState_usedKeys, _key;
|
|
5875
|
+
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), (_styleState_usedKeys = styleState.usedKeys)[_key = key] || (_styleState_usedKeys[_key] = 1), styleState.flatTransforms[key] = val;
|
|
5748
5876
|
} else {
|
|
5749
5877
|
var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
5750
5878
|
if (
|
|
@@ -5752,8 +5880,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5752
5880
|
staticConfig.accept && key in staticConfig.accept
|
|
5753
5881
|
) viewProps[key] = out;
|
|
5754
5882
|
else {
|
|
5755
|
-
var _styleState1;
|
|
5756
|
-
(_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
|
|
5883
|
+
var _styleState1, _styleState_usedKeys1, _key1;
|
|
5884
|
+
(_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
|
|
5757
5885
|
// if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
|
|
5758
5886
|
key === "transform" && Array.isArray(out) ? [
|
|
5759
5887
|
...out
|
|
@@ -5784,8 +5912,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5784
5912
|
}
|
|
5785
5913
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
5786
5914
|
}, useInsertEffectCompat = import_constants.isWeb ? import_react3.default.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : function() {
|
|
5787
|
-
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k) {
|
|
5788
|
-
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k);
|
|
5915
|
+
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l) {
|
|
5916
|
+
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l);
|
|
5789
5917
|
return res;
|
|
5790
5918
|
};
|
|
5791
5919
|
function addStyleToInsertRules(rulesToInsert, styleObject) {
|
|
@@ -5830,14 +5958,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5830
5958
|
delete viewProps[key], viewProps[key] = next;
|
|
5831
5959
|
} else viewProps[key] = val;
|
|
5832
5960
|
}
|
|
5833
|
-
function mergeMediaByImportance(styleState, mediaKey, key, value,
|
|
5834
|
-
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key,
|
|
5835
|
-
if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)(`mergeMediaByImportance ${key} importance
|
|
5836
|
-
if (
|
|
5961
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, usedKeys, isSizeMedia, importanceBump, debugProp) {
|
|
5962
|
+
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, usedKeys, isSizeMedia);
|
|
5963
|
+
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;
|
|
5964
|
+
if (usedKeys[key] = importance, key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
5837
5965
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
5838
5966
|
if (isDisabled) return !1;
|
|
5839
|
-
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
|
|
5840
|
-
} else mergeStyle(styleState, key, value);
|
|
5967
|
+
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
|
|
5968
|
+
} else mergeStyle(styleState, key, value, importance);
|
|
5841
5969
|
return !0;
|
|
5842
5970
|
}
|
|
5843
5971
|
function normalizeStyle(style) {
|
|
@@ -5850,7 +5978,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5850
5978
|
}
|
|
5851
5979
|
function applyDefaultStyle(pkey, styleState) {
|
|
5852
5980
|
var defaultValues = animatableDefaults[pkey];
|
|
5853
|
-
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
5981
|
+
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues, 1);
|
|
5854
5982
|
}
|
|
5855
5983
|
}
|
|
5856
5984
|
});
|
|
@@ -5971,81 +6099,6 @@ var require_setElementProps_native = __commonJS({
|
|
|
5971
6099
|
}
|
|
5972
6100
|
});
|
|
5973
6101
|
|
|
5974
|
-
// ../../packages/is-equal-shallow/dist/cjs/index.native.js
|
|
5975
|
-
var require_index_native6 = __commonJS({
|
|
5976
|
-
"../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
|
|
5977
|
-
"use strict";
|
|
5978
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
5979
|
-
for (var name in all) __defProp2(target, name, {
|
|
5980
|
-
get: all[name],
|
|
5981
|
-
enumerable: !0
|
|
5982
|
-
});
|
|
5983
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
5984
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
5985
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
5986
|
-
for (var _loop = function() {
|
|
5987
|
-
var key = _step.value;
|
|
5988
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
5989
|
-
get: function() {
|
|
5990
|
-
return from[key];
|
|
5991
|
-
},
|
|
5992
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
5993
|
-
});
|
|
5994
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
5995
|
-
} catch (err) {
|
|
5996
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
5997
|
-
} finally {
|
|
5998
|
-
try {
|
|
5999
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
6000
|
-
} finally {
|
|
6001
|
-
if (_didIteratorError)
|
|
6002
|
-
throw _iteratorError;
|
|
6003
|
-
}
|
|
6004
|
-
}
|
|
6005
|
-
return to;
|
|
6006
|
-
}, __toCommonJS2 = function(mod) {
|
|
6007
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6008
|
-
value: !0
|
|
6009
|
-
}), mod);
|
|
6010
|
-
}, index_exports2 = {};
|
|
6011
|
-
__export2(index_exports2, {
|
|
6012
|
-
isEqualShallow: function() {
|
|
6013
|
-
return isEqualShallow;
|
|
6014
|
-
},
|
|
6015
|
-
mergeIfNotShallowEqual: function() {
|
|
6016
|
-
return mergeIfNotShallowEqual;
|
|
6017
|
-
},
|
|
6018
|
-
useCreateShallowSetState: function() {
|
|
6019
|
-
return useCreateShallowSetState;
|
|
6020
|
-
}
|
|
6021
|
-
});
|
|
6022
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
6023
|
-
var import_react3 = require("react");
|
|
6024
|
-
function useCreateShallowSetState(setter, debug) {
|
|
6025
|
-
return (0, import_react3.useCallback)(function(next) {
|
|
6026
|
-
setter(function(prev) {
|
|
6027
|
-
var update = mergeIfNotShallowEqual(prev, next);
|
|
6028
|
-
if (process.env.NODE_ENV === "development" && debug && update !== prev && (console.groupCollapsed("setStateShallow CHANGE", prev, "=>", update), console.trace(), console.groupEnd(), debug === "break")) debugger;
|
|
6029
|
-
return update;
|
|
6030
|
-
});
|
|
6031
|
-
}, [
|
|
6032
|
-
setter,
|
|
6033
|
-
debug
|
|
6034
|
-
]);
|
|
6035
|
-
}
|
|
6036
|
-
function mergeIfNotShallowEqual(prev, next) {
|
|
6037
|
-
return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
6038
|
-
...prev,
|
|
6039
|
-
...next
|
|
6040
|
-
};
|
|
6041
|
-
}
|
|
6042
|
-
function isEqualShallow(prev, next) {
|
|
6043
|
-
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
6044
|
-
return !0;
|
|
6045
|
-
}
|
|
6046
|
-
}
|
|
6047
|
-
});
|
|
6048
|
-
|
|
6049
6102
|
// ../web/dist/cjs/helpers/subscribeToContextGroup.native.js
|
|
6050
6103
|
var require_subscribeToContextGroup_native = __commonJS({
|
|
6051
6104
|
"../web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
|
|
@@ -6089,31 +6142,58 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
6089
6142
|
}
|
|
6090
6143
|
});
|
|
6091
6144
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
6092
|
-
var
|
|
6093
|
-
var {
|
|
6145
|
+
var import_is_equal_shallow = require_index_native5(), import_useMedia = require_useMedia_native(), subscribeToContextGroup = function(props) {
|
|
6146
|
+
var { pseudoGroups, mediaGroups, groupContext } = props;
|
|
6094
6147
|
if (pseudoGroups || mediaGroups) {
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6148
|
+
process.env.NODE_ENV === "development" && !groupContext && console.debug("No context group found");
|
|
6149
|
+
var disposables = /* @__PURE__ */ new Set();
|
|
6150
|
+
if (pseudoGroups) for (var _i = 0, _iter = [
|
|
6151
|
+
...pseudoGroups
|
|
6152
|
+
]; _i < _iter.length; _i++) {
|
|
6153
|
+
var name = _iter[_i];
|
|
6154
|
+
disposables.add(createGroupListener(name, props));
|
|
6155
|
+
}
|
|
6156
|
+
if (mediaGroups) for (var _i1 = 0, _iter1 = [
|
|
6157
|
+
...mediaGroups
|
|
6158
|
+
]; _i1 < _iter1.length; _i1++) {
|
|
6159
|
+
var name1 = _iter1[_i1];
|
|
6160
|
+
disposables.add(createGroupListener(name1, props));
|
|
6161
|
+
}
|
|
6162
|
+
return function() {
|
|
6163
|
+
disposables.forEach(function(d) {
|
|
6164
|
+
return d();
|
|
6165
|
+
});
|
|
6166
|
+
};
|
|
6167
|
+
}
|
|
6168
|
+
}, createGroupListener = function(name, param) {
|
|
6169
|
+
var { setStateShallow, pseudoGroups, mediaGroups, groupContext } = param, parent = groupContext == null ? void 0 : groupContext[name];
|
|
6170
|
+
return parent ? parent.subscribe(function(param2) {
|
|
6171
|
+
var { layout, pseudo } = param2;
|
|
6172
|
+
setStateShallow(function(prev) {
|
|
6173
|
+
var _prev_group, didChange = !1, group = ((_prev_group = prev.group) === null || _prev_group === void 0 ? void 0 : _prev_group[name]) || {
|
|
6098
6174
|
pseudo: {},
|
|
6099
6175
|
media: {}
|
|
6100
6176
|
};
|
|
6101
|
-
if (pseudo && pseudoGroups != null && pseudoGroups.has(
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
next
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
var
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
setStateShallow({
|
|
6112
|
-
group
|
|
6113
|
-
});
|
|
6177
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(name)) {
|
|
6178
|
+
var _group;
|
|
6179
|
+
(_group = group).pseudo || (_group.pseudo = {});
|
|
6180
|
+
var next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.pseudo, pseudo);
|
|
6181
|
+
next !== group.pseudo && (Object.assign(group.pseudo, pseudo), didChange = !0);
|
|
6182
|
+
} else if (layout && mediaGroups) {
|
|
6183
|
+
var _group1;
|
|
6184
|
+
(_group1 = group).media || (_group1.media = {});
|
|
6185
|
+
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next1 = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState2);
|
|
6186
|
+
next1 !== group.media && (Object.assign(group.media, next1), didChange = !0);
|
|
6114
6187
|
}
|
|
6188
|
+
return didChange ? {
|
|
6189
|
+
group: {
|
|
6190
|
+
...prev.group,
|
|
6191
|
+
[name]: group
|
|
6192
|
+
}
|
|
6193
|
+
} : prev;
|
|
6115
6194
|
});
|
|
6116
|
-
}
|
|
6195
|
+
}) : function() {
|
|
6196
|
+
};
|
|
6117
6197
|
};
|
|
6118
6198
|
}
|
|
6119
6199
|
});
|
|
@@ -7112,8 +7192,8 @@ var require_useComponentState_native = __commonJS({
|
|
|
7112
7192
|
}
|
|
7113
7193
|
});
|
|
7114
7194
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
7115
|
-
var import_constants = require_index_native2(), import_is_equal_shallow =
|
|
7116
|
-
var
|
|
7195
|
+
var import_constants = require_index_native2(), import_is_equal_shallow = require_index_native5(), import_use_did_finish_ssr = require_index_native7(), 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) {
|
|
7196
|
+
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);
|
|
7117
7197
|
stateRef.current || (stateRef.current = {});
|
|
7118
7198
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
7119
7199
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
@@ -7161,26 +7241,6 @@ var require_useComponentState_native = __commonJS({
|
|
|
7161
7241
|
isClassNameDisabled
|
|
7162
7242
|
}));
|
|
7163
7243
|
}
|
|
7164
|
-
if (groupName && !curStateRef.group) {
|
|
7165
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
7166
|
-
curStateRef.group = {
|
|
7167
|
-
listeners,
|
|
7168
|
-
emit(name, state2) {
|
|
7169
|
-
listeners.forEach(function(l) {
|
|
7170
|
-
return l(name, state2);
|
|
7171
|
-
});
|
|
7172
|
-
},
|
|
7173
|
-
subscribe(cb) {
|
|
7174
|
-
return listeners.add(cb), setStateShallow({
|
|
7175
|
-
hasDynGroupChildren: !0
|
|
7176
|
-
}), function() {
|
|
7177
|
-
listeners.delete(cb), listeners.size === 0 && setStateShallow({
|
|
7178
|
-
hasDynGroupChildren: !1
|
|
7179
|
-
});
|
|
7180
|
-
};
|
|
7181
|
-
}
|
|
7182
|
-
};
|
|
7183
|
-
}
|
|
7184
7244
|
return {
|
|
7185
7245
|
startedUnhydrated,
|
|
7186
7246
|
curStateRef,
|
|
@@ -7430,23 +7490,26 @@ var require_createComponent_native = __commonJS({
|
|
|
7430
7490
|
}
|
|
7431
7491
|
});
|
|
7432
7492
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
7433
|
-
var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = 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([
|
|
7493
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_is_equal_shallow = require_index_native5(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = 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([
|
|
7434
7494
|
"hover",
|
|
7435
7495
|
"press",
|
|
7436
7496
|
"pressIn",
|
|
7437
7497
|
"group",
|
|
7438
|
-
"
|
|
7498
|
+
"focus",
|
|
7499
|
+
"focusWithin",
|
|
7500
|
+
"media",
|
|
7501
|
+
"group"
|
|
7439
7502
|
]);
|
|
7440
7503
|
if (0) var cancelTouches;
|
|
7441
7504
|
var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
7442
7505
|
value: !1
|
|
7443
7506
|
};
|
|
7444
7507
|
import_constants.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
|
|
7445
|
-
lastInteractionWasKeyboard.value = !0;
|
|
7508
|
+
lastInteractionWasKeyboard.value || (lastInteractionWasKeyboard.value = !0);
|
|
7446
7509
|
}), document.addEventListener("mousedown", function() {
|
|
7447
|
-
lastInteractionWasKeyboard.value = !1;
|
|
7510
|
+
lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
|
|
7448
7511
|
}), document.addEventListener("mousemove", function() {
|
|
7449
|
-
lastInteractionWasKeyboard.value = !1;
|
|
7512
|
+
lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
|
|
7450
7513
|
}));
|
|
7451
7514
|
function createComponent(staticConfig) {
|
|
7452
7515
|
var _staticConfig_defaultProps, { componentName } = staticConfig, config = null, defaultProps = staticConfig.defaultProps;
|
|
@@ -7477,7 +7540,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7477
7540
|
var _propsIn_datatestrenders, _current, _;
|
|
7478
7541
|
(_ = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _ !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
|
|
7479
7542
|
}
|
|
7480
|
-
var
|
|
7543
|
+
var styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
|
|
7481
7544
|
if (context && (contextValue = import_react3.default.useContext(context), contextValue)) {
|
|
7482
7545
|
process.env.NODE_ENV === "development" && (propsIn == null ? void 0 : propsIn.debug) === "verbose" && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
|
|
7483
7546
|
for (var key in context.props) {
|
|
@@ -7502,7 +7565,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7502
7565
|
var componentName2 = props.componentName || staticConfig.componentName;
|
|
7503
7566
|
process.env.NODE_ENV === "development" && import_constants.isClient && import_react3.default.useEffect(function() {
|
|
7504
7567
|
var overlay = null, debugVisualizerHandler = function() {
|
|
7505
|
-
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node =
|
|
7568
|
+
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = stateRef.current.host;
|
|
7506
7569
|
if (node) if (show) {
|
|
7507
7570
|
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";
|
|
7508
7571
|
var dataAt = node.getAttribute("data-at") || "", dataIn = node.getAttribute("data-in") || "", tooltip = document.createElement("span");
|
|
@@ -7515,8 +7578,52 @@ var require_createComponent_native = __commonJS({
|
|
|
7515
7578
|
}, [
|
|
7516
7579
|
componentName2
|
|
7517
7580
|
]);
|
|
7518
|
-
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props,
|
|
7519
|
-
|
|
7581
|
+
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() {
|
|
7582
|
+
var _stateRef_current_group;
|
|
7583
|
+
if (!groupName) return groupContextParent;
|
|
7584
|
+
(_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
|
|
7585
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
7586
|
+
return stateRef.current.group = {
|
|
7587
|
+
listeners,
|
|
7588
|
+
emit(state2) {
|
|
7589
|
+
listeners.forEach(function(l) {
|
|
7590
|
+
return l(state2);
|
|
7591
|
+
});
|
|
7592
|
+
},
|
|
7593
|
+
subscribe(cb) {
|
|
7594
|
+
return listeners.add(cb), listeners.size === 1 && setStateShallow({
|
|
7595
|
+
hasDynGroupChildren: !0
|
|
7596
|
+
}), function() {
|
|
7597
|
+
listeners.delete(cb), listeners.size === 0 && setStateShallow({
|
|
7598
|
+
hasDynGroupChildren: !1
|
|
7599
|
+
});
|
|
7600
|
+
};
|
|
7601
|
+
}
|
|
7602
|
+
}, {
|
|
7603
|
+
...groupContextParent,
|
|
7604
|
+
[groupName]: {
|
|
7605
|
+
state: {
|
|
7606
|
+
pseudo: import_defaultComponentState.defaultComponentStateMounted
|
|
7607
|
+
},
|
|
7608
|
+
subscribe: function(listener) {
|
|
7609
|
+
var _stateRef_current_group2, dispose = (_stateRef_current_group2 = stateRef.current.group) === null || _stateRef_current_group2 === void 0 ? void 0 : _stateRef_current_group2.subscribe(listener);
|
|
7610
|
+
return function() {
|
|
7611
|
+
dispose == null || dispose();
|
|
7612
|
+
};
|
|
7613
|
+
}
|
|
7614
|
+
}
|
|
7615
|
+
};
|
|
7616
|
+
}, [
|
|
7617
|
+
stateRef,
|
|
7618
|
+
groupName,
|
|
7619
|
+
groupContextParent
|
|
7620
|
+
]), setStateShallow = componentState.setStateShallow, pendingState = stateRef.current.nextComponentState;
|
|
7621
|
+
pendingState && (stateRef.current.nextComponentState = void 0, componentState.setState(function(prev) {
|
|
7622
|
+
return {
|
|
7623
|
+
...prev,
|
|
7624
|
+
...pendingState
|
|
7625
|
+
};
|
|
7626
|
+
})), process.env.NODE_ENV === "development" && time2 && time2`use-state`;
|
|
7520
7627
|
var hasTextAncestor = !!(import_constants.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
7521
7628
|
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
7522
7629
|
// "needsWebStyles" basically with motion we just animate a plain div, but
|
|
@@ -7524,14 +7631,14 @@ var require_createComponent_native = __commonJS({
|
|
|
7524
7631
|
// things declaratively
|
|
7525
7632
|
!animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
7526
7633
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
7527
|
-
process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (
|
|
7634
|
+
process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (stateRef.current.themeShallow = !0);
|
|
7528
7635
|
var themeStateProps = {
|
|
7529
7636
|
componentName: componentName2,
|
|
7530
7637
|
disable: disableTheme,
|
|
7531
|
-
shallow:
|
|
7638
|
+
shallow: stateRef.current.themeShallow,
|
|
7532
7639
|
debug: debugProp
|
|
7533
7640
|
};
|
|
7534
|
-
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof
|
|
7641
|
+
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof stateRef.current.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
|
|
7535
7642
|
return !!stateRef.current.isListeningToTheme;
|
|
7536
7643
|
}), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
7537
7644
|
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()}`;
|
|
@@ -7551,7 +7658,8 @@ var require_createComponent_native = __commonJS({
|
|
|
7551
7658
|
themeStateProps
|
|
7552
7659
|
}), (0, import_log.log)({
|
|
7553
7660
|
contextProps: styledContextProps,
|
|
7554
|
-
overriddenContextProps
|
|
7661
|
+
overriddenContextProps,
|
|
7662
|
+
componentContext
|
|
7555
7663
|
}), (0, import_log.log)({
|
|
7556
7664
|
presence,
|
|
7557
7665
|
isAnimated,
|
|
@@ -7580,32 +7688,53 @@ var require_createComponent_native = __commonJS({
|
|
|
7580
7688
|
noMergeStyle: isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles)
|
|
7581
7689
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
7582
7690
|
process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
|
|
7583
|
-
var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
7584
|
-
if (
|
|
7585
|
-
var
|
|
7586
|
-
|
|
7587
|
-
var
|
|
7588
|
-
|
|
7691
|
+
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;
|
|
7692
|
+
if (groupContext) {
|
|
7693
|
+
var groupState = groupContext == null ? void 0 : groupContext.state;
|
|
7694
|
+
if (groupState && groupState.layout === void 0) {
|
|
7695
|
+
var _splitStyles_style, _splitStyles_style1;
|
|
7696
|
+
(!((_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 = {
|
|
7697
|
+
width: fromPx(splitStyles.style.width),
|
|
7698
|
+
height: fromPx(splitStyles.style.height)
|
|
7589
7699
|
});
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7700
|
+
}
|
|
7701
|
+
}
|
|
7702
|
+
if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
7703
|
+
var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
7704
|
+
stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
7705
|
+
var prev = stateRef.current.nextComponentState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
7706
|
+
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
7707
|
+
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
7708
|
+
return avoidReRenderKeys.has(key3);
|
|
7709
|
+
});
|
|
7710
|
+
if (canAvoidReRender) {
|
|
7711
|
+
var updatedState = {
|
|
7712
|
+
...prev,
|
|
7713
|
+
...next
|
|
7714
|
+
};
|
|
7715
|
+
stateRef.current.nextComponentState = updatedState, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && (console.groupCollapsed("[\u26A1\uFE0F] avoid setState", next, {
|
|
7716
|
+
updatedState,
|
|
7717
|
+
props
|
|
7718
|
+
}), console.info(stateRef.current.host), console.groupEnd());
|
|
7719
|
+
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
7720
|
+
if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
|
|
7721
|
+
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
7722
|
+
styleListener(nextStyles.style);
|
|
7723
|
+
} else process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && console.info("[\u{1F40C}] re-render", {
|
|
7724
|
+
canAvoidReRender,
|
|
7725
|
+
next
|
|
7726
|
+
}), ogSetStateShallow(next);
|
|
7727
|
+
}
|
|
7728
|
+
}, setStateShallow = function(state2) {
|
|
7729
|
+
var _stateRef_current_setStateShallow, _stateRef_current;
|
|
7730
|
+
(_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
|
|
7602
7731
|
};
|
|
7603
7732
|
}
|
|
7604
|
-
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !
|
|
7733
|
+
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
|
|
7605
7734
|
var _splitStyles;
|
|
7606
7735
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
7607
7736
|
}
|
|
7608
|
-
|
|
7737
|
+
splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
|
|
7609
7738
|
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
7610
7739
|
process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
|
|
7611
7740
|
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
|
|
@@ -7660,18 +7789,18 @@ var require_createComponent_native = __commonJS({
|
|
|
7660
7789
|
}
|
|
7661
7790
|
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.
|
|
7662
7791
|
|
|
7663
|
-
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`,
|
|
7664
|
-
var layout = e.nativeEvent.layout;
|
|
7665
|
-
|
|
7792
|
+
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_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
7793
|
+
var _stateRef_current_group, layout = e.nativeEvent.layout;
|
|
7794
|
+
groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
|
|
7666
7795
|
layout
|
|
7667
7796
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
7668
7797
|
return {
|
|
7669
7798
|
...prev
|
|
7670
7799
|
};
|
|
7671
7800
|
}), stateRef.current.hasMeasured = !0;
|
|
7672
|
-
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef,
|
|
7801
|
+
})), 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) {
|
|
7673
7802
|
return stateRef.current.host = x;
|
|
7674
|
-
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref =
|
|
7803
|
+
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = stateRef.current.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react3.default.Children.toArray(props.children).forEach(function(item) {
|
|
7675
7804
|
typeof item == "string" && item !== `
|
|
7676
7805
|
` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
|
|
7677
7806
|
}), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
|
|
@@ -7693,7 +7822,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7693
7822
|
console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`), console.warn(stateRef.current.host), console.warn(computed), console.groupEnd();
|
|
7694
7823
|
}
|
|
7695
7824
|
}), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7696
|
-
if (
|
|
7825
|
+
if (state.unmounted === !0 && hasEnterStyle) {
|
|
7697
7826
|
setStateShallow({
|
|
7698
7827
|
unmounted: "should-enter"
|
|
7699
7828
|
});
|
|
@@ -7713,18 +7842,21 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7713
7842
|
});
|
|
7714
7843
|
return;
|
|
7715
7844
|
}
|
|
7716
|
-
var dispose = !disabled && (pseudoGroups || mediaGroups) ? (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
7717
|
-
componentContext,
|
|
7718
|
-
setStateShallow,
|
|
7719
|
-
state,
|
|
7720
|
-
mediaGroups,
|
|
7721
|
-
pseudoGroups
|
|
7722
|
-
}) : null;
|
|
7723
7845
|
return function() {
|
|
7724
|
-
|
|
7846
|
+
componentSetStates.delete(setState);
|
|
7725
7847
|
};
|
|
7726
7848
|
}, [
|
|
7727
7849
|
state.unmounted,
|
|
7850
|
+
disabled
|
|
7851
|
+
]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7852
|
+
if (!disabled && !(!pseudoGroups && !mediaGroups) && allGroupContexts) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
7853
|
+
groupContext: allGroupContexts,
|
|
7854
|
+
setStateShallow,
|
|
7855
|
+
mediaGroups,
|
|
7856
|
+
pseudoGroups
|
|
7857
|
+
});
|
|
7858
|
+
}, [
|
|
7859
|
+
allGroupContexts,
|
|
7728
7860
|
disabled,
|
|
7729
7861
|
pseudoGroups ? Object.keys([
|
|
7730
7862
|
...pseudoGroups
|
|
@@ -7732,24 +7864,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7732
7864
|
mediaGroups ? Object.keys([
|
|
7733
7865
|
...mediaGroups
|
|
7734
7866
|
]).join("") : 0
|
|
7735
|
-
]), (0,
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
});
|
|
7742
|
-
var groupContextState = componentContext == null ? void 0 : componentContext.groups;
|
|
7743
|
-
if (groupContextState) {
|
|
7744
|
-
var next = {
|
|
7745
|
-
...groupContextState[groupName],
|
|
7746
|
-
...state
|
|
7747
|
-
};
|
|
7748
|
-
groupContextState[groupName] = next;
|
|
7749
|
-
}
|
|
7750
|
-
}
|
|
7867
|
+
]), hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_react3.useEffect)(function() {
|
|
7868
|
+
stateRef.current.nextComponentState = void 0;
|
|
7869
|
+
});
|
|
7870
|
+
var groupEmitter = stateRef.current.group;
|
|
7871
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7872
|
+
!groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state);
|
|
7751
7873
|
}, [
|
|
7752
|
-
|
|
7874
|
+
groupContext,
|
|
7875
|
+
groupEmitter,
|
|
7753
7876
|
state
|
|
7754
7877
|
]);
|
|
7755
7878
|
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_constants.isWeb && !!(hasDynamicGroupChildren || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(hasDynamicGroupChildren || runtimePressStyle);
|
|
@@ -7776,7 +7899,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7776
7899
|
},
|
|
7777
7900
|
onMouseLeave: function(e) {
|
|
7778
7901
|
var next = {};
|
|
7779
|
-
needsHoverState && (next.hover = !1), needsPressState &&
|
|
7902
|
+
needsHoverState && (next.hover = !1), needsPressState && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
7780
7903
|
}
|
|
7781
7904
|
},
|
|
7782
7905
|
onPressIn: attachPress ? function(e) {
|
|
@@ -7854,37 +7977,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7854
7977
|
var useChildrenResult;
|
|
7855
7978
|
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);
|
|
7856
7979
|
var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
|
|
7857
|
-
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
|
|
7980
|
+
if (ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
|
|
7858
7981
|
children: content
|
|
7859
|
-
})), process.env.NODE_ENV === "development" && time2 && time2`create-element
|
|
7860
|
-
var groupState = curStateRef.group, subGroupContext = import_react3.default.useMemo(function() {
|
|
7861
|
-
var _splitStyles_style, _splitStyles_style1;
|
|
7862
|
-
if (!(!groupState || !groupName)) return groupState.listeners.clear(), {
|
|
7863
|
-
...componentContext.groups,
|
|
7864
|
-
// change reference so as we mutate it doesn't affect siblings etc
|
|
7865
|
-
state: {
|
|
7866
|
-
...componentContext.groups.state,
|
|
7867
|
-
[groupName]: {
|
|
7868
|
-
pseudo: import_defaultComponentState.defaultComponentStateMounted,
|
|
7869
|
-
// capture just initial width and height if they exist
|
|
7870
|
-
// will have top, left, width, height (not x, y)
|
|
7871
|
-
layout: {
|
|
7872
|
-
width: fromPx((_splitStyles_style = splitStyles.style) === null || _splitStyles_style === void 0 ? void 0 : _splitStyles_style.width),
|
|
7873
|
-
height: fromPx((_splitStyles_style1 = splitStyles.style) === null || _splitStyles_style1 === void 0 ? void 0 : _splitStyles_style1.height)
|
|
7874
|
-
}
|
|
7875
|
-
}
|
|
7876
|
-
},
|
|
7877
|
-
emit: groupState.emit,
|
|
7878
|
-
subscribe: groupState.subscribe
|
|
7879
|
-
};
|
|
7880
|
-
}, [
|
|
7881
|
-
groupName
|
|
7882
|
-
]);
|
|
7883
|
-
if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
7982
|
+
})), process.env.NODE_ENV === "development" && time2 && time2`create-element`, "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
7884
7983
|
...componentContext,
|
|
7885
|
-
groups: subGroupContext,
|
|
7886
7984
|
setParentFocusState: setStateShallow,
|
|
7887
7985
|
children: content
|
|
7986
|
+
})), "group" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
7987
|
+
value: allGroupContexts,
|
|
7988
|
+
children: content
|
|
7888
7989
|
})), 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) {
|
|
7889
7990
|
var contextProps = staticConfig.context.props;
|
|
7890
7991
|
for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
|
|
@@ -7911,6 +8012,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7911
8012
|
(0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && (0, import_log.log)({
|
|
7912
8013
|
propsIn,
|
|
7913
8014
|
props,
|
|
8015
|
+
attachPress,
|
|
7914
8016
|
animationStyles,
|
|
7915
8017
|
classNames,
|
|
7916
8018
|
content,
|
|
@@ -7949,6 +8051,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7949
8051
|
delete globalThis.willPrint, time2.print(), time2 = null;
|
|
7950
8052
|
}, 50))), content;
|
|
7951
8053
|
});
|
|
8054
|
+
function notifyGroupSubscribers(groupContext, groupEmitter, pseudo) {
|
|
8055
|
+
if (!(!groupContext || !groupEmitter)) {
|
|
8056
|
+
var nextState = {
|
|
8057
|
+
...groupContext.state,
|
|
8058
|
+
pseudo
|
|
8059
|
+
};
|
|
8060
|
+
groupEmitter.emit(nextState), groupContext.state = nextState;
|
|
8061
|
+
}
|
|
8062
|
+
}
|
|
7952
8063
|
staticConfig.componentName && (component.displayName = staticConfig.componentName);
|
|
7953
8064
|
var res = component;
|
|
7954
8065
|
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ import_react3.default.memo(res)), res.staticConfig = staticConfig;
|
|
@@ -9722,13 +9833,8 @@ var require_useConfiguration_native = __commonJS({
|
|
|
9722
9833
|
}
|
|
9723
9834
|
});
|
|
9724
9835
|
module2.exports = __toCommonJS2(useConfiguration_exports);
|
|
9725
|
-
var import_react3 = __toESM2(require("react")),
|
|
9726
|
-
|
|
9727
|
-
return {
|
|
9728
|
-
...restConfig,
|
|
9729
|
-
...restComponentConfig,
|
|
9730
|
-
animationDriver: animationDriver ?? (0, import_config.getConfig)().animations
|
|
9731
|
-
};
|
|
9836
|
+
var import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), useConfiguration = function() {
|
|
9837
|
+
return import_react3.default.useContext(import_ComponentContext.ComponentContext);
|
|
9732
9838
|
};
|
|
9733
9839
|
}
|
|
9734
9840
|
});
|
|
@@ -9895,7 +10001,7 @@ var require_useProps_native = __commonJS({
|
|
|
9895
10001
|
}
|
|
9896
10002
|
});
|
|
9897
10003
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
9898
|
-
var import_constants = require_index_native2(), 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();
|
|
10004
|
+
var import_constants = require_index_native2(), 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();
|
|
9899
10005
|
function useProps(props, opts) {
|
|
9900
10006
|
var [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
9901
10007
|
...opts,
|
|
@@ -9919,7 +10025,7 @@ var require_useProps_native = __commonJS({
|
|
|
9919
10025
|
needsUpdate() {
|
|
9920
10026
|
return !0;
|
|
9921
10027
|
}
|
|
9922
|
-
}), 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 ? (
|
|
10028
|
+
}), 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 ? (
|
|
9923
10029
|
// not safe to use mediaState but really marginal to hit this
|
|
9924
10030
|
import_useMedia.mediaState
|
|
9925
10031
|
) : (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state, {
|
|
@@ -9930,7 +10036,7 @@ var require_useProps_native = __commonJS({
|
|
|
9930
10036
|
noClass: !0,
|
|
9931
10037
|
resolveValues: "auto",
|
|
9932
10038
|
...opts
|
|
9933
|
-
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
10039
|
+
}, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
9934
10040
|
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9935
10041
|
if (!disabled) {
|
|
9936
10042
|
if (state.unmounted) {
|
|
@@ -9939,16 +10045,16 @@ var require_useProps_native = __commonJS({
|
|
|
9939
10045
|
});
|
|
9940
10046
|
return;
|
|
9941
10047
|
}
|
|
9942
|
-
return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
9943
|
-
|
|
10048
|
+
if (groupContext) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
10049
|
+
groupContext,
|
|
9944
10050
|
setStateShallow,
|
|
9945
|
-
state,
|
|
9946
10051
|
mediaGroups,
|
|
9947
10052
|
pseudoGroups
|
|
9948
10053
|
});
|
|
9949
10054
|
}
|
|
9950
10055
|
}, [
|
|
9951
10056
|
disabled,
|
|
10057
|
+
groupContext,
|
|
9952
10058
|
pseudoGroups ? Object.keys([
|
|
9953
10059
|
...pseudoGroups
|
|
9954
10060
|
]).join("") : 0,
|
|
@@ -10693,7 +10799,7 @@ var require_index_native9 = __commonJS({
|
|
|
10693
10799
|
__reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
|
|
10694
10800
|
__reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
|
|
10695
10801
|
__reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
|
|
10696
|
-
__reExport2(index_exports2,
|
|
10802
|
+
__reExport2(index_exports2, require_index_native5(), module2.exports);
|
|
10697
10803
|
var import_insertStyleRule2 = require_insertStyleRule_native();
|
|
10698
10804
|
__reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
|
|
10699
10805
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
@@ -12189,7 +12295,7 @@ var require_index_native12 = __commonJS({
|
|
|
12189
12295
|
}
|
|
12190
12296
|
});
|
|
12191
12297
|
module2.exports = __toCommonJS2(index_exports2);
|
|
12192
|
-
var import_constants = require_index_native2(), import_is_equal_shallow =
|
|
12298
|
+
var import_constants = require_index_native2(), import_is_equal_shallow = require_index_native5(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
|
|
12193
12299
|
function setOnLayoutStrategy2(state) {
|
|
12194
12300
|
strategy = state;
|
|
12195
12301
|
}
|
|
@@ -12231,7 +12337,9 @@ var require_index_native12 = __commonJS({
|
|
|
12231
12337
|
} else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
|
|
12232
12338
|
var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
|
|
12233
12339
|
if (!cachedRect || // has changed one rect
|
|
12234
|
-
|
|
12340
|
+
// @ts-expect-error DOMRectReadOnly can go into object
|
|
12341
|
+
!(0, import_is_equal_shallow.isEqualShallow)(cachedRect, nodeRect) && // @ts-expect-error DOMRectReadOnly can go into object
|
|
12342
|
+
(!cachedParentRect || !(0, import_is_equal_shallow.isEqualShallow)(cachedParentRect, parentRect))) {
|
|
12235
12343
|
NodeRectCache.set(node, nodeRect), ParentRectCache.set(parentNode, parentRect);
|
|
12236
12344
|
var event = getElementLayoutEvent(nodeRect, parentRect);
|
|
12237
12345
|
avoidUpdates ? queuedUpdates.set(node, function() {
|