@tamagui/web 1.114.4 → 1.115.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 (299) hide show
  1. package/dist/cjs/Tamagui.cjs +80 -0
  2. package/dist/cjs/_withStableStyle.cjs +51 -0
  3. package/dist/cjs/config.cjs +111 -0
  4. package/dist/cjs/constants/{accessibilityDirectMap.js → accessibilityDirectMap.cjs} +19 -11
  5. package/dist/cjs/constants/accessibilityDirectMap.native.cjs +34 -0
  6. package/dist/cjs/constants/accessibilityDirectMap.native.cjs.map +6 -0
  7. package/dist/cjs/constants/constants.cjs +45 -0
  8. package/dist/cjs/constants/isDevTools.cjs +31 -0
  9. package/dist/cjs/constants/webToNativeProps.cjs +28 -0
  10. package/dist/cjs/constants/webToNativeProps.native.cjs +102 -0
  11. package/dist/cjs/constants/webToNativeProps.native.cjs.map +6 -0
  12. package/dist/cjs/contexts/{ComponentContext.js → ComponentContext.cjs} +17 -12
  13. package/dist/cjs/{createComponent.js → createComponent.cjs} +407 -317
  14. package/dist/cjs/createFont.cjs +42 -0
  15. package/dist/cjs/createShorthands.cjs +28 -0
  16. package/dist/cjs/createTamagui.cjs +235 -0
  17. package/dist/cjs/createTheme.cjs +26 -0
  18. package/dist/cjs/createTokens.cjs +29 -0
  19. package/dist/cjs/{createVariable.js → createVariable.cjs} +31 -24
  20. package/dist/cjs/createVariables.cjs +58 -0
  21. package/dist/cjs/defaultComponentState.cjs +44 -0
  22. package/dist/cjs/helpers/ThemeManager.cjs +184 -0
  23. package/dist/cjs/helpers/{ThemeManagerContext.js → ThemeManagerContext.cjs} +22 -14
  24. package/dist/cjs/helpers/createMediaStyle.cjs +96 -0
  25. package/dist/cjs/helpers/{createShallowSetState.js → createShallowSetState.cjs} +29 -22
  26. package/dist/cjs/helpers/createStyledContext.cjs +70 -0
  27. package/dist/cjs/helpers/defaultOffset.cjs +29 -0
  28. package/dist/cjs/helpers/expandStyle.cjs +67 -0
  29. package/dist/cjs/helpers/expandStyles.cjs +40 -0
  30. package/dist/cjs/helpers/getExpandedShorthands.cjs +33 -0
  31. package/dist/cjs/helpers/getFontLanguage.cjs +26 -0
  32. package/dist/cjs/helpers/getGroupPropParts.cjs +37 -0
  33. package/dist/cjs/helpers/{getSplitStyles.js → getSplitStyles.cjs} +362 -335
  34. package/dist/cjs/helpers/getStylesAtomic.cjs +176 -0
  35. package/dist/cjs/helpers/getStylesAtomic.native.cjs +33 -0
  36. package/dist/cjs/helpers/getStylesAtomic.native.cjs.map +6 -0
  37. package/dist/cjs/helpers/getThemeCSSRules.cjs +119 -0
  38. package/dist/cjs/helpers/getThemeCSSRules.native.cjs +28 -0
  39. package/dist/cjs/helpers/getThemeCSSRules.native.cjs.map +6 -0
  40. package/dist/cjs/helpers/getVariantExtras.cjs +65 -0
  41. package/dist/cjs/helpers/{insertStyleRule.js → insertStyleRule.cjs} +93 -96
  42. package/dist/cjs/helpers/isActivePlatform.cjs +35 -0
  43. package/dist/cjs/helpers/isObj.cjs +26 -0
  44. package/dist/cjs/helpers/isTamaguiComponent.cjs +29 -0
  45. package/dist/cjs/helpers/{isTamaguiElement.js → isTamaguiElement.cjs} +24 -15
  46. package/dist/cjs/helpers/log.cjs +36 -0
  47. package/dist/cjs/helpers/matchMedia.cjs +36 -0
  48. package/dist/cjs/helpers/matchMedia.native.cjs +39 -0
  49. package/dist/cjs/helpers/matchMedia.native.cjs.map +6 -0
  50. package/dist/cjs/helpers/mergeProps.cjs +45 -0
  51. package/dist/cjs/helpers/{mergeVariants.js → mergeVariants.cjs} +19 -17
  52. package/dist/cjs/helpers/normalizeColor.cjs +48 -0
  53. package/dist/cjs/helpers/{normalizeShadow.js → normalizeShadow.cjs} +22 -13
  54. package/dist/cjs/helpers/normalizeStyle.cjs +47 -0
  55. package/dist/cjs/helpers/normalizeStylePropKeys.cjs +26 -0
  56. package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +37 -0
  57. package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs.map +6 -0
  58. package/dist/cjs/helpers/{normalizeValueWithProperty.js → normalizeValueWithProperty.cjs} +22 -19
  59. package/dist/cjs/helpers/objectIdentityKey.cjs +39 -0
  60. package/dist/cjs/helpers/propMapper.cjs +254 -0
  61. package/dist/cjs/helpers/proxyThemeToParents.cjs +61 -0
  62. package/dist/cjs/helpers/{proxyThemeVariables.js → proxyThemeVariables.cjs} +16 -11
  63. package/dist/cjs/helpers/pseudoDescriptors.cjs +72 -0
  64. package/dist/cjs/helpers/registerCSSVariable.cjs +33 -0
  65. package/dist/cjs/helpers/setElementProps.cjs +29 -0
  66. package/dist/cjs/helpers/setElementProps.native.cjs +30 -0
  67. package/dist/cjs/helpers/setElementProps.native.cjs.map +6 -0
  68. package/dist/cjs/helpers/{skipProps.js → skipProps.cjs} +17 -12
  69. package/dist/cjs/helpers/sortString.cjs +26 -0
  70. package/dist/cjs/helpers/{subscribeToContextGroup.js → subscribeToContextGroup.cjs} +25 -17
  71. package/dist/cjs/helpers/themeable.cjs +83 -0
  72. package/dist/cjs/helpers/{themes.js → themes.cjs} +17 -12
  73. package/dist/cjs/helpers/timer.cjs +32 -0
  74. package/dist/cjs/helpers/transformsToString.cjs +37 -0
  75. package/dist/cjs/helpers/webPropsToSkip.cjs +26 -0
  76. package/dist/cjs/helpers/webPropsToSkip.native.cjs +79 -0
  77. package/dist/cjs/helpers/webPropsToSkip.native.cjs.map +6 -0
  78. package/dist/cjs/helpers/wrapStyleTags.cjs +40 -0
  79. package/dist/cjs/hooks/{useComponentState.js → useComponentState.cjs} +75 -30
  80. package/dist/cjs/hooks/useConfiguration.cjs +55 -0
  81. package/dist/cjs/hooks/{useDidHydrateOnce.js → useDidHydrateOnce.cjs} +27 -16
  82. package/dist/cjs/hooks/useDisableSSR.cjs +29 -0
  83. package/dist/cjs/hooks/useIsTouchDevice.cjs +28 -0
  84. package/dist/cjs/hooks/useMedia.cjs +227 -0
  85. package/dist/cjs/hooks/useProps.cjs +108 -0
  86. package/dist/cjs/hooks/useTheme.cjs +277 -0
  87. package/dist/cjs/hooks/useThemeName.cjs +50 -0
  88. package/dist/cjs/index.cjs +106 -0
  89. package/dist/cjs/inject-styles.cjs +37 -0
  90. package/dist/cjs/insertFont.cjs +72 -0
  91. package/dist/cjs/interfaces/CSSColorNames.cjs +16 -0
  92. package/dist/cjs/interfaces/GetRef.cjs +16 -0
  93. package/dist/cjs/interfaces/KeyTypes.cjs +16 -0
  94. package/dist/cjs/interfaces/RNExclusiveTypes.cjs +16 -0
  95. package/dist/cjs/interfaces/Role.cjs +16 -0
  96. package/dist/cjs/interfaces/TamaguiComponentEvents.cjs +16 -0
  97. package/dist/cjs/interfaces/{TamaguiComponentPropsBaseBase.js → TamaguiComponentPropsBaseBase.cjs} +8 -6
  98. package/dist/cjs/interfaces/TamaguiComponentState.cjs +16 -0
  99. package/dist/cjs/interfaces/WebOnlyPressEvents.cjs +16 -0
  100. package/dist/cjs/setupHooks.cjs +30 -0
  101. package/dist/cjs/setupReactNative.cjs +49 -0
  102. package/dist/cjs/styled.cjs +87 -0
  103. package/dist/cjs/type-utils.cjs +16 -0
  104. package/dist/cjs/types.cjs +19 -0
  105. package/dist/cjs/views/Configuration.cjs +47 -0
  106. package/dist/cjs/views/FontLanguage.cjs +37 -0
  107. package/dist/cjs/views/FontLanguage.native.cjs +50 -0
  108. package/dist/cjs/views/FontLanguage.native.cjs.map +6 -0
  109. package/dist/cjs/views/FontLanguage.types.cjs +16 -0
  110. package/dist/cjs/views/Slot.cjs +78 -0
  111. package/dist/cjs/views/Stack.cjs +34 -0
  112. package/dist/cjs/views/TamaguiProvider.cjs +93 -0
  113. package/dist/cjs/views/Text.cjs +86 -0
  114. package/dist/cjs/views/Theme.cjs +145 -0
  115. package/dist/cjs/views/ThemeDebug.cjs +92 -0
  116. package/dist/cjs/views/ThemeDebug.native.cjs +33 -0
  117. package/dist/cjs/views/ThemeDebug.native.cjs.map +6 -0
  118. package/dist/cjs/views/ThemeProvider.cjs +56 -0
  119. package/dist/cjs/views/View.cjs +33 -0
  120. package/package.json +15 -14
  121. package/dist/cjs/Tamagui.js +0 -63
  122. package/dist/cjs/_withStableStyle.js +0 -33
  123. package/dist/cjs/config.js +0 -97
  124. package/dist/cjs/constants/constants.js +0 -36
  125. package/dist/cjs/constants/isDevTools.js +0 -28
  126. package/dist/cjs/constants/webToNativeProps.js +0 -22
  127. package/dist/cjs/createFont.js +0 -53
  128. package/dist/cjs/createShorthands.js +0 -23
  129. package/dist/cjs/createTamagui.js +0 -189
  130. package/dist/cjs/createTheme.js +0 -21
  131. package/dist/cjs/createTokens.js +0 -24
  132. package/dist/cjs/createVariables.js +0 -47
  133. package/dist/cjs/defaultComponentState.js +0 -37
  134. package/dist/cjs/helpers/ThemeManager.js +0 -166
  135. package/dist/cjs/helpers/createMediaStyle.js +0 -74
  136. package/dist/cjs/helpers/createStyledContext.js +0 -53
  137. package/dist/cjs/helpers/defaultOffset.js +0 -21
  138. package/dist/cjs/helpers/expandStyle.js +0 -73
  139. package/dist/cjs/helpers/expandStyles.js +0 -34
  140. package/dist/cjs/helpers/getExpandedShorthands.js +0 -29
  141. package/dist/cjs/helpers/getFontLanguage.js +0 -21
  142. package/dist/cjs/helpers/getGroupPropParts.js +0 -27
  143. package/dist/cjs/helpers/getStylesAtomic.js +0 -152
  144. package/dist/cjs/helpers/getThemeCSSRules.js +0 -89
  145. package/dist/cjs/helpers/getVariantExtras.js +0 -58
  146. package/dist/cjs/helpers/isActivePlatform.js +0 -29
  147. package/dist/cjs/helpers/isObj.js +0 -21
  148. package/dist/cjs/helpers/isTamaguiComponent.js +0 -24
  149. package/dist/cjs/helpers/log.js +0 -31
  150. package/dist/cjs/helpers/matchMedia.js +0 -34
  151. package/dist/cjs/helpers/mergeProps.js +0 -41
  152. package/dist/cjs/helpers/normalizeColor.js +0 -43
  153. package/dist/cjs/helpers/normalizeStyle.js +0 -36
  154. package/dist/cjs/helpers/normalizeStylePropKeys.js +0 -21
  155. package/dist/cjs/helpers/objectIdentityKey.js +0 -38
  156. package/dist/cjs/helpers/propMapper.js +0 -238
  157. package/dist/cjs/helpers/proxyThemeToParents.js +0 -52
  158. package/dist/cjs/helpers/pseudoDescriptors.js +0 -65
  159. package/dist/cjs/helpers/registerCSSVariable.js +0 -29
  160. package/dist/cjs/helpers/setElementProps.js +0 -24
  161. package/dist/cjs/helpers/sortString.js +0 -21
  162. package/dist/cjs/helpers/themeable.js +0 -63
  163. package/dist/cjs/helpers/timer.js +0 -27
  164. package/dist/cjs/helpers/transformsToString.js +0 -32
  165. package/dist/cjs/helpers/webPropsToSkip.js +0 -21
  166. package/dist/cjs/helpers/wrapStyleTags.js +0 -39
  167. package/dist/cjs/hooks/useConfiguration.js +0 -37
  168. package/dist/cjs/hooks/useDisableSSR.js +0 -24
  169. package/dist/cjs/hooks/useIsTouchDevice.js +0 -22
  170. package/dist/cjs/hooks/useMedia.js +0 -206
  171. package/dist/cjs/hooks/useProps.js +0 -95
  172. package/dist/cjs/hooks/useTheme.js +0 -263
  173. package/dist/cjs/hooks/useThemeName.js +0 -39
  174. package/dist/cjs/index.js +0 -99
  175. package/dist/cjs/inject-styles.js +0 -28
  176. package/dist/cjs/insertFont.js +0 -65
  177. package/dist/cjs/interfaces/CSSColorNames.js +0 -14
  178. package/dist/cjs/interfaces/GetRef.js +0 -14
  179. package/dist/cjs/interfaces/KeyTypes.js +0 -14
  180. package/dist/cjs/interfaces/RNExclusiveTypes.js +0 -14
  181. package/dist/cjs/interfaces/Role.js +0 -14
  182. package/dist/cjs/interfaces/TamaguiComponentEvents.js +0 -14
  183. package/dist/cjs/interfaces/TamaguiComponentState.js +0 -14
  184. package/dist/cjs/interfaces/WebOnlyPressEvents.js +0 -14
  185. package/dist/cjs/setupHooks.js +0 -25
  186. package/dist/cjs/setupReactNative.js +0 -46
  187. package/dist/cjs/styled.js +0 -74
  188. package/dist/cjs/type-utils.js +0 -14
  189. package/dist/cjs/types.js +0 -16
  190. package/dist/cjs/views/Configuration.js +0 -34
  191. package/dist/cjs/views/FontLanguage.js +0 -32
  192. package/dist/cjs/views/FontLanguage.types.js +0 -14
  193. package/dist/cjs/views/Slot.js +0 -59
  194. package/dist/cjs/views/Stack.js +0 -27
  195. package/dist/cjs/views/TamaguiProvider.js +0 -76
  196. package/dist/cjs/views/Text.js +0 -77
  197. package/dist/cjs/views/Theme.js +0 -103
  198. package/dist/cjs/views/ThemeDebug.js +0 -94
  199. package/dist/cjs/views/ThemeProvider.js +0 -45
  200. package/dist/cjs/views/View.js +0 -26
  201. /package/dist/cjs/{Tamagui.js.map → Tamagui.cjs.map} +0 -0
  202. /package/dist/cjs/{_withStableStyle.js.map → _withStableStyle.cjs.map} +0 -0
  203. /package/dist/cjs/{config.js.map → config.cjs.map} +0 -0
  204. /package/dist/cjs/constants/{accessibilityDirectMap.js.map → accessibilityDirectMap.cjs.map} +0 -0
  205. /package/dist/cjs/constants/{constants.js.map → constants.cjs.map} +0 -0
  206. /package/dist/cjs/constants/{isDevTools.js.map → isDevTools.cjs.map} +0 -0
  207. /package/dist/cjs/constants/{webToNativeProps.js.map → webToNativeProps.cjs.map} +0 -0
  208. /package/dist/cjs/contexts/{ComponentContext.js.map → ComponentContext.cjs.map} +0 -0
  209. /package/dist/cjs/{createComponent.js.map → createComponent.cjs.map} +0 -0
  210. /package/dist/cjs/{createFont.js.map → createFont.cjs.map} +0 -0
  211. /package/dist/cjs/{createShorthands.js.map → createShorthands.cjs.map} +0 -0
  212. /package/dist/cjs/{createTamagui.js.map → createTamagui.cjs.map} +0 -0
  213. /package/dist/cjs/{createTheme.js.map → createTheme.cjs.map} +0 -0
  214. /package/dist/cjs/{createTokens.js.map → createTokens.cjs.map} +0 -0
  215. /package/dist/cjs/{createVariable.js.map → createVariable.cjs.map} +0 -0
  216. /package/dist/cjs/{createVariables.js.map → createVariables.cjs.map} +0 -0
  217. /package/dist/cjs/{defaultComponentState.js.map → defaultComponentState.cjs.map} +0 -0
  218. /package/dist/cjs/helpers/{ThemeManager.js.map → ThemeManager.cjs.map} +0 -0
  219. /package/dist/cjs/helpers/{ThemeManagerContext.js.map → ThemeManagerContext.cjs.map} +0 -0
  220. /package/dist/cjs/helpers/{createMediaStyle.js.map → createMediaStyle.cjs.map} +0 -0
  221. /package/dist/cjs/helpers/{createShallowSetState.js.map → createShallowSetState.cjs.map} +0 -0
  222. /package/dist/cjs/helpers/{createStyledContext.js.map → createStyledContext.cjs.map} +0 -0
  223. /package/dist/cjs/helpers/{defaultOffset.js.map → defaultOffset.cjs.map} +0 -0
  224. /package/dist/cjs/helpers/{expandStyle.js.map → expandStyle.cjs.map} +0 -0
  225. /package/dist/cjs/helpers/{expandStyles.js.map → expandStyles.cjs.map} +0 -0
  226. /package/dist/cjs/helpers/{getExpandedShorthands.js.map → getExpandedShorthands.cjs.map} +0 -0
  227. /package/dist/cjs/helpers/{getFontLanguage.js.map → getFontLanguage.cjs.map} +0 -0
  228. /package/dist/cjs/helpers/{getGroupPropParts.js.map → getGroupPropParts.cjs.map} +0 -0
  229. /package/dist/cjs/helpers/{getSplitStyles.js.map → getSplitStyles.cjs.map} +0 -0
  230. /package/dist/cjs/helpers/{getStylesAtomic.js.map → getStylesAtomic.cjs.map} +0 -0
  231. /package/dist/cjs/helpers/{getThemeCSSRules.js.map → getThemeCSSRules.cjs.map} +0 -0
  232. /package/dist/cjs/helpers/{getVariantExtras.js.map → getVariantExtras.cjs.map} +0 -0
  233. /package/dist/cjs/helpers/{insertStyleRule.js.map → insertStyleRule.cjs.map} +0 -0
  234. /package/dist/cjs/helpers/{isActivePlatform.js.map → isActivePlatform.cjs.map} +0 -0
  235. /package/dist/cjs/helpers/{isObj.js.map → isObj.cjs.map} +0 -0
  236. /package/dist/cjs/helpers/{isTamaguiComponent.js.map → isTamaguiComponent.cjs.map} +0 -0
  237. /package/dist/cjs/helpers/{isTamaguiElement.js.map → isTamaguiElement.cjs.map} +0 -0
  238. /package/dist/cjs/helpers/{log.js.map → log.cjs.map} +0 -0
  239. /package/dist/cjs/helpers/{matchMedia.js.map → matchMedia.cjs.map} +0 -0
  240. /package/dist/cjs/helpers/{mergeProps.js.map → mergeProps.cjs.map} +0 -0
  241. /package/dist/cjs/helpers/{mergeVariants.js.map → mergeVariants.cjs.map} +0 -0
  242. /package/dist/cjs/helpers/{normalizeColor.js.map → normalizeColor.cjs.map} +0 -0
  243. /package/dist/cjs/helpers/{normalizeShadow.js.map → normalizeShadow.cjs.map} +0 -0
  244. /package/dist/cjs/helpers/{normalizeStyle.js.map → normalizeStyle.cjs.map} +0 -0
  245. /package/dist/cjs/helpers/{normalizeStylePropKeys.js.map → normalizeStylePropKeys.cjs.map} +0 -0
  246. /package/dist/cjs/helpers/{normalizeValueWithProperty.js.map → normalizeValueWithProperty.cjs.map} +0 -0
  247. /package/dist/cjs/helpers/{objectIdentityKey.js.map → objectIdentityKey.cjs.map} +0 -0
  248. /package/dist/cjs/helpers/{propMapper.js.map → propMapper.cjs.map} +0 -0
  249. /package/dist/cjs/helpers/{proxyThemeToParents.js.map → proxyThemeToParents.cjs.map} +0 -0
  250. /package/dist/cjs/helpers/{proxyThemeVariables.js.map → proxyThemeVariables.cjs.map} +0 -0
  251. /package/dist/cjs/helpers/{pseudoDescriptors.js.map → pseudoDescriptors.cjs.map} +0 -0
  252. /package/dist/cjs/helpers/{registerCSSVariable.js.map → registerCSSVariable.cjs.map} +0 -0
  253. /package/dist/cjs/helpers/{setElementProps.js.map → setElementProps.cjs.map} +0 -0
  254. /package/dist/cjs/helpers/{skipProps.js.map → skipProps.cjs.map} +0 -0
  255. /package/dist/cjs/helpers/{sortString.js.map → sortString.cjs.map} +0 -0
  256. /package/dist/cjs/helpers/{subscribeToContextGroup.js.map → subscribeToContextGroup.cjs.map} +0 -0
  257. /package/dist/cjs/helpers/{themeable.js.map → themeable.cjs.map} +0 -0
  258. /package/dist/cjs/helpers/{themes.js.map → themes.cjs.map} +0 -0
  259. /package/dist/cjs/helpers/{timer.js.map → timer.cjs.map} +0 -0
  260. /package/dist/cjs/helpers/{transformsToString.js.map → transformsToString.cjs.map} +0 -0
  261. /package/dist/cjs/helpers/{webPropsToSkip.js.map → webPropsToSkip.cjs.map} +0 -0
  262. /package/dist/cjs/helpers/{wrapStyleTags.js.map → wrapStyleTags.cjs.map} +0 -0
  263. /package/dist/cjs/hooks/{useComponentState.js.map → useComponentState.cjs.map} +0 -0
  264. /package/dist/cjs/hooks/{useConfiguration.js.map → useConfiguration.cjs.map} +0 -0
  265. /package/dist/cjs/hooks/{useDidHydrateOnce.js.map → useDidHydrateOnce.cjs.map} +0 -0
  266. /package/dist/cjs/hooks/{useDisableSSR.js.map → useDisableSSR.cjs.map} +0 -0
  267. /package/dist/cjs/hooks/{useIsTouchDevice.js.map → useIsTouchDevice.cjs.map} +0 -0
  268. /package/dist/cjs/hooks/{useMedia.js.map → useMedia.cjs.map} +0 -0
  269. /package/dist/cjs/hooks/{useProps.js.map → useProps.cjs.map} +0 -0
  270. /package/dist/cjs/hooks/{useTheme.js.map → useTheme.cjs.map} +0 -0
  271. /package/dist/cjs/hooks/{useThemeName.js.map → useThemeName.cjs.map} +0 -0
  272. /package/dist/cjs/{index.js.map → index.cjs.map} +0 -0
  273. /package/dist/cjs/{inject-styles.js.map → inject-styles.cjs.map} +0 -0
  274. /package/dist/cjs/{insertFont.js.map → insertFont.cjs.map} +0 -0
  275. /package/dist/cjs/interfaces/{CSSColorNames.js.map → CSSColorNames.cjs.map} +0 -0
  276. /package/dist/cjs/interfaces/{GetRef.js.map → GetRef.cjs.map} +0 -0
  277. /package/dist/cjs/interfaces/{KeyTypes.js.map → KeyTypes.cjs.map} +0 -0
  278. /package/dist/cjs/interfaces/{RNExclusiveTypes.js.map → RNExclusiveTypes.cjs.map} +0 -0
  279. /package/dist/cjs/interfaces/{Role.js.map → Role.cjs.map} +0 -0
  280. /package/dist/cjs/interfaces/{TamaguiComponentEvents.js.map → TamaguiComponentEvents.cjs.map} +0 -0
  281. /package/dist/cjs/interfaces/{TamaguiComponentPropsBaseBase.js.map → TamaguiComponentPropsBaseBase.cjs.map} +0 -0
  282. /package/dist/cjs/interfaces/{TamaguiComponentState.js.map → TamaguiComponentState.cjs.map} +0 -0
  283. /package/dist/cjs/interfaces/{WebOnlyPressEvents.js.map → WebOnlyPressEvents.cjs.map} +0 -0
  284. /package/dist/cjs/{setupHooks.js.map → setupHooks.cjs.map} +0 -0
  285. /package/dist/cjs/{setupReactNative.js.map → setupReactNative.cjs.map} +0 -0
  286. /package/dist/cjs/{styled.js.map → styled.cjs.map} +0 -0
  287. /package/dist/cjs/{type-utils.js.map → type-utils.cjs.map} +0 -0
  288. /package/dist/cjs/{types.js.map → types.cjs.map} +0 -0
  289. /package/dist/cjs/views/{Configuration.js.map → Configuration.cjs.map} +0 -0
  290. /package/dist/cjs/views/{FontLanguage.js.map → FontLanguage.cjs.map} +0 -0
  291. /package/dist/cjs/views/{FontLanguage.types.js.map → FontLanguage.types.cjs.map} +0 -0
  292. /package/dist/cjs/views/{Slot.js.map → Slot.cjs.map} +0 -0
  293. /package/dist/cjs/views/{Stack.js.map → Stack.cjs.map} +0 -0
  294. /package/dist/cjs/views/{TamaguiProvider.js.map → TamaguiProvider.cjs.map} +0 -0
  295. /package/dist/cjs/views/{Text.js.map → Text.cjs.map} +0 -0
  296. /package/dist/cjs/views/{Theme.js.map → Theme.cjs.map} +0 -0
  297. /package/dist/cjs/views/{ThemeDebug.js.map → ThemeDebug.cjs.map} +0 -0
  298. /package/dist/cjs/views/{ThemeProvider.js.map → ThemeProvider.cjs.map} +0 -0
  299. /package/dist/cjs/views/{View.js.map → View.cjs.map} +0 -0
