@hanzogui/web 7.0.0 → 7.3.0

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 (246) hide show
  1. package/LICENSE +40 -19
  2. package/dist/cjs/_withStableStyle.cjs +1 -1
  3. package/dist/cjs/_withStableStyle.native.js +1 -1
  4. package/dist/cjs/config.cjs +2 -2
  5. package/dist/cjs/config.native.js +2 -2
  6. package/dist/cjs/config.native.js.map +1 -1
  7. package/dist/cjs/constants/constants.cjs +3 -3
  8. package/dist/cjs/constants/constants.native.js +3 -3
  9. package/dist/cjs/createComponent.cjs +307 -530
  10. package/dist/cjs/createComponent.native.js +265 -588
  11. package/dist/cjs/createComponent.native.js.map +1 -1
  12. package/dist/cjs/createGui.cjs +19 -48
  13. package/dist/cjs/createGui.native.js +22 -65
  14. package/dist/cjs/createGui.native.js.map +1 -1
  15. package/dist/cjs/eventHandling.native.js +19 -9
  16. package/dist/cjs/eventHandling.native.js.map +1 -1
  17. package/dist/cjs/helpers/createDesignSystem.cjs +22 -36
  18. package/dist/cjs/helpers/createDesignSystem.native.js +19 -91
  19. package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
  20. package/dist/cjs/helpers/defaultAnimationDriver.cjs +1 -1
  21. package/dist/cjs/helpers/defaultAnimationDriver.native.js +1 -1
  22. package/dist/cjs/helpers/expandStyle.cjs +11 -74
  23. package/dist/cjs/helpers/expandStyle.native.js +29 -81
  24. package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
  25. package/dist/cjs/helpers/expandStyles.cjs +2 -15
  26. package/dist/cjs/helpers/expandStyles.native.js +7 -13
  27. package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
  28. package/dist/cjs/helpers/getSplitStyles.cjs +233 -557
  29. package/dist/cjs/helpers/getSplitStyles.native.js +204 -659
  30. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  31. package/dist/cjs/helpers/getThemeCSSRules.cjs +8 -16
  32. package/dist/cjs/helpers/getTokenForKey.cjs +32 -54
  33. package/dist/cjs/helpers/getTokenForKey.native.js +40 -59
  34. package/dist/cjs/helpers/getTokenForKey.native.js.map +1 -1
  35. package/dist/cjs/helpers/insertStyleRule.cjs +27 -79
  36. package/dist/cjs/helpers/insertStyleRule.native.js +16 -335
  37. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  38. package/dist/cjs/helpers/isActivePlatform.cjs +2 -17
  39. package/dist/cjs/helpers/isActivePlatform.native.js +2 -17
  40. package/dist/cjs/helpers/isActivePlatform.native.js.map +1 -1
  41. package/dist/cjs/helpers/log.cjs +1 -4
  42. package/dist/cjs/helpers/log.native.js +1 -6
  43. package/dist/cjs/helpers/log.native.js.map +1 -1
  44. package/dist/cjs/helpers/propMapper.cjs +37 -110
  45. package/dist/cjs/helpers/propMapper.native.js +54 -131
  46. package/dist/cjs/helpers/propMapper.native.js.map +1 -1
  47. package/dist/cjs/helpers/skipProps.cjs +3 -11
  48. package/dist/cjs/helpers/skipProps.native.js +3 -11
  49. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  50. package/dist/cjs/helpers/useRenderElement.cjs +7 -18
  51. package/dist/cjs/helpers/useRenderElement.native.js +7 -15
  52. package/dist/cjs/helpers/useRenderElement.native.js.map +1 -1
  53. package/dist/cjs/helpers/wrapStyleTags.cjs +11 -15
  54. package/dist/cjs/helpers/wrapStyleTags.native.js +3 -22
  55. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  56. package/dist/cjs/hooks/getThemeProxied.cjs +10 -54
  57. package/dist/cjs/hooks/getThemeProxied.native.js +27 -48
  58. package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
  59. package/dist/cjs/hooks/useTheme.cjs +2 -2
  60. package/dist/cjs/hooks/useTheme.native.js +2 -2
  61. package/dist/cjs/hooks/useTheme.native.js.map +1 -1
  62. package/dist/cjs/hooks/useThemeState.cjs +66 -124
  63. package/dist/cjs/hooks/useThemeState.native.js +64 -142
  64. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  65. package/dist/cjs/insertFont.cjs +6 -15
  66. package/dist/cjs/insertFont.native.js +7 -23
  67. package/dist/cjs/insertFont.native.js.map +1 -1
  68. package/dist/cjs/setupReactNative.cjs +4 -24
  69. package/dist/cjs/setupReactNative.native.js +5 -26
  70. package/dist/cjs/setupReactNative.native.js.map +1 -1
  71. package/dist/cjs/views/GuiProvider.cjs +4 -6
  72. package/dist/cjs/views/GuiProvider.native.js +5 -7
  73. package/dist/cjs/views/GuiProvider.native.js.map +1 -1
  74. package/dist/cjs/views/Text.cjs +11 -18
  75. package/dist/cjs/views/Text.native.js +6 -14
  76. package/dist/cjs/views/Text.native.js.map +1 -1
  77. package/dist/cjs/views/ThemeProvider.cjs +9 -11
  78. package/dist/cjs/views/ThemeProvider.native.js +3 -16
  79. package/dist/cjs/views/ThemeProvider.native.js.map +1 -1
  80. package/dist/cjs/views/View.native.js.map +1 -1
  81. package/dist/esm/_withStableStyle.mjs +1 -1
  82. package/dist/esm/_withStableStyle.mjs.map +1 -1
  83. package/dist/esm/_withStableStyle.native.js +1 -1
  84. package/dist/esm/config.mjs +2 -2
  85. package/dist/esm/config.mjs.map +1 -1
  86. package/dist/esm/config.native.js +2 -2
  87. package/dist/esm/config.native.js.map +1 -1
  88. package/dist/esm/constants/constants.mjs +3 -3
  89. package/dist/esm/constants/constants.native.js +3 -3
  90. package/dist/esm/createComponent.mjs +311 -536
  91. package/dist/esm/createComponent.mjs.map +1 -1
  92. package/dist/esm/createComponent.native.js +265 -591
  93. package/dist/esm/createComponent.native.js.map +1 -1
  94. package/dist/esm/createGui.mjs +20 -51
  95. package/dist/esm/createGui.mjs.map +1 -1
  96. package/dist/esm/createGui.native.js +24 -70
  97. package/dist/esm/createGui.native.js.map +1 -1
  98. package/dist/esm/createVariables.mjs.map +1 -1
  99. package/dist/esm/createVariables.native.js.map +1 -1
  100. package/dist/esm/eventHandling.native.js +19 -9
  101. package/dist/esm/eventHandling.native.js.map +1 -1
  102. package/dist/esm/helpers/createDesignSystem.mjs +22 -36
  103. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  104. package/dist/esm/helpers/createDesignSystem.native.js +18 -90
  105. package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
  106. package/dist/esm/helpers/defaultAnimationDriver.mjs +1 -1
  107. package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
  108. package/dist/esm/helpers/defaultAnimationDriver.native.js +1 -1
  109. package/dist/esm/helpers/expandStyle.mjs +12 -73
  110. package/dist/esm/helpers/expandStyle.mjs.map +1 -1
  111. package/dist/esm/helpers/expandStyle.native.js +28 -80
  112. package/dist/esm/helpers/expandStyle.native.js.map +1 -1
  113. package/dist/esm/helpers/expandStyles.mjs +2 -15
  114. package/dist/esm/helpers/expandStyles.mjs.map +1 -1
  115. package/dist/esm/helpers/expandStyles.native.js +7 -13
  116. package/dist/esm/helpers/expandStyles.native.js.map +1 -1
  117. package/dist/esm/helpers/getSplitStyles.mjs +236 -560
  118. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  119. package/dist/esm/helpers/getSplitStyles.native.js +205 -662
  120. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  121. package/dist/esm/helpers/getThemeCSSRules.mjs +8 -16
  122. package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
  123. package/dist/esm/helpers/getTokenForKey.mjs +32 -54
  124. package/dist/esm/helpers/getTokenForKey.mjs.map +1 -1
  125. package/dist/esm/helpers/getTokenForKey.native.js +40 -59
  126. package/dist/esm/helpers/getTokenForKey.native.js.map +1 -1
  127. package/dist/esm/helpers/insertStyleRule.mjs +27 -79
  128. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  129. package/dist/esm/helpers/insertStyleRule.native.js +14 -333
  130. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  131. package/dist/esm/helpers/isActivePlatform.mjs +2 -17
  132. package/dist/esm/helpers/isActivePlatform.mjs.map +1 -1
  133. package/dist/esm/helpers/isActivePlatform.native.js +2 -17
  134. package/dist/esm/helpers/isActivePlatform.native.js.map +1 -1
  135. package/dist/esm/helpers/log.mjs +1 -4
  136. package/dist/esm/helpers/log.mjs.map +1 -1
  137. package/dist/esm/helpers/log.native.js +1 -6
  138. package/dist/esm/helpers/log.native.js.map +1 -1
  139. package/dist/esm/helpers/propMapper.mjs +37 -108
  140. package/dist/esm/helpers/propMapper.mjs.map +1 -1
  141. package/dist/esm/helpers/propMapper.native.js +54 -131
  142. package/dist/esm/helpers/propMapper.native.js.map +1 -1
  143. package/dist/esm/helpers/skipProps.mjs +3 -10
  144. package/dist/esm/helpers/skipProps.mjs.map +1 -1
  145. package/dist/esm/helpers/skipProps.native.js +2 -10
  146. package/dist/esm/helpers/skipProps.native.js.map +1 -1
  147. package/dist/esm/helpers/useRenderElement.mjs +9 -22
  148. package/dist/esm/helpers/useRenderElement.mjs.map +1 -1
  149. package/dist/esm/helpers/useRenderElement.native.js +8 -17
  150. package/dist/esm/helpers/useRenderElement.native.js.map +1 -1
  151. package/dist/esm/helpers/wrapStyleTags.mjs +11 -15
  152. package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
  153. package/dist/esm/helpers/wrapStyleTags.native.js +1 -20
  154. package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
  155. package/dist/esm/hooks/getThemeProxied.mjs +11 -52
  156. package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
  157. package/dist/esm/hooks/getThemeProxied.native.js +27 -48
  158. package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
  159. package/dist/esm/hooks/useTheme.mjs +2 -2
  160. package/dist/esm/hooks/useTheme.mjs.map +1 -1
  161. package/dist/esm/hooks/useTheme.native.js +2 -2
  162. package/dist/esm/hooks/useTheme.native.js.map +1 -1
  163. package/dist/esm/hooks/useThemeState.mjs +67 -124
  164. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  165. package/dist/esm/hooks/useThemeState.native.js +64 -142
  166. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  167. package/dist/esm/insertFont.mjs +7 -17
  168. package/dist/esm/insertFont.mjs.map +1 -1
  169. package/dist/esm/insertFont.native.js +7 -24
  170. package/dist/esm/insertFont.native.js.map +1 -1
  171. package/dist/esm/setupReactNative.mjs +4 -24
  172. package/dist/esm/setupReactNative.mjs.map +1 -1
  173. package/dist/esm/setupReactNative.native.js +5 -26
  174. package/dist/esm/setupReactNative.native.js.map +1 -1
  175. package/dist/esm/views/GuiProvider.mjs +4 -6
  176. package/dist/esm/views/GuiProvider.mjs.map +1 -1
  177. package/dist/esm/views/GuiProvider.native.js +5 -7
  178. package/dist/esm/views/GuiProvider.native.js.map +1 -1
  179. package/dist/esm/views/Slot.mjs.map +1 -1
  180. package/dist/esm/views/Text.mjs +11 -18
  181. package/dist/esm/views/Text.mjs.map +1 -1
  182. package/dist/esm/views/Text.native.js +5 -12
  183. package/dist/esm/views/Text.native.js.map +1 -1
  184. package/dist/esm/views/Theme.mjs.map +1 -1
  185. package/dist/esm/views/ThemeProvider.mjs +9 -11
  186. package/dist/esm/views/ThemeProvider.mjs.map +1 -1
  187. package/dist/esm/views/ThemeProvider.native.js +1 -14
  188. package/dist/esm/views/ThemeProvider.native.js.map +1 -1
  189. package/dist/esm/views/View.mjs.map +1 -1
  190. package/dist/esm/views/View.native.js.map +1 -1
  191. package/package.json +30 -23
  192. package/src/_withStableStyle.tsx +2 -2
  193. package/src/config.ts +7 -4
  194. package/src/constants/accessibilityDirectMap.tsx +1 -1
  195. package/src/constants/constants.ts +3 -3
  196. package/src/createComponent.tsx +2 -2
  197. package/src/createGui.ts +2 -2
  198. package/src/eventHandling.native.ts +31 -10
  199. package/src/helpers/createMediaStyle.ts +1 -1
  200. package/src/helpers/defaultAnimationDriver.tsx +1 -1
  201. package/src/helpers/getSplitStyles.tsx +1 -1
  202. package/src/helpers/getTokenForKey.ts +42 -29
  203. package/src/helpers/insertStyleRule.tsx +2 -2
  204. package/src/helpers/isActivePlatform.ts +5 -5
  205. package/src/helpers/mergeProps.ts +1 -1
  206. package/src/helpers/skipProps.ts +1 -1
  207. package/src/helpers/useRenderElement.tsx +4 -1
  208. package/src/hooks/useTheme.tsx +2 -2
  209. package/src/interfaces/GuiComponentPropsBaseBase.tsx +10 -4
  210. package/src/styled.tsx +2 -2
  211. package/src/types.tsx +33 -24
  212. package/src/views/View.tsx +6 -1
  213. package/types/config.d.ts.map +1 -1
  214. package/types/eventHandling.native.d.ts.map +1 -1
  215. package/types/helpers/getTokenForKey.d.ts.map +1 -1
  216. package/types/helpers/isActivePlatform.d.ts +5 -5
  217. package/types/helpers/skipProps.d.ts +1 -1
  218. package/types/helpers/useRenderElement.d.ts.map +1 -1
  219. package/types/helpers/wrapStyleTags.d.ts +1 -1
  220. package/types/helpers/wrapStyleTags.d.ts.map +1 -1
  221. package/types/interfaces/GuiComponentPropsBaseBase.d.ts +3 -3
  222. package/types/interfaces/GuiComponentPropsBaseBase.d.ts.map +1 -1
  223. package/types/styled.d.ts +1 -1
  224. package/types/types.d.ts +17 -17
  225. package/types/types.d.ts.map +1 -1
  226. package/types/views/Configuration.d.ts +1 -1
  227. package/types/views/Configuration.d.ts.map +1 -1
  228. package/types/views/FontLanguage.d.ts +1 -1
  229. package/types/views/FontLanguage.native.d.ts +2 -1
  230. package/types/views/FontLanguage.native.d.ts.map +1 -1
  231. package/types/views/GuiProvider.d.ts +2 -1
  232. package/types/views/GuiProvider.d.ts.map +1 -1
  233. package/types/views/GuiRoot.d.ts +1 -1
  234. package/types/views/GuiRoot.d.ts.map +1 -1
  235. package/types/views/Slot.d.ts +1 -1
  236. package/types/views/ThemeProvider.d.ts +1 -1
  237. package/types/views/ThemeProvider.d.ts.map +1 -1
  238. package/types/views/View.d.ts.map +1 -1
  239. package/.turbo/turbo-build.log +0 -2
  240. package/inject-styles/index.cjs +0 -2
  241. package/inject-styles/index.js +0 -2
  242. package/tsconfig.json +0 -44
  243. package/tsconfig.test.json +0 -9
  244. package/vitest.config.d.ts +0 -3
  245. package/vitest.config.d.ts.map +0 -1
  246. package/vitest.config.ts +0 -14
