@tamagui/web 3.0.0-beta.924.1 → 3.0.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 (636) hide show
  1. package/dist/cjs/_withNativeStyle.cjs +3 -0
  2. package/dist/cjs/_withNativeStyle.native.cjs +3 -0
  3. package/dist/cjs/_withNativeStyle.native.js +3 -0
  4. package/dist/cjs/_withNativeStyle.native.js.map +1 -1
  5. package/dist/cjs/_withStableStyle.native.cjs +1 -5
  6. package/dist/cjs/_withStableStyle.native.js +1 -5
  7. package/dist/cjs/_withStableStyle.native.js.map +1 -1
  8. package/dist/cjs/config.cjs +6 -3
  9. package/dist/cjs/config.native.cjs +7 -5
  10. package/dist/cjs/config.native.js +7 -5
  11. package/dist/cjs/config.native.js.map +1 -1
  12. package/dist/cjs/contexts/ComponentContext.cjs +1 -0
  13. package/dist/cjs/contexts/ComponentContext.native.cjs +8 -0
  14. package/dist/cjs/contexts/ComponentContext.native.js +8 -0
  15. package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
  16. package/dist/cjs/createComponent.cjs +46 -32
  17. package/dist/cjs/createComponent.native.cjs +92 -72
  18. package/dist/cjs/createComponent.native.js +92 -72
  19. package/dist/cjs/createComponent.native.js.map +1 -1
  20. package/dist/cjs/createTamagui.cjs +32 -14
  21. package/dist/cjs/createTamagui.native.cjs +33 -19
  22. package/dist/cjs/createTamagui.native.js +33 -19
  23. package/dist/cjs/createTamagui.native.js.map +1 -1
  24. package/dist/cjs/createTokens.native.cjs +1 -5
  25. package/dist/cjs/createTokens.native.js +1 -5
  26. package/dist/cjs/createTokens.native.js.map +1 -1
  27. package/dist/cjs/createVariable.native.cjs +1 -5
  28. package/dist/cjs/createVariable.native.js +1 -5
  29. package/dist/cjs/createVariable.native.js.map +1 -1
  30. package/dist/cjs/createVariables.native.cjs +2 -6
  31. package/dist/cjs/createVariables.native.js +2 -6
  32. package/dist/cjs/createVariables.native.js.map +1 -1
  33. package/dist/cjs/dom/html.cjs +87 -329
  34. package/dist/cjs/dom/html.native.cjs +53 -2
  35. package/dist/cjs/dom/html.native.js +53 -2
  36. package/dist/cjs/dom/html.native.js.map +1 -1
  37. package/dist/cjs/{helpers/timer.native.js → dom/htmlReset.cjs} +6 -12
  38. package/dist/cjs/{helpers/timer.native.cjs → dom/htmlReset.native.cjs} +6 -8
  39. package/dist/cjs/dom/htmlReset.native.js +30 -0
  40. package/dist/cjs/dom/htmlReset.native.js.map +1 -0
  41. package/dist/cjs/dom/htmlRuntime.native.cjs +4 -0
  42. package/dist/cjs/dom/htmlRuntime.native.js +4 -0
  43. package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
  44. package/dist/cjs/dom/htmlStaticConfig.cjs +44 -0
  45. package/dist/cjs/dom/htmlStaticConfig.native.cjs +46 -0
  46. package/dist/cjs/dom/htmlStaticConfig.native.js +48 -0
  47. package/dist/cjs/dom/htmlStaticConfig.native.js.map +1 -0
  48. package/dist/cjs/dom/primitives.native.cjs +81 -34
  49. package/dist/cjs/dom/primitives.native.js +81 -34
  50. package/dist/cjs/dom/primitives.native.js.map +1 -1
  51. package/dist/cjs/eventHandling.cjs +10 -4
  52. package/dist/cjs/eventHandling.native.cjs +52 -16
  53. package/dist/cjs/eventHandling.native.js +52 -16
  54. package/dist/cjs/eventHandling.native.js.map +1 -1
  55. package/dist/cjs/helpers/NativeTextBinding.cjs +36 -0
  56. package/dist/cjs/helpers/NativeTextBinding.native.cjs +39 -0
  57. package/dist/cjs/helpers/NativeTextBinding.native.js +41 -0
  58. package/dist/cjs/helpers/NativeTextBinding.native.js.map +1 -0
  59. package/dist/cjs/helpers/configVariables.native.cjs +2 -6
  60. package/dist/cjs/helpers/configVariables.native.js +2 -6
  61. package/dist/cjs/helpers/configVariables.native.js.map +1 -1
  62. package/dist/cjs/helpers/createDesignSystem.cjs +14 -10
  63. package/dist/cjs/helpers/createDesignSystem.native.cjs +5 -4
  64. package/dist/cjs/helpers/createDesignSystem.native.js +5 -4
  65. package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
  66. package/dist/cjs/helpers/createStyledContext.native.cjs +1 -5
  67. package/dist/cjs/helpers/createStyledContext.native.js +1 -5
  68. package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
  69. package/dist/cjs/helpers/expandStyle.cjs +45 -1
  70. package/dist/cjs/helpers/expandStyle.native.cjs +38 -2
  71. package/dist/cjs/helpers/expandStyle.native.js +38 -2
  72. package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
  73. package/dist/cjs/helpers/expandStyles.cjs +15 -3
  74. package/dist/cjs/helpers/expandStyles.native.cjs +14 -8
  75. package/dist/cjs/helpers/expandStyles.native.js +14 -8
  76. package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
  77. package/dist/cjs/helpers/fluid.cjs +56 -0
  78. package/dist/cjs/helpers/fluid.native.cjs +58 -0
  79. package/dist/cjs/helpers/fluid.native.js +60 -0
  80. package/dist/cjs/helpers/fluid.native.js.map +1 -0
  81. package/dist/cjs/helpers/formatDiagnostic.native.cjs +2 -6
  82. package/dist/cjs/helpers/formatDiagnostic.native.js +2 -6
  83. package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
  84. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +6 -6
  85. package/dist/cjs/helpers/getSplitStyles.cjs +366 -150
  86. package/dist/cjs/helpers/getSplitStyles.native.cjs +584 -184
  87. package/dist/cjs/helpers/getSplitStyles.native.js +584 -184
  88. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  89. package/dist/cjs/helpers/getThemeCSSRules.cjs +37 -25
  90. package/dist/cjs/helpers/grammarConfig.cjs +6 -14
  91. package/dist/cjs/helpers/grammarConfig.native.cjs +32 -22
  92. package/dist/cjs/helpers/grammarConfig.native.js +32 -22
  93. package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
  94. package/dist/cjs/helpers/insertStyleRule.cjs +11 -4
  95. package/dist/cjs/helpers/insertStyleRule.native.cjs +8 -11
  96. package/dist/cjs/helpers/insertStyleRule.native.js +8 -11
  97. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  98. package/dist/cjs/helpers/isObj.native.cjs +1 -5
  99. package/dist/cjs/helpers/isObj.native.js +1 -5
  100. package/dist/cjs/helpers/isObj.native.js.map +1 -1
  101. package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +48 -100
  102. package/dist/cjs/helpers/mainThreadPressEvents.native.js +48 -100
  103. package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
  104. package/dist/cjs/helpers/mergeProps.cjs +18 -21
  105. package/dist/cjs/helpers/mergeProps.native.cjs +20 -23
  106. package/dist/cjs/helpers/mergeProps.native.js +20 -23
  107. package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
  108. package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
  109. package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
  110. package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
  111. package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
  112. package/dist/cjs/helpers/nativeTextMetrics.cjs +74 -0
  113. package/dist/cjs/helpers/nativeTextMetrics.native.cjs +77 -0
  114. package/dist/cjs/helpers/nativeTextMetrics.native.js +79 -0
  115. package/dist/cjs/helpers/nativeTextMetrics.native.js.map +1 -0
  116. package/dist/cjs/helpers/normalizeColor.native.cjs +17 -2
  117. package/dist/cjs/helpers/normalizeColor.native.js +17 -2
  118. package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
  119. package/dist/cjs/helpers/normalizeValueWithProperty.cjs +2 -1
  120. package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +3 -6
  121. package/dist/cjs/helpers/normalizeValueWithProperty.native.js +3 -6
  122. package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
  123. package/dist/cjs/helpers/objectIdentityKey.native.cjs +1 -5
  124. package/dist/cjs/helpers/objectIdentityKey.native.js +1 -5
  125. package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
  126. package/dist/cjs/helpers/parseNativeStyle.cjs +187 -0
  127. package/dist/cjs/helpers/parseNativeStyle.native.cjs +6 -4
  128. package/dist/cjs/helpers/parseNativeStyle.native.js +6 -4
  129. package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
  130. package/dist/cjs/helpers/proxyThemeToParents.cjs +9 -2
  131. package/dist/cjs/helpers/proxyThemeToParents.native.cjs +28 -2
  132. package/dist/cjs/helpers/proxyThemeToParents.native.js +28 -2
  133. package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
  134. package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +1 -5
  135. package/dist/cjs/helpers/resolveAnimationDriver.native.js +1 -5
  136. package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
  137. package/dist/cjs/helpers/{timer.cjs → resolveNativeUnits.cjs} +12 -8
  138. package/dist/cjs/helpers/resolveNativeUnits.native.cjs +205 -0
  139. package/dist/cjs/helpers/resolveNativeUnits.native.js +207 -0
  140. package/dist/cjs/helpers/resolveNativeUnits.native.js.map +1 -0
  141. package/dist/cjs/helpers/resolveRem.native.cjs +18 -21
  142. package/dist/cjs/helpers/resolveRem.native.js +18 -21
  143. package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
  144. package/dist/cjs/helpers/resolveSizing.cjs +124 -0
  145. package/dist/cjs/helpers/resolveSizing.native.cjs +133 -0
  146. package/dist/cjs/helpers/resolveSizing.native.js +135 -0
  147. package/dist/cjs/helpers/resolveSizing.native.js.map +1 -0
  148. package/dist/cjs/helpers/resolveVariableValue.cjs +7 -7
  149. package/dist/cjs/helpers/resolveVariableValue.native.cjs +7 -9
  150. package/dist/cjs/helpers/resolveVariableValue.native.js +7 -9
  151. package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
  152. package/dist/cjs/helpers/resolveVariantStyle.native.cjs +2 -6
  153. package/dist/cjs/helpers/resolveVariantStyle.native.js +2 -6
  154. package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -1
  155. package/dist/cjs/helpers/skipProps.cjs +0 -1
  156. package/dist/cjs/helpers/skipProps.native.cjs +0 -1
  157. package/dist/cjs/helpers/skipProps.native.js +0 -1
  158. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  159. package/dist/cjs/helpers/styleFrontend.cjs +23 -1
  160. package/dist/cjs/helpers/styleFrontend.native.cjs +23 -1
  161. package/dist/cjs/helpers/styleFrontend.native.js +23 -1
  162. package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
  163. package/dist/cjs/helpers/styleStaticConfigCore.cjs +5 -4
  164. package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +7 -4
  165. package/dist/cjs/helpers/styleStaticConfigCore.native.js +7 -4
  166. package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -1
  167. package/dist/cjs/helpers/styledDynamic.cjs +5 -0
  168. package/dist/cjs/helpers/styledDynamic.native.cjs +8 -7
  169. package/dist/cjs/helpers/styledDynamic.native.js +8 -7
  170. package/dist/cjs/helpers/styledDynamic.native.js.map +1 -1
  171. package/dist/cjs/helpers/subscribeToContextGroup.cjs +16 -7
  172. package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +18 -8
  173. package/dist/cjs/helpers/subscribeToContextGroup.native.js +18 -8
  174. package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
  175. package/dist/cjs/helpers/themeRef.native.cjs +1 -5
  176. package/dist/cjs/helpers/themeRef.native.js +1 -5
  177. package/dist/cjs/helpers/themeRef.native.js.map +1 -1
  178. package/dist/cjs/helpers/themes.cjs +26 -11
  179. package/dist/cjs/helpers/themes.native.cjs +26 -11
  180. package/dist/cjs/helpers/themes.native.js +26 -11
  181. package/dist/cjs/helpers/themes.native.js.map +1 -1
  182. package/dist/cjs/helpers/tokenCategories.cjs +2 -2
  183. package/dist/cjs/helpers/tokenCategories.native.cjs +2 -2
  184. package/dist/cjs/helpers/tokenCategories.native.js +2 -2
  185. package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
  186. package/dist/cjs/helpers/variables.cjs +1 -1
  187. package/dist/cjs/helpers/variables.native.cjs +4 -8
  188. package/dist/cjs/helpers/variables.native.js +4 -8
  189. package/dist/cjs/helpers/variables.native.js.map +1 -1
  190. package/dist/cjs/helpers/warnOnce.cjs +6 -0
  191. package/dist/cjs/helpers/warnOnce.native.cjs +6 -0
  192. package/dist/cjs/helpers/warnOnce.native.js +6 -0
  193. package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
  194. package/dist/cjs/helpers/webPropsToSkip.native.cjs +3 -3
  195. package/dist/cjs/helpers/webPropsToSkip.native.js +3 -3
  196. package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
  197. package/dist/cjs/helpers/wrapStyleTags.cjs +1 -1
  198. package/dist/cjs/helpers/wrapStyleTags.native.cjs +1 -1
  199. package/dist/cjs/helpers/wrapStyleTags.native.js +1 -1
  200. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  201. package/dist/cjs/hooks/useComponentState.native.cjs +1 -5
  202. package/dist/cjs/hooks/useComponentState.native.js +1 -5
  203. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  204. package/dist/cjs/hooks/useMedia.cjs +27 -34
  205. package/dist/cjs/hooks/useMedia.native.cjs +45 -51
  206. package/dist/cjs/hooks/useMedia.native.js +45 -51
  207. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  208. package/dist/cjs/hooks/useSplitStyles.cjs +1 -1
  209. package/dist/cjs/hooks/useSplitStyles.native.cjs +1 -1
  210. package/dist/cjs/hooks/useSplitStyles.native.js +1 -1
  211. package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
  212. package/dist/cjs/hooks/useThemeState.cjs +37 -47
  213. package/dist/cjs/hooks/useThemeState.native.cjs +44 -50
  214. package/dist/cjs/hooks/useThemeState.native.js +44 -50
  215. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  216. package/dist/cjs/index.cjs +7 -0
  217. package/dist/cjs/index.native.cjs +7 -0
  218. package/dist/cjs/index.native.js +7 -0
  219. package/dist/cjs/index.native.js.map +1 -1
  220. package/dist/cjs/internal-runtime.cjs +22 -0
  221. package/dist/cjs/internal-runtime.native.cjs +22 -0
  222. package/dist/cjs/internal-runtime.native.js +22 -0
  223. package/dist/cjs/internal-runtime.native.js.map +1 -1
  224. package/dist/cjs/static-resolve.native.cjs +2 -9
  225. package/dist/cjs/static-resolve.native.js +2 -9
  226. package/dist/cjs/static-resolve.native.js.map +1 -1
  227. package/dist/cjs/style.cjs +1 -1
  228. package/dist/cjs/style.native.cjs +4 -7
  229. package/dist/cjs/style.native.js +4 -7
  230. package/dist/cjs/style.native.js.map +1 -1
  231. package/dist/cjs/views/Theme.cjs +10 -17
  232. package/dist/cjs/views/Theme.native.cjs +9 -11
  233. package/dist/cjs/views/Theme.native.js +9 -11
  234. package/dist/cjs/views/Theme.native.js.map +1 -1
  235. package/dist/cjs/views/ThemeDebug.cjs +1 -1
  236. package/dist/cjs/views/ThemeUpdate.cjs +1 -1
  237. package/dist/cjs/views/ThemeUpdate.native.cjs +1 -1
  238. package/dist/cjs/views/ThemeUpdate.native.js +1 -1
  239. package/dist/cjs/views/ThemeUpdate.native.js.map +1 -1
  240. package/dist/esm/_withNativeStyle.mjs +4 -1
  241. package/dist/esm/_withNativeStyle.mjs.map +1 -1
  242. package/dist/esm/_withNativeStyle.native.js +4 -1
  243. package/dist/esm/_withNativeStyle.native.js.map +1 -1
  244. package/dist/esm/_withStableStyle.native.js +1 -5
  245. package/dist/esm/_withStableStyle.native.js.map +1 -1
  246. package/dist/esm/config.mjs +6 -3
  247. package/dist/esm/config.mjs.map +1 -1
  248. package/dist/esm/config.native.js +7 -5
  249. package/dist/esm/config.native.js.map +1 -1
  250. package/dist/esm/contexts/ComponentContext.mjs +9 -9
  251. package/dist/esm/contexts/ComponentContext.mjs.map +1 -1
  252. package/dist/esm/contexts/ComponentContext.native.js +16 -9
  253. package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
  254. package/dist/esm/createComponent.mjs +45 -42
  255. package/dist/esm/createComponent.mjs.map +1 -1
  256. package/dist/esm/createComponent.native.js +93 -82
  257. package/dist/esm/createComponent.native.js.map +1 -1
  258. package/dist/esm/createTamagui.mjs +33 -15
  259. package/dist/esm/createTamagui.mjs.map +1 -1
  260. package/dist/esm/createTamagui.native.js +34 -20
  261. package/dist/esm/createTamagui.native.js.map +1 -1
  262. package/dist/esm/createTokens.native.js +1 -5
  263. package/dist/esm/createTokens.native.js.map +1 -1
  264. package/dist/esm/createVariable.native.js +1 -5
  265. package/dist/esm/createVariable.native.js.map +1 -1
  266. package/dist/esm/createVariables.native.js +2 -6
  267. package/dist/esm/createVariables.native.js.map +1 -1
  268. package/dist/esm/dom/html.mjs +87 -329
  269. package/dist/esm/dom/html.mjs.map +1 -1
  270. package/dist/esm/dom/html.native.js +53 -2
  271. package/dist/esm/dom/html.native.js.map +1 -1
  272. package/dist/esm/dom/htmlReset.mjs +6 -0
  273. package/dist/esm/dom/htmlReset.mjs.map +1 -0
  274. package/dist/esm/dom/htmlReset.native.js +6 -0
  275. package/dist/esm/dom/htmlReset.native.js.map +1 -0
  276. package/dist/esm/dom/htmlRuntime.native.js +4 -0
  277. package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
  278. package/dist/esm/dom/htmlStaticConfig.mjs +22 -0
  279. package/dist/esm/dom/htmlStaticConfig.mjs.map +1 -0
  280. package/dist/esm/dom/htmlStaticConfig.native.js +22 -0
  281. package/dist/esm/dom/htmlStaticConfig.native.js.map +1 -0
  282. package/dist/esm/dom/primitives.native.js +81 -34
  283. package/dist/esm/dom/primitives.native.js.map +1 -1
  284. package/dist/esm/eventHandling.mjs +10 -4
  285. package/dist/esm/eventHandling.mjs.map +1 -1
  286. package/dist/esm/eventHandling.native.js +52 -16
  287. package/dist/esm/eventHandling.native.js.map +1 -1
  288. package/dist/esm/helpers/NativeTextBinding.mjs +17 -0
  289. package/dist/esm/helpers/NativeTextBinding.mjs.map +1 -0
  290. package/dist/esm/helpers/NativeTextBinding.native.js +18 -0
  291. package/dist/esm/helpers/NativeTextBinding.native.js.map +1 -0
  292. package/dist/esm/helpers/configVariables.native.js +2 -6
  293. package/dist/esm/helpers/configVariables.native.js.map +1 -1
  294. package/dist/esm/helpers/createDesignSystem.mjs +14 -10
  295. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  296. package/dist/esm/helpers/createDesignSystem.native.js +4 -4
  297. package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
  298. package/dist/esm/helpers/createStyledContext.native.js +1 -5
  299. package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
  300. package/dist/esm/helpers/expandStyle.mjs +41 -1
  301. package/dist/esm/helpers/expandStyle.mjs.map +1 -1
  302. package/dist/esm/helpers/expandStyle.native.js +36 -3
  303. package/dist/esm/helpers/expandStyle.native.js.map +1 -1
  304. package/dist/esm/helpers/expandStyles.mjs +15 -3
  305. package/dist/esm/helpers/expandStyles.mjs.map +1 -1
  306. package/dist/esm/helpers/expandStyles.native.js +14 -8
  307. package/dist/esm/helpers/expandStyles.native.js.map +1 -1
  308. package/dist/esm/helpers/fluid.mjs +36 -0
  309. package/dist/esm/helpers/fluid.mjs.map +1 -0
  310. package/dist/esm/helpers/fluid.native.js +36 -0
  311. package/dist/esm/helpers/fluid.native.js.map +1 -0
  312. package/dist/esm/helpers/formatDiagnostic.native.js +2 -6
  313. package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
  314. package/dist/esm/helpers/getCSSStylesAtomic.mjs +6 -6
  315. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  316. package/dist/esm/helpers/getSplitStyles.mjs +364 -150
  317. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  318. package/dist/esm/helpers/getSplitStyles.native.js +588 -188
  319. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  320. package/dist/esm/helpers/getThemeCSSRules.mjs +37 -25
  321. package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
  322. package/dist/esm/helpers/grammarConfig.mjs +6 -14
  323. package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
  324. package/dist/esm/helpers/grammarConfig.native.js +32 -22
  325. package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
  326. package/dist/esm/helpers/insertStyleRule.mjs +11 -4
  327. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  328. package/dist/esm/helpers/insertStyleRule.native.js +4 -4
  329. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  330. package/dist/esm/helpers/isObj.native.js +1 -5
  331. package/dist/esm/helpers/isObj.native.js.map +1 -1
  332. package/dist/esm/helpers/mainThreadPressEvents.native.js +48 -100
  333. package/dist/esm/helpers/mainThreadPressEvents.native.js.map +1 -1
  334. package/dist/esm/helpers/mergeProps.mjs +18 -21
  335. package/dist/esm/helpers/mergeProps.mjs.map +1 -1
  336. package/dist/esm/helpers/mergeProps.native.js +20 -23
  337. package/dist/esm/helpers/mergeProps.native.js.map +1 -1
  338. package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
  339. package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
  340. package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
  341. package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
  342. package/dist/esm/helpers/nativeTextMetrics.mjs +55 -0
  343. package/dist/esm/helpers/nativeTextMetrics.mjs.map +1 -0
  344. package/dist/esm/helpers/nativeTextMetrics.native.js +56 -0
  345. package/dist/esm/helpers/nativeTextMetrics.native.js.map +1 -0
  346. package/dist/esm/helpers/normalizeColor.native.js +17 -2
  347. package/dist/esm/helpers/normalizeColor.native.js.map +1 -1
  348. package/dist/esm/helpers/normalizeValueWithProperty.mjs +2 -1
  349. package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
  350. package/dist/esm/helpers/normalizeValueWithProperty.native.js +3 -6
  351. package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
  352. package/dist/esm/helpers/objectIdentityKey.native.js +1 -5
  353. package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
  354. package/dist/esm/helpers/parseNativeStyle.mjs +168 -0
  355. package/dist/esm/helpers/parseNativeStyle.mjs.map +1 -0
  356. package/dist/esm/helpers/parseNativeStyle.native.js +4 -1
  357. package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
  358. package/dist/esm/helpers/proxyThemeToParents.mjs +10 -2
  359. package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
  360. package/dist/esm/helpers/proxyThemeToParents.native.js +29 -2
  361. package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
  362. package/dist/esm/helpers/resolveAnimationDriver.native.js +1 -5
  363. package/dist/esm/helpers/resolveAnimationDriver.native.js.map +1 -1
  364. package/dist/esm/helpers/resolveNativeUnits.mjs +9 -0
  365. package/dist/esm/helpers/resolveNativeUnits.mjs.map +1 -0
  366. package/dist/esm/helpers/resolveNativeUnits.native.js +178 -0
  367. package/dist/esm/helpers/resolveNativeUnits.native.js.map +1 -0
  368. package/dist/esm/helpers/resolveRem.native.js +18 -21
  369. package/dist/esm/helpers/resolveRem.native.js.map +1 -1
  370. package/dist/esm/helpers/resolveSizing.mjs +102 -0
  371. package/dist/esm/helpers/resolveSizing.mjs.map +1 -0
  372. package/dist/esm/helpers/resolveSizing.native.js +109 -0
  373. package/dist/esm/helpers/resolveSizing.native.js.map +1 -0
  374. package/dist/esm/helpers/resolveVariableValue.mjs +7 -7
  375. package/dist/esm/helpers/resolveVariableValue.mjs.map +1 -1
  376. package/dist/esm/helpers/resolveVariableValue.native.js +7 -9
  377. package/dist/esm/helpers/resolveVariableValue.native.js.map +1 -1
  378. package/dist/esm/helpers/resolveVariantStyle.native.js +2 -6
  379. package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -1
  380. package/dist/esm/helpers/skipProps.mjs +0 -1
  381. package/dist/esm/helpers/skipProps.mjs.map +1 -1
  382. package/dist/esm/helpers/skipProps.native.js +0 -1
  383. package/dist/esm/helpers/skipProps.native.js.map +1 -1
  384. package/dist/esm/helpers/styleFrontend.mjs +20 -1
  385. package/dist/esm/helpers/styleFrontend.mjs.map +1 -1
  386. package/dist/esm/helpers/styleFrontend.native.js +20 -1
  387. package/dist/esm/helpers/styleFrontend.native.js.map +1 -1
  388. package/dist/esm/helpers/styleStaticConfigCore.mjs +5 -4
  389. package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -1
  390. package/dist/esm/helpers/styleStaticConfigCore.native.js +7 -4
  391. package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -1
  392. package/dist/esm/helpers/styledDynamic.mjs +5 -0
  393. package/dist/esm/helpers/styledDynamic.mjs.map +1 -1
  394. package/dist/esm/helpers/styledDynamic.native.js +8 -7
  395. package/dist/esm/helpers/styledDynamic.native.js.map +1 -1
  396. package/dist/esm/helpers/subscribeToContextGroup.mjs +16 -7
  397. package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
  398. package/dist/esm/helpers/subscribeToContextGroup.native.js +18 -8
  399. package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
  400. package/dist/esm/helpers/themeRef.native.js +1 -5
  401. package/dist/esm/helpers/themeRef.native.js.map +1 -1
  402. package/dist/esm/helpers/themes.mjs +20 -11
  403. package/dist/esm/helpers/themes.mjs.map +1 -1
  404. package/dist/esm/helpers/themes.native.js +20 -11
  405. package/dist/esm/helpers/themes.native.js.map +1 -1
  406. package/dist/esm/helpers/tokenCategories.mjs +2 -2
  407. package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
  408. package/dist/esm/helpers/tokenCategories.native.js +2 -2
  409. package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
  410. package/dist/esm/helpers/variables.mjs +1 -1
  411. package/dist/esm/helpers/variables.mjs.map +1 -1
  412. package/dist/esm/helpers/variables.native.js +4 -8
  413. package/dist/esm/helpers/variables.native.js.map +1 -1
  414. package/dist/esm/helpers/warnOnce.mjs +6 -1
  415. package/dist/esm/helpers/warnOnce.mjs.map +1 -1
  416. package/dist/esm/helpers/warnOnce.native.js +6 -1
  417. package/dist/esm/helpers/warnOnce.native.js.map +1 -1
  418. package/dist/esm/helpers/webPropsToSkip.native.js +3 -3
  419. package/dist/esm/helpers/webPropsToSkip.native.js.map +1 -1
  420. package/dist/esm/helpers/wrapStyleTags.mjs +1 -1
  421. package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
  422. package/dist/esm/helpers/wrapStyleTags.native.js +1 -1
  423. package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
  424. package/dist/esm/hooks/useComponentState.native.js +1 -5
  425. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  426. package/dist/esm/hooks/useMedia.mjs +27 -34
  427. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  428. package/dist/esm/hooks/useMedia.native.js +45 -51
  429. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  430. package/dist/esm/hooks/useSplitStyles.mjs +1 -1
  431. package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
  432. package/dist/esm/hooks/useSplitStyles.native.js +1 -1
  433. package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
  434. package/dist/esm/hooks/useThemeState.mjs +36 -48
  435. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  436. package/dist/esm/hooks/useThemeState.native.js +44 -50
  437. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  438. package/dist/esm/index.js +4 -1
  439. package/dist/esm/index.mjs +4 -1
  440. package/dist/esm/index.native.js +4 -1
  441. package/dist/esm/internal-runtime.mjs +22 -3
  442. package/dist/esm/internal-runtime.mjs.map +1 -1
  443. package/dist/esm/internal-runtime.native.js +22 -3
  444. package/dist/esm/internal-runtime.native.js.map +1 -1
  445. package/dist/esm/static-resolve.native.js +2 -9
  446. package/dist/esm/static-resolve.native.js.map +1 -1
  447. package/dist/esm/style.mjs +1 -1
  448. package/dist/esm/style.mjs.map +1 -1
  449. package/dist/esm/style.native.js +4 -7
  450. package/dist/esm/style.native.js.map +1 -1
  451. package/dist/esm/views/Theme.mjs +15 -14
  452. package/dist/esm/views/Theme.mjs.map +1 -1
  453. package/dist/esm/views/Theme.native.js +15 -15
  454. package/dist/esm/views/Theme.native.js.map +1 -1
  455. package/dist/esm/views/ThemeDebug.mjs +1 -1
  456. package/dist/esm/views/ThemeDebug.mjs.map +1 -1
  457. package/dist/esm/views/ThemeUpdate.mjs +1 -1
  458. package/dist/esm/views/ThemeUpdate.mjs.map +1 -1
  459. package/dist/esm/views/ThemeUpdate.native.js +1 -1
  460. package/dist/esm/views/ThemeUpdate.native.js.map +1 -1
  461. package/package.json +20 -18
  462. package/reset.css +11 -0
  463. package/src/_withNativeStyle.tsx +6 -1
  464. package/src/config.ts +6 -6
  465. package/src/contexts/ComponentContext.tsx +8 -0
  466. package/src/createComponent.tsx +177 -57
  467. package/src/createStyledHOC.tsx +25 -26
  468. package/src/createTamagui.ts +47 -28
  469. package/src/dom/contract.ts +4 -1
  470. package/src/dom/html.native.tsx +55 -2
  471. package/src/dom/html.tsx +189 -388
  472. package/src/dom/htmlReset.ts +15 -0
  473. package/src/dom/htmlRuntime.native.tsx +5 -0
  474. package/src/dom/htmlStaticConfig.ts +40 -0
  475. package/src/dom/primitives.native.tsx +138 -33
  476. package/src/dom/standalone.ts +2 -1
  477. package/src/dom/styleTypes.ts +82 -92
  478. package/src/eventHandling.native.ts +61 -11
  479. package/src/eventHandling.ts +19 -4
  480. package/src/helpers/NativeTextBinding.tsx +26 -0
  481. package/src/helpers/createDesignSystem.ts +24 -8
  482. package/src/helpers/expandStyle.ts +88 -4
  483. package/src/helpers/expandStyles.ts +6 -11
  484. package/src/helpers/fluid.ts +66 -0
  485. package/src/helpers/getCSSStylesAtomic.ts +11 -6
  486. package/src/helpers/getSplitStyles.tsx +1032 -296
  487. package/src/helpers/getThemeCSSRules.ts +73 -35
  488. package/src/helpers/grammarConfig.ts +23 -8
  489. package/src/helpers/insertStyleRule.tsx +14 -8
  490. package/src/helpers/mainThreadPressEvents.native.ts +65 -141
  491. package/src/helpers/mergeProps.ts +29 -62
  492. package/src/helpers/nativeOnlyProps.ts +0 -1
  493. package/src/helpers/nativeTextMetrics.ts +77 -0
  494. package/src/helpers/normalizeColor.native.ts +29 -4
  495. package/src/helpers/normalizeValueWithProperty.ts +2 -1
  496. package/src/helpers/{parseNativeStyle.native.ts → parseNativeStyle.ts} +8 -1
  497. package/src/helpers/proxyThemeToParents.ts +13 -2
  498. package/src/helpers/resolveNativeUnits.native.ts +247 -0
  499. package/src/helpers/resolveNativeUnits.ts +10 -0
  500. package/src/helpers/resolveRem.native.ts +25 -26
  501. package/src/helpers/resolveSizing.ts +167 -0
  502. package/src/helpers/resolveVariableValue.ts +21 -17
  503. package/src/helpers/skipProps.ts +0 -1
  504. package/src/helpers/styleFrontend.ts +39 -0
  505. package/src/helpers/styleProvenance.ts +1 -1
  506. package/src/helpers/styleStaticConfigCore.ts +15 -4
  507. package/src/helpers/styledDynamic.ts +3 -1
  508. package/src/helpers/subscribeToContextGroup.tsx +16 -7
  509. package/src/helpers/themes.ts +27 -11
  510. package/src/helpers/tokenCategories.ts +15 -3
  511. package/src/helpers/variables.ts +2 -2
  512. package/src/helpers/warnOnce.ts +6 -0
  513. package/src/helpers/webPropsToSkip.native.ts +9 -3
  514. package/src/helpers/wrapStyleTags.tsx +4 -1
  515. package/src/hooks/useMedia.tsx +36 -47
  516. package/src/hooks/useSplitStyles.tsx +4 -1
  517. package/src/hooks/useThemeState.ts +69 -74
  518. package/src/index.ts +13 -0
  519. package/src/interfaces/RNExclusiveTypes.ts +1 -3
  520. package/src/internal-runtime.ts +43 -2
  521. package/src/style.ts +4 -1
  522. package/src/styled.tsx +34 -3
  523. package/src/types.tsx +412 -132
  524. package/src/views/Theme.tsx +18 -21
  525. package/src/views/ThemeDebug.tsx +1 -1
  526. package/src/views/ThemeUpdate.tsx +1 -1
  527. package/types/_withNativeStyle.d.ts.map +1 -1
  528. package/types/config.d.ts.map +1 -1
  529. package/types/contexts/ComponentContext.d.ts +1 -1
  530. package/types/contexts/ComponentContext.d.ts.map +1 -1
  531. package/types/createComponent.d.ts.map +1 -1
  532. package/types/createStyledHOC.d.ts +5 -2
  533. package/types/createStyledHOC.d.ts.map +1 -1
  534. package/types/createTamagui.d.ts.map +1 -1
  535. package/types/dom/contract.d.ts +4 -1
  536. package/types/dom/contract.d.ts.map +1 -1
  537. package/types/dom/html.d.ts +60 -51
  538. package/types/dom/html.d.ts.map +1 -1
  539. package/types/dom/html.native.d.ts.map +1 -1
  540. package/types/dom/htmlReset.d.ts +10 -0
  541. package/types/dom/htmlReset.d.ts.map +1 -0
  542. package/types/dom/htmlRuntime.native.d.ts.map +1 -1
  543. package/types/dom/htmlStaticConfig.d.ts +22 -0
  544. package/types/dom/htmlStaticConfig.d.ts.map +1 -0
  545. package/types/dom/primitives.native.d.ts.map +1 -1
  546. package/types/dom/standalone.d.ts +2 -1
  547. package/types/dom/standalone.d.ts.map +1 -1
  548. package/types/dom/styleTypes.d.ts +63 -84
  549. package/types/dom/styleTypes.d.ts.map +1 -1
  550. package/types/eventHandling.d.ts +12 -4
  551. package/types/eventHandling.d.ts.map +1 -1
  552. package/types/eventHandling.native.d.ts.map +1 -1
  553. package/types/helpers/NativeTextBinding.d.ts +11 -0
  554. package/types/helpers/NativeTextBinding.d.ts.map +1 -0
  555. package/types/helpers/createDesignSystem.d.ts.map +1 -1
  556. package/types/helpers/expandStyle.d.ts +1 -0
  557. package/types/helpers/expandStyle.d.ts.map +1 -1
  558. package/types/helpers/expandStyles.d.ts.map +1 -1
  559. package/types/helpers/fluid.d.ts +21 -0
  560. package/types/helpers/fluid.d.ts.map +1 -0
  561. package/types/helpers/getCSSStylesAtomic.d.ts +3 -1
  562. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  563. package/types/helpers/getSplitStyles.d.ts +2 -1
  564. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  565. package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
  566. package/types/helpers/grammarConfig.d.ts.map +1 -1
  567. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  568. package/types/helpers/mainThreadPressEvents.native.d.ts +0 -7
  569. package/types/helpers/mainThreadPressEvents.native.d.ts.map +1 -1
  570. package/types/helpers/mergeProps.d.ts +1 -15
  571. package/types/helpers/mergeProps.d.ts.map +1 -1
  572. package/types/helpers/nativeOnlyProps.d.ts +0 -1
  573. package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
  574. package/types/helpers/nativeTextMetrics.d.ts +16 -0
  575. package/types/helpers/nativeTextMetrics.d.ts.map +1 -0
  576. package/types/helpers/normalizeColor.native.d.ts +4 -1
  577. package/types/helpers/normalizeColor.native.d.ts.map +1 -1
  578. package/types/helpers/normalizeShadow.native.d.ts +3 -1
  579. package/types/helpers/normalizeShadow.native.d.ts.map +1 -1
  580. package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
  581. package/types/helpers/{parseNativeStyle.native.d.ts → parseNativeStyle.d.ts} +1 -1
  582. package/types/helpers/parseNativeStyle.d.ts.map +1 -0
  583. package/types/helpers/proxyThemeToParents.d.ts +1 -1
  584. package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
  585. package/types/helpers/resolveNativeUnits.d.ts +6 -0
  586. package/types/helpers/resolveNativeUnits.d.ts.map +1 -0
  587. package/types/helpers/resolveNativeUnits.native.d.ts +16 -0
  588. package/types/helpers/resolveNativeUnits.native.d.ts.map +1 -0
  589. package/types/helpers/resolveRem.native.d.ts +6 -4
  590. package/types/helpers/resolveRem.native.d.ts.map +1 -1
  591. package/types/helpers/resolveSizing.d.ts +90 -0
  592. package/types/helpers/resolveSizing.d.ts.map +1 -0
  593. package/types/helpers/resolveVariableValue.d.ts.map +1 -1
  594. package/types/helpers/skipProps.d.ts +0 -1
  595. package/types/helpers/skipProps.d.ts.map +1 -1
  596. package/types/helpers/styleFrontend.d.ts +21 -0
  597. package/types/helpers/styleFrontend.d.ts.map +1 -1
  598. package/types/helpers/styleProvenance.d.ts +1 -1
  599. package/types/helpers/styleProvenance.d.ts.map +1 -1
  600. package/types/helpers/styleStaticConfigCore.d.ts.map +1 -1
  601. package/types/helpers/styledDynamic.d.ts +1 -1
  602. package/types/helpers/styledDynamic.d.ts.map +1 -1
  603. package/types/helpers/themes.d.ts +4 -0
  604. package/types/helpers/themes.d.ts.map +1 -1
  605. package/types/helpers/tokenCategories.d.ts +1 -1
  606. package/types/helpers/tokenCategories.d.ts.map +1 -1
  607. package/types/helpers/warnOnce.d.ts +1 -0
  608. package/types/helpers/warnOnce.d.ts.map +1 -1
  609. package/types/helpers/webPropsToSkip.native.d.ts +6 -2
  610. package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
  611. package/types/helpers/wrapStyleTags.d.ts.map +1 -1
  612. package/types/hooks/useMedia.d.ts +5 -2
  613. package/types/hooks/useMedia.d.ts.map +1 -1
  614. package/types/hooks/useSplitStyles.d.ts.map +1 -1
  615. package/types/hooks/useThemeState.d.ts.map +1 -1
  616. package/types/index.d.ts +4 -1
  617. package/types/index.d.ts.map +1 -1
  618. package/types/interfaces/RNExclusiveTypes.d.ts +2 -3
  619. package/types/interfaces/RNExclusiveTypes.d.ts.map +1 -1
  620. package/types/internal-runtime.d.ts +12 -1
  621. package/types/internal-runtime.d.ts.map +1 -1
  622. package/types/style.d.ts.map +1 -1
  623. package/types/styled.d.ts +7 -4
  624. package/types/styled.d.ts.map +1 -1
  625. package/types/types.d.ts +258 -102
  626. package/types/types.d.ts.map +1 -1
  627. package/types/views/Theme.d.ts.map +1 -1
  628. package/dist/cjs/helpers/timer.native.js.map +0 -1
  629. package/dist/esm/helpers/timer.mjs +0 -13
  630. package/dist/esm/helpers/timer.mjs.map +0 -1
  631. package/dist/esm/helpers/timer.native.js +0 -13
  632. package/dist/esm/helpers/timer.native.js.map +0 -1
  633. package/src/helpers/timer.ts +0 -9
  634. package/types/helpers/parseNativeStyle.native.d.ts.map +0 -1
  635. package/types/helpers/timer.d.ts +0 -2
  636. package/types/helpers/timer.d.ts.map +0 -1
