@tamagui/core 1.101.0 → 1.101.1
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 +201 -106
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +183 -113
- package/dist/test.native.js.map +3 -3
- package/package.json +7 -7
- package/types/createOptimizedView.native.d.ts +0 -1
- package/types/createOptimizedView.native.d.ts.map +1 -1
- package/types/getBaseViews.d.ts.map +1 -1
- package/types/hooks/useElementLayout.d.ts.map +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/vendor/Pressability.d.ts.map +1 -1
- package/dist/esm/createOptimizedView.native.mjs +0 -209
- package/dist/esm/getBaseViews.native.mjs +0 -12
- package/dist/esm/vendor/Pressability.native.mjs +0 -3
- package/dist/native.native.js +0 -13106
- package/dist/native.native.js.map +0 -6
package/dist/native.js
CHANGED
|
@@ -1273,7 +1273,12 @@ var require_concatClassName_native = __commonJS({
|
|
|
1273
1273
|
var require_types_native2 = __commonJS({
|
|
1274
1274
|
"../helpers/dist/cjs/types.native.js"(exports2, module2) {
|
|
1275
1275
|
"use strict";
|
|
1276
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty,
|
|
1276
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
1277
|
+
for (var name in all) __defProp2(target, name, {
|
|
1278
|
+
get: all[name],
|
|
1279
|
+
enumerable: !0
|
|
1280
|
+
});
|
|
1281
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
1277
1282
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1278
1283
|
if (from && typeof from == "object" || typeof from == "function") try {
|
|
1279
1284
|
for (var _loop = function() {
|
|
@@ -1301,7 +1306,25 @@ var require_types_native2 = __commonJS({
|
|
|
1301
1306
|
value: !0
|
|
1302
1307
|
}), mod);
|
|
1303
1308
|
}, types_exports = {};
|
|
1309
|
+
__export2(types_exports, {
|
|
1310
|
+
StyleObjectIdentifier: function() {
|
|
1311
|
+
return StyleObjectIdentifier;
|
|
1312
|
+
},
|
|
1313
|
+
StyleObjectProperty: function() {
|
|
1314
|
+
return StyleObjectProperty;
|
|
1315
|
+
},
|
|
1316
|
+
StyleObjectPseudo: function() {
|
|
1317
|
+
return StyleObjectPseudo;
|
|
1318
|
+
},
|
|
1319
|
+
StyleObjectRules: function() {
|
|
1320
|
+
return StyleObjectRules;
|
|
1321
|
+
},
|
|
1322
|
+
StyleObjectValue: function() {
|
|
1323
|
+
return StyleObjectValue;
|
|
1324
|
+
}
|
|
1325
|
+
});
|
|
1304
1326
|
module2.exports = __toCommonJS2(types_exports);
|
|
1327
|
+
var StyleObjectProperty = 0, StyleObjectValue = 1, StyleObjectIdentifier = 2, StyleObjectPseudo = 3, StyleObjectRules = 4;
|
|
1305
1328
|
}
|
|
1306
1329
|
});
|
|
1307
1330
|
|
|
@@ -2374,7 +2397,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2374
2397
|
}
|
|
2375
2398
|
});
|
|
2376
2399
|
module2.exports = __toCommonJS2(insertStyleRule_exports);
|
|
2377
|
-
var import_constants = require_index_native3(), import_createVariable = require_createVariable_native();
|
|
2400
|
+
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_createVariable = require_createVariable_native();
|
|
2378
2401
|
function _array_like_to_array(arr, len) {
|
|
2379
2402
|
(len == null || len > arr.length) && (len = arr.length);
|
|
2380
2403
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -2652,8 +2675,9 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2652
2675
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
2653
2676
|
try {
|
|
2654
2677
|
for (var _iterator = rulesToInsert[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
2655
|
-
var
|
|
2678
|
+
var styleObject = _step.value, identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
2656
2679
|
if (shouldInsertStyleRules(identifier)) {
|
|
2680
|
+
var rules = styleObject[import_helpers.StyleObjectRules];
|
|
2657
2681
|
allSelectors[identifier] = rules.join(`
|
|
2658
2682
|
`), track(identifier), updateRules(identifier, rules);
|
|
2659
2683
|
var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
|
|
@@ -2689,7 +2713,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2689
2713
|
}
|
|
2690
2714
|
}
|
|
2691
2715
|
}
|
|
2692
|
-
var minInsertAmt = process.env.TAMAGUI_INSERT_SELECTOR_TRIES ? +process.env.TAMAGUI_INSERT_SELECTOR_TRIES :
|
|
2716
|
+
var minInsertAmt = process.env.TAMAGUI_INSERT_SELECTOR_TRIES ? +process.env.TAMAGUI_INSERT_SELECTOR_TRIES : 1;
|
|
2693
2717
|
function shouldInsertStyleRules(identifier) {
|
|
2694
2718
|
if (process.env.TAMAGUI_REACT_19 || process.env.IS_STATIC === "is_static") return !0;
|
|
2695
2719
|
var total = totalSelectorsInserted.get(identifier);
|
|
@@ -2923,9 +2947,9 @@ var require_pseudoDescriptors_native = __commonJS({
|
|
|
2923
2947
|
}
|
|
2924
2948
|
});
|
|
2925
2949
|
|
|
2926
|
-
// ../web/dist/cjs/hooks/
|
|
2927
|
-
var
|
|
2928
|
-
"../web/dist/cjs/hooks/
|
|
2950
|
+
// ../web/dist/cjs/hooks/useDidHydrateOnce.native.js
|
|
2951
|
+
var require_useDidHydrateOnce_native = __commonJS({
|
|
2952
|
+
"../web/dist/cjs/hooks/useDidHydrateOnce.native.js"(exports2, module2) {
|
|
2929
2953
|
"use strict";
|
|
2930
2954
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2931
2955
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -2959,24 +2983,30 @@ var require_useDisableSSR_native = __commonJS({
|
|
|
2959
2983
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
2960
2984
|
value: !0
|
|
2961
2985
|
}), mod);
|
|
2962
|
-
},
|
|
2963
|
-
__export2(
|
|
2964
|
-
|
|
2965
|
-
return
|
|
2986
|
+
}, useDidHydrateOnce_exports = {};
|
|
2987
|
+
__export2(useDidHydrateOnce_exports, {
|
|
2988
|
+
useDidHydrateOnce: function() {
|
|
2989
|
+
return useDidHydrateOnce;
|
|
2990
|
+
},
|
|
2991
|
+
useDidHydrateOnceRoot: function() {
|
|
2992
|
+
return useDidHydrateOnceRoot;
|
|
2966
2993
|
}
|
|
2967
2994
|
});
|
|
2968
|
-
module2.exports = __toCommonJS2(
|
|
2969
|
-
var
|
|
2970
|
-
function
|
|
2971
|
-
|
|
2972
|
-
|
|
2995
|
+
module2.exports = __toCommonJS2(useDidHydrateOnce_exports);
|
|
2996
|
+
var import_react3 = require("react");
|
|
2997
|
+
function useDidHydrateOnceRoot() {
|
|
2998
|
+
return process.env.TAMAGUI_REACT_19, !0;
|
|
2999
|
+
}
|
|
3000
|
+
var last = Date.now();
|
|
3001
|
+
function useDidHydrateOnce() {
|
|
3002
|
+
return !0;
|
|
2973
3003
|
}
|
|
2974
3004
|
}
|
|
2975
3005
|
});
|
|
2976
3006
|
|
|
2977
|
-
// ../web/dist/cjs/hooks/
|
|
2978
|
-
var
|
|
2979
|
-
"../web/dist/cjs/hooks/
|
|
3007
|
+
// ../web/dist/cjs/hooks/useDisableSSR.native.js
|
|
3008
|
+
var require_useDisableSSR_native = __commonJS({
|
|
3009
|
+
"../web/dist/cjs/hooks/useDisableSSR.native.js"(exports2, module2) {
|
|
2980
3010
|
"use strict";
|
|
2981
3011
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
2982
3012
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -3010,23 +3040,17 @@ var require_useDidHydrateOnce_native = __commonJS({
|
|
|
3010
3040
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
3011
3041
|
value: !0
|
|
3012
3042
|
}), mod);
|
|
3013
|
-
},
|
|
3014
|
-
__export2(
|
|
3015
|
-
|
|
3016
|
-
return
|
|
3017
|
-
},
|
|
3018
|
-
useDidHydrateOnceRoot: function() {
|
|
3019
|
-
return useDidHydrateOnceRoot;
|
|
3043
|
+
}, useDisableSSR_exports = {};
|
|
3044
|
+
__export2(useDisableSSR_exports, {
|
|
3045
|
+
getDisableSSR: function() {
|
|
3046
|
+
return getDisableSSR;
|
|
3020
3047
|
}
|
|
3021
3048
|
});
|
|
3022
|
-
module2.exports = __toCommonJS2(
|
|
3023
|
-
var
|
|
3024
|
-
function
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
var last = Date.now();
|
|
3028
|
-
function useDidHydrateOnce() {
|
|
3029
|
-
return !0;
|
|
3049
|
+
module2.exports = __toCommonJS2(useDisableSSR_exports);
|
|
3050
|
+
var import_config = require_config_native();
|
|
3051
|
+
function getDisableSSR(componentContext) {
|
|
3052
|
+
var _componentContext_disableSSR;
|
|
3053
|
+
return (_componentContext_disableSSR = componentContext == null ? void 0 : componentContext.disableSSR) !== null && _componentContext_disableSSR !== void 0 ? _componentContext_disableSSR : (0, import_config.getConfig)().disableSSR;
|
|
3030
3054
|
}
|
|
3031
3055
|
}
|
|
3032
3056
|
});
|
|
@@ -3117,7 +3141,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3117
3141
|
}
|
|
3118
3142
|
});
|
|
3119
3143
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
3120
|
-
var import_constants = require_index_native3(), import_react3 = require("react"), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(),
|
|
3144
|
+
var import_constants = require_index_native3(), import_react3 = require("react"), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_native(), import_useDisableSSR = require_useDisableSSR_native();
|
|
3121
3145
|
function _array_like_to_array(arr, len) {
|
|
3122
3146
|
(len == null || len > arr.length) && (len = arr.length);
|
|
3123
3147
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -3215,12 +3239,11 @@ var require_useMedia_native = __commonJS({
|
|
|
3215
3239
|
}) : {}
|
|
3216
3240
|
), mediaQueryConfig2 = {}, getMedia2 = function() {
|
|
3217
3241
|
return mediaState2;
|
|
3218
|
-
}, mediaKeys = /* @__PURE__ */ new Set(), isMediaKey = function(key) {
|
|
3242
|
+
}, mediaKeys = /* @__PURE__ */ new Set(), mediaKeyRegex = /\$(platform|theme|group)-/, isMediaKey = function(key) {
|
|
3219
3243
|
if (mediaKeys.has(key)) return !0;
|
|
3220
3244
|
if (key[0] === "$") {
|
|
3221
|
-
|
|
3222
|
-
if (
|
|
3223
|
-
if (key.startsWith("$group-")) return "group";
|
|
3245
|
+
var match = key.match(mediaKeyRegex);
|
|
3246
|
+
if (match) return match[1];
|
|
3224
3247
|
}
|
|
3225
3248
|
return !1;
|
|
3226
3249
|
}, initState, defaultMediaImportance = Object.keys(import_pseudoDescriptors.pseudoDescriptors).length, mediaKeysOrdered, getMediaKeyImportance = function(key) {
|
|
@@ -3272,23 +3295,31 @@ var require_useMedia_native = __commonJS({
|
|
|
3272
3295
|
return States.set(ref, _object_spread2({}, States.get(ref), props));
|
|
3273
3296
|
}
|
|
3274
3297
|
function getSnapshot(param) {
|
|
3275
|
-
var touched = param.touched, prev = param.prev, enabled = param.enabled
|
|
3276
|
-
if (
|
|
3277
|
-
var
|
|
3298
|
+
var touched = param.touched, prev = param.prev, enabled = param.enabled;
|
|
3299
|
+
if (enabled === !1) return prev;
|
|
3300
|
+
var hasntUpdated = !touched || touched.every(function(key) {
|
|
3278
3301
|
return mediaState2[key] === prev[key];
|
|
3279
|
-
})
|
|
3302
|
+
});
|
|
3280
3303
|
return hasntUpdated ? prev : mediaState2;
|
|
3281
3304
|
}
|
|
3282
3305
|
function useMedia2(uidIn, componentContext) {
|
|
3283
|
-
var uid = uidIn ?? (0, import_react3.useRef)(), hasHydrated = (0, import_useDidHydrateOnce.useDidHydrateOnce)(), isHydrated = !import_constants.isWeb || (0, import_useDisableSSR.getDisableSSR)(componentContext) || hasHydrated, initialState = isHydrated ? mediaState2 : initState, componentState = States.get(uid);
|
|
3306
|
+
var debug = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, uid = uidIn ?? (0, import_react3.useRef)(), hasHydrated = (0, import_useDidHydrateOnce.useDidHydrateOnce)(), isHydrated = !import_constants.isWeb || (0, import_useDisableSSR.getDisableSSR)(componentContext) || hasHydrated, initialState = isHydrated ? mediaState2 : initState, componentState = States.get(uid);
|
|
3284
3307
|
componentState || (componentState = {
|
|
3285
3308
|
prev: initialState
|
|
3286
|
-
}, States.set(uid, componentState))
|
|
3309
|
+
}, States.set(uid, componentState));
|
|
3287
3310
|
var _useState = _sliced_to_array((0, import_react3.useState)(initialState), 2), state = _useState[0], setState = _useState[1];
|
|
3288
3311
|
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
3289
3312
|
var update = function() {
|
|
3290
3313
|
setState(function(prev) {
|
|
3291
|
-
var componentState2 = States.get(uid)
|
|
3314
|
+
var componentState2 = States.get(uid);
|
|
3315
|
+
process.env.NODE_ENV === "development" && debug && console.info("useMedia() update?", getSnapshot(componentState2) !== prev, {
|
|
3316
|
+
componentState: componentState2,
|
|
3317
|
+
touched: _to_consumable_array(componentState2.touched || []),
|
|
3318
|
+
prev: _object_spread2({}, componentState2.prev),
|
|
3319
|
+
next: getSnapshot(componentState2),
|
|
3320
|
+
mediaState: _object_spread2({}, mediaState2)
|
|
3321
|
+
});
|
|
3322
|
+
var next = getSnapshot(componentState2);
|
|
3292
3323
|
return next !== prev ? (componentState2.prev = next, next) : prev;
|
|
3293
3324
|
});
|
|
3294
3325
|
};
|
|
@@ -3301,7 +3332,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3301
3332
|
get: function(_, key) {
|
|
3302
3333
|
if (typeof key == "string") {
|
|
3303
3334
|
var _componentState;
|
|
3304
|
-
(_componentState = componentState).touched || (_componentState.touched =
|
|
3335
|
+
(_componentState = componentState).touched || (_componentState.touched = []), componentState.touched.includes(key) || componentState.touched.push(key), process.env.NODE_ENV === "development" && debug && console.info("useMedia() TOUCH", key);
|
|
3305
3336
|
}
|
|
3306
3337
|
return Reflect.get(state, key);
|
|
3307
3338
|
}
|
|
@@ -5100,6 +5131,10 @@ var require_getGroupPropParts_native = __commonJS({
|
|
|
5100
5131
|
var require_createMediaStyle_native = __commonJS({
|
|
5101
5132
|
"../web/dist/cjs/helpers/createMediaStyle.native.js"(exports2, module2) {
|
|
5102
5133
|
"use strict";
|
|
5134
|
+
function _type_of(obj) {
|
|
5135
|
+
"@swc/helpers - typeof";
|
|
5136
|
+
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
5137
|
+
}
|
|
5103
5138
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
5104
5139
|
for (var name in all) __defProp2(target, name, {
|
|
5105
5140
|
get: all[name],
|
|
@@ -5142,10 +5177,51 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
5142
5177
|
}
|
|
5143
5178
|
});
|
|
5144
5179
|
module2.exports = __toCommonJS2(createMediaStyle_exports);
|
|
5145
|
-
var import_config = require_config_native(), import_useMedia = require_useMedia_native(), import_getGroupPropParts = require_getGroupPropParts_native()
|
|
5180
|
+
var import_config = require_config_native(), import_useMedia = require_useMedia_native(), import_getGroupPropParts = require_getGroupPropParts_native();
|
|
5181
|
+
function _array_like_to_array(arr, len) {
|
|
5182
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
5183
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
5184
|
+
return arr2;
|
|
5185
|
+
}
|
|
5186
|
+
function _array_with_holes(arr) {
|
|
5187
|
+
if (Array.isArray(arr)) return arr;
|
|
5188
|
+
}
|
|
5189
|
+
function _iterable_to_array_limit(arr, i) {
|
|
5190
|
+
var _i = arr == null ? null : (typeof Symbol > "u" ? "undefined" : _type_of(Symbol)) < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
5191
|
+
if (_i != null) {
|
|
5192
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
5193
|
+
try {
|
|
5194
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0) ;
|
|
5195
|
+
} catch (err) {
|
|
5196
|
+
_d = !0, _e = err;
|
|
5197
|
+
} finally {
|
|
5198
|
+
try {
|
|
5199
|
+
!_n && _i.return != null && _i.return();
|
|
5200
|
+
} finally {
|
|
5201
|
+
if (_d) throw _e;
|
|
5202
|
+
}
|
|
5203
|
+
}
|
|
5204
|
+
return _arr;
|
|
5205
|
+
}
|
|
5206
|
+
}
|
|
5207
|
+
function _non_iterable_rest() {
|
|
5208
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5209
|
+
}
|
|
5210
|
+
function _sliced_to_array(arr, i) {
|
|
5211
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
5212
|
+
}
|
|
5213
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
5214
|
+
if (o) {
|
|
5215
|
+
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
5216
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5217
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
5218
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
5219
|
+
}
|
|
5220
|
+
}
|
|
5221
|
+
var MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMap = {
|
|
5146
5222
|
press: "active"
|
|
5147
5223
|
}, createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
|
|
5148
|
-
var
|
|
5224
|
+
var _styleObject = _sliced_to_array(styleObject, 5), property = _styleObject[0], _value = _styleObject[1], identifier = _styleObject[2], _pseudo = _styleObject[3], rules = _styleObject[4], conf = (0, import_config.getConfig)(), enableMediaPropOrder = conf.settings.mediaPropOrder, isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = "".concat(ogPrefix).concat(MEDIA_SEP).concat(mediaKeyIn.replace("-", "")).concat(negKey).concat(MEDIA_SEP), styleRule = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map(function(rule) {
|
|
5149
5225
|
return rule.replace(identifier, nextIdentifier);
|
|
5150
5226
|
}).join(";");
|
|
5151
5227
|
if (isNonWindowMedia) {
|
|
@@ -5181,13 +5257,15 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
5181
5257
|
), prefix = groupMediaKey ? "@container ".concat(containerName) : "@media";
|
|
5182
5258
|
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", " and ".concat(mediaQuery, " {")).replace("and screen and", "and") : styleRule = "".concat(prefix, " ").concat(mediaQuery, "{").concat(precedenceImportancePrefix1).concat(styleInner, "}"), groupMediaKey && (styleRule = "@supports (contain: ".concat(conf.settings.webContainerType || "inline-size", ") {").concat(styleRule, "}"));
|
|
5183
5259
|
}
|
|
5184
|
-
return
|
|
5260
|
+
return [
|
|
5185
5261
|
property,
|
|
5186
|
-
|
|
5262
|
+
void 0,
|
|
5263
|
+
nextIdentifier,
|
|
5264
|
+
void 0,
|
|
5265
|
+
[
|
|
5187
5266
|
styleRule
|
|
5188
|
-
]
|
|
5189
|
-
|
|
5190
|
-
};
|
|
5267
|
+
]
|
|
5268
|
+
];
|
|
5191
5269
|
};
|
|
5192
5270
|
}
|
|
5193
5271
|
});
|
|
@@ -7119,7 +7197,7 @@ var require_propMapper_native = __commonJS({
|
|
|
7119
7197
|
get: function(_, k) {
|
|
7120
7198
|
return k === "curProps" ? subProps : Reflect.get(_, k);
|
|
7121
7199
|
}
|
|
7122
|
-
}) : styleStateIn, conf = styleState.conf, styleProps = styleState.styleProps, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig,
|
|
7200
|
+
}) : styleStateIn, conf = styleState.conf, styleProps = styleState.styleProps, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig, variants = staticConfig.variants;
|
|
7123
7201
|
if (process.env.NODE_ENV === "development" && fontFamily && fontFamily[0] === "$" && !(fontFamily in conf.fontsParsed) && console.warn('Warning: no fontFamily "'.concat(fontFamily, '" found in config: ').concat(Object.keys(conf.fontsParsed).join(", "))), !styleProps.noExpand && variants && key in variants) {
|
|
7124
7202
|
styleState.curProps[key] = value;
|
|
7125
7203
|
var variantValue = resolveVariants(key, value, styleProps, styleState, "");
|
|
@@ -7538,15 +7616,22 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7538
7616
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
7539
7617
|
}
|
|
7540
7618
|
}
|
|
7541
|
-
var
|
|
7619
|
+
var conf, PROP_SPLIT = "-";
|
|
7542
7620
|
function isValidStyleKey(key, staticConfig) {
|
|
7543
7621
|
var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
7544
7622
|
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
7545
7623
|
}
|
|
7546
7624
|
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
|
|
7547
7625
|
conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
7548
|
-
var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, styleState = {
|
|
7549
|
-
|
|
7626
|
+
var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, curPropsState, styleState = {
|
|
7627
|
+
// this should go away, right now we're doing really crazy cumulative props,
|
|
7628
|
+
// as variants are resolved basically we go back and merge the results onto
|
|
7629
|
+
// the curProps, so that each following variant function recieves the current
|
|
7630
|
+
// "styles" with variants expanded. powerful, but i think too fancy
|
|
7631
|
+
// there's some part of the ui kit that depends on it we'd have to find and fix
|
|
7632
|
+
get curProps() {
|
|
7633
|
+
return curPropsState || (curPropsState = {}), curPropsState;
|
|
7634
|
+
},
|
|
7550
7635
|
classNames,
|
|
7551
7636
|
conf,
|
|
7552
7637
|
props,
|
|
@@ -7570,15 +7655,18 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7570
7655
|
styleState,
|
|
7571
7656
|
theme: _object_spread2({}, theme)
|
|
7572
7657
|
}), console.groupEnd());
|
|
7658
|
+
var asChild = props.asChild, accept = staticConfig.accept, noSkip = styleProps.noSkip, disableExpandShorthands = styleProps.disableExpandShorthands, noExpand = styleProps.noExpand, webContainerType = conf.settings.webContainerType, parentVariants = parentStaticConfig == null ? void 0 : parentStaticConfig.variants;
|
|
7573
7659
|
for (var keyOg in props) {
|
|
7574
|
-
var
|
|
7575
|
-
if (
|
|
7576
|
-
var
|
|
7577
|
-
|
|
7578
|
-
|
|
7660
|
+
var keyInit = keyOg, valInit = props[keyInit];
|
|
7661
|
+
if (accept) {
|
|
7662
|
+
var accepted = accept[keyInit];
|
|
7663
|
+
if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") {
|
|
7664
|
+
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames);
|
|
7665
|
+
continue;
|
|
7666
|
+
}
|
|
7579
7667
|
}
|
|
7580
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(),
|
|
7581
|
-
if (keyInit in import_skipProps.skipProps && !
|
|
7668
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
|
|
7669
|
+
if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
|
|
7582
7670
|
if (keyInit === "group" && !1) var identifier, containerType, containerCSS;
|
|
7583
7671
|
continue;
|
|
7584
7672
|
}
|
|
@@ -7587,7 +7675,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7587
7675
|
var isValidClassName, isMediaOrPseudo;
|
|
7588
7676
|
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses) var _styleState;
|
|
7589
7677
|
}
|
|
7590
|
-
if (
|
|
7678
|
+
if (!isValidStyleKeyInit) {
|
|
7591
7679
|
if (!import_constants.isAndroid && keyInit === "elevationAndroid") continue;
|
|
7592
7680
|
if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
|
|
7593
7681
|
else if (keyInit.startsWith("data-")) continue;
|
|
@@ -7602,10 +7690,10 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7602
7690
|
var name = keyInit.split("-")[1];
|
|
7603
7691
|
context != null && context.groups.subscribe && !(context != null && context.groups.state[name]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
7604
7692
|
}
|
|
7605
|
-
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !
|
|
7606
|
-
if (!(isStyleProp && (
|
|
7693
|
+
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
|
|
7694
|
+
if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
|
|
7607
7695
|
var shouldPassProp = !isStyleProp || // is in parent variants
|
|
7608
|
-
isHOC &&
|
|
7696
|
+
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
7609
7697
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), console.groupCollapsed(" \u{1F511} ".concat(keyOg).concat(keyInit !== keyOg ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), (0, import_log.log)({
|
|
7610
7698
|
isVariant,
|
|
7611
7699
|
valInit,
|
|
@@ -7621,7 +7709,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7621
7709
|
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
7622
7710
|
continue;
|
|
7623
7711
|
}
|
|
7624
|
-
if (!
|
|
7712
|
+
if (!noSkip && keyInit in import_skipProps.skipProps) {
|
|
7625
7713
|
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
7626
7714
|
continue;
|
|
7627
7715
|
}
|
|
@@ -7654,17 +7742,17 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7654
7742
|
console.groupEnd();
|
|
7655
7743
|
}
|
|
7656
7744
|
for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) {
|
|
7657
|
-
var
|
|
7745
|
+
var _parentStaticConfig_variants;
|
|
7658
7746
|
if (expanded) {
|
|
7659
7747
|
var _expanded_i = _sliced_to_array(expanded[i], 2), k = _expanded_i[0], v = _expanded_i[1];
|
|
7660
7748
|
key = k, val = v;
|
|
7661
7749
|
}
|
|
7662
7750
|
if (val != null && !(key in usedKeys)) {
|
|
7663
|
-
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key in variants, inlineProps != null && inlineProps.has(key) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) {
|
|
7751
|
+
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key in variants, inlineProps != null && inlineProps.has(key) || process.env.IS_STATIC === "is_static" && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) {
|
|
7664
7752
|
var _props_key;
|
|
7665
7753
|
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
|
|
7666
7754
|
}
|
|
7667
|
-
var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (
|
|
7755
|
+
var shouldPassThrough1 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
|
|
7668
7756
|
if (shouldPassThrough1) {
|
|
7669
7757
|
passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" - passing down prop ".concat(key)), (0, import_log.log)({
|
|
7670
7758
|
val,
|
|
@@ -7676,9 +7764,9 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7676
7764
|
if (!val) continue;
|
|
7677
7765
|
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
7678
7766
|
if (!descriptor) continue;
|
|
7679
|
-
if (!shouldDoClasses || IS_STATIC) {
|
|
7767
|
+
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
7680
7768
|
var _pseudos, _key;
|
|
7681
|
-
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), IS_STATIC) {
|
|
7769
|
+
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") {
|
|
7682
7770
|
Object.assign(pseudos[key], pseudoStyleObject);
|
|
7683
7771
|
continue;
|
|
7684
7772
|
}
|
|
@@ -7692,8 +7780,8 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7692
7780
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7693
7781
|
try {
|
|
7694
7782
|
for (var _iterator = pseudoStyles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
7695
|
-
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle.
|
|
7696
|
-
fullKey in usedKeys || mergeClassName(transforms, classNames, fullKey, psuedoStyle.
|
|
7783
|
+
var psuedoStyle = _step.value, fullKey = "".concat(psuedoStyle[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(descriptor.name);
|
|
7784
|
+
fullKey in usedKeys || mergeClassName(transforms, classNames, fullKey, psuedoStyle[import_helpers.StyleObjectIdentifier], isMediaOrPseudo1, !0);
|
|
7697
7785
|
}
|
|
7698
7786
|
} catch (err) {
|
|
7699
7787
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -7744,7 +7832,8 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7744
7832
|
}
|
|
7745
7833
|
if (isMedia) {
|
|
7746
7834
|
if (!val) continue;
|
|
7747
|
-
|
|
7835
|
+
var hasSpace = val.space, mediaKeyShort = key.slice(1);
|
|
7836
|
+
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), isMedia === "platform") {
|
|
7748
7837
|
var platform = key.slice(10);
|
|
7749
7838
|
if (
|
|
7750
7839
|
// supports web, ios, android
|
|
@@ -7752,18 +7841,15 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7752
7841
|
platform !== "native"
|
|
7753
7842
|
) continue;
|
|
7754
7843
|
}
|
|
7755
|
-
|
|
7756
|
-
var mediaKeyShort = key.slice(1);
|
|
7757
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key), {
|
|
7844
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} ".concat(key), {
|
|
7758
7845
|
key,
|
|
7759
7846
|
val,
|
|
7760
7847
|
props,
|
|
7761
7848
|
shouldDoClasses,
|
|
7762
7849
|
acceptsClassName,
|
|
7763
|
-
componentState
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
7850
|
+
componentState,
|
|
7851
|
+
mediaState: mediaState2
|
|
7852
|
+
}), shouldDoClasses) {
|
|
7767
7853
|
var mediaStyle = getSubStyle(styleState, key, val, !1);
|
|
7768
7854
|
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
7769
7855
|
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", usedKeys, !0);
|
|
@@ -7776,8 +7862,8 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7776
7862
|
for (var _iterator1 = mediaStyles[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
|
|
7777
7863
|
var style = _step1.value, out = (0, import_createMediaStyle.createMediaStyle)(style, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
7778
7864
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
7779
|
-
var fullKey1 = "".concat(style.
|
|
7780
|
-
fullKey1 in usedKeys || mergeClassName(transforms, classNames, fullKey1, out.
|
|
7865
|
+
var fullKey1 = "".concat(style[import_helpers.StyleObjectProperty]).concat(PROP_SPLIT).concat(mediaKeyShort).concat(style[import_helpers.StyleObjectPseudo] || "");
|
|
7866
|
+
fullKey1 in usedKeys || mergeClassName(transforms, classNames, fullKey1, out[import_helpers.StyleObjectIdentifier], !0, !0);
|
|
7781
7867
|
}
|
|
7782
7868
|
} catch (err) {
|
|
7783
7869
|
_didIteratorError1 = !0, _iteratorError1 = err;
|
|
@@ -7789,9 +7875,15 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7789
7875
|
}
|
|
7790
7876
|
}
|
|
7791
7877
|
} else {
|
|
7792
|
-
var
|
|
7793
|
-
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia
|
|
7794
|
-
|
|
7878
|
+
var isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
7879
|
+
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
|
|
7880
|
+
if (!mediaState2[mediaKeyShort]) {
|
|
7881
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u274C DISABLED ".concat(mediaKeyShort));
|
|
7882
|
+
continue;
|
|
7883
|
+
}
|
|
7884
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" \u{1F4FA} \u2705 ENABLED ".concat(mediaKeyShort));
|
|
7885
|
+
}
|
|
7886
|
+
var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
|
|
7795
7887
|
if (isThemeMedia) {
|
|
7796
7888
|
dynamicThemeAccess = !0;
|
|
7797
7889
|
var mediaThemeName = mediaKeyShort.slice(6);
|
|
@@ -7856,7 +7948,7 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7856
7948
|
}
|
|
7857
7949
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
7858
7950
|
if (!avoidNormalize) {
|
|
7859
|
-
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants.isWeb && !
|
|
7951
|
+
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), import_constants.isWeb && !isReactNative && (0, import_getStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
|
|
7860
7952
|
var _styleState2;
|
|
7861
7953
|
(_styleState2 = styleState).style || (_styleState2.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
|
|
7862
7954
|
var _param = _sliced_to_array(param, 1), a = _param[0], _param1 = _sliced_to_array(param1, 1), b = _param1[0];
|
|
@@ -7881,7 +7973,7 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7881
7973
|
if (!styleState.style.$$css) {
|
|
7882
7974
|
var atomic, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2;
|
|
7883
7975
|
try {
|
|
7884
|
-
for (var _iterator2, _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) var atomicStyle, _props_animateOnly, key4, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
7976
|
+
for (var _iterator2, _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) var atomicStyle, _props_animateOnly, _atomicStyle, key4, value, identifier1, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
7885
7977
|
} catch (err) {
|
|
7886
7978
|
} finally {
|
|
7887
7979
|
try {
|
|
@@ -7890,8 +7982,8 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7890
7982
|
}
|
|
7891
7983
|
}
|
|
7892
7984
|
if (transforms) for (var namespace in transforms) {
|
|
7893
|
-
var _transforms_namespace, hash, val3,
|
|
7894
|
-
if (import_constants.isClient && !insertedTransforms[
|
|
7985
|
+
var _transforms_namespace, hash, val3, identifier2;
|
|
7986
|
+
if (import_constants.isClient && !insertedTransforms[identifier2]) var rule;
|
|
7895
7987
|
}
|
|
7896
7988
|
}
|
|
7897
7989
|
if (!isReactNative && viewProps.tabIndex == null) var _viewProps_focusable, isFocusable, role;
|
|
@@ -7927,7 +8019,7 @@ current`, _object_spread2({}, styleState.style)));
|
|
|
7927
8019
|
dynamicThemeAccess,
|
|
7928
8020
|
pseudoGroups,
|
|
7929
8021
|
mediaGroups
|
|
7930
|
-
},
|
|
8022
|
+
}, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
7931
8023
|
if (!asChildExceptStyleLike) {
|
|
7932
8024
|
var style3 = styleState.style;
|
|
7933
8025
|
if (0) {
|
|
@@ -8807,7 +8899,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8807
8899
|
}
|
|
8808
8900
|
});
|
|
8809
8901
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8810
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require_index_native5(), import_constants = require_index_native3(), import_helpers = require_index_native4(), 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_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_themeable = require_themeable_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(), import_ThemeDebug = require_ThemeDebug_native()
|
|
8902
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require_index_native5(), import_constants = require_index_native3(), import_helpers = require_index_native4(), 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_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_themeable = require_themeable_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_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(), import_ThemeDebug = require_ThemeDebug_native();
|
|
8811
8903
|
function _array_like_to_array(arr, len) {
|
|
8812
8904
|
(len == null || len > arr.length) && (len = arr.length);
|
|
8813
8905
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -9128,20 +9220,22 @@ var require_createComponent_native = __commonJS({
|
|
|
9128
9220
|
}
|
|
9129
9221
|
}));
|
|
9130
9222
|
var cancelTouches, useComponentState = function(props, param, staticConfig, config) {
|
|
9131
|
-
var animationDriver = param.animationDriver, groups = param.groups, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(
|
|
9223
|
+
var animationDriver = param.animationDriver, groups = param.groups, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
9224
|
+
stateRef.current || (stateRef.current = {});
|
|
9225
|
+
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
9132
9226
|
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
9133
9227
|
return !!(next || curStateRef.hasAnimated);
|
|
9134
9228
|
}(), willBeAnimated = !import_constants.isServer && willBeAnimatedClient;
|
|
9135
9229
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
9136
9230
|
var presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationDriver == null ? void 0 : animationDriver.isReactNative);
|
|
9137
9231
|
process.env.NODE_ENV === "development" && time && time(_templateObject());
|
|
9138
|
-
var hasEnterState = hasEnterStyle || isEntering, didHydrateOnce = (0, import_useDidHydrateOnce.useDidHydrateOnce)(),
|
|
9232
|
+
var hasEnterState = hasEnterStyle || isEntering, didHydrateOnce = willBeAnimated ? (0, import_useDidHydrateOnce.useDidHydrateOnce)() : !0, shouldEnter = hasEnterState || !didHydrateOnce && hasRNAnimation, shouldEnterFromUnhydrated = import_constants.isWeb && !didHydrateOnce, initialState = shouldEnter ? (
|
|
9139
9233
|
// on the very first render we switch all spring animation drivers to css rendering
|
|
9140
9234
|
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
9141
9235
|
// without flickers of the wrong colors.
|
|
9142
9236
|
// but once we do that initial hydration and we are in client side rendering mode,
|
|
9143
9237
|
// we can avoid the extra re-render on mount
|
|
9144
|
-
|
|
9238
|
+
shouldEnterFromUnhydrated ? import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateShouldEnter
|
|
9145
9239
|
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
9146
9240
|
disabled != null && (initialState.disabled = disabled);
|
|
9147
9241
|
var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? _object_spread_props(_object_spread2({}, states[0]), _define_property2({}, props.forceStyle, !0)) : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
|
|
@@ -9325,7 +9419,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9325
9419
|
elementType = Component || elementType;
|
|
9326
9420
|
var isStringElement = typeof elementType == "string";
|
|
9327
9421
|
process.env.NODE_ENV === "development" && time && time(_templateObject8());
|
|
9328
|
-
var mediaState2 = (0, import_useMedia.useMedia)(stateRef, componentContext);
|
|
9422
|
+
var mediaState2 = (0, import_useMedia.useMedia)(stateRef, componentContext, debugProp);
|
|
9329
9423
|
(0, import_createVariable.setDidGetVariableValue)(!1), process.env.NODE_ENV === "development" && time && time(_templateObject9());
|
|
9330
9424
|
var resolveValues = (
|
|
9331
9425
|
// if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
|
|
@@ -9335,7 +9429,8 @@ var require_createComponent_native = __commonJS({
|
|
|
9335
9429
|
noClassNames,
|
|
9336
9430
|
resolveValues,
|
|
9337
9431
|
isExiting,
|
|
9338
|
-
isAnimated
|
|
9432
|
+
isAnimated,
|
|
9433
|
+
willBeAnimated
|
|
9339
9434
|
}, splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, (themeState == null || (_themeState_state = themeState.state) === null || _themeState_state === void 0 ? void 0 : _themeState_state.name) || "", state, styleProps, null, componentContext, elementType, debugProp);
|
|
9340
9435
|
if (props.group && props.untilMeasured === "hide" && !curStateRef.hasMeasured) {
|
|
9341
9436
|
var _splitStyles;
|
|
@@ -9343,9 +9438,9 @@ var require_createComponent_native = __commonJS({
|
|
|
9343
9438
|
}
|
|
9344
9439
|
process.env.NODE_ENV === "development" && time && time(_templateObject10()), curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
|
|
9345
9440
|
var isMediaArray = splitStyles.hasMedia && Array.isArray(splitStyles.hasMedia), shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || isMediaArray || noClassNames && splitStyles.hasMedia === !0, mediaListeningKeys = isMediaArray ? splitStyles.hasMedia : null;
|
|
9346
|
-
(0, import_useMedia.setMediaShouldUpdate)(stateRef, {
|
|
9441
|
+
process.env.NODE_ENV === "development" && debugProp && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(stateRef, {
|
|
9347
9442
|
enabled: shouldListenForMedia,
|
|
9348
|
-
|
|
9443
|
+
touched: mediaListeningKeys
|
|
9349
9444
|
});
|
|
9350
9445
|
var viewPropsIn = splitStyles.viewProps, pseudos = splitStyles.pseudos, splitStylesStyle = splitStyles.style, classNames = splitStyles.classNames, space = splitStyles.space, propsWithAnimation = props, asChild = viewPropsIn.asChild, children = viewPropsIn.children, themeShallow = viewPropsIn.themeShallow, _spaceDirection = viewPropsIn.spaceDirection, onPress = viewPropsIn.onPress, onLongPress = viewPropsIn.onLongPress, onPressIn = viewPropsIn.onPressIn, onPressOut = viewPropsIn.onPressOut, onHoverIn = viewPropsIn.onHoverIn, onHoverOut = viewPropsIn.onHoverOut, onMouseUp = viewPropsIn.onMouseUp, onMouseDown = viewPropsIn.onMouseDown, onMouseEnter = viewPropsIn.onMouseEnter, onMouseLeave = viewPropsIn.onMouseLeave, onFocus = viewPropsIn.onFocus, onBlur = viewPropsIn.onBlur, separator = viewPropsIn.separator, _forceStyle = viewPropsIn.forceStyle, onClick = viewPropsIn.onClick, _themeProp = viewPropsIn.theme, defaultVariants = viewPropsIn.defaultVariants, nonTamaguiProps = _object_without_properties(viewPropsIn, [
|
|
9351
9446
|
"asChild",
|
|
@@ -9575,14 +9670,14 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9575
9670
|
children: [
|
|
9576
9671
|
content,
|
|
9577
9672
|
/* lets see if we can put a single style tag per rule for optimal de-duping */
|
|
9578
|
-
splitStyles.rulesToInsert.map(function(
|
|
9579
|
-
var
|
|
9673
|
+
splitStyles.rulesToInsert.map(function(styleObject) {
|
|
9674
|
+
var identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
9580
9675
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", {
|
|
9581
9676
|
// @ts-ignore
|
|
9582
9677
|
href: "t_".concat(identifier),
|
|
9583
9678
|
// @ts-ignore
|
|
9584
9679
|
precedence: "default",
|
|
9585
|
-
children:
|
|
9680
|
+
children: styleObject[import_helpers.StyleObjectRules].join(`
|
|
9586
9681
|
`)
|
|
9587
9682
|
}, identifier);
|
|
9588
9683
|
})
|