@tamagui/core 1.129.12-1751449245669 → 1.129.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.js +296 -390
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +279 -355
- package/dist/test.native.js.map +3 -3
- package/package.json +9 -9
package/dist/native.js
CHANGED
|
@@ -2450,81 +2450,6 @@ 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
|
-
|
|
2528
2453
|
// ../web/dist/cjs/constants/isDevTools.native.js
|
|
2529
2454
|
var require_isDevTools_native = __commonJS({
|
|
2530
2455
|
"../web/dist/cjs/constants/isDevTools.native.js"(exports2, module2) {
|
|
@@ -2772,55 +2697,13 @@ var require_ComponentContext_native = __commonJS({
|
|
|
2772
2697
|
inText: !1,
|
|
2773
2698
|
language: null,
|
|
2774
2699
|
animationDriver: null,
|
|
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;
|
|
2700
|
+
setParentFocusState: null,
|
|
2701
|
+
groups: {
|
|
2702
|
+
emit: null,
|
|
2703
|
+
subscribe: null,
|
|
2704
|
+
state: {}
|
|
2820
2705
|
}
|
|
2821
2706
|
});
|
|
2822
|
-
module2.exports = __toCommonJS2(GroupContext_exports);
|
|
2823
|
-
var import_react3 = require("react"), GroupContext = /* @__PURE__ */ (0, import_react3.createContext)(null);
|
|
2824
2707
|
}
|
|
2825
2708
|
});
|
|
2826
2709
|
|
|
@@ -3729,7 +3612,7 @@ var require_normalize_color = __commonJS({
|
|
|
3729
3612
|
});
|
|
3730
3613
|
|
|
3731
3614
|
// ../normalize-css-color/dist/cjs/index.native.js
|
|
3732
|
-
var
|
|
3615
|
+
var require_index_native5 = __commonJS({
|
|
3733
3616
|
"../normalize-css-color/dist/cjs/index.native.js"(exports2, module2) {
|
|
3734
3617
|
"use strict";
|
|
3735
3618
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -3852,7 +3735,7 @@ var require_normalizeColor_native = __commonJS({
|
|
|
3852
3735
|
}
|
|
3853
3736
|
});
|
|
3854
3737
|
module2.exports = __toCommonJS2(normalizeColor_exports);
|
|
3855
|
-
var import_normalize_css_color =
|
|
3738
|
+
var import_normalize_css_color = require_index_native5(), import_normalize_css_color2 = require_index_native5(), normalizeColor = function(color, opacity) {
|
|
3856
3739
|
if (color) {
|
|
3857
3740
|
if (color[0] === "$") return color;
|
|
3858
3741
|
if (color.startsWith("var(")) {
|
|
@@ -5428,7 +5311,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5428
5311
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
5429
5312
|
return key in validStyles2 ? !0 : accept && key in accept;
|
|
5430
5313
|
}
|
|
5431
|
-
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext,
|
|
5314
|
+
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, elementType, startedUnhydrated, debug) {
|
|
5432
5315
|
var _loop = function(keyOg2) {
|
|
5433
5316
|
var keyInit = keyOg2, valInit = props[keyInit];
|
|
5434
5317
|
if (keyInit === "children") return viewProps[keyInit] = valInit, "continue";
|
|
@@ -5437,7 +5320,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5437
5320
|
var accepted = accept[keyInit];
|
|
5438
5321
|
if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass), "continue";
|
|
5439
5322
|
}
|
|
5440
|
-
if (process.env.NODE_ENV, disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className") return "continue";
|
|
5323
|
+
if (process.env.NODE_ENV, disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys) return "continue";
|
|
5441
5324
|
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
|
|
5442
5325
|
if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
|
|
5443
5326
|
return "continue";
|
|
@@ -5462,7 +5345,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5462
5345
|
parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
|
|
5463
5346
|
) {
|
|
5464
5347
|
var name2 = parts[1];
|
|
5465
|
-
|
|
5348
|
+
componentContext != null && componentContext.groups.subscribe && !(componentContext != null && componentContext.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
5466
5349
|
}
|
|
5467
5350
|
}
|
|
5468
5351
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
@@ -5488,13 +5371,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5488
5371
|
viewProps[key4] = val2;
|
|
5489
5372
|
return;
|
|
5490
5373
|
}
|
|
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) {
|
|
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 && !(key4 in usedKeys)) {
|
|
5492
5375
|
if (key4 === "pointerEvents") {
|
|
5493
5376
|
viewProps[key4] = val2;
|
|
5494
5377
|
return;
|
|
5495
5378
|
}
|
|
5496
5379
|
if (!isHOC && isValidStyleKey(key4, validStyles2, accept) || import_constants.isAndroid && key4 === "elevation") {
|
|
5497
|
-
mergeStyle(styleState, key4, val2
|
|
5380
|
+
mergeStyle(styleState, key4, val2);
|
|
5498
5381
|
return;
|
|
5499
5382
|
}
|
|
5500
5383
|
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)) {
|
|
@@ -5530,7 +5413,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5530
5413
|
try {
|
|
5531
5414
|
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
|
5532
5415
|
var psuedoStyle = _step2.value, fullKey = `${psuedoStyle[import_helpers2.StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
|
|
5533
|
-
addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers2.StyleObjectIdentifier];
|
|
5416
|
+
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers2.StyleObjectIdentifier]);
|
|
5534
5417
|
}
|
|
5535
5418
|
} catch (err) {
|
|
5536
5419
|
_didIteratorError2 = !0, _iteratorError2 = err;
|
|
@@ -5563,7 +5446,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5563
5446
|
var _pseudos1, _key1;
|
|
5564
5447
|
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
|
|
5565
5448
|
}
|
|
5566
|
-
mergeStyle(styleState, pkey, _$val
|
|
5449
|
+
mergeStyle(styleState, pkey, _$val);
|
|
5567
5450
|
}
|
|
5568
5451
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
5569
5452
|
importance,
|
|
@@ -5584,7 +5467,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5584
5467
|
if (!val2) return;
|
|
5585
5468
|
var hasSpace = val2.space, mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
|
|
5586
5469
|
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;
|
|
5587
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key4}`, {
|
|
5470
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key4}`, {
|
|
5588
5471
|
key: key4,
|
|
5589
5472
|
val: val2,
|
|
5590
5473
|
props,
|
|
@@ -5592,15 +5475,15 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5592
5475
|
acceptsClassName,
|
|
5593
5476
|
componentState,
|
|
5594
5477
|
mediaState: mediaState2
|
|
5595
|
-
})
|
|
5596
|
-
var priority = mediaStylesSeen;
|
|
5597
|
-
if (mediaStylesSeen += 1, shouldDoClasses) {
|
|
5478
|
+
}), shouldDoClasses) {
|
|
5598
5479
|
var mediaStyle = getSubStyle(styleState, key4, val2, !1);
|
|
5599
5480
|
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
5600
5481
|
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
5601
5482
|
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})`));
|
|
5602
5483
|
}
|
|
5603
|
-
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle),
|
|
5484
|
+
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), priority = mediaStylesSeen;
|
|
5485
|
+
mediaStylesSeen += 1;
|
|
5486
|
+
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
5604
5487
|
try {
|
|
5605
5488
|
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
|
|
5606
5489
|
var style3 = _step12.value, property = style3[import_helpers2.StyleObjectProperty], isSubStyle = property[0] === "$";
|
|
@@ -5608,7 +5491,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5608
5491
|
var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
5609
5492
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
5610
5493
|
var subKey = isSubStyle ? style3[2] : "", fullKey1 = `${style3[import_helpers2.StyleObjectProperty]}${subKey}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers2.StyleObjectPseudo] || ""}`;
|
|
5611
|
-
addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers2.StyleObjectIdentifier];
|
|
5494
|
+
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers2.StyleObjectIdentifier]);
|
|
5612
5495
|
}
|
|
5613
5496
|
}
|
|
5614
5497
|
} catch (err) {
|
|
@@ -5646,12 +5529,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5646
5529
|
scheme,
|
|
5647
5530
|
val: _$val1,
|
|
5648
5531
|
oppositeVal
|
|
5649
|
-
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]
|
|
5532
|
+
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]);
|
|
5650
5533
|
}
|
|
5651
5534
|
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
5652
5535
|
} else if (isGroupMedia) {
|
|
5653
|
-
var
|
|
5654
|
-
if (!
|
|
5536
|
+
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = componentContext == null ? void 0 : componentContext.groups.state[groupName];
|
|
5537
|
+
if (!groupContext) {
|
|
5655
5538
|
process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
|
|
5656
5539
|
return;
|
|
5657
5540
|
}
|
|
@@ -5659,30 +5542,17 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5659
5542
|
if (groupMediaKey) {
|
|
5660
5543
|
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
5661
5544
|
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
5662
|
-
if (!mediaState1 &&
|
|
5663
|
-
...mediaState1,
|
|
5664
|
-
usedKeys: {
|
|
5665
|
-
...styleState.usedKeys
|
|
5666
|
-
}
|
|
5667
|
-
}), !isActive) {
|
|
5545
|
+
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP media ${groupMediaKey} active? ${isActive}`), !isActive) {
|
|
5668
5546
|
for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
|
|
5669
5547
|
return;
|
|
5670
5548
|
}
|
|
5671
5549
|
importanceBump = 2;
|
|
5672
5550
|
}
|
|
5673
5551
|
if (groupPseudoKey) {
|
|
5674
|
-
var _this;
|
|
5675
5552
|
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
5676
|
-
var componentGroupPseudoState = (
|
|
5677
|
-
|
|
5678
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}
|
|
5679
|
-
componentGroupPseudoState: {
|
|
5680
|
-
...componentGroupPseudoState
|
|
5681
|
-
},
|
|
5682
|
-
usedKeys: {
|
|
5683
|
-
...styleState.usedKeys
|
|
5684
|
-
}
|
|
5685
|
-
}), !isActive1) {
|
|
5553
|
+
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
5554
|
+
componentContext.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
5555
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`), !isActive1) {
|
|
5686
5556
|
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
5687
5557
|
return;
|
|
5688
5558
|
}
|
|
@@ -5713,8 +5583,6 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5713
5583
|
...styleState.style
|
|
5714
5584
|
}), (0, import_log.log)("viewProps", {
|
|
5715
5585
|
...viewProps
|
|
5716
|
-
}), (0, import_log.log)("transforms", {
|
|
5717
|
-
...styleState.flatTransforms
|
|
5718
5586
|
});
|
|
5719
5587
|
} catch {
|
|
5720
5588
|
}
|
|
@@ -5748,7 +5616,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5748
5616
|
}
|
|
5749
5617
|
}));
|
|
5750
5618
|
}
|
|
5751
|
-
process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants.isClient &&
|
|
5619
|
+
process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants.isClient && (console.groupCollapsed("getSplitStyles (collapsed)"), (0, import_log.log)({
|
|
5752
5620
|
props,
|
|
5753
5621
|
staticConfig,
|
|
5754
5622
|
shouldDoClasses,
|
|
@@ -5759,7 +5627,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5759
5627
|
theme: {
|
|
5760
5628
|
...theme
|
|
5761
5629
|
}
|
|
5762
|
-
}));
|
|
5630
|
+
}), console.groupEnd());
|
|
5763
5631
|
var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
5764
5632
|
for (var keyOg in props) _loop(keyOg);
|
|
5765
5633
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-propsend`;
|
|
@@ -5841,8 +5709,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5841
5709
|
}
|
|
5842
5710
|
} else style2 && (viewProps.style = style2);
|
|
5843
5711
|
}
|
|
5844
|
-
if (process.env.NODE_ENV === "development" && debug
|
|
5845
|
-
console.
|
|
5712
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && import_isDevTools.isDevTools) {
|
|
5713
|
+
console.groupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
5846
5714
|
try {
|
|
5847
5715
|
var logs = {
|
|
5848
5716
|
...result,
|
|
@@ -5868,11 +5736,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5868
5736
|
mergeTransform(target, key, val, !0);
|
|
5869
5737
|
});
|
|
5870
5738
|
}
|
|
5871
|
-
function mergeStyle(styleState, key, val
|
|
5872
|
-
var disableNormalize = arguments.length >
|
|
5873
|
-
if (
|
|
5874
|
-
var _styleState
|
|
5875
|
-
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}),
|
|
5739
|
+
function mergeStyle(styleState, key, val) {
|
|
5740
|
+
var disableNormalize = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, { viewProps, styleProps, staticConfig } = styleState;
|
|
5741
|
+
if (key in import_helpers2.stylePropsTransform) {
|
|
5742
|
+
var _styleState;
|
|
5743
|
+
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
5876
5744
|
} else {
|
|
5877
5745
|
var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
5878
5746
|
if (
|
|
@@ -5880,8 +5748,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5880
5748
|
staticConfig.accept && key in staticConfig.accept
|
|
5881
5749
|
) viewProps[key] = out;
|
|
5882
5750
|
else {
|
|
5883
|
-
var _styleState1
|
|
5884
|
-
(_styleState1 = styleState).style || (_styleState1.style = {}),
|
|
5751
|
+
var _styleState1;
|
|
5752
|
+
(_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
|
|
5885
5753
|
// if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
|
|
5886
5754
|
key === "transform" && Array.isArray(out) ? [
|
|
5887
5755
|
...out
|
|
@@ -5912,8 +5780,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5912
5780
|
}
|
|
5913
5781
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
5914
5782
|
}, useInsertEffectCompat = import_constants.isWeb ? import_react3.default.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : function() {
|
|
5915
|
-
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k
|
|
5916
|
-
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k
|
|
5783
|
+
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k) {
|
|
5784
|
+
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k);
|
|
5917
5785
|
return res;
|
|
5918
5786
|
};
|
|
5919
5787
|
function addStyleToInsertRules(rulesToInsert, styleObject) {
|
|
@@ -5958,14 +5826,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5958
5826
|
delete viewProps[key], viewProps[key] = next;
|
|
5959
5827
|
} else viewProps[key] = val;
|
|
5960
5828
|
}
|
|
5961
|
-
function mergeMediaByImportance(styleState, mediaKey, key, value,
|
|
5962
|
-
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key,
|
|
5963
|
-
if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)(`mergeMediaByImportance ${key} importance
|
|
5964
|
-
if (
|
|
5829
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump, debugProp) {
|
|
5830
|
+
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, importancesUsed, isSizeMedia);
|
|
5831
|
+
if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)(`mergeMediaByImportance ${key} importance existing ${importancesUsed[key]} next ${importance}`), importance === null) return !1;
|
|
5832
|
+
if (importancesUsed[key] = importance, key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
5965
5833
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
5966
5834
|
if (isDisabled) return !1;
|
|
5967
|
-
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]
|
|
5968
|
-
} else mergeStyle(styleState, key, value
|
|
5835
|
+
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
|
|
5836
|
+
} else mergeStyle(styleState, key, value);
|
|
5969
5837
|
return !0;
|
|
5970
5838
|
}
|
|
5971
5839
|
function normalizeStyle(style) {
|
|
@@ -5978,7 +5846,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5978
5846
|
}
|
|
5979
5847
|
function applyDefaultStyle(pkey, styleState) {
|
|
5980
5848
|
var defaultValues = animatableDefaults[pkey];
|
|
5981
|
-
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues
|
|
5849
|
+
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
5982
5850
|
}
|
|
5983
5851
|
}
|
|
5984
5852
|
});
|
|
@@ -6099,6 +5967,84 @@ var require_setElementProps_native = __commonJS({
|
|
|
6099
5967
|
}
|
|
6100
5968
|
});
|
|
6101
5969
|
|
|
5970
|
+
// ../../packages/is-equal-shallow/dist/cjs/index.native.js
|
|
5971
|
+
var require_index_native6 = __commonJS({
|
|
5972
|
+
"../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
|
|
5973
|
+
"use strict";
|
|
5974
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
5975
|
+
for (var name in all) __defProp2(target, name, {
|
|
5976
|
+
get: all[name],
|
|
5977
|
+
enumerable: !0
|
|
5978
|
+
});
|
|
5979
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
5980
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
5981
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
5982
|
+
for (var _loop = function() {
|
|
5983
|
+
var key = _step.value;
|
|
5984
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
5985
|
+
get: function() {
|
|
5986
|
+
return from[key];
|
|
5987
|
+
},
|
|
5988
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
5989
|
+
});
|
|
5990
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
5991
|
+
} catch (err) {
|
|
5992
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
5993
|
+
} finally {
|
|
5994
|
+
try {
|
|
5995
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
5996
|
+
} finally {
|
|
5997
|
+
if (_didIteratorError)
|
|
5998
|
+
throw _iteratorError;
|
|
5999
|
+
}
|
|
6000
|
+
}
|
|
6001
|
+
return to;
|
|
6002
|
+
}, __toCommonJS2 = function(mod) {
|
|
6003
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6004
|
+
value: !0
|
|
6005
|
+
}), mod);
|
|
6006
|
+
}, index_exports2 = {};
|
|
6007
|
+
__export2(index_exports2, {
|
|
6008
|
+
isEqualShallow: function() {
|
|
6009
|
+
return isEqualShallow;
|
|
6010
|
+
},
|
|
6011
|
+
mergeIfNotShallowEqual: function() {
|
|
6012
|
+
return mergeIfNotShallowEqual;
|
|
6013
|
+
},
|
|
6014
|
+
useCreateShallowSetState: function() {
|
|
6015
|
+
return useCreateShallowSetState;
|
|
6016
|
+
}
|
|
6017
|
+
});
|
|
6018
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
6019
|
+
var import_react3 = require("react");
|
|
6020
|
+
function useCreateShallowSetState(setter, debugIn) {
|
|
6021
|
+
return (0, import_react3.useCallback)(function(next) {
|
|
6022
|
+
setter(function(prev) {
|
|
6023
|
+
return mergeIfNotShallowEqual(prev, next, debugIn);
|
|
6024
|
+
});
|
|
6025
|
+
}, [
|
|
6026
|
+
setter,
|
|
6027
|
+
debugIn
|
|
6028
|
+
]);
|
|
6029
|
+
}
|
|
6030
|
+
function mergeIfNotShallowEqual(prev, next, debug) {
|
|
6031
|
+
if (!prev || !next || isEqualShallow(prev, next)) return prev || next;
|
|
6032
|
+
if (process.env.NODE_ENV === "development" && debug && (console.info("setStateShallow CHANGE", {
|
|
6033
|
+
prev,
|
|
6034
|
+
next
|
|
6035
|
+
}), debug === "break")) debugger;
|
|
6036
|
+
return {
|
|
6037
|
+
...prev,
|
|
6038
|
+
...next
|
|
6039
|
+
};
|
|
6040
|
+
}
|
|
6041
|
+
function isEqualShallow(prev, next) {
|
|
6042
|
+
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
6043
|
+
return !0;
|
|
6044
|
+
}
|
|
6045
|
+
}
|
|
6046
|
+
});
|
|
6047
|
+
|
|
6102
6048
|
// ../web/dist/cjs/helpers/subscribeToContextGroup.native.js
|
|
6103
6049
|
var require_subscribeToContextGroup_native = __commonJS({
|
|
6104
6050
|
"../web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
|
|
@@ -6142,58 +6088,31 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
6142
6088
|
}
|
|
6143
6089
|
});
|
|
6144
6090
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
6145
|
-
var
|
|
6146
|
-
var { pseudoGroups, mediaGroups,
|
|
6091
|
+
var import_useMedia = require_useMedia_native(), import_is_equal_shallow = require_index_native6(), subscribeToContextGroup = function(param) {
|
|
6092
|
+
var { setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
6147
6093
|
if (pseudoGroups || mediaGroups) {
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
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]) || {
|
|
6094
|
+
var _componentContext_groups_subscribe, _componentContext_groups;
|
|
6095
|
+
return process.env.NODE_ENV === "development" && !componentContext.groups && console.debug("No context group found"), (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 || (_componentContext_groups_subscribe = _componentContext_groups.subscribe) === null || _componentContext_groups_subscribe === void 0 ? void 0 : _componentContext_groups_subscribe.call(_componentContext_groups, function(name, param2) {
|
|
6096
|
+
var { layout, pseudo } = param2, _state_group, current = ((_state_group = state.group) === null || _state_group === void 0 ? void 0 : _state_group[name]) || {
|
|
6174
6097
|
pseudo: {},
|
|
6175
6098
|
media: {}
|
|
6176
6099
|
};
|
|
6177
|
-
if (pseudo && pseudoGroups != null && pseudoGroups.has(name))
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
var
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6100
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
6101
|
+
else if (layout && mediaGroups) {
|
|
6102
|
+
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(current.media || {}, mediaState2);
|
|
6103
|
+
next !== current.media && (Object.assign(current.media, next), persist());
|
|
6104
|
+
}
|
|
6105
|
+
function persist() {
|
|
6106
|
+
var group = {
|
|
6107
|
+
...state.group,
|
|
6108
|
+
[name]: current
|
|
6109
|
+
};
|
|
6110
|
+
setStateShallow({
|
|
6111
|
+
group
|
|
6112
|
+
});
|
|
6187
6113
|
}
|
|
6188
|
-
return didChange ? {
|
|
6189
|
-
group: {
|
|
6190
|
-
...prev.group,
|
|
6191
|
-
[name]: group
|
|
6192
|
-
}
|
|
6193
|
-
} : prev;
|
|
6194
6114
|
});
|
|
6195
|
-
}
|
|
6196
|
-
};
|
|
6115
|
+
}
|
|
6197
6116
|
};
|
|
6198
6117
|
}
|
|
6199
6118
|
});
|
|
@@ -6287,7 +6206,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
6287
6206
|
var _keys_current, _props_needsUpdate, local = localStates.get(id), needsUpdate = isRoot || props.name === "light" || props.name === "dark" || props.name === null ? !0 : HasRenderedOnce.get(keys) ? !(keys == null || (_keys_current = keys.current) === null || _keys_current === void 0) && _keys_current.size ? !0 : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : !0, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
|
|
6288
6207
|
return PendingUpdate.delete(id), (!local || rerender) && (local = {
|
|
6289
6208
|
...next
|
|
6290
|
-
}, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id}
|
|
6209
|
+
}, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id} \u{1FA84} ${rerender}`, local.name, ">", next.name), console.info({
|
|
6291
6210
|
props,
|
|
6292
6211
|
propsKey,
|
|
6293
6212
|
isRoot,
|
|
@@ -6322,7 +6241,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
6322
6241
|
themes || (themes = (0, import_config.getConfig)().themes);
|
|
6323
6242
|
var name = !propsKey && (!lastState || !(lastState != null && lastState.isNew)) ? null : getNewThemeName(parentState == null ? void 0 : parentState.name, props, pendingUpdate === "force" ? !0 : !!needsUpdate), isSameAsParent = parentState && (!name || name === parentState.name), shouldRerender = !!(needsUpdate && (pendingUpdate || (lastState == null ? void 0 : lastState.name) !== (parentState == null ? void 0 : parentState.name)));
|
|
6324
6243
|
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") {
|
|
6325
|
-
var message = ` \xB7 useTheme(${id})
|
|
6244
|
+
var message = ` \xB7 useTheme(${id}) => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
|
|
6326
6245
|
console.info(message);
|
|
6327
6246
|
}
|
|
6328
6247
|
if (isSameAsParent) return [
|
|
@@ -7192,8 +7111,8 @@ var require_useComponentState_native = __commonJS({
|
|
|
7192
7111
|
}
|
|
7193
7112
|
});
|
|
7194
7113
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
7195
|
-
var import_constants = require_index_native2(), import_is_equal_shallow =
|
|
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);
|
|
7114
|
+
var import_constants = require_index_native2(), import_is_equal_shallow = require_index_native6(), 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, param, staticConfig, config) {
|
|
7115
|
+
var { animationDriver } = param, _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(needsHydration && !isHydrated), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
7197
7116
|
stateRef.current || (stateRef.current = {});
|
|
7198
7117
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
7199
7118
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
@@ -7217,7 +7136,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
7217
7136
|
...states[0],
|
|
7218
7137
|
[props.forceStyle]: !0
|
|
7219
7138
|
} : states[0], setState = states[1];
|
|
7220
|
-
stateRef.current.nextComponentState && Object.assign(state, stateRef.current.nextComponentState);
|
|
7139
|
+
stateRef.current.nextComponentState && (Object.assign(state, stateRef.current.nextComponentState), stateRef.current.nextComponentState = void 0);
|
|
7221
7140
|
var isAnimated = willBeAnimated;
|
|
7222
7141
|
import_constants.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), state.disabled = disabled, setState(function(_) {
|
|
7223
7142
|
return {
|
|
@@ -7241,6 +7160,46 @@ var require_useComponentState_native = __commonJS({
|
|
|
7241
7160
|
isClassNameDisabled
|
|
7242
7161
|
}));
|
|
7243
7162
|
}
|
|
7163
|
+
if (groupName && !curStateRef.group) {
|
|
7164
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
7165
|
+
curStateRef.group = {
|
|
7166
|
+
listeners,
|
|
7167
|
+
emit(name, state2) {
|
|
7168
|
+
listeners.forEach(function(l) {
|
|
7169
|
+
return l(name, state2);
|
|
7170
|
+
});
|
|
7171
|
+
},
|
|
7172
|
+
subscribe(cb) {
|
|
7173
|
+
return listeners.add(cb), setStateShallow({
|
|
7174
|
+
hasDynGroupChildren: !0
|
|
7175
|
+
}), function() {
|
|
7176
|
+
listeners.delete(cb), listeners.size === 0 && setStateShallow({
|
|
7177
|
+
hasDynGroupChildren: !1
|
|
7178
|
+
});
|
|
7179
|
+
};
|
|
7180
|
+
}
|
|
7181
|
+
};
|
|
7182
|
+
}
|
|
7183
|
+
if (!curStateRef.stateEmitter && hasAnimationProp) {
|
|
7184
|
+
var listeners1 = /* @__PURE__ */ new Set();
|
|
7185
|
+
curStateRef.stateEmitter = {
|
|
7186
|
+
listeners: listeners1,
|
|
7187
|
+
emit(state2) {
|
|
7188
|
+
listeners1.forEach(function(l) {
|
|
7189
|
+
return l(state2);
|
|
7190
|
+
});
|
|
7191
|
+
},
|
|
7192
|
+
subscribe(cb) {
|
|
7193
|
+
return listeners1.add(cb), setStateShallow({
|
|
7194
|
+
hasDynGroupChildren: !0
|
|
7195
|
+
}), function() {
|
|
7196
|
+
listeners1.delete(cb), listeners1.size === 0 && setStateShallow({
|
|
7197
|
+
hasDynGroupChildren: !1
|
|
7198
|
+
});
|
|
7199
|
+
};
|
|
7200
|
+
}
|
|
7201
|
+
};
|
|
7202
|
+
}
|
|
7244
7203
|
return {
|
|
7245
7204
|
startedUnhydrated,
|
|
7246
7205
|
curStateRef,
|
|
@@ -7490,26 +7449,17 @@ var require_createComponent_native = __commonJS({
|
|
|
7490
7449
|
}
|
|
7491
7450
|
});
|
|
7492
7451
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
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(),
|
|
7494
|
-
"hover",
|
|
7495
|
-
"press",
|
|
7496
|
-
"pressIn",
|
|
7497
|
-
"group",
|
|
7498
|
-
"focus",
|
|
7499
|
-
"focusWithin",
|
|
7500
|
-
"media",
|
|
7501
|
-
"group"
|
|
7502
|
-
]);
|
|
7452
|
+
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();
|
|
7503
7453
|
if (0) var cancelTouches;
|
|
7504
7454
|
var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
7505
7455
|
value: !1
|
|
7506
7456
|
};
|
|
7507
7457
|
import_constants.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
|
|
7508
|
-
lastInteractionWasKeyboard.value
|
|
7458
|
+
lastInteractionWasKeyboard.value = !0;
|
|
7509
7459
|
}), document.addEventListener("mousedown", function() {
|
|
7510
|
-
lastInteractionWasKeyboard.value
|
|
7460
|
+
lastInteractionWasKeyboard.value = !1;
|
|
7511
7461
|
}), document.addEventListener("mousemove", function() {
|
|
7512
|
-
lastInteractionWasKeyboard.value
|
|
7462
|
+
lastInteractionWasKeyboard.value = !1;
|
|
7513
7463
|
}));
|
|
7514
7464
|
function createComponent(staticConfig) {
|
|
7515
7465
|
var _staticConfig_defaultProps, { componentName } = staticConfig, config = null, defaultProps = staticConfig.defaultProps;
|
|
@@ -7540,7 +7490,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7540
7490
|
var _propsIn_datatestrenders, _current, _;
|
|
7541
7491
|
(_ = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _ !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
|
|
7542
7492
|
}
|
|
7543
|
-
var styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
|
|
7493
|
+
var componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
|
|
7544
7494
|
if (context && (contextValue = import_react3.default.useContext(context), contextValue)) {
|
|
7545
7495
|
process.env.NODE_ENV === "development" && (propsIn == null ? void 0 : propsIn.debug) === "verbose" && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
|
|
7546
7496
|
for (var key in context.props) {
|
|
@@ -7565,7 +7515,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7565
7515
|
var componentName2 = props.componentName || staticConfig.componentName;
|
|
7566
7516
|
process.env.NODE_ENV === "development" && import_constants.isClient && import_react3.default.useEffect(function() {
|
|
7567
7517
|
var overlay = null, debugVisualizerHandler = function() {
|
|
7568
|
-
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node =
|
|
7518
|
+
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = curStateRef.host;
|
|
7569
7519
|
if (node) if (show) {
|
|
7570
7520
|
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";
|
|
7571
7521
|
var dataAt = node.getAttribute("data-at") || "", dataIn = node.getAttribute("data-in") || "", tooltip = document.createElement("span");
|
|
@@ -7578,52 +7528,8 @@ var require_createComponent_native = __commonJS({
|
|
|
7578
7528
|
}, [
|
|
7579
7529
|
componentName2
|
|
7580
7530
|
]);
|
|
7581
|
-
var
|
|
7582
|
-
|
|
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`;
|
|
7531
|
+
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState, setStateShallow = componentState.setStateShallow;
|
|
7532
|
+
process.env.NODE_ENV === "development" && time2 && time2`use-state`;
|
|
7627
7533
|
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;
|
|
7628
7534
|
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
7629
7535
|
// "needsWebStyles" basically with motion we just animate a plain div, but
|
|
@@ -7631,14 +7537,14 @@ var require_createComponent_native = __commonJS({
|
|
|
7631
7537
|
// things declaratively
|
|
7632
7538
|
!animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
7633
7539
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
7634
|
-
process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (
|
|
7540
|
+
process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (curStateRef.themeShallow = !0);
|
|
7635
7541
|
var themeStateProps = {
|
|
7636
7542
|
componentName: componentName2,
|
|
7637
7543
|
disable: disableTheme,
|
|
7638
|
-
shallow:
|
|
7544
|
+
shallow: curStateRef.themeShallow,
|
|
7639
7545
|
debug: debugProp
|
|
7640
7546
|
};
|
|
7641
|
-
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof
|
|
7547
|
+
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
|
|
7642
7548
|
return !!stateRef.current.isListeningToTheme;
|
|
7643
7549
|
}), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
7644
7550
|
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()}`;
|
|
@@ -7658,8 +7564,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7658
7564
|
themeStateProps
|
|
7659
7565
|
}), (0, import_log.log)({
|
|
7660
7566
|
contextProps: styledContextProps,
|
|
7661
|
-
overriddenContextProps
|
|
7662
|
-
componentContext
|
|
7567
|
+
overriddenContextProps
|
|
7663
7568
|
}), (0, import_log.log)({
|
|
7664
7569
|
presence,
|
|
7665
7570
|
isAnimated,
|
|
@@ -7688,53 +7593,33 @@ var require_createComponent_native = __commonJS({
|
|
|
7688
7593
|
noMergeStyle: isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles)
|
|
7689
7594
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
7690
7595
|
process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
|
|
7691
|
-
var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext,
|
|
7692
|
-
if (
|
|
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)
|
|
7699
|
-
});
|
|
7700
|
-
}
|
|
7701
|
-
}
|
|
7702
|
-
if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
7596
|
+
var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
7597
|
+
if (hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders) {
|
|
7703
7598
|
var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
7704
|
-
|
|
7705
|
-
var
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
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);
|
|
7599
|
+
setStateShallow = function(next) {
|
|
7600
|
+
var avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
7601
|
+
"hover",
|
|
7602
|
+
"press",
|
|
7603
|
+
"pressIn"
|
|
7604
|
+
]), canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
7605
|
+
return avoidReRenderKeys.has(key3);
|
|
7606
|
+
});
|
|
7607
|
+
if (canAvoidReRender && styleListener) {
|
|
7608
|
+
var updatedState = {
|
|
7609
|
+
...state,
|
|
7610
|
+
...next
|
|
7611
|
+
};
|
|
7612
|
+
stateRef.current.nextComponentState = updatedState;
|
|
7613
|
+
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
7614
|
+
styleListener(nextStyles.style);
|
|
7615
|
+
} else ogSetStateShallow(next);
|
|
7731
7616
|
};
|
|
7732
7617
|
}
|
|
7733
|
-
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !
|
|
7618
|
+
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !curStateRef.hasMeasured) {
|
|
7734
7619
|
var _splitStyles;
|
|
7735
7620
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
7736
7621
|
}
|
|
7737
|
-
|
|
7622
|
+
curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
|
|
7738
7623
|
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
7739
7624
|
process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
|
|
7740
7625
|
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
|
|
@@ -7789,18 +7674,18 @@ var require_createComponent_native = __commonJS({
|
|
|
7789
7674
|
}
|
|
7790
7675
|
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.
|
|
7791
7676
|
|
|
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`,
|
|
7793
|
-
var
|
|
7794
|
-
|
|
7677
|
+
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, groupName && (nonTamaguiProps.onLayout = (0, import_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
7678
|
+
var layout = e.nativeEvent.layout;
|
|
7679
|
+
stateRef.current.group.layout = layout, stateRef.current.group.emit(groupName, {
|
|
7795
7680
|
layout
|
|
7796
7681
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
7797
7682
|
return {
|
|
7798
7683
|
...prev
|
|
7799
7684
|
};
|
|
7800
7685
|
}), stateRef.current.hasMeasured = !0;
|
|
7801
|
-
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef,
|
|
7686
|
+
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curStateRef.willHydrate)) || nonTamaguiProps, curStateRef.composedRef || (curStateRef.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
7802
7687
|
return stateRef.current.host = x;
|
|
7803
|
-
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref =
|
|
7688
|
+
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react3.default.Children.toArray(props.children).forEach(function(item) {
|
|
7804
7689
|
typeof item == "string" && item !== `
|
|
7805
7690
|
` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
|
|
7806
7691
|
}), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
|
|
@@ -7842,21 +7727,18 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7842
7727
|
});
|
|
7843
7728
|
return;
|
|
7844
7729
|
}
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
};
|
|
7848
|
-
}, [
|
|
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,
|
|
7730
|
+
var dispose = !disabled && (pseudoGroups || mediaGroups) ? (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
7731
|
+
componentContext,
|
|
7854
7732
|
setStateShallow,
|
|
7733
|
+
state,
|
|
7855
7734
|
mediaGroups,
|
|
7856
7735
|
pseudoGroups
|
|
7857
|
-
});
|
|
7736
|
+
}) : null;
|
|
7737
|
+
return function() {
|
|
7738
|
+
dispose == null || dispose(), componentSetStates.delete(setState);
|
|
7739
|
+
};
|
|
7858
7740
|
}, [
|
|
7859
|
-
|
|
7741
|
+
state.unmounted,
|
|
7860
7742
|
disabled,
|
|
7861
7743
|
pseudoGroups ? Object.keys([
|
|
7862
7744
|
...pseudoGroups
|
|
@@ -7864,15 +7746,24 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7864
7746
|
mediaGroups ? Object.keys([
|
|
7865
7747
|
...mediaGroups
|
|
7866
7748
|
]).join("") : 0
|
|
7867
|
-
]),
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7749
|
+
]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7750
|
+
var _curStateRef_group;
|
|
7751
|
+
if (groupName) {
|
|
7752
|
+
curStateRef.group.emit(groupName, {
|
|
7753
|
+
pseudo: state,
|
|
7754
|
+
layout: (_curStateRef_group = curStateRef.group) === null || _curStateRef_group === void 0 ? void 0 : _curStateRef_group.layout
|
|
7755
|
+
});
|
|
7756
|
+
var groupContextState = componentContext == null ? void 0 : componentContext.groups;
|
|
7757
|
+
if (groupContextState) {
|
|
7758
|
+
var next = {
|
|
7759
|
+
...groupContextState[groupName],
|
|
7760
|
+
...state
|
|
7761
|
+
};
|
|
7762
|
+
groupContextState[groupName] = next;
|
|
7763
|
+
}
|
|
7764
|
+
}
|
|
7873
7765
|
}, [
|
|
7874
|
-
|
|
7875
|
-
groupEmitter,
|
|
7766
|
+
groupName,
|
|
7876
7767
|
state
|
|
7877
7768
|
]);
|
|
7878
7769
|
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);
|
|
@@ -7899,7 +7790,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7899
7790
|
},
|
|
7900
7791
|
onMouseLeave: function(e) {
|
|
7901
7792
|
var next = {};
|
|
7902
|
-
needsHoverState && (next.hover = !1), needsPressState && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
7793
|
+
needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
7903
7794
|
}
|
|
7904
7795
|
},
|
|
7905
7796
|
onPressIn: attachPress ? function(e) {
|
|
@@ -7977,15 +7868,37 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7977
7868
|
var useChildrenResult;
|
|
7978
7869
|
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);
|
|
7979
7870
|
var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
|
|
7980
|
-
|
|
7871
|
+
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
|
|
7981
7872
|
children: content
|
|
7982
|
-
})), process.env.NODE_ENV === "development" && time2 && time2`create-element
|
|
7873
|
+
})), process.env.NODE_ENV === "development" && time2 && time2`create-element`;
|
|
7874
|
+
var groupState = curStateRef.group, subGroupContext = import_react3.default.useMemo(function() {
|
|
7875
|
+
var _splitStyles_style, _splitStyles_style1;
|
|
7876
|
+
if (!(!groupState || !groupName)) return groupState.listeners.clear(), {
|
|
7877
|
+
...componentContext.groups,
|
|
7878
|
+
// change reference so as we mutate it doesn't affect siblings etc
|
|
7879
|
+
state: {
|
|
7880
|
+
...componentContext.groups.state,
|
|
7881
|
+
[groupName]: {
|
|
7882
|
+
pseudo: import_defaultComponentState.defaultComponentStateMounted,
|
|
7883
|
+
// capture just initial width and height if they exist
|
|
7884
|
+
// will have top, left, width, height (not x, y)
|
|
7885
|
+
layout: {
|
|
7886
|
+
width: fromPx((_splitStyles_style = splitStyles.style) === null || _splitStyles_style === void 0 ? void 0 : _splitStyles_style.width),
|
|
7887
|
+
height: fromPx((_splitStyles_style1 = splitStyles.style) === null || _splitStyles_style1 === void 0 ? void 0 : _splitStyles_style1.height)
|
|
7888
|
+
}
|
|
7889
|
+
}
|
|
7890
|
+
},
|
|
7891
|
+
emit: groupState.emit,
|
|
7892
|
+
subscribe: groupState.subscribe
|
|
7893
|
+
};
|
|
7894
|
+
}, [
|
|
7895
|
+
groupName
|
|
7896
|
+
]);
|
|
7897
|
+
if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
7983
7898
|
...componentContext,
|
|
7899
|
+
groups: subGroupContext,
|
|
7984
7900
|
setParentFocusState: setStateShallow,
|
|
7985
7901
|
children: content
|
|
7986
|
-
})), "group" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
7987
|
-
value: allGroupContexts,
|
|
7988
|
-
children: content
|
|
7989
7902
|
})), 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) {
|
|
7990
7903
|
var contextProps = staticConfig.context.props;
|
|
7991
7904
|
for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
|
|
@@ -8012,7 +7925,6 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8012
7925
|
(0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && (0, import_log.log)({
|
|
8013
7926
|
propsIn,
|
|
8014
7927
|
props,
|
|
8015
|
-
attachPress,
|
|
8016
7928
|
animationStyles,
|
|
8017
7929
|
classNames,
|
|
8018
7930
|
content,
|
|
@@ -8051,15 +7963,6 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8051
7963
|
delete globalThis.willPrint, time2.print(), time2 = null;
|
|
8052
7964
|
}, 50))), content;
|
|
8053
7965
|
});
|
|
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
|
-
}
|
|
8063
7966
|
staticConfig.componentName && (component.displayName = staticConfig.componentName);
|
|
8064
7967
|
var res = component;
|
|
8065
7968
|
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ import_react3.default.memo(res)), res.staticConfig = staticConfig;
|
|
@@ -9833,8 +9736,13 @@ var require_useConfiguration_native = __commonJS({
|
|
|
9833
9736
|
}
|
|
9834
9737
|
});
|
|
9835
9738
|
module2.exports = __toCommonJS2(useConfiguration_exports);
|
|
9836
|
-
var import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), useConfiguration = function() {
|
|
9837
|
-
|
|
9739
|
+
var import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), useConfiguration = function() {
|
|
9740
|
+
var { groups, animationDriver, ...restComponentConfig } = import_react3.default.useContext(import_ComponentContext.ComponentContext), { animations, ...restConfig } = (0, import_config.getConfig)();
|
|
9741
|
+
return {
|
|
9742
|
+
...restConfig,
|
|
9743
|
+
...restComponentConfig,
|
|
9744
|
+
animationDriver: animationDriver ?? (0, import_config.getConfig)().animations
|
|
9745
|
+
};
|
|
9838
9746
|
};
|
|
9839
9747
|
}
|
|
9840
9748
|
});
|
|
@@ -10001,7 +9909,7 @@ var require_useProps_native = __commonJS({
|
|
|
10001
9909
|
}
|
|
10002
9910
|
});
|
|
10003
9911
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
10004
|
-
var import_constants = require_index_native2(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(),
|
|
9912
|
+
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();
|
|
10005
9913
|
function useProps(props, opts) {
|
|
10006
9914
|
var [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
10007
9915
|
...opts,
|
|
@@ -10025,7 +9933,7 @@ var require_useProps_native = __commonJS({
|
|
|
10025
9933
|
needsUpdate() {
|
|
10026
9934
|
return !0;
|
|
10027
9935
|
}
|
|
10028
|
-
}), componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext),
|
|
9936
|
+
}), 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 ? (
|
|
10029
9937
|
// not safe to use mediaState but really marginal to hit this
|
|
10030
9938
|
import_useMedia.mediaState
|
|
10031
9939
|
) : (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state, {
|
|
@@ -10036,7 +9944,7 @@ var require_useProps_native = __commonJS({
|
|
|
10036
9944
|
noClass: !0,
|
|
10037
9945
|
resolveValues: "auto",
|
|
10038
9946
|
...opts
|
|
10039
|
-
}, null, componentContext
|
|
9947
|
+
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
10040
9948
|
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
10041
9949
|
if (!disabled) {
|
|
10042
9950
|
if (state.unmounted) {
|
|
@@ -10045,16 +9953,16 @@ var require_useProps_native = __commonJS({
|
|
|
10045
9953
|
});
|
|
10046
9954
|
return;
|
|
10047
9955
|
}
|
|
10048
|
-
|
|
10049
|
-
|
|
9956
|
+
return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
9957
|
+
componentContext,
|
|
10050
9958
|
setStateShallow,
|
|
9959
|
+
state,
|
|
10051
9960
|
mediaGroups,
|
|
10052
9961
|
pseudoGroups
|
|
10053
9962
|
});
|
|
10054
9963
|
}
|
|
10055
9964
|
}, [
|
|
10056
9965
|
disabled,
|
|
10057
|
-
groupContext,
|
|
10058
9966
|
pseudoGroups ? Object.keys([
|
|
10059
9967
|
...pseudoGroups
|
|
10060
9968
|
]).join("") : 0,
|
|
@@ -10799,7 +10707,7 @@ var require_index_native9 = __commonJS({
|
|
|
10799
10707
|
__reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
|
|
10800
10708
|
__reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
|
|
10801
10709
|
__reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
|
|
10802
|
-
__reExport2(index_exports2,
|
|
10710
|
+
__reExport2(index_exports2, require_index_native6(), module2.exports);
|
|
10803
10711
|
var import_insertStyleRule2 = require_insertStyleRule_native();
|
|
10804
10712
|
__reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
|
|
10805
10713
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
@@ -12295,7 +12203,7 @@ var require_index_native12 = __commonJS({
|
|
|
12295
12203
|
}
|
|
12296
12204
|
});
|
|
12297
12205
|
module2.exports = __toCommonJS2(index_exports2);
|
|
12298
|
-
var import_constants = require_index_native2(), import_is_equal_shallow =
|
|
12206
|
+
var import_constants = require_index_native2(), import_is_equal_shallow = require_index_native6(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
|
|
12299
12207
|
function setOnLayoutStrategy2(state) {
|
|
12300
12208
|
strategy = state;
|
|
12301
12209
|
}
|
|
@@ -12337,9 +12245,7 @@ var require_index_native12 = __commonJS({
|
|
|
12337
12245
|
} else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
|
|
12338
12246
|
var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
|
|
12339
12247
|
if (!cachedRect || // has changed one rect
|
|
12340
|
-
|
|
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))) {
|
|
12248
|
+
!(0, import_is_equal_shallow.isEqualShallow)(cachedRect, nodeRect) && (!cachedParentRect || !(0, import_is_equal_shallow.isEqualShallow)(cachedParentRect, parentRect))) {
|
|
12343
12249
|
NodeRectCache.set(node, nodeRect), ParentRectCache.set(parentNode, parentRect);
|
|
12344
12250
|
var event = getElementLayoutEvent(nodeRect, parentRect);
|
|
12345
12251
|
avoidUpdates ? queuedUpdates.set(node, function() {
|