package/types/types.d.ts CHANGED
@@ -1,9 +1,12 @@
1
1
  import type { StyleObject } from '@tamagui/helpers';
2
2
  import type { CoreStateModifierName, TransformAccumulator } from '@tamagui/style-grammar/runtime';
3
3
  import type { Properties } from 'csstype';
4
+ import type { UnprefixedCSSProperties } from './dom/styleTypes';
4
5
  import type { CSSProperties, ComponentType, Context, Dispatch, FunctionComponent, HTMLAttributes, ProviderExoticComponent, Ref as ReactRef, ReactNode, RefObject, SetStateAction } from 'react';
5
- import type { PressableProps, Text as RNText, TextStyle as RNTextStyle, TextProps as ReactTextProps, View, ViewProps, ViewStyle } from 'react-native';
6
+ import type { FontVariant, PressableProps, TextInstance as RNText, TextStyle as RNTextStyle, TextProps as ReactTextProps, ViewInstance as View, ViewProps, ViewStyle } from '@tamagui/react-native-types';
6
7
  import type { NativeStyleEngineLinkHandle } from './helpers/nativeStyleEngine';
8
+ import type { AnimatedTextChannel, NativeTextContext, NativeTextMetrics } from './helpers/nativeTextMetrics';
9
+ export type { AnimatedTextChannel, NativeTextMetrics } from './helpers/nativeTextMetrics';
7
10
  import type { StyleFrontend } from './helpers/styleFrontend';