@@ -32,13 +32,9 @@ var PROP_SPLIT = "-";
32
32
  function normalizeGroupKey(key, groupContext) {
33
33
  var parts = key.split("-");
34
34
  var plen = parts.length;
35
- if (
36
- // check if its actually a simple group selector to avoid breaking selectors
37
- plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]) {
35
+ if (plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]) {
38
36
  var name = parts[1];
39
- if (name !== "true" && groupContext && !groupContext[name]) {
40
- return key.replace("$group-", "$group-true-");
41
- }
37
+ if (name !== "true" && groupContext && !groupContext[name]) return key.replace("$group-", "$group-true-");
42
38
  }
43
39
  return key;
44
40
  }
@@ -53,12 +49,8 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
53
49
  viewProps[keyInit] = valInit;
54
50
  return "continue";
55
51
  }
56
- if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) {
57
- time`before-prop-${keyInit}`;
58
- }
59
- if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") {
60
- return "continue";
61
- }
52
+ if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
53
+ if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return "continue";
62
54
  if (accept) {
63
55
  var accepted = accept[keyInit];
64
56
  if ((accepted === "style" || accepted === "textStyle") && valInit && (typeof valInit === "undefined" ? "undefined" : _type_of(valInit)) === "object") {
@@ -67,9 +59,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
67
59
  }
68
60
  }
69
61
  if (!disableExpandShorthands) {
70
- if (keyInit in shorthands) {
71
- keyInit = shorthands[keyInit];
72
- }
62
+ if (keyInit in shorthands) keyInit = shorthands[keyInit];
73
63
  }
74
64
  if (keyInit === "className") return "continue";
75
65
  if (asChild) {
@@ -77,91 +67,33 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
77
67
  if (defaults) {
78
68
  var _defaults_keyOg;
79
69
  var defaultVal = (_defaults_keyOg = defaults[keyOg2]) !== null && _defaults_keyOg !== void 0 ? _defaults_keyOg : defaults[keyInit];
80
- if (defaultVal !== void 0 && valInit === defaultVal) {
81
- return "continue";
82
- }
70
+ if (defaultVal !== void 0 && valInit === defaultVal) return "continue";
83
71
  }
84
72
  }
85
73
  if (keyInit in skipProps && !noSkip && !isHOC) {
86
74
  var _driver_animations;
87
- if (keyInit === "group") {
88
- if (false) {
89
- var identifier2 = `t_group_${valInit}`;
90
- var containerType = webContainerType || "inline-size";
91
- var containerCSS = ["container", void 0, identifier2, void 0, [`.${identifier2} { container-name: ${valInit}; container-type: ${containerType}; }`]];
92
- addStyleToInsertRules(rulesToInsert, containerCSS);
93
- }
94
- }
95
- if (keyInit === "transition" && typeof valInit === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[valInit])) {} else {
96
- return "continue";
97
- }
75
+ if (keyInit === "group") ;
76
+ if (keyInit === "transition" && typeof valInit === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[valInit])) {} else return "continue";
98
77
  }
