@tamagui/core 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 +6 -6
package/dist/native.js
CHANGED
|
@@ -1694,7 +1694,7 @@ var require_useMedia_native = __commonJS({
|
|
|
1694
1694
|
getMediaImportanceIfMoreImportant: () => getMediaImportanceIfMoreImportant,
|
|
1695
1695
|
getMediaKeyImportance: () => getMediaKeyImportance,
|
|
1696
1696
|
isMediaKey: () => isMediaKey,
|
|
1697
|
-
mediaKeyMatch: () =>
|
|
1697
|
+
mediaKeyMatch: () => mediaKeyMatch2,
|
|
1698
1698
|
mediaKeyToQuery: () => mediaKeyToQuery,
|
|
1699
1699
|
mediaKeys: () => mediaKeys,
|
|
1700
1700
|
mediaObjectToString: () => mediaObjectToString2,
|
|
@@ -1828,7 +1828,7 @@ var require_useMedia_native = __commonJS({
|
|
|
1828
1828
|
function mediaKeyToQuery(key) {
|
|
1829
1829
|
return cachedMediaKeyToQuery[key] || mediaObjectToString2(mediaQueryConfig2[key], key);
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function mediaKeyMatch2(key, dimensions) {
|
|
1832
1832
|
let mediaQueries = mediaQueryConfig2[key];
|
|
1833
1833
|
return Object.keys(mediaQueries).every((query) => {
|
|
1834
1834
|
let expectedVal = +mediaQueries[query], isMax = query.startsWith("max"), isWidth = query.endsWith("Width"), givenVal = dimensions[isWidth ? "width" : "height"];
|
|
@@ -3675,7 +3675,7 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
3675
3675
|
module2.exports = __toCommonJS2(getVariantExtras_exports);
|
|
3676
3676
|
var import_createVariable = require_createVariable_native();
|
|
3677
3677
|
function getVariantExtras(styleState) {
|
|
3678
|
-
let { curProps, conf, context, theme } = styleState, fonts = conf.fontsParsed;
|
|
3678
|
+
let { curProps, props, conf, context, theme } = styleState, fonts = conf.fontsParsed;
|
|
3679
3679
|
context != null && context.language && (fonts = getFontsForLanguage(conf.fontsParsed, context.language));
|
|
3680
3680
|
let fontFamily = (0, import_createVariable.getVariableValue)(
|
|
3681
3681
|
styleState.fontFamily || styleState.curProps.fontFamily || styleState.conf.defaultFont
|
|
@@ -3688,14 +3688,12 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
3688
3688
|
font: fonts[fontFamily] || fonts[styleState.conf.defaultFont],
|
|
3689
3689
|
// TODO do this in splitstlye
|
|
3690
3690
|
// we avoid passing in default props for media queries because that would confuse things like SizableText.size:
|
|
3691
|
-
props: new Proxy(
|
|
3691
|
+
props: new Proxy(props, {
|
|
3692
3692
|
// handles shorthands
|
|
3693
3693
|
get(target, key) {
|
|
3694
|
-
let
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
if (Reflect.has(target, key))
|
|
3698
|
-
return Reflect.get(target, key);
|
|
3694
|
+
for (let tryKey of [key, conf.inverseShorthands[key]])
|
|
3695
|
+
if (tryKey)
|
|
3696
|
+
return Reflect.has(curProps, tryKey) ? Reflect.get(curProps, tryKey) : Reflect.get(target, tryKey);
|
|
3699
3697
|
}
|
|
3700
3698
|
})
|
|
3701
3699
|
};
|
|
@@ -3998,8 +3996,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3998
3996
|
inlineWhenUnflattened,
|
|
3999
3997
|
parentStaticConfig,
|
|
4000
3998
|
acceptsClassName
|
|
4001
|
-
} = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClassNames, rulesToInsert =
|
|
4002
|
-
curProps: {
|
|
3999
|
+
} = staticConfig, 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, style = {}, className = props.className || "", mediaStylesSeen = 0, styleState = {
|
|
4000
|
+
curProps: {},
|
|
4003
4001
|
classNames,
|
|
4004
4002
|
conf,
|
|
4005
4003
|
props,
|
|
@@ -4023,44 +4021,45 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
4023
4021
|
theme: { ...theme }
|
|
4024
4022
|
}), console.groupEnd());
|
|
4025
4023
|
for (let keyOg in props) {
|
|
4026
|
-
process.env.NODE_ENV === "development" && console.groupEnd();
|
|
4027
4024
|
let keyInit = keyOg, valInit = props[keyOg];
|
|
4028
4025
|
if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in skipProps && !styleProps.noSkip && !isHOC)
|
|
4029
4026
|
continue;
|
|
4030
4027
|
let valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
4031
|
-
if (styleState.curProps[keyInit] = valInit, !
|
|
4032
|
-
|
|
4033
|
-
if (keyInit === "userSelect")
|
|
4034
|
-
keyInit = "selectable", valInit = valInit !== "none";
|
|
4035
|
-
else if (keyInit === "role") {
|
|
4036
|
-
viewProps.accessibilityRole = import_accessibilityDirectMap.accessibilityWebRoleToNativeRole[valInit];
|
|
4037
|
-
continue;
|
|
4038
|
-
} else if (keyInit.startsWith("aria-")) {
|
|
4039
|
-
if (import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit]) {
|
|
4040
|
-
let nativeA11yProp = import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit];
|
|
4041
|
-
keyInit === "aria-hidden" && (viewProps["aria-hidden"] = valInit), viewProps[nativeA11yProp] = valInit;
|
|
4028
|
+
if (valInit !== props[keyInit] && (styleState.curProps[keyInit] = valInit), !isValidStyleKeyInit) {
|
|
4029
|
+
if (!import_constants.isAndroid && keyInit === "elevationAndroid")
|
|
4042
4030
|
continue;
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
viewProps.
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
}
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4031
|
+
if (keyInit === "userSelect")
|
|
4032
|
+
keyInit = "selectable", valInit = valInit !== "none";
|
|
4033
|
+
else if (keyInit === "role") {
|
|
4034
|
+
viewProps.accessibilityRole = import_accessibilityDirectMap.accessibilityWebRoleToNativeRole[valInit];
|
|
4035
|
+
continue;
|
|
4036
|
+
} else if (keyInit.startsWith("aria-")) {
|
|
4037
|
+
if (import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit]) {
|
|
4038
|
+
let nativeA11yProp = import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit];
|
|
4039
|
+
keyInit === "aria-hidden" && (viewProps["aria-hidden"] = valInit), viewProps[nativeA11yProp] = valInit;
|
|
4040
|
+
continue;
|
|
4041
|
+
}
|
|
4042
|
+
if (import_accessibilityDirectMap.nativeAccessibilityValue[keyInit]) {
|
|
4043
|
+
let field = import_accessibilityDirectMap.nativeAccessibilityValue[keyInit];
|
|
4044
|
+
viewProps.accessibilityValue ? viewProps.accessibilityValue[field] = valInit : viewProps.accessibilityValue = {
|
|
4045
|
+
[field]: valInit
|
|
4046
|
+
};
|
|
4047
|
+
} else if (import_accessibilityDirectMap.nativeAccessibilityState[keyInit]) {
|
|
4048
|
+
let field = import_accessibilityDirectMap.nativeAccessibilityState[keyInit];
|
|
4049
|
+
viewProps.accessibilityState ? viewProps.accessibilityState[field] = valInit : viewProps.accessibilityState = {
|
|
4050
|
+
[field]: valInit
|
|
4051
|
+
};
|
|
4052
|
+
}
|
|
4053
|
+
continue;
|
|
4054
|
+
} else if (keyInit.startsWith("data-"))
|
|
4055
|
+
continue;
|
|
4056
|
+
}
|
|
4058
4057
|
if (keyInit === "dataSet") {
|
|
4059
4058
|
for (let keyInit2 in valInit)
|
|
4060
4059
|
viewProps[`data-${hyphenate(keyInit2)}`] = valInit[keyInit2];
|
|
4061
4060
|
continue;
|
|
4062
4061
|
}
|
|
4063
|
-
if (keyInit.startsWith("_style") && (0, import_isObj.isObj)(valInit)) {
|
|
4062
|
+
if (!isValidStyleKeyInit && keyInit.startsWith("_style") && (0, import_isObj.isObj)(valInit)) {
|
|
4064
4063
|
Object.assign(styleState.style, valInit);
|
|
4065
4064
|
continue;
|
|
4066
4065
|
}
|
|
@@ -4077,12 +4076,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
4077
4076
|
case "accessibilityRequired":
|
|
4078
4077
|
default:
|
|
4079
4078
|
}
|
|
4080
|
-
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 ||
|
|
4079
|
+
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;
|
|
4081
4080
|
if (isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))
|
|
4082
4081
|
continue;
|
|
4083
4082
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
4084
4083
|
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;
|
|
4085
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.
|
|
4084
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(
|
|
4086
4085
|
` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`
|
|
4087
4086
|
), (0, import_log.log)({ isVariant, valInit, shouldPassProp }), import_constants.isClient && (0, import_log.log)({
|
|
4088
4087
|
variants,
|
|
@@ -4097,8 +4096,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
4097
4096
|
style[keyInit] = valInit;
|
|
4098
4097
|
continue;
|
|
4099
4098
|
}
|
|
4100
|
-
let
|
|
4101
|
-
if (
|
|
4099
|
+
let avoidPropMap = isMediaOrPseudo || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
|
|
4100
|
+
if (!avoidPropMap) {
|
|
4101
|
+
if (!expanded)
|
|
4102
|
+
continue;
|
|
4103
|
+
let next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
|
|
4104
|
+
next && (styleState.fontFamily = next);
|
|
4105
|
+
}
|
|
4106
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
4102
4107
|
console.groupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
|
|
4103
4108
|
try {
|
|
4104
4109
|
!import_constants.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
|
|
@@ -4121,192 +4126,195 @@ current`, {
|
|
|
4121
4126
|
}
|
|
4122
4127
|
console.groupEnd();
|
|
4123
4128
|
}
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
+
let key = keyInit, val = valInit, max = expanded ? expanded.length : 1;
|
|
4130
|
+
for (let i = 0; i < max; i++) {
|
|
4131
|
+
if (expanded) {
|
|
4132
|
+
let [k, v] = expanded[i];
|
|
4133
|
+
key = k, val = v;
|
|
4134
|
+
}
|
|
4135
|
+
if (!(val == null || key in usedKeys)) {
|
|
4136
|
+
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]))) {
|
|
4137
|
+
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());
|
|
4138
|
+
continue;
|
|
4139
|
+
}
|
|
4140
|
+
if (isPseudo) {
|
|
4141
|
+
if (!val)
|
|
4142
|
+
continue;
|
|
4143
|
+
let pseudoStyleObject = getSubStyle(
|
|
4144
|
+
styleState,
|
|
4145
|
+
key,
|
|
4146
|
+
val,
|
|
4147
|
+
styleProps.noClassNames
|
|
4148
|
+
), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
4149
|
+
if (!descriptor)
|
|
4150
|
+
continue;
|
|
4151
|
+
if ((!shouldDoClasses || IS_STATIC) && (pseudos || (pseudos = {}), pseudos[key] || (pseudos[key] = {}), IS_STATIC)) {
|
|
4152
|
+
Object.assign(pseudos[key], pseudoStyleObject);
|
|
4129
4153
|
continue;
|
|
4130
4154
|
}
|
|
4131
|
-
if (
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
let
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
let importance = descriptor.priority;
|
|
4156
|
-
for (let pkey in pseudoStyleObject) {
|
|
4157
|
-
let val2 = pseudoStyleObject[pkey];
|
|
4158
|
-
if (isDisabled) {
|
|
4159
|
-
let defaultValues = animatableDefaults[pkey];
|
|
4160
|
-
defaultValues != null && !(pkey in usedKeys) && mergeStyle(styleState, pkey, defaultValues);
|
|
4161
|
-
} else {
|
|
4162
|
-
let curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
4163
|
-
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, {
|
|
4164
|
-
importance,
|
|
4165
|
-
curImportance,
|
|
4166
|
-
pkey,
|
|
4167
|
-
val: val2,
|
|
4168
|
-
transforms: { ...styleState.transforms }
|
|
4169
|
-
});
|
|
4170
|
-
}
|
|
4155
|
+
if (shouldDoClasses && !isExit) {
|
|
4156
|
+
let pseudoStyles = (0, import_getStylesAtomic.generateAtomicStyles)(pseudoStyleObject, descriptor);
|
|
4157
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed("pseudo (classes)", key), (0, import_log.log)({ pseudoStyleObject, pseudoStyles }), console.groupEnd());
|
|
4158
|
+
for (let psuedoStyle of pseudoStyles)
|
|
4159
|
+
`${psuedoStyle.property}${PROP_SPLIT}${descriptor.name}` in usedKeys || psuedoStyle.identifier;
|
|
4160
|
+
}
|
|
4161
|
+
if (!shouldDoClasses || isExit || isEnter) {
|
|
4162
|
+
let descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
4163
|
+
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());
|
|
4164
|
+
let importance = descriptor.priority;
|
|
4165
|
+
for (let pkey in pseudoStyleObject) {
|
|
4166
|
+
let val2 = pseudoStyleObject[pkey];
|
|
4167
|
+
if (isDisabled) {
|
|
4168
|
+
let defaultValues = animatableDefaults[pkey];
|
|
4169
|
+
defaultValues != null && !(pkey in usedKeys) && !(pkey in styleState.style) && mergeStyle(styleState, pkey, defaultValues);
|
|
4170
|
+
} else {
|
|
4171
|
+
let curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
4172
|
+
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, {
|
|
4173
|
+
importance,
|
|
4174
|
+
curImportance,
|
|
4175
|
+
pkey,
|
|
4176
|
+
val: val2,
|
|
4177
|
+
transforms: { ...styleState.transforms }
|
|
4178
|
+
});
|
|
4171
4179
|
}
|
|
4172
|
-
if (!isDisabled)
|
|
4173
|
-
for (let key2 in val) {
|
|
4174
|
-
let k = shorthands[key2] || key2;
|
|
4175
|
-
usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
|
|
4176
|
-
}
|
|
4177
4180
|
}
|
|
4181
|
+
if (!isDisabled)
|
|
4182
|
+
for (let key2 in val) {
|
|
4183
|
+
let k = shorthands[key2] || key2;
|
|
4184
|
+
usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
|
|
4185
|
+
}
|
|
4186
|
+
}
|
|
4187
|
+
continue;
|
|
4188
|
+
}
|
|
4189
|
+
if (isMedia) {
|
|
4190
|
+
if (!val)
|
|
4178
4191
|
continue;
|
|
4192
|
+
if (isMedia === "platform") {
|
|
4193
|
+
let platform = key.slice(10);
|
|
4194
|
+
if (
|
|
4195
|
+
// supports web, ios, android
|
|
4196
|
+
platform !== import_constants.currentPlatform && // supports web, native
|
|
4197
|
+
platform !== "native"
|
|
4198
|
+
)
|
|
4199
|
+
continue;
|
|
4179
4200
|
}
|
|
4180
|
-
|
|
4181
|
-
|
|
4201
|
+
hasMedia || (hasMedia = !0);
|
|
4202
|
+
let mediaStyle = getSubStyle(
|
|
4203
|
+
styleState,
|
|
4204
|
+
key,
|
|
4205
|
+
val,
|
|
4206
|
+
// TODO try true like pseudo
|
|
4207
|
+
!1
|
|
4208
|
+
), mediaKeyShort = key.slice(1);
|
|
4209
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {
|
|
4210
|
+
key,
|
|
4211
|
+
val,
|
|
4212
|
+
mediaStyle,
|
|
4213
|
+
props,
|
|
4214
|
+
shouldDoClasses,
|
|
4215
|
+
componentState
|
|
4216
|
+
});
|
|
4217
|
+
let hasSpace = val.space;
|
|
4218
|
+
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
4219
|
+
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
4220
|
+
let importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(
|
|
4221
|
+
mediaKeyShort,
|
|
4222
|
+
"space",
|
|
4223
|
+
usedKeys,
|
|
4224
|
+
!0
|
|
4225
|
+
);
|
|
4226
|
+
importance && (space = val.space, usedKeys.space = importance, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(
|
|
4227
|
+
`Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance})`
|
|
4228
|
+
));
|
|
4229
|
+
}
|
|
4230
|
+
let mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle, debug), priority = mediaStylesSeen;
|
|
4231
|
+
mediaStylesSeen += 1;
|
|
4232
|
+
for (let style2 of mediaStyles) {
|
|
4233
|
+
let out = (0, import_createMediaStyle.createMediaStyle)(
|
|
4234
|
+
style2,
|
|
4235
|
+
mediaKeyShort,
|
|
4236
|
+
import_useMedia.mediaQueryConfig,
|
|
4237
|
+
isMedia,
|
|
4238
|
+
!1,
|
|
4239
|
+
priority
|
|
4240
|
+
);
|
|
4241
|
+
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;
|
|
4242
|
+
}
|
|
4243
|
+
} else {
|
|
4244
|
+
let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
|
|
4245
|
+
if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState2[mediaKeyShort])
|
|
4182
4246
|
continue;
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
platform !== "native"
|
|
4189
|
-
)
|
|
4247
|
+
let importanceBump = 0;
|
|
4248
|
+
if (isThemeMedia) {
|
|
4249
|
+
dynamicThemeAccess = !0;
|
|
4250
|
+
let mediaThemeName = mediaKeyShort.slice(6);
|
|
4251
|
+
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
|
|
4190
4252
|
continue;
|
|
4191
|
-
}
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
key,
|
|
4196
|
-
val,
|
|
4197
|
-
// TODO try true like pseudo
|
|
4198
|
-
!1
|
|
4199
|
-
), mediaKeyShort = key.slice(1);
|
|
4200
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F4FA} ${key}`, {
|
|
4201
|
-
key,
|
|
4202
|
-
val,
|
|
4203
|
-
mediaStyle,
|
|
4204
|
-
props,
|
|
4205
|
-
shouldDoClasses,
|
|
4206
|
-
componentState
|
|
4207
|
-
});
|
|
4208
|
-
let hasSpace = val.space;
|
|
4209
|
-
if ((hasSpace || !shouldDoClasses) && (Array.isArray(hasMedia) || (hasMedia = []), hasMedia.push(mediaKeyShort)), shouldDoClasses) {
|
|
4210
|
-
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
4211
|
-
let importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(
|
|
4212
|
-
mediaKeyShort,
|
|
4213
|
-
"space",
|
|
4214
|
-
usedKeys,
|
|
4215
|
-
!0
|
|
4216
|
-
);
|
|
4217
|
-
importance && (space = val.space, usedKeys.space = importance, process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(
|
|
4218
|
-
`Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance})`
|
|
4219
|
-
));
|
|
4220
|
-
}
|
|
4221
|
-
let mediaStyles = (0, import_getStylesAtomic.getStylesAtomic)(mediaStyle, debug), priority = mediaStylesSeen;
|
|
4222
|
-
mediaStylesSeen += 1;
|
|
4223
|
-
for (let style2 of mediaStyles) {
|
|
4224
|
-
let out = (0, import_createMediaStyle.createMediaStyle)(
|
|
4225
|
-
style2,
|
|
4226
|
-
mediaKeyShort,
|
|
4227
|
-
import_useMedia.mediaQueryConfig,
|
|
4228
|
-
isMedia,
|
|
4229
|
-
!1,
|
|
4230
|
-
priority
|
|
4231
|
-
);
|
|
4232
|
-
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;
|
|
4233
|
-
}
|
|
4234
|
-
} else {
|
|
4235
|
-
let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
|
|
4236
|
-
if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState2[mediaKeyShort])
|
|
4253
|
+
} else if (isGroupMedia) {
|
|
4254
|
+
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
4255
|
+
if (!groupContext) {
|
|
4256
|
+
process.env.NODE_ENV === "development" && debug && console.warn(`No parent with group prop, skipping styles: ${groupName}`);
|
|
4237
4257
|
continue;
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
} else if (isGroupMedia) {
|
|
4245
|
-
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
4246
|
-
if (!groupContext) {
|
|
4247
|
-
process.env.NODE_ENV === "development" && debug && console.warn(`No parent with group prop, skipping styles: ${groupName}`);
|
|
4258
|
+
}
|
|
4259
|
+
let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
|
|
4260
|
+
if (groupMediaKey) {
|
|
4261
|
+
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
4262
|
+
let mediaState22 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState22 == null ? void 0 : mediaState22[groupMediaKey];
|
|
4263
|
+
if (!mediaState22 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
4248
4264
|
continue;
|
|
4249
|
-
|
|
4250
|
-
let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
|
|
4251
|
-
if (groupMediaKey) {
|
|
4252
|
-
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
4253
|
-
let mediaState22 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState22 == null ? void 0 : mediaState22[groupMediaKey];
|
|
4254
|
-
if (!mediaState22 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
4255
|
-
continue;
|
|
4256
|
-
importanceBump = 2;
|
|
4257
|
-
}
|
|
4258
|
-
if (groupPseudoKey) {
|
|
4259
|
-
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
4260
|
-
let componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
4261
|
-
context.groups.state[groupName]).pseudo;
|
|
4262
|
-
if (!(componentGroupPseudoState != null && componentGroupPseudoState[groupPseudoKey]))
|
|
4263
|
-
continue;
|
|
4264
|
-
importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
4265
|
-
}
|
|
4265
|
+
importanceBump = 2;
|
|
4266
4266
|
}
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4267
|
+
if (groupPseudoKey) {
|
|
4268
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
4269
|
+
let componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
4270
|
+
context.groups.state[groupName]).pseudo;
|
|
4271
|
+
if (!(componentGroupPseudoState != null && componentGroupPseudoState[groupPseudoKey]))
|
|
4270
4272
|
continue;
|
|
4271
|
-
|
|
4272
|
-
(0, import_useMedia.mergeMediaByImportance)(
|
|
4273
|
-
style,
|
|
4274
|
-
mediaKeyShort,
|
|
4275
|
-
subKey,
|
|
4276
|
-
mediaStyle[subKey],
|
|
4277
|
-
usedKeys,
|
|
4278
|
-
mediaState2[mediaKeyShort],
|
|
4279
|
-
importanceBump
|
|
4280
|
-
), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
|
|
4273
|
+
importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
4281
4274
|
}
|
|
4282
4275
|
}
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4276
|
+
for (let subKey in mediaStyle) {
|
|
4277
|
+
if (subKey === "space") {
|
|
4278
|
+
space = valInit.space;
|
|
4279
|
+
continue;
|
|
4280
|
+
}
|
|
4281
|
+
(0, import_useMedia.mergeMediaByImportance)(
|
|
4282
|
+
style,
|
|
4283
|
+
mediaKeyShort,
|
|
4284
|
+
subKey,
|
|
4285
|
+
mediaStyle[subKey],
|
|
4286
|
+
usedKeys,
|
|
4287
|
+
mediaState2[mediaKeyShort],
|
|
4288
|
+
importanceBump
|
|
4289
|
+
), key === "fontFamily" && (styleState.fontFamily = mediaStyle.fontFamily);
|
|
4290
|
+
}
|
|
4296
4291
|
}
|
|
4297
|
-
|
|
4292
|
+
continue;
|
|
4298
4293
|
}
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
(0, import_log.log)("style", { ...style }), (0, import_log.log)("transforms", { ...transforms }), (0, import_log.log)("viewProps", { ...viewProps });
|
|
4303
|
-
} catch {
|
|
4294
|
+
if (key === "pointerEvents") {
|
|
4295
|
+
viewProps[key] = val;
|
|
4296
|
+
continue;
|
|
4304
4297
|
}
|
|
4305
|
-
|
|
4298
|
+
if (
|
|
4299
|
+
// is HOC we can just pass through the styles as props
|
|
4300
|
+
// this fixes issues where style prop got merged with wrong priority
|
|
4301
|
+
!isHOC && (isValidStyleKey(key, staticConfig) || import_constants.isAndroid && key === "elevation")
|
|
4302
|
+
) {
|
|
4303
|
+
mergeStyle(styleState, key, val);
|
|
4304
|
+
continue;
|
|
4305
|
+
}
|
|
4306
|
+
isVariant || (viewProps[key] = val);
|
|
4307
|
+
}
|
|
4308
|
+
}
|
|
4309
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
4310
|
+
try {
|
|
4311
|
+
(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 });
|
|
4312
|
+
} catch {
|
|
4306
4313
|
}
|
|
4314
|
+
console.groupEnd();
|
|
4307
4315
|
}
|
|
4308
4316
|
}
|
|
4309
|
-
if (
|
|
4317
|
+
if (props.style)
|
|
4310
4318
|
if (isHOC)
|
|
4311
4319
|
viewProps.style = props.style;
|
|
4312
4320
|
else
|
|
@@ -4382,13 +4390,7 @@ current`, {
|
|
|
4382
4390
|
!avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
|
|
4383
4391
|
}
|
|
4384
4392
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
4385
|
-
},
|
|
4386
|
-
}, useSplitStyles = (...args) => {
|
|
4387
|
-
let res = getSplitStyles(...args);
|
|
4388
|
-
return useInsertEffectCompat(() => {
|
|
4389
|
-
(0, import_insertStyleRule.insertStyleRules)(res.rulesToInsert);
|
|
4390
|
-
}, [res.rulesToInsert]), res;
|
|
4391
|
-
}, animatableDefaults = {
|
|
4393
|
+
}, useSplitStyles = (a, b, c, d, e, f, g, h, i, j) => getSplitStyles(a, b, c, d, e, f, g, h, i, j), animatableDefaults = {
|
|
4392
4394
|
opacity: 1,
|
|
4393
4395
|
scale: 1,
|
|
4394
4396
|
rotate: "0deg",
|
|
@@ -4927,7 +4929,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4927
4929
|
let isStringElement = typeof elementType == "string";
|
|
4928
4930
|
process.env.NODE_ENV === "development" && time && time`theme`;
|
|
4929
4931
|
let mediaState2 = (0, import_useMedia.useMedia)(stateRef, componentContext);
|
|
4930
|
-
process.env.NODE_ENV === "development" && time && time`media
|
|
4932
|
+
(0, import_createVariable.setDidGetVariableValue)(!1), process.env.NODE_ENV === "development" && time && time`media`;
|
|
4931
4933
|
let resolveValues = (
|
|
4932
4934
|
// if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
|
|
4933
4935
|
isAnimated && !supportsCSSVars || isHOC && state.unmounted == !1 && hasAnimationProp ? "value" : "auto"
|
|
@@ -5221,8 +5223,9 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
5221
5223
|
willBeAnimated
|
|
5222
5224
|
}));
|
|
5223
5225
|
} catch {
|
|
5226
|
+
} finally {
|
|
5227
|
+
console.groupEnd();
|
|
5224
5228
|
}
|
|
5225
|
-
console.groupEnd();
|
|
5226
5229
|
} else {
|
|
5227
5230
|
(0, import_log.log)(title), (0, import_log.log)("final styles:");
|
|
5228
5231
|
for (let key in splitStylesStyle)
|
|
@@ -6720,6 +6723,7 @@ var require_index_native9 = __commonJS({
|
|
|
6720
6723
|
getToken: () => import_config.getToken,
|
|
6721
6724
|
getTokenValue: () => import_config.getTokenValue,
|
|
6722
6725
|
getTokens: () => import_config.getTokens,
|
|
6726
|
+
mediaKeyMatch: () => import_useMedia.mediaKeyMatch,
|
|
6723
6727
|
mediaObjectToString: () => import_useMedia.mediaObjectToString,
|
|
6724
6728
|
mediaQueryConfig: () => import_useMedia.mediaQueryConfig,
|
|
6725
6729
|
mediaState: () => import_useMedia.mediaState,
|