@tamagui/core 1.129.12 → 1.129.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.js +419 -333
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +380 -317
- package/dist/test.native.js.map +3 -3
- package/package.json +9 -9
package/dist/native.js
CHANGED
|
@@ -1882,39 +1882,39 @@ var require_pseudoDescriptors_native = __commonJS({
|
|
|
1882
1882
|
// order of keys here important! in priority order
|
|
1883
1883
|
hoverStyle: {
|
|
1884
1884
|
name: "hover",
|
|
1885
|
-
priority:
|
|
1885
|
+
priority: 2
|
|
1886
1886
|
},
|
|
1887
1887
|
pressStyle: {
|
|
1888
1888
|
name: "active",
|
|
1889
1889
|
stateKey: "press",
|
|
1890
|
-
priority:
|
|
1890
|
+
priority: 3
|
|
1891
1891
|
},
|
|
1892
1892
|
focusVisibleStyle: {
|
|
1893
1893
|
name: "focus-visible",
|
|
1894
|
-
priority:
|
|
1894
|
+
priority: 4,
|
|
1895
1895
|
stateKey: "focusVisible"
|
|
1896
1896
|
},
|
|
1897
1897
|
focusStyle: {
|
|
1898
1898
|
name: "focus",
|
|
1899
|
-
priority:
|
|
1899
|
+
priority: 4
|
|
1900
1900
|
},
|
|
1901
1901
|
focusWithinStyle: {
|
|
1902
1902
|
name: "focus-within",
|
|
1903
|
-
priority:
|
|
1903
|
+
priority: 4,
|
|
1904
1904
|
stateKey: "focusWithin"
|
|
1905
1905
|
},
|
|
1906
1906
|
disabledStyle: {
|
|
1907
1907
|
name: "disabled",
|
|
1908
|
-
priority:
|
|
1908
|
+
priority: 5,
|
|
1909
1909
|
stateKey: "disabled"
|
|
1910
1910
|
}
|
|
1911
1911
|
}, pseudoPriorities = {
|
|
1912
|
-
hover:
|
|
1913
|
-
press:
|
|
1914
|
-
focus:
|
|
1915
|
-
focusVisible:
|
|
1916
|
-
focusWithin:
|
|
1917
|
-
disabled:
|
|
1912
|
+
hover: pseudoDescriptorsBase.hoverStyle.priority,
|
|
1913
|
+
press: pseudoDescriptorsBase.pressStyle.priority,
|
|
1914
|
+
focus: pseudoDescriptorsBase.focusStyle.priority,
|
|
1915
|
+
focusVisible: pseudoDescriptorsBase.focusVisibleStyle.priority,
|
|
1916
|
+
focusWithin: pseudoDescriptorsBase.focusWithinStyle.priority,
|
|
1917
|
+
disabled: pseudoDescriptorsBase.disabledStyle.priority
|
|
1918
1918
|
}, pseudoDescriptors = {
|
|
1919
1919
|
...pseudoDescriptorsBase,
|
|
1920
1920
|
enterStyle: {
|
|
@@ -2159,9 +2159,9 @@ var require_useMedia_native = __commonJS({
|
|
|
2159
2159
|
}
|
|
2160
2160
|
return res;
|
|
2161
2161
|
}
|
|
2162
|
-
var getMediaImportanceIfMoreImportant = function(mediaKey, key,
|
|
2163
|
-
var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance;
|
|
2164
|
-
return !
|
|
2162
|
+
var getMediaImportanceIfMoreImportant = function(mediaKey, key, styleState, isSizeMedia) {
|
|
2163
|
+
var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance, usedKeys = styleState.usedKeys;
|
|
2164
|
+
return !usedKeys[key] || importance > usedKeys[key] ? importance : null;
|
|
2165
2165
|
};
|
|
2166
2166
|
function camelToHyphen(str) {
|
|
2167
2167
|
return str.replace(/[A-Z]/g, function(m) {
|
|
@@ -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,12 +5437,12 @@ 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";
|
|
5327
5444
|
}
|
|
5328
|
-
var
|
|
5445
|
+
var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles2, accept);
|
|
5329
5446
|
if (0) var _viewProps2, _dataSet;
|
|
5330
5447
|
if (!isValidStyleKeyInit) {
|
|
5331
5448
|
if (!import_constants.isAndroid && keyInit === "elevationAndroid") return "continue";
|
|
@@ -5339,13 +5456,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5339
5456
|
if (0) var didUseKeyInit;
|
|
5340
5457
|
var isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers2.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo);
|
|
5341
5458
|
if (isMediaOrPseudo && keyInit.startsWith("$group-")) {
|
|
5342
|
-
var parts = keyInit.split("-");
|
|
5459
|
+
var parts = keyInit.split("-"), plen = parts.length;
|
|
5343
5460
|
if (
|
|
5344
5461
|
// check if its actually a simple group selector to avoid breaking selectors
|
|
5345
|
-
|
|
5462
|
+
plen === 2 || plen === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
|
|
5346
5463
|
) {
|
|
5347
5464
|
var name2 = parts[1];
|
|
5348
|
-
|
|
5465
|
+
groupContext && !(groupContext != null && groupContext[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
5349
5466
|
}
|
|
5350
5467
|
}
|
|
5351
5468
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
@@ -5361,6 +5478,9 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5361
5478
|
variant: variants == null ? void 0 : variants[keyInit],
|
|
5362
5479
|
isVariant,
|
|
5363
5480
|
isHOCShouldPassThrough,
|
|
5481
|
+
usedKeys: {
|
|
5482
|
+
...styleState.usedKeys
|
|
5483
|
+
},
|
|
5364
5484
|
parentStaticConfig
|
|
5365
5485
|
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !noSkip && keyInit in import_skipProps.skipProps) return "continue";
|
|
5366
5486
|
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
@@ -5371,13 +5491,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5371
5491
|
viewProps[key4] = val2;
|
|
5372
5492
|
return;
|
|
5373
5493
|
}
|
|
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
|
|
5494
|
+
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
5495
|
if (key4 === "pointerEvents") {
|
|
5376
5496
|
viewProps[key4] = val2;
|
|
5377
5497
|
return;
|
|
5378
5498
|
}
|
|
5379
5499
|
if (!isHOC && isValidStyleKey(key4, validStyles2, accept) || import_constants.isAndroid && key4 === "elevation") {
|
|
5380
|
-
mergeStyle(styleState, key4, val2);
|
|
5500
|
+
mergeStyle(styleState, key4, val2, 1);
|
|
5381
5501
|
return;
|
|
5382
5502
|
}
|
|
5383
5503
|
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 +5533,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5413
5533
|
try {
|
|
5414
5534
|
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
|
5415
5535
|
var psuedoStyle = _step2.value, fullKey = `${psuedoStyle[import_helpers2.StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
|
|
5416
|
-
|
|
5536
|
+
addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers2.StyleObjectIdentifier];
|
|
5417
5537
|
}
|
|
5418
5538
|
} catch (err) {
|
|
5419
5539
|
_didIteratorError2 = !0, _iteratorError2 = err;
|
|
@@ -5440,13 +5560,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5440
5560
|
var _$val = pseudoStyleObject[pkey];
|
|
5441
5561
|
if (isDisabled) applyDefaultStyle(pkey, styleState);
|
|
5442
5562
|
else {
|
|
5443
|
-
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
5563
|
+
var curImportance = styleState.usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
5444
5564
|
if (shouldMerge) {
|
|
5445
5565
|
if (process.env.IS_STATIC === "is_static") {
|
|
5446
5566
|
var _pseudos1, _key1;
|
|
5447
5567
|
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
|
|
5448
5568
|
}
|
|
5449
|
-
mergeStyle(styleState, pkey, _$val);
|
|
5569
|
+
mergeStyle(styleState, pkey, _$val, importance);
|
|
5450
5570
|
}
|
|
5451
5571
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
5452
5572
|
importance,
|
|
@@ -5458,7 +5578,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5458
5578
|
}
|
|
5459
5579
|
if (!isDisabled) for (var _$key in val2) {
|
|
5460
5580
|
var k = shorthands[_$key] || _$key;
|
|
5461
|
-
usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
|
|
5581
|
+
styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
|
|
5462
5582
|
}
|
|
5463
5583
|
}
|
|
5464
5584
|
return;
|
|
@@ -5467,7 +5587,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5467
5587
|
if (!val2) return;
|
|
5468
5588
|
var hasSpace = val2.space, mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
|
|
5469
5589
|
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
|
-
|
|
5590
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key4}`, {
|
|
5471
5591
|
key: key4,
|
|
5472
5592
|
val: val2,
|
|
5473
5593
|
props,
|
|
@@ -5475,15 +5595,15 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5475
5595
|
acceptsClassName,
|
|
5476
5596
|
componentState,
|
|
5477
5597
|
mediaState: mediaState2
|
|
5478
|
-
})
|
|
5598
|
+
});
|
|
5599
|
+
var priority = mediaStylesSeen;
|
|
5600
|
+
if (mediaStylesSeen += 1, shouldDoClasses) {
|
|
5479
5601
|
var mediaStyle = getSubStyle(styleState, key4, val2, !1);
|
|
5480
5602
|
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
5481
|
-
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space",
|
|
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})`));
|
|
5603
|
+
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", styleState, !0);
|
|
5604
|
+
importance1 && (space = val2.space, styleState.usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(`Found more important space for current media ${mediaKeyShort}: ${val2} (importance: ${importance1})`));
|
|
5483
5605
|
}
|
|
5484
|
-
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle),
|
|
5485
|
-
mediaStylesSeen += 1;
|
|
5486
|
-
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
5606
|
+
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
5487
5607
|
try {
|
|
5488
5608
|
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
|
|
5489
5609
|
var style3 = _step12.value, property = style3[import_helpers2.StyleObjectProperty], isSubStyle = property[0] === "$";
|
|
@@ -5491,7 +5611,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5491
5611
|
var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
5492
5612
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
5493
5613
|
var subKey = isSubStyle ? style3[2] : "", fullKey1 = `${style3[import_helpers2.StyleObjectProperty]}${subKey}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers2.StyleObjectPseudo] || ""}`;
|
|
5494
|
-
|
|
5614
|
+
addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers2.StyleObjectIdentifier];
|
|
5495
5615
|
}
|
|
5496
5616
|
}
|
|
5497
5617
|
} catch (err) {
|
|
@@ -5507,7 +5627,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5507
5627
|
var mergeMediaStyle2 = function(key5, val3) {
|
|
5508
5628
|
var _styleState4;
|
|
5509
5629
|
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
5510
|
-
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3,
|
|
5630
|
+
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState2[mediaKeyShort], importanceBump, debug);
|
|
5511
5631
|
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
5512
5632
|
}, mergeMediaStyle = mergeMediaStyle2, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
5513
5633
|
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
|
|
@@ -5529,12 +5649,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5529
5649
|
scheme,
|
|
5530
5650
|
val: _$val1,
|
|
5531
5651
|
oppositeVal
|
|
5532
|
-
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]);
|
|
5652
|
+
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority);
|
|
5533
5653
|
}
|
|
5534
5654
|
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
5535
5655
|
} else if (isGroupMedia) {
|
|
5536
|
-
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name,
|
|
5537
|
-
if (!
|
|
5656
|
+
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;
|
|
5657
|
+
if (!groupState) {
|
|
5538
5658
|
process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
|
|
5539
5659
|
return;
|
|
5540
5660
|
}
|
|
@@ -5542,17 +5662,30 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5542
5662
|
if (groupMediaKey) {
|
|
5543
5663
|
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
5544
5664
|
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
5545
|
-
if (!mediaState1 &&
|
|
5665
|
+
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}`, {
|
|
5666
|
+
...mediaState1,
|
|
5667
|
+
usedKeys: {
|
|
5668
|
+
...styleState.usedKeys
|
|
5669
|
+
}
|
|
5670
|
+
}), !isActive) {
|
|
5546
5671
|
for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
|
|
5547
5672
|
return;
|
|
5548
5673
|
}
|
|
5549
5674
|
importanceBump = 2;
|
|
5550
5675
|
}
|
|
5551
5676
|
if (groupPseudoKey) {
|
|
5677
|
+
var _this;
|
|
5552
5678
|
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
5553
|
-
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
5554
|
-
|
|
5555
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}
|
|
5679
|
+
var componentGroupPseudoState = (_this = componentGroupState || // fallback to context initially
|
|
5680
|
+
(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];
|
|
5681
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`, {
|
|
5682
|
+
componentGroupPseudoState: {
|
|
5683
|
+
...componentGroupPseudoState
|
|
5684
|
+
},
|
|
5685
|
+
usedKeys: {
|
|
5686
|
+
...styleState.usedKeys
|
|
5687
|
+
}
|
|
5688
|
+
}), !isActive1) {
|
|
5556
5689
|
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
5557
5690
|
return;
|
|
5558
5691
|
}
|
|
@@ -5583,6 +5716,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5583
5716
|
...styleState.style
|
|
5584
5717
|
}), (0, import_log.log)("viewProps", {
|
|
5585
5718
|
...viewProps
|
|
5719
|
+
}), (0, import_log.log)("transforms", {
|
|
5720
|
+
...styleState.flatTransforms
|
|
5586
5721
|
});
|
|
5587
5722
|
} catch {
|
|
5588
5723
|
}
|
|
@@ -5592,7 +5727,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5592
5727
|
conf = conf || (0, import_config.getConfig)();
|
|
5593
5728
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
5594
5729
|
import_constants.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
5595
|
-
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState,
|
|
5730
|
+
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles);
|
|
5596
5731
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
|
|
5597
5732
|
var styleState = {
|
|
5598
5733
|
classNames,
|
|
@@ -5603,7 +5738,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5603
5738
|
staticConfig,
|
|
5604
5739
|
style: null,
|
|
5605
5740
|
theme,
|
|
5606
|
-
usedKeys,
|
|
5741
|
+
usedKeys: {},
|
|
5607
5742
|
viewProps,
|
|
5608
5743
|
context: componentContext,
|
|
5609
5744
|
debug
|
|
@@ -5616,7 +5751,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5616
5751
|
}
|
|
5617
5752
|
}));
|
|
5618
5753
|
}
|
|
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
|
|
5754
|
+
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)({
|
|
5620
5755
|
props,
|
|
5621
5756
|
staticConfig,
|
|
5622
5757
|
shouldDoClasses,
|
|
@@ -5627,7 +5762,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5627
5762
|
theme: {
|
|
5628
5763
|
...theme
|
|
5629
5764
|
}
|
|
5630
|
-
})
|
|
5765
|
+
}));
|
|
5631
5766
|
var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
5632
5767
|
for (var keyOg in props) _loop(keyOg);
|
|
5633
5768
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-propsend`;
|
|
@@ -5709,8 +5844,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5709
5844
|
}
|
|
5710
5845
|
} else style2 && (viewProps.style = style2);
|
|
5711
5846
|
}
|
|
5712
|
-
if (process.env.NODE_ENV === "development" && debug
|
|
5713
|
-
console.groupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
5847
|
+
if (process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants.isClient && import_isDevTools.isDevTools) {
|
|
5848
|
+
console.groupEnd(), console.groupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
5714
5849
|
try {
|
|
5715
5850
|
var logs = {
|
|
5716
5851
|
...result,
|
|
@@ -5736,11 +5871,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5736
5871
|
mergeTransform(target, key, val, !0);
|
|
5737
5872
|
});
|
|
5738
5873
|
}
|
|
5739
|
-
function mergeStyle(styleState, key, val) {
|
|
5740
|
-
var disableNormalize = arguments.length >
|
|
5741
|
-
if (key in import_helpers2.stylePropsTransform) {
|
|
5874
|
+
function mergeStyle(styleState, key, val, importance) {
|
|
5875
|
+
var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig, usedKeys } = styleState, existingImportance = usedKeys[key] || 0;
|
|
5876
|
+
if (!(existingImportance > importance)) if (key in import_helpers2.stylePropsTransform) {
|
|
5742
5877
|
var _styleState;
|
|
5743
|
-
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
5878
|
+
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
|
|
5744
5879
|
} else {
|
|
5745
5880
|
var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
5746
5881
|
if (
|
|
@@ -5749,7 +5884,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5749
5884
|
) viewProps[key] = out;
|
|
5750
5885
|
else {
|
|
5751
5886
|
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
|
|
5887
|
+
(_styleState1 = styleState).style || (_styleState1.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
|
|
5753
5888
|
// if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
|
|
5754
5889
|
key === "transform" && Array.isArray(out) ? [
|
|
5755
5890
|
...out
|
|
@@ -5780,8 +5915,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5780
5915
|
}
|
|
5781
5916
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
5782
5917
|
}, useInsertEffectCompat = import_constants.isWeb ? import_react3.default.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : function() {
|
|
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);
|
|
5918
|
+
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l) {
|
|
5919
|
+
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l);
|
|
5785
5920
|
return res;
|
|
5786
5921
|
};
|
|
5787
5922
|
function addStyleToInsertRules(rulesToInsert, styleObject) {
|
|
@@ -5826,14 +5961,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5826
5961
|
delete viewProps[key], viewProps[key] = next;
|
|
5827
5962
|
} else viewProps[key] = val;
|
|
5828
5963
|
}
|
|
5829
|
-
function mergeMediaByImportance(styleState, mediaKey, key, value,
|
|
5830
|
-
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key,
|
|
5831
|
-
if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)(`mergeMediaByImportance ${key} importance
|
|
5832
|
-
if (
|
|
5964
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp) {
|
|
5965
|
+
var usedKeys = styleState.usedKeys, importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, styleState, isSizeMedia);
|
|
5966
|
+
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;
|
|
5967
|
+
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
5833
5968
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
5834
5969
|
if (isDisabled) return !1;
|
|
5835
|
-
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
|
|
5836
|
-
} else mergeStyle(styleState, key, value);
|
|
5970
|
+
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
|
|
5971
|
+
} else mergeStyle(styleState, key, value, importance);
|
|
5837
5972
|
return !0;
|
|
5838
5973
|
}
|
|
5839
5974
|
function normalizeStyle(style) {
|
|
@@ -5846,7 +5981,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5846
5981
|
}
|
|
5847
5982
|
function applyDefaultStyle(pkey, styleState) {
|
|
5848
5983
|
var defaultValues = animatableDefaults[pkey];
|
|
5849
|
-
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
5984
|
+
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues, 1);
|
|
5850
5985
|
}
|
|
5851
5986
|
}
|
|
5852
5987
|
});
|
|
@@ -5967,84 +6102,6 @@ var require_setElementProps_native = __commonJS({
|
|
|
5967
6102
|
}
|
|
5968
6103
|
});
|
|
5969
6104
|
|
|
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
|
-
|
|
6048
6105
|
// ../web/dist/cjs/helpers/subscribeToContextGroup.native.js
|
|
6049
6106
|
var require_subscribeToContextGroup_native = __commonJS({
|
|
6050
6107
|
"../web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
|
|
@@ -6088,31 +6145,58 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
6088
6145
|
}
|
|
6089
6146
|
});
|
|
6090
6147
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
6091
|
-
var
|
|
6092
|
-
var {
|
|
6148
|
+
var import_is_equal_shallow = require_index_native5(), import_useMedia = require_useMedia_native(), subscribeToContextGroup = function(props) {
|
|
6149
|
+
var { pseudoGroups, mediaGroups, groupContext } = props;
|
|
6093
6150
|
if (pseudoGroups || mediaGroups) {
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6151
|
+
process.env.NODE_ENV === "development" && !groupContext && console.debug("No context group found");
|
|
6152
|
+
var disposables = /* @__PURE__ */ new Set();
|
|
6153
|
+
if (pseudoGroups) for (var _i = 0, _iter = [
|
|
6154
|
+
...pseudoGroups
|
|
6155
|
+
]; _i < _iter.length; _i++) {
|
|
6156
|
+
var name = _iter[_i];
|
|
6157
|
+
disposables.add(createGroupListener(name, props));
|
|
6158
|
+
}
|
|
6159
|
+
if (mediaGroups) for (var _i1 = 0, _iter1 = [
|
|
6160
|
+
...mediaGroups
|
|
6161
|
+
]; _i1 < _iter1.length; _i1++) {
|
|
6162
|
+
var name1 = _iter1[_i1];
|
|
6163
|
+
disposables.add(createGroupListener(name1, props));
|
|
6164
|
+
}
|
|
6165
|
+
return function() {
|
|
6166
|
+
disposables.forEach(function(d) {
|
|
6167
|
+
return d();
|
|
6168
|
+
});
|
|
6169
|
+
};
|
|
6170
|
+
}
|
|
6171
|
+
}, createGroupListener = function(name, param) {
|
|
6172
|
+
var { setStateShallow, pseudoGroups, mediaGroups, groupContext } = param, parent = groupContext == null ? void 0 : groupContext[name];
|
|
6173
|
+
return parent ? parent.subscribe(function(param2) {
|
|
6174
|
+
var { layout, pseudo } = param2;
|
|
6175
|
+
setStateShallow(function(prev) {
|
|
6176
|
+
var _prev_group, didChange = !1, group = ((_prev_group = prev.group) === null || _prev_group === void 0 ? void 0 : _prev_group[name]) || {
|
|
6097
6177
|
pseudo: {},
|
|
6098
6178
|
media: {}
|
|
6099
6179
|
};
|
|
6100
|
-
if (pseudo && pseudoGroups != null && pseudoGroups.has(
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
next
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
var
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
setStateShallow({
|
|
6111
|
-
group
|
|
6112
|
-
});
|
|
6180
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(name)) {
|
|
6181
|
+
var _group;
|
|
6182
|
+
(_group = group).pseudo || (_group.pseudo = {});
|
|
6183
|
+
var next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.pseudo, pseudo);
|
|
6184
|
+
next !== group.pseudo && (Object.assign(group.pseudo, pseudo), didChange = !0);
|
|
6185
|
+
} else if (layout && mediaGroups) {
|
|
6186
|
+
var _group1;
|
|
6187
|
+
(_group1 = group).media || (_group1.media = {});
|
|
6188
|
+
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next1 = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState2);
|
|
6189
|
+
next1 !== group.media && (Object.assign(group.media, next1), didChange = !0);
|
|
6113
6190
|
}
|
|
6191
|
+
return didChange ? {
|
|
6192
|
+
group: {
|
|
6193
|
+
...prev.group,
|
|
6194
|
+
[name]: group
|
|
6195
|
+
}
|
|
6196
|
+
} : prev;
|
|
6114
6197
|
});
|
|
6115
|
-
}
|
|
6198
|
+
}) : function() {
|
|
6199
|
+
};
|
|
6116
6200
|
};
|
|
6117
6201
|
}
|
|
6118
6202
|
});
|
|
@@ -6206,7 +6290,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
6206
6290
|
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));
|
|
6207
6291
|
return PendingUpdate.delete(id), (!local || rerender) && (local = {
|
|
6208
6292
|
...next
|
|
6209
|
-
}, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id}
|
|
6293
|
+
}, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id} getSnapshot ${rerender}`, local.name, ">", next.name), console.info({
|
|
6210
6294
|
props,
|
|
6211
6295
|
propsKey,
|
|
6212
6296
|
isRoot,
|
|
@@ -6241,7 +6325,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
6241
6325
|
themes || (themes = (0, import_config.getConfig)().themes);
|
|
6242
6326
|
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)));
|
|
6243
6327
|
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") {
|
|
6244
|
-
var message = ` \xB7 useTheme(${id}) => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
|
|
6328
|
+
var message = ` \xB7 useTheme(${id}) getNextState => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
|
|
6245
6329
|
console.info(message);
|
|
6246
6330
|
}
|
|
6247
6331
|
if (isSameAsParent) return [
|
|
@@ -7111,8 +7195,8 @@ var require_useComponentState_native = __commonJS({
|
|
|
7111
7195
|
}
|
|
7112
7196
|
});
|
|
7113
7197
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
7114
|
-
var import_constants = require_index_native2(), import_is_equal_shallow =
|
|
7115
|
-
var
|
|
7198
|
+
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) {
|
|
7199
|
+
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);
|
|
7116
7200
|
stateRef.current || (stateRef.current = {});
|
|
7117
7201
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
7118
7202
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
@@ -7135,9 +7219,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
7135
7219
|
var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
|
|
7136
7220
|
...states[0],
|
|
7137
7221
|
[props.forceStyle]: !0
|
|
7138
|
-
} : states[0], setState = states[1];
|
|
7139
|
-
stateRef.current.nextComponentState && (Object.assign(state, stateRef.current.nextComponentState), stateRef.current.nextComponentState = void 0);
|
|
7140
|
-
var isAnimated = willBeAnimated;
|
|
7222
|
+
} : states[0], setState = states[1], isAnimated = willBeAnimated;
|
|
7141
7223
|
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(_) {
|
|
7142
7224
|
return {
|
|
7143
7225
|
...state
|
|
@@ -7160,46 +7242,6 @@ var require_useComponentState_native = __commonJS({
|
|
|
7160
7242
|
isClassNameDisabled
|
|
7161
7243
|
}));
|
|
7162
7244
|
}
|
|
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
|
-
}
|
|
7203
7245
|
return {
|
|
7204
7246
|
startedUnhydrated,
|
|
7205
7247
|
curStateRef,
|
|
@@ -7449,17 +7491,26 @@ var require_createComponent_native = __commonJS({
|
|
|
7449
7491
|
}
|
|
7450
7492
|
});
|
|
7451
7493
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
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()
|
|
7494
|
+
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, NextState = /* @__PURE__ */ new WeakMap(), debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
7495
|
+
"hover",
|
|
7496
|
+
"press",
|
|
7497
|
+
"pressIn",
|
|
7498
|
+
"group",
|
|
7499
|
+
"focus",
|
|
7500
|
+
"focusWithin",
|
|
7501
|
+
"media",
|
|
7502
|
+
"group"
|
|
7503
|
+
]);
|
|
7453
7504
|
if (0) var cancelTouches;
|
|
7454
7505
|
var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
7455
7506
|
value: !1
|
|
7456
7507
|
};
|
|
7457
|
-
import_constants.isWeb &&
|
|
7458
|
-
lastInteractionWasKeyboard.value = !0;
|
|
7508
|
+
import_constants.isWeb && typeof document < "u" && (document.addEventListener("keydown", function() {
|
|
7509
|
+
lastInteractionWasKeyboard.value || (lastInteractionWasKeyboard.value = !0);
|
|
7459
7510
|
}), document.addEventListener("mousedown", function() {
|
|
7460
|
-
lastInteractionWasKeyboard.value = !1;
|
|
7511
|
+
lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
|
|
7461
7512
|
}), document.addEventListener("mousemove", function() {
|
|
7462
|
-
lastInteractionWasKeyboard.value = !1;
|
|
7513
|
+
lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
|
|
7463
7514
|
}));
|
|
7464
7515
|
function createComponent(staticConfig) {
|
|
7465
7516
|
var _staticConfig_defaultProps, { componentName } = staticConfig, config = null, defaultProps = staticConfig.defaultProps;
|
|
@@ -7490,7 +7541,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7490
7541
|
var _propsIn_datatestrenders, _current, _;
|
|
7491
7542
|
(_ = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _ !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
|
|
7492
7543
|
}
|
|
7493
|
-
var
|
|
7544
|
+
var styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
|
|
7494
7545
|
if (context && (contextValue = import_react3.default.useContext(context), contextValue)) {
|
|
7495
7546
|
process.env.NODE_ENV === "development" && (propsIn == null ? void 0 : propsIn.debug) === "verbose" && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
|
|
7496
7547
|
for (var key in context.props) {
|
|
@@ -7515,7 +7566,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7515
7566
|
var componentName2 = props.componentName || staticConfig.componentName;
|
|
7516
7567
|
process.env.NODE_ENV === "development" && import_constants.isClient && import_react3.default.useEffect(function() {
|
|
7517
7568
|
var overlay = null, debugVisualizerHandler = function() {
|
|
7518
|
-
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node =
|
|
7569
|
+
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = stateRef.current.host;
|
|
7519
7570
|
if (node) if (show) {
|
|
7520
7571
|
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";
|
|
7521
7572
|
var dataAt = node.getAttribute("data-at") || "", dataIn = node.getAttribute("data-in") || "", tooltip = document.createElement("span");
|
|
@@ -7528,7 +7579,51 @@ var require_createComponent_native = __commonJS({
|
|
|
7528
7579
|
}, [
|
|
7529
7580
|
componentName2
|
|
7530
7581
|
]);
|
|
7531
|
-
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props,
|
|
7582
|
+
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;
|
|
7583
|
+
hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7584
|
+
var pendingState = NextState.get(stateRef);
|
|
7585
|
+
pendingState && (setStateShallow(pendingState), NextState.set(stateRef, void 0));
|
|
7586
|
+
});
|
|
7587
|
+
var allGroupContexts = (0, import_react3.useMemo)(function() {
|
|
7588
|
+
var _stateRef_current_group;
|
|
7589
|
+
if (!groupName) return groupContextParent;
|
|
7590
|
+
(_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
|
|
7591
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
7592
|
+
return stateRef.current.group = {
|
|
7593
|
+
listeners,
|
|
7594
|
+
emit(state2) {
|
|
7595
|
+
listeners.forEach(function(l) {
|
|
7596
|
+
return l(state2);
|
|
7597
|
+
});
|
|
7598
|
+
},
|
|
7599
|
+
subscribe(cb) {
|
|
7600
|
+
return listeners.add(cb), listeners.size === 1 && setStateShallow({
|
|
7601
|
+
hasDynGroupChildren: !0
|
|
7602
|
+
}), function() {
|
|
7603
|
+
listeners.delete(cb), listeners.size === 0 && setStateShallow({
|
|
7604
|
+
hasDynGroupChildren: !1
|
|
7605
|
+
});
|
|
7606
|
+
};
|
|
7607
|
+
}
|
|
7608
|
+
}, {
|
|
7609
|
+
...groupContextParent,
|
|
7610
|
+
[groupName]: {
|
|
7611
|
+
state: {
|
|
7612
|
+
pseudo: import_defaultComponentState.defaultComponentStateMounted
|
|
7613
|
+
},
|
|
7614
|
+
subscribe: function(listener) {
|
|
7615
|
+
var _stateRef_current_group2, dispose = (_stateRef_current_group2 = stateRef.current.group) === null || _stateRef_current_group2 === void 0 ? void 0 : _stateRef_current_group2.subscribe(listener);
|
|
7616
|
+
return function() {
|
|
7617
|
+
dispose == null || dispose();
|
|
7618
|
+
};
|
|
7619
|
+
}
|
|
7620
|
+
}
|
|
7621
|
+
};
|
|
7622
|
+
}, [
|
|
7623
|
+
stateRef,
|
|
7624
|
+
groupName,
|
|
7625
|
+
groupContextParent
|
|
7626
|
+
]), setStateShallow = componentState.setStateShallow;
|
|
7532
7627
|
process.env.NODE_ENV === "development" && time2 && time2`use-state`;
|
|
7533
7628
|
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;
|
|
7534
7629
|
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
@@ -7537,14 +7632,14 @@ var require_createComponent_native = __commonJS({
|
|
|
7537
7632
|
// things declaratively
|
|
7538
7633
|
!animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
7539
7634
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
7540
|
-
process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (
|
|
7635
|
+
process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (stateRef.current.themeShallow = !0);
|
|
7541
7636
|
var themeStateProps = {
|
|
7542
7637
|
componentName: componentName2,
|
|
7543
7638
|
disable: disableTheme,
|
|
7544
|
-
shallow:
|
|
7639
|
+
shallow: stateRef.current.themeShallow,
|
|
7545
7640
|
debug: debugProp
|
|
7546
7641
|
};
|
|
7547
|
-
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof
|
|
7642
|
+
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof stateRef.current.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
|
|
7548
7643
|
return !!stateRef.current.isListeningToTheme;
|
|
7549
7644
|
}), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
7550
7645
|
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()}`;
|
|
@@ -7564,7 +7659,8 @@ var require_createComponent_native = __commonJS({
|
|
|
7564
7659
|
themeStateProps
|
|
7565
7660
|
}), (0, import_log.log)({
|
|
7566
7661
|
contextProps: styledContextProps,
|
|
7567
|
-
overriddenContextProps
|
|
7662
|
+
overriddenContextProps,
|
|
7663
|
+
componentContext
|
|
7568
7664
|
}), (0, import_log.log)({
|
|
7569
7665
|
presence,
|
|
7570
7666
|
isAnimated,
|
|
@@ -7593,33 +7689,53 @@ var require_createComponent_native = __commonJS({
|
|
|
7593
7689
|
noMergeStyle: isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles)
|
|
7594
7690
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
7595
7691
|
process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
|
|
7596
|
-
var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
7597
|
-
if (
|
|
7598
|
-
var
|
|
7599
|
-
|
|
7600
|
-
var
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
]), canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
7605
|
-
return avoidReRenderKeys.has(key3);
|
|
7692
|
+
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;
|
|
7693
|
+
if (groupContext) {
|
|
7694
|
+
var groupState = groupContext == null ? void 0 : groupContext.state;
|
|
7695
|
+
if (groupState && groupState.layout === void 0) {
|
|
7696
|
+
var _splitStyles_style, _splitStyles_style1;
|
|
7697
|
+
(!((_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 = {
|
|
7698
|
+
width: fromPx(splitStyles.style.width),
|
|
7699
|
+
height: fromPx(splitStyles.style.height)
|
|
7606
7700
|
});
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7701
|
+
}
|
|
7702
|
+
}
|
|
7703
|
+
if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
7704
|
+
var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
7705
|
+
stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
7706
|
+
var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
7707
|
+
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
7708
|
+
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
7709
|
+
return avoidReRenderKeys.has(key3);
|
|
7710
|
+
});
|
|
7711
|
+
if (canAvoidReRender) {
|
|
7712
|
+
var updatedState = {
|
|
7713
|
+
...prev,
|
|
7714
|
+
...next
|
|
7715
|
+
};
|
|
7716
|
+
NextState.set(stateRef, updatedState), process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && (console.groupCollapsed("[\u26A1\uFE0F] avoid setState", next, {
|
|
7717
|
+
updatedState,
|
|
7718
|
+
props
|
|
7719
|
+
}), console.info(stateRef.current.host), console.groupEnd());
|
|
7720
|
+
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
7721
|
+
if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
|
|
7722
|
+
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
7723
|
+
styleListener(nextStyles.style);
|
|
7724
|
+
} else process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && console.info("[\u{1F40C}] re-render", {
|
|
7725
|
+
canAvoidReRender,
|
|
7726
|
+
next
|
|
7727
|
+
}), ogSetStateShallow(next);
|
|
7728
|
+
}
|
|
7729
|
+
}, setStateShallow = function(state2) {
|
|
7730
|
+
var _stateRef_current_setStateShallow, _stateRef_current;
|
|
7731
|
+
(_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
|
|
7616
7732
|
};
|
|
7617
7733
|
}
|
|
7618
|
-
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !
|
|
7734
|
+
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
|
|
7619
7735
|
var _splitStyles;
|
|
7620
7736
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
7621
7737
|
}
|
|
7622
|
-
|
|
7738
|
+
splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
|
|
7623
7739
|
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
7624
7740
|
process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
|
|
7625
7741
|
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
|
|
@@ -7674,18 +7790,18 @@ var require_createComponent_native = __commonJS({
|
|
|
7674
7790
|
}
|
|
7675
7791
|
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.
|
|
7676
7792
|
|
|
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`,
|
|
7678
|
-
var layout = e.nativeEvent.layout;
|
|
7679
|
-
|
|
7793
|
+
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) {
|
|
7794
|
+
var _stateRef_current_group, layout = e.nativeEvent.layout;
|
|
7795
|
+
groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
|
|
7680
7796
|
layout
|
|
7681
7797
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
7682
7798
|
return {
|
|
7683
7799
|
...prev
|
|
7684
7800
|
};
|
|
7685
7801
|
}), stateRef.current.hasMeasured = !0;
|
|
7686
|
-
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef,
|
|
7802
|
+
})), 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) {
|
|
7687
7803
|
return stateRef.current.host = x;
|
|
7688
|
-
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref =
|
|
7804
|
+
}, 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) {
|
|
7689
7805
|
typeof item == "string" && item !== `
|
|
7690
7806
|
` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
|
|
7691
7807
|
}), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
|
|
@@ -7727,18 +7843,21 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7727
7843
|
});
|
|
7728
7844
|
return;
|
|
7729
7845
|
}
|
|
7730
|
-
var dispose = !disabled && (pseudoGroups || mediaGroups) ? (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
7731
|
-
componentContext,
|
|
7732
|
-
setStateShallow,
|
|
7733
|
-
state,
|
|
7734
|
-
mediaGroups,
|
|
7735
|
-
pseudoGroups
|
|
7736
|
-
}) : null;
|
|
7737
7846
|
return function() {
|
|
7738
|
-
|
|
7847
|
+
componentSetStates.delete(setState);
|
|
7739
7848
|
};
|
|
7740
7849
|
}, [
|
|
7741
7850
|
state.unmounted,
|
|
7851
|
+
disabled
|
|
7852
|
+
]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7853
|
+
if (!disabled && !(!pseudoGroups && !mediaGroups) && allGroupContexts) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
7854
|
+
groupContext: allGroupContexts,
|
|
7855
|
+
setStateShallow,
|
|
7856
|
+
mediaGroups,
|
|
7857
|
+
pseudoGroups
|
|
7858
|
+
});
|
|
7859
|
+
}, [
|
|
7860
|
+
allGroupContexts,
|
|
7742
7861
|
disabled,
|
|
7743
7862
|
pseudoGroups ? Object.keys([
|
|
7744
7863
|
...pseudoGroups
|
|
@@ -7746,24 +7865,13 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7746
7865
|
mediaGroups ? Object.keys([
|
|
7747
7866
|
...mediaGroups
|
|
7748
7867
|
]).join("") : 0
|
|
7749
|
-
])
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
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
|
-
}
|
|
7868
|
+
]);
|
|
7869
|
+
var groupEmitter = stateRef.current.group;
|
|
7870
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7871
|
+
!groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state);
|
|
7765
7872
|
}, [
|
|
7766
|
-
|
|
7873
|
+
groupContext,
|
|
7874
|
+
groupEmitter,
|
|
7767
7875
|
state
|
|
7768
7876
|
]);
|
|
7769
7877
|
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);
|
|
@@ -7790,7 +7898,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7790
7898
|
},
|
|
7791
7899
|
onMouseLeave: function(e) {
|
|
7792
7900
|
var next = {};
|
|
7793
|
-
needsHoverState && (next.hover = !1), needsPressState &&
|
|
7901
|
+
needsHoverState && (next.hover = !1), needsPressState && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
7794
7902
|
}
|
|
7795
7903
|
},
|
|
7796
7904
|
onPressIn: attachPress ? function(e) {
|
|
@@ -7809,24 +7917,16 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7809
7917
|
},
|
|
7810
7918
|
...attachFocus && {
|
|
7811
7919
|
onFocus: function(e) {
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
}), pseudos != null && pseudos.focusVisibleStyle ? setTimeout(function() {
|
|
7815
|
-
setStateShallow({
|
|
7816
|
-
focus: !0,
|
|
7817
|
-
focusVisible: !!lastInteractionWasKeyboard.value
|
|
7818
|
-
});
|
|
7819
|
-
}, 0) : setStateShallow({
|
|
7820
|
-
focus: !0,
|
|
7821
|
-
focusVisible: !1
|
|
7822
|
-
}), onFocus == null || onFocus(e);
|
|
7920
|
+
var next = {};
|
|
7921
|
+
componentContext.setParentFocusState && (next.focusWithin = !0), pseudos != null && pseudos.focusVisibleStyle && lastInteractionWasKeyboard.value ? next.focusVisible = !0 : next.focus = !0, setStateShallow(next), onFocus == null || onFocus(e);
|
|
7823
7922
|
},
|
|
7824
7923
|
onBlur: function(e) {
|
|
7825
7924
|
componentContext.setParentFocusState && componentContext.setParentFocusState({
|
|
7826
7925
|
focusWithin: !1
|
|
7827
7926
|
}), setStateShallow({
|
|
7828
7927
|
focus: !1,
|
|
7829
|
-
focusVisible: !1
|
|
7928
|
+
focusVisible: !1,
|
|
7929
|
+
focusWithin: !1
|
|
7830
7930
|
}), onBlur == null || onBlur(e);
|
|
7831
7931
|
}
|
|
7832
7932
|
}
|
|
@@ -7868,37 +7968,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7868
7968
|
var useChildrenResult;
|
|
7869
7969
|
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);
|
|
7870
7970
|
var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
|
|
7871
|
-
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
|
|
7971
|
+
if (ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
|
|
7872
7972
|
children: content
|
|
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, {
|
|
7973
|
+
})), process.env.NODE_ENV === "development" && time2 && time2`create-element`, "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
7898
7974
|
...componentContext,
|
|
7899
|
-
groups: subGroupContext,
|
|
7900
7975
|
setParentFocusState: setStateShallow,
|
|
7901
7976
|
children: content
|
|
7977
|
+
})), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
7978
|
+
value: allGroupContexts,
|
|
7979
|
+
children: content
|
|
7902
7980
|
})), 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) {
|
|
7903
7981
|
var contextProps = staticConfig.context.props;
|
|
7904
7982
|
for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
|
|
@@ -7925,6 +8003,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7925
8003
|
(0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && (0, import_log.log)({
|
|
7926
8004
|
propsIn,
|
|
7927
8005
|
props,
|
|
8006
|
+
attachPress,
|
|
7928
8007
|
animationStyles,
|
|
7929
8008
|
classNames,
|
|
7930
8009
|
content,
|
|
@@ -7963,6 +8042,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7963
8042
|
delete globalThis.willPrint, time2.print(), time2 = null;
|
|
7964
8043
|
}, 50))), content;
|
|
7965
8044
|
});
|
|
8045
|
+
function notifyGroupSubscribers(groupContext, groupEmitter, pseudo) {
|
|
8046
|
+
if (!(!groupContext || !groupEmitter)) {
|
|
8047
|
+
var nextState = {
|
|
8048
|
+
...groupContext.state,
|
|
8049
|
+
pseudo
|
|
8050
|
+
};
|
|
8051
|
+
groupEmitter.emit(nextState), groupContext.state = nextState;
|
|
8052
|
+
}
|
|
8053
|
+
}
|
|
7966
8054
|
staticConfig.componentName && (component.displayName = staticConfig.componentName);
|
|
7967
8055
|
var res = component;
|
|
7968
8056
|
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ import_react3.default.memo(res)), res.staticConfig = staticConfig;
|
|
@@ -9736,13 +9824,8 @@ var require_useConfiguration_native = __commonJS({
|
|
|
9736
9824
|
}
|
|
9737
9825
|
});
|
|
9738
9826
|
module2.exports = __toCommonJS2(useConfiguration_exports);
|
|
9739
|
-
var import_react3 = __toESM2(require("react")),
|
|
9740
|
-
|
|
9741
|
-
return {
|
|
9742
|
-
...restConfig,
|
|
9743
|
-
...restComponentConfig,
|
|
9744
|
-
animationDriver: animationDriver ?? (0, import_config.getConfig)().animations
|
|
9745
|
-
};
|
|
9827
|
+
var import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), useConfiguration = function() {
|
|
9828
|
+
return import_react3.default.useContext(import_ComponentContext.ComponentContext);
|
|
9746
9829
|
};
|
|
9747
9830
|
}
|
|
9748
9831
|
});
|
|
@@ -9909,7 +9992,7 @@ var require_useProps_native = __commonJS({
|
|
|
9909
9992
|
}
|
|
9910
9993
|
});
|
|
9911
9994
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
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();
|
|
9995
|
+
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();
|
|
9913
9996
|
function useProps(props, opts) {
|
|
9914
9997
|
var [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
9915
9998
|
...opts,
|
|
@@ -9933,7 +10016,7 @@ var require_useProps_native = __commonJS({
|
|
|
9933
10016
|
needsUpdate() {
|
|
9934
10017
|
return !0;
|
|
9935
10018
|
}
|
|
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 ? (
|
|
10019
|
+
}), 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 ? (
|
|
9937
10020
|
// not safe to use mediaState but really marginal to hit this
|
|
9938
10021
|
import_useMedia.mediaState
|
|
9939
10022
|
) : (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state, {
|
|
@@ -9944,7 +10027,7 @@ var require_useProps_native = __commonJS({
|
|
|
9944
10027
|
noClass: !0,
|
|
9945
10028
|
resolveValues: "auto",
|
|
9946
10029
|
...opts
|
|
9947
|
-
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
10030
|
+
}, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
9948
10031
|
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9949
10032
|
if (!disabled) {
|
|
9950
10033
|
if (state.unmounted) {
|
|
@@ -9953,16 +10036,16 @@ var require_useProps_native = __commonJS({
|
|
|
9953
10036
|
});
|
|
9954
10037
|
return;
|
|
9955
10038
|
}
|
|
9956
|
-
return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
9957
|
-
|
|
10039
|
+
if (groupContext) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
10040
|
+
groupContext,
|
|
9958
10041
|
setStateShallow,
|
|
9959
|
-
state,
|
|
9960
10042
|
mediaGroups,
|
|
9961
10043
|
pseudoGroups
|
|
9962
10044
|
});
|
|
9963
10045
|
}
|
|
9964
10046
|
}, [
|
|
9965
10047
|
disabled,
|
|
10048
|
+
groupContext,
|
|
9966
10049
|
pseudoGroups ? Object.keys([
|
|
9967
10050
|
...pseudoGroups
|
|
9968
10051
|
]).join("") : 0,
|
|
@@ -10704,10 +10787,11 @@ var require_index_native9 = __commonJS({
|
|
|
10704
10787
|
var import_config = require_config_native(), import_insertStyleRule = require_insertStyleRule_native();
|
|
10705
10788
|
__reExport2(index_exports2, require_constants_native2(), module2.exports);
|
|
10706
10789
|
__reExport2(index_exports2, require_ComponentContext_native(), module2.exports);
|
|
10790
|
+
__reExport2(index_exports2, require_GroupContext_native(), module2.exports);
|
|
10707
10791
|
__reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
|
|
10708
10792
|
__reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
|
|
10709
10793
|
__reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
|
|
10710
|
-
__reExport2(index_exports2,
|
|
10794
|
+
__reExport2(index_exports2, require_index_native5(), module2.exports);
|
|
10711
10795
|
var import_insertStyleRule2 = require_insertStyleRule_native();
|
|
10712
10796
|
__reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
|
|
10713
10797
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
@@ -12203,7 +12287,7 @@ var require_index_native12 = __commonJS({
|
|
|
12203
12287
|
}
|
|
12204
12288
|
});
|
|
12205
12289
|
module2.exports = __toCommonJS2(index_exports2);
|
|
12206
|
-
var import_constants = require_index_native2(), import_is_equal_shallow =
|
|
12290
|
+
var import_constants = require_index_native2(), import_is_equal_shallow = require_index_native5(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
|
|
12207
12291
|
function setOnLayoutStrategy2(state) {
|
|
12208
12292
|
strategy = state;
|
|
12209
12293
|
}
|
|
@@ -12245,7 +12329,9 @@ var require_index_native12 = __commonJS({
|
|
|
12245
12329
|
} else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
|
|
12246
12330
|
var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
|
|
12247
12331
|
if (!cachedRect || // has changed one rect
|
|
12248
|
-
|
|
12332
|
+
// @ts-expect-error DOMRectReadOnly can go into object
|
|
12333
|
+
!(0, import_is_equal_shallow.isEqualShallow)(cachedRect, nodeRect) && // @ts-expect-error DOMRectReadOnly can go into object
|
|
12334
|
+
(!cachedParentRect || !(0, import_is_equal_shallow.isEqualShallow)(cachedParentRect, parentRect))) {
|
|
12249
12335
|
NodeRectCache.set(node, nodeRect), ParentRectCache.set(parentNode, parentRect);
|
|
12250
12336
|
var event = getElementLayoutEvent(nodeRect, parentRect);
|
|
12251
12337
|
avoidUpdates ? queuedUpdates.set(node, function() {
|