@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.
Files changed (197) hide show
  1. package/dist/esm/Tamagui.native.js +50 -41
  2. package/dist/esm/Tamagui.native.js.map +6 -1
  3. package/dist/esm/_withStableStyle.native.js +9 -11
  4. package/dist/esm/_withStableStyle.native.js.map +6 -1
  5. package/dist/esm/config.native.js +74 -75
  6. package/dist/esm/config.native.js.map +6 -1
  7. package/dist/esm/constants/accessibilityDirectMap.native.js +8 -6
  8. package/dist/esm/constants/accessibilityDirectMap.native.js.map +6 -1
  9. package/dist/esm/constants/constants.native.js +19 -17
  10. package/dist/esm/constants/constants.native.js.map +6 -1
  11. package/dist/esm/constants/isDevTools.native.js +10 -6
  12. package/dist/esm/constants/isDevTools.native.js.map +6 -1
  13. package/dist/esm/constants/webToNativeProps.native.js +162 -84
  14. package/dist/esm/constants/webToNativeProps.native.js.map +6 -1
  15. package/dist/esm/contexts/ComponentContext.native.js +5 -3
  16. package/dist/esm/contexts/ComponentContext.native.js.map +6 -1
  17. package/dist/esm/createComponent.native.js +300 -405
  18. package/dist/esm/createComponent.native.js.map +6 -1
  19. package/dist/esm/createFont.native.js +41 -24
  20. package/dist/esm/createFont.native.js.map +6 -1
  21. package/dist/esm/createShorthands.native.js +4 -2
  22. package/dist/esm/createShorthands.native.js.map +6 -1
  23. package/dist/esm/createTamagui.native.js +158 -177
  24. package/dist/esm/createTamagui.native.js.map +6 -1
  25. package/dist/esm/createTheme.native.js +5 -3
  26. package/dist/esm/createTheme.native.js.map +6 -1
  27. package/dist/esm/createTokens.native.js +5 -3
  28. package/dist/esm/createTokens.native.js.map +6 -1
  29. package/dist/esm/createVariable.native.js +35 -29
  30. package/dist/esm/createVariable.native.js.map +6 -1
  31. package/dist/esm/createVariables.native.js +29 -34
  32. package/dist/esm/createVariables.native.js.map +6 -1
  33. package/dist/esm/defaultComponentState.native.js +20 -18
  34. package/dist/esm/defaultComponentState.native.js.map +6 -1
  35. package/dist/esm/helpers/ThemeManager.native.js +101 -95
  36. package/dist/esm/helpers/ThemeManager.native.js.map +6 -1
  37. package/dist/esm/helpers/ThemeManagerContext.native.js +5 -3
  38. package/dist/esm/helpers/ThemeManagerContext.native.js.map +6 -1
  39. package/dist/esm/helpers/createMediaStyle.native.js +49 -64
  40. package/dist/esm/helpers/createMediaStyle.native.js.map +6 -1
  41. package/dist/esm/helpers/createShallowSetState.native.js +17 -9
  42. package/dist/esm/helpers/createShallowSetState.native.js.map +6 -1
  43. package/dist/esm/helpers/createStyledContext.native.js +25 -31
  44. package/dist/esm/helpers/createStyledContext.native.js.map +6 -1
  45. package/dist/esm/helpers/defaultOffset.native.js +4 -2
  46. package/dist/esm/helpers/defaultOffset.native.js.map +6 -1
  47. package/dist/esm/helpers/expandStyle.native.js +84 -39
  48. package/dist/esm/helpers/expandStyle.native.js.map +6 -1
  49. package/dist/esm/helpers/expandStyles.native.js +17 -15
  50. package/dist/esm/helpers/expandStyles.native.js.map +6 -1
  51. package/dist/esm/helpers/getExpandedShorthands.native.js +7 -4
  52. package/dist/esm/helpers/getExpandedShorthands.native.js.map +6 -1
  53. package/dist/esm/helpers/getFontLanguage.native.js +5 -3
  54. package/dist/esm/helpers/getFontLanguage.native.js.map +6 -1
  55. package/dist/esm/helpers/getGroupPropParts.native.js +6 -7
  56. package/dist/esm/helpers/getGroupPropParts.native.js.map +6 -1
  57. package/dist/esm/helpers/getSplitStyles.native.js +398 -436
  58. package/dist/esm/helpers/getSplitStyles.native.js.map +6 -1
  59. package/dist/esm/helpers/getStylesAtomic.native.js +8 -7
  60. package/dist/esm/helpers/getStylesAtomic.native.js.map +6 -1
  61. package/dist/esm/helpers/getThemeCSSRules.native.js +3 -1
  62. package/dist/esm/helpers/getThemeCSSRules.native.js.map +6 -1
  63. package/dist/esm/helpers/getVariantExtras.native.js +34 -33
  64. package/dist/esm/helpers/getVariantExtras.native.js.map +6 -1
  65. package/dist/esm/helpers/insertStyleRule.native.js +111 -123
  66. package/dist/esm/helpers/insertStyleRule.native.js.map +6 -1
  67. package/dist/esm/helpers/isActivePlatform.native.js +5 -4
  68. package/dist/esm/helpers/isActivePlatform.native.js.map +6 -1
  69. package/dist/esm/helpers/isObj.native.js +5 -3
  70. package/dist/esm/helpers/isObj.native.js.map +6 -1
  71. package/dist/esm/helpers/isTamaguiComponent.native.js +4 -2
  72. package/dist/esm/helpers/isTamaguiComponent.native.js.map +6 -1
  73. package/dist/esm/helpers/isTamaguiElement.native.js +7 -5
  74. package/dist/esm/helpers/isTamaguiElement.native.js.map +6 -1
  75. package/dist/esm/helpers/log.native.js +7 -4
  76. package/dist/esm/helpers/log.native.js.map +6 -1
  77. package/dist/esm/helpers/matchMedia.native.js +14 -9
  78. package/dist/esm/helpers/matchMedia.native.js.map +6 -1
  79. package/dist/esm/helpers/mergeProps.native.js +13 -9
  80. package/dist/esm/helpers/mergeProps.native.js.map +6 -1
  81. package/dist/esm/helpers/mergeVariants.native.js +7 -7
  82. package/dist/esm/helpers/mergeVariants.native.js.map +6 -1
  83. package/dist/esm/helpers/normalizeColor.native.js +24 -20
  84. package/dist/esm/helpers/normalizeColor.native.js.map +6 -1
  85. package/dist/esm/helpers/normalizeShadow.native.js +7 -15
  86. package/dist/esm/helpers/normalizeShadow.native.js.map +6 -1
  87. package/dist/esm/helpers/normalizeStyle.native.js +12 -13
  88. package/dist/esm/helpers/normalizeStyle.native.js.map +6 -1
  89. package/dist/esm/helpers/normalizeStylePropKeys.native.js +3 -1
  90. package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +6 -1
  91. package/dist/esm/helpers/normalizeValueWithProperty.native.js +12 -9
  92. package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +6 -1
  93. package/dist/esm/helpers/objectIdentityKey.native.js +11 -6
  94. package/dist/esm/helpers/objectIdentityKey.native.js.map +6 -1
  95. package/dist/esm/helpers/propMapper.native.js +206 -227
  96. package/dist/esm/helpers/propMapper.native.js.map +6 -1
  97. package/dist/esm/helpers/proxyThemeToParents.native.js +27 -39
  98. package/dist/esm/helpers/proxyThemeToParents.native.js.map +6 -1
  99. package/dist/esm/helpers/proxyThemeVariables.native.js +5 -3
  100. package/dist/esm/helpers/proxyThemeVariables.native.js.map +6 -1
  101. package/dist/esm/helpers/pseudoDescriptors.native.js +46 -44
  102. package/dist/esm/helpers/pseudoDescriptors.native.js.map +6 -1
  103. package/dist/esm/helpers/registerCSSVariable.native.js +13 -11
  104. package/dist/esm/helpers/registerCSSVariable.native.js.map +6 -1
  105. package/dist/esm/helpers/setElementProps.native.js +6 -3
  106. package/dist/esm/helpers/setElementProps.native.js.map +6 -1
  107. package/dist/esm/helpers/skipProps.native.js +5 -3
  108. package/dist/esm/helpers/skipProps.native.js.map +6 -1
  109. package/dist/esm/helpers/sortString.native.js +5 -3
  110. package/dist/esm/helpers/sortString.native.js.map +6 -1
  111. package/dist/esm/helpers/subscribeToContextGroup.native.js +18 -27
  112. package/dist/esm/helpers/subscribeToContextGroup.native.js.map +6 -1
  113. package/dist/esm/helpers/themeable.native.js +24 -31
  114. package/dist/esm/helpers/themeable.native.js.map +6 -1
  115. package/dist/esm/helpers/themes.native.js +5 -3
  116. package/dist/esm/helpers/themes.native.js.map +6 -1
  117. package/dist/esm/helpers/timer.native.js +5 -3
  118. package/dist/esm/helpers/timer.native.js.map +6 -1
  119. package/dist/esm/helpers/transformsToString.native.js +13 -11
  120. package/dist/esm/helpers/transformsToString.native.js.map +6 -1
  121. package/dist/esm/helpers/webPropsToSkip.native.js +3 -1
  122. package/dist/esm/helpers/webPropsToSkip.native.js.map +6 -1
  123. package/dist/esm/hooks/useComponentState.native.js +32 -66
  124. package/dist/esm/hooks/useComponentState.native.js.map +6 -1
  125. package/dist/esm/hooks/useConfiguration.native.js +8 -14
  126. package/dist/esm/hooks/useConfiguration.native.js.map +6 -1
  127. package/dist/esm/hooks/useDidHydrateOnce.native.js +15 -14
  128. package/dist/esm/hooks/useDidHydrateOnce.native.js.map +6 -1
  129. package/dist/esm/hooks/useDisableSSR.native.js +5 -3
  130. package/dist/esm/hooks/useDisableSSR.native.js.map +6 -1
  131. package/dist/esm/hooks/useIsTouchDevice.native.js +5 -3
  132. package/dist/esm/hooks/useIsTouchDevice.native.js.map +6 -1
  133. package/dist/esm/hooks/useMedia.native.js +104 -106
  134. package/dist/esm/hooks/useMedia.native.js.map +6 -1
  135. package/dist/esm/hooks/useProps.native.js +42 -41
  136. package/dist/esm/hooks/useProps.native.js.map +6 -1
  137. package/dist/esm/hooks/useTheme.native.js +231 -253
  138. package/dist/esm/hooks/useTheme.native.js.map +6 -1
  139. package/dist/esm/hooks/useThemeName.native.js +16 -12
  140. package/dist/esm/hooks/useThemeName.native.js.map +6 -1
  141. package/dist/esm/index.native.js +78 -61
  142. package/dist/esm/index.native.js.map +6 -1
  143. package/dist/esm/inject-styles.native.js +12 -15
  144. package/dist/esm/inject-styles.native.js.map +6 -1
  145. package/dist/esm/insertFont.native.js +32 -24
  146. package/dist/esm/insertFont.native.js.map +6 -1
  147. package/dist/esm/interfaces/CSSColorNames.native.js +1 -2
  148. package/dist/esm/interfaces/CSSColorNames.native.js.map +6 -1
  149. package/dist/esm/interfaces/GetRef.native.js +1 -2
  150. package/dist/esm/interfaces/GetRef.native.js.map +6 -1
  151. package/dist/esm/interfaces/KeyTypes.native.js +1 -2
  152. package/dist/esm/interfaces/KeyTypes.native.js.map +6 -1
  153. package/dist/esm/interfaces/RNExclusiveTypes.native.js +1 -2
  154. package/dist/esm/interfaces/RNExclusiveTypes.native.js.map +6 -1
  155. package/dist/esm/interfaces/Role.native.js +1 -2
  156. package/dist/esm/interfaces/Role.native.js.map +6 -1
  157. package/dist/esm/interfaces/TamaguiComponentEvents.native.js +1 -2
  158. package/dist/esm/interfaces/TamaguiComponentEvents.native.js.map +6 -1
  159. package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js +1 -2
  160. package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js.map +6 -1
  161. package/dist/esm/interfaces/TamaguiComponentState.native.js +1 -2
  162. package/dist/esm/interfaces/TamaguiComponentState.native.js.map +6 -1
  163. package/dist/esm/interfaces/WebOnlyPressEvents.native.js +1 -2
  164. package/dist/esm/interfaces/WebOnlyPressEvents.native.js.map +6 -1
  165. package/dist/esm/setupHooks.native.js +5 -2
  166. package/dist/esm/setupHooks.native.js.map +6 -1
  167. package/dist/esm/setupReactNative.native.js +13 -5
  168. package/dist/esm/setupReactNative.native.js.map +6 -1
  169. package/dist/esm/styled.native.js +50 -66
  170. package/dist/esm/styled.native.js.map +6 -1
  171. package/dist/esm/type-utils.native.js +1 -2
  172. package/dist/esm/type-utils.native.js.map +6 -1
  173. package/dist/esm/types.native.js +3 -3
  174. package/dist/esm/types.native.js.map +6 -1
  175. package/dist/esm/views/Configuration.native.js +7 -5
  176. package/dist/esm/views/Configuration.native.js.map +6 -1
  177. package/dist/esm/views/FontLanguage.native.js +11 -11
  178. package/dist/esm/views/FontLanguage.native.js.map +6 -1
  179. package/dist/esm/views/FontLanguage.types.native.js +1 -2
  180. package/dist/esm/views/FontLanguage.types.native.js.map +6 -1
  181. package/dist/esm/views/Slot.native.js +31 -33
  182. package/dist/esm/views/Slot.native.js.map +6 -1
  183. package/dist/esm/views/Stack.native.js +6 -4
  184. package/dist/esm/views/Stack.native.js.map +6 -1
  185. package/dist/esm/views/TamaguiProvider.native.js +39 -40
  186. package/dist/esm/views/TamaguiProvider.native.js.map +6 -1
  187. package/dist/esm/views/Text.native.js +30 -27
  188. package/dist/esm/views/Text.native.js.map +6 -1
  189. package/dist/esm/views/Theme.native.js +54 -76
  190. package/dist/esm/views/Theme.native.js.map +6 -1
  191. package/dist/esm/views/ThemeDebug.native.js +4 -6
  192. package/dist/esm/views/ThemeDebug.native.js.map +6 -1
  193. package/dist/esm/views/ThemeProvider.native.js +16 -12
  194. package/dist/esm/views/ThemeProvider.native.js.map +6 -1
  195. package/dist/esm/views/View.native.js +6 -4
  196. package/dist/esm/views/View.native.js.map +6 -1
  197. 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.native.js";