@@ -3,15 +3,21 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
15
21
  var mergeVariants_exports = {};
16
22
  __export(mergeVariants_exports, {
17
23
  mergeVariants: () => mergeVariants
@@ -20,12 +26,9 @@ module.exports = __toCommonJS(mergeVariants_exports);
20
26
  const mergeVariants = (parentVariants, ourVariants, level = 0) => {
21
27
  const variants = {};
22
28
  for (const key in ourVariants) {
23
- const parentVariant = parentVariants?.[key], ourVariant = ourVariants[key];
24
- !parentVariant || typeof ourVariant == "function" ? variants[key] = ourVariant : parentVariant && !ourVariant ? variants[key] = parentVariant[key] : level === 0 ? variants[key] = mergeVariants(
25
- parentVariant,
26
- ourVariant,
27
- level + 1
28
- ) : variants[key] = {
29
+ const parentVariant = parentVariants?.[key],
30
+ ourVariant = ourVariants[key];
31
+ !parentVariant || typeof ourVariant == "function" ? variants[key] = ourVariant : parentVariant && !ourVariant ? variants[key] = parentVariant[key] : level === 0 ? variants[key] = mergeVariants(parentVariant, ourVariant, level + 1) : variants[key] = {
29
32
  ...parentVariant,
30
33
  ...ourVariant
31
34
  };
@@ -34,5 +37,4 @@ const mergeVariants = (parentVariants, ourVariants, level = 0) => {
34
37
  ...parentVariants,
35
38
  ...variants
36
39
  };
37
- };
38
- //# sourceMappingURL=mergeVariants.js.map
40
+ };
@@ -0,0 +1,48 @@
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: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var normalizeColor_exports = {};
22
+ __export(normalizeColor_exports, {
23
+ getRgba: () => getRgba,
24
+ normalizeColor: () => normalizeColor,
25
+ rgba: () => import_normalize_css_color2.rgba
26
+ });
27
+ module.exports = __toCommonJS(normalizeColor_exports);
28
+ var import_normalize_css_color = require("@tamagui/normalize-css-color"),
29
+ import_normalize_css_color2 = require("@tamagui/normalize-css-color");
30
+ const normalizeColor = (color, opacity) => {
31
+ if (color) {
32
+ if (color[0] === "$") return color;
33
+ if (color.startsWith("var(")) {
34
+ if (typeof opacity == "number" && opacity < 1) return `color-mix(in srgb, ${color} ${opacity * 100}%, transparent)`;
35
+ } else {
36
+ const rgba3 = getRgba(color);
37
+ if (rgba3) {
38
+ const colors = `${rgba3.r},${rgba3.g},${rgba3.b}`;
39
+ return opacity === 1 ? `rgb(${colors})` : `rgba(${colors},${opacity ?? rgba3.a ?? 1})`;
40
+ }
41
+ }
42
+ return color;
43
+ }
44
+ },
45
+ getRgba = color => {
46
+ const colorNum = (0, import_normalize_css_color.normalizeCSSColor)(color);
47
+ if (colorNum != null) return (0, import_normalize_css_color.rgba)(colorNum);
48
+ };
@@ -3,28 +3,38 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
15
21
  var normalizeShadow_exports = {};
16
22
  __export(normalizeShadow_exports, {
17
23
  normalizeShadow: () => normalizeShadow
18
24
  });
19
25
  module.exports = __toCommonJS(normalizeShadow_exports);
20
- var import_defaultOffset = require("./defaultOffset"), import_normalizeColor = require("./normalizeColor");
26
+ var import_defaultOffset = require("./defaultOffset.cjs"),
27
+ import_normalizeColor = require("./normalizeColor.cjs");
21
28
  function normalizeShadow({
22
29
  shadowColor,
23
30
  shadowOffset,
24
31
  shadowOpacity,
25
32
  shadowRadius
26
33
  }) {
27
- const { height, width } = shadowOffset || import_defaultOffset.defaultOffset;
34
+ const {
35
+ height,
36
+ width
37
+ } = shadowOffset || import_defaultOffset.defaultOffset;
28
38
  return {
29
39
  shadowOffset: {
30
40
  width: width || 0,
@@ -34,5 +44,4 @@ function normalizeShadow({
34
44
  shadowColor: (0, import_normalizeColor.normalizeColor)(shadowColor, 1),
35
45
  shadowOpacity: shadowOpacity ?? (shadowColor ? (0, import_normalizeColor.getRgba)(shadowColor)?.a : 1)
36
46
  };
37
- }
38
- //# sourceMappingURL=normalizeShadow.js.map
47
+ }
@@ -0,0 +1,47 @@
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: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var normalizeStyle_exports = {};
22
+ __export(normalizeStyle_exports, {
23
+ normalizeStyle: () => normalizeStyle
24
+ });
25
+ module.exports = __toCommonJS(normalizeStyle_exports);
26
+ var import_expandStyle = require("./expandStyle.cjs"),
27
+ import_expandStyles = require("./expandStyles.cjs"),
28
+ import_isObj = require("./isObj.cjs"),
29
+ import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs"),
30
+ import_pseudoDescriptors = require("./pseudoDescriptors.cjs");
31
+ function normalizeStyle(style, disableNormalize = !1) {
32
+ const res = {};
33
+ for (let key in style) {
34
+ const prop = style[key];
35
+ if (prop == null) continue;
36
+ if (key in import_pseudoDescriptors.pseudoDescriptors ||
37
+ // this should capture all parent-based styles like media, group, etc
38
+ key[0] === "$" && (0, import_isObj.isObj)(prop)) {
39
+ res[key] = normalizeStyle(prop, disableNormalize);
40
+ continue;
41
+ }
42
+ const value = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key),
43
+ out = (0, import_expandStyle.expandStyle)(key, value);
44
+ out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value;
45
+ }
46
+ return (0, import_expandStyles.fixStyles)(res), res;
47
+ }
@@ -0,0 +1,26 @@
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: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var normalizeStylePropKeys_exports = {};
22
+ __export(normalizeStylePropKeys_exports, {
23
+ normalizeStylePropKeys: () => normalizeStylePropKeys
24
+ });
25
+ module.exports = __toCommonJS(normalizeStylePropKeys_exports);
26
+ const normalizeStylePropKeys = {};
@@ -0,0 +1,37 @@
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: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var normalizeStylePropKeys_native_exports = {};
22
+ __export(normalizeStylePropKeys_native_exports, {
23
+ normalizeStylePropKeys: () => normalizeStylePropKeys
24
+ });
25
+ module.exports = __toCommonJS(normalizeStylePropKeys_native_exports);
26
+ const normalizeStylePropKeys = {
27
+ backgroundColor: !0,
28
+ borderColor: !0,
29
+ borderTopColor: !0,
30
+ borderRightColor: !0,
31
+ borderBottomColor: !0,
32
+ borderLeftColor: !0,
33
+ color: !0,
34
+ shadowColor: !0,
35
+ textDecorationColor: !0,
36
+ textShadowColor: !0
37
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/normalizeStylePropKeys.native.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,iBAAiB;AACnB;",
5
+ "names": []
6
+ }
@@ -3,42 +3,46 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
15
21
  var normalizeValueWithProperty_exports = {};
16
22
  __export(normalizeValueWithProperty_exports, {
17
23
  normalizeValueWithProperty: () => normalizeValueWithProperty,
18
24
  reverseMapClassNameToValue: () => reverseMapClassNameToValue
19
25
  });
20
26
  module.exports = __toCommonJS(normalizeValueWithProperty_exports);
21
- var import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_insertStyleRule = require("./insertStyleRule");
27
+ var import_constants = require("@tamagui/constants"),
28
+ import_helpers = require("@tamagui/helpers"),
29
+ import_insertStyleRule = require("./insertStyleRule.cjs");
22
30
  const stylePropsAllPlusTransforms = {
23
31
  ...import_helpers.stylePropsAll,
24
32
  translateX: !0,
25
33
  translateY: !0
26
34
  };
27
35
  function normalizeValueWithProperty(value, property = "") {
28
- if (!import_constants.isWeb || import_helpers.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof value == "boolean")
29
- return value;
36
+ if (!import_constants.isWeb || import_helpers.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof value == "boolean") return value;
30
37
  let res = value;
31
38
  return value && typeof value == "object" ? value : (typeof value == "number" ? res = `${value}px` : property && (res = `${res}`), res);
32
39
  }
33
40
  const rcache = {};
34
41
  function reverseMapClassNameToValue(key, className) {
35
42
  const cssRule = (0, import_insertStyleRule.getAllSelectors)()[className];
36
- if (rcache[cssRule])
37
- return rcache[cssRule];
43
+ if (rcache[cssRule]) return rcache[cssRule];
38
44
  if (!cssRule) {
39
- process.env.NODE_ENV === "development" && console.warn(
40
- `No CSS rule found for ${key} looking for selector ".${className}", you may not be injecting extracted CSS`
41
- );
45
+ process.env.NODE_ENV === "development" && console.warn(`No CSS rule found for ${key} looking for selector ".${className}", you may not be injecting extracted CSS`);
42
46
  return;
43
47
  }
44
48
  const cssVal = cssRule.replace(/.*:/, "").replace(/;.*/, "").trim();
@@ -50,5 +54,4 @@ function reverseMapClassNameToValue(key, className) {
50
54
  key,
51
55
  className
52
56
  }), res;
53
- }
54
- //# sourceMappingURL=normalizeValueWithProperty.js.map
57
+ }
@@ -0,0 +1,39 @@
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: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var objectIdentityKey_exports = {};
22
+ __export(objectIdentityKey_exports, {
23
+ objectIdentityKey: () => objectIdentityKey
24
+ });
25
+ module.exports = __toCommonJS(objectIdentityKey_exports);
26
+ function objectIdentityKey(obj) {
27
+ let k = "";
28
+ for (const key in obj) {
29
+ k += key;
30
+ const arg = obj[key];
31
+ let type = typeof arg;
32
+ if (!arg || type !== "object" && type !== "function") k += type + arg;else if (cache.has(arg)) k += cache.get(arg);else {
33
+ let v = Math.random();
34
+ cache.set(arg, v), k += v;
35
+ }
36
+ }
37
+ return k;
38
+ }
39
+ const cache = /* @__PURE__ */new WeakMap();
@@ -0,0 +1,254 @@
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: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var propMapper_exports = {};
22
+ __export(propMapper_exports, {
23
+ getFontFamilyFromNameOrVariable: () => getFontFamilyFromNameOrVariable,
24
+ getPropMappedFontFamily: () => getPropMappedFontFamily,
25
+ getTokenForKey: () => getTokenForKey,
26
+ propMapper: () => propMapper
27
+ });
28
+ module.exports = __toCommonJS(propMapper_exports);
29
+ var import_constants = require("@tamagui/constants"),
30
+ import_helpers = require("@tamagui/helpers"),
31
+ import_config = require("../config.cjs"),
32
+ import_createVariable = require("../createVariable.cjs"),
33
+ import_expandStyle = require("./expandStyle.cjs"),
34
+ import_normalizeStyle = require("./normalizeStyle.cjs"),
35
+ import_getVariantExtras = require("./getVariantExtras.cjs"),
36
+ import_isObj = require("./isObj.cjs"),
37
+ import_pseudoDescriptors = require("./pseudoDescriptors.cjs"),
38
+ import_skipProps = require("./skipProps.cjs");
39
+ const propMapper = (key, value, styleState) => {
40
+ if (lastFontFamilyToken = null, key === "elevationAndroid") return;
41
+ const {
42
+ conf,
43
+ styleProps,
44
+ fontFamily,
45
+ staticConfig
46
+ } = styleState;
47
+ if (value === "unset") {
48
+ const unsetVal = conf.unset?.[key];
49
+ if (unsetVal != null) value = unsetVal;else return;
50
+ }
51
+ styleProps.fallbackProps && (styleState.props = styleProps.fallbackProps);
52
+ const {
53
+ variants
54
+ } = staticConfig;
55
+ if (process.env.NODE_ENV === "development" && fontFamily && fontFamily[0] === "$" && !(fontFamily in conf.fontsParsed) && console.warn(`Warning: no fontFamily "${fontFamily}" found in config: ${Object.keys(conf.fontsParsed).join(", ")}`), !styleProps.noExpand && variants && key in variants) {
56
+ const variantValue = resolveVariants(key, value, styleProps, styleState, "");
57
+ if (variantValue) return variantValue;
58
+ }
59
+ if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps.resolveValues, styleState) : (0, import_createVariable.isVariable)(value) && (value = resolveVariableValue(key, value, styleProps.resolveValues))), value != null) {
60
+ const result = (styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value)) || [[key, value]];
61
+ return key === "fontFamily" && lastFontFamilyToken && fontFamilyCache.set(result, lastFontFamilyToken), result;
62
+ }
63
+ },
64
+ resolveVariants = (key, value, styleProps, styleState, parentVariantKey) => {
65
+ const {
66
+ staticConfig,
67
+ conf,
68
+ debug
69
+ } = styleState,
70
+ {
71
+ variants
72
+ } = staticConfig;
73
+ if (!variants) return;
74
+ let variantValue = getVariantDefinition(variants[key], value, conf);
75
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(`\u2666\uFE0F\u2666\uFE0F\u2666\uFE0F resolve variant ${key}`), console.info({
76
+ key,
77
+ value,
78
+ variantValue,
79
+ variants
80
+ }), console.groupEnd()), !variantValue) {
81
+ if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1" && typeof value != "boolean") {
82
+ const name = staticConfig.componentName || "[UnnamedComponent]";
83
+ console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${value}"`);
84
+ }
85
+ return;
86
+ }
87
+ if (typeof variantValue == "function") {
88
+ const fn = variantValue,
89
+ extras = (0, import_getVariantExtras.getVariantExtras)(styleState);
90
+ variantValue = fn(value, extras), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" expanded functional variant", key), console.info({
91
+ fn,
92
+ variantValue,
93
+ extras
94
+ }), console.groupEnd());
95
+ }
96
+ let fontFamilyResult;
97
+ if ((0, import_isObj.isObj)(variantValue)) {
98
+ const fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];
99
+ fontFamilyUpdate && (fontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf), styleState.fontFamily = fontFamilyResult, process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" updating font family", fontFamilyResult)), variantValue = resolveTokensAndVariants(key, variantValue, styleProps, styleState, parentVariantKey);
100
+ }
101
+ if (variantValue) {
102
+ const expanded = (0, import_normalizeStyle.normalizeStyle)(variantValue, !!styleProps.noNormalize);
103
+ process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" expanding styles from ", variantValue, "to", expanded);
104
+ const next = Object.entries(expanded);
105
+ return fontFamilyResult && fontFamilyResult[0] === "$" && fontFamilyCache.set(next, (0, import_createVariable.getVariableValue)(fontFamilyResult)), next;
106
+ }
107
+ };
108
+ function getFontFamilyFromNameOrVariable(input, conf) {
109
+ if ((0, import_createVariable.isVariable)(input)) {
110
+ const val = variableToFontNameCache.get(input);
111
+ if (val) return val;
112
+ for (const key in conf.fontsParsed) {
113
+ const familyVariable = conf.fontsParsed[key].family;
114
+ if ((0, import_createVariable.isVariable)(familyVariable) && (variableToFontNameCache.set(familyVariable, key), familyVariable === input)) return key;
115
+ }
116
+ } else if (typeof input == "string" && input[0] === "$") return input;
117
+ }
118
+ const variableToFontNameCache = /* @__PURE__ */new WeakMap(),
119
+ fontFamilyCache = /* @__PURE__ */new WeakMap(),
120
+ getPropMappedFontFamily = expanded => expanded && fontFamilyCache.get(expanded),
121
+ resolveTokensAndVariants = (key, value, styleProps, styleState, parentVariantKey) => {
122
+ const {
123
+ conf,
124
+ staticConfig,
125
+ debug,
126
+ theme
127
+ } = styleState,
128
+ {
129
+ variants
130
+ } = staticConfig,
131
+ res = {};
132
+ process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" - resolveTokensAndVariants", key, value);
133
+ for (const _key in value) {
134
+ const subKey = conf.shorthands[_key] || _key,
135
+ val = value[_key];
136
+ if (!(!styleProps.noSkip && subKey in import_skipProps.skipProps)) {
137
+ if (styleProps.noExpand) res[subKey] = val;else if (variants && subKey in variants) {
138
+ if (parentVariantKey && parentVariantKey === key) res[subKey] =
139
+ // SYNC WITH *1
140
+ val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;else {
141
+ const variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
142
+ if (variantOut) for (const [key2, val2] of variantOut) val2 != null && (key2 in import_pseudoDescriptors.pseudoDescriptors ? (res[key2] ??= {}, Object.assign(res[key2], val2)) : res[key2] = val2);
143
+ }
144
+ continue;
145
+ }
146
+ if ((0, import_createVariable.isVariable)(val)) {
147
+ res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues), process.env.NODE_ENV === "development" && debug === "verbose" && console.info("variable", subKey, res[subKey]);
148
+ continue;
149
+ }
150
+ if (typeof val == "string") {
151
+ const fVal =
152
+ // SYNC WITH *1
153
+ val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;
154
+ res[subKey] = fVal;
155
+ continue;
156
+ }
157
+ if ((0, import_isObj.isObj)(val)) {
158
+ const subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
159
+ process.env.NODE_ENV === "development" && debug === "verbose" && console.info("object", subKey, subObject), res[subKey] ??= {}, Object.assign(res[subKey], subObject);
160
+ } else res[subKey] = val;
161
+ process.env.NODE_ENV === "development" && debug && res[subKey]?.[0] === "$" && console.warn(`\u26A0\uFE0F Missing token in theme ${theme.name}:`, subKey, res[subKey], theme);
162
+ }
163
+ }
164
+ return res;
165
+ },
166
+ tokenCats = ["size", "color", "radius", "space", "zIndex"].map(name => ({
167
+ name,
168
+ spreadName: `...${name}`
169
+ }));
170
+ function getVariantDefinition(variant, value, conf) {
171
+ if (typeof variant == "function") return variant;
172
+ const exact = variant[value];
173
+ if (exact) return exact;
174
+ if (value != null) {
175
+ const {
176
+ tokensParsed
177
+ } = conf;
178
+ for (const {
179
+ name,
180
+ spreadName
181
+ } of tokenCats) if (spreadName in variant && value in tokensParsed[name]) return variant[spreadName];
182
+ const fontSizeVariant = variant["...fontSize"];
183
+ if (fontSizeVariant && conf.fontSizeTokens.has(value)) return fontSizeVariant;
184
+ }
185
+ return variant[`:${typeof value}`] || variant["..."];
186
+ }
187
+ const fontShorthand = {
188
+ fontSize: "size",
189
+ fontWeight: "weight"
190
+ };
191
+ let lastFontFamilyToken = null;
192
+ const getTokenForKey = (key, value, resolveAs = "none", styleState) => {
193
+ if (resolveAs === "none") return value;
194
+ const {
195
+ theme,
196
+ conf = (0, import_config.getConfig)(),
197
+ context,
198
+ fontFamily,
199
+ staticConfig
200
+ } = styleState,
201
+ tokensParsed = conf.tokensParsed;
202
+ let valOrVar,
203
+ hasSet = !1;
204
+ const customTokenAccept = staticConfig?.accept?.[key];
205
+ if (customTokenAccept) {
206
+ const val = theme?.[value] ?? tokensParsed[customTokenAccept][value];
207
+ val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
208
+ }
209
+ if (theme && value in theme) valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info(` - resolving ${key} to theme value ${value} resolveAs ${resolveAs}`, valOrVar), globalThis.tamaguiAvoidTracking = !1), hasSet = !0;else {
210
+ if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];else {
211
+ switch (key) {
212
+ case "fontFamily":
213
+ {
214
+ valOrVar = (context?.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed)[value]?.family || value, lastFontFamilyToken = value, hasSet = !0;
215
+ break;
216
+ }
217
+ case "fontSize":
218
+ case "lineHeight":
219
+ case "letterSpacing":
220
+ case "fontWeight":
221
+ {
222
+ const fam = fontFamily || conf.defaultFontToken;
223
+ if (fam) {
224
+ const fontsParsed = context?.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed;
225
+ valOrVar = (fontsParsed[fam] || fontsParsed[conf.defaultFontToken])?.[fontShorthand[key] || key]?.[value] || value, hasSet = !0;
226
+ }
227
+ break;
228
+ }
229
+ }
230
+ for (const cat in import_helpers.tokenCategories) if (key in import_helpers.tokenCategories[cat]) {
231
+ const res = tokensParsed[cat][value];
232
+ res != null && (valOrVar = res, hasSet = !0);
233
+ }
234
+ }
235
+ if (!hasSet) {
236
+ const spaceVar = tokensParsed.space[value];
237
+ spaceVar != null && (valOrVar = spaceVar, hasSet = !0);
238
+ }
239
+ }
240
+ if (hasSet) {
241
+ const out = resolveVariableValue(key, valOrVar, resolveAs);
242
+ return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info("resolved", resolveAs, valOrVar, out), globalThis.tamaguiAvoidTracking = !1), out;
243
+ }
244
+ process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.warn(`Warning: no token found for ${key}, omitting`);
245
+ };
246
+ function resolveVariableValue(key, valOrVar, resolveValues) {
247
+ if (resolveValues === "none") return valOrVar;
248
+ if ((0, import_createVariable.isVariable)(valOrVar)) {
249
+ if (resolveValues === "value") return valOrVar.val;
250
+ const get = valOrVar?.get;
251
+ return typeof get == "function" ? get(resolveValues === "web" ? "web" : void 0) : valOrVar.variable;
252
+ }
253
+ return valOrVar;
254
+ }