@tamagui/web 3.0.0-beta.831.1 → 3.0.0-beta.889.1

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 (474) hide show
  1. package/dist/cjs/createComponent.cjs +12 -1
  2. package/dist/cjs/createComponent.native.cjs +12 -1
  3. package/dist/cjs/createComponent.native.js +12 -1
  4. package/dist/cjs/createComponent.native.js.map +1 -1
  5. package/dist/cjs/createStyledHOC.cjs +1 -1
  6. package/dist/cjs/createStyledHOC.native.cjs +1 -1
  7. package/dist/cjs/createStyledHOC.native.js +1 -1
  8. package/dist/cjs/createStyledHOC.native.js.map +1 -1
  9. package/dist/cjs/createVariable.cjs +0 -10
  10. package/dist/cjs/createVariable.native.cjs +0 -10
  11. package/dist/cjs/createVariable.native.js +0 -10
  12. package/dist/cjs/createVariable.native.js.map +1 -1
  13. package/dist/cjs/helpers/borderComponents.cjs +62 -0
  14. package/dist/cjs/helpers/borderComponents.native.cjs +82 -0
  15. package/dist/cjs/helpers/borderComponents.native.js +84 -0
  16. package/dist/cjs/helpers/borderComponents.native.js.map +1 -0
  17. package/dist/cjs/helpers/createDesignSystem.cjs +0 -2
  18. package/dist/cjs/helpers/createStyledContext.cjs +10 -18
  19. package/dist/cjs/helpers/createStyledContext.native.cjs +14 -18
  20. package/dist/cjs/helpers/createStyledContext.native.js +14 -18
  21. package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
  22. package/dist/cjs/helpers/formatDiagnostic.cjs +6 -6
  23. package/dist/cjs/helpers/formatDiagnostic.native.cjs +6 -6
  24. package/dist/cjs/helpers/formatDiagnostic.native.js +6 -6
  25. package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
  26. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +128 -109
  27. package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +11 -3
  28. package/dist/cjs/helpers/getCSSStylesAtomic.native.js +11 -3
  29. package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
  30. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.cjs +13 -1
  31. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.cjs +15 -1
  32. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +15 -1
  33. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
  34. package/dist/cjs/helpers/getDynamicVal.cjs +5 -1
  35. package/dist/cjs/helpers/getDynamicVal.native.cjs +5 -1
  36. package/dist/cjs/helpers/getDynamicVal.native.js +5 -1
  37. package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
  38. package/dist/cjs/helpers/getSplitStyles.cjs +1042 -1715
  39. package/dist/cjs/helpers/getSplitStyles.native.cjs +1081 -1887
  40. package/dist/cjs/helpers/getSplitStyles.native.js +1081 -1887
  41. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  42. package/dist/cjs/helpers/grammarConfig.cjs +163 -1
  43. package/dist/cjs/helpers/grammarConfig.native.cjs +186 -1
  44. package/dist/cjs/helpers/grammarConfig.native.js +186 -1
  45. package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
  46. package/dist/cjs/helpers/insertStyleRule.cjs +5 -1
  47. package/dist/cjs/helpers/insertStyleRule.native.cjs +7 -1
  48. package/dist/cjs/helpers/insertStyleRule.native.js +7 -1
  49. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  50. package/dist/cjs/helpers/log.cjs +9 -8
  51. package/dist/cjs/helpers/log.native.cjs +9 -8
  52. package/dist/cjs/helpers/log.native.js +9 -8
  53. package/dist/cjs/helpers/log.native.js.map +1 -1
  54. package/dist/cjs/helpers/mergeVariants.cjs +44 -13
  55. package/dist/cjs/helpers/mergeVariants.native.cjs +79 -14
  56. package/dist/cjs/helpers/mergeVariants.native.js +79 -14
  57. package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
  58. package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
  59. package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
  60. package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
  61. package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
  62. package/dist/cjs/helpers/nativeStyleEngine.cjs +34 -14
  63. package/dist/cjs/helpers/nativeStyleEngine.native.cjs +36 -14
  64. package/dist/cjs/helpers/nativeStyleEngine.native.js +36 -14
  65. package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
  66. package/dist/cjs/helpers/normalizeValueWithProperty.cjs +7 -8
  67. package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +9 -8
  68. package/dist/cjs/helpers/normalizeValueWithProperty.native.js +9 -8
  69. package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
  70. package/dist/cjs/helpers/parseBorderShorthand.native.cjs +25 -56
  71. package/dist/cjs/helpers/parseBorderShorthand.native.js +25 -56
  72. package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
  73. package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +9 -49
  74. package/dist/cjs/helpers/parseOutlineShorthand.native.js +9 -49
  75. package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
  76. package/dist/cjs/helpers/resolveSafeArea.cjs +35 -100
  77. package/dist/cjs/helpers/resolveVariantStyle.cjs +57 -0
  78. package/dist/cjs/helpers/resolveVariantStyle.native.cjs +67 -0
  79. package/dist/cjs/helpers/resolveVariantStyle.native.js +69 -0
  80. package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -0
  81. package/dist/cjs/helpers/styleStaticConfig.cjs +1 -50
  82. package/dist/cjs/helpers/styleStaticConfig.native.cjs +1 -51
  83. package/dist/cjs/helpers/styleStaticConfig.native.js +1 -51
  84. package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -1
  85. package/dist/cjs/helpers/styleStaticConfigCore.cjs +107 -0
  86. package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +127 -0
  87. package/dist/cjs/helpers/styleStaticConfigCore.native.js +129 -0
  88. package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -0
  89. package/dist/cjs/helpers/styledDynamic.cjs +160 -0
  90. package/dist/cjs/helpers/styledDynamic.native.cjs +195 -0
  91. package/dist/cjs/helpers/styledDynamic.native.js +197 -0
  92. package/dist/cjs/helpers/styledDynamic.native.js.map +1 -0
  93. package/dist/cjs/helpers/tokenCategories.cjs +15 -38
  94. package/dist/cjs/helpers/tokenCategories.native.cjs +15 -40
  95. package/dist/cjs/helpers/tokenCategories.native.js +15 -40
  96. package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
  97. package/dist/cjs/helpers/variableValue.cjs +17 -12
  98. package/dist/cjs/helpers/variableValue.native.cjs +46 -23
  99. package/dist/cjs/helpers/variableValue.native.js +46 -23
  100. package/dist/cjs/helpers/variableValue.native.js.map +1 -1
  101. package/dist/cjs/helpers/warnOnce.cjs +5 -4
  102. package/dist/cjs/helpers/warnOnce.native.cjs +6 -4
  103. package/dist/cjs/helpers/warnOnce.native.js +6 -4
  104. package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
  105. package/dist/cjs/hooks/useAnimationDriver.cjs +2 -2
  106. package/dist/cjs/hooks/useAnimationDriver.native.cjs +2 -2
  107. package/dist/cjs/hooks/useAnimationDriver.native.js +2 -2
  108. package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
  109. package/dist/cjs/hooks/useComponentState.cjs +41 -82
  110. package/dist/cjs/hooks/useComponentState.native.cjs +45 -84
  111. package/dist/cjs/hooks/useComponentState.native.js +45 -84
  112. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  113. package/dist/cjs/hooks/useMedia.cjs +2 -2
  114. package/dist/cjs/hooks/useMedia.native.cjs +2 -2
  115. package/dist/cjs/hooks/useMedia.native.js +2 -2
  116. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  117. package/dist/cjs/{helpers/directStyleCSS.native.js → hooks/useStyle.cjs} +16 -8
  118. package/dist/cjs/{helpers/directStyleCSS.native.cjs → hooks/useStyle.native.cjs} +16 -4
  119. package/dist/cjs/hooks/useStyle.native.js +34 -0
  120. package/dist/cjs/hooks/useStyle.native.js.map +1 -0
  121. package/dist/cjs/hooks/useThemeState.cjs +25 -90
  122. package/dist/cjs/hooks/useThemeState.native.cjs +34 -94
  123. package/dist/cjs/hooks/useThemeState.native.js +34 -94
  124. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  125. package/dist/cjs/index.cjs +6 -3
  126. package/dist/cjs/index.native.cjs +6 -3
  127. package/dist/cjs/index.native.js +6 -3
  128. package/dist/cjs/index.native.js.map +1 -1
  129. package/dist/cjs/static-resolve.cjs +2 -2
  130. package/dist/cjs/static-resolve.native.cjs +2 -2
  131. package/dist/cjs/static-resolve.native.js +2 -2
  132. package/dist/cjs/static-resolve.native.js.map +1 -1
  133. package/dist/cjs/style.cjs +91 -0
  134. package/dist/cjs/style.native.cjs +98 -0
  135. package/dist/cjs/style.native.js +100 -0
  136. package/dist/cjs/style.native.js.map +1 -0
  137. package/dist/cjs/styled.cjs +11 -6
  138. package/dist/cjs/styled.native.cjs +11 -6
  139. package/dist/cjs/styled.native.js +11 -6
  140. package/dist/cjs/styled.native.js.map +1 -1
  141. package/dist/cjs/types.cjs +6 -4
  142. package/dist/cjs/types.native.cjs +6 -4
  143. package/dist/cjs/types.native.js +6 -4
  144. package/dist/cjs/types.native.js.map +1 -1
  145. package/dist/cjs/views/TamaguiProvider.cjs +1 -2
  146. package/dist/cjs/views/TamaguiProvider.native.cjs +1 -2
  147. package/dist/cjs/views/TamaguiProvider.native.js +1 -2
  148. package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
  149. package/dist/cjs/views/Text.cjs +17 -12
  150. package/dist/cjs/views/Text.native.cjs +1 -0
  151. package/dist/cjs/views/Text.native.js +1 -0
  152. package/dist/cjs/views/Text.native.js.map +1 -1
  153. package/dist/cjs/views/Theme.cjs +3 -3
  154. package/dist/cjs/views/Theme.native.cjs +3 -3
  155. package/dist/cjs/views/Theme.native.js +3 -3
  156. package/dist/cjs/views/Theme.native.js.map +1 -1
  157. package/dist/cjs/views/ThemeDebug.cjs +1 -4
  158. package/dist/esm/createComponent.mjs +12 -1
  159. package/dist/esm/createComponent.mjs.map +1 -1
  160. package/dist/esm/createComponent.native.js +12 -1
  161. package/dist/esm/createComponent.native.js.map +1 -1
  162. package/dist/esm/createStyledHOC.mjs +1 -1
  163. package/dist/esm/createStyledHOC.mjs.map +1 -1
  164. package/dist/esm/createStyledHOC.native.js +1 -1
  165. package/dist/esm/createStyledHOC.native.js.map +1 -1
  166. package/dist/esm/createVariable.mjs +1 -9
  167. package/dist/esm/createVariable.mjs.map +1 -1
  168. package/dist/esm/createVariable.native.js +1 -9
  169. package/dist/esm/createVariable.native.js.map +1 -1
  170. package/dist/esm/helpers/borderComponents.mjs +37 -0
  171. package/dist/esm/helpers/borderComponents.mjs.map +1 -0
  172. package/dist/esm/helpers/borderComponents.native.js +55 -0
  173. package/dist/esm/helpers/borderComponents.native.js.map +1 -0
  174. package/dist/esm/helpers/createDesignSystem.mjs +0 -2
  175. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  176. package/dist/esm/helpers/createStyledContext.mjs +10 -18
  177. package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
  178. package/dist/esm/helpers/createStyledContext.native.js +14 -18
  179. package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
  180. package/dist/esm/helpers/formatDiagnostic.mjs +6 -6
  181. package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
  182. package/dist/esm/helpers/formatDiagnostic.native.js +6 -6
  183. package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
  184. package/dist/esm/helpers/getCSSStylesAtomic.mjs +126 -109
  185. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  186. package/dist/esm/helpers/getCSSStylesAtomic.native.js +7 -4
  187. package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -1
  188. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +8 -1
  189. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -1
  190. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +10 -1
  191. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
  192. package/dist/esm/helpers/getDynamicVal.mjs +5 -1
  193. package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
  194. package/dist/esm/helpers/getDynamicVal.native.js +5 -1
  195. package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
  196. package/dist/esm/helpers/getSplitStyles.mjs +1034 -1705
  197. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  198. package/dist/esm/helpers/getSplitStyles.native.js +1071 -1871
  199. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  200. package/dist/esm/helpers/grammarConfig.mjs +164 -2
  201. package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
  202. package/dist/esm/helpers/grammarConfig.native.js +187 -2
  203. package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
  204. package/dist/esm/helpers/insertStyleRule.mjs +5 -2
  205. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  206. package/dist/esm/helpers/insertStyleRule.native.js +7 -2
  207. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  208. package/dist/esm/helpers/log.mjs +9 -8
  209. package/dist/esm/helpers/log.mjs.map +1 -1
  210. package/dist/esm/helpers/log.native.js +9 -8
  211. package/dist/esm/helpers/log.native.js.map +1 -1
  212. package/dist/esm/helpers/mergeVariants.mjs +44 -13
  213. package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
  214. package/dist/esm/helpers/mergeVariants.native.js +79 -14
  215. package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
  216. package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
  217. package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
  218. package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
  219. package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
  220. package/dist/esm/helpers/nativeStyleEngine.mjs +34 -15
  221. package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
  222. package/dist/esm/helpers/nativeStyleEngine.native.js +36 -15
  223. package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
  224. package/dist/esm/helpers/normalizeValueWithProperty.mjs +7 -8
  225. package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
  226. package/dist/esm/helpers/normalizeValueWithProperty.native.js +9 -8
  227. package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
  228. package/dist/esm/helpers/parseBorderShorthand.native.js +23 -56
  229. package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
  230. package/dist/esm/helpers/parseOutlineShorthand.native.js +10 -49
  231. package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
  232. package/dist/esm/helpers/resolveSafeArea.mjs +35 -97
  233. package/dist/esm/helpers/resolveSafeArea.mjs.map +1 -1
  234. package/dist/esm/helpers/resolveVariantStyle.mjs +38 -0
  235. package/dist/esm/helpers/resolveVariantStyle.mjs.map +1 -0
  236. package/dist/esm/helpers/resolveVariantStyle.native.js +46 -0
  237. package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -0
  238. package/dist/esm/helpers/styleStaticConfig.mjs +1 -50
  239. package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -1
  240. package/dist/esm/helpers/styleStaticConfig.native.js +1 -51
  241. package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -1
  242. package/dist/esm/helpers/styleStaticConfigCore.mjs +88 -0
  243. package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -0
  244. package/dist/esm/helpers/styleStaticConfigCore.native.js +106 -0
  245. package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -0
  246. package/dist/esm/helpers/styledDynamic.mjs +136 -0
  247. package/dist/esm/helpers/styledDynamic.mjs.map +1 -0
  248. package/dist/esm/helpers/styledDynamic.native.js +169 -0
  249. package/dist/esm/helpers/styledDynamic.native.js.map +1 -0
  250. package/dist/esm/helpers/tokenCategories.mjs +15 -36
  251. package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
  252. package/dist/esm/helpers/tokenCategories.native.js +15 -38
  253. package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
  254. package/dist/esm/helpers/variableValue.mjs +17 -12
  255. package/dist/esm/helpers/variableValue.mjs.map +1 -1
  256. package/dist/esm/helpers/variableValue.native.js +46 -23
  257. package/dist/esm/helpers/variableValue.native.js.map +1 -1
  258. package/dist/esm/helpers/warnOnce.mjs +5 -4
  259. package/dist/esm/helpers/warnOnce.mjs.map +1 -1
  260. package/dist/esm/helpers/warnOnce.native.js +6 -4
  261. package/dist/esm/helpers/warnOnce.native.js.map +1 -1
  262. package/dist/esm/hooks/useAnimationDriver.mjs +2 -2
  263. package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
  264. package/dist/esm/hooks/useAnimationDriver.native.js +2 -2
  265. package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
  266. package/dist/esm/hooks/useComponentState.mjs +41 -82
  267. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  268. package/dist/esm/hooks/useComponentState.native.js +45 -84
  269. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  270. package/dist/esm/hooks/useMedia.mjs +2 -2
  271. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  272. package/dist/esm/hooks/useMedia.native.js +2 -2
  273. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  274. package/dist/esm/hooks/useStyle.mjs +11 -0
  275. package/dist/esm/hooks/useStyle.mjs.map +1 -0
  276. package/dist/esm/hooks/useStyle.native.js +11 -0
  277. package/dist/esm/hooks/useStyle.native.js.map +1 -0
  278. package/dist/esm/hooks/useThemeState.mjs +25 -90
  279. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  280. package/dist/esm/hooks/useThemeState.native.js +34 -94
  281. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  282. package/dist/esm/index.js +6 -4
  283. package/dist/esm/index.mjs +6 -4
  284. package/dist/esm/index.native.js +6 -4
  285. package/dist/esm/static-resolve.mjs +3 -3
  286. package/dist/esm/static-resolve.mjs.map +1 -1
  287. package/dist/esm/static-resolve.native.js +3 -3
  288. package/dist/esm/static-resolve.native.js.map +1 -1
  289. package/dist/esm/style.mjs +58 -0
  290. package/dist/esm/style.mjs.map +1 -0
  291. package/dist/esm/style.native.js +63 -0
  292. package/dist/esm/style.native.js.map +1 -0
  293. package/dist/esm/styled.mjs +12 -6
  294. package/dist/esm/styled.mjs.map +1 -1
  295. package/dist/esm/styled.native.js +12 -6
  296. package/dist/esm/styled.native.js.map +1 -1
  297. package/dist/esm/types.mjs +3 -4
  298. package/dist/esm/types.mjs.map +1 -1
  299. package/dist/esm/types.native.js +3 -4
  300. package/dist/esm/types.native.js.map +1 -1
  301. package/dist/esm/views/TamaguiProvider.mjs +1 -2
  302. package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
  303. package/dist/esm/views/TamaguiProvider.native.js +1 -2
  304. package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
  305. package/dist/esm/views/Text.mjs +17 -12
  306. package/dist/esm/views/Text.mjs.map +1 -1
  307. package/dist/esm/views/Theme.mjs +3 -3
  308. package/dist/esm/views/Theme.mjs.map +1 -1
  309. package/dist/esm/views/Theme.native.js +3 -3
  310. package/dist/esm/views/Theme.native.js.map +1 -1
  311. package/dist/esm/views/ThemeDebug.mjs +1 -4
  312. package/dist/esm/views/ThemeDebug.mjs.map +1 -1
  313. package/package.json +15 -15
  314. package/src/createComponent.tsx +21 -1
  315. package/src/createStyledHOC.tsx +4 -2
  316. package/src/createVariable.ts +0 -10
  317. package/src/helpers/borderComponents.ts +62 -0
  318. package/src/helpers/createDesignSystem.ts +0 -2
  319. package/src/helpers/createStyledContext.tsx +15 -53
  320. package/src/helpers/formatDiagnostic.ts +9 -9
  321. package/src/helpers/getCSSStylesAtomic.native.ts +6 -3
  322. package/src/helpers/getCSSStylesAtomic.ts +192 -207
  323. package/src/helpers/getCSSStylesAtomicCompiled.ts +13 -1
  324. package/src/helpers/getDynamicVal.ts +4 -0
  325. package/src/helpers/getSplitStyles.tsx +2080 -3270
  326. package/src/helpers/grammarConfig.ts +218 -1
  327. package/src/helpers/insertStyleRule.tsx +4 -2
  328. package/src/helpers/log.ts +12 -11
  329. package/src/helpers/mergeVariants.ts +55 -18
  330. package/src/helpers/nativeOnlyProps.ts +0 -1
  331. package/src/helpers/nativeStyleEngine.ts +55 -14
  332. package/src/helpers/normalizeValueWithProperty.ts +10 -12
  333. package/src/helpers/parseBorderShorthand.native.ts +23 -45
  334. package/src/helpers/parseOutlineShorthand.native.ts +9 -40
  335. package/src/helpers/resolveSafeArea.ts +34 -101
  336. package/src/helpers/resolveVariantStyle.ts +77 -0
  337. package/src/helpers/styleFrontend.ts +8 -5
  338. package/src/helpers/styleStaticConfig.ts +5 -72
  339. package/src/helpers/styleStaticConfigCore.ts +110 -0
  340. package/src/helpers/styledDynamic.ts +191 -0
  341. package/src/helpers/tokenCategories.ts +40 -65
  342. package/src/helpers/variableValue.ts +20 -15
  343. package/src/helpers/warnOnce.ts +5 -4
  344. package/src/hooks/useAnimationDriver.ts +6 -2
  345. package/src/hooks/useComponentState.ts +55 -183
  346. package/src/hooks/useMedia.tsx +10 -8
  347. package/src/hooks/useStyle.ts +10 -0
  348. package/src/hooks/useThemeState.ts +51 -264
  349. package/src/index.ts +6 -6
  350. package/src/internalRuntimeTypes.ts +1 -0
  351. package/src/static-resolve.ts +7 -4
  352. package/src/style.ts +97 -0
  353. package/src/styled.tsx +39 -68
  354. package/src/types.tsx +105 -169
  355. package/src/views/TamaguiProvider.tsx +0 -2
  356. package/src/views/Text.tsx +20 -14
  357. package/src/views/Theme.tsx +13 -9
  358. package/src/views/ThemeDebug.tsx +0 -1
  359. package/types/createComponent.d.ts.map +1 -1
  360. package/types/createStyledHOC.d.ts +1 -1
  361. package/types/createStyledHOC.d.ts.map +1 -1
  362. package/types/createVariable.d.ts +0 -2
  363. package/types/createVariable.d.ts.map +1 -1
  364. package/types/helpers/borderComponents.d.ts +10 -0
  365. package/types/helpers/borderComponents.d.ts.map +1 -0
  366. package/types/helpers/createDesignSystem.d.ts.map +1 -1
  367. package/types/helpers/createStyledContext.d.ts.map +1 -1
  368. package/types/helpers/getCSSStylesAtomic.d.ts +20 -19
  369. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  370. package/types/helpers/getCSSStylesAtomic.native.d.ts +5 -0
  371. package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -1
  372. package/types/helpers/getCSSStylesAtomicCompiled.d.ts +6 -1
  373. package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -1
  374. package/types/helpers/getDynamicVal.d.ts.map +1 -1
  375. package/types/helpers/getSplitStyles.d.ts +3 -5
  376. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  377. package/types/helpers/grammarConfig.d.ts +25 -2
  378. package/types/helpers/grammarConfig.d.ts.map +1 -1
  379. package/types/helpers/insertStyleRule.d.ts +1 -0
  380. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  381. package/types/helpers/log.d.ts.map +1 -1
  382. package/types/helpers/mergeVariants.d.ts.map +1 -1
  383. package/types/helpers/nativeOnlyProps.d.ts +0 -1
  384. package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
  385. package/types/helpers/nativeStyleEngine.d.ts +6 -0
  386. package/types/helpers/nativeStyleEngine.d.ts.map +1 -1
  387. package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
  388. package/types/helpers/parseBorderShorthand.native.d.ts +1 -0
  389. package/types/helpers/parseBorderShorthand.native.d.ts.map +1 -1
  390. package/types/helpers/parseOutlineShorthand.native.d.ts.map +1 -1
  391. package/types/helpers/resolveSafeArea.d.ts +0 -1
  392. package/types/helpers/resolveSafeArea.d.ts.map +1 -1
  393. package/types/helpers/resolveVariantStyle.d.ts +3 -0
  394. package/types/helpers/resolveVariantStyle.d.ts.map +1 -0
  395. package/types/helpers/styleFrontend.d.ts +3 -5
  396. package/types/helpers/styleFrontend.d.ts.map +1 -1
  397. package/types/helpers/styleStaticConfig.d.ts +4 -9
  398. package/types/helpers/styleStaticConfig.d.ts.map +1 -1
  399. package/types/helpers/styleStaticConfigCore.d.ts +4 -0
  400. package/types/helpers/styleStaticConfigCore.d.ts.map +1 -0
  401. package/types/helpers/styledDynamic.d.ts +18 -0
  402. package/types/helpers/styledDynamic.d.ts.map +1 -0
  403. package/types/helpers/tokenCategories.d.ts +0 -1
  404. package/types/helpers/tokenCategories.d.ts.map +1 -1
  405. package/types/helpers/variableValue.d.ts.map +1 -1
  406. package/types/helpers/warnOnce.d.ts.map +1 -1
  407. package/types/helpers/webPropsToSkip.native.d.ts +68 -68
  408. package/types/hooks/useAnimationDriver.d.ts.map +1 -1
  409. package/types/hooks/useComponentState.d.ts.map +1 -1
  410. package/types/hooks/useMedia.d.ts.map +1 -1
  411. package/types/hooks/useStyle.d.ts +4 -0
  412. package/types/hooks/useStyle.d.ts.map +1 -0
  413. package/types/hooks/useThemeState.d.ts +1 -11
  414. package/types/hooks/useThemeState.d.ts.map +1 -1
  415. package/types/index.d.ts +6 -4
  416. package/types/index.d.ts.map +1 -1
  417. package/types/internalRuntimeTypes.d.ts +1 -1
  418. package/types/internalRuntimeTypes.d.ts.map +1 -1
  419. package/types/static-resolve.d.ts.map +1 -1
  420. package/types/style.d.ts +18 -0
  421. package/types/style.d.ts.map +1 -0
  422. package/types/styled.d.ts +10 -10
  423. package/types/styled.d.ts.map +1 -1
  424. package/types/types.d.ts +74 -49
  425. package/types/types.d.ts.map +1 -1
  426. package/types/views/TamaguiProvider.d.ts +1 -1
  427. package/types/views/TamaguiProvider.d.ts.map +1 -1
  428. package/types/views/Text.d.ts.map +1 -1
  429. package/types/views/Theme.d.ts.map +1 -1
  430. package/types/views/ThemeDebug.d.ts.map +1 -1
  431. package/dist/cjs/helpers/directStyleCSS.cjs +0 -345
  432. package/dist/cjs/helpers/directStyleCSS.native.js.map +0 -1
  433. package/dist/cjs/helpers/directStyleCSSCompiled.cjs +0 -40
  434. package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +0 -46
  435. package/dist/cjs/helpers/directStyleCSSCompiled.native.js +0 -48
  436. package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +0 -1
  437. package/dist/cjs/helpers/getVariantExtras.cjs +0 -91
  438. package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -94
  439. package/dist/cjs/helpers/getVariantExtras.native.js +0 -96
  440. package/dist/cjs/helpers/getVariantExtras.native.js.map +0 -1
  441. package/dist/cjs/helpers/variantResolvers.cjs +0 -87
  442. package/dist/cjs/helpers/variantResolvers.native.cjs +0 -140
  443. package/dist/cjs/helpers/variantResolvers.native.js +0 -142
  444. package/dist/cjs/helpers/variantResolvers.native.js.map +0 -1
  445. package/dist/esm/helpers/directStyleCSS.mjs +0 -317
  446. package/dist/esm/helpers/directStyleCSS.mjs.map +0 -1
  447. package/dist/esm/helpers/directStyleCSS.native.js +0 -1
  448. package/dist/esm/helpers/directStyleCSSCompiled.mjs +0 -11
  449. package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +0 -1
  450. package/dist/esm/helpers/directStyleCSSCompiled.native.js +0 -15
  451. package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +0 -1
  452. package/dist/esm/helpers/getVariantExtras.mjs +0 -69
  453. package/dist/esm/helpers/getVariantExtras.mjs.map +0 -1
  454. package/dist/esm/helpers/getVariantExtras.native.js +0 -70
  455. package/dist/esm/helpers/getVariantExtras.native.js.map +0 -1
  456. package/dist/esm/helpers/variantResolvers.mjs +0 -65
  457. package/dist/esm/helpers/variantResolvers.mjs.map +0 -1
  458. package/dist/esm/helpers/variantResolvers.native.js +0 -116
  459. package/dist/esm/helpers/variantResolvers.native.js.map +0 -1
  460. package/src/helpers/directStyleCSS.native.ts +0 -1
  461. package/src/helpers/directStyleCSS.ts +0 -513
  462. package/src/helpers/directStyleCSSCompiled.ts +0 -32
  463. package/src/helpers/getVariantExtras.tsx +0 -95
  464. package/src/helpers/variantResolvers.ts +0 -121
  465. package/types/helpers/directStyleCSS.d.ts +0 -28
  466. package/types/helpers/directStyleCSS.d.ts.map +0 -1
  467. package/types/helpers/directStyleCSS.native.d.ts +0 -2
  468. package/types/helpers/directStyleCSS.native.d.ts.map +0 -1
  469. package/types/helpers/directStyleCSSCompiled.d.ts +0 -10
  470. package/types/helpers/directStyleCSSCompiled.d.ts.map +0 -1
  471. package/types/helpers/getVariantExtras.d.ts +0 -4
  472. package/types/helpers/getVariantExtras.d.ts.map +0 -1
  473. package/types/helpers/variantResolvers.d.ts +0 -9
  474. package/types/helpers/variantResolvers.d.ts.map +0 -1
