@tamagui/core 1.129.12 → 1.129.13
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 +391 -296
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +356 -279
- package/dist/test.native.js.map +3 -3
- package/package.json +9 -9
package/dist/test.native.js
CHANGED
|
@@ -2186,6 +2186,80 @@ var require_index_native4 = __commonJS({
|
|
|
2186
2186
|
}
|
|
2187
2187
|
});
|
|
2188
2188
|
|
|
2189
|
+
// ../../packages/is-equal-shallow/dist/cjs/index.native.js
|
|
2190
|
+
var require_index_native5 = __commonJS({
|
|
2191
|
+
"../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
|
|
2192
|
+
"use strict";
|
|
2193
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2194
|
+
for (var name in all) __defProp2(target, name, {
|
|
2195
|
+
get: all[name],
|
|
2196
|
+
enumerable: !0
|
|
2197
|
+
});
|
|
2198
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
2199
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2200
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2201
|
+
for (var _loop = function() {
|
|
2202
|
+
var key = _step.value;
|
|
2203
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2204
|
+
get: function() {
|
|
2205
|
+
return from[key];
|
|
2206
|
+
},
|
|
2207
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2208
|
+
});
|
|
2209
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2210
|
+
} catch (err) {
|
|
2211
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2212
|
+
} finally {
|
|
2213
|
+
try {
|
|
2214
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2215
|
+
} finally {
|
|
2216
|
+
if (_didIteratorError)
|
|
2217
|
+
throw _iteratorError;
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
return to;
|
|
2221
|
+
}, __toCommonJS2 = function(mod) {
|
|
2222
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2223
|
+
value: !0
|
|
2224
|
+
}), mod);
|
|
2225
|
+
}, index_exports2 = {};
|
|
2226
|
+
__export2(index_exports2, {
|
|
2227
|
+
isEqualShallow: function() {
|
|
2228
|
+
return isEqualShallow;
|
|
2229
|
+
},
|
|
2230
|
+
mergeIfNotShallowEqual: function() {
|
|
2231
|
+
return mergeIfNotShallowEqual;
|
|
2232
|
+
},
|
|
2233
|
+
useCreateShallowSetState: function() {
|
|
2234
|
+
return useCreateShallowSetState;
|
|
2235
|
+
}
|
|
2236
|
+
});
|
|
2237
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
2238
|
+
var import_react3 = require("react");
|
|
2239
|
+
function useCreateShallowSetState(setter, debug) {
|
|
2240
|
+
return (0, import_react3.useCallback)(function(stateOrGetState) {
|
|
2241
|
+
setter(function(prev) {
|
|
2242
|
+
var next = typeof stateOrGetState == "function" ? stateOrGetState(prev) : stateOrGetState, update = mergeIfNotShallowEqual(prev, next);
|
|
2243
|
+
return update;
|
|
2244
|
+
});
|
|
2245
|
+
}, [
|
|
2246
|
+
setter,
|
|
2247
|
+
debug
|
|
2248
|
+
]);
|
|
2249
|
+
}
|
|
2250
|
+
function mergeIfNotShallowEqual(prev, next) {
|
|
2251
|
+
return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
2252
|
+
...prev,
|
|
2253
|
+
...next
|
|
2254
|
+
};
|
|
2255
|
+
}
|
|
2256
|
+
function isEqualShallow(prev, next) {
|
|
2257
|
+
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
2258
|
+
return !0;
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
});
|
|
2262
|
+
|
|
2189
2263
|
// ../web/dist/cjs/constants/isDevTools.native.js
|
|
2190
2264
|
var require_isDevTools_native = __commonJS({
|
|
2191
2265
|
"../web/dist/cjs/constants/isDevTools.native.js"(exports2, module2) {
|
|
@@ -2429,13 +2503,55 @@ var require_ComponentContext_native = __commonJS({
|
|
|
2429
2503
|
inText: !1,
|
|
2430
2504
|
language: null,
|
|
2431
2505
|
animationDriver: null,
|
|
2432
|
-
setParentFocusState: null
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2506
|
+
setParentFocusState: null
|
|
2507
|
+
});
|
|
2508
|
+
}
|
|
2509
|
+
});
|
|
2510
|
+
|
|
2511
|
+
// ../web/dist/cjs/contexts/GroupContext.native.js
|
|
2512
|
+
var require_GroupContext_native = __commonJS({
|
|
2513
|
+
"../web/dist/cjs/contexts/GroupContext.native.js"(exports2, module2) {
|
|
2514
|
+
"use strict";
|
|
2515
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2516
|
+
for (var name in all) __defProp2(target, name, {
|
|
2517
|
+
get: all[name],
|
|
2518
|
+
enumerable: !0
|
|
2519
|
+
});
|
|
2520
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
2521
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2522
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
2523
|
+
for (var _loop = function() {
|
|
2524
|
+
var key = _step.value;
|
|
2525
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
2526
|
+
get: function() {
|
|
2527
|
+
return from[key];
|
|
2528
|
+
},
|
|
2529
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
2530
|
+
});
|
|
2531
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
2532
|
+
} catch (err) {
|
|
2533
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
2534
|
+
} finally {
|
|
2535
|
+
try {
|
|
2536
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
2537
|
+
} finally {
|
|
2538
|
+
if (_didIteratorError)
|
|
2539
|
+
throw _iteratorError;
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
return to;
|
|
2543
|
+
}, __toCommonJS2 = function(mod) {
|
|
2544
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2545
|
+
value: !0
|
|
2546
|
+
}), mod);
|
|
2547
|
+
}, GroupContext_exports = {};
|
|
2548
|
+
__export2(GroupContext_exports, {
|
|
2549
|
+
GroupContext: function() {
|
|
2550
|
+
return GroupContext;
|
|
2437
2551
|
}
|
|
2438
2552
|
});
|
|
2553
|
+
module2.exports = __toCommonJS2(GroupContext_exports);
|
|
2554
|
+
var import_react3 = require("react"), GroupContext = /* @__PURE__ */ (0, import_react3.createContext)(null);
|
|
2439
2555
|
}
|
|
2440
2556
|
});
|
|
2441
2557
|
|
|
@@ -3344,7 +3460,7 @@ var require_normalize_color = __commonJS({
|
|
|
3344
3460
|
});
|
|
3345
3461
|
|
|
3346
3462
|
// ../normalize-css-color/dist/cjs/index.native.js
|
|
3347
|
-
var
|
|
3463
|
+
var require_index_native6 = __commonJS({
|
|
3348
3464
|
"../normalize-css-color/dist/cjs/index.native.js"(exports2, module2) {
|
|
3349
3465
|
"use strict";
|
|
3350
3466
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -3467,7 +3583,7 @@ var require_normalizeColor_native = __commonJS({
|
|
|
3467
3583
|
}
|
|
3468
3584
|
});
|
|
3469
3585
|
module2.exports = __toCommonJS2(normalizeColor_exports);
|
|
3470
|
-
var import_normalize_css_color =
|
|
3586
|
+
var import_normalize_css_color = require_index_native6(), import_normalize_css_color2 = require_index_native6(), normalizeColor = function(color, opacity) {
|
|
3471
3587
|
if (color) {
|
|
3472
3588
|
if (color[0] === "$") return color;
|
|
3473
3589
|
if (color.startsWith("var(")) {
|
|
@@ -5028,7 +5144,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5028
5144
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
5029
5145
|
return key in validStyles2 ? !0 : accept && key in accept;
|
|
5030
5146
|
}
|
|
5031
|
-
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, elementType, startedUnhydrated, debug) {
|
|
5147
|
+
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug) {
|
|
5032
5148
|
var _loop = function(keyOg2) {
|
|
5033
5149
|
var keyInit = keyOg2, valInit = props[keyInit];
|
|
5034
5150
|
if (keyInit === "children") return viewProps[keyInit] = valInit, "continue";
|
|
@@ -5037,7 +5153,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5037
5153
|
var accepted = accept[keyInit];
|
|
5038
5154
|
if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass), "continue";
|
|
5039
5155
|
}
|
|
5040
|
-
if (disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className"
|
|
5156
|
+
if (disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className") return "continue";
|
|
5041
5157
|
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
|
|
5042
5158
|
if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
|
|
5043
5159
|
return "continue";
|
|
@@ -5062,7 +5178,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5062
5178
|
parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
|
|
5063
5179
|
) {
|
|
5064
5180
|
var name2 = parts[1];
|
|
5065
|
-
|
|
5181
|
+
groupContext != null && groupContext[name2] || (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
5066
5182
|
}
|
|
5067
5183
|
}
|
|
5068
5184
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
@@ -5078,13 +5194,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5078
5194
|
viewProps[key4] = val2;
|
|
5079
5195
|
return;
|
|
5080
5196
|
}
|
|
5081
|
-
if (val2 != null
|
|
5197
|
+
if (val2 != null) {
|
|
5082
5198
|
if (key4 === "pointerEvents") {
|
|
5083
5199
|
viewProps[key4] = val2;
|
|
5084
5200
|
return;
|
|
5085
5201
|
}
|
|
5086
5202
|
if (!isHOC && isValidStyleKey(key4, validStyles2, accept) || import_constants.isAndroid && key4 === "elevation") {
|
|
5087
|
-
mergeStyle(styleState, key4, val2);
|
|
5203
|
+
mergeStyle(styleState, key4, val2, 1);
|
|
5088
5204
|
return;
|
|
5089
5205
|
}
|
|
5090
5206
|
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)) {
|
|
@@ -5113,7 +5229,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5113
5229
|
try {
|
|
5114
5230
|
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
|
5115
5231
|
var psuedoStyle = _step2.value, fullKey = `${psuedoStyle[import_helpers2.StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
|
|
5116
|
-
|
|
5232
|
+
addStyleToInsertRules(rulesToInsert, psuedoStyle), classNames[fullKey] = psuedoStyle[import_helpers2.StyleObjectIdentifier];
|
|
5117
5233
|
}
|
|
5118
5234
|
} catch (err) {
|
|
5119
5235
|
_didIteratorError2 = !0, _iteratorError2 = err;
|
|
@@ -5139,7 +5255,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5139
5255
|
var _pseudos1, _key1;
|
|
5140
5256
|
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
|
|
5141
5257
|
}
|
|
5142
|
-
mergeStyle(styleState, pkey, _$val);
|
|
5258
|
+
mergeStyle(styleState, pkey, _$val, importance);
|
|
5143
5259
|
}
|
|
5144
5260
|
}
|
|
5145
5261
|
}
|
|
@@ -5154,21 +5270,20 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5154
5270
|
if (!val2) return;
|
|
5155
5271
|
var hasSpace = val2.space, mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
|
|
5156
5272
|
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;
|
|
5157
|
-
|
|
5273
|
+
var priority = mediaStylesSeen;
|
|
5274
|
+
if (mediaStylesSeen += 1, shouldDoClasses) {
|
|
5158
5275
|
var mediaStyle = getSubStyle(styleState, key4, val2, !1);
|
|
5159
5276
|
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
5160
5277
|
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
5161
5278
|
importance1 && (space = val2.space, usedKeys.space = importance1);
|
|
5162
5279
|
}
|
|
5163
|
-
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle),
|
|
5164
|
-
mediaStylesSeen += 1;
|
|
5165
|
-
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
5280
|
+
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
5166
5281
|
try {
|
|
5167
5282
|
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
|
|
5168
5283
|
var style3 = _step12.value, property = style3[import_helpers2.StyleObjectProperty], isSubStyle = property[0] === "$";
|
|
5169
5284
|
if (!(isSubStyle && !(0, import_isActivePlatform.isActivePlatform)(property))) {
|
|
5170
5285
|
var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority), subKey = isSubStyle ? style3[2] : "", fullKey1 = `${style3[import_helpers2.StyleObjectProperty]}${subKey}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers2.StyleObjectPseudo] || ""}`;
|
|
5171
|
-
|
|
5286
|
+
addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[import_helpers2.StyleObjectIdentifier];
|
|
5172
5287
|
}
|
|
5173
5288
|
}
|
|
5174
5289
|
} catch (err) {
|
|
@@ -5201,27 +5316,28 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5201
5316
|
scheme,
|
|
5202
5317
|
val: _$val1,
|
|
5203
5318
|
oppositeVal
|
|
5204
|
-
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1]);
|
|
5319
|
+
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority);
|
|
5205
5320
|
}
|
|
5206
5321
|
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
5207
5322
|
} else if (isGroupMedia) {
|
|
5208
|
-
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name,
|
|
5209
|
-
if (!
|
|
5323
|
+
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;
|
|
5324
|
+
if (!groupState)
|
|
5210
5325
|
return;
|
|
5211
5326
|
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
5212
5327
|
if (groupMediaKey) {
|
|
5213
5328
|
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
5214
5329
|
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
5215
|
-
if (!mediaState1 &&
|
|
5330
|
+
if (!mediaState1 && groupState.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupState.layout)), !isActive) {
|
|
5216
5331
|
for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
|
|
5217
5332
|
return;
|
|
5218
5333
|
}
|
|
5219
5334
|
importanceBump = 2;
|
|
5220
5335
|
}
|
|
5221
5336
|
if (groupPseudoKey) {
|
|
5337
|
+
var _this;
|
|
5222
5338
|
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
5223
|
-
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
5224
|
-
|
|
5339
|
+
var componentGroupPseudoState = (_this = componentGroupState || // fallback to context initially
|
|
5340
|
+
(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];
|
|
5225
5341
|
if (!isActive1) {
|
|
5226
5342
|
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
5227
5343
|
return;
|
|
@@ -5369,11 +5485,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5369
5485
|
mergeTransform(target, key, val, !0);
|
|
5370
5486
|
});
|
|
5371
5487
|
}
|
|
5372
|
-
function mergeStyle(styleState, key, val) {
|
|
5373
|
-
var disableNormalize = arguments.length >
|
|
5374
|
-
if (key in import_helpers2.stylePropsTransform) {
|
|
5375
|
-
var _styleState;
|
|
5376
|
-
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
5488
|
+
function mergeStyle(styleState, key, val, importance) {
|
|
5489
|
+
var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig } = styleState, existingImportance = styleState.usedKeys[key];
|
|
5490
|
+
if (!(importance < existingImportance)) if (key in import_helpers2.stylePropsTransform) {
|
|
5491
|
+
var _styleState, _styleState_usedKeys, _key;
|
|
5492
|
+
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), (_styleState_usedKeys = styleState.usedKeys)[_key = key] || (_styleState_usedKeys[_key] = 1), styleState.flatTransforms[key] = val;
|
|
5377
5493
|
} else {
|
|
5378
5494
|
var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
5379
5495
|
if (
|
|
@@ -5381,8 +5497,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5381
5497
|
staticConfig.accept && key in staticConfig.accept
|
|
5382
5498
|
) viewProps[key] = out;
|
|
5383
5499
|
else {
|
|
5384
|
-
var _styleState1;
|
|
5385
|
-
(_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
|
|
5500
|
+
var _styleState1, _styleState_usedKeys1, _key1;
|
|
5501
|
+
(_styleState1 = styleState).style || (_styleState1.style = {}), (_styleState_usedKeys1 = styleState.usedKeys)[_key1 = key] || (_styleState_usedKeys1[_key1] = 1), styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
|
|
5386
5502
|
// if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
|
|
5387
5503
|
key === "transform" && Array.isArray(out) ? [
|
|
5388
5504
|
...out
|
|
@@ -5413,8 +5529,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5413
5529
|
}
|
|
5414
5530
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
5415
5531
|
}, useInsertEffectCompat = import_constants.isWeb ? import_react3.default.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : function() {
|
|
5416
|
-
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k) {
|
|
5417
|
-
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k);
|
|
5532
|
+
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l) {
|
|
5533
|
+
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l);
|
|
5418
5534
|
return res;
|
|
5419
5535
|
};
|
|
5420
5536
|
function addStyleToInsertRules(rulesToInsert, styleObject) {
|
|
@@ -5459,14 +5575,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5459
5575
|
delete viewProps[key], viewProps[key] = next;
|
|
5460
5576
|
} else viewProps[key] = val;
|
|
5461
5577
|
}
|
|
5462
|
-
function mergeMediaByImportance(styleState, mediaKey, key, value,
|
|
5463
|
-
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key,
|
|
5578
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, usedKeys, isSizeMedia, importanceBump, debugProp) {
|
|
5579
|
+
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, usedKeys, isSizeMedia);
|
|
5464
5580
|
if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return !1;
|
|
5465
|
-
if (
|
|
5581
|
+
if (usedKeys[key] = importance, key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
5466
5582
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
5467
5583
|
if (isDisabled) return !1;
|
|
5468
|
-
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
|
|
5469
|
-
} else mergeStyle(styleState, key, value);
|
|
5584
|
+
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
|
|
5585
|
+
} else mergeStyle(styleState, key, value, importance);
|
|
5470
5586
|
return !0;
|
|
5471
5587
|
}
|
|
5472
5588
|
function normalizeStyle(style) {
|
|
@@ -5479,7 +5595,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5479
5595
|
}
|
|
5480
5596
|
function applyDefaultStyle(pkey, styleState) {
|
|
5481
5597
|
var defaultValues = animatableDefaults[pkey];
|
|
5482
|
-
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
5598
|
+
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues, 1);
|
|
5483
5599
|
}
|
|
5484
5600
|
}
|
|
5485
5601
|
});
|
|
@@ -5600,79 +5716,6 @@ var require_setElementProps_native = __commonJS({
|
|
|
5600
5716
|
}
|
|
5601
5717
|
});
|
|
5602
5718
|
|
|
5603
|
-
// ../../packages/is-equal-shallow/dist/cjs/index.native.js
|
|
5604
|
-
var require_index_native6 = __commonJS({
|
|
5605
|
-
"../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
|
|
5606
|
-
"use strict";
|
|
5607
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
5608
|
-
for (var name in all) __defProp2(target, name, {
|
|
5609
|
-
get: all[name],
|
|
5610
|
-
enumerable: !0
|
|
5611
|
-
});
|
|
5612
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
5613
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
5614
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
5615
|
-
for (var _loop = function() {
|
|
5616
|
-
var key = _step.value;
|
|
5617
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
5618
|
-
get: function() {
|
|
5619
|
-
return from[key];
|
|
5620
|
-
},
|
|
5621
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
5622
|
-
});
|
|
5623
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
5624
|
-
} catch (err) {
|
|
5625
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
5626
|
-
} finally {
|
|
5627
|
-
try {
|
|
5628
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
5629
|
-
} finally {
|
|
5630
|
-
if (_didIteratorError)
|
|
5631
|
-
throw _iteratorError;
|
|
5632
|
-
}
|
|
5633
|
-
}
|
|
5634
|
-
return to;
|
|
5635
|
-
}, __toCommonJS2 = function(mod) {
|
|
5636
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
5637
|
-
value: !0
|
|
5638
|
-
}), mod);
|
|
5639
|
-
}, index_exports2 = {};
|
|
5640
|
-
__export2(index_exports2, {
|
|
5641
|
-
isEqualShallow: function() {
|
|
5642
|
-
return isEqualShallow;
|
|
5643
|
-
},
|
|
5644
|
-
mergeIfNotShallowEqual: function() {
|
|
5645
|
-
return mergeIfNotShallowEqual;
|
|
5646
|
-
},
|
|
5647
|
-
useCreateShallowSetState: function() {
|
|
5648
|
-
return useCreateShallowSetState;
|
|
5649
|
-
}
|
|
5650
|
-
});
|
|
5651
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
5652
|
-
var import_react3 = require("react");
|
|
5653
|
-
function useCreateShallowSetState(setter, debugIn) {
|
|
5654
|
-
return (0, import_react3.useCallback)(function(next) {
|
|
5655
|
-
setter(function(prev) {
|
|
5656
|
-
return mergeIfNotShallowEqual(prev, next, debugIn);
|
|
5657
|
-
});
|
|
5658
|
-
}, [
|
|
5659
|
-
setter,
|
|
5660
|
-
debugIn
|
|
5661
|
-
]);
|
|
5662
|
-
}
|
|
5663
|
-
function mergeIfNotShallowEqual(prev, next, debug) {
|
|
5664
|
-
return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
5665
|
-
...prev,
|
|
5666
|
-
...next
|
|
5667
|
-
};
|
|
5668
|
-
}
|
|
5669
|
-
function isEqualShallow(prev, next) {
|
|
5670
|
-
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
5671
|
-
return !0;
|
|
5672
|
-
}
|
|
5673
|
-
}
|
|
5674
|
-
});
|
|
5675
|
-
|
|
5676
5719
|
// ../web/dist/cjs/helpers/subscribeToContextGroup.native.js
|
|
5677
5720
|
var require_subscribeToContextGroup_native = __commonJS({
|
|
5678
5721
|
"../web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
|
|
@@ -5716,31 +5759,57 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
5716
5759
|
}
|
|
5717
5760
|
});
|
|
5718
5761
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
5719
|
-
var
|
|
5720
|
-
var {
|
|
5762
|
+
var import_is_equal_shallow = require_index_native5(), import_useMedia = require_useMedia_native(), subscribeToContextGroup = function(props) {
|
|
5763
|
+
var { pseudoGroups, mediaGroups, groupContext } = props;
|
|
5721
5764
|
if (pseudoGroups || mediaGroups) {
|
|
5722
|
-
var
|
|
5723
|
-
|
|
5724
|
-
|
|
5765
|
+
var disposables = /* @__PURE__ */ new Set();
|
|
5766
|
+
if (pseudoGroups) for (var _i = 0, _iter = [
|
|
5767
|
+
...pseudoGroups
|
|
5768
|
+
]; _i < _iter.length; _i++) {
|
|
5769
|
+
var name = _iter[_i];
|
|
5770
|
+
disposables.add(createGroupListener(name, props));
|
|
5771
|
+
}
|
|
5772
|
+
if (mediaGroups) for (var _i1 = 0, _iter1 = [
|
|
5773
|
+
...mediaGroups
|
|
5774
|
+
]; _i1 < _iter1.length; _i1++) {
|
|
5775
|
+
var name1 = _iter1[_i1];
|
|
5776
|
+
disposables.add(createGroupListener(name1, props));
|
|
5777
|
+
}
|
|
5778
|
+
return function() {
|
|
5779
|
+
disposables.forEach(function(d) {
|
|
5780
|
+
return d();
|
|
5781
|
+
});
|
|
5782
|
+
};
|
|
5783
|
+
}
|
|
5784
|
+
}, createGroupListener = function(name, param) {
|
|
5785
|
+
var { setStateShallow, pseudoGroups, mediaGroups, groupContext } = param, parent = groupContext == null ? void 0 : groupContext[name];
|
|
5786
|
+
return parent ? parent.subscribe(function(param2) {
|
|
5787
|
+
var { layout, pseudo } = param2;
|
|
5788
|
+
setStateShallow(function(prev) {
|
|
5789
|
+
var _prev_group, didChange = !1, group = ((_prev_group = prev.group) === null || _prev_group === void 0 ? void 0 : _prev_group[name]) || {
|
|
5725
5790
|
pseudo: {},
|
|
5726
5791
|
media: {}
|
|
5727
5792
|
};
|
|
5728
|
-
if (pseudo && pseudoGroups != null && pseudoGroups.has(
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
next
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
var
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
setStateShallow({
|
|
5739
|
-
group
|
|
5740
|
-
});
|
|
5793
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(name)) {
|
|
5794
|
+
var _group;
|
|
5795
|
+
(_group = group).pseudo || (_group.pseudo = {});
|
|
5796
|
+
var next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.pseudo, pseudo);
|
|
5797
|
+
next !== group.pseudo && (Object.assign(group.pseudo, pseudo), didChange = !0);
|
|
5798
|
+
} else if (layout && mediaGroups) {
|
|
5799
|
+
var _group1;
|
|
5800
|
+
(_group1 = group).media || (_group1.media = {});
|
|
5801
|
+
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next1 = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState2);
|
|
5802
|
+
next1 !== group.media && (Object.assign(group.media, next1), didChange = !0);
|
|
5741
5803
|
}
|
|
5804
|
+
return didChange ? {
|
|
5805
|
+
group: {
|
|
5806
|
+
...prev.group,
|
|
5807
|
+
[name]: group
|
|
5808
|
+
}
|
|
5809
|
+
} : prev;
|
|
5742
5810
|
});
|
|
5743
|
-
}
|
|
5811
|
+
}) : function() {
|
|
5812
|
+
};
|
|
5744
5813
|
};
|
|
5745
5814
|
}
|
|
5746
5815
|
});
|
|
@@ -6701,8 +6770,8 @@ var require_useComponentState_native = __commonJS({
|
|
|
6701
6770
|
}
|
|
6702
6771
|
});
|
|
6703
6772
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
6704
|
-
var import_constants = require_index_native2(), import_is_equal_shallow =
|
|
6705
|
-
var
|
|
6773
|
+
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) {
|
|
6774
|
+
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);
|
|
6706
6775
|
stateRef.current || (stateRef.current = {});
|
|
6707
6776
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
6708
6777
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
@@ -6726,7 +6795,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
6726
6795
|
...states[0],
|
|
6727
6796
|
[props.forceStyle]: !0
|
|
6728
6797
|
} : states[0], setState = states[1];
|
|
6729
|
-
stateRef.current.nextComponentState &&
|
|
6798
|
+
stateRef.current.nextComponentState && Object.assign(state, stateRef.current.nextComponentState);
|
|
6730
6799
|
var isAnimated = willBeAnimated;
|
|
6731
6800
|
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(_) {
|
|
6732
6801
|
return {
|
|
@@ -6745,46 +6814,6 @@ var require_useComponentState_native = __commonJS({
|
|
|
6745
6814
|
var isAnimatedAndHydrated = isAnimated && !supportsCSS, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
6746
6815
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0);
|
|
6747
6816
|
}
|
|
6748
|
-
if (groupName && !curStateRef.group) {
|
|
6749
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
6750
|
-
curStateRef.group = {
|
|
6751
|
-
listeners,
|
|
6752
|
-
emit(name, state2) {
|
|
6753
|
-
listeners.forEach(function(l) {
|
|
6754
|
-
return l(name, state2);
|
|
6755
|
-
});
|
|
6756
|
-
},
|
|
6757
|
-
subscribe(cb) {
|
|
6758
|
-
return listeners.add(cb), setStateShallow({
|
|
6759
|
-
hasDynGroupChildren: !0
|
|
6760
|
-
}), function() {
|
|
6761
|
-
listeners.delete(cb), listeners.size === 0 && setStateShallow({
|
|
6762
|
-
hasDynGroupChildren: !1
|
|
6763
|
-
});
|
|
6764
|
-
};
|
|
6765
|
-
}
|
|
6766
|
-
};
|
|
6767
|
-
}
|
|
6768
|
-
if (!curStateRef.stateEmitter && hasAnimationProp) {
|
|
6769
|
-
var listeners1 = /* @__PURE__ */ new Set();
|
|
6770
|
-
curStateRef.stateEmitter = {
|
|
6771
|
-
listeners: listeners1,
|
|
6772
|
-
emit(state2) {
|
|
6773
|
-
listeners1.forEach(function(l) {
|
|
6774
|
-
return l(state2);
|
|
6775
|
-
});
|
|
6776
|
-
},
|
|
6777
|
-
subscribe(cb) {
|
|
6778
|
-
return listeners1.add(cb), setStateShallow({
|
|
6779
|
-
hasDynGroupChildren: !0
|
|
6780
|
-
}), function() {
|
|
6781
|
-
listeners1.delete(cb), listeners1.size === 0 && setStateShallow({
|
|
6782
|
-
hasDynGroupChildren: !1
|
|
6783
|
-
});
|
|
6784
|
-
};
|
|
6785
|
-
}
|
|
6786
|
-
};
|
|
6787
|
-
}
|
|
6788
6817
|
return {
|
|
6789
6818
|
startedUnhydrated,
|
|
6790
6819
|
curStateRef,
|
|
@@ -7034,17 +7063,26 @@ var require_createComponent_native = __commonJS({
|
|
|
7034
7063
|
}
|
|
7035
7064
|
});
|
|
7036
7065
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
7037
|
-
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(), componentSetStates = /* @__PURE__ */ new Set()
|
|
7066
|
+
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(), componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
7067
|
+
"hover",
|
|
7068
|
+
"press",
|
|
7069
|
+
"pressIn",
|
|
7070
|
+
"group",
|
|
7071
|
+
"focus",
|
|
7072
|
+
"focusWithin",
|
|
7073
|
+
"media",
|
|
7074
|
+
"group"
|
|
7075
|
+
]);
|
|
7038
7076
|
if (0) var cancelTouches;
|
|
7039
7077
|
var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
7040
7078
|
value: !1
|
|
7041
7079
|
};
|
|
7042
7080
|
import_constants.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
|
|
7043
|
-
lastInteractionWasKeyboard.value = !0;
|
|
7081
|
+
lastInteractionWasKeyboard.value || (lastInteractionWasKeyboard.value = !0);
|
|
7044
7082
|
}), document.addEventListener("mousedown", function() {
|
|
7045
|
-
lastInteractionWasKeyboard.value = !1;
|
|
7083
|
+
lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
|
|
7046
7084
|
}), document.addEventListener("mousemove", function() {
|
|
7047
|
-
lastInteractionWasKeyboard.value = !1;
|
|
7085
|
+
lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
|
|
7048
7086
|
}));
|
|
7049
7087
|
function createComponent(staticConfig) {
|
|
7050
7088
|
var _staticConfig_defaultProps, { componentName } = staticConfig, config = null, defaultProps = staticConfig.defaultProps;
|
|
@@ -7069,7 +7107,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7069
7107
|
var _propsIn_datatestrenders, _current, _;
|
|
7070
7108
|
(_ = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _ !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
|
|
7071
7109
|
}
|
|
7072
|
-
var
|
|
7110
|
+
var styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
|
|
7073
7111
|
if (context && (contextValue = import_react3.default.useContext(context), contextValue))
|
|
7074
7112
|
for (var key in context.props) {
|
|
7075
7113
|
var propVal = (0, import_getShorthandValue.getShorthandValue)(propsIn, key);
|
|
@@ -7088,21 +7126,67 @@ var require_createComponent_native = __commonJS({
|
|
|
7088
7126
|
...styledContextProps
|
|
7089
7127
|
} : defaultProps, props = propsIn;
|
|
7090
7128
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
7091
|
-
var componentName2 = props.componentName || staticConfig.componentName, animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props,
|
|
7129
|
+
var componentName2 = props.componentName || staticConfig.componentName, componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContextParent = import_react3.default.useContext(import_GroupContext.GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, animationDriver, staticConfig, config), { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState, allGroupContexts = (0, import_react3.useMemo)(function() {
|
|
7130
|
+
var _stateRef_current_group;
|
|
7131
|
+
if (!groupName) return groupContextParent;
|
|
7132
|
+
(_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
|
|
7133
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
7134
|
+
return stateRef.current.group = {
|
|
7135
|
+
listeners,
|
|
7136
|
+
emit(state2) {
|
|
7137
|
+
listeners.forEach(function(l) {
|
|
7138
|
+
return l(state2);
|
|
7139
|
+
});
|
|
7140
|
+
},
|
|
7141
|
+
subscribe(cb) {
|
|
7142
|
+
return listeners.add(cb), listeners.size === 1 && setStateShallow({
|
|
7143
|
+
hasDynGroupChildren: !0
|
|
7144
|
+
}), function() {
|
|
7145
|
+
listeners.delete(cb), listeners.size === 0 && setStateShallow({
|
|
7146
|
+
hasDynGroupChildren: !1
|
|
7147
|
+
});
|
|
7148
|
+
};
|
|
7149
|
+
}
|
|
7150
|
+
}, {
|
|
7151
|
+
...groupContextParent,
|
|
7152
|
+
[groupName]: {
|
|
7153
|
+
state: {
|
|
7154
|
+
pseudo: import_defaultComponentState.defaultComponentStateMounted
|
|
7155
|
+
},
|
|
7156
|
+
subscribe: function(listener) {
|
|
7157
|
+
var _stateRef_current_group2, dispose = (_stateRef_current_group2 = stateRef.current.group) === null || _stateRef_current_group2 === void 0 ? void 0 : _stateRef_current_group2.subscribe(listener);
|
|
7158
|
+
return function() {
|
|
7159
|
+
dispose == null || dispose();
|
|
7160
|
+
};
|
|
7161
|
+
}
|
|
7162
|
+
}
|
|
7163
|
+
};
|
|
7164
|
+
}, [
|
|
7165
|
+
stateRef,
|
|
7166
|
+
groupName,
|
|
7167
|
+
groupContextParent
|
|
7168
|
+
]), setStateShallow = componentState.setStateShallow, pendingState = stateRef.current.nextComponentState;
|
|
7169
|
+
pendingState && (stateRef.current.nextComponentState = void 0, componentState.setState(function(prev) {
|
|
7170
|
+
return {
|
|
7171
|
+
...prev,
|
|
7172
|
+
...pendingState
|
|
7173
|
+
};
|
|
7174
|
+
}));
|
|
7175
|
+
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;
|
|
7092
7176
|
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
7093
7177
|
// "needsWebStyles" basically with motion we just animate a plain div, but
|
|
7094
7178
|
// we still have animated.View/Text for Sheet which wants to control
|
|
7095
7179
|
// things declaratively
|
|
7096
7180
|
!animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
7097
7181
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
7098
|
-
props.themeShallow && (
|
|
7182
|
+
props.themeShallow && (stateRef.current.themeShallow = !0);
|
|
7099
7183
|
var themeStateProps = {
|
|
7100
7184
|
componentName: componentName2,
|
|
7101
7185
|
disable: disableTheme,
|
|
7102
|
-
shallow:
|
|
7186
|
+
shallow: stateRef.current.themeShallow,
|
|
7103
7187
|
debug: debugProp
|
|
7104
7188
|
};
|
|
7105
|
-
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof
|
|
7189
|
+
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof stateRef.current.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
|
|
7106
7190
|
return !!stateRef.current.isListeningToTheme;
|
|
7107
7191
|
}), themeStateProps.deopt = willBeAnimated, !1) {
|
|
7108
7192
|
var name, type, dataIs, banner;
|
|
@@ -7124,33 +7208,47 @@ var require_createComponent_native = __commonJS({
|
|
|
7124
7208
|
willBeAnimated,
|
|
7125
7209
|
styledContextProps,
|
|
7126
7210
|
noMergeStyle: isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles)
|
|
7127
|
-
}, themeName = (themeState == null ? void 0 : themeState.name) || "", splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
7128
|
-
if (
|
|
7129
|
-
var
|
|
7130
|
-
|
|
7131
|
-
var
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
]), canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
7136
|
-
return avoidReRenderKeys.has(key3);
|
|
7211
|
+
}, themeName = (themeState == null ? void 0 : themeState.name) || "", 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;
|
|
7212
|
+
if (groupContext) {
|
|
7213
|
+
var groupState = groupContext == null ? void 0 : groupContext.state;
|
|
7214
|
+
if (groupState && groupState.layout === void 0) {
|
|
7215
|
+
var _splitStyles_style, _splitStyles_style1;
|
|
7216
|
+
(!((_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 = {
|
|
7217
|
+
width: fromPx(splitStyles.style.width),
|
|
7218
|
+
height: fromPx(splitStyles.style.height)
|
|
7137
7219
|
});
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7220
|
+
}
|
|
7221
|
+
}
|
|
7222
|
+
if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
7223
|
+
var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
7224
|
+
stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
7225
|
+
var prev = stateRef.current.nextComponentState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
7226
|
+
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
7227
|
+
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
7228
|
+
return avoidReRenderKeys.has(key3);
|
|
7229
|
+
});
|
|
7230
|
+
if (canAvoidReRender) {
|
|
7231
|
+
var updatedState = {
|
|
7232
|
+
...prev,
|
|
7233
|
+
...next
|
|
7234
|
+
};
|
|
7235
|
+
stateRef.current.nextComponentState = updatedState;
|
|
7236
|
+
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
7237
|
+
if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
|
|
7238
|
+
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
7239
|
+
styleListener(nextStyles.style);
|
|
7240
|
+
} else ogSetStateShallow(next);
|
|
7241
|
+
}
|
|
7242
|
+
}, setStateShallow = function(state2) {
|
|
7243
|
+
var _stateRef_current_setStateShallow, _stateRef_current;
|
|
7244
|
+
(_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
|
|
7147
7245
|
};
|
|
7148
7246
|
}
|
|
7149
|
-
if (props.group && props.untilMeasured === "hide" && !
|
|
7247
|
+
if (props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
|
|
7150
7248
|
var _splitStyles;
|
|
7151
7249
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
7152
7250
|
}
|
|
7153
|
-
|
|
7251
|
+
splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
|
|
7154
7252
|
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
7155
7253
|
(0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
|
|
7156
7254
|
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
|
|
@@ -7203,18 +7301,18 @@ var require_createComponent_native = __commonJS({
|
|
|
7203
7301
|
});
|
|
7204
7302
|
animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`), animations.ref && (animatedRef = animations.ref));
|
|
7205
7303
|
}
|
|
7206
|
-
|
|
7207
|
-
var layout = e.nativeEvent.layout;
|
|
7208
|
-
|
|
7304
|
+
groupContext && (nonTamaguiProps.onLayout = (0, import_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
7305
|
+
var _stateRef_current_group, layout = e.nativeEvent.layout;
|
|
7306
|
+
groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
|
|
7209
7307
|
layout
|
|
7210
7308
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
7211
7309
|
return {
|
|
7212
7310
|
...prev
|
|
7213
7311
|
};
|
|
7214
7312
|
}), stateRef.current.hasMeasured = !0;
|
|
7215
|
-
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef,
|
|
7313
|
+
})), 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) {
|
|
7216
7314
|
return stateRef.current.host = x;
|
|
7217
|
-
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref =
|
|
7315
|
+
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = stateRef.current.composedRef;
|
|
7218
7316
|
var { pseudoGroups, mediaGroups } = splitStyles, unPress = function() {
|
|
7219
7317
|
setStateShallow({
|
|
7220
7318
|
press: !1,
|
|
@@ -7242,18 +7340,21 @@ var require_createComponent_native = __commonJS({
|
|
|
7242
7340
|
});
|
|
7243
7341
|
return;
|
|
7244
7342
|
}
|
|
7245
|
-
var dispose = !disabled && (pseudoGroups || mediaGroups) ? (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
7246
|
-
componentContext,
|
|
7247
|
-
setStateShallow,
|
|
7248
|
-
state,
|
|
7249
|
-
mediaGroups,
|
|
7250
|
-
pseudoGroups
|
|
7251
|
-
}) : null;
|
|
7252
7343
|
return function() {
|
|
7253
|
-
|
|
7344
|
+
componentSetStates.delete(setState);
|
|
7254
7345
|
};
|
|
7255
7346
|
}, [
|
|
7256
7347
|
state.unmounted,
|
|
7348
|
+
disabled
|
|
7349
|
+
]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7350
|
+
if (!disabled && !(!pseudoGroups && !mediaGroups) && allGroupContexts) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
7351
|
+
groupContext: allGroupContexts,
|
|
7352
|
+
setStateShallow,
|
|
7353
|
+
mediaGroups,
|
|
7354
|
+
pseudoGroups
|
|
7355
|
+
});
|
|
7356
|
+
}, [
|
|
7357
|
+
allGroupContexts,
|
|
7257
7358
|
disabled,
|
|
7258
7359
|
pseudoGroups ? Object.keys([
|
|
7259
7360
|
...pseudoGroups
|
|
@@ -7261,24 +7362,15 @@ var require_createComponent_native = __commonJS({
|
|
|
7261
7362
|
mediaGroups ? Object.keys([
|
|
7262
7363
|
...mediaGroups
|
|
7263
7364
|
]).join("") : 0
|
|
7264
|
-
]), (0,
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
});
|
|
7271
|
-
var groupContextState = componentContext == null ? void 0 : componentContext.groups;
|
|
7272
|
-
if (groupContextState) {
|
|
7273
|
-
var next = {
|
|
7274
|
-
...groupContextState[groupName],
|
|
7275
|
-
...state
|
|
7276
|
-
};
|
|
7277
|
-
groupContextState[groupName] = next;
|
|
7278
|
-
}
|
|
7279
|
-
}
|
|
7365
|
+
]), hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_react3.useEffect)(function() {
|
|
7366
|
+
stateRef.current.nextComponentState = void 0;
|
|
7367
|
+
});
|
|
7368
|
+
var groupEmitter = stateRef.current.group;
|
|
7369
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7370
|
+
!groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state);
|
|
7280
7371
|
}, [
|
|
7281
|
-
|
|
7372
|
+
groupContext,
|
|
7373
|
+
groupEmitter,
|
|
7282
7374
|
state
|
|
7283
7375
|
]);
|
|
7284
7376
|
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), events = shouldAttach ? {
|
|
@@ -7292,7 +7384,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7292
7384
|
},
|
|
7293
7385
|
onMouseLeave: function(e) {
|
|
7294
7386
|
var next = {};
|
|
7295
|
-
needsHoverState && (next.hover = !1), needsPressState &&
|
|
7387
|
+
needsHoverState && (next.hover = !1), needsPressState && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
7296
7388
|
}
|
|
7297
7389
|
},
|
|
7298
7390
|
onPressIn: attachPress ? function(e) {
|
|
@@ -7363,37 +7455,15 @@ var require_createComponent_native = __commonJS({
|
|
|
7363
7455
|
var useChildrenResult;
|
|
7364
7456
|
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
|
|
7365
7457
|
var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
|
|
7366
|
-
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
|
|
7458
|
+
if (ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
|
|
7367
7459
|
children: content
|
|
7368
|
-
}))
|
|
7369
|
-
var groupState = curStateRef.group, subGroupContext = import_react3.default.useMemo(function() {
|
|
7370
|
-
var _splitStyles_style, _splitStyles_style1;
|
|
7371
|
-
if (!(!groupState || !groupName)) return groupState.listeners.clear(), {
|
|
7372
|
-
...componentContext.groups,
|
|
7373
|
-
// change reference so as we mutate it doesn't affect siblings etc
|
|
7374
|
-
state: {
|
|
7375
|
-
...componentContext.groups.state,
|
|
7376
|
-
[groupName]: {
|
|
7377
|
-
pseudo: import_defaultComponentState.defaultComponentStateMounted,
|
|
7378
|
-
// capture just initial width and height if they exist
|
|
7379
|
-
// will have top, left, width, height (not x, y)
|
|
7380
|
-
layout: {
|
|
7381
|
-
width: fromPx((_splitStyles_style = splitStyles.style) === null || _splitStyles_style === void 0 ? void 0 : _splitStyles_style.width),
|
|
7382
|
-
height: fromPx((_splitStyles_style1 = splitStyles.style) === null || _splitStyles_style1 === void 0 ? void 0 : _splitStyles_style1.height)
|
|
7383
|
-
}
|
|
7384
|
-
}
|
|
7385
|
-
},
|
|
7386
|
-
emit: groupState.emit,
|
|
7387
|
-
subscribe: groupState.subscribe
|
|
7388
|
-
};
|
|
7389
|
-
}, [
|
|
7390
|
-
groupName
|
|
7391
|
-
]);
|
|
7392
|
-
if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
7460
|
+
})), "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
7393
7461
|
...componentContext,
|
|
7394
|
-
groups: subGroupContext,
|
|
7395
7462
|
setParentFocusState: setStateShallow,
|
|
7396
7463
|
children: content
|
|
7464
|
+
})), "group" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
7465
|
+
value: allGroupContexts,
|
|
7466
|
+
children: content
|
|
7397
7467
|
})), content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), staticConfig.context) {
|
|
7398
7468
|
var contextProps = staticConfig.context.props;
|
|
7399
7469
|
for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
|
|
@@ -7419,6 +7489,15 @@ var require_createComponent_native = __commonJS({
|
|
|
7419
7489
|
}
|
|
7420
7490
|
return content;
|
|
7421
7491
|
});
|
|
7492
|
+
function notifyGroupSubscribers(groupContext, groupEmitter, pseudo) {
|
|
7493
|
+
if (!(!groupContext || !groupEmitter)) {
|
|
7494
|
+
var nextState = {
|
|
7495
|
+
...groupContext.state,
|
|
7496
|
+
pseudo
|
|
7497
|
+
};
|
|
7498
|
+
groupEmitter.emit(nextState), groupContext.state = nextState;
|
|
7499
|
+
}
|
|
7500
|
+
}
|
|
7422
7501
|
staticConfig.componentName && (component.displayName = staticConfig.componentName);
|
|
7423
7502
|
var res = component;
|
|
7424
7503
|
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ import_react3.default.memo(res)), res.staticConfig = staticConfig;
|
|
@@ -9188,13 +9267,8 @@ var require_useConfiguration_native = __commonJS({
|
|
|
9188
9267
|
}
|
|
9189
9268
|
});
|
|
9190
9269
|
module2.exports = __toCommonJS2(useConfiguration_exports);
|
|
9191
|
-
var import_react3 = __toESM2(require("react")),
|
|
9192
|
-
|
|
9193
|
-
return {
|
|
9194
|
-
...restConfig,
|
|
9195
|
-
...restComponentConfig,
|
|
9196
|
-
animationDriver: animationDriver ?? (0, import_config.getConfig)().animations
|
|
9197
|
-
};
|
|
9270
|
+
var import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), useConfiguration = function() {
|
|
9271
|
+
return import_react3.default.useContext(import_ComponentContext.ComponentContext);
|
|
9198
9272
|
};
|
|
9199
9273
|
}
|
|
9200
9274
|
});
|
|
@@ -9361,7 +9435,7 @@ var require_useProps_native = __commonJS({
|
|
|
9361
9435
|
}
|
|
9362
9436
|
});
|
|
9363
9437
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
9364
|
-
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();
|
|
9438
|
+
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();
|
|
9365
9439
|
function useProps(props, opts) {
|
|
9366
9440
|
var [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
9367
9441
|
...opts,
|
|
@@ -9385,7 +9459,7 @@ var require_useProps_native = __commonJS({
|
|
|
9385
9459
|
needsUpdate() {
|
|
9386
9460
|
return !0;
|
|
9387
9461
|
}
|
|
9388
|
-
}), 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 ? (
|
|
9462
|
+
}), 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 ? (
|
|
9389
9463
|
// not safe to use mediaState but really marginal to hit this
|
|
9390
9464
|
import_useMedia.mediaState
|
|
9391
9465
|
) : (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state, {
|
|
@@ -9396,7 +9470,7 @@ var require_useProps_native = __commonJS({
|
|
|
9396
9470
|
noClass: !0,
|
|
9397
9471
|
resolveValues: "auto",
|
|
9398
9472
|
...opts
|
|
9399
|
-
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
9473
|
+
}, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
9400
9474
|
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9401
9475
|
if (!disabled) {
|
|
9402
9476
|
if (state.unmounted) {
|
|
@@ -9405,16 +9479,16 @@ var require_useProps_native = __commonJS({
|
|
|
9405
9479
|
});
|
|
9406
9480
|
return;
|
|
9407
9481
|
}
|
|
9408
|
-
return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
9409
|
-
|
|
9482
|
+
if (groupContext) return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
9483
|
+
groupContext,
|
|
9410
9484
|
setStateShallow,
|
|
9411
|
-
state,
|
|
9412
9485
|
mediaGroups,
|
|
9413
9486
|
pseudoGroups
|
|
9414
9487
|
});
|
|
9415
9488
|
}
|
|
9416
9489
|
}, [
|
|
9417
9490
|
disabled,
|
|
9491
|
+
groupContext,
|
|
9418
9492
|
pseudoGroups ? Object.keys([
|
|
9419
9493
|
...pseudoGroups
|
|
9420
9494
|
]).join("") : 0,
|
|
@@ -10156,10 +10230,11 @@ var require_index_native9 = __commonJS({
|
|
|
10156
10230
|
var import_config = require_config_native(), import_insertStyleRule = require_insertStyleRule_native();
|
|
10157
10231
|
__reExport2(index_exports2, require_constants_native2(), module2.exports);
|
|
10158
10232
|
__reExport2(index_exports2, require_ComponentContext_native(), module2.exports);
|
|
10233
|
+
__reExport2(index_exports2, require_GroupContext_native(), module2.exports);
|
|
10159
10234
|
__reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
|
|
10160
10235
|
__reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
|
|
10161
10236
|
__reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
|
|
10162
|
-
__reExport2(index_exports2,
|
|
10237
|
+
__reExport2(index_exports2, require_index_native5(), module2.exports);
|
|
10163
10238
|
var import_insertStyleRule2 = require_insertStyleRule_native();
|
|
10164
10239
|
__reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
|
|
10165
10240
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
@@ -11651,7 +11726,7 @@ var require_index_native12 = __commonJS({
|
|
|
11651
11726
|
}
|
|
11652
11727
|
});
|
|
11653
11728
|
module2.exports = __toCommonJS2(index_exports2);
|
|
11654
|
-
var import_constants = require_index_native2(), import_is_equal_shallow =
|
|
11729
|
+
var import_constants = require_index_native2(), import_is_equal_shallow = require_index_native5(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
|
|
11655
11730
|
function setOnLayoutStrategy2(state) {
|
|
11656
11731
|
strategy = state;
|
|
11657
11732
|
}
|
|
@@ -11693,7 +11768,9 @@ var require_index_native12 = __commonJS({
|
|
|
11693
11768
|
} else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
|
|
11694
11769
|
var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
|
|
11695
11770
|
if (!cachedRect || // has changed one rect
|
|
11696
|
-
|
|
11771
|
+
// @ts-expect-error DOMRectReadOnly can go into object
|
|
11772
|
+
!(0, import_is_equal_shallow.isEqualShallow)(cachedRect, nodeRect) && // @ts-expect-error DOMRectReadOnly can go into object
|
|
11773
|
+
(!cachedParentRect || !(0, import_is_equal_shallow.isEqualShallow)(cachedParentRect, parentRect))) {
|
|
11697
11774
|
NodeRectCache.set(node, nodeRect), ParentRectCache.set(parentNode, parentRect);
|
|
11698
11775
|
var event = getElementLayoutEvent(nodeRect, parentRect);
|
|
11699
11776
|
avoidUpdates ? queuedUpdates.set(node, function() {
|