@tamagui/core 1.88.18 → 1.88.20
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/cjs/index.js +8 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/index.js +9 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/native.js +270 -237
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +241 -207
- package/dist/test.native.js.map +3 -3
- package/package.json +6 -6
- package/src/index.tsx +9 -6
- package/types/index.d.ts.map +1 -1
package/dist/test.native.js
CHANGED
|
@@ -2500,6 +2500,55 @@ var require_defaultComponentState_native = __commonJS({
|
|
|
2500
2500
|
}
|
|
2501
2501
|
});
|
|
2502
2502
|
|
|
2503
|
+
// ../web/dist/cjs/helpers/skipProps.native.js
|
|
2504
|
+
var require_skipProps_native = __commonJS({
|
|
2505
|
+
"../web/dist/cjs/helpers/skipProps.native.js"(exports2, module2) {
|
|
2506
|
+
"use strict";
|
|
2507
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
2508
|
+
for (var name in all)
|
|
2509
|
+
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
2510
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
2511
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
2512
|
+
for (let key of __getOwnPropNames2(from))
|
|
2513
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2514
|
+
return to;
|
|
2515
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), skipProps_exports = {};
|
|
2516
|
+
__export2(skipProps_exports, {
|
|
2517
|
+
skipProps: () => skipProps
|
|
2518
|
+
});
|
|
2519
|
+
module2.exports = __toCommonJS2(skipProps_exports);
|
|
2520
|
+
var skipProps = {
|
|
2521
|
+
untilMeasured: 1,
|
|
2522
|
+
animation: 1,
|
|
2523
|
+
space: 1,
|
|
2524
|
+
animateOnly: 1,
|
|
2525
|
+
disableClassName: 1,
|
|
2526
|
+
debug: 1,
|
|
2527
|
+
componentName: 1,
|
|
2528
|
+
disableOptimization: 1,
|
|
2529
|
+
tag: 1,
|
|
2530
|
+
style: 1,
|
|
2531
|
+
// handled after loop so pseudos set usedKeys and override it if necessary
|
|
2532
|
+
group: 1
|
|
2533
|
+
};
|
|
2534
|
+
skipProps["data-test-renders"] = 1;
|
|
2535
|
+
Object.assign(skipProps, {
|
|
2536
|
+
whiteSpace: 1,
|
|
2537
|
+
wordWrap: 1,
|
|
2538
|
+
textOverflow: 1,
|
|
2539
|
+
textDecorationDistance: 1,
|
|
2540
|
+
cursor: 1,
|
|
2541
|
+
contain: 1,
|
|
2542
|
+
boxSizing: 1,
|
|
2543
|
+
boxShadow: 1,
|
|
2544
|
+
outlineStyle: 1,
|
|
2545
|
+
outlineOffset: 1,
|
|
2546
|
+
outlineWidth: 1,
|
|
2547
|
+
outlineColor: 1
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2550
|
+
});
|
|
2551
|
+
|
|
2503
2552
|
// ../web/dist/cjs/constants/accessibilityDirectMap.native.js
|
|
2504
2553
|
var require_accessibilityDirectMap_native = __commonJS({
|
|
2505
2554
|
"../web/dist/cjs/constants/accessibilityDirectMap.native.js"(exports2, module2) {
|
|
@@ -3592,7 +3641,7 @@ var require_propMapper_native = __commonJS({
|
|
|
3592
3641
|
propMapper: () => propMapper
|
|
3593
3642
|
});
|
|
3594
3643
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
3595
|
-
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
3644
|
+
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
3596
3645
|
var _a;
|
|
3597
3646
|
if (lastFontFamilyToken = null, !import_constants.isAndroid && key === "elevationAndroid")
|
|
3598
3647
|
return;
|
|
@@ -3673,37 +3722,39 @@ var require_propMapper_native = __commonJS({
|
|
|
3673
3722
|
let { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
3674
3723
|
for (let _key in value) {
|
|
3675
3724
|
let subKey = conf.shorthands[_key] || _key, val = value[_key];
|
|
3676
|
-
if (styleProps.
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
if (
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3725
|
+
if (!(!styleProps.noSkip && subKey in import_skipProps.skipProps)) {
|
|
3726
|
+
if (styleProps.noExpand)
|
|
3727
|
+
res[subKey] = val;
|
|
3728
|
+
else if (variants && subKey in variants) {
|
|
3729
|
+
if (styleState.curProps[subKey] = val, parentVariantKey && parentVariantKey === key)
|
|
3730
|
+
res[subKey] = // SYNC WITH *1
|
|
3731
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;
|
|
3732
|
+
else {
|
|
3733
|
+
let variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
|
|
3734
|
+
if (variantOut)
|
|
3735
|
+
for (let [key2, val2] of variantOut)
|
|
3736
|
+
val2 != null && (key2 in import_pseudoDescriptors.pseudoDescriptors ? (res[key2] ?? (res[key2] = {}), Object.assign(res[key2], val2)) : res[key2] = val2);
|
|
3737
|
+
}
|
|
3738
|
+
continue;
|
|
3687
3739
|
}
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3740
|
+
if ((0, import_createVariable.isVariable)(val)) {
|
|
3741
|
+
res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);
|
|
3742
|
+
continue;
|
|
3743
|
+
}
|
|
3744
|
+
if (typeof val == "string") {
|
|
3745
|
+
let fVal = (
|
|
3746
|
+
// SYNC WITH *1
|
|
3747
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val
|
|
3748
|
+
);
|
|
3749
|
+
res[subKey] = fVal;
|
|
3750
|
+
continue;
|
|
3751
|
+
}
|
|
3752
|
+
if ((0, import_isObj.isObj)(val)) {
|
|
3753
|
+
let subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
|
|
3754
|
+
res[subKey] ?? (res[subKey] = {}), Object.assign(res[subKey], subObject);
|
|
3755
|
+
} else
|
|
3756
|
+
res[subKey] = val;
|
|
3701
3757
|
}
|
|
3702
|
-
if ((0, import_isObj.isObj)(val)) {
|
|
3703
|
-
let subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
|
|
3704
|
-
res[subKey] ?? (res[subKey] = {}), Object.assign(res[subKey], subObject);
|
|
3705
|
-
} else
|
|
3706
|
-
res[subKey] = val;
|
|
3707
3758
|
}
|
|
3708
3759
|
return res;
|
|
3709
3760
|
}, tokenCats = ["size", "color", "radius", "space", "zIndex"].map((name) => ({
|
|
@@ -3810,7 +3861,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3810
3861
|
useSplitStyles: () => useSplitStyles
|
|
3811
3862
|
});
|
|
3812
3863
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
3813
|
-
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_react3 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = require_constants_native2(), 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_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_isObj = require_isObj_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
|
|
3864
|
+
var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_react3 = require("react"), import_config = require_config_native(), import_skipProps = require_skipProps_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = require_constants_native2(), 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_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_isObj = require_isObj_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
|
|
3814
3865
|
function isValidStyleKey(key, staticConfig) {
|
|
3815
3866
|
var _a;
|
|
3816
3867
|
return (staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles))[key] || ((_a = staticConfig.acceptTokens) == null ? void 0 : _a[key]);
|
|
@@ -3845,7 +3896,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3845
3896
|
};
|
|
3846
3897
|
for (let keyOg in props) {
|
|
3847
3898
|
let keyInit = keyOg, valInit = props[keyOg];
|
|
3848
|
-
if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in skipProps && !styleProps.noSkip && !isHOC)
|
|
3899
|
+
if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in import_skipProps.skipProps && !styleProps.noSkip && !isHOC)
|
|
3849
3900
|
continue;
|
|
3850
3901
|
let valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
3851
3902
|
if (valInit !== props[keyInit] && (styleState.curProps[keyInit] = valInit), !isValidStyleKeyInit) {
|
|
@@ -3903,178 +3954,188 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3903
3954
|
if (isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))
|
|
3904
3955
|
continue;
|
|
3905
3956
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
3906
|
-
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps));
|
|
3907
|
-
if ((shouldPassProp || isHOCShouldPassThrough) && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in skipProps)
|
|
3957
|
+
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in import_skipProps.skipProps));
|
|
3958
|
+
if ((shouldPassProp || isHOCShouldPassThrough) && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in import_skipProps.skipProps)
|
|
3908
3959
|
continue;
|
|
3909
3960
|
if ((isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit), isValidStyleKeyInit && !variants && valInit !== "unset" && (valInitType === "number" || valInitType === "string" && valInit[0] !== "$")) {
|
|
3910
3961
|
style[keyInit] = valInit;
|
|
3911
3962
|
continue;
|
|
3912
3963
|
}
|
|
3913
|
-
let
|
|
3914
|
-
if (
|
|
3964
|
+
let avoidPropMap = isMediaOrPseudo || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
|
|
3965
|
+
if (!avoidPropMap) {
|
|
3966
|
+
if (!expanded)
|
|
3967
|
+
continue;
|
|
3968
|
+
let next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
3969
|
+
next && (styleState.fontFamily = next);
|
|
3970
|
+
}
|
|
3971
|
+
if (0)
|
|
3915
3972
|
try {
|
|
3916
3973
|
} catch {
|
|
3917
3974
|
}
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3975
|
+
let key = keyInit, val = valInit, max = expanded ? expanded.length : 1;
|
|
3976
|
+
for (let i = 0; i < max; i++) {
|
|
3977
|
+
if (expanded) {
|
|
3978
|
+
let [k, v] = expanded[i];
|
|
3979
|
+
key = k, val = v;
|
|
3980
|
+
}
|
|
3981
|
+
if (!(val == null || key in usedKeys)) {
|
|
3982
|
+
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants && key in variants, (inlineProps != null && inlineProps.has(key) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) && (viewProps[key] = props[key] ?? val), styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || ((_b = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _b[keyInit]))) {
|
|
3983
|
+
passDownProp(viewProps, key, val, isMediaOrPseudo);
|
|
3984
|
+
continue;
|
|
3985
|
+
}
|
|
3986
|
+
if (isPseudo) {
|
|
3987
|
+
if (!val)
|
|
3988
|
+
continue;
|
|
3989
|
+
let pseudoStyleObject = getSubStyle(
|
|
3990
|
+
styleState,
|
|
3991
|
+
key,
|
|
3992
|
+
val,
|
|
3993
|
+
styleProps.noClassNames
|
|
3994
|
+
), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
3995
|
+
if (!descriptor)
|
|
3996
|
+
continue;
|
|
3997
|
+
if ((!shouldDoClasses || IS_STATIC) && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), IS_STATIC)) {
|
|
3998
|
+
Object.assign(pseudos[key], pseudoStyleObject);
|
|
3923
3999
|
continue;
|
|
3924
4000
|
}
|
|
3925
|
-
if (
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
for (let psuedoStyle of pseudoStyles)
|
|
3943
|
-
`${psuedoStyle.property}${PROP_SPLIT}${descriptor.name}` in usedKeys || psuedoStyle.identifier;
|
|
3944
|
-
}
|
|
3945
|
-
if (!shouldDoClasses || isExit || isEnter) {
|
|
3946
|
-
let descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
3947
|
-
isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted);
|
|
3948
|
-
let importance = descriptor.priority;
|
|
3949
|
-
for (let pkey in pseudoStyleObject) {
|
|
3950
|
-
let val2 = pseudoStyleObject[pkey];
|
|
3951
|
-
if (isDisabled) {
|
|
3952
|
-
let defaultValues = animatableDefaults[pkey];
|
|
3953
|
-
defaultValues != null && !(pkey in usedKeys) && !(pkey in styleState.style) && mergeStyle(styleState, pkey, defaultValues);
|
|
3954
|
-
} else {
|
|
3955
|
-
let curImportance = usedKeys[pkey] || 0;
|
|
3956
|
-
importance >= curImportance && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), pseudos[key][pkey] = val2, mergeStyle(styleState, pkey, val2));
|
|
3957
|
-
}
|
|
4001
|
+
if (shouldDoClasses && !isExit) {
|
|
4002
|
+
let pseudoStyles = (0, import_getStylesAtomic.generateAtomicStyles)(pseudoStyleObject, descriptor);
|
|
4003
|
+
for (let psuedoStyle of pseudoStyles)
|
|
4004
|
+
`${psuedoStyle.property}${PROP_SPLIT}${descriptor.name}` in usedKeys || psuedoStyle.identifier;
|
|
4005
|
+
}
|
|
4006
|
+
if (!shouldDoClasses || isExit || isEnter) {
|
|
4007
|
+
let descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
4008
|
+
isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted);
|
|
4009
|
+
let importance = descriptor.priority;
|
|
4010
|
+
for (let pkey in pseudoStyleObject) {
|
|
4011
|
+
let val2 = pseudoStyleObject[pkey];
|
|
4012
|
+
if (isDisabled) {
|
|
4013
|
+
let defaultValues = animatableDefaults[pkey];
|
|
4014
|
+
defaultValues != null && !(pkey in usedKeys) && !(pkey in styleState.style) && mergeStyle(styleState, pkey, defaultValues);
|
|
4015
|
+
} else {
|
|
4016
|
+
let curImportance = usedKeys[pkey] || 0;
|
|
4017
|
+
importance >= curImportance && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), pseudos[key][pkey] = val2, mergeStyle(styleState, pkey, val2));
|
|
3958
4018
|
}
|
|
3959
|
-
if (!isDisabled)
|
|
3960
|
-
for (let key2 in val) {
|
|
3961
|
-
let k = shorthands[key2] || key2;
|
|
3962
|
-
usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
|
|
3963
|
-
}
|
|
3964
4019
|
}
|
|
4020
|
+
if (!isDisabled)
|
|
4021
|
+
for (let key2 in val) {
|
|
4022
|
+
let k = shorthands[key2] || key2;
|
|
4023
|
+
usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
|
|
4024
|
+
}
|
|
4025
|
+
}
|
|
4026
|
+
continue;
|
|
4027
|
+
}
|
|
4028
|
+
if (isMedia) {
|
|
4029
|
+
if (!val)
|
|
3965
4030
|
continue;
|
|
4031
|
+
if (isMedia === "platform") {
|
|
4032
|
+
let platform = key.slice(10);
|
|
4033
|
+
if (
|
|
4034
|
+
// supports web, ios, android
|
|
4035
|
+
platform !== import_constants.currentPlatform && // supports web, native
|
|
4036
|
+
platform !== "native"
|
|
4037
|
+
)
|
|
4038
|
+
continue;
|
|
3966
4039
|
}
|
|
3967
|
-
|
|
3968
|
-
|
|
4040
|
+
hasMedia || (hasMedia = !0);
|
|
4041
|
+
let mediaStyle = getSubStyle(
|
|
4042
|
+
styleState,
|
|
4043
|
+
key,
|
|
4044
|
+
val,
|
|
4045
|
+
// TODO try true like pseudo
|
|
4046
|
+
!1
|
|
4047
|
+
), mediaKeyShort = key.slice(1), hasSpace = val.space;
|
|
4048
|
+
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
4049
|
+
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
4050
|
+
let importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(
|
|
4051
|
+
mediaKeyShort,
|
|
4052
|
+
"space",
|
|
4053
|
+
usedKeys,
|
|
4054
|
+
!0
|
|
4055
|
+
);
|
|
4056
|
+
importance && (space = val.space, usedKeys.space = importance);
|
|
4057
|
+
}
|
|
4058
|
+
let mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle, debug), priority = mediaStylesSeen;
|
|
4059
|
+
mediaStylesSeen += 1;
|
|
4060
|
+
for (let style2 of mediaStyles) {
|
|
4061
|
+
let out = (0, import_createMediaStyle.createMediaStyle)(
|
|
4062
|
+
style2,
|
|
4063
|
+
mediaKeyShort,
|
|
4064
|
+
import_useMedia.mediaQueryConfig,
|
|
4065
|
+
isMedia,
|
|
4066
|
+
!1,
|
|
4067
|
+
priority
|
|
4068
|
+
);
|
|
4069
|
+
`${style2.property}${PROP_SPLIT}${mediaKeyShort}` in usedKeys || out.identifier;
|
|
4070
|
+
}
|
|
4071
|
+
} else {
|
|
4072
|
+
let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
|
|
4073
|
+
if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState2[mediaKeyShort])
|
|
3969
4074
|
continue;
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
platform !== "native"
|
|
3976
|
-
)
|
|
4075
|
+
let importanceBump = 0;
|
|
4076
|
+
if (isThemeMedia) {
|
|
4077
|
+
dynamicThemeAccess = !0;
|
|
4078
|
+
let mediaThemeName = mediaKeyShort.slice(6);
|
|
4079
|
+
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
|
|
3977
4080
|
continue;
|
|
3978
|
-
}
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
styleState,
|
|
3982
|
-
key,
|
|
3983
|
-
val,
|
|
3984
|
-
// TODO try true like pseudo
|
|
3985
|
-
!1
|
|
3986
|
-
), mediaKeyShort = key.slice(1), hasSpace = val.space;
|
|
3987
|
-
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
3988
|
-
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
3989
|
-
let importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(
|
|
3990
|
-
mediaKeyShort,
|
|
3991
|
-
"space",
|
|
3992
|
-
usedKeys,
|
|
3993
|
-
!0
|
|
3994
|
-
);
|
|
3995
|
-
importance && (space = val.space, usedKeys.space = importance);
|
|
3996
|
-
}
|
|
3997
|
-
let mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle, debug), priority = mediaStylesSeen;
|
|
3998
|
-
mediaStylesSeen += 1;
|
|
3999
|
-
for (let style2 of mediaStyles) {
|
|
4000
|
-
let out = (0, import_createMediaStyle.createMediaStyle)(
|
|
4001
|
-
style2,
|
|
4002
|
-
mediaKeyShort,
|
|
4003
|
-
import_useMedia.mediaQueryConfig,
|
|
4004
|
-
isMedia,
|
|
4005
|
-
!1,
|
|
4006
|
-
priority
|
|
4007
|
-
);
|
|
4008
|
-
`${style2.property}${PROP_SPLIT}${mediaKeyShort}` in usedKeys || out.identifier;
|
|
4009
|
-
}
|
|
4010
|
-
} else {
|
|
4011
|
-
let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
|
|
4012
|
-
if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState2[mediaKeyShort])
|
|
4081
|
+
} else if (isGroupMedia) {
|
|
4082
|
+
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
4083
|
+
if (!groupContext)
|
|
4013
4084
|
continue;
|
|
4014
|
-
let
|
|
4015
|
-
if (
|
|
4016
|
-
|
|
4017
|
-
let
|
|
4018
|
-
if (!(
|
|
4085
|
+
let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
|
|
4086
|
+
if (groupMediaKey) {
|
|
4087
|
+
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
4088
|
+
let mediaState22 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState22 == null ? void 0 : mediaState22[groupMediaKey];
|
|
4089
|
+
if (!mediaState22 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
4019
4090
|
continue;
|
|
4020
|
-
|
|
4021
|
-
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
4022
|
-
if (!groupContext)
|
|
4023
|
-
continue;
|
|
4024
|
-
let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
|
|
4025
|
-
if (groupMediaKey) {
|
|
4026
|
-
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
4027
|
-
let mediaState22 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState22 == null ? void 0 : mediaState22[groupMediaKey];
|
|
4028
|
-
if (!mediaState22 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
4029
|
-
continue;
|
|
4030
|
-
importanceBump = 2;
|
|
4031
|
-
}
|
|
4032
|
-
if (groupPseudoKey) {
|
|
4033
|
-
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
4034
|
-
let componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
4035
|
-
context.groups.state[groupName]).pseudo;
|
|
4036
|
-
if (!(componentGroupPseudoState != null && componentGroupPseudoState[groupPseudoKey]))
|
|
4037
|
-
continue;
|
|
4038
|
-
importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
4039
|
-
}
|
|
4091
|
+
importanceBump = 2;
|
|
4040
4092
|
}
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4093
|
+
if (groupPseudoKey) {
|
|
4094
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
4095
|
+
let componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
4096
|
+
context.groups.state[groupName]).pseudo;
|
|
4097
|
+
if (!(componentGroupPseudoState != null && componentGroupPseudoState[groupPseudoKey]))
|
|
4044
4098
|
continue;
|
|
4045
|
-
|
|
4046
|
-
(0, import_useMedia.mergeMediaByImportance)(
|
|
4047
|
-
style,
|
|
4048
|
-
mediaKeyShort,
|
|
4049
|
-
subKey,
|
|
4050
|
-
mediaStyle[subKey],
|
|
4051
|
-
usedKeys,
|
|
4052
|
-
mediaState2[mediaKeyShort],
|
|
4053
|
-
importanceBump
|
|
4054
|
-
), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
|
|
4099
|
+
importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
4055
4100
|
}
|
|
4056
4101
|
}
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4102
|
+
for (let subKey in mediaStyle) {
|
|
4103
|
+
if (subKey === "space") {
|
|
4104
|
+
space = valInit.space;
|
|
4105
|
+
continue;
|
|
4106
|
+
}
|
|
4107
|
+
(0, import_useMedia.mergeMediaByImportance)(
|
|
4108
|
+
style,
|
|
4109
|
+
mediaKeyShort,
|
|
4110
|
+
subKey,
|
|
4111
|
+
mediaStyle[subKey],
|
|
4112
|
+
usedKeys,
|
|
4113
|
+
mediaState2[mediaKeyShort],
|
|
4114
|
+
importanceBump
|
|
4115
|
+
), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
|
|
4116
|
+
}
|
|
4070
4117
|
}
|
|
4071
|
-
|
|
4118
|
+
continue;
|
|
4119
|
+
}
|
|
4120
|
+
if (key === "pointerEvents") {
|
|
4121
|
+
viewProps[key] = val;
|
|
4122
|
+
continue;
|
|
4072
4123
|
}
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4124
|
+
if (
|
|
4125
|
+
// is HOC we can just pass through the styles as props
|
|
4126
|
+
// this fixes issues where style prop got merged with wrong priority
|
|
4127
|
+
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
|
|
4128
|
+
) {
|
|
4129
|
+
mergeStyle(styleState, key, val);
|
|
4130
|
+
continue;
|
|
4076
4131
|
}
|
|
4132
|
+
isVariant || (viewProps[key] = val);
|
|
4133
|
+
}
|
|
4077
4134
|
}
|
|
4135
|
+
if (0)
|
|
4136
|
+
try {
|
|
4137
|
+
} catch {
|
|
4138
|
+
}
|
|
4078
4139
|
}
|
|
4079
4140
|
if (props.style)
|
|
4080
4141
|
if (isHOC)
|
|
@@ -4131,7 +4192,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
4131
4192
|
let val = styleIn[key];
|
|
4132
4193
|
key = conf2.shorthands[key] || key;
|
|
4133
4194
|
let expanded = (0, import_propMapper.propMapper)(key, val, styleState, { ...props, ...props[subKey] });
|
|
4134
|
-
if (!(!expanded || !staticConfig.isHOC && key in skipProps && !styleProps.noSkip))
|
|
4195
|
+
if (!(!expanded || !staticConfig.isHOC && key in import_skipProps.skipProps && !styleProps.noSkip))
|
|
4135
4196
|
for (let [skey, sval] of expanded)
|
|
4136
4197
|
!avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
|
|
4137
4198
|
}
|
|
@@ -4151,35 +4212,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
4151
4212
|
}, mapTransformKeys = {
|
|
4152
4213
|
x: "translateX",
|
|
4153
4214
|
y: "translateY"
|
|
4154
|
-
}, skipProps = {
|
|
4155
|
-
untilMeasured: 1,
|
|
4156
|
-
animation: 1,
|
|
4157
|
-
space: 1,
|
|
4158
|
-
animateOnly: 1,
|
|
4159
|
-
disableClassName: 1,
|
|
4160
|
-
debug: 1,
|
|
4161
|
-
componentName: 1,
|
|
4162
|
-
disableOptimization: 1,
|
|
4163
|
-
tag: 1,
|
|
4164
|
-
style: 1,
|
|
4165
|
-
// handled after loop so pseudos set usedKeys and override it if necessary
|
|
4166
|
-
group: 1
|
|
4167
4215
|
};
|
|
4168
|
-
skipProps["data-test-renders"] = 1;
|
|
4169
|
-
Object.assign(skipProps, {
|
|
4170
|
-
whiteSpace: 1,
|
|
4171
|
-
wordWrap: 1,
|
|
4172
|
-
textOverflow: 1,
|
|
4173
|
-
textDecorationDistance: 1,
|
|
4174
|
-
cursor: 1,
|
|
4175
|
-
contain: 1,
|
|
4176
|
-
boxSizing: 1,
|
|
4177
|
-
boxShadow: 1,
|
|
4178
|
-
outlineStyle: 1,
|
|
4179
|
-
outlineOffset: 1,
|
|
4180
|
-
outlineWidth: 1,
|
|
4181
|
-
outlineColor: 1
|
|
4182
|
-
});
|
|
4183
4216
|
function passDownProp(viewProps, key, val, shouldMergeObject = !1) {
|
|
4184
4217
|
if (shouldMergeObject) {
|
|
4185
4218
|
let next = {
|
|
@@ -4860,6 +4893,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4860
4893
|
if (0 && import_constants.isWeb)
|
|
4861
4894
|
try {
|
|
4862
4895
|
} catch {
|
|
4896
|
+
} finally {
|
|
4863
4897
|
}
|
|
4864
4898
|
return content;
|
|
4865
4899
|
});
|