@@ -19,108 +19,43 @@ var __copyProps = (to, from, except, desc) => {
19
19
  };
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
  var resolveSafeArea_exports = {};
22
- __export(resolveSafeArea_exports, {
23
- expandSafeAreaValue: () => expandSafeAreaValue,
24
- isSafeAreaKey: () => isSafeAreaKey
25
- });
22
+ __export(resolveSafeArea_exports, { expandSafeAreaValue: () => expandSafeAreaValue });
26
23
  module.exports = __toCommonJS(resolveSafeArea_exports);
27
- const propEdges = {
28
- padding: [
29
- "top",
30
- "right",
31
- "bottom",
32
- "left"
33
- ],
34
- paddingTop: "top",
35
- paddingBottom: "bottom",
36
- paddingLeft: "left",
37
- paddingRight: "right",
38
- paddingHorizontal: ["left", "right"],
39
- paddingVertical: ["top", "bottom"],
40
- paddingStart: "left",
41
- paddingEnd: "right",
42
- paddingBlock: ["top", "bottom"],
43
- paddingInline: ["left", "right"],
44
- paddingBlockStart: "top",
45
- paddingBlockEnd: "bottom",
46
- paddingInlineStart: "left",
47
- paddingInlineEnd: "right",
48
- margin: [
49
- "top",
50
- "right",
51
- "bottom",
52
- "left"
53
- ],
54
- marginTop: "top",
55
- marginBottom: "bottom",
56
- marginLeft: "left",
57
- marginRight: "right",
58
- marginHorizontal: ["left", "right"],
59
- marginVertical: ["top", "bottom"],
60
- marginStart: "left",
61
- marginEnd: "right",
62
- marginBlock: ["top", "bottom"],
63
- marginInline: ["left", "right"],
64
- marginBlockStart: "top",
65
- marginBlockEnd: "bottom",
66
- marginInlineStart: "left",
67
- marginInlineEnd: "right",
68
- inset: [
69
- "top",
70
- "right",
71
- "bottom",
72
- "left"
73
- ],
74
- top: "top",
75
- bottom: "bottom",
76
- left: "left",
77
- right: "right",
78
- start: "left",
79
- end: "right"
24
+ const allEdges = [
25
+ "top",
26
+ "right",
27
+ "bottom",
28
+ "left"
29
+ ];
30
+ const suffixEdges = {
31
+ Horizontal: ["left", "right"],
32
+ Inline: ["left", "right"],
33
+ Vertical: ["top", "bottom"],
34
+ Block: ["top", "bottom"],
35
+ Start: ["left"],
36
+ InlineStart: ["left"],
37
+ End: ["right"],
38
+ InlineEnd: ["right"],
39
+ Top: ["top"],
40
+ BlockStart: ["top"],
41
+ Bottom: ["bottom"],
42
+ BlockEnd: ["bottom"],
43
+ Left: ["left"],
44
+ Right: ["right"]
80
45
  };
81
- const envForEdge = {
82
- top: "env(safe-area-inset-top)",
83
- bottom: "env(safe-area-inset-bottom)",
84
- left: "env(safe-area-inset-left)",
85
- right: "env(safe-area-inset-right)"
86
- };
87
- function isSafeAreaKey(key) {
88
- return key in propEdges;
46
+ function safeAreaEdges(key) {
47
+ if (key === "inset") return ["", allEdges];
48
+ if (/^(top|right|bottom|left)$/.test(key)) return ["", [key]];
49
+ if (key === "start") return ["", ["left"]];
50
+ if (key === "end") return ["", ["right"]];
51
+ const match = /^(padding|margin)(.*)$/.exec(key);
52
+ if (!match) return;
53
+ const edges = match[2] ? suffixEdges[match[2]] : allEdges;
54
+ return edges && [match[1], edges];
89
55
  }
90
56
  function expandSafeAreaValue(key) {
91
- const edges = propEdges[key];
92
- if (!edges) return void 0;
93
- if (typeof edges === "string") {
94
- return [[key, envForEdge[edges]]];
95
- }
96
- const base = baseKeyForExpansion[key];
97
- if (base === "") {
98
- return edges.map((e) => [edgeToSideKey[e], envForEdge[e]]);
99
- }
100
- return edges.map((e) => [`${base}${edgeToPascal[e]}`, envForEdge[e]]);
57
+ const match = safeAreaEdges(key);
58
+ if (!match) return;
59
+ const [base, edges] = match;
60
+ return edges.map((edge) => [base ? `${base}${edge[0].toUpperCase()}${edge.slice(1)}` : edge, `env(safe-area-inset-${edge})`]);
101
61
  }
102
- const edgeToPascal = {
103
- top: "Top",
104
- bottom: "Bottom",
105
- left: "Left",
106
- right: "Right"
107
- };
108
- const edgeToSideKey = {
109
- top: "top",
110
- bottom: "bottom",
111
- left: "left",
112
- right: "right"
113
- };
114
- const baseKeyForExpansion = {
115
- padding: "padding",
116
- paddingHorizontal: "padding",
117
- paddingVertical: "padding",
118
- paddingBlock: "padding",
119
- paddingInline: "padding",
120
- margin: "margin",
121
- marginHorizontal: "margin",
122
- marginVertical: "margin",
123
- marginBlock: "margin",
124
- marginInline: "margin",
125
- inset: ""
126
- };
@@ -0,0 +1,57 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+ var resolveVariantStyle_exports = {};
22
+ __export(resolveVariantStyle_exports, { resolveVariantStyle: () => resolveVariantStyle });
23
+ module.exports = __toCommonJS(resolveVariantStyle_exports);
24
+ var import_getSplitStyles = require("./getSplitStyles.cjs");
25
+ var import_isObj = require("./isObj.cjs");
26
+ var import_skipProps = require("./skipProps.cjs");
27
+ var import_styleOriginalValues = require("./styleOriginalValues.cjs");
28
+ var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
29
+ var import_styledDynamic = require("./styledDynamic.cjs");
30
+ function resolveVariantStyle(state, variants, key, value, parentKey = key, parentCondition) {
31
+ const definition = variants[key];
32
+ if (typeof definition !== "function" && (0, import_styledDynamic.isStyledDynamic)(definition)) {
33
+ return;
34
+ }
35
+ if (!(typeof value === "string" && definition && typeof definition === "object" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, (payload, condition) => resolveSelection(state, variants, key, payload, parentKey, condition || void 0))) {
36
+ return;
37
+ }
38
+ resolveSelection(state, variants, key, value, parentKey, parentCondition);
39
+ }
40
+ function resolveSelection(state, variants, key, value, parentKey, condition) {
41
+ const definition = variants[key];
42
+ let output;
43
+ if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === "function") {
44
+ output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));
45
+ } else if (definition && typeof definition === "object" && value !== void 0) {
46
+ output = definition[value];
47
+ }
48
+ if (!(0, import_isObj.isObj)(output)) return;
49
+ const originals = import_styleOriginalValues.styleOriginalValues.get(output);
50
+ for (const outputKey in output) {
51
+ if (!state.styleProps.noSkip && outputKey in import_skipProps.skipProps) continue;
52
+ const raw = output[outputKey];
53
+ if (raw == null) continue;
54
+ const value2 = state.styleProps.noNormalize ? raw : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(raw, state.conf.shorthands[outputKey] || outputKey);
55
+ (0, import_getSplitStyles.emitVariantStyle)(state, outputKey, value2, originals?.[outputKey] ?? raw, condition, parentKey === key && outputKey === key);
56
+ }
57
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var resolveVariantStyle_exports = {};
24
+ __export(resolveVariantStyle_exports, { resolveVariantStyle: () => resolveVariantStyle });
25
+ module.exports = __toCommonJS(resolveVariantStyle_exports);
26
+ var import_getSplitStyles = require("./getSplitStyles.native.js");
27
+ var import_isObj = require("./isObj.native.js");
28
+ var import_skipProps = require("./skipProps.native.js");
29
+ var import_styleOriginalValues = require("./styleOriginalValues.native.js");
30
+ var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
31
+ var import_styledDynamic = require("./styledDynamic.native.js");
32
+ function _type_of(obj) {
33
+ "@swc/helpers - typeof";
34
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
35
+ }
36
+ function resolveVariantStyle(state, variants, key, value) {
37
+ var parentKey = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : key, parentCondition = arguments.length > 5 ? arguments[5] : void 0;
38
+ var definition = variants[key];
39
+ if (typeof definition !== "function" && (0, import_styledDynamic.isStyledDynamic)(definition)) {
40
+ return;
41
+ }
42
+ if (!(typeof value === "string" && definition && (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, function(payload, condition) {
43
+ return resolveSelection(state, variants, key, payload, parentKey, condition || void 0);
44
+ })) {
45
+ return;
46
+ }
47
+ resolveSelection(state, variants, key, value, parentKey, parentCondition);
48
+ }
49
+ function resolveSelection(state, variants, key, value, parentKey, condition) {
50
+ var definition = variants[key];
51
+ var output;
52
+ if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === "function") {
53
+ output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));
54
+ } else if (definition && (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && value !== void 0) {
55
+ output = definition[value];
56
+ }
57
+ if (!(0, import_isObj.isObj)(output)) return;
58
+ var originals = import_styleOriginalValues.styleOriginalValues.get(output);
59
+ for (var outputKey in output) {
60
+ if (!state.styleProps.noSkip && outputKey in import_skipProps.skipProps) continue;
61
+ var raw = output[outputKey];
62
+ if (raw == null) continue;
63
+ var _$value = state.styleProps.noNormalize ? raw : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(raw, state.conf.shorthands[outputKey] || outputKey);
64
+ var _originals_outputKey;
65
+ (0, import_getSplitStyles.emitVariantStyle)(state, outputKey, _$value, (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : raw, condition, parentKey === key && outputKey === key);
66
+ }
67
+ }
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var resolveVariantStyle_exports = {};
24
+ __export(resolveVariantStyle_exports, { resolveVariantStyle: () => resolveVariantStyle });
25
+ module.exports = __toCommonJS(resolveVariantStyle_exports);
26
+ var import_getSplitStyles = require("./getSplitStyles.native.js");
27
+ var import_isObj = require("./isObj.native.js");
28
+ var import_skipProps = require("./skipProps.native.js");
29
+ var import_styleOriginalValues = require("./styleOriginalValues.native.js");
30
+ var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
31
+ var import_styledDynamic = require("./styledDynamic.native.js");
32
+ function _type_of(obj) {
33
+ "@swc/helpers - typeof";
34
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
35
+ }
36
+ function resolveVariantStyle(state, variants, key, value) {
37
+ var parentKey = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : key, parentCondition = arguments.length > 5 ? arguments[5] : void 0;
38
+ var definition = variants[key];
39
+ if (typeof definition !== "function" && (0, import_styledDynamic.isStyledDynamic)(definition)) {
40
+ return;
41
+ }
42
+ if (!(typeof value === "string" && definition && (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, function(payload, condition) {
43
+ return resolveSelection(state, variants, key, payload, parentKey, condition || void 0);
44
+ })) {
45
+ return;
46
+ }
47
+ resolveSelection(state, variants, key, value, parentKey, parentCondition);
48
+ }
49
+ function resolveSelection(state, variants, key, value, parentKey, condition) {
50
+ var definition = variants[key];
51
+ var output;
52
+ if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === "function") {
53
+ output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));
54
+ } else if (definition && (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && value !== void 0) {
55
+ output = definition[value];
56
+ }
57
+ if (!(0, import_isObj.isObj)(output)) return;
58
+ var originals = import_styleOriginalValues.styleOriginalValues.get(output);
59
+ for (var outputKey in output) {
60
+ if (!state.styleProps.noSkip && outputKey in import_skipProps.skipProps) continue;
61
+ var raw = output[outputKey];
62
+ if (raw == null) continue;
63
+ var _$value = state.styleProps.noNormalize ? raw : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(raw, state.conf.shorthands[outputKey] || outputKey);
64
+ var _originals_outputKey;
65
+ (0, import_getSplitStyles.emitVariantStyle)(state, outputKey, _$value, (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : raw, condition, parentKey === key && outputKey === key);
66
+ }
67
+ }
68
+
69
+ //# sourceMappingURL=resolveVariantStyle.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveVariantStyle.native.js","names":[],"sources":["cjs/helpers/resolveVariantStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar resolveVariantStyle_exports = {};\n__export(resolveVariantStyle_exports, {\n resolveVariantStyle: () => resolveVariantStyle\n});\nmodule.exports = __toCommonJS(resolveVariantStyle_exports);\nvar import_getSplitStyles = require(\"./getSplitStyles\");\nvar import_isObj = require(\"./isObj\");\nvar import_skipProps = require(\"./skipProps\");\nvar import_styleOriginalValues = require(\"./styleOriginalValues\");\nvar import_normalizeValueWithProperty = require(\"./normalizeValueWithProperty\");\nvar import_styledDynamic = require(\"./styledDynamic\");\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction resolveVariantStyle(state, variants, key, value) {\n var parentKey = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : key, parentCondition = arguments.length > 5 ? arguments[5] : void 0;\n var definition = variants[key];\n if (typeof definition !== \"function\" && (0, import_styledDynamic.isStyledDynamic)(definition)) {\n return;\n }\n if (!(typeof value === \"string\" && definition && (typeof definition === \"undefined\" ? \"undefined\" : _type_of(definition)) === \"object\" && value in definition) && (0, import_getSplitStyles.walkConditionalValue)(state, key, value, parentCondition, function(payload, condition) {\n return resolveSelection(state, variants, key, payload, parentKey, condition || void 0);\n })) {\n return;\n }\n resolveSelection(state, variants, key, value, parentKey, parentCondition);\n}\nfunction resolveSelection(state, variants, key, value, parentKey, condition) {\n var definition = variants[key];\n var output;\n if ((0, import_styledDynamic.isStyledDynamic)(definition) && typeof definition === \"function\") {\n output = definition(value, (0, import_styledDynamic.getDynamicEnv)(state));\n } else if (definition && (typeof definition === \"undefined\" ? \"undefined\" : _type_of(definition)) === \"object\" && value !== void 0) {\n output = definition[value];\n }\n if (!(0, import_isObj.isObj)(output)) return;\n var originals = import_styleOriginalValues.styleOriginalValues.get(output);\n for (var outputKey in output) {\n if (!state.styleProps.noSkip && outputKey in import_skipProps.skipProps) continue;\n var raw = output[outputKey];\n if (raw == null) continue;\n var _$value = state.styleProps.noNormalize ? raw : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(raw, state.conf.shorthands[outputKey] || outputKey);\n var _originals_outputKey;\n (0, import_getSplitStyles.emitVariantStyle)(state, outputKey, _$value, (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : raw, condition, parentKey === key && outputKey === key);\n }\n}\n//# sourceMappingURL=resolveVariantStyle.js.map\n"],"mappings":"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"}
@@ -21,56 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var styleStaticConfig_exports = {};
22
22
  __export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
23
23
  module.exports = __toCommonJS(styleStaticConfig_exports);
24
- var import_helpers = require("@tamagui/helpers");
25
24
  var import_grammarConfig = require("./grammarConfig.cjs");
26
- const styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
27
25
  function getStyleStaticConfig(staticConfig, conf) {
28
- let configCache = styleStaticConfigCache.get(staticConfig);
29
- const revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;
30
- const cached = configCache?.get(conf);
31
- if (cached?.revision === revision) return cached.value;
32
- const normalized = staticConfig.styleFrontend?.normalizeStaticConfig?.(staticConfig, conf);
33
- const variants = normalized ? normalized.variants : staticConfig.variants;
34
- const authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
35
- const authoredDefaultProps = staticConfig.defaultProps;
36
- let baseStyle;
37
- let baseVariantProps;
38
- let defaultProps;
39
- if (authoredDefaultProps) {
40
- const validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
41
- for (const key in authoredDefaultProps) {
42
- const isVariant = Boolean(variants?.[key]);
43
- const isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
44
- if (isVariant || isStyle) {
45
- ;
46
- (baseStyle ||= authoredBaseStyle ? { ...authoredBaseStyle } : {})[key] = authoredDefaultProps[key];
47
- }
48
- if (isVariant || !isStyle) {
49
- ;
50
- (defaultProps ||= {})[key] = authoredDefaultProps[key];
51
- }
52
- if (isVariant) {
53
- ;
54
- (baseVariantProps ||= {})[key] = authoredDefaultProps[key];
55
- }
56
- }
57
- }
58
- const keys = staticConfig.contextProps || staticConfig.context?.propKeys;
59
- const value = {
60
- baseStyle: baseStyle || authoredBaseStyle,
61
- baseVariantProps,
62
- defaultProps,
63
- styledContextKeys: keys ? new Set(keys) : null,
64
- variants,
65
- passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
66
- };
67
- if (!configCache) {
68
- configCache = /* @__PURE__ */ new WeakMap();
69
- styleStaticConfigCache.set(staticConfig, configCache);
70
- }
71
- configCache.set(conf, {
72
- revision,
73
- value
74
- });
75
- return value;
26
+ return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);
76
27
  }