99
78
  var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles, accept);
100
- if (false) {
101
- if (staticConfig.isReactNative && keyInit.startsWith("data-")) {
102
- var _viewProps2, _dataSet;
103
- keyInit = keyInit.replace("data-", "");
104
- (_viewProps2 = viewProps)[_dataSet = "dataSet"] || (_viewProps2[_dataSet] = {});
105
- viewProps["dataSet"][keyInit] = valInit;
106
- return "continue";
107
- }
108
- }
109
- if (true) {
110
- if (!isValidStyleKeyInit) {
111
- if (!isAndroid) {
112
- if (keyInit === "elevationAndroid") return "continue";
113
- }
114
- if (keyInit === "userSelect") {
115
- keyInit = "selectable";
116
- valInit = valInit !== "none";
117
- } else if (keyInit.startsWith("data-")) {
118
- return "continue";
119
- }
120
- }
121
- }
122
- if (false) {
123
- if (!noExpand) {
124
- if (keyInit === "disabled" && valInit === true) {
125
- viewProps["aria-disabled"] = true;
126
- if (elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") {
127
- viewProps.disabled = true;
128
- }
129
- if (!(variants === null || variants === void 0 ? void 0 : variants.disabled)) {
130
- return "continue";
131
- }
132
- }
133
- if (keyInit === "testID") {
134
- if (isReactNative) {
135
- viewProps.testID = valInit;
136
- } else {
137
- viewProps["data-testid"] = valInit;
138
- if (styleProps.isAnimated && (driver === null || driver === void 0 ? void 0 : driver.isReactNative)) {
139
- viewProps.testID = valInit;
140
- }
141
- }
142
- return "continue";
143
- }
144
- if (keyInit === "id") {
145
- viewProps.id = valInit;
146
- return "continue";
147
- }
79
+ if (!isValidStyleKeyInit) {
80
+ if (!isAndroid) {
81
+ if (keyInit === "elevationAndroid") return "continue";
148
82
  }
83
+ if (keyInit === "userSelect") {
84
+ keyInit = "selectable";
85
+ valInit = valInit !== "none";
86
+ } else if (keyInit.startsWith("data-")) return "continue";
149
87
  }
150
88
  var isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
151
89
  var isStyleLikeKey = isValidStyleKeyInit || isVariant;
152
90
  var isPseudo = keyInit in validPseudoKeys;
153
91
  var isMedia = !isStyleLikeKey && !isPseudo ? getMediaKey(keyInit) : false;
154
92
  var isMediaOrPseudo = Boolean(isMedia || isPseudo);
155
- if (isMediaOrPseudo && isMedia === "group") {
156
- keyInit = normalizeGroupKey(keyInit, groupContext);
157
- }
93
+ if (isMediaOrPseudo && isMedia === "group") keyInit = normalizeGroupKey(keyInit, groupContext);
158
94
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
159
- if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) {
160
- return "continue";
161
- }
162
- var shouldPassProp = !isStyleProp && isHOC ||
163
- // is in parent variants
164
- isHOC && parentVariants && keyInit in parentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
95
+ if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) return "continue";
96
+ var shouldPassProp = !isStyleProp && isHOC || isHOC && parentVariants && keyInit in parentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
165
97
  var parentVariant = parentVariants === null || parentVariants === void 0 ? void 0 : parentVariants[keyInit];
166
98
  var isHOCShouldPassThrough = Boolean(isHOC && (isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps));
167
99
  var shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
@@ -172,41 +104,31 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
172
104
  valInit,
173
105
  shouldPassProp
174
106
  });
175
- if (isClient) {
176
- log({
177
- variants,
178
- variant: variants === null || variants === void 0 ? void 0 : variants[keyInit],
179
- isVariant,
180
- isHOCShouldPassThrough,
181
- usedKeys: {
182
- ...styleState.usedKeys
183
- },
184
- parentStaticConfig
185
- });
186
- }
107
+ if (isClient) log({
108
+ variants,
109
+ variant: variants === null || variants === void 0 ? void 0 : variants[keyInit],
110
+ isVariant,
111
+ isHOCShouldPassThrough,
112
+ usedKeys: {
113
+ ...styleState.usedKeys
114
+ },
115
+ parentStaticConfig
116
+ });
187
117
  }
188
118
  if (shouldPassThrough) {
189
119
  passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo);
190
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
191
- console.groupEnd();
192
- }
193
- if (!isVariant) {
194
- return "continue";
195
- }
120
+ if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
121
+ if (!isVariant) return "continue";
196
122
  }
197
123
  if (!noSkip) {
198
124
  var _driver_animations1;
199
125
  if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0 ? void 0 : _driver_animations1[valInit]))) {
200
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
201
- console.groupEnd();
202
- }
126
+ if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
203
127
  return "continue";
204
128
  }
205
129
  }
206
130
  if (isText || isInput) {
207
- if (valInit && (keyInit === "fontFamily" || keyInit === shorthands["fontFamily"]) && valInit in conf.fontsParsed) {
208
- styleState.fontFamily = valInit;
209
- }
131
+ if (valInit && (keyInit === "fontFamily" || keyInit === shorthands["fontFamily"]) && valInit in conf.fontsParsed) styleState.fontFamily = valInit;
210
132
  }
211
133
  var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
212
134
  propMapper(keyInit, valInit, styleState, disablePropMap, function (key5, val2, originalVal) {
@@ -217,16 +139,14 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
217
139
  return;
218
140
  }
219
141
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
220
- console.groupCollapsed(" \u{1F4A0} expanded", keyInit, "=>", key5);
142
+ console.groupCollapsed(" 💠 expanded", keyInit, "=>", key5);
221
143
  log(val2);
222
144
  console.groupEnd();
223
145
  }
224
146
  if (val2 == null) return;
225
- if (true) {
226
- if (key5 === "pointerEvents") {
227
- viewProps[key5] = val2;
228
- return;
229
- }
147
+ if (key5 === "pointerEvents") {
148
+ viewProps[key5] = val2;
149
+ return;
230
150
  }
231
151
  if (!isHOC && isValidStyleKey(key5, validStyles, accept) || isAndroid && key5 === "elevation") {
232
152
  mergeStyle(styleState, key5, val2, 1, false, originalVal);
@@ -236,15 +156,12 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
236
156
  isMedia = isPseudo ? false : getMediaKey(key5);
237
157
  isMediaOrPseudo = Boolean(isMedia || isPseudo);
238
158
  isVariant = variants && key5 in variants;
239
- if (isMedia === "group") {
240
- key5 = normalizeGroupKey(key5, groupContext);
241
- }
159
+ if (isMedia === "group") key5 = normalizeGroupKey(key5, groupContext);
242
160
  if ((inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key5)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened === null || inlineWhenUnflattened === void 0 ? void 0 : inlineWhenUnflattened.has(key5))) {
243
161
  var _props_key;
244
162
  viewProps[key5] = (_props_key = props[key5]) !== null && _props_key !== void 0 ? _props_key : val2;
245
163
  }
246
- var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
247
- if (shouldPassThrough2) {
164
+ if (styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]))) {
248
165
  passDownProp(viewProps, key5, val2, isMediaOrPseudo);
249
166
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
250
167
  console.groupCollapsed(` - passing down prop ${key5}`);
@@ -273,14 +190,10 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
273
190
  var descriptor = pseudoDescriptors[key5];
274
191
  var isEnter = key5 === "enterStyle";
275
192
  var isExit = key5 === "exitStyle";
276
- if (!descriptor) {
277
- return;
278
- }
193
+ if (!descriptor) return;
279
194
  if (shouldDoClasses && !isExit) {
280
195
  var pseudoStyles = getStyleAtomic(pseudoStyleObject, descriptor);
281
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
282
- console.info("pseudo:", key5, pseudoStyleObject, pseudoStyles);
283
- }
196
+ if (process.env.NODE_ENV === "development" && debug === "verbose") console.info("pseudo:", key5, pseudoStyleObject, pseudoStyles);
284
197
  var _iteratorNormalCompletion3 = true,
285
198
  _didIteratorError3 = false,
286
199
  _iteratorError3 = void 0;
@@ -296,25 +209,16 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
296
209
  _iteratorError3 = err;
297
210
  } finally {
298
211
  try {
299
- if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
300
- _iterator3.return();
301
- }
212
+ if (!_iteratorNormalCompletion3 && _iterator3.return != null) _iterator3.return();
302
213
  } finally {
303
- if (_didIteratorError3) {
304
- throw _iteratorError3;
305
- }
214
+ if (_didIteratorError3) throw _iteratorError3;
306
215
  }
307
216
  }
308
217
  }