8
11
  import type { CSSColorNames } from './interfaces/CSSColorNames';
9
12
  import type { RNOnlyProps } from './interfaces/RNExclusiveTypes';
@@ -221,6 +224,7 @@ export type ThemeState = {
221
224
  isNew?: boolean;
222
225
  parentId?: string;
223
226
  scheme?: 'light' | 'dark';
227
+ schemeAuthored?: boolean;
224
228
  };
225
229
  export interface Variable<A = any> {
226
230
  isVar: true;
@@ -298,14 +302,12 @@ export type ReactComponentWithRef<Props, Ref> = ComponentType<Props & {
298
302
  }>;
299
303
  export type ComponentSetStateShallow = React.Dispatch<React.SetStateAction<Partial<TamaguiComponentState>>>;
300
304
  export type ComponentSetState = Dispatch<SetStateAction<TamaguiComponentState>>;
301
- export type ComponentContextI = {
305
+ export type ComponentContextI = NativeTextContext & {
302
306
  disableSSR?: boolean;
303
307
  inText: boolean;
304
308
  language: LanguageContextType | null;
305
309
  animationDriver: AnimationDriver | null;
306
310
  setParentFocusState: ComponentSetStateShallow | null;
307
- mediaEmit?: (state: UseMediaState) => void;
308
- mediaEmitListeners?: Set<(state: UseMediaState) => void>;
309
311
  insets?: {
310
312
  top: number;
311
313
  right: number;
@@ -318,6 +320,8 @@ export type TamaguiComponentStateRef = {
318
320
  optimizeForFirstRender?: boolean;
319
321
  host?: TamaguiElement;
320
322
  composedRef?: (x: TamaguiElement) => void;
323
+ composedForwardedRef?: React.Ref<TamaguiElement>;
324
+ attachedForwardedRef?: React.Ref<TamaguiElement>;
321
325
  willHydrate?: boolean;
322
326
  hasMeasured?: boolean;
323
327
  hasAnimated?: boolean;
@@ -329,6 +333,7 @@ export type TamaguiComponentStateRef = {
329
333
  hasEverResetPresence?: boolean;
330
334
  hasHadEvents?: boolean;
331
335
  hasRealPressEvents?: boolean;
336
+ hadAttachPress?: boolean;
332
337
  isListeningToTheme?: boolean;
333
338
  unPress?: Function;
334
339
  setStateShallow?: ComponentSetStateShallow;
@@ -341,7 +346,8 @@ export type TamaguiComponentStateRef = {
341
346
  nextState?: TamaguiComponentState;
342
347
  nextMedia?: UseMediaState;
343
348
  avoidReRenders?: boolean;
344
- mediaEmitCleanup?: () => void;
349
+ mediaEmit?: (state: UseMediaState) => void;
350
+ mediaEmitQueued?: boolean;
345
351
  prevPseudoState?: {
346
352
  hover?: boolean;
347
353
  press?: boolean;
@@ -361,6 +367,7 @@ export type TamaguiComponentStateRef = {
361
367
  nativeMediaQueued?: boolean;
362
368
  nativeThemeState?: ThemeState;
363
369
  nativePushedKeys?: Set<string>;
370
+ prevStyle?: Record<string, any> | null;
364
371
  };
365
372
  export type ComponentGroupEmitter = {
366
373
  listeners: Set<GroupStateListener>;
@@ -374,6 +381,7 @@ export type WidthHeight = {
374
381
  export type ChildGroupState = {
375
382
  pseudo?: PseudoGroupState;
376
383
  media?: Record<MediaQueryKey extends number ? never : MediaQueryKey, boolean>;
384
+ layout?: WidthHeight;
377
385
  };
378
386
  export type ComponentGroupState = {
379
387
  pseudo?: PseudoGroupState;
@@ -510,7 +518,7 @@ export type OnlyAllowShorthandsSetting = TamaguiConfig['settings'] extends {
510
518
  export type OnlyShorthandStylePropsSetting = TamaguiConfig['settings'] extends {
511
519
  onlyShorthandStyleProps: infer X;
512
520
  } ? X : false;
513
- export type CreateTamaguiConfig<A extends GenericTokens, B extends GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts, H extends GenericTamaguiSettings = GenericTamaguiSettings, AnimDriverKeys extends string = string> = {
521
+ export type CreateTamaguiConfig<A extends GenericTokens, B extends GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts, H extends GenericTamaguiSettings = GenericTamaguiSettings, S extends GenericSizing = GenericSizing, AnimDriverKeys extends string = string> = {
514
522
  fonts: RemoveLanguagePostfixes<F>;
515
523
  fontLanguages: GetLanguagePostfixes<F> extends never ? string[] : GetLanguagePostfixes<F>[];
516
524
  tokens: A;
@@ -524,6 +532,7 @@ export type CreateTamaguiConfig<A extends GenericTokens, B extends GenericThemes
524
532
  animations: AnimationDriverLike<E> | AnimationsConfigObject;
525
533
  animationDriverKeys?: AnimDriverKeys;
526
534
  settings: H;
535
+ sizing: S;
527
536
  };
528
537
  type GetLanguagePostfix<Set> = Set extends string ? Set extends `${string}_${infer Postfix}` ? Postfix : never : never;
529
538
  type OmitLanguagePostfix<Set> = Set extends string ? Set extends `${infer Prefix}_${string}` ? Prefix : Set : never;
@@ -531,7 +540,7 @@ type RemoveLanguagePostfixes<F extends GenericFonts> = {
531
540
  [Key in OmitLanguagePostfix<keyof F>]: F[Key];
532
541
  };
533
542
  type GetLanguagePostfixes<F extends GenericFonts> = GetLanguagePostfix<keyof F>;
534
- type ConfProps<A, B, C, D, E, F, I, V = undefined> = {
543
+ type ConfProps<A, B, C, D, E, F, I, S, V = undefined> = {
535
544
  tokens?: A;
536
545
  themes?: B;
537
546
  shorthands?: C;
@@ -539,6 +548,7 @@ type ConfProps<A, B, C, D, E, F, I, V = undefined> = {
539
548
  animations?: E;
540
549
  fonts?: F;
541
550
  settings?: I;
551
+ sizing?: S;
542
552
  variables?: V;
543
553
  };
544
554
  type VariableValInScheme<V> = V extends {
@@ -570,7 +580,7 @@ type ExtractAnimationConfig<E> = E extends AnimationDriverLike<infer Config> ? C
570
580
  type ExtractAnimationDriverKeys<E> = E extends AnimationDriverLike<any> ? 'default' : E extends {
571
581
  default: AnimationDriverLike<any>;
572
582
  } ? Extract<keyof E, string> : 'default';
573
- export type InferTamaguiConfig<Conf> = Conf extends ConfProps<infer A, infer B, infer C, infer D, infer E, infer F, infer H, infer V> ? TamaguiInternalConfig<A extends GenericTokens ? A : EmptyTokens, B extends GenericThemes ? ThemesWithVariables<B, V> : EmptyThemes, C extends GenericShorthands ? C : EmptyShorthands, D extends GenericMedia ? D : EmptyMedia, ExtractAnimationConfig<E>, F extends GenericFonts ? F : EmptyFonts, H extends GenericTamaguiSettings ? H : EmptyTamaguiSettings, ExtractAnimationDriverKeys<E>> : unknown;
583
+ export type InferTamaguiConfig<Conf> = Conf extends ConfProps<infer A, infer B, infer C, infer D, infer E, infer F, infer H, infer S, infer V> ? TamaguiInternalConfig<A extends GenericTokens ? A : EmptyTokens, B extends GenericThemes ? ThemesWithVariables<B, V> : EmptyThemes, C extends GenericShorthands ? C : EmptyShorthands, D extends GenericMedia ? D : EmptyMedia, ExtractAnimationConfig<E>, F extends GenericFonts ? F : EmptyFonts, H extends GenericTamaguiSettings ? H : EmptyTamaguiSettings, S extends GenericSizing ? S : GenericSizing, ExtractAnimationDriverKeys<E>> : unknown;
574
584
  export type GenericTamaguiConfig = CreateTamaguiConfig<GenericTokens, GenericThemes, GenericShorthands, GenericMedia, GenericAnimations, GenericFonts>;
575
585
  export type RootThemeName<TK extends keyof Themes = keyof Themes> = TK extends string ? string extends TK ? never : TK extends `${string}_${string}` ? never : TK : never;
576
586
  type BaseThemeDefinitions = TamaguiConfig['themes'][RootThemeName];
@@ -649,8 +659,9 @@ export interface GenericTamaguiSettings {
649
659
  * controls style semantics where React Native/Yoga and CSS differ.
650
660
  *
651
661
  * - "legacy": preserves Tamagui v1 flex expansion.
652
- * - "react-native": follows React Native/Yoga flex and raw numeric lineHeight semantics.
653
- * - "web": follows CSS flex and unitless numeric lineHeight semantics.
662
+ * - "react-native": follows React Native/Yoga flex expansion.
663
+ * - "web": follows CSS flex expansion.
664
+ * numeric Tamagui lineHeight values are ratios in every mode.
654
665
  *
655
666
  * @default "web"
656
667
  */
@@ -736,6 +747,17 @@ export interface GenericTamaguiSettings {
736
747
  * two ways to style the same property.
737
748
  */
738
749
  onlyAllowShorthands?: boolean | undefined;
750
+ /**
751
+ * Restrict conditional style values to one syntax. Flat values accept both
752
+ * the string form (`bg="red hover:blue"`) and the object form
753
+ * (`bg={{ base: 'red', hover: 'blue' }}`); set this to keep one of them,
754
+ * which narrows the types, makes the runtime warn on the other in
755
+ * development, and tells `tamagui generate-prompt` and the skills to only
756
+ * show that form.
757
+ *
758
+ * @default undefined - both forms are allowed
759
+ */
760
+ styleValueSyntax?: 'string' | 'object' | undefined;
739
761
  /**
740
762
  * Define a default font, for better types and default font on Text
741
763
  */
@@ -811,6 +833,45 @@ export interface GenericTamaguiSettings {
811
833
  */
812
834
  onlyShorthandStyleProps?: boolean;
813
835
  }
836
+ /** one rung of the control ladder: token keys, plus optional pinned geometry */
837
+ export type SizeRecipe = {
838
+ fontSize: string;
839
+ /**
840
+ * the type-scale key the square controls (checkbox, radio, switch) size
841
+ * from. Usually the rung's own name, but text deliberately steps down at
842
+ * `md`/`lg` so buttons are not chunky while the squares stay on-scale.
843
+ */
844
+ controlFontSize: string;
845
+ paddingInline: string;
846
+ paddingBlock: string;
847
+ gap: string;
848
+ radius: string;
849
+ /**
850
+ * explicit rung geometry, skipping derivation. For scales whose keys
851
+ * cannot derive the ladder (v5's numeric scales pin the frozen heights
852
+ * here so v5 apps never resize).
853
+ */
854
+ px?: {
855
+ height: number;
856
+ icon: number;
857
+ square: number;
858
+ };
859
+ };
860
+ /**
861
+ * the user-configurable control ladder. Rung names become the accepted
862
+ * `size` values (see ComponentSize); the px derivations in resolveSizing are
863
+ * fixed formulas over the rung's tokens.
864
+ */
865
+ export type GenericSizing = {
866
+ default: string;
867
+ sizes: Record<string, SizeRecipe>;
868
+ };
869
+ /**
870
+ * the config's control size names: the default ladder plus any custom rungs
871
+ * from `sizing.sizes`. Stays the five literals (never `string`) when no
872
+ * custom config is registered.
873
+ */
874
+ export type ComponentSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | (string extends keyof TamaguiConfig['sizing']['sizes'] ? never : Extract<keyof TamaguiConfig['sizing']['sizes'], string>);
814
875
  export type TamaguiSettings = TamaguiConfig['settings'];
815
876
  export type BaseStyleProps = {
816
877
  [Key in keyof TextStylePropsBase]?: TextStyle[Key] | GetThemeValueForKey<Key>;
@@ -857,19 +918,18 @@ export type CreateTamaguiProps = {
857
918
  variables?: GenericVariables;
858
919
  settings?: Partial<GenericTamaguiSettings>;
859
920
  /**
860
- * Web-only: define text-selection CSS
921
+ * the control size ladder: rung names become the accepted `size` values.
922
+ * Spread `defaultSizing` and override `sizes` to add or retune rungs; the
923
+ * px derivations are fixed formulas over each rung's tokens.
861
924
  */
862
- selectionStyles?: (theme: Record<string, string>) => null | {
863
- backgroundColor?: any;
864
- color?: any;
865
- };
925
+ sizing?: GenericSizing;
866
926
  };
867
927
  export type GetCSS = (opts?: {
868
928
  separator?: string;
869
929
  exclude?: 'themes' | 'design-system' | null;
870
930
  sinceLastCall?: boolean;
871
931
  }) => string;
872
- export type TamaguiInternalConfig<A extends GenericTokens = GenericTokens, B extends GenericThemes = GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts, G extends GenericTamaguiSettings = GenericTamaguiSettings, AnimDriverKeys extends string = string> = Omit<CreateTamaguiProps, keyof GenericTamaguiConfig> & Omit<CreateTamaguiConfig<A, B, C, D, E, F, G, AnimDriverKeys>, 'tokens'> & {
932
+ export type TamaguiInternalConfig<A extends GenericTokens = GenericTokens, B extends GenericThemes = GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts, G extends GenericTamaguiSettings = GenericTamaguiSettings, S extends GenericSizing = GenericSizing, AnimDriverKeys extends string = string> = Omit<CreateTamaguiProps, keyof GenericTamaguiConfig> & Omit<CreateTamaguiConfig<A, B, C, D, E, F, G, S, AnimDriverKeys>, 'tokens'> & {
873
933
  tokens: Tokenify<A>;
874
934
  tokensParsed: Tokenify<A>;
875
935
  themeConfig: any;
@@ -882,6 +942,7 @@ export type TamaguiInternalConfig<A extends GenericTokens = GenericTokens, B ext
882
942
  reactNative?: any;
883
943
  fontSizeTokens: Set<string>;
884
944
  settings: Omit<GenericTamaguiSettings, keyof G> & G;
945
+ sizing: Omit<GenericSizing, keyof S> & S;
885
946
  defaultFont?: string;
886
947
  defaultFontToken: `${string}`;
887
948
  animationDrivers?: Record<string, AnimationDriverLike | null>;
@@ -896,7 +957,7 @@ export type GenericFont<Key extends GenericFontKey = GenericFontKey> = {
896
957
  };
897
958
  family?: string | Variable;
898
959
  lineHeight?: Partial<{
899
- [key in Key]: number | Variable;
960
+ [key in Key]: number | Px | `${number}` | Variable;
900
961
  }> | undefined;
901
962
  letterSpacing?: Partial<{
902
963
  [key in Key]: number | Variable;
@@ -953,52 +1014,81 @@ export interface MediaQueryList {
953
1014
  export type MatchMedia = (query: string) => MediaQueryList;
954
1015
  export type AnimationConfigType = any;
955
1016
  /**
956
- * Spring configuration parameters that can override preset defaults.
957
- * Use with array syntax: transition={['bouncy', { stiffness: 1000, damping: 70 }]}
1017
+ * Low-level spring physics. A projection of `duration` + `bounce`, not a second
1018
+ * way to configure a spring: whichever you author, the other is derived, and
1019
+ * every driver ends up with the same motion.
1020
+ *
1021
+ * Reach for this only when you are porting a config you already tuned.
958
1022
  */
959
1023
  export type TransitionSpringConfig = {
960
1024
  stiffness?: number;
961
1025
  damping?: number;
962
1026
  mass?: number;
963
- tension?: number;
964
- friction?: number;
965
1027
  velocity?: number;
966
1028
  overshootClamping?: boolean;
967
- duration?: number;
968
- bounciness?: number;
969
- speed?: number;
1029
+ restDisplacementThreshold?: number;
1030
+ restSpeedThreshold?: number;
970
1031
  };
971
1032
  /**
972
- * A transition value: the name of a configured driver animation, or a raw CSS
973
- * transition string such as `200ms` or `200ms hover:400ms`. The runtime accepts
974
- * both — a name that is not a configured preset is treated as CSS — so the type
975
- * must too. `(string & {})` keeps the preset names in autocomplete instead of
976
- * collapsing the union to plain `string`.
1033
+ * A transition value: the name of a configured driver animation, or a CSS
1034
+ * transition string such as `200ms`, `200ms ease-out`, or
1035
+ * `opacity 150ms, transform 300ms`.
1036
+ *
1037
+ * Springs get a CSS-shaped function of their own: `spring(300ms, 0.4)` is a
1038
+ * 300ms spring with a bounce of 0.4. It works everywhere a timing function
1039
+ * does, including on the web, where it compiles to a `linear()` easing.
1040
+ *
1041
+ * A bare string that exactly matches a configured animation name is that
1042
+ * preset; everything else is CSS. `(string & {})` keeps preset names in
1043
+ * autocomplete instead of collapsing the union to plain `string`.
977
1044
  */
978
1045
  export type TransitionValue = TransitionKeys | (string & {});
979
- export type TransitionProp = TransitionValue | ({
980
- default?: TransitionValue;
981
- enter?: TransitionValue;
982
- exit?: TransitionValue;
983
- delay?: number;
984
- } & TransitionSpringConfig & {
985
- [key: string]: TransitionValue | {
986
- type: TransitionValue;
987
- [key: string]: any;
988
- } | number | boolean | undefined;
989
- }) | [
990
- TransitionValue,
991
- {
992
- delay?: number;
993
- enter?: TransitionValue;
994
- exit?: TransitionValue;
995
- } & TransitionSpringConfig & {
996
- [key: string]: TransitionValue | {
997
- type?: TransitionValue;
998
- [key: string]: any;
999
- } | number | boolean | undefined;
1000
- }
1001
- ];
1046
+ /**
1047
+ * The settings half of a transition object. Anything else in the object is a
1048
+ * style property name carrying its own transition.
1049
+ */
1050
+ export type TransitionConfig = {
1051
+ /** a configured animation to start from */
1052
+ preset?: TransitionKeys;
1053
+ /** milliseconds, or a CSS time like `'200ms'` */
1054
+ duration?: number | string;
1055
+ /**
1056
+ * Makes it a spring. `0` is critically damped (no overshoot), approaching
1057
+ * `1` is loose and oscillating, negative is sluggish. `duration` stays the
1058
+ * perceptual "how fast does this feel" number either way.
1059
+ */
1060
+ bounce?: number;
1061
+ /** any CSS timing function. Mutually exclusive with `bounce`. */
1062
+ easing?: string;
1063
+ /** milliseconds, or a CSS time */
1064
+ delay?: number | string;
1065
+ behavior?: 'normal' | 'allow-discrete';
1066
+ /** the CSS `transition-property` list these settings apply to */
1067
+ properties?: string;
1068
+ spring?: TransitionSpringConfig;
1069
+ /** the transition to use while mounting, if it differs */
1070
+ enter?: TransitionProp;
1071
+ /** the transition to use while unmounting, if it differs */
1072
+ exit?: TransitionProp;
1073
+ };
1074
+ /**
1075
+ * `transition` accepts a string or an object, and nothing else.
1076
+ *
1077
+ * ```tsx
1078
+ * transition="bouncy" // a configured preset
1079
+ * transition="200ms ease-out" // css
1080
+ * transition="opacity 150ms, transform spring(300ms, 0.4)"
1081
+ * transition={{ duration: 200, bounce: 0.15 }}
1082
+ * transition={{ preset: 'bouncy', opacity: '150ms' }} // per-property override
1083
+ * ```
1084
+ *
1085
+ * Per-property keys are later CSS entries, so they win for that property and
1086
+ * inherit nothing from the base, exactly as
1087
+ * `transition: all 200ms, opacity 150ms` behaves in a stylesheet.
1088
+ */
1089
+ export type TransitionProp = TransitionValue | (TransitionConfig & {
1090
+ [property: string]: TransitionValue | TransitionConfig | unknown;
1091
+ });
1002
1092
  /**
1003
1093
  * Emitted by the animation driver at the start and end of a transition.
1004
1094
  *
@@ -1022,8 +1112,30 @@ type SomewhatSpecificSizeValue = 'auto' | PercentString | RemString | UnionableN
1022
1112
  type SomewhatSpecificSpaceValue = 'auto' | PercentString | RemString | UnionableNumber;
1023
1113
  type VariableString = `var(${string})`;
1024
1114
  export type SomewhatSpecificColorValue = CSSColorNames | 'transparent' | (`rgba(${string})` & {}) | (`rgb(${string})` & {}) | (`hsl(${string})` & {}) | (`hsla(${string})` & {}) | (`#${string}` & {});
1025
- type WebOnlySizeValue = `${number}vw` | `${number}dvw` | `${number}lvw` | `${number}svw` | `${number}vh` | `${number}dvh` | `${number}lvh` | `${number}svh` | `calc(${string})` | `min(${string})` | `max(${string})` | 'max-content' | 'min-content';
1115
+ type WebOnlySizeValue = `${number}px` | `${number}em` | `${number}ch` | `${number}vmin` | `${number}vmax` | `${number}vw` | `${number}dvw` | `${number}lvw` | `${number}svw` | `${number}vh` | `${number}dvh` | `${number}lvh` | `${number}svh` | `calc(${string})` | `min(${string})` | `max(${string})` | `clamp(${string})` | 'max-content' | 'min-content';
1026
1116
  type UserAllowedStyleValuesSetting = Exclude<TamaguiSettings['allowedStyleValues'], undefined>;
1117
+ /**
1118
+ * A flat value string that carries a clause (`red hover:blue`, `dark:red`)
1119
+ * or a multi-token payload (`1px solid red`). Its grammar is validated by the
1120
+ * language service and the runtime, not by the type system. With
1121
+ * `styleValueSyntax: 'object'` the `:` arm is dropped, so a clause-only
1122
+ * string like `hover:red` is a type error (a clause after a space still
1123
+ * passes through the multi-token arm).
1124
+ */
1125
+ export type FlatClauseString = `${string} ${string}` | (StyleValueSyntaxSetting extends 'object' ? never : `${string}:${string}`);
1126
+ type StyleValueSyntaxSetting = TamaguiSettings extends {
1127
+ styleValueSyntax: infer S;
1128
+ } ? S : undefined;
1129
+ /**
1130
+ * The open string arm every style value carries. With no `allowedStyleValues`
1131
+ * setting (or a boolean one) it is `string & {}`, so any string is accepted.
1132
+ * With a strictness setting, a single-token string (no space, no `:`) has to
1133
+ * be a token, theme value, or a value the setting allows, so a typo like
1134
+ * `bg="backgroun"` is a type error; only clause strings stay open.
1135
+ */
1136
+ export type OpenStyleString = TamaguiSettings extends {
1137
+ allowedStyleValues: infer Setting;
1138
+ } ? Setting extends boolean ? UnionableString : FlatClauseString : UnionableString;
1027
1139
  export type GetThemeValueSettingForCategory<Cat extends keyof AllowedStyleValuesSettingPerCategory> = UserAllowedStyleValuesSetting extends AllowedValueSettingBase | undefined ? UserAllowedStyleValuesSetting : UserAllowedStyleValuesSetting extends AllowedStyleValuesSettingPerCategory ? UserAllowedStyleValuesSetting[Cat] : true;
1028
1140
  export type GetThemeValueFallbackFor<Setting, StrictValue, SomewhatStrictValue, LooseValue, WebOnlyValue> = Setting extends 'strict' ? StrictValue : Setting extends 'strict-web' ? StrictValue | WebOnlyValue : Setting extends 'somewhat-strict' ? SomewhatStrictValue : Setting extends 'somewhat-strict-web' ? SomewhatStrictValue | WebOnlyValue : LooseValue;
1029
1141
  export type ThemeValueFallback = (TamaguiSettings extends {
@@ -1042,13 +1154,13 @@ export type ThemeValueFallbackColor = ThemeValueFallback | GetThemeValueFallback
1042
1154
  export type ThemeValueFallbackRadius = ThemeValueFallback | GetThemeValueFallbackFor<AllowedValueSettingRadius, never, UnionableNumber, UnionableNumber, WebStyleValueUniversal>;
1043
1155
  export type ThemeValueFallbackZIndex = ThemeValueFallback | GetThemeValueFallbackFor<AllowedValueSettingZIndex, never, UnionableNumber, UnionableNumber, WebStyleValueUniversal>;
1044
1156
  export type GetTokenString<A> = A extends string | number ? `${A}` : string;
1045
- export type Size = ThemeValueFallbackSize | GetTokenString<keyof Tokens['size']> | (string & {}) | true;
1157
+ export type Size = ThemeValueFallbackSize | GetTokenString<keyof Tokens['size']> | OpenStyleString | true;
1046
1158
  export type SizeTokens = Size;
1047
1159
  export type Space = GetTokenString<keyof Tokens['space']> | ThemeValueFallbackSpace | true;
1048
1160
  export type SpaceTokens = Space;
1049
1161
  type ColorTokenBase = GetTokenString<keyof Tokens['color']> | GetTokenString<keyof ThemeParsed>;
1050
1162
  type TokenWithOpacity = `${string}/${number}`;
1051
- export type Color = ColorTokenBase | CSSColorNames | TokenWithOpacity | (string & {});
1163
+ export type Color = ColorTokenBase | CSSColorNames | TokenWithOpacity | OpenStyleString;
1052
1164
  export type ColorTokens = Color;
1053
1165
  export type ZIndex = GetTokenString<keyof Tokens['zIndex']> | ThemeValueFallbackZIndex | number | true;
1054
1166
  export type ZIndexTokens = ZIndex;
@@ -1064,7 +1176,7 @@ export type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>;
1064
1176
  export type FontFamilyTokens = FontTokens;
1065
1177
  export type FontSize = GetTokenString<GetTokenFontKeysFor<'size'>> | number | RemString | true;
1066
1178
  export type FontSizeTokens = FontSize;
1067
- export type FontLineHeightTokens = GetTokenString<GetTokenFontKeysFor<'lineHeight'>> | number | RemString;
1179
+ export type FontLineHeightTokens = GetTokenString<GetTokenFontKeysFor<'lineHeight'>> | number | Px | `${number}` | RemString;
1068
1180
  export type FontWeightValues = `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | 'bold' | 'normal';
1069
1181
  export type FontWeightTokens = GetTokenString<GetTokenFontKeysFor<'weight'>> | FontWeightValues;
1070
1182
  type FontColorTokenBase = GetTokenString<GetTokenFontKeysFor<'color'>>;
@@ -1092,10 +1204,11 @@ export type FontLetterSpacingKeys = 'letterSpacing';
1092
1204
  export type LineHeightKeys = 'lineHeight';
1093
1205
  export type ZIndexKeys = 'zIndex';
1094
1206
  export type OpacityKeys = 'opacity';
1095
- export type ThemeValueGet<K extends string | number | symbol> = K extends 'theme' ? ThemeTokens : K extends SizeKeys ? SizeTokens : K extends FontKeys ? FontTokens : K extends FontSizeKeys ? FontSizeTokens : K extends `${`border${string | ''}Radius`}` ? RadiusTokens : K extends SpaceKeys ? K extends 'shadowOffset' ? {
1207
+ type FontStyleValueFallback = GetThemeValueFallbackFor<AllowedValueSettingSize, never, never, never, WebStyleValueUniversal | `${number}%`>;
1208
+ export type ThemeValueGet<K extends string | number | symbol> = K extends 'theme' ? ThemeTokens : K extends SizeKeys ? SizeTokens : K extends FontKeys ? FontTokens : K extends FontSizeKeys ? FontSizeTokens | FontStyleValueFallback : K extends `${`border${string | ''}Radius`}` ? RadiusTokens : K extends SpaceKeys ? K extends 'shadowOffset' ? {
1096
1209
  width: SpaceTokens;
1097
1210
  height: SpaceTokens;
1098
- } : SpaceTokens : K extends ColorKeys ? ColorTokens | ThemeValueFallbackColor : K extends ZIndexKeys ? ZIndexTokens : K extends LineHeightKeys ? FontLineHeightTokens : K extends FontWeightKeys ? FontWeightTokens : K extends FontLetterSpacingKeys ? FontLetterSpacingTokens : K extends OpacityKeys ? ThemeValueFallback : never;
1211
+ } : SpaceTokens : K extends ColorKeys ? ColorTokens | ThemeValueFallbackColor : K extends ZIndexKeys ? ZIndexTokens : K extends LineHeightKeys ? FontLineHeightTokens | FontStyleValueFallback : K extends FontWeightKeys ? FontWeightTokens : K extends FontLetterSpacingKeys ? FontLetterSpacingTokens : K extends OpacityKeys ? ThemeValueFallback : never;
1099
1212
  export type GetThemeValueForKey<K extends string | symbol | number> = ThemeValueGet<K> | ThemeValueFallback;
1100
1213
  export type SafeAreaValueKeys = 'padding' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingHorizontal' | 'paddingVertical' | 'paddingStart' | 'paddingEnd' | 'paddingBlock' | 'paddingInline' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd' | 'margin' | 'marginTop' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginHorizontal' | 'marginVertical' | 'marginStart' | 'marginEnd' | 'marginBlock' | 'marginInline' | 'marginBlockStart' | 'marginBlockEnd' | 'marginInlineStart' | 'marginInlineEnd' | 'inset' | 'top' | 'bottom' | 'left' | 'right' | 'start' | 'end';
1101
1214
  /**
@@ -1123,21 +1236,21 @@ type FlatClauseName = ClauseModifierName | `${ClauseModifierName}:${string}` | `
1123
1236
  * package boundaries.
1124
1237
  */
1125
1238
  export type FlatStyleObject<T> = {
1126
- default?: T | (string & {});
1239
+ default?: T | OpenStyleString;
1127
1240
  } & {
1128
- [K in FlatClauseName]?: T | (string & {});
1241
+ [K in FlatClauseName]?: T | OpenStyleString;
1129
1242
  };
1130
1243
  /**
1131
- * The string arm stays at base values only: `(string & {})` admits every
1244
+ * The string arm stays at base values only: `OpenStyleString` admits every
1132
1245
  * clause string, and structured clause completion comes from the object
1133
1246
  * form's keys (and the language-service plugin for strings). A per-prop
1134
1247
  * `${modifier}:` prefix union used to ride along for first-prefix
1135
1248
  * completion; it multiplied across the whole component prop graph and the
1136
1249
  * object form made it redundant.
1137
1250
  */
1138
- export type FlatStyleValue<T> = T | FlatStyleObject<T> | (string & {});
1251
+ export type FlatStyleValue<T> = T | (StyleValueSyntaxSetting extends 'string' ? never : FlatStyleObject<T>) | OpenStyleString;
1139
1252
  export type WithThemeValues<T extends object> = {
1140
- [K in keyof T]: (ThemeValueGet<K> extends never ? K extends keyof ExtraBaseProps ? T[K] : FlatStyleValue<T[K] | 'unset'> : FlatStyleValue<GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset'>) | (K extends SafeAreaValueKeys ? 'safe' : never);
1253
+ -readonly [K in keyof T]: (ThemeValueGet<K> extends never ? K extends keyof ExtraBaseProps ? T[K] : FlatStyleValue<T[K] | 'unset'> : FlatStyleValue<GetThemeValueForKey<K> | Exclude<T[K], string> | 'unset'>) | (K extends SafeAreaValueKeys ? 'safe' : never);
1141
1254
  };
1142
1255
  export type NarrowShorthands = Narrow<Shorthands>;
1143
1256
  export type Longhands = NarrowShorthands[keyof NarrowShorthands];
@@ -1152,7 +1265,7 @@ type MaybeOmitLonghands<A> = OnlyShorthandStyleProps extends true ? Omit<A, Shor
1152
1265
  export type WithFlatVariantValues<Variants> = {
1153
1266
  [Key in keyof Variants]?: FlatStyleValue<NonNullable<Variants[Key]>>;
1154
1267
  };
1155
- export type WithThemeAndShorthands<A extends object, Variants = {}> = OnlyAllowShorthands extends true ? WithThemeValues<MaybeOmitLonghands<Omit<A, Longhands>>> & WithFlatVariantValues<Variants> & WithShorthands<WithThemeValues<A>> : WithThemeValues<MaybeOmitLonghands<A>> & WithFlatVariantValues<Variants> & WithShorthands<WithThemeValues<A>>;
1268
+ export type WithThemeAndShorthands<A extends object, Variants = {}> = OnlyAllowShorthands extends true ? WithThemeValues<MaybeOmitLonghands<Omit<A, Longhands | keyof Variants>>> & WithFlatVariantValues<Variants> & WithShorthands<WithThemeValues<A>> : WithThemeValues<MaybeOmitLonghands<Omit<A, keyof Variants>>> & WithFlatVariantValues<Variants> & WithShorthands<WithThemeValues<A>>;
1156
1269
  /**
1157
1270
  * Base style-only props (no media, pseudo):
1158
1271
  */
@@ -1161,13 +1274,13 @@ type PxOrPct = Px | `${string | number}%`;
1161
1274
  type TwoValueTransformOrigin = `${PxOrPct | 'left' | 'center' | 'right'} ${PxOrPct | 'top' | 'center' | 'bottom'}`;
1162
1275
  export interface TransformStyleProps {
1163
1276
  /**
1164
- * Maps to translateX
1277
+ * Maps to translateX. A percent string is relative to the element's own width.
1165
1278
  */
1166
- x?: number;
1279
+ x?: number | `${number}%`;
1167
1280
  /**
1168
- * Maps to translateY
1281
+ * Maps to translateY. A percent string is relative to the element's own height.
1169
1282
  */
1170
- y?: number;
1283
+ y?: number | `${number}%`;
1171
1284
  perspective?: number;
1172
1285
  scale?: number;
1173
1286
  scaleX?: number;
@@ -1244,15 +1357,18 @@ interface ExtraStyleProps {
1244
1357
  * backgroundColor and drops url()/gradient/multi-part values it can't express.
1245
1358
  *
1246
1359
  * The v6 shorthands map `bg` here rather than to `backgroundColor`, because
1247
- * the background family splits a value like `url(x.png) color1` across
1360
+ * the background family splits a value like `url(x.png) color-1` across
1248
1361
  * backgroundImage and backgroundColor. Color tokens lead the union so `bg`
1249
- * completes them; `Properties['background']` keeps the CSS shorthand
1250
- * keywords. Adding this key to `ColorKeys` instead would erase that second
1251
- * arm, since that path runs the value type through `Exclude<T[K], string>`.
1362
+ * completes them; the CSS keywords and the function forms (`url()`,
1363
+ * gradients) keep the CSS shorthand, and multi-part values reach
1364
+ * `OpenStyleString` through their spaces. Adding this key to `ColorKeys`
1365
+ * instead would erase the CSS arm, since that path runs the value type
1366
+ * through `Exclude<T[K], string>`.
1252
1367
  */
1253
- background?: ColorTokens | Properties['background'];
1368
+ background?: ColorTokens | Exclude<ThemeValueFallbackColor, number> | 'none' | 'inherit' | 'initial' | 'unset' | 'revert' | `${string}(${string})` | OpenStyleString;
1254
1369
  /**
1255
- * Web-only style property. Will be omitted on native.
1370
+ * css background image. native maps supported linear gradients to
1371
+ * experimental_backgroundImage and drops values it cannot represent.
1256
1372
  */
1257
1373
  backgroundImage?: Properties['backgroundImage'];
1258
1374
  /**
@@ -1306,6 +1422,8 @@ interface ExtraStyleProps {
1306
1422
  * Web-only style property. Will be omitted on native.
1307
1423
  */
1308
1424
  resize?: Properties['resize'];
1425
+ /** react-native stops at visible/hidden/scroll; web also accepts auto and clip */
1426
+ overflow?: 'visible' | 'hidden' | 'scroll' | 'auto' | 'clip';
1309
1427
  /**
1310
1428
  * Web-only style property. Will be omitted on native.
1311
1429
  */
@@ -1544,6 +1662,7 @@ interface ExtraStyleProps {
1544
1662
  borderInlineWidth?: SpaceTokens | number;
1545
1663
  borderInlineStartWidth?: SpaceTokens | number;
1546
1664
  borderInlineEndWidth?: SpaceTokens | number;
1665
+ borderStyle?: ViewStyle['borderStyle'] | 'none' | 'hidden';
1547
1666
  borderBlockStyle?: ViewStyle['borderStyle'];
1548
1667
  borderBlockStartStyle?: ViewStyle['borderStyle'];
1549
1668
  borderBlockEndStyle?: ViewStyle['borderStyle'];
@@ -1582,11 +1701,6 @@ interface ExtraBaseProps {
1582
1701
  * See: https://tamagui.dev/docs/core/animations
1583
1702
  */
1584
1703
  transition?: TransitionProp | null;
1585
- /**
1586
- * Pass an array of strings containing the long style property names
1587
- * which will be exclusively transitioned.
1588
- */
1589
- animateOnly?: string[];
1590
1704
  /**
1591
1705
  * If you'd like this component to not attach to the nearest parent AnimatePresence,
1592
1706
  * set this to `false` and it will pass through to the next animated child.
@@ -1604,12 +1718,20 @@ interface ExtraBaseProps {
1604
1718
  passThrough?: boolean;
1605
1719
  }
1606
1720
  interface ExtendedBaseProps extends TransformStyleProps, ExtendBaseTextProps, ExtendBaseStackProps, ExtraStyleProps, ExtraBaseProps {
1607
- display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex';
1721
+ display?: 'inherit' | 'none' | 'inline' | 'block' | 'inline-block' | 'contents' | 'flex' | 'inline-flex' | 'grid' | 'inline-grid';
1608
1722
  position?: 'absolute' | 'relative' | 'fixed' | 'static' | 'sticky';
1609
1723
  }
1610
- export interface StackStyleBase extends Omit<ViewStyle, keyof ExtendedBaseProps | 'elevation'>, ExtendedBaseProps {
1724
+ export interface StackStyleBase extends Omit<ViewStyle, keyof ExtendedBaseProps | 'elevation'>, ExtendedBaseProps, Omit<UnprefixedCSSProperties, keyof ViewStyle | keyof ExtendedBaseProps | keyof TamaguiComponentPropsBaseBase> {
1611
1725
  }
1612
- export interface TextStylePropsBase extends Omit<RNTextStyle, keyof ExtendedBaseProps>, ExtendedBaseProps {
1726
+ export interface TextStylePropsBase extends Omit<RNTextStyle, keyof ExtendedBaseProps | 'fontVariant' | 'lineHeight' | 'includeFontPadding'>, ExtendedBaseProps, Omit<UnprefixedCSSProperties, keyof RNTextStyle | keyof ExtendedBaseProps | keyof TamaguiComponentPropsBaseBase | 'textShadow' | 'textDecoration' | 'font'> {
1727
+ lineHeight?: number | Px | `${number}`;
1728
+ /**
1729
+ * react-native types this as a mutable `FontVariant[]`, which an `as const` variant
1730
+ * definition can't satisfy — and a variants object that misses its constraint is
1731
+ * silently discarded whole, taking every variant on the component with it (#2787).
1732
+ * react-native types `transform` as readonly for the same reason.
1733
+ */
1734
+ fontVariant?: readonly FontVariant[];
1613
1735
  ellipsis?: boolean;
1614
1736
  numberOfLines?: number;
1615
1737
  textDecorationDistance?: number;
@@ -1627,17 +1749,16 @@ export interface TextStylePropsBase extends Omit<RNTextStyle, keyof ExtendedBase
1627
1749
  */
1628
1750
  textDecoration?: string;
1629
1751
  /**
1630
- * CSS font shorthand string ("italic bold 16px/1.5 Inter").
1631
- * Splits by the CSS micro-syntax; ambiguous forms stay unparsed.
1752
+ * css font shorthand string, browser-only and dropped on native.
1632
1753
  */
1633
1754
  font?: string;
1634
1755
  }
1635
1756
  type LooseCombinedObjects<A extends object, B extends object> = A | B | (A & B);
1636
- export interface StackNonStyleProps extends Omit<ViewProps, 'hitSlop' | 'pointerEvents' | 'display' | 'children' | keyof TamaguiComponentPropsBaseBase | RNOnlyProps | keyof ExtendBaseStackProps | 'style' | 'onFocus' | 'onBlur' | 'onPointerCancel' | 'onPointerDown' | 'onPointerMove' | 'onPointerUp'>, ExtendBaseStackProps, TamaguiComponentPropsBase {
1757
+ export interface StackNonStyleProps extends Omit<ViewProps, 'hitSlop' | 'pointerEvents' | 'display' | 'children' | keyof TamaguiComponentPropsBase | RNOnlyProps | keyof ExtendBaseStackProps | 'style' | 'onFocus' | 'onBlur' | 'onPointerCancel' | 'onPointerDown' | 'onPointerMove' | 'onPointerUp'>, ExtendBaseStackProps, TamaguiComponentPropsBase {
1637
1758
  style?: StyleProp<LooseCombinedObjects<React.CSSProperties, ViewStyle>>;
1638
1759
  }
1639
1760
  export type StackStyle = WithThemeAndShorthands<StackStyleBase>;
1640
- export interface TextNonStyleProps extends Omit<ReactTextProps, 'children' | keyof WebOnlyPressEvents | RNOnlyProps | keyof ExtendBaseTextProps | 'style' | 'selectable' | 'numberOfLines' | 'pointerEvents'>, ExtendBaseTextProps, TamaguiComponentPropsBase {
1761
+ export interface TextNonStyleProps extends Omit<ReactTextProps, 'children' | keyof TamaguiComponentPropsBase | RNOnlyProps | keyof ExtendBaseTextProps | 'style' | 'selectable' | 'numberOfLines' | 'pointerEvents'>, ExtendBaseTextProps, TamaguiComponentPropsBase {
1641
1762
  style?: StyleProp<LooseCombinedObjects<React.CSSProperties, RNTextStyle>>;
1642
1763
  }
1643
1764
  export type TextStyle = WithThemeAndShorthands<TextStylePropsBase>;
@@ -1652,7 +1773,7 @@ export type StyledHOCOptions = {
1652
1773
  staticConfig?: Partial<StaticConfig>;
1653
1774
  };
1654
1775
  export type StyledHOCMergedProps<Props, CustomProps> = keyof CustomProps extends never ? Props : Omit<Props, keyof CustomProps> & CustomProps;
1655
- export type GetFinalProps<NonStyleProps, StylePropsBase, Variants> = Omit<NonStyleProps, keyof StylePropsBase | keyof Variants> & (StylePropsBase extends object ? WithThemeAndShorthands<StylePropsBase, Variants> : {});
1776
+ export type GetFinalProps<NonStyleProps, StylePropsBase, Variants> = Omit<NonStyleProps, keyof Variants> & (StylePropsBase extends object ? Omit<WithThemeAndShorthands<StylePropsBase, Variants>, Exclude<keyof NonStyleProps, keyof Variants>> : {});
1656
1777
  export type TamaguiComponent<Props = any, Ref = any, NonStyledProps = {}, BaseStyles extends object = {}, Variants = {}, ParentStaticProperties = {}> = FunctionComponent<(Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, Variants> : Props) & {
1657
1778
  ref?: ReactRef<Ref>;
1658
1779
  }> & StaticComponentObject<Props, Ref, NonStyledProps, BaseStyles, Variants, ParentStaticProperties> & Omit<ParentStaticProperties, 'staticConfig'> & {
@@ -1729,6 +1850,7 @@ export type GetStyleState = {
1729
1850
  conf: TamaguiInternalConfig;
1730
1851
  avoidMergeTransform?: boolean;
1731
1852
  fontFamily?: string;
1853
+ nativeLineHeight?: unknown;
1732
1854
  debug?: DebugProp;
1733
1855
  transformAccumulator?: TransformAccumulator;
1734
1856
  flatRulesToInsert?: RulesToInsert;
@@ -1813,6 +1935,7 @@ export type StaticConfigPublic = {
1813
1935
  contextProps?: readonly string[];
1814
1936
  };
1815
1937
  type StaticConfigBase = StaticConfigPublic & {
1938
+ isDOM?: boolean;
1816
1939
  Component?: FunctionComponent<any> & StaticComponentObject<any, any, any, any, any, any>;
1817
1940
  displayName?: string;
1818
1941
  baseStyle?: Record<string, any>;
@@ -1895,6 +2018,7 @@ export type StyledDynamicEnv = {
1895
2018
  theme: Themes extends {
1896
2019
  [key: string]: infer B;
1897
2020
  } ? B : unknown;
2021
+ sizing: GenericSizing;
1898
2022
  fontFamily?: FontFamilyTokens;
1899
2023
  font?: Font;
1900
2024
  };
@@ -1918,20 +2042,32 @@ export type StyledDynamic<Val = any, Output extends object = Record<string, any>
1918
2042
  export type StyledResolver<Props = Record<string, any>, Output extends object = Record<string, any>> = (props: Props, env: StyledDynamicEnv) => Partial<Output> | null | undefined;
1919
2043
  export type VariantDefinitions<Parent extends StylableComponent = TamaguiComponent, StaticConfig extends StaticConfigPublic = Parent extends {
1920
2044
  __tama: [any, any, any, any, any, infer S];
1921
- } ? S : {}, MyProps extends object = Partial<GetVariantProps<Parent, StaticConfig['isText'] extends true ? true : StaticConfig['isInput'] extends true ? true : false>>, Val = any> = VariantDefinitionFromProps<MyProps, Val> & {
2045
+ } ? S : {}, MyProps extends object = VariantStyleProps<Parent, StaticConfig>, Val = any> = VariantDefinitionFromProps<MyProps, Val> & {
1922
2046
  _isEmpty?: 1;
1923
2047
  };
2048
+ export type InputColorStyleProps = {
2049
+ placeholderTextColor?: ColorStyleProp;
2050
+ selectionColor?: ColorStyleProp;
2051
+ cursorColor?: ColorStyleProp;
2052
+ selectionHandleColor?: ColorStyleProp;
2053
+ };
2054
+ export type VariantStyleProps<Parent extends StylableComponent, StaticConfig extends StaticConfigPublic> = Partial<GetVariantProps<Parent, StaticConfig['isText'] extends true ? true : StaticConfig['isInput'] extends true ? true : false>> & (GetStaticConfig<Parent, StaticConfig>['isInput'] extends true ? InputColorStyleProps : {});
2055
+ /**
2056
+ * the exact-key check styled() runs on the variants it infers: a key that is
2057
+ * not a style, shorthand, aria/data attribute, or variant of the component is
2058
+ * `never`, since inference alone never flags extra keys.
2059
+ */
2060
+ export type StyleOnlyVariants<Variants, AllowedKeys extends PropertyKey> = {
2061
+ [Name in keyof Variants]: Variants[Name] extends StyledDynamic<any, any> ? Variants[Name] : {
2062
+ [Value in keyof Variants[Name]]: Variants[Name][Value] extends object ? {
2063
+ [Key in keyof Variants[Name][Value]]: Key extends AllowedKeys | keyof Variants | `aria-${string}` | `data-${string}` ? Variants[Name][Value][Key] : never;
2064
+ } : Variants[Name][Value];
2065
+ };
2066
+ };
1924
2067
  export type StaticStyleInput = string;
1925
2068
  export type GetVariantProps<A extends StylableComponent, IsText extends boolean | undefined> = A extends {
1926
- __tama: [
1927
- infer Props,
1928
- any,
1929
- infer NonStyledProps,
1930
- infer BaseStyles,
1931
- infer VariantProps,
1932
- any
1933
- ];
1934
- } ? Props extends TamaDefer ? GetFinalProps<NonStyledProps, BaseStyles, VariantProps> : Props : WithThemeAndShorthands<IsText extends true ? TextStylePropsBase : StackStyleBase>;
2069
+ __tama: [any, any, any, infer BaseStyles, infer VariantProps, any];
2070
+ } ? BaseStyles extends object ? WithThemeAndShorthands<BaseStyles, VariantProps> : {} : WithThemeAndShorthands<IsText extends true ? TextStylePropsBase : StackStyleBase>;
1935
2071
  export type VariantDefinitionFromProps<MyProps, Val> = MyProps extends object ? {
1936
2072
  [propName: string]: StyledDynamic<any, MyProps> | {
1937
2073
  [Key in string | number | 'true' | 'false']?: MyProps | StaticStyleInput;
@@ -1965,6 +2101,7 @@ export type SplitStyleProps = {
1965
2101
  canPlatformPseudo?: boolean;
1966
2102
  isAnimated: boolean;
1967
2103
  isExiting?: boolean;
2104
+ prevStyle?: Record<string, any> | null;
1968
2105
  };
1969
2106
  export interface PresenceContextProps {
1970
2107
  id: string;
@@ -2023,6 +2160,18 @@ type AnimationDriverBase<A extends AnimationConfig = AnimationConfig> = {
2023
2160
  animations: A;
2024
2161
  View?: any;
2025
2162
  Text?: any;
2163
+ useTextMetrics?: (input: {
2164
+ inheritedText?: AnimatedTextChannel | null;
2165
+ lineHeight?: NativeTextMetrics['lineHeight'];
2166
+ }) => {
2167
+ textChannel: AnimatedTextChannel | null;
2168
+ } & ({
2169
+ style: null;
2170
+ } | {
2171
+ style: Record<string, unknown>;
2172
+ Text: ComponentType<any>;
2173
+ TextInput: ComponentType<any>;
2174
+ });
2026
2175
  };
2027
2176
  export type AnimationDriver<A extends AnimationConfig = AnimationConfig> = AnimationDriverBase<A> & {
2028
2177
  /** When true, this is a stub driver with no real animation support */
@@ -2045,9 +2194,10 @@ export type AnimationDriverStub<A extends AnimationConfig = AnimationConfig> = A
2045
2194
  };
2046
2195
  export type AnimationDriverLike<A extends AnimationConfig = AnimationConfig> = AnimationDriver<A> | AnimationDriverStub<A>;
2047
2196
  export type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>;
2048
- type UseStyleListener = (nextStyle: Record<string, unknown>, effectiveTransition?: TransitionProp | null, pseudoActive?: boolean) => void;
2197
+ type UseStyleListener = (nextStyle: Record<string, unknown>, effectiveTransition?: TransitionProp | null, pseudoActive?: boolean, nativeTextMetrics?: NativeTextMetrics) => void;
2049
2198
  export type UseStyleEmitter = (cb: UseStyleListener) => void;
2050
2199
  export type UseAnimationHook = (props: {
2200
+ inheritedText?: AnimatedTextChannel | null;
2051
2201
  style: Record<string, any>;
2052
2202
  props: Record<string, any>;
2053
2203
  styleState?: GetStyleResult | null;
@@ -2064,18 +2214,24 @@ export type UseAnimationHook = (props: {
2064
2214
  onTransition?: OnTransition;
2065
2215
  delay?: number;
2066
2216
  }) => null | {
2217
+ textChannel?: AnimatedTextChannel | null;
2067
2218
  style?: unknown;
2068
2219
  className?: string;
2069
2220
  ref?: any;
2070
2221
  };
2071
- export type GestureReponderEvent = Exclude<View['props']['onResponderMove'], void> extends (event: infer Event) => void ? Event : never;
2222
+ export type GestureReponderEvent = Exclude<ViewProps['onResponderMove'], void> extends (event: infer Event) => void ? Event : never;
2072
2223
  export type RulesToInsert = Record<string, StyleObject>;
2073
2224
  export type GetStyleResult = {
2074
- style: ViewStyle | null;
2225
+ style: {
2226
+ -readonly [K in keyof ViewStyle]: ViewStyle[K];
2227
+ } | null;
2075
2228
  classNames: ClassNamesObject;
2076
2229
  rulesToInsert: RulesToInsert;
2077
- viewProps: (StackNonStyleProps & StackStyle) & Record<string, any>;
2230
+ viewProps: {
2231
+ -readonly [K in keyof (StackNonStyleProps & StackStyle)]: (StackNonStyleProps & StackStyle)[K];
2232
+ } & Record<string, any>;
2078
2233
  fontFamily: string | undefined;
2234
+ nativeTextMetrics?: NativeTextMetrics;
2079
2235
  space?: any;
2080
2236
  hasMedia: boolean | Set<string>;
2081
2237
  pseudoGroups?: Set<string>;
@@ -2118,7 +2274,7 @@ export interface RecursiveArray<T> extends Array<T | ReadonlyArray<T> | Recursiv
2118
2274
  export type RegisteredStyle<T> = number & {
2119
2275
  __registeredStyleBrand: T;
2120
2276
  };
2121
- export type StyleProp<T> = T | StylePiece | RegisteredStyle<T> | RecursiveArray<T | StylePiece | RegisteredStyle<T> | Falsy> | Falsy;
2277
+ export type StyleProp<T> = T | StylePiece | RegisteredStyle<T> | ReadonlyArray<StyleProp<T>> | Falsy | void;
2122
2278
  export type FillInFont<A extends GenericFont, DefaultKeys extends string | number> = {
2123
2279
  family: string;
2124
2280
  lineHeight: FillInFontValues<A, 'lineHeight', DefaultKeys>;