@@ -23,57 +23,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
23
23
  var styleStaticConfig_exports = {};
24
24
  __export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
25
25
  module.exports = __toCommonJS(styleStaticConfig_exports);
26
- var import_helpers = require("@tamagui/helpers");
27
26
  var import_grammarConfig = require("./grammarConfig.native.js");
28
- var styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
29
27
  function getStyleStaticConfig(staticConfig, conf) {
30
- var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;
31
- var configCache = styleStaticConfigCache.get(staticConfig);
32
- var revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;
33
- var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);
34
- if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;
35
- var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);
36
- var variants = normalized ? normalized.variants : staticConfig.variants;
37
- var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
38
- var authoredDefaultProps = staticConfig.defaultProps;
39
- var baseStyle;
40
- var baseVariantProps;
41
- var defaultProps;
42
- if (authoredDefaultProps) {
43
- var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
44
- for (var key in authoredDefaultProps) {
45
- var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
46
- var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
47
- if (isVariant || isStyle) {
48
- ;
49
- (baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
50
- }
51
- if (isVariant || !isStyle) {
52
- ;
53
- (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
54
- }
55
- if (isVariant) {
56
- ;
57
- (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];
58
- }
59
- }
60
- }
61
- var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
62
- var value = {
63
- baseStyle: baseStyle || authoredBaseStyle,
64
- baseVariantProps,
65
- defaultProps,
66
- styledContextKeys: keys ? new Set(keys) : null,
67
- variants,
68
- passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
69
- };
70
- if (!configCache) {
71
- configCache = /* @__PURE__ */ new WeakMap();
72
- styleStaticConfigCache.set(staticConfig, configCache);
73
- }
74
- configCache.set(conf, {
75
- revision,
76
- value
77
- });
78
- return value;
28
+ return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);
79
29
  }