309
218
  if (!shouldDoClasses || isExit || isEnter) {
310
- var descriptorKey = descriptor.stateKey || descriptor.name;
311
- var isDisabled = componentState[descriptorKey] === false;
312
- if (isExit) {
313
- isDisabled = !styleProps.isExiting;
314
- }
315
- if (isEnter && componentState.unmounted === false) {
316
- isDisabled = true;
317
- }
219
+ var isDisabled = componentState[descriptor.stateKey || descriptor.name] === false;
220
+ if (isExit) isDisabled = !styleProps.isExiting;
221
+ if (isEnter && componentState.unmounted === false) isDisabled = true;
318
222
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
319
223
  console.groupCollapsed("pseudo", key5, {
320
224
  isDisabled
@@ -331,9 +235,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
331
235
  var pseudoOriginalValues = styleOriginalValues.get(pseudoStyleObject);
332
236
  for (var pkey in pseudoStyleObject) {
333
237
  var _$val = pseudoStyleObject[pkey];
334
- if (isDisabled) {
335
- applyDefaultStyle(pkey, styleState);
336
- } else {
238
+ if (isDisabled) applyDefaultStyle(pkey, styleState);else {
337
239
  var curImportance = styleState.usedKeys[pkey] || 0;
338
240
  var shouldMerge = importance >= curImportance;
339
241
  if (shouldMerge) {
@@ -345,21 +247,17 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
345
247
  }
346
248
  mergeStyle(styleState, pkey, _$val, importance, false, pseudoOriginalValues === null || pseudoOriginalValues === void 0 ? void 0 : pseudoOriginalValues[pkey]);
347
249
  }
348
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
349
- log(" subKey", pkey, shouldMerge, {
350
- importance,
351
- curImportance,
352
- pkey,
353
- val: _$val
354
- });
355
- }
250
+ if (process.env.NODE_ENV === "development" && debug === "verbose") log(" subKey", pkey, shouldMerge, {
251
+ importance,
252
+ curImportance,
253
+ pkey,
254
+ val: _$val
255
+ });
356
256
  }
357
257
  }
358
- if (!isDisabled) {
359
- for (var _$key in val2) {
360
- var k = shorthands[_$key] || _$key;
361
- styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
362
- }
258
+ if (!isDisabled) for (var _$key in val2) {
259
+ var k = shorthands[_$key] || _$key;
260
+ styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
363
261
  }
364
262
  }
365
263
  return;
@@ -368,34 +266,26 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
368
266
  if (!val2) return;
369
267
  var mediaKeyShort = key5.slice(isMedia == "theme" ? 7 : 1);
370
268
  hasMedia || (hasMedia = true);
371
- var hasSpace = val2["space"];
372
- if (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) {
373
- if (!hasMedia || typeof hasMedia === "boolean") {
374
- hasMedia = /* @__PURE__ */new Set();
375
- }
269
+ if (val2["space"] || !shouldDoClasses || styleProps.willBeAnimated) {
270
+ if (!hasMedia || typeof hasMedia === "boolean") hasMedia = /* @__PURE__ */new Set();
376
271
  hasMedia.add(mediaKeyShort);
377
272
  }
378
273
  if (isMedia === "platform") {
379
- if (!isActivePlatform(key5)) {
380
- return;
381
- }
382
- }
383
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
384
- log(` \u{1F4FA} ${key5}`, {
385
- key: key5,
386
- val: val2,
387
- props,
388
- shouldDoClasses,
389
- acceptsClassName,
390
- componentState,
391
- mediaState
392
- });
393
- }
274
+ if (!isActivePlatform(key5)) return;
275
+ }
276
+ if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F4FA} ${key5}`, {
277
+ key: key5,
278
+ val: val2,
279
+ props,
280
+ shouldDoClasses,
281
+ acceptsClassName,
282
+ componentState,
283
+ mediaState
284
+ });
394
285
  var priority = mediaStylesSeen;
395
286
  mediaStylesSeen += 1;
396
287
  if (shouldDoClasses) {
397
- var mediaStyle = getSubStyle(styleState, key5, val2, false);
398
- var mediaStyles = getCSSStylesAtomic(mediaStyle);
288
+ var mediaStyles = getCSSStylesAtomic(getSubStyle(styleState, key5, val2, false));
399
289
  var _iteratorNormalCompletion12 = true,
400
290
  _didIteratorError12 = false,
401
291
  _iteratorError12 = void 0;
@@ -404,13 +294,9 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
404
294
  var style3 = _step12.value;
405
295
  var property = style3[StyleObjectProperty];
406
296
  var isSubStyle = property[0] === "$";
407
- if (isSubStyle && !isActivePlatform(property)) {
408
- continue;
409
- }
297
+ if (isSubStyle && !isActivePlatform(property)) continue;
410
298
  var out = createMediaStyle(style3, mediaKeyShort, mediaQueryConfig, isMedia, false, priority);
411
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
412
- log(`\u{1F4FA} media style:`, out);
413
- }
299
+ if (process.env.NODE_ENV === "development" && debug === "verbose") log(`\u{1F4FA} media style:`, out);
414
300
  var subKey = isSubStyle ? style3[2] : "";
415
301
  var fullKey1 = `${style3[StyleObjectProperty]}${subKey}${PROP_SPLIT}${mediaKeyShort}${style3[StyleObjectPseudo] || ""}`;
416
302
  addStyleToInsertRules(rulesToInsert, out);
@@ -421,44 +307,30 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
421
307
  _iteratorError12 = err;
422
308
  } finally {
423
309
  try {
424
- if (!_iteratorNormalCompletion12 && _iterator12.return != null) {
425
- _iterator12.return();
426
- }
310
+ if (!_iteratorNormalCompletion12 && _iterator12.return != null) _iterator12.return();
427
311
  } finally {
428
- if (_didIteratorError12) {
429
- throw _iteratorError12;
430
- }
312
+ if (_didIteratorError12) throw _iteratorError12;
431
313
  }
432
314
  }
433
315
  } else {
434
316
  let mergeMediaStyle2 = function (key6, val3, originalVal2) {
435
317
  var _styleState4;
436
- if (process.env.TAMAGUI_TARGET === "native") {
437
- if (!isValidStyleKey(key6, validStyles, accept)) {
438
- viewProps[key6] = val3;
439
- return;
440
- }
318
+ if (!isValidStyleKey(key6, validStyles, accept)) {
319
+ viewProps[key6] = val3;
320
+ return;
441
321
  }
442
322
  (_styleState4 = styleState).style || (_styleState4.style = {});
443
- var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key6, val3, mediaState[mediaKeyShort], importanceBump, debug, originalVal2);
444
- if (didMerge && key6 === "fontFamily") {
445
- styleState.fontFamily = mediaStyle1.fontFamily;
446
- }
323
+ if (mergeMediaByImportance(styleState, mediaKeyShort, key6, val3, mediaState[mediaKeyShort], importanceBump, debug, originalVal2) && key6 === "fontFamily") styleState.fontFamily = mediaStyle1.fontFamily;
447
324
  };
448
- var mergeMediaStyle = mergeMediaStyle2;
449
325
  var isThemeMedia = isMedia === "theme";
450
326
  var isGroupMedia = isMedia === "group";
451
327
  var isPlatformMedia = isMedia === "platform";
452
328
  if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
453
329
  if (!mediaState[mediaKeyShort]) {
454
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
455
- log(` \u{1F4FA} \u274C DISABLED ${mediaKeyShort}`);
456
- }
330
+ if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F4FA} \u274C DISABLED ${mediaKeyShort}`);
457
331
  return;
458
332
  }
459
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
460
- log(` \u{1F4FA} \u2705 ENABLED ${mediaKeyShort}`);
461
- }
333
+ if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F4FA} \u2705 ENABLED ${mediaKeyShort}`);
462
334
  }
463
335
  var mediaStyle1 = getSubStyle(styleState, key5, val2, true);
464
336
  var importanceBump = 0;
@@ -475,31 +347,24 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
475
347
  var existing = styleState.style[subKey1];
476
348
  if (!isColorStyleKey(subKey1)) {
477
349
  dynamicThemeAccess = true;
478
- if (isCurrentScheme) {
479
- mediaStyle1[subKey1] = _$val1;
480
- } else {
481
- delete mediaStyle1[subKey1];
482
- }
350
+ if (isCurrentScheme) mediaStyle1[subKey1] = _$val1;else delete mediaStyle1[subKey1];
483
351
  continue;
484
352
  }
485
353
  if (existing === null || existing === void 0 ? void 0 : existing.dynamic) {
486
354
  existing.dynamic[scheme] = _$val1;
487
355
  mediaStyle1[subKey1] = existing;
488
356
  } else {
489
- var oppositeVal = extractValueFromDynamic(existing, oppositeScheme);
490
357
  mediaStyle1[subKey1] = getDynamicVal({
491
358
  scheme,
492
359
  val: _$val1,
493
- oppositeVal
360
+ oppositeVal: extractValueFromDynamic(existing, oppositeScheme)
494
361
  });
495
362
  mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority, false, themeOriginalValues === null || themeOriginalValues === void 0 ? void 0 : themeOriginalValues[subKey1]);
496
363
  }
497
364
  }
498
365
  } else {
499
366
  dynamicThemeAccess = true;
500
- if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) {
501
- return;
502
- }
367
+ if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
503
368
  }
504
369
  } else if (isGroupMedia) {
505
370
  var _groupContext_groupName, _componentState_group;
@@ -509,9 +374,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
509
374
  var groupPseudoKey = groupInfo.pseudo;
510
375
  var groupMediaKey = groupInfo.media;
511
376
  if (!groupState) {
512
- if (process.env.NODE_ENV === "development" && debug) {
513
- log(`No parent with group prop, skipping styles: ${groupName}`);
514
- }
377
+ if (process.env.NODE_ENV === "development" && debug) log(`No parent with group prop, skipping styles: ${groupName}`);
515
378
  pseudoGroups || (pseudoGroups = /* @__PURE__ */new Set());
516
379
  return;
517
380
  }
@@ -521,21 +384,15 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
521
384
  mediaGroups.add(groupMediaKey);
522
385
  var mediaState1 = componentGroupState === null || componentGroupState === void 0 ? void 0 : componentGroupState.media;
523
386
  var isActive = mediaState1 === null || mediaState1 === void 0 ? void 0 : mediaState1[groupMediaKey];
524
- if (!mediaState1 && groupState.layout) {
525
- isActive = mediaKeyMatch(groupMediaKey, groupState.layout);
526
- }
527
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
528
- log(` \u{1F3D8}\uFE0F GROUP media ${groupMediaKey} active? ${isActive}`, {
529
- ...mediaState1,
530
- usedKeys: {
531
- ...styleState.usedKeys
532
- }
533
- });
534
- }
535
- if (!isActive) {
536
- for (var pkey1 in mediaStyle1) {
537
- applyDefaultStyle(pkey1, styleState);
387
+ if (!mediaState1 && groupState.layout) isActive = mediaKeyMatch(groupMediaKey, groupState.layout);
388
+ if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F3D8}\uFE0F GROUP media ${groupMediaKey} active? ${isActive}`, {
389
+ ...mediaState1,
390
+ usedKeys: {
391
+ ...styleState.usedKeys
538
392
  }
393
+ });
394
+ if (!isActive) {
395
+ for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
539
396
  return;
540
397
  }