5
- import "../constants/accessibilityDirectMap.native.js";
6
- import "../constants/constants.native.js";
7
- import { isDevTools } from "../constants/isDevTools.native.js";
8
- import { getMediaImportanceIfMoreImportant, mediaState as globalMediaState, isMediaKey, mediaKeyMatch, mediaQueryConfig } from "../hooks/useMedia.native.js";
9
- import { createMediaStyle } from "./createMediaStyle.native.js";
10
- import { fixStyles } from "./expandStyles.native.js";
11
- import { getGroupPropParts } from "./getGroupPropParts.native.js";
12
- import { getStyleAtomic, getStylesAtomic, styleToCSS } from "./getStylesAtomic.native.js";
13
- import "./insertStyleRule.native.js";
14
- import { log } from "./log.native.js";
15
- import { normalizeValueWithProperty } from "./normalizeValueWithProperty.native.js";
16
- import { getPropMappedFontFamily, propMapper } from "./propMapper.native.js";
17
- import { pseudoDescriptors, pseudoPriorities } from "./pseudoDescriptors.native.js";
18
- import { skipProps } from "./skipProps.native.js";
19
- import { transformsToString } from "./transformsToString.native.js";
20
- import { isActivePlatform } from "./isActivePlatform.native.js";
21
- import { sortString } from "./sortString.native.js";
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 (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) {
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
- shorthands
34
- } = conf,
35
- {
36
- isHOC,
37
- isText,
38
- isInput,
39
- variants,
40
- isReactNative,
41
- inlineProps,
42
- inlineWhenUnflattened,
43
- parentStaticConfig,
44
- acceptsClassName
45
- } = staticConfig,
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 (i2) {
104
- var _parentStaticConfig_variants;
105
- if (expanded) {
106
- var [k, v] = expanded[i2];
107
- key = k, val = v;
108
- }
109
- if (val == null || key in usedKeys) return "continue";
110
- 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)) {
111
- var _props_key;
112
- viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
113
- }
114
- var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
115
- if (shouldPassThrough2) return passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(` - passing down prop ${key}`), log({
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
- if (isPseudo) {
122
- if (!val) return "continue";
123
- var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames),
124
- descriptor = pseudoDescriptors[key],
125
- isEnter = key === "enterStyle",
126
- isExit = key === "exitStyle";
127
- if (!descriptor) return "continue";
128
- if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
129
- var _pseudos, _key;
130
- if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") return Object.assign(pseudos[key], pseudoStyleObject), "continue";
131
- }
132
- if (shouldDoClasses && !isExit) {
133
- var pseudoStyles = getStyleAtomic(pseudoStyleObject, descriptor);
134
- process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key), log({
135
- pseudoStyleObject,
136
- pseudoStyles
137
- }), console.groupEnd());
138
- var _iteratorNormalCompletion2 = !0,
139
- _didIteratorError2 = !1,
140
- _iteratorError2 = void 0;
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
- for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
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
- try {
151
- !_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
152
- } finally {
153
- if (_didIteratorError2) throw _iteratorError2;
154
- }
104
+ if (_didIteratorError2)
105
+ throw _iteratorError2;
155
106
  }
