@tamagui/web 1.113.1 → 1.113.2
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/esm/Tamagui.native.js +50 -41
- package/dist/esm/Tamagui.native.js.map +6 -1
- package/dist/esm/_withStableStyle.native.js +9 -11
- package/dist/esm/_withStableStyle.native.js.map +6 -1
- package/dist/esm/config.native.js +74 -75
- package/dist/esm/config.native.js.map +6 -1
- package/dist/esm/constants/accessibilityDirectMap.native.js +8 -6
- package/dist/esm/constants/accessibilityDirectMap.native.js.map +6 -1
- package/dist/esm/constants/constants.native.js +19 -17
- package/dist/esm/constants/constants.native.js.map +6 -1
- package/dist/esm/constants/isDevTools.native.js +10 -6
- package/dist/esm/constants/isDevTools.native.js.map +6 -1
- package/dist/esm/constants/webToNativeProps.native.js +162 -84
- package/dist/esm/constants/webToNativeProps.native.js.map +6 -1
- package/dist/esm/contexts/ComponentContext.native.js +5 -3
- package/dist/esm/contexts/ComponentContext.native.js.map +6 -1
- package/dist/esm/createComponent.native.js +300 -405
- package/dist/esm/createComponent.native.js.map +6 -1
- package/dist/esm/createFont.native.js +41 -24
- package/dist/esm/createFont.native.js.map +6 -1
- package/dist/esm/createShorthands.native.js +4 -2
- package/dist/esm/createShorthands.native.js.map +6 -1
- package/dist/esm/createTamagui.native.js +158 -177
- package/dist/esm/createTamagui.native.js.map +6 -1
- package/dist/esm/createTheme.native.js +5 -3
- package/dist/esm/createTheme.native.js.map +6 -1
- package/dist/esm/createTokens.native.js +5 -3
- package/dist/esm/createTokens.native.js.map +6 -1
- package/dist/esm/createVariable.native.js +35 -29
- package/dist/esm/createVariable.native.js.map +6 -1
- package/dist/esm/createVariables.native.js +29 -34
- package/dist/esm/createVariables.native.js.map +6 -1
- package/dist/esm/defaultComponentState.native.js +20 -18
- package/dist/esm/defaultComponentState.native.js.map +6 -1
- package/dist/esm/helpers/ThemeManager.native.js +101 -95
- package/dist/esm/helpers/ThemeManager.native.js.map +6 -1
- package/dist/esm/helpers/ThemeManagerContext.native.js +5 -3
- package/dist/esm/helpers/ThemeManagerContext.native.js.map +6 -1
- package/dist/esm/helpers/createMediaStyle.native.js +49 -64
- package/dist/esm/helpers/createMediaStyle.native.js.map +6 -1
- package/dist/esm/helpers/createShallowSetState.native.js +17 -9
- package/dist/esm/helpers/createShallowSetState.native.js.map +6 -1
- package/dist/esm/helpers/createStyledContext.native.js +25 -31
- package/dist/esm/helpers/createStyledContext.native.js.map +6 -1
- package/dist/esm/helpers/defaultOffset.native.js +4 -2
- package/dist/esm/helpers/defaultOffset.native.js.map +6 -1
- package/dist/esm/helpers/expandStyle.native.js +84 -39
- package/dist/esm/helpers/expandStyle.native.js.map +6 -1
- package/dist/esm/helpers/expandStyles.native.js +17 -15
- package/dist/esm/helpers/expandStyles.native.js.map +6 -1
- package/dist/esm/helpers/getExpandedShorthands.native.js +7 -4
- package/dist/esm/helpers/getExpandedShorthands.native.js.map +6 -1
- package/dist/esm/helpers/getFontLanguage.native.js +5 -3
- package/dist/esm/helpers/getFontLanguage.native.js.map +6 -1
- package/dist/esm/helpers/getGroupPropParts.native.js +6 -7
- package/dist/esm/helpers/getGroupPropParts.native.js.map +6 -1
- package/dist/esm/helpers/getSplitStyles.native.js +398 -436
- package/dist/esm/helpers/getSplitStyles.native.js.map +6 -1
- package/dist/esm/helpers/getStylesAtomic.native.js +8 -7
- package/dist/esm/helpers/getStylesAtomic.native.js.map +6 -1
- package/dist/esm/helpers/getThemeCSSRules.native.js +3 -1
- package/dist/esm/helpers/getThemeCSSRules.native.js.map +6 -1
- package/dist/esm/helpers/getVariantExtras.native.js +34 -33
- package/dist/esm/helpers/getVariantExtras.native.js.map +6 -1
- package/dist/esm/helpers/insertStyleRule.native.js +111 -123
- package/dist/esm/helpers/insertStyleRule.native.js.map +6 -1
- package/dist/esm/helpers/isActivePlatform.native.js +5 -4
- package/dist/esm/helpers/isActivePlatform.native.js.map +6 -1
- package/dist/esm/helpers/isObj.native.js +5 -3
- package/dist/esm/helpers/isObj.native.js.map +6 -1
- package/dist/esm/helpers/isTamaguiComponent.native.js +4 -2
- package/dist/esm/helpers/isTamaguiComponent.native.js.map +6 -1
- package/dist/esm/helpers/isTamaguiElement.native.js +7 -5
- package/dist/esm/helpers/isTamaguiElement.native.js.map +6 -1
- package/dist/esm/helpers/log.native.js +7 -4
- package/dist/esm/helpers/log.native.js.map +6 -1
- package/dist/esm/helpers/matchMedia.native.js +14 -9
- package/dist/esm/helpers/matchMedia.native.js.map +6 -1
- package/dist/esm/helpers/mergeProps.native.js +13 -9
- package/dist/esm/helpers/mergeProps.native.js.map +6 -1
- package/dist/esm/helpers/mergeVariants.native.js +7 -7
- package/dist/esm/helpers/mergeVariants.native.js.map +6 -1
- package/dist/esm/helpers/normalizeColor.native.js +24 -20
- package/dist/esm/helpers/normalizeColor.native.js.map +6 -1
- package/dist/esm/helpers/normalizeShadow.native.js +7 -15
- package/dist/esm/helpers/normalizeShadow.native.js.map +6 -1
- package/dist/esm/helpers/normalizeStyle.native.js +12 -13
- package/dist/esm/helpers/normalizeStyle.native.js.map +6 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +3 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +6 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +12 -9
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +6 -1
- package/dist/esm/helpers/objectIdentityKey.native.js +11 -6
- package/dist/esm/helpers/objectIdentityKey.native.js.map +6 -1
- package/dist/esm/helpers/propMapper.native.js +206 -227
- package/dist/esm/helpers/propMapper.native.js.map +6 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js +27 -39
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +6 -1
- package/dist/esm/helpers/proxyThemeVariables.native.js +5 -3
- package/dist/esm/helpers/proxyThemeVariables.native.js.map +6 -1
- package/dist/esm/helpers/pseudoDescriptors.native.js +46 -44
- package/dist/esm/helpers/pseudoDescriptors.native.js.map +6 -1
- package/dist/esm/helpers/registerCSSVariable.native.js +13 -11
- package/dist/esm/helpers/registerCSSVariable.native.js.map +6 -1
- package/dist/esm/helpers/setElementProps.native.js +6 -3
- package/dist/esm/helpers/setElementProps.native.js.map +6 -1
- package/dist/esm/helpers/skipProps.native.js +5 -3
- package/dist/esm/helpers/skipProps.native.js.map +6 -1
- package/dist/esm/helpers/sortString.native.js +5 -3
- package/dist/esm/helpers/sortString.native.js.map +6 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js +18 -27
- package/dist/esm/helpers/subscribeToContextGroup.native.js.map +6 -1
- package/dist/esm/helpers/themeable.native.js +24 -31
- package/dist/esm/helpers/themeable.native.js.map +6 -1
- package/dist/esm/helpers/themes.native.js +5 -3
- package/dist/esm/helpers/themes.native.js.map +6 -1
- package/dist/esm/helpers/timer.native.js +5 -3
- package/dist/esm/helpers/timer.native.js.map +6 -1
- package/dist/esm/helpers/transformsToString.native.js +13 -11
- package/dist/esm/helpers/transformsToString.native.js.map +6 -1
- package/dist/esm/helpers/webPropsToSkip.native.js +3 -1
- package/dist/esm/helpers/webPropsToSkip.native.js.map +6 -1
- package/dist/esm/hooks/useComponentState.native.js +32 -66
- package/dist/esm/hooks/useComponentState.native.js.map +6 -1
- package/dist/esm/hooks/useConfiguration.native.js +8 -14
- package/dist/esm/hooks/useConfiguration.native.js.map +6 -1
- package/dist/esm/hooks/useDidHydrateOnce.native.js +15 -14
- package/dist/esm/hooks/useDidHydrateOnce.native.js.map +6 -1
- package/dist/esm/hooks/useDisableSSR.native.js +5 -3
- package/dist/esm/hooks/useDisableSSR.native.js.map +6 -1
- package/dist/esm/hooks/useIsTouchDevice.native.js +5 -3
- package/dist/esm/hooks/useIsTouchDevice.native.js.map +6 -1
- package/dist/esm/hooks/useMedia.native.js +104 -106
- package/dist/esm/hooks/useMedia.native.js.map +6 -1
- package/dist/esm/hooks/useProps.native.js +42 -41
- package/dist/esm/hooks/useProps.native.js.map +6 -1
- package/dist/esm/hooks/useTheme.native.js +231 -253
- package/dist/esm/hooks/useTheme.native.js.map +6 -1
- package/dist/esm/hooks/useThemeName.native.js +16 -12
- package/dist/esm/hooks/useThemeName.native.js.map +6 -1
- package/dist/esm/index.native.js +78 -61
- package/dist/esm/index.native.js.map +6 -1
- package/dist/esm/inject-styles.native.js +12 -15
- package/dist/esm/inject-styles.native.js.map +6 -1
- package/dist/esm/insertFont.native.js +32 -24
- package/dist/esm/insertFont.native.js.map +6 -1
- package/dist/esm/interfaces/CSSColorNames.native.js +1 -2
- package/dist/esm/interfaces/CSSColorNames.native.js.map +6 -1
- package/dist/esm/interfaces/GetRef.native.js +1 -2
- package/dist/esm/interfaces/GetRef.native.js.map +6 -1
- package/dist/esm/interfaces/KeyTypes.native.js +1 -2
- package/dist/esm/interfaces/KeyTypes.native.js.map +6 -1
- package/dist/esm/interfaces/RNExclusiveTypes.native.js +1 -2
- package/dist/esm/interfaces/RNExclusiveTypes.native.js.map +6 -1
- package/dist/esm/interfaces/Role.native.js +1 -2
- package/dist/esm/interfaces/Role.native.js.map +6 -1
- package/dist/esm/interfaces/TamaguiComponentEvents.native.js +1 -2
- package/dist/esm/interfaces/TamaguiComponentEvents.native.js.map +6 -1
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js +1 -2
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js.map +6 -1
- package/dist/esm/interfaces/TamaguiComponentState.native.js +1 -2
- package/dist/esm/interfaces/TamaguiComponentState.native.js.map +6 -1
- package/dist/esm/interfaces/WebOnlyPressEvents.native.js +1 -2
- package/dist/esm/interfaces/WebOnlyPressEvents.native.js.map +6 -1
- package/dist/esm/setupHooks.native.js +5 -2
- package/dist/esm/setupHooks.native.js.map +6 -1
- package/dist/esm/setupReactNative.native.js +13 -5
- package/dist/esm/setupReactNative.native.js.map +6 -1
- package/dist/esm/styled.native.js +50 -66
- package/dist/esm/styled.native.js.map +6 -1
- package/dist/esm/type-utils.native.js +1 -2
- package/dist/esm/type-utils.native.js.map +6 -1
- package/dist/esm/types.native.js +3 -3
- package/dist/esm/types.native.js.map +6 -1
- package/dist/esm/views/Configuration.native.js +7 -5
- package/dist/esm/views/Configuration.native.js.map +6 -1
- package/dist/esm/views/FontLanguage.native.js +11 -11
- package/dist/esm/views/FontLanguage.native.js.map +6 -1
- package/dist/esm/views/FontLanguage.types.native.js +1 -2
- package/dist/esm/views/FontLanguage.types.native.js.map +6 -1
- package/dist/esm/views/Slot.native.js +31 -33
- package/dist/esm/views/Slot.native.js.map +6 -1
- package/dist/esm/views/Stack.native.js +6 -4
- package/dist/esm/views/Stack.native.js.map +6 -1
- package/dist/esm/views/TamaguiProvider.native.js +39 -40
- package/dist/esm/views/TamaguiProvider.native.js.map +6 -1
- package/dist/esm/views/Text.native.js +30 -27
- package/dist/esm/views/Text.native.js.map +6 -1
- package/dist/esm/views/Theme.native.js +54 -76
- package/dist/esm/views/Theme.native.js.map +6 -1
- package/dist/esm/views/ThemeDebug.native.js +4 -6
- package/dist/esm/views/ThemeDebug.native.js.map +6 -1
- package/dist/esm/views/ThemeProvider.native.js +16 -12
- package/dist/esm/views/ThemeProvider.native.js.map +6 -1
- package/dist/esm/views/View.native.js +6 -4
- package/dist/esm/views/View.native.js.map +6 -1
- package/package.json +11 -11
|
@@ -1,77 +1,45 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { isAndroid, isClient, isServer, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
3
3
|
import { StyleObjectIdentifier, StyleObjectProperty, StyleObjectPseudo, stylePropsText, stylePropsTransform, tokenCategories, validPseudoKeys, validStyles } from "@tamagui/helpers";
|
|
4
|
-
import { getConfig, getFont } from "../config
|
|
5
|
-
import "../constants/accessibilityDirectMap
|
|
6
|
-
import "../constants/constants
|
|
7
|
-
import { isDevTools } from "../constants/isDevTools
|
|
8
|
-
import { getMediaImportanceIfMoreImportant, mediaState as globalMediaState, isMediaKey, mediaKeyMatch, mediaQueryConfig } from "../hooks/useMedia
|
|
9
|
-
import { createMediaStyle } from "./createMediaStyle
|
|
10
|
-
import { fixStyles } from "./expandStyles
|
|
11
|
-
import { getGroupPropParts } from "./getGroupPropParts
|
|
12
|
-
import { getStyleAtomic, getStylesAtomic, styleToCSS } from "./getStylesAtomic
|
|
13
|
-
import "./insertStyleRule
|
|
14
|
-
import { log } from "./log
|
|
15
|
-
import { normalizeValueWithProperty } from "./normalizeValueWithProperty
|
|
16
|
-
import { getPropMappedFontFamily, propMapper } from "./propMapper
|
|
17
|
-
import { pseudoDescriptors, pseudoPriorities } from "./pseudoDescriptors
|
|
18
|
-
import { skipProps } from "./skipProps
|
|
19
|
-
import { transformsToString } from "./transformsToString
|
|
20
|
-
import { isActivePlatform } from "./isActivePlatform
|
|
21
|
-
import { sortString } from "./sortString
|
|
22
|
-
var consoleGroupCollapsed = isWeb ? console.groupCollapsed : console.info,
|
|
23
|
-
conf,
|
|
24
|
-
PROP_SPLIT = "-";
|
|
4
|
+
import { getConfig, getFont } from "../config";
|
|
5
|
+
import "../constants/accessibilityDirectMap";
|
|
6
|
+
import "../constants/constants";
|
|
7
|
+
import { isDevTools } from "../constants/isDevTools";
|
|
8
|
+
import { getMediaImportanceIfMoreImportant, mediaState as globalMediaState, isMediaKey, mediaKeyMatch, mediaQueryConfig } from "../hooks/useMedia";
|
|
9
|
+
import { createMediaStyle } from "./createMediaStyle";
|
|
10
|
+
import { fixStyles } from "./expandStyles";
|
|
11
|
+
import { getGroupPropParts } from "./getGroupPropParts";
|
|
12
|
+
import { getStyleAtomic, getStylesAtomic, styleToCSS } from "./getStylesAtomic";
|
|
13
|
+
import "./insertStyleRule";
|
|
14
|
+
import { log } from "./log";
|
|
15
|
+
import { normalizeValueWithProperty } from "./normalizeValueWithProperty";
|
|
16
|
+
import { getPropMappedFontFamily, propMapper } from "./propMapper";
|
|
17
|
+
import { pseudoDescriptors, pseudoPriorities } from "./pseudoDescriptors";
|
|
18
|
+
import { skipProps } from "./skipProps";
|
|
19
|
+
import { transformsToString } from "./transformsToString";
|
|
20
|
+
import { isActivePlatform } from "./isActivePlatform";
|
|
21
|
+
import { sortString } from "./sortString";
|
|
22
|
+
var consoleGroupCollapsed = isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
|
|
25
23
|
function isValidStyleKey(key, staticConfig) {
|
|
26
|
-
var _staticConfig_accept,
|
|
27
|
-
validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
|
|
24
|
+
var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
|
|
28
25
|
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
29
26
|
}
|
|
30
|
-
var getSplitStyles = function
|
|
27
|
+
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) {
|
|
31
28
|
conf = conf || getConfig(), isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
32
|
-
var {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
viewProps = {},
|
|
47
|
-
mediaState = styleProps.mediaState || globalMediaState,
|
|
48
|
-
usedKeys = {},
|
|
49
|
-
shouldDoClasses = acceptsClassName && isWeb && !styleProps.noClassNames,
|
|
50
|
-
rulesToInsert = void 0,
|
|
51
|
-
classNames = {},
|
|
52
|
-
transforms = {},
|
|
53
|
-
pseudos = null,
|
|
54
|
-
space = props.space,
|
|
55
|
-
hasMedia = !1,
|
|
56
|
-
dynamicThemeAccess,
|
|
57
|
-
pseudoGroups,
|
|
58
|
-
mediaGroups,
|
|
59
|
-
className = props.className || "",
|
|
60
|
-
mediaStylesSeen = 0,
|
|
61
|
-
styleState = {
|
|
62
|
-
classNames,
|
|
63
|
-
conf,
|
|
64
|
-
props,
|
|
65
|
-
styleProps,
|
|
66
|
-
componentState,
|
|
67
|
-
staticConfig,
|
|
68
|
-
style: null,
|
|
69
|
-
theme,
|
|
70
|
-
usedKeys,
|
|
71
|
-
viewProps,
|
|
72
|
-
context,
|
|
73
|
-
debug
|
|
74
|
-
};
|
|
29
|
+
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState = styleProps.mediaState || globalMediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, styleState = {
|
|
30
|
+
classNames,
|
|
31
|
+
conf,
|
|
32
|
+
props,
|
|
33
|
+
styleProps,
|
|
34
|
+
componentState,
|
|
35
|
+
staticConfig,
|
|
36
|
+
style: null,
|
|
37
|
+
theme,
|
|
38
|
+
usedKeys,
|
|
39
|
+
viewProps,
|
|
40
|
+
context,
|
|
41
|
+
debug
|
|
42
|
+
};
|
|
75
43
|
process.env.NODE_ENV === "development" && debug && debug !== "profile" && isClient && (consoleGroupCollapsed("getSplitStyles (collapsed)"), log({
|
|
76
44
|
props,
|
|
77
45
|
staticConfig,
|
|
@@ -84,236 +52,215 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
84
52
|
...theme
|
|
85
53
|
}
|
|
86
54
|
}), console.groupEnd());
|
|
87
|
-
var {
|
|
88
|
-
asChild
|
|
89
|
-
} = props,
|
|
90
|
-
{
|
|
91
|
-
accept
|
|
92
|
-
} = staticConfig,
|
|
93
|
-
{
|
|
94
|
-
noSkip,
|
|
95
|
-
disableExpandShorthands,
|
|
96
|
-
noExpand
|
|
97
|
-
} = styleProps,
|
|
98
|
-
{
|
|
99
|
-
webContainerType
|
|
100
|
-
} = conf.settings,
|
|
101
|
-
parentVariants = parentStaticConfig?.variants;
|
|
55
|
+
var { asChild } = props, { accept } = staticConfig, { noSkip, disableExpandShorthands, noExpand } = styleProps, { webContainerType } = conf.settings, parentVariants = parentStaticConfig?.variants;
|
|
102
56
|
for (var keyOg in props) {
|
|
103
|
-
var _loop = function
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
57
|
+
var _loop = function(i2) {
|
|
58
|
+
var _parentStaticConfig_variants;
|
|
59
|
+
if (expanded) {
|
|
60
|
+
var [k, v] = expanded[i2];
|
|
61
|
+
key = k, val = v;
|
|
62
|
+
}
|
|
63
|
+
if (val == null || key in usedKeys) return "continue";
|
|
64
|
+
if (isPseudo = key in validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && isMediaKey(key), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key in variants, inlineProps?.has(key) || process.env.IS_STATIC === "is_static" && inlineWhenUnflattened?.has(key)) {
|
|
65
|
+
var _props_key;
|
|
66
|
+
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
|
|
67
|
+
}
|
|
68
|
+
var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
|
|
69
|
+
if (shouldPassThrough2)
|
|
70
|
+
return passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(` - passing down prop ${key}`), log({
|
|
116
71
|
val,
|
|
117
72
|
after: {
|
|
118
73
|
...viewProps[key]
|
|
119
74
|
}
|
|
120
75
|
}), console.groupEnd()), "continue";
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
76
|
+
if (isPseudo) {
|
|
77
|
+
if (!val) return "continue";
|
|
78
|
+
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
79
|
+
if (!descriptor)
|
|
80
|
+
return "continue";
|
|
81
|
+
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
82
|
+
var _pseudos, _key;
|
|
83
|
+
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static")
|
|
84
|
+
return Object.assign(pseudos[key], pseudoStyleObject), "continue";
|
|
85
|
+
}
|
|
86
|
+
if (shouldDoClasses && !isExit) {
|
|
87
|
+
var pseudoStyles = getStyleAtomic(pseudoStyleObject, descriptor);
|
|
88
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key), log({
|
|
89
|
+
pseudoStyleObject,
|
|
90
|
+
pseudoStyles
|
|
91
|
+
}), console.groupEnd());
|
|
92
|
+
var _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
|
|
93
|
+
try {
|
|
94
|
+
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
|
95
|
+
var psuedoStyle = _step2.value, fullKey = `${psuedoStyle[StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
|
|
96
|
+
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[StyleObjectIdentifier], isMediaOrPseudo1, !0));
|
|
97
|
+
}
|
|
98
|
+
} catch (err) {
|
|
99
|
+
_didIteratorError2 = !0, _iteratorError2 = err;
|
|
100
|
+
} finally {
|
|
141
101
|
try {
|
|
142
|
-
|
|
143
|
-
var psuedoStyle = _step2.value,
|
|
144
|
-
fullKey = `${psuedoStyle[StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
|
|
145
|
-
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[StyleObjectIdentifier], isMediaOrPseudo1, !0));
|
|
146
|
-
}
|
|
147
|
-
} catch (err) {
|
|
148
|
-
_didIteratorError2 = !0, _iteratorError2 = err;
|
|
102
|
+
!_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
|
|
149
103
|
} finally {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
} finally {
|
|
153
|
-
if (_didIteratorError2) throw _iteratorError2;
|
|
154
|
-
}
|
|
104
|
+
if (_didIteratorError2)
|
|
105
|
+
throw _iteratorError2;
|
|
155
106
|
}
|
|
156
107
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && log(" subKey", pkey, shouldMerge, {
|
|
179
|
-
importance,
|
|
180
|
-
curImportance,
|
|
181
|
-
pkey,
|
|
182
|
-
val: val12
|
|
183
|
-
});
|
|
108
|
+
}
|
|
109
|
+
if (!shouldDoClasses || isExit || isEnter) {
|
|
110
|
+
var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = componentState[descriptorKey] === !1;
|
|
111
|
+
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key, {
|
|
112
|
+
isDisabled
|
|
113
|
+
}), log({
|
|
114
|
+
pseudoStyleObject,
|
|
115
|
+
isDisabled,
|
|
116
|
+
descriptor,
|
|
117
|
+
componentState
|
|
118
|
+
}), console.groupEnd());
|
|
119
|
+
var importance = descriptor.priority;
|
|
120
|
+
for (var pkey in pseudoStyleObject) {
|
|
121
|
+
var val12 = pseudoStyleObject[pkey];
|
|
122
|
+
if (isDisabled)
|
|
123
|
+
applyDefaultStyle(pkey, styleState);
|
|
124
|
+
else {
|
|
125
|
+
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
126
|
+
if (shouldMerge) {
|
|
127
|
+
var _pseudos1, _key1;
|
|
128
|
+
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val12, mergeStyle(styleState, pkey, val12);
|
|
184
129
|
}
|
|
130
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && log(" subKey", pkey, shouldMerge, {
|
|
131
|
+
importance,
|
|
132
|
+
curImportance,
|
|
133
|
+
pkey,
|
|
134
|
+
val: val12
|
|
135
|
+
});
|
|
185
136
|
}
|
|
186
|
-
|
|
137
|
+
}
|
|
138
|
+
if (!isDisabled)
|
|
139
|
+
for (var key12 in val) {
|
|
187
140
|
var k1 = shorthands[key12] || key12;
|
|
188
141
|
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
|
|
189
142
|
}
|
|
190
|
-
}
|
|
191
|
-
return "continue";
|
|
192
143
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
144
|
+
return "continue";
|
|
145
|
+
}
|
|
146
|
+
if (isMedia) {
|
|
147
|
+
if (!val) return "continue";
|
|
148
|
+
var hasSpace = val.space, mediaKeyShort = key.slice(isMedia == "theme" ? 7 : 1);
|
|
149
|
+
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (typeof hasMedia != "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !isActivePlatform(key))
|
|
150
|
+
return "continue";
|
|
151
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} ${key}`, {
|
|
152
|
+
key,
|
|
153
|
+
val,
|
|
154
|
+
props,
|
|
155
|
+
shouldDoClasses,
|
|
156
|
+
acceptsClassName,
|
|
157
|
+
componentState,
|
|
158
|
+
mediaState
|
|
159
|
+
}), shouldDoClasses) {
|
|
160
|
+
var mediaStyle = getSubStyle(styleState, key, val, !1);
|
|
161
|
+
if (hasSpace && (delete mediaStyle.space, mediaState[mediaKeyShort])) {
|
|
162
|
+
var importance1 = getMediaImportanceIfMoreImportant(mediaKeyShort, "space", usedKeys, !0);
|
|
163
|
+
importance1 && (space = val.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && log(`Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance1})`));
|
|
164
|
+
}
|
|
165
|
+
var mediaStyles = getStylesAtomic(mediaStyle), priority = mediaStylesSeen;
|
|
166
|
+
mediaStylesSeen += 1;
|
|
167
|
+
var _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
168
|
+
try {
|
|
169
|
+
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
|
|
170
|
+
var style3 = _step12.value, property = style3[0];
|
|
171
|
+
if (!(property[0] === "$" && property.startsWith("$platform") && !isActivePlatform(property))) {
|
|
172
|
+
var out = createMediaStyle(style3, mediaKeyShort, mediaQueryConfig, isMedia, !1, priority);
|
|
173
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && log("\u{1F4FA} media style:", out);
|
|
174
|
+
var fullKey1 = `${style3[StyleObjectProperty]}${PROP_SPLIT}${mediaKeyShort}${style3[StyleObjectPseudo] || ""}`;
|
|
175
|
+
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[StyleObjectIdentifier], !0, !0));
|
|
176
|
+
}
|
|
211
177
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
var _iteratorNormalCompletion12 = !0,
|
|
216
|
-
_didIteratorError12 = !1,
|
|
217
|
-
_iteratorError12 = void 0;
|
|
178
|
+
} catch (err) {
|
|
179
|
+
_didIteratorError12 = !0, _iteratorError12 = err;
|
|
180
|
+
} finally {
|
|
218
181
|
try {
|
|
219
|
-
|
|
220
|
-
var style3 = _step12.value,
|
|
221
|
-
property = style3[0];
|
|
222
|
-
if (!(property[0] === "$" && property.startsWith("$platform") && !isActivePlatform(property))) {
|
|
223
|
-
var out = createMediaStyle(style3, mediaKeyShort, mediaQueryConfig, isMedia, !1, priority);
|
|
224
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && log("\u{1F4FA} media style:", out);
|
|
225
|
-
var fullKey1 = `${style3[StyleObjectProperty]}${PROP_SPLIT}${mediaKeyShort}${style3[StyleObjectPseudo] || ""}`;
|
|
226
|
-
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[StyleObjectIdentifier], !0, !0));
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
} catch (err) {
|
|
230
|
-
_didIteratorError12 = !0, _iteratorError12 = err;
|
|
182
|
+
!_iteratorNormalCompletion12 && _iterator12.return != null && _iterator12.return();
|
|
231
183
|
} finally {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
} finally {
|
|
235
|
-
if (_didIteratorError12) throw _iteratorError12;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
} else {
|
|
239
|
-
let mergeMediaStyle2 = function (key5, val3) {
|
|
240
|
-
var _styleState4;
|
|
241
|
-
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
242
|
-
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState[mediaKeyShort], importanceBump, debug);
|
|
243
|
-
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
244
|
-
};
|
|
245
|
-
var mergeMediaStyle = mergeMediaStyle2,
|
|
246
|
-
isThemeMedia = isMedia === "theme",
|
|
247
|
-
isGroupMedia = isMedia === "group",
|
|
248
|
-
isPlatformMedia = isMedia === "platform";
|
|
249
|
-
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
|
|
250
|
-
if (!mediaState[mediaKeyShort]) return process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} \u274C DISABLED ${mediaKeyShort}`), "continue";
|
|
251
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} \u2705 ENABLED ${mediaKeyShort}`);
|
|
184
|
+
if (_didIteratorError12)
|
|
185
|
+
throw _iteratorError12;
|
|
252
186
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`), !isActive1) {
|
|
286
|
-
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
287
|
-
return "continue";
|
|
288
|
-
}
|
|
289
|
-
importanceBump = priority1;
|
|
187
|
+
}
|
|
188
|
+
} else {
|
|
189
|
+
let mergeMediaStyle2 = function(key5, val3) {
|
|
190
|
+
var _styleState4;
|
|
191
|
+
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
192
|
+
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState[mediaKeyShort], importanceBump, debug);
|
|
193
|
+
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
194
|
+
};
|
|
195
|
+
var mergeMediaStyle = mergeMediaStyle2, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
196
|
+
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
|
|
197
|
+
if (!mediaState[mediaKeyShort])
|
|
198
|
+
return process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} \u274C DISABLED ${mediaKeyShort}`), "continue";
|
|
199
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} \u2705 ENABLED ${mediaKeyShort}`);
|
|
200
|
+
}
|
|
201
|
+
var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
|
|
202
|
+
if (isThemeMedia) {
|
|
203
|
+
dynamicThemeAccess = !0;
|
|
204
|
+
var mediaThemeName = mediaKeyShort.slice(6);
|
|
205
|
+
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
|
|
206
|
+
return "continue";
|
|
207
|
+
} else if (isGroupMedia) {
|
|
208
|
+
var _componentState_group, groupInfo = getGroupPropParts(mediaKeyShort), groupName = groupInfo.name, groupContext = context?.groups.state[groupName];
|
|
209
|
+
if (!groupContext)
|
|
210
|
+
return process.env.NODE_ENV === "development" && debug && log(`No parent with group prop, skipping styles: ${groupName}`), "continue";
|
|
211
|
+
var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
212
|
+
if (groupMediaKey) {
|
|
213
|
+
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
214
|
+
var mediaState1 = componentGroupState?.media, isActive = mediaState1?.[groupMediaKey];
|
|
215
|
+
if (!mediaState1 && groupContext.layout && (isActive = mediaKeyMatch(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F3D8}\uFE0F GROUP media ${groupMediaKey} active? ${isActive}`), !isActive) {
|
|
216
|
+
for (var pkey1 in mediaStyle1)
|
|
217
|
+
applyDefaultStyle(pkey1, styleState);
|
|
218
|
+
return "continue";
|
|
290
219
|
}
|
|
220
|
+
importanceBump = 2;
|
|
291
221
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
222
|
+
if (groupPseudoKey) {
|
|
223
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
224
|
+
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
225
|
+
context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState?.[groupPseudoKey], priority1 = pseudoPriorities[groupPseudoKey];
|
|
226
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`), !isActive1) {
|
|
227
|
+
for (var pkey2 in mediaStyle1)
|
|
228
|
+
applyDefaultStyle(pkey2, styleState);
|
|
229
|
+
return "continue";
|
|
296
230
|
}
|
|
297
|
-
|
|
298
|
-
if (!isActivePlatform(subKey)) continue;
|
|
299
|
-
for (var subSubKey in mediaStyle1[subKey]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey][subSubKey]);
|
|
300
|
-
} else mergeMediaStyle2(subKey, mediaStyle1[subKey]);
|
|
231
|
+
importanceBump = priority1;
|
|
301
232
|
}
|
|
302
233
|
}
|
|
303
|
-
|
|
234
|
+
for (var subKey in mediaStyle1) {
|
|
235
|
+
if (subKey === "space") {
|
|
236
|
+
space = valInit.space;
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if (subKey[0] === "$") {
|
|
240
|
+
if (!isActivePlatform(subKey))
|
|
241
|
+
continue;
|
|
242
|
+
for (var subSubKey in mediaStyle1[subKey])
|
|
243
|
+
mergeMediaStyle2(subSubKey, mediaStyle1[subKey][subSubKey]);
|
|
244
|
+
} else
|
|
245
|
+
mergeMediaStyle2(subKey, mediaStyle1[subKey]);
|
|
246
|
+
}
|
|
304
247
|
}
|
|
305
|
-
|
|
306
|
-
|
|
248
|
+
return "continue";
|
|
249
|
+
}
|
|
250
|
+
if (key === "pointerEvents")
|
|
251
|
+
return viewProps[key] = val, "continue";
|
|
252
|
+
if (
|
|
307
253
|
// is HOC we can just pass through the styles as props
|
|
308
254
|
// this fixes issues where style prop got merged with wrong priority
|
|
309
|
-
!isHOC && (isValidStyleKey(key, staticConfig) || isAndroid && key === "elevation")
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
255
|
+
!isHOC && (isValidStyleKey(key, staticConfig) || isAndroid && key === "elevation")
|
|
256
|
+
)
|
|
257
|
+
return mergeStyle(styleState, key, val), "continue";
|
|
258
|
+
if (!isVariant) {
|
|
259
|
+
if (styleProps.styledContextProps && key in styleProps.styledContextProps)
|
|
260
|
+
return "continue";
|
|
261
|
+
viewProps[key] = val;
|
|
262
|
+
}
|
|
263
|
+
}, keyInit = keyOg, valInit = props[keyInit];
|
|
317
264
|
if (accept) {
|
|
318
265
|
var accepted = accept[keyInit];
|
|
319
266
|
if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") {
|
|
@@ -323,45 +270,44 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
323
270
|
}
|
|
324
271
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
|
|
325
272
|
if (keyInit in skipProps && !noSkip && !isHOC) {
|
|
326
|
-
if (keyInit === "group" && 0)
|
|
273
|
+
if (keyInit === "group" && 0)
|
|
274
|
+
var identifier, containerType, containerCSS;
|
|
327
275
|
continue;
|
|
328
276
|
}
|
|
329
|
-
var valInitType = typeof valInit,
|
|
330
|
-
isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
277
|
+
var valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
331
278
|
if (0) {
|
|
332
|
-
if (staticConfig.isReactNative && keyInit.startsWith("data-"))
|
|
279
|
+
if (staticConfig.isReactNative && keyInit.startsWith("data-"))
|
|
280
|
+
var _viewProps, _dataSet;
|
|
333
281
|
if (isValidStyleKeyInit && valInitType === "string" && valInit[0] === "_") {
|
|
334
282
|
var isValidClassName, isMediaOrPseudo;
|
|
335
|
-
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses)
|
|
283
|
+
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses)
|
|
284
|
+
var _styleState;
|
|
336
285
|
}
|
|
337
286
|
}
|
|
338
287
|
if (!isValidStyleKeyInit) {
|
|
339
|
-
if (!isAndroid && keyInit === "elevationAndroid")
|
|
340
|
-
|
|
288
|
+
if (!isAndroid && keyInit === "elevationAndroid")
|
|
289
|
+
continue;
|
|
290
|
+
if (keyInit === "userSelect")
|
|
291
|
+
keyInit = "selectable", valInit = valInit !== "none";
|
|
292
|
+
else if (keyInit.startsWith("data-"))
|
|
293
|
+
continue;
|
|
341
294
|
}
|
|
342
295
|
if (keyInit === "dataSet") {
|
|
343
|
-
for (var keyInit1 in valInit)
|
|
296
|
+
for (var keyInit1 in valInit)
|
|
297
|
+
viewProps[`data-${hyphenate(keyInit1)}`] = valInit[keyInit1];
|
|
344
298
|
continue;
|
|
345
299
|
}
|
|
346
|
-
if (0 && !noExpand)
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant,
|
|
350
|
-
isPseudo = keyInit in validPseudoKeys,
|
|
351
|
-
isMedia = !isStyleLikeKey && !isPseudo && isMediaKey(keyInit),
|
|
352
|
-
isMediaOrPseudo1 = !!(isMedia || isPseudo);
|
|
300
|
+
if (0 && !noExpand)
|
|
301
|
+
var didUseKeyInit;
|
|
302
|
+
var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && isMediaKey(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
|
|
353
303
|
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
|
|
354
304
|
var name = keyInit.split("-")[1];
|
|
355
305
|
context?.groups.subscribe && !context?.groups.state[name] && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
356
306
|
}
|
|
357
307
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
|
|
358
308
|
if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
|
|
359
|
-
var shouldPassProp = !isStyleProp ||
|
|
360
|
-
|
|
361
|
-
isHOC && parentVariants && keyInit in parentVariants || inlineProps?.has(keyInit),
|
|
362
|
-
parentVariant = parentVariants?.[keyInit],
|
|
363
|
-
isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in skipProps)),
|
|
364
|
-
shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
309
|
+
var shouldPassProp = !isStyleProp || // is in parent variants
|
|
310
|
+
isHOC && parentVariants && keyInit in parentVariants || inlineProps?.has(keyInit), parentVariant = parentVariants?.[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
365
311
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`), log({
|
|
366
312
|
isVariant,
|
|
367
313
|
valInit,
|
|
@@ -381,8 +327,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
|
|
|
381
327
|
continue;
|
|
382
328
|
}
|
|
383
329
|
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
384
|
-
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit,
|
|
385
|
-
expanded = avoidPropMap ? null : propMapper(keyInit, valInit, styleState);
|
|
330
|
+
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : propMapper(keyInit, valInit, styleState);
|
|
386
331
|
if (!avoidPropMap) {
|
|
387
332
|
if (!expanded) continue;
|
|
388
333
|
var next = getPropMappedFontFamily(expanded);
|
|
@@ -409,7 +354,8 @@ usedKeys`, {
|
|
|
409
354
|
current`, {
|
|
410
355
|
...styleState.style
|
|
411
356
|
}), globalThis.tamaguiAvoidTracking = !1);
|
|
412
|
-
} catch {
|
|
357
|
+
} catch {
|
|
358
|
+
}
|
|
413
359
|
console.groupEnd();
|
|
414
360
|
}
|
|
415
361
|
for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) _loop(i);
|
|
@@ -422,7 +368,8 @@ current`, {
|
|
|
422
368
|
}), log("viewProps", {
|
|
423
369
|
...viewProps
|
|
424
370
|
});
|
|
425
|
-
} catch {
|
|
371
|
+
} catch {
|
|
372
|
+
}
|
|
426
373
|
console.groupEnd();
|
|
427
374
|
}
|
|
428
375
|
}
|
|
@@ -432,78 +379,92 @@ current`, {
|
|
|
432
379
|
if (!avoidNormalize) {
|
|
433
380
|
if (styleState.style && (fixStyles(styleState.style), isWeb && !isReactNative && styleToCSS(styleState.style)), styleState.flatTransforms) {
|
|
434
381
|
var _styleState1;
|
|
435
|
-
(_styleState1 = styleState).style || (_styleState1.style = {}), Object.entries(styleState.flatTransforms).sort(function
|
|
436
|
-
var [a] = param,
|
|
437
|
-
[b] = param1;
|
|
382
|
+
(_styleState1 = styleState).style || (_styleState1.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
|
|
383
|
+
var [a] = param, [b] = param1;
|
|
438
384
|
return sortString(a, b);
|
|
439
|
-
}).forEach(function
|
|
385
|
+
}).forEach(function(param) {
|
|
440
386
|
var [key5, val3] = param;
|
|
441
387
|
mergeTransform(styleState.style, key5, val3, !0);
|
|
442
388
|
});
|
|
443
389
|
}
|
|
444
390
|
if (parentSplitStyles) {
|
|
445
|
-
if (0 && shouldDoClasses)
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
391
|
+
if (0 && shouldDoClasses)
|
|
392
|
+
for (var key1 in parentSplitStyles.classNames)
|
|
393
|
+
var val1;
|
|
394
|
+
if (!shouldDoClasses)
|
|
395
|
+
for (var key2 in parentSplitStyles.style) {
|
|
396
|
+
var _styleState2;
|
|
397
|
+
key2 in classNames || styleState.style && key2 in styleState.style || ((_styleState2 = styleState).style || (_styleState2.style = {}), styleState.style[key2] = parentSplitStyles.style[key2]);
|
|
398
|
+
}
|
|
450
399
|
}
|
|
451
400
|
}
|
|
452
|
-
if (0)
|
|
401
|
+
if (0)
|
|
402
|
+
var _styleState_style, shouldStringifyTransforms;
|
|
453
403
|
if (0) {
|
|
454
404
|
if (styleState.style && shouldDoClasses) {
|
|
455
405
|
var retainedStyles, shouldRetain;
|
|
456
406
|
if (!styleState.style.$$css) {
|
|
457
407
|
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
458
408
|
try {
|
|
459
|
-
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0)
|
|
460
|
-
|
|
461
|
-
|
|
409
|
+
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0)
|
|
410
|
+
var atomicStyle, _props_animateOnly, key3, value, identifier1, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
411
|
+
} catch (err) {
|
|
412
|
+
} finally {
|
|
413
|
+
try {
|
|
414
|
+
} finally {
|
|
415
|
+
}
|
|
462
416
|
}
|
|
463
417
|
}
|
|
464
|
-
if (transforms)
|
|
465
|
-
var
|
|
466
|
-
|
|
467
|
-
|
|
418
|
+
if (transforms)
|
|
419
|
+
for (var namespace in transforms) {
|
|
420
|
+
var hash, val2, identifier2;
|
|
421
|
+
if (isClient && !insertedTransforms[identifier2])
|
|
422
|
+
var rule;
|
|
423
|
+
}
|
|
468
424
|
}
|
|
469
425
|
if (isReactNative) {
|
|
470
|
-
if (viewProps.tabIndex === 0)
|
|
471
|
-
|
|
426
|
+
if (viewProps.tabIndex === 0)
|
|
427
|
+
var _viewProps1, _accessible;
|
|
428
|
+
} else if (viewProps.tabIndex == null)
|
|
429
|
+
var _viewProps_focusable, isFocusable, role;
|
|
472
430
|
}
|
|
473
431
|
var styleProp = props.style;
|
|
474
|
-
if (styleProp)
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
(
|
|
479
|
-
|
|
480
|
-
|
|
432
|
+
if (styleProp)
|
|
433
|
+
if (isHOC)
|
|
434
|
+
viewProps.style = normalizeStyle(styleProp);
|
|
435
|
+
else
|
|
436
|
+
for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i1 = 0; i1 < len; i1++) {
|
|
437
|
+
var style = isArray ? styleProp[i1] : styleProp;
|
|
438
|
+
if (style)
|
|
439
|
+
if (style.$$css)
|
|
440
|
+
Object.assign(styleState.classNames, style);
|
|
441
|
+
else {
|
|
442
|
+
var _styleState3;
|
|
443
|
+
(_styleState3 = styleState).style || (_styleState3.style = {}), Object.assign(styleState.style, normalizeStyle(style));
|
|
444
|
+
}
|
|
445
|
+
}
|
|
481
446
|
var style1 = styleState.style;
|
|
482
447
|
if (style1?.fontFamily) {
|
|
483
|
-
var _getFont,
|
|
484
|
-
faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
448
|
+
var _getFont, faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
485
449
|
if (faceInfo) {
|
|
486
|
-
var _faceInfo_style_fontWeight_,
|
|
487
|
-
_faceInfo_style_fontWeight,
|
|
488
|
-
overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 || (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
|
|
450
|
+
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight, overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 || (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
|
|
489
451
|
overrideFace && (style1.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style1.fontWeight, delete style1.fontStyle);
|
|
490
452
|
}
|
|
491
453
|
process.env.NODE_ENV === "development" && debug && debug !== "profile" && log(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
|
|
492
454
|
}
|
|
493
455
|
var result = {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
456
|
+
space,
|
|
457
|
+
hasMedia,
|
|
458
|
+
fontFamily: styleState.fontFamily,
|
|
459
|
+
viewProps,
|
|
460
|
+
style: styleState.style,
|
|
461
|
+
pseudos,
|
|
462
|
+
classNames,
|
|
463
|
+
rulesToInsert,
|
|
464
|
+
dynamicThemeAccess,
|
|
465
|
+
pseudoGroups,
|
|
466
|
+
mediaGroups
|
|
467
|
+
}, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
507
468
|
if (!asChildExceptStyleLike) {
|
|
508
469
|
var style2 = styleState.style;
|
|
509
470
|
if (0) {
|
|
@@ -513,14 +474,19 @@ current`, {
|
|
|
513
474
|
if (isReactNative) {
|
|
514
475
|
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
515
476
|
try {
|
|
516
|
-
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0)
|
|
517
|
-
|
|
518
|
-
|
|
477
|
+
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0)
|
|
478
|
+
var name1;
|
|
479
|
+
} catch (err) {
|
|
480
|
+
} finally {
|
|
481
|
+
try {
|
|
482
|
+
} finally {
|
|
483
|
+
}
|
|
519
484
|
}
|
|
520
485
|
}
|
|
521
486
|
}
|
|
522
487
|
}
|
|
523
|
-
} else
|
|
488
|
+
} else
|
|
489
|
+
style2 && !styleProps.noMergeStyle && (viewProps.style = style2);
|
|
524
490
|
}
|
|
525
491
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && isDevTools) {
|
|
526
492
|
consoleGroupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
@@ -534,26 +500,21 @@ current`, {
|
|
|
534
500
|
rulesToInsert,
|
|
535
501
|
parentSplitStyles
|
|
536
502
|
};
|
|
537
|
-
for (var key4 in logs)
|
|
538
|
-
|
|
503
|
+
for (var key4 in logs)
|
|
504
|
+
log(key4, logs[key4]);
|
|
505
|
+
} catch {
|
|
506
|
+
}
|
|
539
507
|
console.groupEnd();
|
|
540
508
|
}
|
|
541
509
|
return result;
|
|
542
510
|
};
|
|
543
511
|
function mergeClassName(transforms, classNames, key, val) {
|
|
544
|
-
var isMediaOrPseudo = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1,
|
|
545
|
-
|
|
546
|
-
|
|
512
|
+
var isMediaOrPseudo = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, isInsertingNow = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1;
|
|
513
|
+
if (0 && !isInsertingNow && val[0] === "_" && val.startsWith("_transform-"))
|
|
514
|
+
var _transforms, _ns, ns, transform;
|
|
547
515
|
}
|
|
548
516
|
function mergeStyle(styleState, key, val) {
|
|
549
|
-
var disableNormalize = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1,
|
|
550
|
-
{
|
|
551
|
-
classNames,
|
|
552
|
-
viewProps,
|
|
553
|
-
usedKeys,
|
|
554
|
-
styleProps,
|
|
555
|
-
staticConfig
|
|
556
|
-
} = styleState;
|
|
517
|
+
var disableNormalize = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, { classNames, viewProps, usedKeys, styleProps, staticConfig } = styleState;
|
|
557
518
|
if (isWeb && val?.[0] === "_") {
|
|
558
519
|
var _usedKeys, _key;
|
|
559
520
|
classNames[key] = val, (_usedKeys = usedKeys)[_key = key] || (_usedKeys[_key] = 1);
|
|
@@ -561,90 +522,83 @@ function mergeStyle(styleState, key, val) {
|
|
|
561
522
|
var _styleState;
|
|
562
523
|
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
563
524
|
} else {
|
|
564
|
-
var shouldNormalize = isWeb && !disableNormalize && !styleProps.noNormalize,
|
|
565
|
-
out = shouldNormalize ? normalizeValueWithProperty(val, key) : val;
|
|
525
|
+
var shouldNormalize = isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? normalizeValueWithProperty(val, key) : val;
|
|
566
526
|
if (
|
|
567
|
-
|
|
568
|
-
|
|
527
|
+
// accept is for props not styles
|
|
528
|
+
staticConfig.accept && key in staticConfig.accept
|
|
529
|
+
)
|
|
530
|
+
viewProps[key] = out;
|
|
531
|
+
else {
|
|
569
532
|
var _styleState1;
|
|
570
533
|
(_styleState1 = styleState).style || (_styleState1.style = {}), styleState.style[key] = out;
|
|
571
534
|
}
|
|
572
535
|
}
|
|
573
536
|
}
|
|
574
|
-
var getSubStyle = function
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
537
|
+
var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
|
|
538
|
+
var { staticConfig, conf: conf2, styleProps } = styleState, styleOut = {};
|
|
539
|
+
for (var key in styleIn) {
|
|
540
|
+
var val = styleIn[key];
|
|
541
|
+
key = conf2.shorthands[key] || key;
|
|
542
|
+
var expanded = propMapper(key, val, styleState);
|
|
543
|
+
if (!(!expanded || !staticConfig.isHOC && key in skipProps && !styleProps.noSkip)) {
|
|
544
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
545
|
+
try {
|
|
546
|
+
for (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
547
|
+
var [skey, sval] = _step.value;
|
|
548
|
+
skey in validPseudoKeys && (sval = getSubStyle(styleState, skey, sval, avoidMergeTransform)), !avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : normalizeValueWithProperty(sval, key);
|
|
549
|
+
}
|
|
550
|
+
} catch (err) {
|
|
551
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
552
|
+
} finally {
|
|
589
553
|
try {
|
|
590
|
-
|
|
591
|
-
var [skey, sval] = _step.value;
|
|
592
|
-
skey in validPseudoKeys && (sval = getSubStyle(styleState, skey, sval, avoidMergeTransform)), !avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : normalizeValueWithProperty(sval, key);
|
|
593
|
-
}
|
|
594
|
-
} catch (err) {
|
|
595
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
554
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
596
555
|
} finally {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
} finally {
|
|
600
|
-
if (_didIteratorError) throw _iteratorError;
|
|
601
|
-
}
|
|
556
|
+
if (_didIteratorError)
|
|
557
|
+
throw _iteratorError;
|
|
602
558
|
}
|
|
603
559
|
}
|
|
604
560
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
561
|
+
}
|
|
562
|
+
return styleProps.noNormalize || fixStyles(styleOut), styleOut;
|
|
563
|
+
}, useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : function() {
|
|
564
|
+
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j) {
|
|
565
|
+
conf = conf || getConfig();
|
|
566
|
+
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j);
|
|
567
|
+
return res;
|
|
568
|
+
};
|
|
613
569
|
function addStyleToInsertRules(rulesToInsert, styleObject) {
|
|
614
|
-
if (0)
|
|
570
|
+
if (0)
|
|
571
|
+
var identifier;
|
|
615
572
|
}
|
|
616
|
-
var defaultColor = process.env.TAMAGUI_DEFAULT_COLOR || "rgba(0,0,0,0)",
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
x: "translateX",
|
|
646
|
-
y: "translateY"
|
|
647
|
-
};
|
|
573
|
+
var defaultColor = process.env.TAMAGUI_DEFAULT_COLOR || "rgba(0,0,0,0)", animatableDefaults = {
|
|
574
|
+
...Object.fromEntries(Object.entries(tokenCategories.color).map(function(param) {
|
|
575
|
+
var [k, v] = param;
|
|
576
|
+
return [
|
|
577
|
+
k,
|
|
578
|
+
defaultColor
|
|
579
|
+
];
|
|
580
|
+
})),
|
|
581
|
+
opacity: 1,
|
|
582
|
+
scale: 1,
|
|
583
|
+
rotate: "0deg",
|
|
584
|
+
rotateY: "0deg",
|
|
585
|
+
rotateX: "0deg",
|
|
586
|
+
x: 0,
|
|
587
|
+
y: 0,
|
|
588
|
+
borderRadius: 0
|
|
589
|
+
}, lowercaseHyphenate = function(match) {
|
|
590
|
+
return `-${match.toLowerCase()}`;
|
|
591
|
+
}, hyphenate = function(str) {
|
|
592
|
+
return str.replace(/[A-Z]/g, lowercaseHyphenate);
|
|
593
|
+
}, mergeTransform = function(obj, key, val) {
|
|
594
|
+
var backwards = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, _obj;
|
|
595
|
+
typeof obj.transform != "string" && ((_obj = obj).transform || (_obj.transform = []), obj.transform[backwards ? "unshift" : "push"]({
|
|
596
|
+
[mapTransformKeys[key] || key]: val
|
|
597
|
+
}));
|
|
598
|
+
}, mapTransformKeys = {
|
|
599
|
+
x: "translateX",
|
|
600
|
+
y: "translateY"
|
|
601
|
+
};
|
|
648
602
|
function passDownProp(viewProps, key, val) {
|
|
649
603
|
var shouldMergeObject = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
|
|
650
604
|
if (shouldMergeObject) {
|
|
@@ -653,18 +607,21 @@ function passDownProp(viewProps, key, val) {
|
|
|
653
607
|
...val
|
|
654
608
|
};
|
|
655
609
|
delete viewProps[key], viewProps[key] = next;
|
|
656
|
-
} else
|
|
610
|
+
} else
|
|
611
|
+
viewProps[key] = val;
|
|
657
612
|
}
|
|
658
613
|
function mergeMediaByImportance(styleState, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump, debugProp) {
|
|
659
614
|
var importance = getMediaImportanceIfMoreImportant(mediaKey, key, importancesUsed, isSizeMedia);
|
|
660
|
-
if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && log(`mergeMediaByImportance ${key} importance existing ${importancesUsed[key]} next ${importance}`), importance === null)
|
|
615
|
+
if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && log(`mergeMediaByImportance ${key} importance existing ${importancesUsed[key]} next ${importance}`), importance === null)
|
|
616
|
+
return !1;
|
|
661
617
|
if (importancesUsed[key] = importance, key in pseudoDescriptors) {
|
|
662
|
-
var descriptor = pseudoDescriptors[key],
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
} else
|
|
618
|
+
var descriptor = pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
619
|
+
if (isDisabled)
|
|
620
|
+
return !1;
|
|
621
|
+
for (var subKey in value)
|
|
622
|
+
mergeStyle(styleState, subKey, value[subKey]);
|
|
623
|
+
} else
|
|
624
|
+
mergeStyle(styleState, key, value);
|
|
668
625
|
return !0;
|
|
669
626
|
}
|
|
670
627
|
function normalizeStyle(style) {
|
|
@@ -679,5 +636,10 @@ function applyDefaultStyle(pkey, styleState) {
|
|
|
679
636
|
var defaultValues = animatableDefaults[pkey];
|
|
680
637
|
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
681
638
|
}
|
|
682
|
-
export {
|
|
683
|
-
|
|
639
|
+
export {
|
|
640
|
+
PROP_SPLIT,
|
|
641
|
+
getSplitStyles,
|
|
642
|
+
getSubStyle,
|
|
643
|
+
useSplitStyles
|
|
644
|
+
};
|
|
645
|
+
//# sourceMappingURL=getSplitStyles.js.map
|