541
398
  importanceBump = 2;
@@ -544,32 +401,24 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
544
401
  var _this;
545
402
  pseudoGroups || (pseudoGroups = /* @__PURE__ */new Set());
546
403
  pseudoGroups.add(groupName);
547
- var componentGroupPseudoState = (_this = componentGroupState || (
548
- // fallback to context initially
549
- groupContext === null || groupContext === void 0 ? void 0 : groupContext[groupName].state)) === null || _this === void 0 ? void 0 : _this.pseudo;
404
+ var componentGroupPseudoState = (_this = componentGroupState || (groupContext === null || groupContext === void 0 ? void 0 : groupContext[groupName].state)) === null || _this === void 0 ? void 0 : _this.pseudo;
550
405
  var isActive1 = componentGroupPseudoState === null || componentGroupPseudoState === void 0 ? void 0 : componentGroupPseudoState[groupPseudoKey];
551
406
  var priority1 = pseudoPriorities[groupPseudoKey];
552
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
553
- log(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`, {
554
- componentGroupPseudoState: {
555
- ...componentGroupPseudoState
556
- },
557
- usedKeys: {
558
- ...styleState.usedKeys
559
- }
560
- });
561
- }
562
- if (!isActive1) {
563
- for (var pkey2 in mediaStyle1) {
564
- applyDefaultStyle(pkey2, styleState);
407
+ if (process.env.NODE_ENV === "development" && debug === "verbose") log(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`, {
408
+ componentGroupPseudoState: {
409
+ ...componentGroupPseudoState
410
+ },
411
+ usedKeys: {
412
+ ...styleState.usedKeys
565
413
  }
414
+ });
415
+ if (!isActive1) {
416
+ for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
566
417
  return;
567
418
  }
568
419
  importanceBump = priority1;
569
420
  }
570
- } else if (isPlatformMedia) {
571
- importanceBump = getPlatformSpecificityBump(mediaKeyShort);
572
- }
421
+ } else if (isPlatformMedia) importanceBump = getPlatformSpecificityBump(mediaKeyShort);
573
422
  var mediaOriginalValues = styleOriginalValues.get(mediaStyle1);
574
423
  if (isGroupMedia && mediaStyle1.transition) {
575
424
  var _styleState12;
@@ -577,9 +426,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
577
426
  styleState.pseudoTransitions[`$${mediaKeyShort}`] = mediaStyle1.transition;
578
427
  }
579
428
  for (var subKey2 in mediaStyle1) {
580
- if (subKey2 === "space") {
581
- continue;
582
- }
429
+ if (subKey2 === "space") continue;
583
430
  if (subKey2[0] === "$") {
584
431
  var subMediaType = getMediaKey(subKey2);
585
432
  if (subMediaType === "platform") {
@@ -587,21 +434,13 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
587
434
  } else if (subMediaType === "theme") {
588
435
  if (!isActiveTheme(subKey2, themeName)) continue;
589
436
  } else if (subMediaType === true) {
590
- var subKeyShort = subKey2.slice(1);
591
- if (!mediaState[subKeyShort]) continue;
437
+ if (!mediaState[subKey2.slice(1)]) continue;
592
438
  }
593
439
  var nestedVal = mediaStyle1[subKey2];
594
440
  var subOriginalValues = styleOriginalValues.get(nestedVal);
595
- var isSizeMediaKey = !!mediaState[mediaKeyShort];
596
- var outerBase = isSizeMediaKey ? getMediaKeyImportance(mediaKeyShort) : defaultMediaImportance;
441
+ var outerBase = !!mediaState[mediaKeyShort] ? getMediaKeyImportance(mediaKeyShort) : defaultMediaImportance;
597
442
  var innerBase = void 0;
598
- if (subMediaType === "platform") {
599
- innerBase = defaultMediaImportance + getPlatformSpecificityBump(subKey2.slice(1));
600
- } else if (subMediaType === true) {
601
- innerBase = getMediaKeyImportance(subKey2.slice(1));
602
- } else {
603
- innerBase = defaultMediaImportance;
604
- }
443
+ if (subMediaType === "platform") innerBase = defaultMediaImportance + getPlatformSpecificityBump(subKey2.slice(1));else if (subMediaType === true) innerBase = getMediaKeyImportance(subKey2.slice(1));else innerBase = defaultMediaImportance;
605
444
  var nestedImportance = outerBase + importanceBump + innerBase + 1;
606
445
  for (var subSubKey in nestedVal) {
607
446
  var _styleState22;
@@ -609,26 +448,18 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
609
448
  var {
610
449
  usedKeys
611
450
  } = styleState;
612
- if (usedKeys[expandedKey] && usedKeys[expandedKey] > nestedImportance) {
613
- continue;
614
- }
451
+ if (usedKeys[expandedKey] && usedKeys[expandedKey] > nestedImportance) continue;
615
452
  (_styleState22 = styleState).style || (_styleState22.style = {});
616
453
  mergeStyle(styleState, expandedKey, nestedVal[subSubKey], nestedImportance, false, subOriginalValues === null || subOriginalValues === void 0 ? void 0 : subOriginalValues[subSubKey]);
617
- if (expandedKey === "fontFamily") {
618
- styleState.fontFamily = nestedVal[subSubKey];
619
- }
454
+ if (expandedKey === "fontFamily") styleState.fontFamily = nestedVal[subSubKey];
620
455
  }
621
- } else {
622
- mergeMediaStyle2(subKey2, mediaStyle1[subKey2], mediaOriginalValues === null || mediaOriginalValues === void 0 ? void 0 : mediaOriginalValues[subKey2]);
623
- }
456
+ } else mergeMediaStyle2(subKey2, mediaStyle1[subKey2], mediaOriginalValues === null || mediaOriginalValues === void 0 ? void 0 : mediaOriginalValues[subKey2]);
624
457
  }
625
458
  }
626
459
  return;
627
460
  }
628
461
  if (!isVariant) {
629
- if (isStyledContextProp) {
630
- return;
631
- }
462
+ if (isStyledContextProp) return;
632
463
  viewProps[key5] = val2;
633
464
  }
634
465
  });
@@ -650,12 +481,8 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
650
481
  };
651
482
  conf = conf || getConfig();
652
483
  var driver = animationDriver || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.animationDriver) || conf.animations;
653
- if (props.passThrough) {
654
- return null;
655
- }
656
- if (isWeb && styleProps.isAnimated && (driver === null || driver === void 0 ? void 0 : driver.isReactNative) && !styleProps.noNormalize) {
657
- styleProps.noNormalize = "values";
658
- }
484
+ if (props.passThrough) return null;
485
+ if (isWeb && styleProps.isAnimated && (driver === null || driver === void 0 ? void 0 : driver.isReactNative) && !styleProps.noNormalize) styleProps.noNormalize = "values";
659
486
  var {
660
487
  shorthands
661
488
  } = conf;
@@ -673,9 +500,9 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
673
500
  var viewProps = {};
674
501
  var mediaState = styleProps.mediaState || globalMediaState;
675
502
  var shouldDoClasses = acceptsClassName && isWeb && !styleProps.noClass;
676
- var rulesToInsert = true ? void 0 : {};
503
+ var rulesToInsert = void 0;
677
504
  var classNames = {};
678
- var space = props.space;
505
+ props.space;
679
506
  var pseudos = null;
680
507
  var hasMedia = false;
681
508
  var dynamicThemeAccess;
@@ -684,9 +511,7 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
684
511
  var className = props.className || "";
685
512
  var mediaStylesSeen = 0;
686
513
  var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStylesView);
687
- if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) {
688
- time`split-styles-setup`;
689
- }
514
+ if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
690
515
  var styleState = {
691
516
  classNames,
692
517
  conf,
@@ -700,30 +525,23 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
700
525
  viewProps,
701
526
  context: componentContext,
702
527
  debug,
703
- // resolved animation driver (respects animatedBy prop)
704
528
  animationDriver: driver
705
529
  };
