tamagui 1.88.17 → 1.88.19
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 +222 -218
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +196 -190
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -1533,7 +1533,7 @@ var require_useMedia_native = __commonJS({
|
|
|
1533
1533
|
getMediaImportanceIfMoreImportant: () => getMediaImportanceIfMoreImportant,
|
|
1534
1534
|
getMediaKeyImportance: () => getMediaKeyImportance,
|
|
1535
1535
|
isMediaKey: () => isMediaKey,
|
|
1536
|
-
mediaKeyMatch: () =>
|
|
1536
|
+
mediaKeyMatch: () => mediaKeyMatch2,
|
|
1537
1537
|
mediaKeyToQuery: () => mediaKeyToQuery,
|
|
1538
1538
|
mediaKeys: () => mediaKeys,
|
|
1539
1539
|
mediaObjectToString: () => mediaObjectToString3,
|
|
@@ -1667,7 +1667,7 @@ var require_useMedia_native = __commonJS({
|
|
|
1667
1667
|
function mediaKeyToQuery(key) {
|
|
1668
1668
|
return cachedMediaKeyToQuery[key] || mediaObjectToString3(mediaQueryConfig3[key], key);
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1670
|
+
function mediaKeyMatch2(key, dimensions) {
|
|
1671
1671
|
let mediaQueries = mediaQueryConfig3[key];
|
|
1672
1672
|
return Object.keys(mediaQueries).every((query) => {
|
|
1673
1673
|
let expectedVal = +mediaQueries[query], isMax = query.startsWith("max"), isWidth = query.endsWith("Width"), givenVal = dimensions[isWidth ? "width" : "height"];
|
|
@@ -3514,7 +3514,7 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
3514
3514
|
module2.exports = __toCommonJS2(getVariantExtras_exports);
|
|
3515
3515
|
var import_createVariable = require_createVariable_native();
|
|
3516
3516
|
function getVariantExtras(styleState) {
|
|
3517
|
-
let { curProps, conf, context, theme } = styleState, fonts = conf.fontsParsed;
|
|
3517
|
+
let { curProps, props, conf, context, theme } = styleState, fonts = conf.fontsParsed;
|
|
3518
3518
|
context != null && context.language && (fonts = getFontsForLanguage(conf.fontsParsed, context.language));
|
|
3519
3519
|
let fontFamily = (0, import_createVariable.getVariableValue)(
|
|
3520
3520
|
styleState.fontFamily || styleState.curProps.fontFamily || styleState.conf.defaultFont
|
|
@@ -3527,14 +3527,12 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
3527
3527
|
font: fonts[fontFamily] || fonts[styleState.conf.defaultFont],
|
|
3528
3528
|
// TODO do this in splitstlye
|
|
3529
3529
|
// we avoid passing in default props for media queries because that would confuse things like SizableText.size:
|
|
3530
|
-
props: new Proxy(
|
|
3530
|
+
props: new Proxy(props, {
|
|
3531
3531
|
// handles shorthands
|
|
3532
3532
|
get(target, key) {
|
|
3533
|
-
let
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
if (Reflect.has(target, key))
|
|
3537
|
-
return Reflect.get(target, key);
|
|
3533
|
+
for (let tryKey of [key, conf.inverseShorthands[key]])
|
|
3534
|
+
if (tryKey)
|
|
3535
|
+
return Reflect.has(curProps, tryKey) ? Reflect.get(curProps, tryKey) : Reflect.get(target, tryKey);
|
|
3538
3536
|
}
|
|
3539
3537
|
})
|
|
3540
3538
|
};
|
|
@@ -3837,8 +3835,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3837
3835
|
inlineWhenUnflattened,
|
|
3838
3836
|
parentStaticConfig,
|
|
3839
3837
|
acceptsClassName
|
|
3840
|
-
} = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClassNames, rulesToInsert =
|
|
3841
|
-
curProps: {
|
|
3838
|
+
} = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, style = {}, className = props.className || "", mediaStylesSeen = 0, styleState = {
|
|
3839
|
+
curProps: {},
|
|
3842
3840
|
classNames,
|
|
3843
3841
|
conf,
|
|
3844
3842
|
props,
|
|
@@ -3862,44 +3860,45 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3862
3860
|
theme: { ...theme }
|
|
3863
3861
|
}), console.groupEnd());
|
|
3864
3862
|
for (let keyOg in props) {
|
|
3865
|
-
process.env.NODE_ENV === "development" && console.groupEnd();
|
|
3866
3863
|
let keyInit = keyOg, valInit = props[keyOg];
|
|
3867
3864
|
if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in skipProps && !styleProps.noSkip && !isHOC)
|
|
3868
3865
|
continue;
|
|
3869
3866
|
let valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
3870
|
-
if (styleState.curProps[keyInit] = valInit, !
|
|
3871
|
-
|
|
3872
|
-
if (keyInit === "userSelect")
|
|
3873
|
-
keyInit = "selectable", valInit = valInit !== "none";
|
|
3874
|
-
else if (keyInit === "role") {
|
|
3875
|
-
viewProps.accessibilityRole = import_accessibilityDirectMap.accessibilityWebRoleToNativeRole[valInit];
|
|
3876
|
-
continue;
|
|
3877
|
-
} else if (keyInit.startsWith("aria-")) {
|
|
3878
|
-
if (import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit]) {
|
|
3879
|
-
let nativeA11yProp = import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit];
|
|
3880
|
-
keyInit === "aria-hidden" && (viewProps["aria-hidden"] = valInit), viewProps[nativeA11yProp] = valInit;
|
|
3867
|
+
if (valInit !== props[keyInit] && (styleState.curProps[keyInit] = valInit), !isValidStyleKeyInit) {
|
|
3868
|
+
if (!import_constants4.isAndroid && keyInit === "elevationAndroid")
|
|
3881
3869
|
continue;
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
viewProps.
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
}
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3870
|
+
if (keyInit === "userSelect")
|
|
3871
|
+
keyInit = "selectable", valInit = valInit !== "none";
|
|
3872
|
+
else if (keyInit === "role") {
|
|
3873
|
+
viewProps.accessibilityRole = import_accessibilityDirectMap.accessibilityWebRoleToNativeRole[valInit];
|
|
3874
|
+
continue;
|
|
3875
|
+
} else if (keyInit.startsWith("aria-")) {
|
|
3876
|
+
if (import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit]) {
|
|
3877
|
+
let nativeA11yProp = import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit];
|
|
3878
|
+
keyInit === "aria-hidden" && (viewProps["aria-hidden"] = valInit), viewProps[nativeA11yProp] = valInit;
|
|
3879
|
+
continue;
|
|
3880
|
+
}
|
|
3881
|
+
if (import_accessibilityDirectMap.nativeAccessibilityValue[keyInit]) {
|
|
3882
|
+
let field = import_accessibilityDirectMap.nativeAccessibilityValue[keyInit];
|
|
3883
|
+
viewProps.accessibilityValue ? viewProps.accessibilityValue[field] = valInit : viewProps.accessibilityValue = {
|
|
3884
|
+
[field]: valInit
|
|
3885
|
+
};
|
|
3886
|
+
} else if (import_accessibilityDirectMap.nativeAccessibilityState[keyInit]) {
|
|
3887
|
+
let field = import_accessibilityDirectMap.nativeAccessibilityState[keyInit];
|
|
3888
|
+
viewProps.accessibilityState ? viewProps.accessibilityState[field] = valInit : viewProps.accessibilityState = {
|
|
3889
|
+
[field]: valInit
|
|
3890
|
+
};
|
|
3891
|
+
}
|
|
3892
|
+
continue;
|
|
3893
|
+
} else if (keyInit.startsWith("data-"))
|
|
3894
|
+
continue;
|
|
3895
|
+
}
|
|
3897
3896
|
if (keyInit === "dataSet") {
|
|
3898
3897
|
for (let keyInit2 in valInit)
|
|
3899
3898
|
viewProps[`data-${hyphenate(keyInit2)}`] = valInit[keyInit2];
|
|
3900
3899
|
continue;
|
|
3901
3900
|
}
|
|
3902
|
-
if (keyInit.startsWith("_style") && (0, import_isObj.isObj)(valInit)) {
|
|
3901
|
+
if (!isValidStyleKeyInit && keyInit.startsWith("_style") && (0, import_isObj.isObj)(valInit)) {
|
|
3903
3902
|
Object.assign(styleState.style, valInit);
|
|
3904
3903
|
continue;
|
|
3905
3904
|
}
|
|
@@ -3916,12 +3915,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3916
3915
|
case "accessibilityRequired":
|
|
3917
3916
|
default:
|
|
3918
3917
|
}
|
|
3919
|
-
let isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo), isStyleProp = isMediaOrPseudo || isVariant && !styleProps.noExpand ||
|
|
3918
|
+
let isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo), isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !styleProps.noExpand || isShorthand;
|
|
3920
3919
|
if (isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))
|
|
3921
3920
|
continue;
|
|
3922
3921
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
3923
3922
|
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)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
3924
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.
|
|
3923
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(
|
|
3925
3924
|
` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`
|
|
3926
3925
|
), (0, import_log.log)({ isVariant, valInit, shouldPassProp }), import_constants4.isClient && (0, import_log.log)({
|
|
3927
3926
|
variants,
|
|
@@ -3936,8 +3935,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3936
3935
|
style[keyInit] = valInit;
|
|
3937
3936
|
continue;
|
|
3938
3937
|
}
|
|
3939
|
-
let
|
|
3940
|
-
if (
|
|
3938
|
+
let avoidPropMap = isMediaOrPseudo || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
|
|
3939
|
+
if (!avoidPropMap) {
|
|
3940
|
+
if (!expanded)
|
|
3941
|
+
continue;
|
|
3942
|
+
let next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
3943
|
+
next && (styleState.fontFamily = next);
|
|
3944
|
+
}
|
|
3945
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
3941
3946
|
console.groupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
|
|
3942
3947
|
try {
|
|
3943
3948
|
!import_constants4.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
|
|
@@ -3960,192 +3965,195 @@ current`, {
|
|
|
3960
3965
|
}
|
|
3961
3966
|
console.groupEnd();
|
|
3962
3967
|
}
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
+
let key = keyInit, val = valInit, max2 = expanded ? expanded.length : 1;
|
|
3969
|
+
for (let i = 0; i < max2; i++) {
|
|
3970
|
+
if (expanded) {
|
|
3971
|
+
let [k, v] = expanded[i];
|
|
3972
|
+
key = k, val = v;
|
|
3973
|
+
}
|
|
3974
|
+
if (!(val == null || key in usedKeys)) {
|
|
3975
|
+
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]))) {
|
|
3976
|
+
passDownProp(viewProps, key, val, isMediaOrPseudo), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(` - passing down prop ${key}`), (0, import_log.log)({ val, after: { ...viewProps[key] } }), console.groupEnd());
|
|
3977
|
+
continue;
|
|
3978
|
+
}
|
|
3979
|
+
if (isPseudo) {
|
|
3980
|
+
if (!val)
|
|
3981
|
+
continue;
|
|
3982
|
+
let pseudoStyleObject = getSubStyle(
|
|
3983
|
+
styleState,
|
|
3984
|
+
key,
|
|
3985
|
+
val,
|
|
3986
|
+
styleProps.noClassNames
|
|
3987
|
+
), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
3988
|
+
if (!descriptor)
|
|
3989
|
+
continue;
|
|
3990
|
+
if ((!shouldDoClasses || IS_STATIC) && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), IS_STATIC)) {
|
|
3991
|
+
Object.assign(pseudos[key], pseudoStyleObject);
|
|
3968
3992
|
continue;
|
|
3969
3993
|
}
|
|
3970
|
-
if (
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
let
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
let importance = descriptor.priority;
|
|
3995
|
-
for (let pkey in pseudoStyleObject) {
|
|
3996
|
-
let val2 = pseudoStyleObject[pkey];
|
|
3997
|
-
if (isDisabled) {
|
|
3998
|
-
let defaultValues = animatableDefaults[pkey];
|
|
3999
|
-
defaultValues != null && !(pkey in usedKeys) && mergeStyle(styleState, pkey, defaultValues);
|
|
4000
|
-
} else {
|
|
4001
|
-
let curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
4002
|
-
shouldMerge && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), pseudos[key][pkey] = val2, mergeStyle(styleState, pkey, val2)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
4003
|
-
importance,
|
|
4004
|
-
curImportance,
|
|
4005
|
-
pkey,
|
|
4006
|
-
val: val2,
|
|
4007
|
-
transforms: { ...styleState.transforms }
|
|
4008
|
-
});
|
|
4009
|
-
}
|
|
3994
|
+
if (shouldDoClasses && !isExit) {
|
|
3995
|
+
let pseudoStyles = (0, import_getStylesAtomic.generateAtomicStyles)(pseudoStyleObject, descriptor);
|
|
3996
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo (classes)", key), (0, import_log.log)({ pseudoStyleObject, pseudoStyles }), console.groupEnd());
|
|
3997
|
+
for (let psuedoStyle of pseudoStyles)
|
|
3998
|
+
`${psuedoStyle.property}${PROP_SPLIT}${descriptor.name}` in usedKeys || psuedoStyle.identifier;
|
|
3999
|
+
}
|
|
4000
|
+
if (!shouldDoClasses || isExit || isEnter) {
|
|
4001
|
+
let descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
4002
|
+
isExit && (isDisabled = !styleProps.isExiting), isEnter && (isDisabled = componentState.unmounted === "should-enter" ? !0 : !componentState.unmounted), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo", key, { isDisabled }), (0, import_log.log)({ pseudoStyleObject, isDisabled, descriptor, componentState }), console.groupEnd());
|
|
4003
|
+
let importance = descriptor.priority;
|
|
4004
|
+
for (let pkey in pseudoStyleObject) {
|
|
4005
|
+
let val2 = pseudoStyleObject[pkey];
|
|
4006
|
+
if (isDisabled) {
|
|
4007
|
+
let defaultValues = animatableDefaults[pkey];
|
|
4008
|
+
defaultValues != null && !(pkey in usedKeys) && !(pkey in styleState.style) && mergeStyle(styleState, pkey, defaultValues);
|
|
4009
|
+
} else {
|
|
4010
|
+
let curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
4011
|
+
shouldMerge && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), pseudos[key][pkey] = val2, mergeStyle(styleState, pkey, val2)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(" subKey", pkey, shouldMerge, {
|
|
4012
|
+
importance,
|
|
4013
|
+
curImportance,
|
|
4014
|
+
pkey,
|
|
4015
|
+
val: val2,
|
|
4016
|
+
transforms: { ...styleState.transforms }
|
|
4017
|
+
});
|
|
4010
4018
|
}
|
|
4011
|
-
if (!isDisabled)
|
|
4012
|
-
for (let key2 in val) {
|
|
4013
|
-
let k = shorthands[key2] || key2;
|
|
4014
|
-
usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
|
|
4015
|
-
}
|
|
4016
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)
|
|
4017
4030
|
continue;
|
|
4031
|
+
if (isMedia === "platform") {
|
|
4032
|
+
let platform = key.slice(10);
|
|
4033
|
+
if (
|
|
4034
|
+
// supports web, ios, android
|
|
4035
|
+
platform !== import_constants4.currentPlatform && // supports web, native
|
|
4036
|
+
platform !== "native"
|
|
4037
|
+
)
|
|
4038
|
+
continue;
|
|
4018
4039
|
}
|
|
4019
|
-
|
|
4020
|
-
|
|
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);
|
|
4048
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {
|
|
4049
|
+
key,
|
|
4050
|
+
val,
|
|
4051
|
+
mediaStyle,
|
|
4052
|
+
props,
|
|
4053
|
+
shouldDoClasses,
|
|
4054
|
+
componentState
|
|
4055
|
+
});
|
|
4056
|
+
let hasSpace = val.space;
|
|
4057
|
+
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
4058
|
+
if (hasSpace && (delete mediaStyle.space, mediaState3[mediaKeyShort])) {
|
|
4059
|
+
let importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(
|
|
4060
|
+
mediaKeyShort,
|
|
4061
|
+
"space",
|
|
4062
|
+
usedKeys,
|
|
4063
|
+
!0
|
|
4064
|
+
);
|
|
4065
|
+
importance && (space = val.space, usedKeys.space = importance, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(
|
|
4066
|
+
`Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance})`
|
|
4067
|
+
));
|
|
4068
|
+
}
|
|
4069
|
+
let mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle, debug), priority = mediaStylesSeen;
|
|
4070
|
+
mediaStylesSeen += 1;
|
|
4071
|
+
for (let style2 of mediaStyles) {
|
|
4072
|
+
let out = (0, import_createMediaStyle.createMediaStyle)(
|
|
4073
|
+
style2,
|
|
4074
|
+
mediaKeyShort,
|
|
4075
|
+
import_useMedia.mediaQueryConfig,
|
|
4076
|
+
isMedia,
|
|
4077
|
+
!1,
|
|
4078
|
+
priority
|
|
4079
|
+
);
|
|
4080
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out), `${style2.property}${PROP_SPLIT}${mediaKeyShort}` in usedKeys || out.identifier;
|
|
4081
|
+
}
|
|
4082
|
+
} else {
|
|
4083
|
+
let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
|
|
4084
|
+
if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState3[mediaKeyShort])
|
|
4021
4085
|
continue;
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
platform !== "native"
|
|
4028
|
-
)
|
|
4086
|
+
let importanceBump = 0;
|
|
4087
|
+
if (isThemeMedia) {
|
|
4088
|
+
dynamicThemeAccess = !0;
|
|
4089
|
+
let mediaThemeName = mediaKeyShort.slice(6);
|
|
4090
|
+
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
|
|
4029
4091
|
continue;
|
|
4030
|
-
}
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
key,
|
|
4035
|
-
val,
|
|
4036
|
-
// TODO try true like pseudo
|
|
4037
|
-
!1
|
|
4038
|
-
), mediaKeyShort = key.slice(1);
|
|
4039
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {
|
|
4040
|
-
key,
|
|
4041
|
-
val,
|
|
4042
|
-
mediaStyle,
|
|
4043
|
-
props,
|
|
4044
|
-
shouldDoClasses,
|
|
4045
|
-
componentState
|
|
4046
|
-
});
|
|
4047
|
-
let hasSpace = val.space;
|
|
4048
|
-
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
4049
|
-
if (hasSpace && (delete mediaStyle.space, mediaState3[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, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(
|
|
4057
|
-
`Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance})`
|
|
4058
|
-
));
|
|
4059
|
-
}
|
|
4060
|
-
let mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle, debug), priority = mediaStylesSeen;
|
|
4061
|
-
mediaStylesSeen += 1;
|
|
4062
|
-
for (let style2 of mediaStyles) {
|
|
4063
|
-
let out = (0, import_createMediaStyle.createMediaStyle)(
|
|
4064
|
-
style2,
|
|
4065
|
-
mediaKeyShort,
|
|
4066
|
-
import_useMedia.mediaQueryConfig,
|
|
4067
|
-
isMedia,
|
|
4068
|
-
!1,
|
|
4069
|
-
priority
|
|
4070
|
-
);
|
|
4071
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out), `${style2.property}${PROP_SPLIT}${mediaKeyShort}` in usedKeys || out.identifier;
|
|
4072
|
-
}
|
|
4073
|
-
} else {
|
|
4074
|
-
let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
|
|
4075
|
-
if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState3[mediaKeyShort])
|
|
4092
|
+
} else if (isGroupMedia) {
|
|
4093
|
+
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
4094
|
+
if (!groupContext) {
|
|
4095
|
+
process.env.NODE_ENV === "development" && debug && console.warn(`No parent with group prop, skipping styles: ${groupName}`);
|
|
4076
4096
|
continue;
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
} else if (isGroupMedia) {
|
|
4084
|
-
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
4085
|
-
if (!groupContext) {
|
|
4086
|
-
process.env.NODE_ENV === "development" && debug && console.warn(`No parent with group prop, skipping styles: ${groupName}`);
|
|
4097
|
+
}
|
|
4098
|
+
let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
|
|
4099
|
+
if (groupMediaKey) {
|
|
4100
|
+
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
4101
|
+
let mediaState22 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState22 == null ? void 0 : mediaState22[groupMediaKey];
|
|
4102
|
+
if (!mediaState22 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
4087
4103
|
continue;
|
|
4088
|
-
|
|
4089
|
-
let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
|
|
4090
|
-
if (groupMediaKey) {
|
|
4091
|
-
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
4092
|
-
let mediaState22 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState22 == null ? void 0 : mediaState22[groupMediaKey];
|
|
4093
|
-
if (!mediaState22 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
4094
|
-
continue;
|
|
4095
|
-
importanceBump = 2;
|
|
4096
|
-
}
|
|
4097
|
-
if (groupPseudoKey) {
|
|
4098
|
-
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
4099
|
-
let componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
4100
|
-
context.groups.state[groupName]).pseudo;
|
|
4101
|
-
if (!(componentGroupPseudoState != null && componentGroupPseudoState[groupPseudoKey]))
|
|
4102
|
-
continue;
|
|
4103
|
-
importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
4104
|
-
}
|
|
4104
|
+
importanceBump = 2;
|
|
4105
4105
|
}
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4106
|
+
if (groupPseudoKey) {
|
|
4107
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
4108
|
+
let componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
4109
|
+
context.groups.state[groupName]).pseudo;
|
|
4110
|
+
if (!(componentGroupPseudoState != null && componentGroupPseudoState[groupPseudoKey]))
|
|
4109
4111
|
continue;
|
|
4110
|
-
|
|
4111
|
-
(0, import_useMedia.mergeMediaByImportance)(
|
|
4112
|
-
style,
|
|
4113
|
-
mediaKeyShort,
|
|
4114
|
-
subKey,
|
|
4115
|
-
mediaStyle[subKey],
|
|
4116
|
-
usedKeys,
|
|
4117
|
-
mediaState3[mediaKeyShort],
|
|
4118
|
-
importanceBump
|
|
4119
|
-
), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
|
|
4112
|
+
importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
4120
4113
|
}
|
|
4121
4114
|
}
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4115
|
+
for (let subKey in mediaStyle) {
|
|
4116
|
+
if (subKey === "space") {
|
|
4117
|
+
space = valInit.space;
|
|
4118
|
+
continue;
|
|
4119
|
+
}
|
|
4120
|
+
(0, import_useMedia.mergeMediaByImportance)(
|
|
4121
|
+
style,
|
|
4122
|
+
mediaKeyShort,
|
|
4123
|
+
subKey,
|
|
4124
|
+
mediaStyle[subKey],
|
|
4125
|
+
usedKeys,
|
|
4126
|
+
mediaState3[mediaKeyShort],
|
|
4127
|
+
importanceBump
|
|
4128
|
+
), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
|
|
4129
|
+
}
|
|
4135
4130
|
}
|
|
4136
|
-
|
|
4131
|
+
continue;
|
|
4137
4132
|
}
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
(0, import_log.log)("style", { ...style }), (0, import_log.log)("transforms", { ...transforms }), (0, import_log.log)("viewProps", { ...viewProps });
|
|
4142
|
-
} catch {
|
|
4133
|
+
if (key === "pointerEvents") {
|
|
4134
|
+
viewProps[key] = val;
|
|
4135
|
+
continue;
|
|
4143
4136
|
}
|
|
4144
|
-
|
|
4137
|
+
if (
|
|
4138
|
+
// is HOC we can just pass through the styles as props
|
|
4139
|
+
// this fixes issues where style prop got merged with wrong priority
|
|
4140
|
+
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants4.isAndroid && key === "elevation")
|
|
4141
|
+
) {
|
|
4142
|
+
mergeStyle(styleState, key, val);
|
|
4143
|
+
continue;
|
|
4144
|
+
}
|
|
4145
|
+
isVariant || (viewProps[key] = val);
|
|
4146
|
+
}
|
|
4147
|
+
}
|
|
4148
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
4149
|
+
try {
|
|
4150
|
+
(0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", { ...style }), (0, import_log.log)("transforms", { ...transforms }), (0, import_log.log)("viewProps", { ...viewProps });
|
|
4151
|
+
} catch {
|
|
4145
4152
|
}
|
|
4153
|
+
console.groupEnd();
|
|
4146
4154
|
}
|
|
4147
4155
|
}
|
|
4148
|
-
if (
|
|
4156
|
+
if (props.style)
|
|
4149
4157
|
if (isHOC)
|
|
4150
4158
|
viewProps.style = props.style;
|
|
4151
4159
|
else
|
|
@@ -4221,13 +4229,7 @@ current`, {
|
|
|
4221
4229
|
!avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
|
|
4222
4230
|
}
|
|
4223
4231
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
4224
|
-
},
|
|
4225
|
-
}, useSplitStyles = (...args) => {
|
|
4226
|
-
let res = getSplitStyles(...args);
|
|
4227
|
-
return useInsertEffectCompat(() => {
|
|
4228
|
-
(0, import_insertStyleRule.insertStyleRules)(res.rulesToInsert);
|
|
4229
|
-
}, [res.rulesToInsert]), res;
|
|
4230
|
-
}, animatableDefaults = {
|
|
4232
|
+
}, useSplitStyles = (a, b, c, d, e, f, g, h, i, j) => getSplitStyles(a, b, c, d, e, f, g, h, i, j), animatableDefaults = {
|
|
4231
4233
|
opacity: 1,
|
|
4232
4234
|
scale: 1,
|
|
4233
4235
|
rotate: "0deg",
|
|
@@ -4766,7 +4768,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4766
4768
|
let isStringElement = typeof elementType == "string";
|
|
4767
4769
|
process.env.NODE_ENV === "development" && time && time`theme`;
|
|
4768
4770
|
let mediaState3 = (0, import_useMedia.useMedia)(stateRef, componentContext);
|
|
4769
|
-
process.env.NODE_ENV === "development" && time && time`media
|
|
4771
|
+
(0, import_createVariable.setDidGetVariableValue)(!1), process.env.NODE_ENV === "development" && time && time`media`;
|
|
4770
4772
|
let resolveValues = (
|
|
4771
4773
|
// if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
|
|
4772
4774
|
isAnimated && !supportsCSSVars || isHOC && state.unmounted == !1 && hasAnimationProp ? "value" : "auto"
|
|
@@ -5060,8 +5062,9 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
5060
5062
|
willBeAnimated
|
|
5061
5063
|
}));
|
|
5062
5064
|
} catch {
|
|
5065
|
+
} finally {
|
|
5066
|
+
console.groupEnd();
|
|
5063
5067
|
}
|
|
5064
|
-
console.groupEnd();
|
|
5065
5068
|
} else {
|
|
5066
5069
|
(0, import_log.log)(title), (0, import_log.log)("final styles:");
|
|
5067
5070
|
for (let key in splitStylesStyle)
|
|
@@ -6483,6 +6486,7 @@ var require_index_native13 = __commonJS({
|
|
|
6483
6486
|
getToken: () => import_config.getToken,
|
|
6484
6487
|
getTokenValue: () => import_config.getTokenValue,
|
|
6485
6488
|
getTokens: () => import_config.getTokens,
|
|
6489
|
+
mediaKeyMatch: () => import_useMedia.mediaKeyMatch,
|
|
6486
6490
|
mediaObjectToString: () => import_useMedia.mediaObjectToString,
|
|
6487
6491
|
mediaQueryConfig: () => import_useMedia.mediaQueryConfig,
|
|
6488
6492
|
mediaState: () => import_useMedia.mediaState,
|