156
107
  }
157
- if (!shouldDoClasses || isExit || isEnter) {
158
- var descriptorKey = descriptor.stateKey || descriptor.name,
159
- isDisabled = componentState[descriptorKey] === !1;
160
- isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key, {
161
- isDisabled
162
- }), log({
163
- pseudoStyleObject,
164
- isDisabled,
165
- descriptor,
166
- componentState
167
- }), console.groupEnd());
168
- var importance = descriptor.priority;
169
- for (var pkey in pseudoStyleObject) {
170
- var val12 = pseudoStyleObject[pkey];
171
- if (isDisabled) applyDefaultStyle(pkey, styleState);else {
172
- var curImportance = usedKeys[pkey] || 0,
173
- shouldMerge = importance >= curImportance;
174
- if (shouldMerge) {
175
- var _pseudos1, _key1;
176
- pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val12, mergeStyle(styleState, pkey, val12);
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
- if (!isDisabled) for (var key12 in val) {
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
- if (isMedia) {
194
- if (!val) return "continue";
195
- var hasSpace = val.space,
196
- mediaKeyShort = key.slice(isMedia == "theme" ? 7 : 1);
197
- if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (typeof hasMedia != "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !isActivePlatform(key)) return "continue";
198
- if (process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} ${key}`, {
199
- key,
200
- val,
201
- props,
202
- shouldDoClasses,
203
- acceptsClassName,
204
- componentState,
205
- mediaState
206
- }), shouldDoClasses) {
207
- var mediaStyle = getSubStyle(styleState, key, val, !1);
208
- if (hasSpace && (delete mediaStyle.space, mediaState[mediaKeyShort])) {
209
- var importance1 = getMediaImportanceIfMoreImportant(mediaKeyShort, "space", usedKeys, !0);
210
- 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})`));
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
- var mediaStyles = getStylesAtomic(mediaStyle),
213
- priority = mediaStylesSeen;
214
- mediaStylesSeen += 1;
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
- for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
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
- try {
233
- !_iteratorNormalCompletion12 && _iterator12.return != null && _iterator12.return();
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
- var mediaStyle1 = getSubStyle(styleState, key, val, !0),
254
- importanceBump = 0;
255
- if (isThemeMedia) {
256
- dynamicThemeAccess = !0;
257
- var mediaThemeName = mediaKeyShort.slice(6);
258
- if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) return "continue";
259
- } else if (isGroupMedia) {
260
- var _componentState_group,
261
- groupInfo = getGroupPropParts(mediaKeyShort),
262
- groupName = groupInfo.name,
263
- groupContext = context?.groups.state[groupName];
264
- if (!groupContext) return process.env.NODE_ENV === "development" && debug && log(`No parent with group prop, skipping styles: ${groupName}`), "continue";
265
- var groupPseudoKey = groupInfo.pseudo,
266
- groupMediaKey = groupInfo.media,
267
- componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
268
- if (groupMediaKey) {
269
- mediaGroups || (mediaGroups = /* @__PURE__ */new Set()), mediaGroups.add(groupMediaKey);
270
- var mediaState1 = componentGroupState?.media,
271
- isActive = mediaState1?.[groupMediaKey];
272
- 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) {
273
- for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
274
- return "continue";
275
- }
276
- importanceBump = 2;
277
- }
278
- if (groupPseudoKey) {
279
- pseudoGroups || (pseudoGroups = /* @__PURE__ */new Set()), pseudoGroups.add(groupName);
280
- var componentGroupPseudoState = (componentGroupState ||
281
- // fallback to context initially
282
- context.groups.state[groupName]).pseudo,
283
- isActive1 = componentGroupPseudoState?.[groupPseudoKey],
284
- priority1 = pseudoPriorities[groupPseudoKey];
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
- for (var subKey in mediaStyle1) {
293
- if (subKey === "space") {
294
- space = valInit.space;
295
- continue;
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
- if (subKey[0] === "$") {
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
- return "continue";
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
- if (key === "pointerEvents") return viewProps[key] = val, "continue";
306
- if (
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")) return mergeStyle(styleState, key, val), "continue";
310
- if (!isVariant) {
311
- if (styleProps.styledContextProps && key in styleProps.styledContextProps) return "continue";
312
- viewProps[key] = val;
313
- }
314
- },
315
- keyInit = keyOg,
316
- valInit = props[keyInit];
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) var identifier, containerType, containerCSS;
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-")) var _viewProps, _dataSet;
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) var _styleState;
283
+ if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses)
284
+ var _styleState;
336
285
  }
337
286
  }
338
287
  if (!isValidStyleKeyInit) {
339
- if (!isAndroid && keyInit === "elevationAndroid") continue;
340
- if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";else if (keyInit.startsWith("data-")) continue;
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) viewProps[`data-${hyphenate(keyInit1)}`] = valInit[keyInit1];
296
+ for (var keyInit1 in valInit)
297
+ viewProps[`data-${hyphenate(keyInit1)}`] = valInit[keyInit1];
344
298
  continue;
345
299
  }
346
- if (0 && !noExpand) var didUseKeyInit;
347
- var isShorthand = keyInit in shorthands,
348
- isVariant = !isValidStyleKeyInit && variants && keyInit in variants,
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
- // is in parent variants
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 (param, param1) {
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 (param) {
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) for (var key1 in parentSplitStyles.classNames) var val1;
446
- if (!shouldDoClasses) for (var key2 in parentSplitStyles.style) {
447
- var _styleState2;
448
- key2 in classNames || styleState.style && key2 in styleState.style || ((_styleState2 = styleState).style || (_styleState2.style = {}), styleState.style[key2] = parentSplitStyles.style[key2]);
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) var _styleState_style, shouldStringifyTransforms;
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) var atomicStyle, _props_animateOnly, key3, value, identifier1, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
460
- } catch (err) {} finally {
461
- try {} finally {}
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) for (var namespace in transforms) {
465
- var hash, val2, identifier2;
466
- if (isClient && !insertedTransforms[identifier2]) var rule;
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) var _viewProps1, _accessible;
471
- } else if (viewProps.tabIndex == null) var _viewProps_focusable, isFocusable, role;
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) if (isHOC) viewProps.style = normalizeStyle(styleProp);else for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i1 = 0; i1 < len; i1++) {
475
- var style = isArray ? styleProp[i1] : styleProp;
476
- if (style) if (style.$$css) Object.assign(styleState.classNames, style);else {
477
- var _styleState3;
478
- (_styleState3 = styleState).style || (_styleState3.style = {}), Object.assign(styleState.style, normalizeStyle(style));
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
- space,
495
- hasMedia,
496
- fontFamily: styleState.fontFamily,
497
- viewProps,
498
- style: styleState.style,
499
- pseudos,
500
- classNames,
501
- rulesToInsert,
502
- dynamicThemeAccess,
503
- pseudoGroups,
504
- mediaGroups
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) var name1;
517
- } catch (err) {} finally {
518
- try {} finally {}
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 style2 && !styleProps.noMergeStyle && (viewProps.style = style2);
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) log(key4, logs[key4]);
538
- } catch {}
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
- isInsertingNow = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1;
546
- if (0 && !isInsertingNow && val[0] === "_" && val.startsWith("_transform-")) var _transforms, _ns, ns, transform;
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
- // accept is for props not styles
568
- staticConfig.accept && key in staticConfig.accept) viewProps[key] = out;else {
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 (styleState, subKey, styleIn, avoidMergeTransform) {
575
- var {
576
- staticConfig,
577
- conf: conf2,
578
- styleProps
579
- } = styleState,
580
- styleOut = {};
581
- for (var key in styleIn) {
582
- var val = styleIn[key];
583
- key = conf2.shorthands[key] || key;
584
- var expanded = propMapper(key, val, styleState);
585
- if (!(!expanded || !staticConfig.isHOC && key in skipProps && !styleProps.noSkip)) {
586
- var _iteratorNormalCompletion = !0,
587
- _didIteratorError = !1,
588
- _iteratorError = void 0;
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
- for (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
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
- try {
598
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
599
- } finally {
600
- if (_didIteratorError) throw _iteratorError;
601
- }
556
+ if (_didIteratorError)
557
+ throw _iteratorError;
602
558
  }
603
559
  }
604
560
  }
605
- return styleProps.noNormalize || fixStyles(styleOut), styleOut;
606
- },
607
- useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : function () {},
608
- useSplitStyles = function (a, b, c, d, e, f, g, h, i, j) {
609
- conf = conf || getConfig();
610
- var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j);
611
- return res;
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) var identifier;
570
+ if (0)
571
+ var identifier;
615
572
  }