706
530
  if (process.env.IS_STATIC === "is_static") {
707
531
  var {
708
532
  fallbackProps
709
533
  } = styleProps;
710
- if (fallbackProps) {
711
- styleState.props = new Proxy(props, {
712
- get(_, key5, val2) {
713
- if (!Reflect.has(props, key5)) {
714
- return Reflect.get(fallbackProps, key5);
715
- }
716
- return Reflect.get(props, key5);
717
- }
718
- });
719
- }
720
- }
721
- if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) {
722
- time`style-state`;
534
+ if (fallbackProps) styleState.props = new Proxy(props, {
535
+ get(_, key5, val2) {
536
+ if (!Reflect.has(props, key5)) return Reflect.get(fallbackProps, key5);
537
+ return Reflect.get(props, key5);
538
+ }
539
+ });
723
540
  }
541
+ if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
724
542
  if (process.env.NODE_ENV === "development" && debug === "verbose" && isClient) {
725
543
  if (isDevTools) {
726
- console.groupCollapsed("\u{1F539} getSplitStyles \u{1F447}");
544
+ console.groupCollapsed("🔹 getSplitStyles 👇");
727
545
  log({
728
546
  props,
729
547
  staticConfig,
@@ -755,17 +573,12 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
755
573
  } = conf.settings;
756
574
  var parentVariants = parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.variants;
757
575
  for (var keyOg in props) _loop(keyOg);
758
- if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) {
759
- time`split-styles-propsend`;
760
- }
761
- var avoidNormalize = styleProps.noNormalize === false;
762
- if (!avoidNormalize) {
576
+ if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
577
+ if (!(styleProps.noNormalize === false)) {
763
578
  if (styleState.style) {
764
579
  fixStyles(styleState.style);
765
580
  if (!styleProps.noExpand && !styleProps.noMergeStyle) {
766
- if (isWeb && (isReactNative ? (driver === null || driver === void 0 ? void 0 : driver.inputStyle) !== "css" : true)) {
767
- styleToCSS(styleState.style);
768
- }
581
+ if (isWeb && (isReactNative ? (driver === null || driver === void 0 ? void 0 : driver.inputStyle) !== "css" : true)) styleToCSS(styleState.style);
769
582
  }
770
583
  }
771
584
  if (styleState.flatTransforms) {
@@ -774,175 +587,49 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
774
587
  mergeFlatTransforms(styleState.style, styleState.flatTransforms);
775
588
  }
776
589
  if (parentSplitStyles) {
777
- if (false) {
778
- if (shouldDoClasses) {
779
- for (var key in parentSplitStyles.classNames) {
780
- var val = parentSplitStyles.classNames[key];
781
- if (styleState.style && key in styleState.style || key in classNames) continue;
782
- classNames[key] = val;
783
- }
784
- }
785
- }
786
- if (!shouldDoClasses) {
787
- for (var key1 in parentSplitStyles.style) {
788
- var _styleState1;
789
- if (key1 in classNames || styleState.style && key1 in styleState.style) continue;
790
- (_styleState1 = styleState).style || (_styleState1.style = {});
791
- styleState.style[key1] = parentSplitStyles.style[key1];
792
- }
793
- }
794
- }
795
- }
796
- if (false) {
797
- var _styleState_style;
798
- var shouldStringifyTransforms = !styleProps.noNormalize && !staticConfig.isReactNative && !staticConfig.isHOC && (!styleProps.isAnimated || (driver === null || driver === void 0 ? void 0 : driver.inputStyle) === "css");
799
- if (shouldStringifyTransforms && Array.isArray((_styleState_style = styleState.style) === null || _styleState_style === void 0 ? void 0 : _styleState_style.transform)) {
800
- styleState.style.transform = transformsToString(styleState.style.transform);
801
- }
802
- }
803
- if (false) {
804
- if (!styleProps.noMergeStyle && styleState.style && shouldDoClasses) {
805
- var retainedStyles;
806
- var shouldRetain = false;
807
- if (styleState.style["$$css"]) {} else {
808
- var atomic = getCSSStylesAtomic(styleState.style);
809
- var _iteratorNormalCompletion = true,
810
- _didIteratorError = false,
811
- _iteratorError = void 0;
812
- try {
813
- for (var _iterator = atomic[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
814
- var atomicStyle = _step.value;
815
- var _props_animateOnly, _props_animateOnly1;
816
- var [key2, value, identifier] = atomicStyle;
817
- var isAnimatedAndTransitionOnly = styleProps.isAnimated && styleProps.noClass && ((_props_animateOnly = props.animateOnly) === null || _props_animateOnly === void 0 ? void 0 : _props_animateOnly.includes(key2));
818
- var nonAnimatedTransitionOnly = !isAnimatedAndTransitionOnly && !styleProps.isAnimated && isClient && (driver === null || driver === void 0 ? void 0 : driver.outputStyle) === "css" && ((_props_animateOnly1 = props.animateOnly) === null || _props_animateOnly1 === void 0 ? void 0 : _props_animateOnly1.includes(key2));
819
- if (isAnimatedAndTransitionOnly) {
820
- retainedStyles || (retainedStyles = {});
821
- retainedStyles[key2] = styleState.style[key2];
822
- } else if (nonAnimatedTransitionOnly) {
823
- retainedStyles || (retainedStyles = {});
824
- retainedStyles[key2] = value;
825
- shouldRetain = true;
826
- } else {
827
- addStyleToInsertRules(rulesToInsert, atomicStyle);
828
- classNames[key2] = identifier;
829
- }
830
- }
831
- } catch (err) {
832
- _didIteratorError = true;
833
- _iteratorError = err;
834
- } finally {
835
- try {
836
- if (!_iteratorNormalCompletion && _iterator.return != null) {
837
- _iterator.return();
838
- }
839
- } finally {
840
- if (_didIteratorError) {
841
- throw _iteratorError;
842
- }
843
- }
844
- }
845
- if (process.env.NODE_ENV === "development" && props.debug === "verbose") {
846
- console.groupCollapsed(`\u{1F539} getSplitStyles final style object`);
847
- console.info(styleState.style);
848
- console.info(`retainedStyles`, retainedStyles);
849
- console.groupEnd();
850
- }
851
- if (shouldRetain || !(process.env.IS_STATIC === "is_static")) {
852
- styleState.style = retainedStyles || {};
853
- }
854
- }
855
- }
856
- if (!styleProps.noMergeStyle && styleState.style && !shouldDoClasses && styleProps.isAnimated && !(driver === null || driver === void 0 ? void 0 : driver.isReactNative)) {
857
- if (!styleState.style["$$css"]) {
858
- var toConvert = {};
859
- var hasProps = false;
860
- var animateOnly = props.animateOnly;
861
- for (var key3 in styleState.style) {
862
- if (key3 in nonAnimatableStyleProps) {
863
- toConvert[key3] = styleState.style[key3];
864
- delete styleState.style[key3];
865
- hasProps = true;
866
- }
867
- }
868
- if (hasProps) {
869
- var atomic1 = getCSSStylesAtomic(toConvert);
870
- var _iteratorNormalCompletion1 = true,
871
- _didIteratorError1 = false,
872
- _iteratorError1 = void 0;
873
- try {
874
- for (var _iterator1 = atomic1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
875
- var atomicStyle1 = _step1.value;
876
- addStyleToInsertRules(rulesToInsert, atomicStyle1);
877
- classNames[atomicStyle1[StyleObjectProperty]] = atomicStyle1[StyleObjectIdentifier];
878
- }
879
- } catch (err) {
880
- _didIteratorError1 = true;
881
- _iteratorError1 = err;
882
- } finally {
883
- try {
884
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
885
- _iterator1.return();
886
- }
887
- } finally {
888
- if (_didIteratorError1) {
889
- throw _iteratorError1;
890
- }
891
- }
892
- }
893
- }
590
+ if (!shouldDoClasses) for (var key1 in parentSplitStyles.style) {
591
+ var _styleState1;
592
+ if (key1 in classNames || styleState.style && key1 in styleState.style) continue;
593
+ (_styleState1 = styleState).style || (_styleState1.style = {});
594
+ styleState.style[key1] = parentSplitStyles.style[key1];
894
595
  }
895
596
  }
896
597
  }
897
598
  var styleProp = props.style;
898
- if (!styleProps.noMergeStyle && styleProp) {
899
- if (isHOC) {
900
- viewProps.style = normalizeStyle(styleProp);
901
- } else {
902
- var isArray = Array.isArray(styleProp);
903
- var len = isArray ? styleProp.length : 1;
904
- for (var i = 0; i < len; i++) {
905
- var style = isArray ? styleProp[i] : styleProp;
906
- if (style) {
907
- if (style["$$css"]) {
908
- Object.assign(styleState.classNames, style);
909
- } else {
910
- var _styleState2;
911
- (_styleState2 = styleState).style || (_styleState2.style = {});
912
- Object.assign(styleState.style, normalizeStyle(style));
913
- }
914
- }
915
- }
916
- }
917
- }
918
- if (true) {
919
- if (viewProps.tabIndex === 0) {
920
- var _viewProps;
921
- var _accessible;
922
- (_accessible = (_viewProps = viewProps).accessible) !== null && _accessible !== void 0 ? _accessible : _viewProps.accessible = true;
923
- }
924
- var style1 = styleState.style;
925
- if (style1 === null || style1 === void 0 ? void 0 : style1.fontFamily) {
926
- var _getFont;
927
- var faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
928
- if (faceInfo) {
929
- var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight;
930
- var overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 ? void 0 : (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
931
- if (overrideFace) {
932
- style1.fontFamily = overrideFace;
933
- styleState.fontFamily = overrideFace;
934
- delete style1.fontWeight;
935
- delete style1.fontStyle;
936
- }
937
- }
938
- if (process.env.NODE_ENV === "development" && debug && debug !== "profile") {
939
- log(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
940
- }
941
- }
942
- }
943
- if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) {
944
- time`split-styles-pre-result`;
945
- }
599
+ if (!styleProps.noMergeStyle && styleProp) if (isHOC) viewProps.style = normalizeStyle(styleProp);else {
600
+ var isArray = Array.isArray(styleProp);
601
+ var len = isArray ? styleProp.length : 1;
602
+ for (var i = 0; i < len; i++) {
603
+ var style = isArray ? styleProp[i] : styleProp;
604
+ if (style) if (style["$$css"]) Object.assign(styleState.classNames, style);else {
605
+ var _styleState2;
606
+ (_styleState2 = styleState).style || (_styleState2.style = {});
607
+ Object.assign(styleState.style, normalizeStyle(style));
608
+ }
609
+ }
610
+ }
611
+ if (viewProps.tabIndex === 0) {
612
+ var _viewProps;
613
+ var _accessible;
614
+ (_accessible = (_viewProps = viewProps).accessible) !== null && _accessible !== void 0 || (_viewProps.accessible = true);
615
+ }
616
+ var style1 = styleState.style;
617
+ if (style1 === null || style1 === void 0 ? void 0 : style1.fontFamily) {
618
+ var _getFont;
619
+ var faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
620
+ if (faceInfo) {
621
+ var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight;
622
+ var overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 ? void 0 : (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
623
+ if (overrideFace) {
624
+ style1.fontFamily = overrideFace;
625
+ styleState.fontFamily = overrideFace;
626
+ delete style1.fontWeight;
627
+ delete style1.fontStyle;
628
+ }
629
+ }
630
+ if (process.env.NODE_ENV === "development" && debug && debug !== "profile") log(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
631
+ }
632
+ if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
946
633
  var result = {
947
634
  hasMedia,
948
635
  fontFamily: styleState.fontFamily,
@@ -961,76 +648,13 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
961
648
  if (!styleProps.noMergeStyle) {
962
649
  if (!asChildExceptStyleLike) {
963
650
  var style2 = styleState.style;
964
- if (false) {
965
- var fontFamily = isText || isInput ? styleState.fontFamily : null;
966
- if (fontFamily && fontFamily[0] === "$") {
967
- fontFamily = fontFamily.slice(1);
968
- }
969
- var fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "";
970
- var groupClassName = props.group ? `t_group_${props.group}` : "";
971
- var componentNameFinal = props.componentName || staticConfig.componentName;
972
- var componentNameClassName = props.asChild || !componentNameFinal || componentNameFinal === "Text" ? "" : `is_${componentNameFinal}`;
973
- var classList = [];
974
- if (componentNameClassName) classList.push(componentNameClassName);
975
- if (!isText) classList.push("is_View");else classList.push("is_Text");
976
- if (fontFamilyClassName) classList.push(fontFamilyClassName);
977
- if (classNames) classList.push(Object.values(classNames).join(" "));
978
- if (groupClassName) classList.push(groupClassName);
979
- if (props.className) classList.push(props.className);
980
- var finalClassName = classList.join(" ");
981
- var needsCssStyles = isReactNative || styleProps.isAnimated && (driver === null || driver === void 0 ? void 0 : driver.isReactNative);
982
- if (styleProps.isAnimated && (driver === null || driver === void 0 ? void 0 : driver.inputStyle) === "css") {
983
- viewProps.className = finalClassName;
984
- if (style2) {
985
- viewProps.style = style2;
986
- }
987
- } else if (needsCssStyles) {
988
- var cnStyles;
989
- var _iteratorNormalCompletion2 = true,
990
- _didIteratorError2 = false,
991
- _iteratorError2 = void 0;
992
- try {
993
- for (var _iterator2 = finalClassName.split(" ")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
994
- var name = _step2.value;
995
- cnStyles || (cnStyles = {
996
- $$css: true
997
- });
998
- cnStyles[name] = name;
999
- }
1000
- } catch (err) {
1001
- _didIteratorError2 = true;
1002
- _iteratorError2 = err;
1003
- } finally {
1004
- try {
1005
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
1006
- _iterator2.return();
1007
- }
1008
- } finally {
1009
- if (_didIteratorError2) {
1010
- throw _iteratorError2;
1011
- }
1012
- }
1013
- }
1014
- viewProps.style = cnStyles ? [...(Array.isArray(style2) ? style2 : [style2]), cnStyles] : [style2];
1015
- } else {
1016
- if (finalClassName) {
1017
- viewProps.className = finalClassName;
1018
- }
1019
- if (style2) {
1020
- viewProps.style = style2;
1021
- }
1022
- }
1023
- } else {
1024
- if (style2) {
1025
- viewProps.style = style2;
1026
- }
1027
- }
651
+ if (style2) viewProps.style = style2;
1028
652
  }
1029
653
  }
1030
654
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
1031
655
  if (isClient && isDevTools) {
1032
656
  console.groupEnd();
1033
- console.groupCollapsed("\u{1F539} getSplitStyles ===>");
657
+ console.groupCollapsed("🔹 getSplitStyles ===>");
1034
658
  try {
1035
659
  var logs = {
1036
660
  ...result,
@@ -1040,16 +664,12 @@ var getSplitStyles = function (props, staticConfig, theme, themeName, componentS
1040
664
  rulesToInsert,
1041
665
  parentSplitStyles
1042
666
  };
1043
- for (var key4 in logs) {
1044
- log(key4, logs[key4]);
1045
- }
667
+ for (var key4 in logs) log(key4, logs[key4]);
1046
668
  } catch (e) {}
1047
669
  console.groupEnd();
1048
670
  }
1049
671
  }
1050
- if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) {
1051
- time`split-styles-done`;
1052
- }
672
+ if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
1053
673
  return result;
1054
674
  };
1055
675
  function mergeFlatTransforms(target, flatTransforms) {
@@ -1072,10 +692,7 @@ function mergeStyle(styleState, key, val, importance) {
1072
692
  staticConfig,
1073
693
  usedKeys
1074
694
  } = styleState;
1075
- var existingImportance = usedKeys[key] || 0;
1076
- if (existingImportance > importance) {
1077
- return;
1078
- }
695
+ if ((usedKeys[key] || 0) > importance) return;
1079
696
  var contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
1080
697
  if (contextProps && key in contextProps) {
1081
698
  var _styleState_originalContextPropValues;
@@ -1091,20 +708,12 @@ function mergeStyle(styleState, key, val, importance) {
1091
708
  usedKeys[key] = importance;
1092
709
  styleState.flatTransforms[key] = val;
1093
710
  } else {
1094
- var shouldNormalize = isWeb && !disableNormalize && !styleProps.noNormalize;
1095
- var out = shouldNormalize ? normalizeValueWithProperty(val, key) : val;
1096
- if (
1097
- // accept is for props not styles
1098
- staticConfig.accept && key in staticConfig.accept) {
1099
- viewProps[key] = out;
1100
- } else {
711
+ var out = isWeb && !disableNormalize && !styleProps.noNormalize ? normalizeValueWithProperty(val, key) : val;
712
+ if (staticConfig.accept && key in staticConfig.accept) viewProps[key] = out;else {
1101
713
  var _styleState2;
1102
714
  (_styleState2 = styleState).style || (_styleState2.style = {});
1103
715
  usedKeys[key] = importance;
1104
- styleState.style[key] =
1105
- // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
1106
- // if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
1107
- key === "transform" && Array.isArray(out) ? [...out] : out;
716
+ styleState.style[key] = key === "transform" && Array.isArray(out) ? [...out] : out;
1108
717
  }
1109
718
  }
1110
719
  }
@@ -1121,35 +730,21 @@ var getSubStyle = function (styleState, subKey, styleIn, avoidMergeTransform) {
1121
730
  if ((driver === null || driver === void 0 ? void 0 : driver.outputStyle) === "css") {
1122
731
  var _driver_animations1;
1123
732
  var animationConfig = (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0 ? void 0 : _driver_animations1[val];
1124
- if (animationConfig) {
1125
- var important = subKey[0] === "$" ? " !important" : "";
1126
- styleOut["transition"] = `all ${animationConfig}${important}`;
1127
- }
1128
- }
1129
- if (!styleOut["transition"] && typeof val === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[val])) {
1130
- styleOut["transition"] = val;
733
+ if (animationConfig) styleOut["transition"] = `all ${animationConfig}${subKey[0] === "$" ? " !important" : ""}`;
1131
734
  }
735
+ if (!styleOut["transition"] && typeof val === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[val])) styleOut["transition"] = val;
1132
736
  return key = key1, "continue";
1133
737
  }
1134
- var shouldSkip = !staticConfig.isHOC && key1 in skipProps && !styleProps.noSkip;
1135
- if (shouldSkip) {
1136
- return key = key1, "continue";
1137
- }
738
+ if (!staticConfig.isHOC && key1 in skipProps && !styleProps.noSkip) return key = key1, "continue";
1138
739
  propMapper(key1, val, styleState, false, function (skey, sval, originalVal) {
1139
740
  if (originalVal !== void 0) {
1140
741
  originalValues || (originalValues = {});
1141
742
  originalValues[skey] = originalVal;
1142
743
  }
1143
- if (skey in validPseudoKeys) {
1144
- sval = getSubStyle(styleState, skey, sval, avoidMergeTransform);
1145
- }
1146
- if (!avoidMergeTransform && skey in stylePropsTransform) {
1147
- mergeTransform(styleOut, skey, sval);
1148
- } else {
1149
- styleOut[skey] = styleProps.noNormalize ? sval : normalizeValueWithProperty(sval, key1);
1150
- }
744
+ if (skey in validPseudoKeys) sval = getSubStyle(styleState, skey, sval, avoidMergeTransform);
745
+ if (!avoidMergeTransform && skey in stylePropsTransform) mergeTransform(styleOut, skey, sval);else styleOut[skey] = styleProps.noNormalize ? sval : normalizeValueWithProperty(sval, key1);
1151
746
  });
1152
- key = key1, void 0;
747
+ key = key1;
1153
748
  };
1154
749
  var {
1155
750
  staticConfig,
@@ -1171,11 +766,9 @@ var getSubStyle = function (styleState, subKey, styleIn, avoidMergeTransform) {
1171
766
  outer: for (var i = 0; i < parentTransform.length; i++) {
1172
767
  var pt = parentTransform[i];
1173
768
  for (var pk in pt) {
1174
- for (var j = 0; j < len; j++) {
1175
- for (var sk in styleOutTransform[j]) {
1176
- if (pk === sk) continue outer;
1177
- break;
1178
- }
769
+ for (var j = 0; j < len; j++) for (var sk in styleOutTransform[j]) {
770
+ if (pk === sk) continue outer;
771
+ break;
1179
772
  }
1180
773
  merged.push(pt);
1181
774
  break;
@@ -1184,53 +777,27 @@ var getSubStyle = function (styleState, subKey, styleIn, avoidMergeTransform) {
1184
777
  for (var i1 = 0; i1 < len; i1++) merged.push(styleOutTransform[i1]);
1185
778
  styleOut.transform = merged;
1186
779
  }
1187
- if (flatTransforms) {
1188
- outer: for (var fk in flatTransforms) {
1189
- var ck = fk === "x" ? "translateX" : fk === "y" ? "translateY" : fk;
1190
- for (var j1 = 0; j1 < len; j1++) {
1191
- for (var sk1 in styleOutTransform[j1]) {
1192
- if (ck === sk1) continue outer;
1193
- break;
1194
- }
1195
- }
1196
- mergeTransform(styleOut, fk, flatTransforms[fk]);
780
+ if (flatTransforms) outer: for (var fk in flatTransforms) {
781
+ var ck = fk === "x" ? "translateX" : fk === "y" ? "translateY" : fk;
782
+ for (var j1 = 0; j1 < len; j1++) for (var sk1 in styleOutTransform[j1]) {
783
+ if (ck === sk1) continue outer;
784
+ break;
1197
785
  }
786
+ mergeTransform(styleOut, fk, flatTransforms[fk]);
1198
787
  }
1199
- } else if (flatTransforms) {
1200
- mergeFlatTransforms(styleOut, flatTransforms);
1201
- }
1202
- }
1203
- if (!styleProps.noNormalize) {
1204
- fixStyles(styleOut);
1205
- }
1206
- if (originalValues) {
1207
- styleOriginalValues.set(styleOut, originalValues);
788
+ } else if (flatTransforms) mergeFlatTransforms(styleOut, flatTransforms);
1208
789
  }
790
+ if (!styleProps.noNormalize) fixStyles(styleOut);
791
+ if (originalValues) styleOriginalValues.set(styleOut, originalValues);
1209
792
  return styleOut;
1210
793
  };
1211
- var useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : function () {};
794
+ isWeb && React.useInsertionEffect;
1212
795
  var useSplitStyles = function (a, b, c, d, e, f, g, h, i, j, k, l, m) {
1213
796
  "use no memo";
1214
797
 
1215
- var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m);
1216
- if (false) {
1217
- useInsertEffectCompat(function () {
1218
- if (res) {
1219
- insertStyleRules(res.rulesToInsert);
1220
- }
1221
- }, [res === null || res === void 0 ? void 0 : res.rulesToInsert]);
1222
- }
1223
- return res;
798
+ return getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m);
1224
799
  };
1225
- function addStyleToInsertRules(rulesToInsert, styleObject) {
1226
- if (false) {
1227
- var identifier = styleObject[StyleObjectIdentifier];
1228
- if (shouldInsertStyleRules(identifier)) {
1229
- updateRules(identifier, styleObject[StyleObjectRules]);
1230
- rulesToInsert[identifier] = styleObject;
1231
- }
1232
- }
1233
- }
800
+ function addStyleToInsertRules(rulesToInsert, styleObject) {}
1234
801
  var defaultColor = process.env.GUI_DEFAULT_COLOR || "rgba(0,0,0,0)";
1235
802
  var animatableDefaults = {
1236
803
  ...Object.fromEntries(Object.entries(tokenCategories.color).map(function (param) {
@@ -1254,9 +821,7 @@ var animatableDefaults = {
1254
821
  var mergeTransform = function (obj, key, val) {
1255
822
  var backwards = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
1256
823
  var _obj;
1257
- if (typeof obj.transform === "string") {
1258
- return;
1259
- }
824
+ if (typeof obj.transform === "string") return;
1260
825
  (_obj = obj).transform || (_obj.transform = []);
1261
826
  obj.transform[backwards ? "unshift" : "push"]({
1262
827
  [mapTransformKeys[key] || key]: val
@@ -1267,17 +832,14 @@ var mapTransformKeys = {
1267
832
  y: "translateY"
1268
833
  };
1269
834
  function passDownProp(viewProps, key, val) {
1270
- var shouldMergeObject = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
1271
- if (shouldMergeObject) {
835
+ if (arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false) {
1272
836
  var next = {
1273
837
  ...viewProps[key],
1274
838
  ...val
1275
839
  };
1276
840
  delete viewProps[key];
1277
841
  viewProps[key] = next;
1278
- } else {
1279
- viewProps[key] = val;
1280
- }
842
+ } else viewProps[key] = val;
1281
843
  }
1282
844
  function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp, originalVal) {
1283
845
  var usedKeys = styleState.usedKeys;
@@ -1286,49 +848,30 @@ function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, i
1286
848
  var bumpedImportance = defaultMediaImportance + importanceBump;
1287
849
  importance = !usedKeys[key] || bumpedImportance > usedKeys[key] ? bumpedImportance : null;
1288
850
  }
1289
- if (process.env.NODE_ENV === "development" && debugProp === "verbose") {
1290
- log(`mergeMediaByImportance ${key} importance usedKey ${usedKeys[key]} next ${importance}`);
1291
- }
1292
- if (importance === null) {
1293
- return false;
1294
- }
851
+ if (process.env.NODE_ENV === "development" && debugProp === "verbose") log(`mergeMediaByImportance ${key} importance usedKey ${usedKeys[key]} next ${importance}`);
852
+ if (importance === null) return false;
1295
853
  if (key in pseudoDescriptors) {
1296
854
  var descriptor = pseudoDescriptors[key];
1297
855
  var descriptorKey = descriptor.stateKey || descriptor.name;
1298
- var isDisabled = styleState.componentState[descriptorKey] === false;
1299
- if (isDisabled) {
1300
- return false;
1301
- }
856
+ if (styleState.componentState[descriptorKey] === false) return false;
1302
857
  var pseudoOriginalValues = styleOriginalValues.get(value);
1303
- for (var subKey in value) {
1304
- mergeStyle(styleState, subKey, value[subKey], importance, false, pseudoOriginalValues === null || pseudoOriginalValues === void 0 ? void 0 : pseudoOriginalValues[subKey]);
1305
- }
1306
- } else {
1307
- mergeStyle(styleState, key, value, importance, false, originalVal);
1308
- }
858
+ for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance, false, pseudoOriginalValues === null || pseudoOriginalValues === void 0 ? void 0 : pseudoOriginalValues[subKey]);
859
+ } else mergeStyle(styleState, key, value, importance, false, originalVal);
1309
860
  return true;
1310
861
  }
1311
862
  function normalizeStyle(style) {
1312
863
  var out = {};
1313
864
  for (var key in style) {
1314
865
  var val = style[key];
1315
- if (key in stylePropsTransform) {
1316
- mergeTransform(out, key, val);
1317
- } else {
1318
- out[key] = normalizeValueWithProperty(val, key);
1319
- }
1320
- }
1321
- if (isWeb && Array.isArray(out.transform)) {
1322
- out.transform = transformsToString(out.transform);
866
+ if (key in stylePropsTransform) mergeTransform(out, key, val);else out[key] = normalizeValueWithProperty(val, key);
1323
867
  }
868
+ if (isWeb && Array.isArray(out.transform)) out.transform = transformsToString(out.transform);
1324
869
  fixStyles(out);
1325
870
  return out;
1326
871
  }
1327
872
  function applyDefaultStyle(pkey, styleState) {
1328
873
  var defaultValues = animatableDefaults[pkey];
1329
- if (defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style))) {
1330
- mergeStyle(styleState, pkey, defaultValues, 1);
1331
- }
874
+ if (defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style))) mergeStyle(styleState, pkey, defaultValues, 1);
1332
875
  }
1333
876
  export { PROP_SPLIT, getSplitStyles, getSubStyle, styleOriginalValues, useSplitStyles };
1334
877
  //# sourceMappingURL=getSplitStyles.native.js.map