@@ -23,59 +23,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
23
23
  var styleStaticConfig_exports = {};
24
24
  __export(styleStaticConfig_exports, { getStyleStaticConfig: () => getStyleStaticConfig });
25
25
  module.exports = __toCommonJS(styleStaticConfig_exports);
26
- var import_helpers = require("@tamagui/helpers");
27
26
  var import_grammarConfig = require("./grammarConfig.native.js");
28
- var styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
29
27
  function getStyleStaticConfig(staticConfig, conf) {
30
- var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;
31
- var configCache = styleStaticConfigCache.get(staticConfig);
32
- var revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;
33
- var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);
34
- if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;
35
- var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);
36
- var variants = normalized ? normalized.variants : staticConfig.variants;
37
- var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
38
- var authoredDefaultProps = staticConfig.defaultProps;
39
- var baseStyle;
40
- var baseVariantProps;
41
- var defaultProps;
42
- if (authoredDefaultProps) {
43
- var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
44
- for (var key in authoredDefaultProps) {
45
- var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
46
- var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
47
- if (isVariant || isStyle) {
48
- ;
49
- (baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
50
- }
51
- if (isVariant || !isStyle) {
52
- ;
53
- (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
54
- }
55
- if (isVariant) {
56
- ;
57
- (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];
58
- }
59
- }
60
- }
61
- var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
62
- var value = {
63
- baseStyle: baseStyle || authoredBaseStyle,
64
- baseVariantProps,
65
- defaultProps,
66
- styledContextKeys: keys ? new Set(keys) : null,
67
- variants,
68
- passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
69
- };
70
- if (!configCache) {
71
- configCache = /* @__PURE__ */ new WeakMap();
72
- styleStaticConfigCache.set(staticConfig, configCache);
73
- }
74
- configCache.set(conf, {
75
- revision,
76
- value
77
- });
78
- return value;
28
+ return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);
79
29
  }
