@tamagui/core 1.75.5 → 1.75.7
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 +121 -113
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +120 -105
- package/dist/test.native.js.map +3 -3
- package/package.json +6 -6
package/dist/test.native.js
CHANGED
|
@@ -2313,65 +2313,6 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
2313
2313
|
}
|
|
2314
2314
|
});
|
|
2315
2315
|
|
|
2316
|
-
// ../web/dist/cjs/helpers/expandStyle.native.js
|
|
2317
|
-
var require_expandStyle_native = __commonJS({
|
|
2318
|
-
"../web/dist/cjs/helpers/expandStyle.native.js"(exports, module2) {
|
|
2319
|
-
"use strict";
|
|
2320
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all2) => {
|
|
2321
|
-
for (var name in all2)
|
|
2322
|
-
__defProp2(target, name, { get: all2[name], enumerable: !0 });
|
|
2323
|
-
}, __copyProps2 = (to, from, except, desc) => {
|
|
2324
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
2325
|
-
for (let key of __getOwnPropNames2(from))
|
|
2326
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2327
|
-
return to;
|
|
2328
|
-
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStyle_exports = {};
|
|
2329
|
-
__export2(expandStyle_exports, {
|
|
2330
|
-
expandStyle: () => expandStyle
|
|
2331
|
-
});
|
|
2332
|
-
module2.exports = __toCommonJS2(expandStyle_exports);
|
|
2333
|
-
var import_constants2 = require_index_native2();
|
|
2334
|
-
function expandStyle(key, value) {
|
|
2335
|
-
if (!1)
|
|
2336
|
-
switch (key) {
|
|
2337
|
-
case "textAlignVertical":
|
|
2338
|
-
case "writingDirection":
|
|
2339
|
-
}
|
|
2340
|
-
if (import_constants2.isAndroid && key === "elevationAndroid")
|
|
2341
|
-
return [["elevation", value]];
|
|
2342
|
-
if (key in EXPANSIONS)
|
|
2343
|
-
return EXPANSIONS[key].map((key2) => [key2, value]);
|
|
2344
|
-
}
|
|
2345
|
-
var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], xy = ["X", "Y"], EXPANSIONS = {
|
|
2346
|
-
borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
|
|
2347
|
-
borderRadius: [
|
|
2348
|
-
"TopLeftRadius",
|
|
2349
|
-
"TopRightRadius",
|
|
2350
|
-
"BottomRightRadius",
|
|
2351
|
-
"BottomLeftRadius"
|
|
2352
|
-
],
|
|
2353
|
-
borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
|
|
2354
|
-
margin: all,
|
|
2355
|
-
marginHorizontal: horiz,
|
|
2356
|
-
marginVertical: vert,
|
|
2357
|
-
overscrollBehavior: xy,
|
|
2358
|
-
padding: all,
|
|
2359
|
-
paddingHorizontal: horiz,
|
|
2360
|
-
paddingVertical: vert,
|
|
2361
|
-
...import_constants2.isWeb && {
|
|
2362
|
-
// react-native only supports borderStyle
|
|
2363
|
-
borderStyle: ["TopStyle", "RightStyle", "BottomStyle", "LeftStyle"],
|
|
2364
|
-
// react-native doesn't support X / Y
|
|
2365
|
-
overflow: xy
|
|
2366
|
-
}
|
|
2367
|
-
}, _a;
|
|
2368
|
-
for (let parent in EXPANSIONS) {
|
|
2369
|
-
let prefix = parent.slice(0, ((_a = /[A-Z]/.exec(parent)) == null ? void 0 : _a.index) ?? parent.length);
|
|
2370
|
-
EXPANSIONS[parent] = EXPANSIONS[parent].map((k) => `${prefix}${k}`);
|
|
2371
|
-
}
|
|
2372
|
-
}
|
|
2373
|
-
});
|
|
2374
|
-
|
|
2375
2316
|
// ../../node_modules/@react-native/normalize-color/index.js
|
|
2376
2317
|
var require_normalize_color = __commonJS({
|
|
2377
2318
|
"../../node_modules/@react-native/normalize-color/index.js"(exports, module2) {
|
|
@@ -3002,26 +2943,10 @@ var require_expandStyles_native = __commonJS({
|
|
|
3002
2943
|
return to;
|
|
3003
2944
|
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStyles_exports = {};
|
|
3004
2945
|
__export2(expandStyles_exports, {
|
|
3005
|
-
expandStylesAndRemoveNullishValues: () => expandStylesAndRemoveNullishValues,
|
|
3006
2946
|
fixStyles: () => fixStyles
|
|
3007
2947
|
});
|
|
3008
2948
|
module2.exports = __toCommonJS2(expandStyles_exports);
|
|
3009
|
-
var import_constants2 = require_index_native2(),
|
|
3010
|
-
function expandStylesAndRemoveNullishValues(style) {
|
|
3011
|
-
let res = {};
|
|
3012
|
-
for (let key in style) {
|
|
3013
|
-
let valIn = style[key];
|
|
3014
|
-
if (valIn == null)
|
|
3015
|
-
continue;
|
|
3016
|
-
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
3017
|
-
res[key] = expandStylesAndRemoveNullishValues(valIn);
|
|
3018
|
-
continue;
|
|
3019
|
-
}
|
|
3020
|
-
let val = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(valIn, key), out = (0, import_expandStyle.expandStyle)(key, val);
|
|
3021
|
-
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = val;
|
|
3022
|
-
}
|
|
3023
|
-
return fixStyles(res), res;
|
|
3024
|
-
}
|
|
2949
|
+
var import_constants2 = require_index_native2(), import_normalizeShadow = require_normalizeShadow_native();
|
|
3025
2950
|
function fixStyles(style) {
|
|
3026
2951
|
"elevationAndroid" in style && (style.elevation = style.elevationAndroid, delete style.elevationAndroid), (style.shadowRadius || style.shadowColor || style.shadowOpacity || style.shadowOffset) && Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
3027
2952
|
for (let key in borderDefaults)
|
|
@@ -3063,6 +2988,101 @@ var require_getStylesAtomic_native = __commonJS({
|
|
|
3063
2988
|
}
|
|
3064
2989
|
});
|
|
3065
2990
|
|
|
2991
|
+
// ../web/dist/cjs/helpers/expandStyle.native.js
|
|
2992
|
+
var require_expandStyle_native = __commonJS({
|
|
2993
|
+
"../web/dist/cjs/helpers/expandStyle.native.js"(exports, module2) {
|
|
2994
|
+
"use strict";
|
|
2995
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all2) => {
|
|
2996
|
+
for (var name in all2)
|
|
2997
|
+
__defProp2(target, name, { get: all2[name], enumerable: !0 });
|
|
2998
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
2999
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
3000
|
+
for (let key of __getOwnPropNames2(from))
|
|
3001
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
3002
|
+
return to;
|
|
3003
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStyle_exports = {};
|
|
3004
|
+
__export2(expandStyle_exports, {
|
|
3005
|
+
expandStyle: () => expandStyle
|
|
3006
|
+
});
|
|
3007
|
+
module2.exports = __toCommonJS2(expandStyle_exports);
|
|
3008
|
+
var import_constants2 = require_index_native2();
|
|
3009
|
+
function expandStyle(key, value) {
|
|
3010
|
+
if (!1)
|
|
3011
|
+
switch (key) {
|
|
3012
|
+
case "textAlignVertical":
|
|
3013
|
+
case "writingDirection":
|
|
3014
|
+
}
|
|
3015
|
+
if (import_constants2.isAndroid && key === "elevationAndroid")
|
|
3016
|
+
return [["elevation", value]];
|
|
3017
|
+
if (key in EXPANSIONS)
|
|
3018
|
+
return EXPANSIONS[key].map((key2) => [key2, value]);
|
|
3019
|
+
}
|
|
3020
|
+
var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], xy = ["X", "Y"], EXPANSIONS = {
|
|
3021
|
+
borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
|
|
3022
|
+
borderRadius: [
|
|
3023
|
+
"TopLeftRadius",
|
|
3024
|
+
"TopRightRadius",
|
|
3025
|
+
"BottomRightRadius",
|
|
3026
|
+
"BottomLeftRadius"
|
|
3027
|
+
],
|
|
3028
|
+
borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
|
|
3029
|
+
margin: all,
|
|
3030
|
+
marginHorizontal: horiz,
|
|
3031
|
+
marginVertical: vert,
|
|
3032
|
+
overscrollBehavior: xy,
|
|
3033
|
+
padding: all,
|
|
3034
|
+
paddingHorizontal: horiz,
|
|
3035
|
+
paddingVertical: vert,
|
|
3036
|
+
...import_constants2.isWeb && {
|
|
3037
|
+
// react-native only supports borderStyle
|
|
3038
|
+
borderStyle: ["TopStyle", "RightStyle", "BottomStyle", "LeftStyle"],
|
|
3039
|
+
// react-native doesn't support X / Y
|
|
3040
|
+
overflow: xy
|
|
3041
|
+
}
|
|
3042
|
+
}, _a;
|
|
3043
|
+
for (let parent in EXPANSIONS) {
|
|
3044
|
+
let prefix = parent.slice(0, ((_a = /[A-Z]/.exec(parent)) == null ? void 0 : _a.index) ?? parent.length);
|
|
3045
|
+
EXPANSIONS[parent] = EXPANSIONS[parent].map((k) => `${prefix}${k}`);
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
});
|
|
3049
|
+
|
|
3050
|
+
// ../web/dist/cjs/helpers/expandStylesAndRemoveNullishValues.native.js
|
|
3051
|
+
var require_expandStylesAndRemoveNullishValues_native = __commonJS({
|
|
3052
|
+
"../web/dist/cjs/helpers/expandStylesAndRemoveNullishValues.native.js"(exports, module2) {
|
|
3053
|
+
"use strict";
|
|
3054
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
3055
|
+
for (var name in all)
|
|
3056
|
+
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
3057
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
3058
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
3059
|
+
for (let key of __getOwnPropNames2(from))
|
|
3060
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
3061
|
+
return to;
|
|
3062
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStylesAndRemoveNullishValues_exports = {};
|
|
3063
|
+
__export2(expandStylesAndRemoveNullishValues_exports, {
|
|
3064
|
+
expandStylesAndRemoveNullishValues: () => expandStylesAndRemoveNullishValues
|
|
3065
|
+
});
|
|
3066
|
+
module2.exports = __toCommonJS2(expandStylesAndRemoveNullishValues_exports);
|
|
3067
|
+
var import_expandStyle = require_expandStyle_native(), import_expandStyles = require_expandStyles_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_pseudoDescriptors = require_pseudoDescriptors_native();
|
|
3068
|
+
function expandStylesAndRemoveNullishValues(style, disableNormalize = !1) {
|
|
3069
|
+
let res = {};
|
|
3070
|
+
for (let key in style) {
|
|
3071
|
+
let prop = style[key];
|
|
3072
|
+
if (prop == null)
|
|
3073
|
+
continue;
|
|
3074
|
+
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
3075
|
+
res[key] = expandStylesAndRemoveNullishValues(prop, disableNormalize);
|
|
3076
|
+
continue;
|
|
3077
|
+
}
|
|
3078
|
+
let value = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key), out = (0, import_expandStyle.expandStyle)(key, value);
|
|
3079
|
+
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value;
|
|
3080
|
+
}
|
|
3081
|
+
return (0, import_expandStyles.fixStyles)(res), res;
|
|
3082
|
+
}
|
|
3083
|
+
}
|
|
3084
|
+
});
|
|
3085
|
+
|
|
3066
3086
|
// ../web/dist/cjs/helpers/getVariantExtras.native.js
|
|
3067
3087
|
var require_getVariantExtras_native = __commonJS({
|
|
3068
3088
|
"../web/dist/cjs/helpers/getVariantExtras.native.js"(exports, module2) {
|
|
@@ -3169,7 +3189,7 @@ var require_propMapper_native = __commonJS({
|
|
|
3169
3189
|
propMapper: () => propMapper
|
|
3170
3190
|
});
|
|
3171
3191
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
3172
|
-
var import_constants2 = require_index_native2(), import_helpers = require_index_native4(), import_config = require_config_native(), import_isDevTools = require_isDevTools_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(),
|
|
3192
|
+
var import_constants2 = require_index_native2(), import_helpers = require_index_native4(), import_config = require_config_native(), import_isDevTools = require_isDevTools_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_expandStylesAndRemoveNullishValues = require_expandStylesAndRemoveNullishValues_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
3173
3193
|
if (!import_constants2.isAndroid && key === "elevationAndroid")
|
|
3174
3194
|
return;
|
|
3175
3195
|
let subProps = styleStateIn.styleProps.fallbackProps || subPropsIn, styleState = subProps ? new Proxy(styleStateIn, {
|
|
@@ -3216,7 +3236,10 @@ var require_propMapper_native = __commonJS({
|
|
|
3216
3236
|
);
|
|
3217
3237
|
}
|
|
3218
3238
|
if (variantValue) {
|
|
3219
|
-
let expanded = (0,
|
|
3239
|
+
let expanded = (0, import_expandStylesAndRemoveNullishValues.expandStylesAndRemoveNullishValues)(
|
|
3240
|
+
variantValue,
|
|
3241
|
+
!!styleProps.noNormalize
|
|
3242
|
+
), next = Object.entries(expanded);
|
|
3220
3243
|
return fontFamilyResult && fontFamilyResult[0] === "$" && fontFamilyCache.set(next, (0, import_createVariable.getVariableValue)(fontFamilyResult)), next;
|
|
3221
3244
|
}
|
|
3222
3245
|
};
|
|
@@ -3370,7 +3393,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3370
3393
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
3371
3394
|
var import_constants2 = require_index_native2(), import_helpers = require_index_native4(), import_react3 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), fontFamilyKey = "fontFamily", IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-", getSplitStyles = (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) => {
|
|
3372
3395
|
var _a, _b, _c, _e, _f, _g;
|
|
3373
|
-
conf = conf || (0, import_config.getConfig)();
|
|
3396
|
+
conf = conf || (0, import_config.getConfig)(), import_constants2.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
3374
3397
|
let { shorthands } = conf, {
|
|
3375
3398
|
isHOC,
|
|
3376
3399
|
isText,
|
|
@@ -3432,7 +3455,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3432
3455
|
continue;
|
|
3433
3456
|
}
|
|
3434
3457
|
if (keyInit[0] === "_" && keyInit.startsWith("_style")) {
|
|
3435
|
-
|
|
3458
|
+
mergeStylePropIntoStyle(styleState, valInit);
|
|
3436
3459
|
continue;
|
|
3437
3460
|
}
|
|
3438
3461
|
if (!1 && !(keyInit in accessibilityDirectMap))
|
|
@@ -3625,7 +3648,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3625
3648
|
}
|
|
3626
3649
|
}
|
|
3627
3650
|
}
|
|
3628
|
-
if (props.style &&
|
|
3651
|
+
if (props.style && mergeStylePropIntoStyle(styleState, props.style), styleProps.noNormalize !== !1 && ((0, import_expandStyles.fixStyles)(style), import_constants2.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(style), styleState.transforms && Object.entries(styleState.transforms).sort(([a], [b]) => a.localeCompare(b)).forEach(([key, val]) => {
|
|
3629
3652
|
mergeTransform(style, key, val, !0);
|
|
3630
3653
|
}), parentSplitStyles && !shouldDoClasses))
|
|
3631
3654
|
for (let key in parentSplitStyles.style)
|
|
@@ -3657,14 +3680,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3657
3680
|
}
|
|
3658
3681
|
return result;
|
|
3659
3682
|
};
|
|
3660
|
-
function mergeStyle(styleState, key, val) {
|
|
3683
|
+
function mergeStyle(styleState, key, val, disableNormalize = !1) {
|
|
3661
3684
|
let { classNames, viewProps, style, usedKeys, styleProps } = styleState;
|
|
3662
3685
|
if (import_constants2.isWeb && (val == null ? void 0 : val[0]) === "_")
|
|
3663
3686
|
classNames[key] = val, usedKeys[key] ||= 1;
|
|
3664
3687
|
else if (key in import_helpers.stylePropsTransform)
|
|
3665
3688
|
styleState.transforms ||= {}, styleState.transforms[key] = val;
|
|
3666
3689
|
else {
|
|
3667
|
-
let out = import_constants2.isWeb && !styleProps.noNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
3690
|
+
let out = import_constants2.isWeb && !disableNormalize && !styleProps.noNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
3668
3691
|
key in import_helpers.validStylesOnBaseProps ? viewProps[key] = out : style[key] = out;
|
|
3669
3692
|
}
|
|
3670
3693
|
}
|
|
@@ -3680,17 +3703,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3680
3703
|
}
|
|
3681
3704
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
3682
3705
|
};
|
|
3683
|
-
function
|
|
3684
|
-
if (
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
Object.assign(styleState.classNames, cur);
|
|
3691
|
-
else
|
|
3692
|
-
for (let key in cur)
|
|
3693
|
-
key in styleState.usedKeys || mergeStyle(styleState, key, cur[key]);
|
|
3706
|
+
function mergeStylePropIntoStyle(styleState, cur) {
|
|
3707
|
+
if (cur)
|
|
3708
|
+
if (cur.$$css)
|
|
3709
|
+
Object.assign(styleState.classNames, cur);
|
|
3710
|
+
else
|
|
3711
|
+
for (let key in cur)
|
|
3712
|
+
key in styleState.usedKeys || mergeStyle(styleState, key, cur[key]);
|
|
3694
3713
|
}
|
|
3695
3714
|
var useInsertEffectCompat = import_constants2.isWeb ? import_react3.useInsertionEffect || import_constants2.useIsomorphicLayoutEffect : () => {
|
|
3696
3715
|
}, useSplitStyles = (...args) => {
|
|
@@ -3895,9 +3914,7 @@ var require_ThemeManager_native = __commonJS({
|
|
|
3895
3914
|
return this.updateState(nextState, shouldNotify), nextState;
|
|
3896
3915
|
}
|
|
3897
3916
|
updateState(nextState, shouldNotify = !0) {
|
|
3898
|
-
this.state = nextState, this._allKeys = null, this._numChangeEventsSent ??= 0, this._numChangeEventsSent++, shouldNotify &&
|
|
3899
|
-
this.notify();
|
|
3900
|
-
});
|
|
3917
|
+
this.state = nextState, this._allKeys = null, this._numChangeEventsSent ??= 0, this._numChangeEventsSent++, shouldNotify && this.notify();
|
|
3901
3918
|
}
|
|
3902
3919
|
getStateIfChanged(props = this.props, state = this.state, parentManager = this.parentManager) {
|
|
3903
3920
|
let _ = this.getState(props, parentManager);
|
|
@@ -3944,7 +3961,7 @@ var require_ThemeManager_native = __commonJS({
|
|
|
3944
3961
|
let nextName = props.reset ? baseName : props.name || "", allComponentThemes = componentManagers.map((x) => (x == null ? void 0 : x.state.name) || "");
|
|
3945
3962
|
isDirectParentAComponentTheme && allComponentThemes.shift();
|
|
3946
3963
|
let base = baseName.split(import_constants22.THEME_NAME_SEPARATOR), max = base.length, min = props.componentName && !nextName ? max : 0;
|
|
3947
|
-
typeof props.debug == "string" && (console.groupCollapsed("ThemeManager.getState()"), console.info({ props, baseName, base, min, max }));
|
|
3964
|
+
typeof props.debug == "string" && typeof window < "u" && (console.groupCollapsed("ThemeManager.getState()"), console.info({ props, baseName, base, min, max }));
|
|
3948
3965
|
for (let i = max; i >= min; i--) {
|
|
3949
3966
|
let prefix = base.slice(0, i).join(import_constants22.THEME_NAME_SEPARATOR);
|
|
3950
3967
|
props.inverse && (prefix = inverseThemeName(prefix));
|
|
@@ -4124,9 +4141,9 @@ var require_useTheme_native = __commonJS({
|
|
|
4124
4141
|
let cur = manager;
|
|
4125
4142
|
for (; cur; ) {
|
|
4126
4143
|
if (!cur.parentManager)
|
|
4127
|
-
return !0;
|
|
4128
|
-
if (cur.parentManager.state.scheme !== cur.state.scheme)
|
|
4129
4144
|
return !1;
|
|
4145
|
+
if (cur.parentManager.state.scheme !== cur.state.scheme)
|
|
4146
|
+
return !0;
|
|
4130
4147
|
cur = cur.parentManager;
|
|
4131
4148
|
}
|
|
4132
4149
|
}
|
|
@@ -4846,11 +4863,8 @@ var require_createComponent_native = __commonJS({
|
|
|
4846
4863
|
}
|
|
4847
4864
|
function styleable(Component2, options) {
|
|
4848
4865
|
var _a2;
|
|
4849
|
-
let
|
|
4850
|
-
|
|
4851
|
-
(0, import_react3.memo)((0, import_react3.forwardRef)(Component2))
|
|
4852
|
-
), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig), out = options != null && options.disableTheme ? ComponentForwardedRef : (0, import_themeable.themeable)(ComponentForwardedRef, extendedConfig);
|
|
4853
|
-
return out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
4866
|
+
let out = ((_a2 = Component2.render) == null ? void 0 : _a2.length) === 2 ? Component2 : (0, import_react3.forwardRef)(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
|
|
4867
|
+
return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = (0, import_react3.memo)(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
4854
4868
|
}
|
|
4855
4869
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
4856
4870
|
}
|
|
@@ -6327,6 +6341,7 @@ var require_index_native9 = __commonJS({
|
|
|
6327
6341
|
__reExport2(src_exports2, require_ComponentContext_native(), module2.exports);
|
|
6328
6342
|
__reExport2(src_exports2, require_createStyledContext_native(), module2.exports);
|
|
6329
6343
|
__reExport2(src_exports2, require_expandStyles_native(), module2.exports);
|
|
6344
|
+
__reExport2(src_exports2, require_expandStylesAndRemoveNullishValues_native(), module2.exports);
|
|
6330
6345
|
__reExport2(src_exports2, require_propMapper_native(), module2.exports);
|
|
6331
6346
|
__reExport2(src_exports2, require_getExpandedShorthands_native(), module2.exports);
|
|
6332
6347
|
__reExport2(src_exports2, require_getSplitStyles_native(), module2.exports);
|