616
- var defaultColor = process.env.TAMAGUI_DEFAULT_COLOR || "rgba(0,0,0,0)",
617
- animatableDefaults = {
618
- ...Object.fromEntries(Object.entries(tokenCategories.color).map(function (param) {
619
- var [k, v] = param;
620
- return [k, defaultColor];
621
- })),
622
- opacity: 1,
623
- scale: 1,
624
- rotate: "0deg",
625
- rotateY: "0deg",
626
- rotateX: "0deg",
627
- x: 0,
628
- y: 0,
629
- borderRadius: 0
630
- },
631
- lowercaseHyphenate = function (match) {
632
- return `-${match.toLowerCase()}`;
633
- },
634
- hyphenate = function (str) {
635
- return str.replace(/[A-Z]/g, lowercaseHyphenate);
636
- },
637
- mergeTransform = function (obj, key, val) {
638
- var backwards = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1,
639
- _obj;
640
- typeof obj.transform != "string" && ((_obj = obj).transform || (_obj.transform = []), obj.transform[backwards ? "unshift" : "push"]({
641
- [mapTransformKeys[key] || key]: val
642
- }));
643
- },
644
- mapTransformKeys = {
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 viewProps[key] = val;
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) return !1;
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
- descriptorKey = descriptor.stateKey || descriptor.name,
664
- isDisabled = styleState.componentState[descriptorKey] === !1;
665
- if (isDisabled) return !1;
666
- for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
667
- } else mergeStyle(styleState, key, value);
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 { PROP_SPLIT, getSplitStyles, getSubStyle, useSplitStyles };
683
- //# sourceMappingURL=getSplitStyles.native.js.map
639
+ export {
640
+ PROP_SPLIT,
641
+ getSplitStyles,
642
+ getSubStyle,
643
+ useSplitStyles
644
+ };
645
+ //# sourceMappingURL=getSplitStyles.js.map