80
30
 
81
31
  //# sourceMappingURL=styleStaticConfig.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styleStaticConfig.native.js","names":[],"sources":["cjs/helpers/styleStaticConfig.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styleStaticConfig_exports = {};\n__export(styleStaticConfig_exports, {\n getStyleStaticConfig: () => getStyleStaticConfig\n});\nmodule.exports = __toCommonJS(styleStaticConfig_exports);\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_grammarConfig = require(\"./grammarConfig\");\nvar styleStaticConfigCache = /* @__PURE__ */ new WeakMap();\nfunction getStyleStaticConfig(staticConfig, conf) {\n var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;\n var configCache = styleStaticConfigCache.get(staticConfig);\n var revision = (0, import_grammarConfig.getConfigRevisionState)(conf).revision;\n var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);\n if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;\n var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);\n var variants = normalized ? normalized.variants : staticConfig.variants;\n var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;\n var authoredDefaultProps = staticConfig.defaultProps;\n var baseStyle;\n var baseVariantProps;\n var defaultProps;\n if (authoredDefaultProps) {\n var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);\n for (var key in authoredDefaultProps) {\n var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);\n var isStyle = key !== \"transition\" && (key in validStyles || key in conf.shorthands);\n if (isVariant || isStyle) {\n ;\n (baseStyle || (baseStyle = authoredBaseStyle ? {\n ...authoredBaseStyle\n } : {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant || !isStyle) {\n ;\n (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant) {\n ;\n (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];\n }\n }\n }\n var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);\n var value = {\n baseStyle: baseStyle || authoredBaseStyle,\n baseVariantProps,\n defaultProps,\n styledContextKeys: keys ? new Set(keys) : null,\n variants,\n passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName\n };\n if (!configCache) {\n configCache = /* @__PURE__ */ new WeakMap();\n styleStaticConfigCache.set(staticConfig, configCache);\n }\n configCache.set(conf, {\n revision,\n value\n });\n return value;\n}\n//# sourceMappingURL=styleStaticConfig.js.map\n"],"mappings":"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"}
1
+ {"version":3,"file":"styleStaticConfig.native.js","names":[],"sources":["cjs/helpers/styleStaticConfig.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styleStaticConfig_exports = {};\n__export(styleStaticConfig_exports, {\n getStyleStaticConfig: () => getStyleStaticConfig\n});\nmodule.exports = __toCommonJS(styleStaticConfig_exports);\nvar import_grammarConfig = require(\"./grammarConfig\");\nfunction getStyleStaticConfig(staticConfig, conf) {\n return (0, import_grammarConfig.getConfigRevisionState)(conf).styleStaticConfig(staticConfig, conf);\n}\n//# sourceMappingURL=styleStaticConfig.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,4BAA4B,CAAC;AACjC,SAAS,2BAA2B,EAClC,4BAA4B,qBAC9B,CAAC;AACD,OAAO,UAAU,aAAa,yBAAyB;AACvD,IAAI,uBAAuB,QAAQ,2BAAiB;AACpD,SAAS,qBAAqB,cAAc,MAAM;CAChD,QAAQ,GAAG,qBAAqB,uBAAsB,CAAE,IAAI,CAAC,CAAC,kBAAkB,cAAc,IAAI;AACpG"}