@tamagui/web 3.0.0-beta.807.1 → 3.0.0-beta.881.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (587) hide show
  1. package/dist/cjs/config.cjs +1 -1
  2. package/dist/cjs/config.native.cjs +1 -1
  3. package/dist/cjs/config.native.js +1 -1
  4. package/dist/cjs/config.native.js.map +1 -1
  5. package/dist/cjs/createComponent.cjs +40 -19
  6. package/dist/cjs/createComponent.native.cjs +42 -21
  7. package/dist/cjs/createComponent.native.js +42 -21
  8. package/dist/cjs/createComponent.native.js.map +1 -1
  9. package/dist/cjs/createStyledHOC.cjs +54 -4
  10. package/dist/cjs/createStyledHOC.native.cjs +55 -4
  11. package/dist/cjs/createStyledHOC.native.js +55 -4
  12. package/dist/cjs/createStyledHOC.native.js.map +1 -1
  13. package/dist/cjs/createTokens.cjs +1 -1
  14. package/dist/cjs/createTokens.native.cjs +1 -1
  15. package/dist/cjs/createTokens.native.js +1 -1
  16. package/dist/cjs/createTokens.native.js.map +1 -1
  17. package/dist/cjs/createVariable.cjs +0 -10
  18. package/dist/cjs/createVariable.native.cjs +0 -10
  19. package/dist/cjs/createVariable.native.js +0 -10
  20. package/dist/cjs/createVariable.native.js.map +1 -1
  21. package/dist/cjs/dom/html.cjs +147 -99
  22. package/dist/cjs/dom/htmlRuntime.native.cjs +6 -2
  23. package/dist/cjs/dom/htmlRuntime.native.js +6 -2
  24. package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
  25. package/dist/cjs/dom/primitives.native.cjs +16 -13
  26. package/dist/cjs/dom/primitives.native.js +16 -13
  27. package/dist/cjs/dom/primitives.native.js.map +1 -1
  28. package/dist/cjs/helpers/borderComponents.cjs +62 -0
  29. package/dist/cjs/helpers/borderComponents.native.cjs +82 -0
  30. package/dist/cjs/helpers/borderComponents.native.js +84 -0
  31. package/dist/cjs/helpers/borderComponents.native.js.map +1 -0
  32. package/dist/cjs/helpers/componentDisplayName.cjs +1 -11
  33. package/dist/cjs/helpers/componentDisplayName.native.cjs +1 -11
  34. package/dist/cjs/helpers/componentDisplayName.native.js +1 -11
  35. package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
  36. package/dist/cjs/helpers/createDesignSystem.cjs +0 -2
  37. package/dist/cjs/helpers/createStyledContext.cjs +10 -18
  38. package/dist/cjs/helpers/createStyledContext.native.cjs +14 -18
  39. package/dist/cjs/helpers/createStyledContext.native.js +14 -18
  40. package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
  41. package/dist/cjs/helpers/formatDiagnostic.cjs +8 -10
  42. package/dist/cjs/helpers/formatDiagnostic.native.cjs +8 -10
  43. package/dist/cjs/helpers/formatDiagnostic.native.js +8 -10
  44. package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
  45. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +133 -114
  46. package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +11 -3
  47. package/dist/cjs/helpers/getCSSStylesAtomic.native.js +11 -3
  48. package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
  49. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.cjs +13 -1
  50. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.cjs +15 -1
  51. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +15 -1
  52. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
  53. package/dist/cjs/helpers/getDynamicVal.cjs +5 -1
  54. package/dist/cjs/helpers/getDynamicVal.native.cjs +5 -1
  55. package/dist/cjs/helpers/getDynamicVal.native.js +5 -1
  56. package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
  57. package/dist/cjs/helpers/getSplitStyles.cjs +1063 -2168
  58. package/dist/cjs/helpers/getSplitStyles.native.cjs +1115 -2515
  59. package/dist/cjs/helpers/getSplitStyles.native.js +1115 -2515
  60. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  61. package/dist/cjs/helpers/grammarConfig.cjs +163 -1
  62. package/dist/cjs/helpers/grammarConfig.native.cjs +186 -1
  63. package/dist/cjs/helpers/grammarConfig.native.js +186 -1
  64. package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
  65. package/dist/cjs/helpers/insertStyleRule.cjs +5 -1
  66. package/dist/cjs/helpers/insertStyleRule.native.cjs +7 -1
  67. package/dist/cjs/helpers/insertStyleRule.native.js +7 -1
  68. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  69. package/dist/cjs/helpers/log.cjs +9 -8
  70. package/dist/cjs/helpers/log.native.cjs +9 -8
  71. package/dist/cjs/helpers/log.native.js +9 -8
  72. package/dist/cjs/helpers/log.native.js.map +1 -1
  73. package/dist/cjs/helpers/mergeVariants.cjs +44 -13
  74. package/dist/cjs/helpers/mergeVariants.native.cjs +79 -14
  75. package/dist/cjs/helpers/mergeVariants.native.js +79 -14
  76. package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
  77. package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
  78. package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
  79. package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
  80. package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
  81. package/dist/cjs/helpers/nativeStyleEngine.cjs +34 -14
  82. package/dist/cjs/helpers/nativeStyleEngine.native.cjs +36 -14
  83. package/dist/cjs/helpers/nativeStyleEngine.native.js +36 -14
  84. package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
  85. package/dist/cjs/helpers/normalizeValueWithProperty.cjs +7 -8
  86. package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +9 -8
  87. package/dist/cjs/helpers/normalizeValueWithProperty.native.js +9 -8
  88. package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
  89. package/dist/cjs/helpers/parseBorderShorthand.native.cjs +25 -56
  90. package/dist/cjs/helpers/parseBorderShorthand.native.js +25 -56
  91. package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
  92. package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +9 -49
  93. package/dist/cjs/helpers/parseOutlineShorthand.native.js +9 -49
  94. package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
  95. package/dist/cjs/helpers/resolveSafeArea.cjs +35 -100
  96. package/dist/cjs/helpers/resolveVariantStyle.cjs +57 -0
  97. package/dist/cjs/helpers/resolveVariantStyle.native.cjs +67 -0
  98. package/dist/cjs/helpers/resolveVariantStyle.native.js +69 -0
  99. package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -0
  100. package/dist/cjs/helpers/splitStyleProps.cjs +46 -0
  101. package/dist/cjs/helpers/splitStyleProps.native.cjs +49 -0
  102. package/dist/cjs/helpers/splitStyleProps.native.js +51 -0
  103. package/dist/cjs/helpers/splitStyleProps.native.js.map +1 -0
  104. package/dist/cjs/helpers/{getDefaultProps.native.cjs → styleStaticConfig.cjs} +7 -8
  105. package/dist/cjs/helpers/{getDefaultProps.native.js → styleStaticConfig.native.cjs} +7 -8
  106. package/dist/cjs/helpers/styleStaticConfig.native.js +31 -0
  107. package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -0
  108. package/dist/cjs/helpers/styleStaticConfigCore.cjs +107 -0
  109. package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +127 -0
  110. package/dist/cjs/helpers/styleStaticConfigCore.native.js +129 -0
  111. package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -0
  112. package/dist/cjs/helpers/styledDynamic.cjs +160 -0
  113. package/dist/cjs/helpers/styledDynamic.native.cjs +195 -0
  114. package/dist/cjs/helpers/styledDynamic.native.js +197 -0
  115. package/dist/cjs/helpers/styledDynamic.native.js.map +1 -0
  116. package/dist/cjs/helpers/tokenCategories.cjs +12 -74
  117. package/dist/cjs/helpers/tokenCategories.native.cjs +12 -76
  118. package/dist/cjs/helpers/tokenCategories.native.js +12 -76
  119. package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
  120. package/dist/cjs/helpers/variableValue.cjs +17 -12
  121. package/dist/cjs/helpers/variableValue.native.cjs +46 -23
  122. package/dist/cjs/helpers/variableValue.native.js +46 -23
  123. package/dist/cjs/helpers/variableValue.native.js.map +1 -1
  124. package/dist/cjs/helpers/warnOnce.cjs +5 -4
  125. package/dist/cjs/helpers/warnOnce.native.cjs +6 -4
  126. package/dist/cjs/helpers/warnOnce.native.js +6 -4
  127. package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
  128. package/dist/cjs/hooks/useAnimationDriver.cjs +2 -2
  129. package/dist/cjs/hooks/useAnimationDriver.native.cjs +2 -2
  130. package/dist/cjs/hooks/useAnimationDriver.native.js +2 -2
  131. package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
  132. package/dist/cjs/hooks/useComponentState.cjs +41 -82
  133. package/dist/cjs/hooks/useComponentState.native.cjs +45 -84
  134. package/dist/cjs/hooks/useComponentState.native.js +45 -84
  135. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  136. package/dist/cjs/hooks/useMedia.cjs +2 -2
  137. package/dist/cjs/hooks/useMedia.native.cjs +2 -2
  138. package/dist/cjs/hooks/useMedia.native.js +2 -2
  139. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  140. package/dist/cjs/hooks/useSplitStyles.cjs +2 -2
  141. package/dist/cjs/hooks/useSplitStyles.native.cjs +2 -2
  142. package/dist/cjs/hooks/useSplitStyles.native.js +2 -2
  143. package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
  144. package/dist/cjs/{helpers/getDefaultProps.cjs → hooks/useStyle.cjs} +10 -4
  145. package/dist/cjs/{helpers/directStyleCSS.native.js → hooks/useStyle.native.cjs} +16 -6
  146. package/dist/cjs/hooks/useStyle.native.js +34 -0
  147. package/dist/cjs/hooks/useStyle.native.js.map +1 -0
  148. package/dist/cjs/hooks/useThemeState.cjs +25 -90
  149. package/dist/cjs/hooks/useThemeState.native.cjs +34 -94
  150. package/dist/cjs/hooks/useThemeState.native.js +34 -94
  151. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  152. package/dist/cjs/index.cjs +9 -12
  153. package/dist/cjs/index.native.cjs +9 -12
  154. package/dist/cjs/index.native.js +9 -12
  155. package/dist/cjs/index.native.js.map +1 -1
  156. package/dist/cjs/internal-runtime.cjs +8 -7
  157. package/dist/cjs/internal-runtime.native.cjs +8 -7
  158. package/dist/cjs/internal-runtime.native.js +8 -7
  159. package/dist/cjs/internal-runtime.native.js.map +1 -1
  160. package/dist/cjs/static-resolve.cjs +8 -7
  161. package/dist/cjs/static-resolve.native.cjs +8 -7
  162. package/dist/cjs/static-resolve.native.js +8 -7
  163. package/dist/cjs/static-resolve.native.js.map +1 -1
  164. package/dist/cjs/style.cjs +91 -0
  165. package/dist/cjs/style.native.cjs +98 -0
  166. package/dist/cjs/style.native.js +100 -0
  167. package/dist/cjs/style.native.js.map +1 -0
  168. package/dist/cjs/styled.cjs +15 -62
  169. package/dist/cjs/styled.native.cjs +15 -64
  170. package/dist/cjs/styled.native.js +15 -64
  171. package/dist/cjs/styled.native.js.map +1 -1
  172. package/dist/cjs/types.cjs +4 -22
  173. package/dist/cjs/types.native.cjs +4 -22
  174. package/dist/cjs/types.native.js +4 -22
  175. package/dist/cjs/types.native.js.map +1 -1
  176. package/dist/cjs/views/TamaguiProvider.cjs +1 -2
  177. package/dist/cjs/views/TamaguiProvider.native.cjs +1 -2
  178. package/dist/cjs/views/TamaguiProvider.native.js +1 -2
  179. package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
  180. package/dist/cjs/views/Text.cjs +21 -14
  181. package/dist/cjs/views/Text.native.cjs +5 -2
  182. package/dist/cjs/views/Text.native.js +5 -2
  183. package/dist/cjs/views/Text.native.js.map +1 -1
  184. package/dist/cjs/views/Theme.cjs +2 -2
  185. package/dist/cjs/views/Theme.native.cjs +2 -2
  186. package/dist/cjs/views/Theme.native.js +2 -2
  187. package/dist/cjs/views/Theme.native.js.map +1 -1
  188. package/dist/cjs/views/ThemeDebug.cjs +1 -4
  189. package/dist/cjs/views/View.cjs +4 -2
  190. package/dist/cjs/views/View.native.cjs +4 -2
  191. package/dist/cjs/views/View.native.js +4 -2
  192. package/dist/cjs/views/View.native.js.map +1 -1
  193. package/dist/esm/config.mjs +1 -1
  194. package/dist/esm/config.mjs.map +1 -1
  195. package/dist/esm/config.native.js +1 -1
  196. package/dist/esm/config.native.js.map +1 -1
  197. package/dist/esm/createComponent.mjs +41 -20
  198. package/dist/esm/createComponent.mjs.map +1 -1
  199. package/dist/esm/createComponent.native.js +43 -22
  200. package/dist/esm/createComponent.native.js.map +1 -1
  201. package/dist/esm/createStyledHOC.mjs +55 -5
  202. package/dist/esm/createStyledHOC.mjs.map +1 -1
  203. package/dist/esm/createStyledHOC.native.js +56 -5
  204. package/dist/esm/createStyledHOC.native.js.map +1 -1
  205. package/dist/esm/createTokens.mjs +1 -1
  206. package/dist/esm/createTokens.mjs.map +1 -1
  207. package/dist/esm/createTokens.native.js +1 -1
  208. package/dist/esm/createTokens.native.js.map +1 -1
  209. package/dist/esm/createVariable.mjs +1 -9
  210. package/dist/esm/createVariable.mjs.map +1 -1
  211. package/dist/esm/createVariable.native.js +1 -9
  212. package/dist/esm/createVariable.native.js.map +1 -1
  213. package/dist/esm/dom/html.mjs +147 -99
  214. package/dist/esm/dom/html.mjs.map +1 -1
  215. package/dist/esm/dom/htmlRuntime.native.js +7 -3
  216. package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
  217. package/dist/esm/dom/primitives.native.js +16 -13
  218. package/dist/esm/dom/primitives.native.js.map +1 -1
  219. package/dist/esm/helpers/borderComponents.mjs +37 -0
  220. package/dist/esm/helpers/borderComponents.mjs.map +1 -0
  221. package/dist/esm/helpers/borderComponents.native.js +55 -0
  222. package/dist/esm/helpers/borderComponents.native.js.map +1 -0
  223. package/dist/esm/helpers/componentDisplayName.mjs +1 -8
  224. package/dist/esm/helpers/componentDisplayName.mjs.map +1 -1
  225. package/dist/esm/helpers/componentDisplayName.native.js +1 -8
  226. package/dist/esm/helpers/componentDisplayName.native.js.map +1 -1
  227. package/dist/esm/helpers/createDesignSystem.mjs +0 -2
  228. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  229. package/dist/esm/helpers/createStyledContext.mjs +10 -18
  230. package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
  231. package/dist/esm/helpers/createStyledContext.native.js +14 -18
  232. package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
  233. package/dist/esm/helpers/formatDiagnostic.mjs +8 -10
  234. package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
  235. package/dist/esm/helpers/formatDiagnostic.native.js +8 -10
  236. package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
  237. package/dist/esm/helpers/getCSSStylesAtomic.mjs +131 -114
  238. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  239. package/dist/esm/helpers/getCSSStylesAtomic.native.js +7 -4
  240. package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -1
  241. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +8 -1
  242. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -1
  243. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +10 -1
  244. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
  245. package/dist/esm/helpers/getDynamicVal.mjs +5 -1
  246. package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
  247. package/dist/esm/helpers/getDynamicVal.native.js +5 -1
  248. package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
  249. package/dist/esm/helpers/getSplitStyles.mjs +1052 -2151
  250. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  251. package/dist/esm/helpers/getSplitStyles.native.js +1090 -2481
  252. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  253. package/dist/esm/helpers/grammarConfig.mjs +164 -2
  254. package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
  255. package/dist/esm/helpers/grammarConfig.native.js +187 -2
  256. package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
  257. package/dist/esm/helpers/insertStyleRule.mjs +5 -2
  258. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  259. package/dist/esm/helpers/insertStyleRule.native.js +7 -2
  260. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  261. package/dist/esm/helpers/log.mjs +9 -8
  262. package/dist/esm/helpers/log.mjs.map +1 -1
  263. package/dist/esm/helpers/log.native.js +9 -8
  264. package/dist/esm/helpers/log.native.js.map +1 -1
  265. package/dist/esm/helpers/mergeVariants.mjs +44 -13
  266. package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
  267. package/dist/esm/helpers/mergeVariants.native.js +79 -14
  268. package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
  269. package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
  270. package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
  271. package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
  272. package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
  273. package/dist/esm/helpers/nativeStyleEngine.mjs +34 -15
  274. package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
  275. package/dist/esm/helpers/nativeStyleEngine.native.js +36 -15
  276. package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
  277. package/dist/esm/helpers/normalizeValueWithProperty.mjs +7 -8
  278. package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
  279. package/dist/esm/helpers/normalizeValueWithProperty.native.js +9 -8
  280. package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
  281. package/dist/esm/helpers/parseBorderShorthand.native.js +23 -56
  282. package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
  283. package/dist/esm/helpers/parseOutlineShorthand.native.js +10 -49
  284. package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
  285. package/dist/esm/helpers/resolveSafeArea.mjs +35 -97
  286. package/dist/esm/helpers/resolveSafeArea.mjs.map +1 -1
  287. package/dist/esm/helpers/resolveVariantStyle.mjs +38 -0
  288. package/dist/esm/helpers/resolveVariantStyle.mjs.map +1 -0
  289. package/dist/esm/helpers/resolveVariantStyle.native.js +46 -0
  290. package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -0
  291. package/dist/esm/helpers/splitStyleProps.mjs +27 -0
  292. package/dist/esm/helpers/splitStyleProps.mjs.map +1 -0
  293. package/dist/esm/helpers/splitStyleProps.native.js +28 -0
  294. package/dist/esm/helpers/splitStyleProps.native.js.map +1 -0
  295. package/dist/esm/helpers/styleStaticConfig.mjs +8 -0
  296. package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -0
  297. package/dist/esm/helpers/styleStaticConfig.native.js +8 -0
  298. package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -0
  299. package/dist/esm/helpers/styleStaticConfigCore.mjs +88 -0
  300. package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -0
  301. package/dist/esm/helpers/styleStaticConfigCore.native.js +106 -0
  302. package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -0
  303. package/dist/esm/helpers/styledDynamic.mjs +136 -0
  304. package/dist/esm/helpers/styledDynamic.mjs.map +1 -0
  305. package/dist/esm/helpers/styledDynamic.native.js +169 -0
  306. package/dist/esm/helpers/styledDynamic.native.js.map +1 -0
  307. package/dist/esm/helpers/tokenCategories.mjs +12 -72
  308. package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
  309. package/dist/esm/helpers/tokenCategories.native.js +12 -74
  310. package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
  311. package/dist/esm/helpers/variableValue.mjs +17 -12
  312. package/dist/esm/helpers/variableValue.mjs.map +1 -1
  313. package/dist/esm/helpers/variableValue.native.js +46 -23
  314. package/dist/esm/helpers/variableValue.native.js.map +1 -1
  315. package/dist/esm/helpers/warnOnce.mjs +5 -4
  316. package/dist/esm/helpers/warnOnce.mjs.map +1 -1
  317. package/dist/esm/helpers/warnOnce.native.js +6 -4
  318. package/dist/esm/helpers/warnOnce.native.js.map +1 -1
  319. package/dist/esm/hooks/useAnimationDriver.mjs +2 -2
  320. package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
  321. package/dist/esm/hooks/useAnimationDriver.native.js +2 -2
  322. package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
  323. package/dist/esm/hooks/useComponentState.mjs +41 -82
  324. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  325. package/dist/esm/hooks/useComponentState.native.js +45 -84
  326. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  327. package/dist/esm/hooks/useMedia.mjs +2 -2
  328. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  329. package/dist/esm/hooks/useMedia.native.js +2 -2
  330. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  331. package/dist/esm/hooks/useSplitStyles.mjs +2 -2
  332. package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
  333. package/dist/esm/hooks/useSplitStyles.native.js +2 -2
  334. package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
  335. package/dist/esm/hooks/useStyle.mjs +11 -0
  336. package/dist/esm/hooks/useStyle.mjs.map +1 -0
  337. package/dist/esm/hooks/useStyle.native.js +11 -0
  338. package/dist/esm/hooks/useStyle.native.js.map +1 -0
  339. package/dist/esm/hooks/useThemeState.mjs +25 -90
  340. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  341. package/dist/esm/hooks/useThemeState.native.js +34 -94
  342. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  343. package/dist/esm/index.js +8 -8
  344. package/dist/esm/index.mjs +8 -8
  345. package/dist/esm/index.native.js +8 -8
  346. package/dist/esm/internal-runtime.mjs +8 -7
  347. package/dist/esm/internal-runtime.mjs.map +1 -1
  348. package/dist/esm/internal-runtime.native.js +8 -7
  349. package/dist/esm/internal-runtime.native.js.map +1 -1
  350. package/dist/esm/static-resolve.mjs +11 -9
  351. package/dist/esm/static-resolve.mjs.map +1 -1
  352. package/dist/esm/static-resolve.native.js +11 -9
  353. package/dist/esm/static-resolve.native.js.map +1 -1
  354. package/dist/esm/style.mjs +58 -0
  355. package/dist/esm/style.mjs.map +1 -0
  356. package/dist/esm/style.native.js +63 -0
  357. package/dist/esm/style.native.js.map +1 -0
  358. package/dist/esm/styled.mjs +17 -62
  359. package/dist/esm/styled.mjs.map +1 -1
  360. package/dist/esm/styled.native.js +17 -64
  361. package/dist/esm/styled.native.js.map +1 -1
  362. package/dist/esm/types.mjs +3 -21
  363. package/dist/esm/types.mjs.map +1 -1
  364. package/dist/esm/types.native.js +3 -21
  365. package/dist/esm/types.native.js.map +1 -1
  366. package/dist/esm/views/TamaguiProvider.mjs +1 -2
  367. package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
  368. package/dist/esm/views/TamaguiProvider.native.js +1 -2
  369. package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
  370. package/dist/esm/views/Text.mjs +21 -14
  371. package/dist/esm/views/Text.mjs.map +1 -1
  372. package/dist/esm/views/Text.native.js +4 -2
  373. package/dist/esm/views/Text.native.js.map +1 -1
  374. package/dist/esm/views/Theme.mjs +2 -2
  375. package/dist/esm/views/Theme.mjs.map +1 -1
  376. package/dist/esm/views/Theme.native.js +2 -2
  377. package/dist/esm/views/Theme.native.js.map +1 -1
  378. package/dist/esm/views/ThemeDebug.mjs +1 -4
  379. package/dist/esm/views/ThemeDebug.mjs.map +1 -1
  380. package/dist/esm/views/View.mjs +4 -2
  381. package/dist/esm/views/View.mjs.map +1 -1
  382. package/dist/esm/views/View.native.js +4 -2
  383. package/dist/esm/views/View.native.js.map +1 -1
  384. package/package.json +15 -15
  385. package/src/config.ts +1 -1
  386. package/src/createComponent.tsx +62 -31
  387. package/src/createStyledHOC.tsx +56 -9
  388. package/src/createTokens.ts +1 -1
  389. package/src/createVariable.ts +0 -10
  390. package/src/dom/html.tsx +778 -877
  391. package/src/dom/htmlRuntime.native.tsx +7 -3
  392. package/src/dom/primitives.native.tsx +30 -39
  393. package/src/helpers/borderComponents.ts +62 -0
  394. package/src/helpers/componentDisplayName.ts +0 -11
  395. package/src/helpers/createDesignSystem.ts +0 -2
  396. package/src/helpers/createStyledContext.tsx +15 -53
  397. package/src/helpers/formatDiagnostic.ts +11 -13
  398. package/src/helpers/getCSSStylesAtomic.native.ts +6 -3
  399. package/src/helpers/getCSSStylesAtomic.ts +197 -206
  400. package/src/helpers/getCSSStylesAtomicCompiled.ts +13 -1
  401. package/src/helpers/getDynamicVal.ts +4 -0
  402. package/src/helpers/getSplitStyles.tsx +2058 -4052
  403. package/src/helpers/grammarConfig.ts +218 -1
  404. package/src/helpers/insertStyleRule.tsx +4 -2
  405. package/src/helpers/log.ts +12 -11
  406. package/src/helpers/mergeVariants.ts +55 -18
  407. package/src/helpers/nativeOnlyProps.ts +0 -1
  408. package/src/helpers/nativeStyleEngine.ts +55 -14
  409. package/src/helpers/normalizeValueWithProperty.ts +10 -12
  410. package/src/helpers/parseBorderShorthand.native.ts +23 -45
  411. package/src/helpers/parseOutlineShorthand.native.ts +9 -40
  412. package/src/helpers/resolveSafeArea.ts +34 -101
  413. package/src/helpers/resolveVariantStyle.ts +77 -0
  414. package/src/helpers/splitStyleProps.ts +166 -0
  415. package/src/helpers/styleFrontend.ts +16 -9
  416. package/src/helpers/styleStaticConfig.ts +21 -0
  417. package/src/helpers/styleStaticConfigCore.ts +110 -0
  418. package/src/helpers/styledDynamic.ts +191 -0
  419. package/src/helpers/tokenCategories.ts +32 -88
  420. package/src/helpers/variableValue.ts +20 -15
  421. package/src/helpers/warnOnce.ts +5 -4
  422. package/src/hooks/useAnimationDriver.ts +6 -2
  423. package/src/hooks/useComponentState.ts +55 -183
  424. package/src/hooks/useMedia.tsx +10 -8
  425. package/src/hooks/useSplitStyles.tsx +17 -2
  426. package/src/hooks/useStyle.ts +10 -0
  427. package/src/hooks/useTheme.tsx +1 -1
  428. package/src/hooks/useThemeState.ts +51 -264
  429. package/src/index.ts +14 -10
  430. package/src/internal-runtime.ts +10 -9
  431. package/src/internalRuntimeTypes.ts +1 -0
  432. package/src/static-resolve.ts +25 -18
  433. package/src/style.ts +97 -0
  434. package/src/styled.tsx +46 -332
  435. package/src/types.tsx +107 -192
  436. package/src/views/TamaguiProvider.tsx +0 -2
  437. package/src/views/Text.tsx +26 -21
  438. package/src/views/Theme.tsx +10 -8
  439. package/src/views/ThemeDebug.tsx +0 -1
  440. package/src/views/View.tsx +6 -7
  441. package/types/createComponent.d.ts.map +1 -1
  442. package/types/createStyledHOC.d.ts.map +1 -1
  443. package/types/createVariable.d.ts +0 -2
  444. package/types/createVariable.d.ts.map +1 -1
  445. package/types/dom/html.d.ts.map +1 -1
  446. package/types/dom/htmlRuntime.native.d.ts.map +1 -1
  447. package/types/dom/primitives.native.d.ts.map +1 -1
  448. package/types/helpers/borderComponents.d.ts +10 -0
  449. package/types/helpers/borderComponents.d.ts.map +1 -0
  450. package/types/helpers/componentDisplayName.d.ts +0 -3
  451. package/types/helpers/componentDisplayName.d.ts.map +1 -1
  452. package/types/helpers/createDesignSystem.d.ts.map +1 -1
  453. package/types/helpers/createStyledContext.d.ts.map +1 -1
  454. package/types/helpers/formatDiagnostic.d.ts.map +1 -1
  455. package/types/helpers/getCSSStylesAtomic.d.ts +25 -22
  456. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  457. package/types/helpers/getCSSStylesAtomic.native.d.ts +5 -0
  458. package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -1
  459. package/types/helpers/getCSSStylesAtomicCompiled.d.ts +6 -1
  460. package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -1
  461. package/types/helpers/getDynamicVal.d.ts.map +1 -1
  462. package/types/helpers/getSplitStyles.d.ts +9 -11
  463. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  464. package/types/helpers/grammarConfig.d.ts +25 -2
  465. package/types/helpers/grammarConfig.d.ts.map +1 -1
  466. package/types/helpers/insertStyleRule.d.ts +1 -0
  467. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  468. package/types/helpers/log.d.ts.map +1 -1
  469. package/types/helpers/mergeVariants.d.ts.map +1 -1
  470. package/types/helpers/nativeOnlyProps.d.ts +0 -1
  471. package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
  472. package/types/helpers/nativeStyleEngine.d.ts +6 -0
  473. package/types/helpers/nativeStyleEngine.d.ts.map +1 -1
  474. package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
  475. package/types/helpers/parseBorderShorthand.native.d.ts +1 -0
  476. package/types/helpers/parseBorderShorthand.native.d.ts.map +1 -1
  477. package/types/helpers/parseOutlineShorthand.native.d.ts.map +1 -1
  478. package/types/helpers/resolveSafeArea.d.ts +0 -1
  479. package/types/helpers/resolveSafeArea.d.ts.map +1 -1
  480. package/types/helpers/resolveVariantStyle.d.ts +3 -0
  481. package/types/helpers/resolveVariantStyle.d.ts.map +1 -0
  482. package/types/helpers/splitStyleProps.d.ts +44 -0
  483. package/types/helpers/splitStyleProps.d.ts.map +1 -0
  484. package/types/helpers/styleFrontend.d.ts +7 -9
  485. package/types/helpers/styleFrontend.d.ts.map +1 -1
  486. package/types/helpers/styleStaticConfig.d.ts +14 -0
  487. package/types/helpers/styleStaticConfig.d.ts.map +1 -0
  488. package/types/helpers/styleStaticConfigCore.d.ts +4 -0
  489. package/types/helpers/styleStaticConfigCore.d.ts.map +1 -0
  490. package/types/helpers/styledDynamic.d.ts +18 -0
  491. package/types/helpers/styledDynamic.d.ts.map +1 -0
  492. package/types/helpers/tokenCategories.d.ts +0 -1
  493. package/types/helpers/tokenCategories.d.ts.map +1 -1
  494. package/types/helpers/variableValue.d.ts.map +1 -1
  495. package/types/helpers/warnOnce.d.ts.map +1 -1
  496. package/types/helpers/webPropsToSkip.native.d.ts +68 -68
  497. package/types/hooks/useAnimationDriver.d.ts.map +1 -1
  498. package/types/hooks/useComponentState.d.ts.map +1 -1
  499. package/types/hooks/useMedia.d.ts.map +1 -1
  500. package/types/hooks/useSplitStyles.d.ts.map +1 -1
  501. package/types/hooks/useStyle.d.ts +4 -0
  502. package/types/hooks/useStyle.d.ts.map +1 -0
  503. package/types/hooks/useThemeState.d.ts +1 -11
  504. package/types/hooks/useThemeState.d.ts.map +1 -1
  505. package/types/index.d.ts +8 -8
  506. package/types/index.d.ts.map +1 -1
  507. package/types/internal-runtime.d.ts.map +1 -1
  508. package/types/internalRuntimeTypes.d.ts +1 -1
  509. package/types/internalRuntimeTypes.d.ts.map +1 -1
  510. package/types/static-resolve.d.ts +2 -2
  511. package/types/static-resolve.d.ts.map +1 -1
  512. package/types/style.d.ts +18 -0
  513. package/types/style.d.ts.map +1 -0
  514. package/types/styled.d.ts +12 -48
  515. package/types/styled.d.ts.map +1 -1
  516. package/types/types.d.ts +75 -60
  517. package/types/types.d.ts.map +1 -1
  518. package/types/views/TamaguiProvider.d.ts +1 -1
  519. package/types/views/TamaguiProvider.d.ts.map +1 -1
  520. package/types/views/Text.d.ts.map +1 -1
  521. package/types/views/Theme.d.ts.map +1 -1
  522. package/types/views/ThemeDebug.d.ts.map +1 -1
  523. package/types/views/View.d.ts.map +1 -1
  524. package/dist/cjs/helpers/directStyleCSS.cjs +0 -348
  525. package/dist/cjs/helpers/directStyleCSS.native.cjs +0 -20
  526. package/dist/cjs/helpers/directStyleCSS.native.js.map +0 -1
  527. package/dist/cjs/helpers/directStyleCSSCompiled.cjs +0 -40
  528. package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +0 -46
  529. package/dist/cjs/helpers/directStyleCSSCompiled.native.js +0 -48
  530. package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +0 -1
  531. package/dist/cjs/helpers/getDefaultProps.native.js.map +0 -1
  532. package/dist/cjs/helpers/getVariantExtras.cjs +0 -91
  533. package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -94
  534. package/dist/cjs/helpers/getVariantExtras.native.js +0 -96
  535. package/dist/cjs/helpers/getVariantExtras.native.js.map +0 -1
  536. package/dist/cjs/helpers/themeable.cjs +0 -92
  537. package/dist/cjs/helpers/themeable.native.cjs +0 -95
  538. package/dist/cjs/helpers/themeable.native.js +0 -97
  539. package/dist/cjs/helpers/themeable.native.js.map +0 -1
  540. package/dist/cjs/hooks/useProps.cjs +0 -129
  541. package/dist/cjs/hooks/useProps.native.cjs +0 -135
  542. package/dist/cjs/hooks/useProps.native.js +0 -137
  543. package/dist/cjs/hooks/useProps.native.js.map +0 -1
  544. package/dist/esm/helpers/directStyleCSS.mjs +0 -320
  545. package/dist/esm/helpers/directStyleCSS.mjs.map +0 -1
  546. package/dist/esm/helpers/directStyleCSS.native.js +0 -1
  547. package/dist/esm/helpers/directStyleCSSCompiled.mjs +0 -11
  548. package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +0 -1
  549. package/dist/esm/helpers/directStyleCSSCompiled.native.js +0 -15
  550. package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +0 -1
  551. package/dist/esm/helpers/getDefaultProps.mjs +0 -4
  552. package/dist/esm/helpers/getDefaultProps.mjs.map +0 -1
  553. package/dist/esm/helpers/getDefaultProps.native.js +0 -6
  554. package/dist/esm/helpers/getDefaultProps.native.js.map +0 -1
  555. package/dist/esm/helpers/getVariantExtras.mjs +0 -69
  556. package/dist/esm/helpers/getVariantExtras.mjs.map +0 -1
  557. package/dist/esm/helpers/getVariantExtras.native.js +0 -70
  558. package/dist/esm/helpers/getVariantExtras.native.js.map +0 -1
  559. package/dist/esm/helpers/themeable.mjs +0 -67
  560. package/dist/esm/helpers/themeable.mjs.map +0 -1
  561. package/dist/esm/helpers/themeable.native.js +0 -68
  562. package/dist/esm/helpers/themeable.native.js.map +0 -1
  563. package/dist/esm/hooks/useProps.mjs +0 -100
  564. package/dist/esm/hooks/useProps.mjs.map +0 -1
  565. package/dist/esm/hooks/useProps.native.js +0 -104
  566. package/dist/esm/hooks/useProps.native.js.map +0 -1
  567. package/src/helpers/directStyleCSS.native.ts +0 -1
  568. package/src/helpers/directStyleCSS.ts +0 -534
  569. package/src/helpers/directStyleCSSCompiled.ts +0 -32
  570. package/src/helpers/getDefaultProps.ts +0 -3
  571. package/src/helpers/getVariantExtras.tsx +0 -95
  572. package/src/helpers/themeable.tsx +0 -96
  573. package/src/hooks/useProps.tsx +0 -186
  574. package/types/helpers/directStyleCSS.d.ts +0 -28
  575. package/types/helpers/directStyleCSS.d.ts.map +0 -1
  576. package/types/helpers/directStyleCSS.native.d.ts +0 -2
  577. package/types/helpers/directStyleCSS.native.d.ts.map +0 -1
  578. package/types/helpers/directStyleCSSCompiled.d.ts +0 -10
  579. package/types/helpers/directStyleCSSCompiled.d.ts.map +0 -1
  580. package/types/helpers/getDefaultProps.d.ts +0 -3
  581. package/types/helpers/getDefaultProps.d.ts.map +0 -1
  582. package/types/helpers/getVariantExtras.d.ts +0 -4
  583. package/types/helpers/getVariantExtras.d.ts.map +0 -1
  584. package/types/helpers/themeable.d.ts +0 -3
  585. package/types/helpers/themeable.d.ts.map +0 -1
  586. package/types/hooks/useProps.d.ts +0 -39
  587. package/types/hooks/useProps.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"createDesignSystem.js","names":[],"sources":["esm/helpers/createDesignSystem.js"],"sourcesContent":["import { isWeb } from \"@tamagui/constants\";\nimport { getAutoVariableCSS, getVariableGeneration, registerCSSVariable, variableToCSS } from \"./registerCSSVariable\";\nimport { getConfigMaybe } from \"../config\";\nimport { getThemeCSSRules } from \"./getThemeCSSRules\";\nimport { getAllRules, wrapStyleRules } from \"./insertStyleRule\";\n\nfunction createTokenCSS(tokens, shouldTokenCategoryHaveUnits) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tconst declarations = [];\n\t\tconst sortedTokenKeys = Object.keys(tokens).sort();\n\t\tfor (const key of sortedTokenKeys) {\n\t\t\tconst sortedSubKeys = Object.keys(tokens[key]).sort();\n\t\t\tfor (const skey of sortedSubKeys) {\n\t\t\t\tconst variable = tokens[key][skey];\n\t\t\t\tif (isWeb) {\n\t\t\t\t\tregisterCSSVariable(variable);\n\t\t\t\t\tconst variableNeedsPx = variable.needsPx === true;\n\t\t\t\t\tconst categoryNeedsPx = shouldTokenCategoryHaveUnits(key);\n\t\t\t\t\tconst shouldBeUnitless = !(variableNeedsPx || categoryNeedsPx);\n\t\t\t\t\tdeclarations.push(variableToCSS(variable, shouldBeUnitless));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn declarations;\n\t}\n\treturn [];\n}\nfunction createFontCSS(fontsParsed, registerFontVariables) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tconst fontDeclarations = {};\n\t\tif (!fontsParsed) return fontDeclarations;\n\t\tconst sortedFontKeys = Object.keys(fontsParsed).sort();\n\t\tfor (const key of sortedFontKeys) {\n\t\t\tconst fontParsed = fontsParsed[key];\n\t\t\tconst [name, language] = key.includes(\"_\") ? key.split(\"_\") : [key];\n\t\t\tfontDeclarations[key] = {\n\t\t\t\tname,\n\t\t\t\tdeclarations: registerFontVariables(fontParsed),\n\t\t\t\tlanguage,\n\t\t\t\tfontParsed\n\t\t\t};\n\t\t}\n\t\treturn fontDeclarations;\n\t}\n\treturn {};\n}\nfunction buildCSSRuleSets(declarations, fontDeclarations, defaultFontToken = \"\") {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tlet declarationsToRuleSet = function(decs, selector = \"\") {\n\t\t\treturn `:root${selector} {${sep}${[...decs].join(`;${sep}`)}\n}`;\n\t\t};\n\t\tconst cssRuleSets = [];\n\t\tconst sep = \" \";\n\t\tif (declarations.length) cssRuleSets.push(declarationsToRuleSet(declarations));\n\t\tconst fontSelectors = [];\n\t\tconst sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();\n\t\tfor (const key of sortedFontDeclarationKeys) {\n\t\t\tconst { name, declarations: declarations2, language = \"default\" } = fontDeclarations[key];\n\t\t\tconst fontSelector = `.font_${name}`;\n\t\t\tfontSelectors.push(fontSelector);\n\t\t\tconst langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`;\n\t\t\tconst specificRuleSet = declarationsToRuleSet(declarations2, language === \"default\" ? ` ${fontSelector}, ${langSelector}` : langSelector);\n\t\t\tcssRuleSets.push(specificRuleSet);\n\t\t}\n\t\tif (fontSelectors.length) {\n\t\t\tif (fontDeclarations[defaultFontToken]?.fontParsed) {\n\t\t\t\tconst sharedSelectors = `:where(${[...fontSelectors, \".is_View\"].join(\", \")})`;\n\t\t\t\tcssRuleSets.push(`${sharedSelectors} {font-family: var(--f-family)}`);\n\t\t\t}\n\t\t}\n\t\treturn cssRuleSets;\n\t}\n\treturn [];\n}\nfunction createThemeCSS(dedupedThemes, configIn) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tlet themeRuleSets = [];\n\t\tif (isWeb) for (const { names, theme } of dedupedThemes) {\n\t\t\tconst nextRules = getThemeCSSRules({\n\t\t\t\tconfig: configIn,\n\t\t\t\tthemeName: names[0],\n\t\t\t\tnames,\n\t\t\t\ttheme\n\t\t\t});\n\t\t\tthemeRuleSets = [...themeRuleSets, ...nextRules];\n\t\t}\n\t\treturn themeRuleSets;\n\t}\n\treturn [];\n}\nconst MAX_STATIC_SHAPES = 8;\nconst getStaticCSS = (themeConfig, separator, withThemes, state) => {\n\tconst key = withThemes ? separator : `\\0${separator}`;\n\tconst config = getConfigMaybe();\n\tlet cached = state.static;\n\tif (!cached || cached.generation !== getVariableGeneration() || cached.config !== config) {\n\t\tcached = {\n\t\t\tgeneration: getVariableGeneration(),\n\t\t\tconfig,\n\t\t\tbyKey: /* @__PURE__ */ new Map()\n\t\t};\n\t\tstate.static = cached;\n\t}\n\tconst hit = cached.byKey.get(key);\n\tif (hit !== void 0) return hit;\n\tconst themeRules = withThemes ? themeConfig.getThemeRulesSets().join(separator) : \"\";\n\tconst autoVariableCSS = getAutoVariableCSS();\n\tconst css = `${`._ovs-contain {overscroll-behavior:contain;}\n.t_unmounted .is_View, .t_unmounted .is_Text { transition: none !important; }\n:where(.is_View) { display: flex; align-items: stretch; flex-direction: column; flex-basis: auto; box-sizing: border-box; min-height: 0; min-width: 0; flex-shrink: 0; }\n:where(.is_Text) { display: inline; box-sizing: border-box; word-wrap: break-word; white-space: pre-wrap; margin: 0; }\n@scope (.is_Text) to (.is_View) { :where(.is_Text) { white-space: inherit; word-wrap: inherit; } }\n._dsp_contents {display:contents;}\n._no_backdrop::backdrop {display: none;}\n.is_Input::selection, .is_TextArea::selection {background-color: var(--t_selectionColor);}\n.is_Input::placeholder, .is_TextArea::placeholder {color: var(--t_placeholderColor);}\n:root ._pe-boxonly>* {pointer-events:none;}\n:root ._pe-boxnone>* {pointer-events:auto;}\n._hsb-x::-webkit-scrollbar:horizontal { display: none !important; }\n._hsb-y::-webkit-scrollbar:vertical { display: none !important; }\n._hsb-x { scrollbar-width: none !important; }\n._hsb-y { scrollbar-width: none !important; }\n${autoVariableCSS ? `:root{${autoVariableCSS}}` : \"\"}\n${themeConfig.cssRuleSets.join(separator)}`}\n${themeRules}\n`;\n\tif (cached.generation !== getVariableGeneration()) {\n\t\tcached = {\n\t\t\tgeneration: getVariableGeneration(),\n\t\t\tconfig,\n\t\t\tbyKey: /* @__PURE__ */ new Map()\n\t\t};\n\t\tstate.static = cached;\n\t}\n\tif (cached.byKey.size >= MAX_STATIC_SHAPES) cached.byKey.clear();\n\tcached.byKey.set(key, css);\n\treturn css;\n};\nfunction getCSS(themeConfig, opts = {}, state) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && true) {\n\t\tconst { separator = \"\\n\", sinceLastCall, exclude } = opts;\n\t\tif (sinceLastCall && state.lastIndex >= 0) {\n\t\t\tconst rules = getAllRules();\n\t\t\tconst newRules = rules.slice(state.lastIndex);\n\t\t\tstate.lastIndex = rules.length;\n\t\t\treturn wrapStyleRules(newRules.join(separator));\n\t\t}\n\t\tstate.lastIndex = 0;\n\t\tconst runtimeStyles = getAllRules().join(separator);\n\t\tif (exclude === \"design-system\") return wrapStyleRules(runtimeStyles);\n\t\treturn wrapStyleRules(`${getStaticCSS(themeConfig, separator, !exclude, state)}${runtimeStyles}`);\n\t}\n\treturn \"\";\n}\n\nexport { buildCSSRuleSets, createFontCSS, createThemeCSS, createTokenCSS, getCSS };"],"mappings":";;;;;;;AAMA,SAAS,eAAe,QAAQ,8BAA8B;CAC7D,IAAI,CAAC,QAAQ,IAAI,wBAAwB;EACxC,MAAM,eAAe,CAAC;EACtB,MAAM,kBAAkB,OAAO,KAAK,MAAM,CAAC,CAAC,KAAK;EACjD,KAAK,MAAM,OAAO,iBAAiB;GAClC,MAAM,gBAAgB,OAAO,KAAK,OAAO,IAAI,CAAC,CAAC,KAAK;GACpD,KAAK,MAAM,QAAQ,eAAe;IACjC,MAAM,WAAW,OAAO,IAAI,CAAC;IAC7B,IAAI,OAAO;KACV,oBAAoB,QAAQ;KAC5B,MAAM,kBAAkB,SAAS,YAAY;KAC7C,MAAM,kBAAkB,6BAA6B,GAAG;KACxD,MAAM,mBAAmB,EAAE,mBAAmB;KAC9C,aAAa,KAAK,cAAc,UAAU,gBAAgB,CAAC;IAC5D;GACD;EACD;EACA,OAAO;CACR;CACA,OAAO,CAAC;AACT;AACA,SAAS,cAAc,aAAa,uBAAuB;CAC1D,IAAI,CAAC,QAAQ,IAAI,wBAAwB;EACxC,MAAM,mBAAmB,CAAC;EAC1B,IAAI,CAAC,aAAa,OAAO;EACzB,MAAM,iBAAiB,OAAO,KAAK,WAAW,CAAC,CAAC,KAAK;EACrD,KAAK,MAAM,OAAO,gBAAgB;GACjC,MAAM,aAAa,YAAY;GAC/B,MAAM,CAAC,MAAM,YAAY,IAAI,SAAS,GAAG,IAAI,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG;GAClE,iBAAiB,OAAO;IACvB;IACA,cAAc,sBAAsB,UAAU;IAC9C;IACA;GACD;EACD;EACA,OAAO;CACR;CACA,OAAO,CAAC;AACT;AACA,SAAS,iBAAiB,cA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gB,YAAY,CAAC,CAAC,KAAK,SAAS;EAClD,IAAI,YAAY,iBAAiB,OAAO,eAAe,aAAa;EACpE,OAAO,eAAe,GAAG,aAAa,aAAa,WAAW,CAAC,SAAS,KAAK,IAAI,eAAe;CACjG;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"createDesignSystem.js","names":[],"sources":["esm/helpers/createDesignSystem.js"],"sourcesContent":["import { isWeb } from \"@tamagui/constants\";\nimport { getAutoVariableCSS, getVariableGeneration, registerCSSVariable, variableToCSS } from \"./registerCSSVariable\";\nimport { getConfigMaybe } from \"../config\";\nimport { getThemeCSSRules } from \"./getThemeCSSRules\";\nimport { getAllRules, wrapStyleRules } from \"./insertStyleRule\";\n\nfunction createTokenCSS(tokens, shouldTokenCategoryHaveUnits) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tconst declarations = [];\n\t\tconst sortedTokenKeys = Object.keys(tokens).sort();\n\t\tfor (const key of sortedTokenKeys) {\n\t\t\tconst sortedSubKeys = Object.keys(tokens[key]).sort();\n\t\t\tfor (const skey of sortedSubKeys) {\n\t\t\t\tconst variable = tokens[key][skey];\n\t\t\t\tif (isWeb) {\n\t\t\t\t\tregisterCSSVariable(variable);\n\t\t\t\t\tconst variableNeedsPx = variable.needsPx === true;\n\t\t\t\t\tconst categoryNeedsPx = shouldTokenCategoryHaveUnits(key);\n\t\t\t\t\tconst shouldBeUnitless = !(variableNeedsPx || categoryNeedsPx);\n\t\t\t\t\tdeclarations.push(variableToCSS(variable, shouldBeUnitless));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn declarations;\n\t}\n\treturn [];\n}\nfunction createFontCSS(fontsParsed, registerFontVariables) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tconst fontDeclarations = {};\n\t\tif (!fontsParsed) return fontDeclarations;\n\t\tconst sortedFontKeys = Object.keys(fontsParsed).sort();\n\t\tfor (const key of sortedFontKeys) {\n\t\t\tconst fontParsed = fontsParsed[key];\n\t\t\tconst [name, language] = key.includes(\"_\") ? key.split(\"_\") : [key];\n\t\t\tfontDeclarations[key] = {\n\t\t\t\tname,\n\t\t\t\tdeclarations: registerFontVariables(fontParsed),\n\t\t\t\tlanguage,\n\t\t\t\tfontParsed\n\t\t\t};\n\t\t}\n\t\treturn fontDeclarations;\n\t}\n\treturn {};\n}\nfunction buildCSSRuleSets(declarations, fontDeclarations, defaultFontToken = \"\") {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tlet declarationsToRuleSet = function(decs, selector = \"\") {\n\t\t\treturn `:root${selector} {${sep}${[...decs].join(`;${sep}`)}\n}`;\n\t\t};\n\t\tconst cssRuleSets = [];\n\t\tconst sep = \" \";\n\t\tif (declarations.length) cssRuleSets.push(declarationsToRuleSet(declarations));\n\t\tconst fontSelectors = [];\n\t\tconst sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();\n\t\tfor (const key of sortedFontDeclarationKeys) {\n\t\t\tconst { name, declarations: declarations2, language = \"default\" } = fontDeclarations[key];\n\t\t\tconst fontSelector = `.font_${name}`;\n\t\t\tfontSelectors.push(fontSelector);\n\t\t\tconst langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`;\n\t\t\tconst specificRuleSet = declarationsToRuleSet(declarations2, language === \"default\" ? ` ${fontSelector}, ${langSelector}` : langSelector);\n\t\t\tcssRuleSets.push(specificRuleSet);\n\t\t}\n\t\tif (fontSelectors.length) {\n\t\t\tif (fontDeclarations[defaultFontToken]?.fontParsed) {\n\t\t\t\tconst sharedSelectors = `:where(${[...fontSelectors, \".is_View\"].join(\", \")})`;\n\t\t\t\tcssRuleSets.push(`${sharedSelectors} {font-family: var(--f-family)}`);\n\t\t\t}\n\t\t}\n\t\treturn cssRuleSets;\n\t}\n\treturn [];\n}\nfunction createThemeCSS(dedupedThemes, configIn) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tlet themeRuleSets = [];\n\t\tif (isWeb) for (const { names, theme } of dedupedThemes) {\n\t\t\tconst nextRules = getThemeCSSRules({\n\t\t\t\tconfig: configIn,\n\t\t\t\tthemeName: names[0],\n\t\t\t\tnames,\n\t\t\t\ttheme\n\t\t\t});\n\t\t\tthemeRuleSets = [...themeRuleSets, ...nextRules];\n\t\t}\n\t\treturn themeRuleSets;\n\t}\n\treturn [];\n}\nconst MAX_STATIC_SHAPES = 8;\nconst getStaticCSS = (themeConfig, separator, withThemes, state) => {\n\tconst key = withThemes ? separator : `\\0${separator}`;\n\tconst config = getConfigMaybe();\n\tlet cached = state.static;\n\tif (!cached || cached.generation !== getVariableGeneration() || cached.config !== config) {\n\t\tcached = {\n\t\t\tgeneration: getVariableGeneration(),\n\t\t\tconfig,\n\t\t\tbyKey: /* @__PURE__ */ new Map()\n\t\t};\n\t\tstate.static = cached;\n\t}\n\tconst hit = cached.byKey.get(key);\n\tif (hit !== void 0) return hit;\n\tconst themeRules = withThemes ? themeConfig.getThemeRulesSets().join(separator) : \"\";\n\tconst autoVariableCSS = getAutoVariableCSS();\n\tconst css = `${`._ovs-contain {overscroll-behavior:contain;}\n.t_unmounted .is_View, .t_unmounted .is_Text { transition: none !important; }\n:where(.is_View) { display: flex; align-items: stretch; flex-direction: column; flex-basis: auto; box-sizing: border-box; min-height: 0; min-width: 0; flex-shrink: 0; }\n:where(.is_Text) { display: inline; box-sizing: border-box; word-wrap: break-word; white-space: pre-wrap; margin: 0; }\n@scope (.is_Text) to (.is_View) { :where(.is_Text) { white-space: inherit; word-wrap: inherit; } }\n._dsp_contents {display:contents;}\n._no_backdrop::backdrop {display: none;}\n:root ._pe-boxonly>* {pointer-events:none;}\n:root ._pe-boxnone>* {pointer-events:auto;}\n._hsb-x::-webkit-scrollbar:horizontal { display: none !important; }\n._hsb-y::-webkit-scrollbar:vertical { display: none !important; }\n._hsb-x { scrollbar-width: none !important; }\n._hsb-y { scrollbar-width: none !important; }\n${autoVariableCSS ? `:root{${autoVariableCSS}}` : \"\"}\n${themeConfig.cssRuleSets.join(separator)}`}\n${themeRules}\n`;\n\tif (cached.generation !== getVariableGeneration()) {\n\t\tcached = {\n\t\t\tgeneration: getVariableGeneration(),\n\t\t\tconfig,\n\t\t\tbyKey: /* @__PURE__ */ new Map()\n\t\t};\n\t\tstate.static = cached;\n\t}\n\tif (cached.byKey.size >= MAX_STATIC_SHAPES) cached.byKey.clear();\n\tcached.byKey.set(key, css);\n\treturn css;\n};\nfunction getCSS(themeConfig, opts = {}, state) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && true) {\n\t\tconst { separator = \"\\n\", sinceLastCall, exclude } = opts;\n\t\tif (sinceLastCall && state.lastIndex >= 0) {\n\t\t\tconst rules = getAllRules();\n\t\t\tconst newRules = rules.slice(state.lastIndex);\n\t\t\tstate.lastIndex = rules.length;\n\t\t\treturn wrapStyleRules(newRules.join(separator));\n\t\t}\n\t\tstate.lastIndex = 0;\n\t\tconst runtimeStyles = getAllRules().join(separator);\n\t\tif (exclude === \"design-system\") return wrapStyleRules(runtimeStyles);\n\t\treturn wrapStyleRules(`${getStaticCSS(themeConfig, separator, !exclude, state)}${runtimeStyles}`);\n\t}\n\treturn \"\";\n}\n\nexport { buildCSSRuleSets, createFontCSS, createThemeCSS, createTokenCSS, getCSS };"],"mappings":";;;;;;;AAMA,SAAS,eAAe,QAAQ,8BAA8B;CAC7D,IAAI,CAAC,QAAQ,IAAI,wBAAwB;EACxC,MAAM,eAAe,CAAC;EACtB,MAAM,kBAAkB,OAAO,KAAK,MAAM,CAAC,CAAC,KAAK;EACjD,KAAK,MAAM,OAAO,iBAAiB;GAClC,MAAM,gBAAgB,OAAO,KAAK,OAAO,IAAI,CAAC,CAAC,KAAK;GACpD,KAAK,MAAM,QAAQ,eAAe;IACjC,MAAM,WAAW,OAAO,IAAI,CAAC;IAC7B,IAAI,OAAO;KACV,oBAAoB,QAAQ;KAC5B,MAAM,kBAAkB,SAAS,YAAY;KAC7C,MAAM,kBAAkB,6BAA6B,GAAG;KACxD,M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EZ,IAAI,OAAO,eAAe,sBAAsB,GAAG;EAClD,SAAS;GACR,YAAY,sBAAsB;GAClC;GACA,uBAAuB,IAAI,IAAI;EAChC;EACA,MAAM,SAAS;CAChB;CACA,IAAI,OAAO,MAAM,QAAQ,mBAAmB,OAAO,MAAM,MAAM;CAC/D,OAAO,MAAM,IAAI,KAAK,GAAG;CACzB,OAAO;AACR;AACA,SAAS,OAAO,aAAa,OAAO,CAAC,GAAG,OAAO;CAC9C,IAAI,CAAC,QAAQ,IAAI,0BAA0B,MAAM;EAChD,MAAM,EAAE,YAAY,MAAM,eAAe,YAAY;EACrD,IAAI,iBAAiB,MAAM,aAAa,GAAG;GAC1C,MAAM,QAAQ,YAAY;GAC1B,MAAM,WAAW,MAAM,MAAM,MAAM,SAAS;GAC5C,MAAM,YAAY,MAAM;GACxB,OAAO,eAAe,SAAS,KAAK,SAAS,CAAC;EAC/C;EACA,MAAM,YAAY;EAClB,MAAM,gBAAgB,YAAY,CAAC,CAAC,KAAK,SAAS;EAClD,IAAI,YAAY,iBAAiB,OAAO,eAAe,aAAa;EACpE,OAAO,eAAe,GAAG,aAAa,aAAa,WAAW,CAAC,SAAS,KAAK,IAAI,eAAe;CACjG;CACA,OAAO;AACR"}
@@ -6,20 +6,18 @@ import { jsx } from "react/jsx-runtime";
6
6
 
7
7
  const createStyledContext = ((defaultValues, namespaceOrOptions = "") => {
8
8
  "use no memo";
9
- const createReactContext = React[Math.random() ? "createContext" : "createContext"];
10
- const useReactMemo = React[Math.random() ? "useMemo" : "useMemo"];
11
- const useReactContext = React[Math.random() ? "useContext" : "useContext"];
12
9
  const namespace = typeof namespaceOrOptions === "string" ? namespaceOrOptions : namespaceOrOptions.namespace || "";
13
- const propKeys = typeof namespaceOrOptions === "string" ? isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0 : namespaceOrOptions.keys || (isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0);
14
- const OGContext = createReactContext(defaultValues);
10
+ const defaultKeys = isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0;
11
+ const propKeys = typeof namespaceOrOptions === "object" && namespaceOrOptions.keys ? namespaceOrOptions.keys : defaultKeys;
12
+ const OGContext = React.createContext(defaultValues);
15
13
  const OGProvider = OGContext.Provider;
16
14
  const Context = OGContext;
17
15
  const scopedContexts = /* @__PURE__ */ new Map();
18
- const LastScopeInNamespace = createReactContext(namespace);
16
+ const LastScopeInNamespace = React.createContext(namespace);
19
17
  function getOrCreateScopedContext(scope) {
20
18
  let ScopedContext = scopedContexts.get(scope);
21
19
  if (!ScopedContext) {
22
- ScopedContext = createReactContext(defaultValues);
20
+ ScopedContext = React.createContext(defaultValues);
23
21
  scopedContexts.set(scope, ScopedContext);
24
22
  }
25
23
  return ScopedContext;
@@ -27,16 +25,11 @@ const createStyledContext = ((defaultValues, namespaceOrOptions = "") => {
27
25
  const getNamespacedScope = (scope) => namespace ? `${namespace}--${scope}` : scope;
28
26
  const Provider = ({ children, scope: scopeIn, __disableMergeDefaultValues, ...values }) => {
29
27
  const scope = getNamespacedScope(scopeIn);
30
- const next = useReactMemo(() => {
31
- if (__disableMergeDefaultValues) {
32
- return values;
33
- }
28
+ const next = React.useMemo(() => {
29
+ if (__disableMergeDefaultValues) return values;
34
30
  return mergeProps(defaultValues || {}, values);
35
31
  }, [objectIdentityKey(values)]);
36
- let ScopedProvider = OGProvider;
37
- if (scope) {
38
- ScopedProvider = getOrCreateScopedContext(scope).Provider;
39
- }
32
+ const ScopedProvider = scope ? getOrCreateScopedContext(scope).Provider : OGProvider;
40
33
  return /* @__PURE__ */ jsx(LastScopeInNamespace.Provider, {
41
34
  value: scope,
42
35
  children: /* @__PURE__ */ jsx(ScopedProvider, {
@@ -46,11 +39,10 @@ const createStyledContext = ((defaultValues, namespaceOrOptions = "") => {
46
39
  });
47
40
  };
48
41
  const useStyledContext = (scopeIn = "") => {
49
- const lastScopeInNamespace = useReactContext(LastScopeInNamespace);
42
+ const lastScopeInNamespace = React.useContext(LastScopeInNamespace);
50
43
  const scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;
51
44
  const context = scope ? getOrCreateScopedContext(scope) : OGContext;
52
- const value = useReactContext(context);
53
- return value;
45
+ return React.useContext(context);
54
46
  };
55
47
  Context.Provider = Provider;
56
48
  Context.props = defaultValues;
@@ -1 +1 @@
1
- {"version":3,"file":"createStyledContext.js","names":[],"sources":["esm/helpers/createStyledContext.js"],"sourcesContent":["import React from \"react\";\nimport { isPlainObject } from \"./isObj\";\nimport { mergeProps } from \"./mergeProps\";\nimport { objectIdentityKey } from \"./objectIdentityKey\";\nimport { jsx } from \"react/jsx-runtime\";\nconst createStyledContext = ((defaultValues, namespaceOrOptions = \"\") => {\n \"use no memo\";\n const createReactContext = React[Math.random() ? \"createContext\" : \"createContext\"];\n const useReactMemo = React[Math.random() ? \"useMemo\" : \"useMemo\"];\n const useReactContext = React[Math.random() ? \"useContext\" : \"useContext\"];\n const namespace = typeof namespaceOrOptions === \"string\" ? namespaceOrOptions : namespaceOrOptions.namespace || \"\";\n const propKeys = typeof namespaceOrOptions === \"string\" ? isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0 : namespaceOrOptions.keys || (isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0);\n const OGContext = createReactContext(defaultValues);\n const OGProvider = OGContext.Provider;\n const Context = OGContext;\n const scopedContexts = /* @__PURE__ */ new Map();\n const LastScopeInNamespace = createReactContext(namespace);\n function getOrCreateScopedContext(scope) {\n let ScopedContext = scopedContexts.get(scope);\n if (!ScopedContext) {\n ScopedContext = createReactContext(defaultValues);\n scopedContexts.set(scope, ScopedContext);\n }\n return ScopedContext;\n }\n const getNamespacedScope = (scope) => namespace ? `${namespace}--${scope}` : scope;\n const Provider = ({\n children,\n scope: scopeIn,\n // performance: avoid creating objects\n __disableMergeDefaultValues,\n ...values\n }) => {\n const scope = getNamespacedScope(scopeIn);\n const next = useReactMemo(() => {\n if (__disableMergeDefaultValues) {\n return values;\n }\n return mergeProps(defaultValues || {}, values);\n }, [objectIdentityKey(values)]);\n let ScopedProvider = OGProvider;\n if (scope) {\n ScopedProvider = getOrCreateScopedContext(scope).Provider;\n }\n return /* @__PURE__ */ jsx(LastScopeInNamespace.Provider, { value: scope, children: /* @__PURE__ */ jsx(ScopedProvider, { value: next, children }) });\n };\n const useStyledContext = (scopeIn = \"\") => {\n const lastScopeInNamespace = useReactContext(LastScopeInNamespace);\n const scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;\n const context = scope ? getOrCreateScopedContext(scope) : OGContext;\n const value = useReactContext(context);\n return value;\n };\n Context.Provider = Provider;\n Context.props = defaultValues;\n Context.propKeys = propKeys;\n Context.context = OGContext;\n Context.useStyledContext = useStyledContext;\n return Context;\n});\nexport {\n createStyledContext\n};\n//# sourceMappingURL=createStyledContext.js.map\n"],"mappings":";;;;;;;AAKA,MAAM,wBAAwB,eAAe,qBAAqB,OAAO;CACvE;CACA,MAAM,qBAAqB,MAAM,KAAK,OAAO,IAAI,kBAAkB;CACnE,MAAM,eAAe,MAAM,KAAK,OAAO,IAAI,YAAY;CACvD,MAAM,kBAAkB,MAAM,KAAK,OAAO,IAAI,eAAe;CAC7D,MAAM,YAAY,OAAO,uBAAuB,WAAW,qBAAqB,mBAAmB,aAAa;CAChH,MAAM,WAAW,OAAO,uBAAuB,WAAW,cAAc,aAAa,IAAI,OAAO,KAAK,aAAa,IAAI,KAAK,IAAI,mBAAmB,SAAS,cAAc,aAAa,IAAI,OAAO,KAAK,aAAa,IAAI,KAAK;CAC5N,MAAM,YAAY,mBAAmB,aAAa;CAClD,MAAM,aAAa,UAAU;CAC7B,MAAM,UAAU;CAChB,MAAM,iCAAiC,IAAI,IAAI;CAC/C,MAAM,uBAAuB,mBAAmB,SAAS;CACzD,SAAS,yBAAyB,OAAO;EACvC,IAAI,gBAAgB,eAAe,IAAI,KAAK;EAC5C,IAAI,CAAC,eAAe;GAClB,gBAAgB,mBAAmB,aAAa;GAChD,eAAe,IAAI,OAAO,aAAa;EACzC;EACA,OAAO;CACT;CACA,MAAM,sBAAsB,UAAU,YAAY,GAAG,UAAU,IAAI,UAAU;CAC7E,MAAM,YAAY,EAChB,UACA,OAAO,SAEP,6BACA,GAAG,aACC;EACJ,MAAM,QAAQ,mBAAmB,OAAO;EACxC,MAAM,OAAO,mBAAmB;GAC9B,IAAI,6BAA6B;IAC/B,OAAO;GACT;GACA,OAAO,WAAW,iBAAiB,CAAC,GAAG,MAAM;EAC/C,GAAG,CAAC,kBAAkB,MAAM,CAAC,CAAC;EAC9B,IAAI,iBAAiB;EACrB,IAAI,OAAO;GACT,iBAAiB,yBAAyB,KAAK,CAAC,CAAC;EACnD;EACA,OAAuB,oBAAI,qBAAqB,UAAU;GAAE,OAAO;GAAO,UAA0B,oBAAI,gBAAgB;IAAE,OAAO;IAAM;GAAS,CAAC;EAAE,CAAC;CACtJ;CACA,MAAM,oBAAoB,UAAU,OAAO;EACzC,MAAM,uBAAuB,gBAAgB,oBAAoB;EACjE,MAAM,QAAQ,YAAY,UAAU,mBAAmB,OAAO,IAAI,uBAAuB;EACzF,MAAM,UAAU,QAAQ,yBAAyB,KAAK,IAAI;EAC1D,MAAM,QAAQ,gBAAgB,OAAO;EACrC,OAAO;CACT;CACA,QAAQ,WAAW;CACnB,QAAQ,QAAQ;CAChB,QAAQ,WAAW;CACnB,QAAQ,UAAU;CAClB,QAAQ,mBAAmB;CAC3B,OAAO;AACT"}
1
+ {"version":3,"file":"createStyledContext.js","names":[],"sources":["esm/helpers/createStyledContext.js"],"sourcesContent":["import React from \"react\";\nimport { isPlainObject } from \"./isObj\";\nimport { mergeProps } from \"./mergeProps\";\nimport { objectIdentityKey } from \"./objectIdentityKey\";\nimport { jsx } from \"react/jsx-runtime\";\nconst createStyledContext = ((defaultValues, namespaceOrOptions = \"\") => {\n \"use no memo\";\n const namespace = typeof namespaceOrOptions === \"string\" ? namespaceOrOptions : namespaceOrOptions.namespace || \"\";\n const defaultKeys = isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0;\n const propKeys = typeof namespaceOrOptions === \"object\" && namespaceOrOptions.keys ? namespaceOrOptions.keys : defaultKeys;\n const OGContext = React.createContext(defaultValues);\n const OGProvider = OGContext.Provider;\n const Context = OGContext;\n const scopedContexts = /* @__PURE__ */ new Map();\n const LastScopeInNamespace = React.createContext(namespace);\n function getOrCreateScopedContext(scope) {\n let ScopedContext = scopedContexts.get(scope);\n if (!ScopedContext) {\n ScopedContext = React.createContext(defaultValues);\n scopedContexts.set(scope, ScopedContext);\n }\n return ScopedContext;\n }\n const getNamespacedScope = (scope) => namespace ? `${namespace}--${scope}` : scope;\n const Provider = ({\n children,\n scope: scopeIn,\n __disableMergeDefaultValues,\n ...values\n }) => {\n const scope = getNamespacedScope(scopeIn);\n const next = React.useMemo(() => {\n if (__disableMergeDefaultValues) return values;\n return mergeProps(defaultValues || {}, values);\n }, [objectIdentityKey(values)]);\n const ScopedProvider = scope ? getOrCreateScopedContext(scope).Provider : OGProvider;\n return /* @__PURE__ */ jsx(LastScopeInNamespace.Provider, { value: scope, children: /* @__PURE__ */ jsx(ScopedProvider, { value: next, children }) });\n };\n const useStyledContext = (scopeIn = \"\") => {\n const lastScopeInNamespace = React.useContext(LastScopeInNamespace);\n const scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;\n const context = scope ? getOrCreateScopedContext(scope) : OGContext;\n return React.useContext(context);\n };\n Context.Provider = Provider;\n Context.props = defaultValues;\n Context.propKeys = propKeys;\n Context.context = OGContext;\n Context.useStyledContext = useStyledContext;\n return Context;\n});\nexport {\n createStyledContext\n};\n//# sourceMappingURL=createStyledContext.js.map\n"],"mappings":";;;;;;;AAKA,MAAM,wBAAwB,eAAe,qBAAqB,OAAO;CACvE;CACA,MAAM,YAAY,OAAO,uBAAuB,WAAW,qBAAqB,mBAAmB,aAAa;CAChH,MAAM,cAAc,cAAc,aAAa,IAAI,OAAO,KAAK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@@ -4,23 +4,25 @@ import { isPlainObject } from "./isObj.native.js";
4
4
  import { mergeProps } from "./mergeProps.native.js";
5
5
  import { objectIdentityKey } from "./objectIdentityKey.native.js";
6
6
 
7
+ function _type_of(obj) {
8
+ "@swc/helpers - typeof";
9
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
10
+ }
7
11
  var createStyledContext = function(defaultValues) {
8
12
  "use no memo";
9
13
  var namespaceOrOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
10
- var createReactContext = React[Math.random() ? "createContext" : "createContext"];
11
- var useReactMemo = React[Math.random() ? "useMemo" : "useMemo"];
12
- var useReactContext = React[Math.random() ? "useContext" : "useContext"];
13
14
  var namespace = typeof namespaceOrOptions === "string" ? namespaceOrOptions : namespaceOrOptions.namespace || "";
14
- var propKeys = typeof namespaceOrOptions === "string" ? isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0 : namespaceOrOptions.keys || (isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0);
15
- var OGContext = createReactContext(defaultValues);
15
+ var defaultKeys = isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0;
16
+ var propKeys = (typeof namespaceOrOptions === "undefined" ? "undefined" : _type_of(namespaceOrOptions)) === "object" && namespaceOrOptions.keys ? namespaceOrOptions.keys : defaultKeys;
17
+ var OGContext = /* @__PURE__ */ React.createContext(defaultValues);
16
18
  var OGProvider = OGContext.Provider;
17
19
  var Context = OGContext;
18
20
  var scopedContexts = /* @__PURE__ */ new Map();
19
- var LastScopeInNamespace = createReactContext(namespace);
21
+ var LastScopeInNamespace = /* @__PURE__ */ React.createContext(namespace);
20
22
  function getOrCreateScopedContext(scope) {
21
23
  var ScopedContext = scopedContexts.get(scope);
22
24
  if (!ScopedContext) {
23
- ScopedContext = createReactContext(defaultValues);
25
+ ScopedContext = /* @__PURE__ */ React.createContext(defaultValues);
24
26
  scopedContexts.set(scope, ScopedContext);
25
27
  }
26
28
  return ScopedContext;
@@ -31,16 +33,11 @@ var createStyledContext = function(defaultValues) {
31
33
  var Provider = function(param) {
32
34
  var { children, scope: scopeIn, __disableMergeDefaultValues, ...values } = param;
33
35
  var scope = getNamespacedScope(scopeIn);
34
- var next = useReactMemo(function() {
35
- if (__disableMergeDefaultValues) {
36
- return values;
37
- }
36
+ var next = React.useMemo(function() {
37
+ if (__disableMergeDefaultValues) return values;
38
38
  return mergeProps(defaultValues || {}, values);
39
39
  }, [objectIdentityKey(values)]);
40
- var ScopedProvider = OGProvider;
41
- if (scope) {
42
- ScopedProvider = getOrCreateScopedContext(scope).Provider;
43
- }
40
+ var ScopedProvider = scope ? getOrCreateScopedContext(scope).Provider : OGProvider;
44
41
  return /* @__PURE__ */ jsx(LastScopeInNamespace.Provider, {
45
42
  value: scope,
46
43
  children: /* @__PURE__ */ jsx(ScopedProvider, {
@@ -51,11 +48,10 @@ var createStyledContext = function(defaultValues) {
51
48
  };
52
49
  var useStyledContext = function() {
53
50
  var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
54
- var lastScopeInNamespace = useReactContext(LastScopeInNamespace);
51
+ var lastScopeInNamespace = React.useContext(LastScopeInNamespace);
55
52
  var scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;
56
53
  var context = scope ? getOrCreateScopedContext(scope) : OGContext;
57
- var value = useReactContext(context);
58
- return value;
54
+ return React.useContext(context);
59
55
  };
60
56
  Context.Provider = Provider;
61
57
  Context.props = defaultValues;
@@ -1 +1 @@
1
- {"version":3,"file":"createStyledContext.native.js","names":[],"sources":["esm/helpers/createStyledContext.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from \"react\";\nimport { isPlainObject } from \"./isObj\";\nimport { mergeProps } from \"./mergeProps\";\nimport { objectIdentityKey } from \"./objectIdentityKey\";\nvar createStyledContext = function(defaultValues) {\n \"use no memo\";\n var namespaceOrOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n var createReactContext = React[Math.random() ? \"createContext\" : \"createContext\"];\n var useReactMemo = React[Math.random() ? \"useMemo\" : \"useMemo\"];\n var useReactContext = React[Math.random() ? \"useContext\" : \"useContext\"];\n var namespace = typeof namespaceOrOptions === \"string\" ? namespaceOrOptions : namespaceOrOptions.namespace || \"\";\n var propKeys = typeof namespaceOrOptions === \"string\" ? isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0 : namespaceOrOptions.keys || (isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0);\n var OGContext = createReactContext(defaultValues);\n var OGProvider = OGContext.Provider;\n var Context = OGContext;\n var scopedContexts = /* @__PURE__ */ new Map();\n var LastScopeInNamespace = createReactContext(namespace);\n function getOrCreateScopedContext(scope) {\n var ScopedContext = scopedContexts.get(scope);\n if (!ScopedContext) {\n ScopedContext = createReactContext(defaultValues);\n scopedContexts.set(scope, ScopedContext);\n }\n return ScopedContext;\n }\n var getNamespacedScope = function(scope) {\n return namespace ? `${namespace}--${scope}` : scope;\n };\n var Provider = function(param) {\n var {\n children,\n scope: scopeIn,\n // performance: avoid creating objects\n __disableMergeDefaultValues,\n ...values\n } = param;\n var scope = getNamespacedScope(scopeIn);\n var next = useReactMemo(function() {\n if (__disableMergeDefaultValues) {\n return values;\n }\n return mergeProps(defaultValues || {}, values);\n }, [\n objectIdentityKey(values)\n ]);\n var ScopedProvider = OGProvider;\n if (scope) {\n ScopedProvider = getOrCreateScopedContext(scope).Provider;\n }\n return /* @__PURE__ */ _jsx(LastScopeInNamespace.Provider, {\n value: scope,\n children: /* @__PURE__ */ _jsx(ScopedProvider, {\n value: next,\n children\n })\n });\n };\n var useStyledContext = function() {\n var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"\";\n var lastScopeInNamespace = useReactContext(LastScopeInNamespace);\n var scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;\n var context = scope ? getOrCreateScopedContext(scope) : OGContext;\n var value = useReactContext(context);\n return value;\n };\n Context.Provider = Provider;\n Context.props = defaultValues;\n Context.propKeys = propKeys;\n Context.context = OGContext;\n Context.useStyledContext = useStyledContext;\n return Context;\n};\nexport {\n createStyledContext\n};\n//# sourceMappingURL=createStyledContext.js.map\n"],"mappings":";;;;;;;AAKA,IAAI,sBAAsB,SAAS,eAAe;CAChD;CACA,IAAI,qBAAqB,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAC1F,IAAI,qBAAqB,MAAM,KAAK,OAAO,IAAI,kBAAkB;CACjE,IAAI,eAAe,MAAM,KAAK,OAAO,IAAI,YAAY;CACrD,IAAI,kBAAkB,MAAM,KAAK,OAAO,IAAI,eAAe;CAC3D,IAAI,YAAY,OAAO,uBAAuB,WAAW,qBAAqB,mBAAmB,aAAa;CAC9G,IAAI,WAAW,OAAO,uBAAuB,WAAW,cAAc,aAAa,IAAI,OAAO,KAAK,aAAa,IAAI,KAAK,IAAI,mBAAmB,SAAS,cAAc,aAAa,IAAI,OAAO,KAAK,aAAa,IAAI,KAAK;CAC1N,IAAI,YAAY,mBAAmB,aAAa;CAChD,IAAI,aAAa,UAAU;CAC3B,IAAI,UAAU;CACd,IAAI,iCAAiC,IAAI,IAAI;CAC7C,IAAI,uBAAuB,mBAAmB,SAAS;CACvD,SAAS,yBAAyB,OAAO;EACvC,IAAI,gBAAgB,eAAe,IAAI,KAAK;EAC5C,IAAI,CAAC,eAAe;GAClB,gBAAgB,mBAAmB,aAAa;GAChD,eAAe,IAAI,OAAO,aAAa;EACzC;EACA,OAAO;CACT;CACA,IAAI,qBAAqB,SAAS,OAAO;EACvC,OAAO,YAAY,GAAG,UAAU,IAAI,UAAU;CAChD;CACA,IAAI,WAAW,SAAS,OAAO;EAC7B,IAAI,EACF,UACA,OAAO,SAEP,6BACA,GAAG,WACD;EACJ,IAAI,QAAQ,mBAAmB,OAAO;EACtC,IAAI,OAAO,aAAa,WAAW;GACjC,IAAI,6BAA6B;IAC/B,OAAO;GACT;GACA,OAAO,WAAW,iBAAiB,CAAC,GAAG,MAAM;EAC/C,GAAG,CACD,kBAAkB,MAAM,CAC1B,CAAC;EACD,IAAI,iBAAiB;EACrB,IAAI,OAAO;GACT,iBAAiB,yBAAyB,KAAK,CAAC,CAAC;EACnD;EACA,OAAuB,oBAAK,qBAAqB,UAAU;GACzD,OAAO;GACP,UAA0B,oBAAK,gBAAgB;IAC7C,OAAO;IACP;GACF,CAAC;EACH,CAAC;CACH;CACA,IAAI,mBAAmB,WAAW;EAChC,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;EAC/E,IAAI,uBAAuB,gBAAgB,oBAAoB;EAC/D,IAAI,QAAQ,YAAY,UAAU,mBAAmB,OAAO,IAAI,uBAAuB;EACvF,IAAI,UAAU,QAAQ,yBAAyB,KAAK,IAAI;EACxD,IAAI,QAAQ,gBAAgB,OAAO;EACnC,OAAO;CACT;CACA,QAAQ,WAAW;CACnB,QAAQ,QAAQ;CAChB,QAAQ,WAAW;CACnB,QAAQ,UAAU;CAClB,QAAQ,mBAAmB;CAC3B,OAAO;AACT"}
1
+ {"version":3,"file":"createStyledContext.native.js","names":[],"sources":["esm/helpers/createStyledContext.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from \"react\";\nimport { isPlainObject } from \"./isObj\";\nimport { mergeProps } from \"./mergeProps\";\nimport { objectIdentityKey } from \"./objectIdentityKey\";\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar createStyledContext = function(defaultValues) {\n \"use no memo\";\n var namespaceOrOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n var namespace = typeof namespaceOrOptions === \"string\" ? namespaceOrOptions : namespaceOrOptions.namespace || \"\";\n var defaultKeys = isPlainObject(defaultValues) ? Object.keys(defaultValues) : void 0;\n var propKeys = (typeof namespaceOrOptions === \"undefined\" ? \"undefined\" : _type_of(namespaceOrOptions)) === \"object\" && namespaceOrOptions.keys ? namespaceOrOptions.keys : defaultKeys;\n var OGContext = /* @__PURE__ */ React.createContext(defaultValues);\n var OGProvider = OGContext.Provider;\n var Context = OGContext;\n var scopedContexts = /* @__PURE__ */ new Map();\n var LastScopeInNamespace = /* @__PURE__ */ React.createContext(namespace);\n function getOrCreateScopedContext(scope) {\n var ScopedContext = scopedContexts.get(scope);\n if (!ScopedContext) {\n ScopedContext = /* @__PURE__ */ React.createContext(defaultValues);\n scopedContexts.set(scope, ScopedContext);\n }\n return ScopedContext;\n }\n var getNamespacedScope = function(scope) {\n return namespace ? `${namespace}--${scope}` : scope;\n };\n var Provider = function(param) {\n var { children, scope: scopeIn, __disableMergeDefaultValues, ...values } = param;\n var scope = getNamespacedScope(scopeIn);\n var next = React.useMemo(function() {\n if (__disableMergeDefaultValues) return values;\n return mergeProps(defaultValues || {}, values);\n }, [\n objectIdentityKey(values)\n ]);\n var ScopedProvider = scope ? getOrCreateScopedContext(scope).Provider : OGProvider;\n return /* @__PURE__ */ _jsx(LastScopeInNamespace.Provider, {\n value: scope,\n children: /* @__PURE__ */ _jsx(ScopedProvider, {\n value: next,\n children\n })\n });\n };\n var useStyledContext = function() {\n var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"\";\n var lastScopeInNamespace = React.useContext(LastScopeInNamespace);\n var scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;\n var context = scope ? getOrCreateScopedContext(scope) : OGContext;\n return React.useContext(context);\n };\n Context.Provider = Provider;\n Context.props = defaultValues;\n Context.propKeys = propKeys;\n Context.context = OGContext;\n Context.useStyledContext = useStyledContext;\n return Context;\n};\nexport {\n createStyledContext\n};\n//# sourceMappingURL=createStyledContext.js.map\n"],"mappings":";;;;;;;AAKA,SAAS,SAAS,KAAK;CACrB;CACA,OAAO,OAAO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ACP;GACF,CAAC;EACH,CAAC;CACH;CACA,IAAI,mBAAmB,WAAW;EAChC,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;EAC/E,IAAI,uBAAuB,MAAM,WAAW,oBAAoB;EAChE,IAAI,QAAQ,YAAY,UAAU,mBAAmB,OAAO,IAAI,uBAAuB;EACvF,IAAI,UAAU,QAAQ,yBAAyB,KAAK,IAAI;EACxD,OAAO,MAAM,WAAW,OAAO;CACjC;CACA,QAAQ,WAAW;CACnB,QAAQ,QAAQ;CAChB,QAAQ,WAAW;CACnB,QAAQ,UAAU;CAClB,QAAQ,mBAAmB;CAC3B,OAAO;AACT"}
@@ -20,10 +20,8 @@ function formatDiagnosticValue(value, depth = 0, seen = /* @__PURE__ */ new Weak
20
20
  }
21
21
  const keys = [];
22
22
  for (const key in value) {
23
- if (Object.prototype.hasOwnProperty.call(value, key)) {
24
- keys.push(key);
25
- if (keys.length === 6) break;
26
- }
23
+ keys.push(key);
24
+ if (keys.length === 6) break;
27
25
  }
28
26
  const hasMore = keys.length === 6;
29
27
  if (hasMore) keys.pop();
@@ -38,13 +36,13 @@ function formatDiagnosticValue(value, depth = 0, seen = /* @__PURE__ */ new Weak
38
36
  return `{ ${items.join(", ")} }`;
39
37
  }
40
38
  function formatDiagnostic(code, component, message, action, prop, received) {
41
- if (process.env.NODE_ENV === "production") {
42
- return `${code}: ${message}`;
39
+ if (process.env.NODE_ENV === "development") {
40
+ const formattedValue = prop ? formatDiagnosticValue(received) : "";
41
+ const boundedValue = formattedValue.length > maxDiagnosticValueLength ? `${formattedValue.slice(0, maxDiagnosticValueLength - 1)}\u2026` : formattedValue;
42
+ const value = prop ? ` Received ${prop}=${boundedValue}.` : "";
43
+ return `${code} ${component}: ${message}.${value} ${action}`;
43
44
  }
44
- const formattedValue = prop ? formatDiagnosticValue(received) : "";
45
- const boundedValue = formattedValue.length > maxDiagnosticValueLength ? `${formattedValue.slice(0, maxDiagnosticValueLength - 1)}\u2026` : formattedValue;
46
- const value = prop ? ` Received ${prop}=${boundedValue}.` : "";
47
- return `${code} ${component}: ${message}.${value} ${action}`;
45
+ return `${code}: ${message}`;
48
46
  }
49
47
 
50
48
  export { formatDiagnostic };
@@ -1 +1 @@
1
- {"version":3,"file":"formatDiagnostic.js","names":[],"sources":["esm/helpers/formatDiagnostic.js"],"sourcesContent":["const maxDiagnosticValueLength = 160;\nfunction formatDiagnosticValue(value, depth = 0, seen = /* @__PURE__ */ new WeakSet()) {\n if (typeof value === \"string\") {\n const output = value.length > maxDiagnosticValueLength ? `${value.slice(0, maxDiagnosticValueLength - 1)}\\u2026` : value;\n return JSON.stringify(output);\n }\n if (value == null || typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (typeof value === \"bigint\") return `${value}n`;\n if (typeof value === \"function\") return `[Function ${value.name || \"anonymous\"}]`;\n if (typeof value !== \"object\") return String(value);\n if (seen.has(value)) return \"[Circular]\";\n if (depth === 2) return Array.isArray(value) ? \"[Array]\" : \"[Object]\";\n seen.add(value);\n if (Array.isArray(value)) {\n const items2 = value.slice(0, 5).map((item) => formatDiagnosticValue(item, depth + 1, seen));\n if (value.length > 5) items2.push(`\\u2026 ${value.length - 5} more`);\n return `[${items2.join(\", \")}]`;\n }\n const keys = [];\n for (const key in value) {\n if (Object.prototype.hasOwnProperty.call(value, key)) {\n keys.push(key);\n if (keys.length === 6) break;\n }\n }\n const hasMore = keys.length === 6;\n if (hasMore) keys.pop();\n const items = keys.map((key) => {\n try {\n return `${key}: ${formatDiagnosticValue(value[key], depth + 1, seen)}`;\n } catch {\n return `${key}: [Unavailable]`;\n }\n });\n if (hasMore) items.push(\"\\u2026 more\");\n return `{ ${items.join(\", \")} }`;\n}\nfunction formatDiagnostic(code, component, message, action, prop, received) {\n if (process.env.NODE_ENV === \"production\") {\n return `${code}: ${message}`;\n }\n const formattedValue = prop ? formatDiagnosticValue(received) : \"\";\n const boundedValue = formattedValue.length > maxDiagnosticValueLength ? `${formattedValue.slice(0, maxDiagnosticValueLength - 1)}\\u2026` : formattedValue;\n const value = prop ? ` Received ${prop}=${boundedValue}.` : \"\";\n return `${code} ${component}: ${message}.${value} ${action}`;\n}\nexport {\n formatDiagnostic\n};\n//# sourceMappingURL=formatDiagnostic.js.map\n"],"mappings":";AAAA,MAAM,2BAA2B;AACjC,SAAS,sBAAsB,OAAO,QAAQ,GAAG,uBAAuB,IAAI,QAAQ,GAAG;CACrF,IAAI,OAAO,UAAU,UAAU;EAC7B,MAAM,SAAS,MAAM,SAAS,2BAA2B,GAAG,MAAM,MAAM,GAAG,2BAA2B,CAAC,EAAE,UAAU;EACnH,OAAO,KAAK,UAAU,MAAM;CAC9B;CACA,IAAI,SAAS,QAAQ,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW;EAC5E,OAAO,OAAO,KAAK;CACrB;CACA,IAAI,OAAO,UAAU,UAAU,OAAO,GAAG,MAAM;CAC/C,IAAI,OAAO,UAAU,YAAY,OAAO,aAAa,MAAM,QAAQ,YAAY;CAC/E,IAAI,OAAO,UAAU,UAAU,OAAO,OAAO,KAAK;CAClD,IAAI,KAAK,IAAI,KAAK,GAAG,OAAO;CAC5B,IAAI,UAAU,GAAG,OAAO,MAAM,QAAQ,KAAK,IAAI,YAAY;CAC3D,KAAK,IAAI,KAAK;CACd,IAAI,MAAM,QAAQ,KAAK,GAAG;EACxB,MAAM,SAAS,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,sBAAsB,MAAM,QAAQ,GAAG,IAAI,CAAC;EAC3F,IAAI,MAAM,SAAS,GAAG,OAAO,KAAK,UAAU,MAAM,SAAS,EAAE,MAAM;EACnE,OAAO,IAAI,OAAO,KAAK,IAAI,EAAE;CAC/B;CACA,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,OAAO,OAAO;EACvB,IAAI,OAAO,UAAU,eAAe,KAAK,OAAO,GAAG,GAAG;GACpD,KAAK,KAAK,GAAG;GACb,IAAI,KAAK,WAAW,GAAG;EACzB;CACF;CACA,MAAM,UAAU,KAAK,WAAW;CAChC,IAAI,SAAS,KAAK,IAAI;CACtB,MAAM,QAAQ,KAAK,KAAK,QAAQ;EAC9B,IAAI;GACF,OAAO,GAAG,IAAI,IAAI,sBAAsB,MAAM,MAAM,QAAQ,GAAG,IAAI;EACrE,QAAQ;GACN,OAAO,GAAG,IAAI;EAChB;CACF,CAAC;CACD,IAAI,SAAS,MAAM,KAAK,QAAa;CACrC,OAAO,KAAK,MAAM,KAAK,IAAI,EAAE;AAC/B;AACA,SAAS,iBAAiB,MAAM,WAAW,SAAS,QAAQ,MAAM,UAAU;CAC1E,IAAI,QAAQ,IAAI,aAAa,cAAc;EACzC,OAAO,GAAG,KAAK,IAAI;CACrB;CACA,MAAM,iBAAiB,OAAO,sBAAsB,QAAQ,IAAI;CAChE,MAAM,eAAe,eAAe,SAAS,2BAA2B,GAAG,eAAe,MAAM,GAAG,2BAA2B,CAAC,EAAE,UAAU;CAC3I,MAAM,QAAQ,OAAO,aAAa,KAAK,GAAG,aAAa,KAAK;CAC5D,OAAO,GAAG,KAAK,GAAG,UAAU,IAAI,QAAQ,GAAG,MAAM,GAAG;AACtD"}
1
+ {"version":3,"file":"formatDiagnostic.js","names":[],"sources":["esm/helpers/formatDiagnostic.js"],"sourcesContent":["const maxDiagnosticValueLength = 160;\nfunction formatDiagnosticValue(value, depth = 0, seen = /* @__PURE__ */ new WeakSet()) {\n if (typeof value === \"string\") {\n const output = value.length > maxDiagnosticValueLength ? `${value.slice(0, maxDiagnosticValueLength - 1)}\\u2026` : value;\n return JSON.stringify(output);\n }\n if (value == null || typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n if (typeof value === \"bigint\") return `${value}n`;\n if (typeof value === \"function\") return `[Function ${value.name || \"anonymous\"}]`;\n if (typeof value !== \"object\") return String(value);\n if (seen.has(value)) return \"[Circular]\";\n if (depth === 2) return Array.isArray(value) ? \"[Array]\" : \"[Object]\";\n seen.add(value);\n if (Array.isArray(value)) {\n const items2 = value.slice(0, 5).map((item) => formatDiagnosticValue(item, depth + 1, seen));\n if (value.length > 5) items2.push(`\\u2026 ${value.length - 5} more`);\n return `[${items2.join(\", \")}]`;\n }\n const keys = [];\n for (const key in value) {\n keys.push(key);\n if (keys.length === 6) break;\n }\n const hasMore = keys.length === 6;\n if (hasMore) keys.pop();\n const items = keys.map((key) => {\n try {\n return `${key}: ${formatDiagnosticValue(value[key], depth + 1, seen)}`;\n } catch {\n return `${key}: [Unavailable]`;\n }\n });\n if (hasMore) items.push(\"\\u2026 more\");\n return `{ ${items.join(\", \")} }`;\n}\nfunction formatDiagnostic(code, component, message, action, prop, received) {\n if (process.env.NODE_ENV === \"development\") {\n const formattedValue = prop ? formatDiagnosticValue(received) : \"\";\n const boundedValue = formattedValue.length > maxDiagnosticValueLength ? `${formattedValue.slice(0, maxDiagnosticValueLength - 1)}\\u2026` : formattedValue;\n const value = prop ? ` Received ${prop}=${boundedValue}.` : \"\";\n return `${code} ${component}: ${message}.${value} ${action}`;\n }\n return `${code}: ${message}`;\n}\nexport {\n formatDiagnostic\n};\n//# sourceMappingURL=formatDiagnostic.js.map\n"],"mappings":";AAAA,MAAM,2BAA2B;AACjC,SAAS,sBAAsB,OAAO,QAAQ,GAAG,uBAAuB,IAAI,QAAQ,GAAG;CACrF,IAAI,OAAO,UAAU,UAAU;EAC7B,MAAM,SAAS,MAAM,SAAS,2BAA2B,GAAG,MAAM,MAAM,GAAG,2BAA2B,CAAC,EAAE,UAAU;EACnH,OAAO,KAAK,UAAU,MAAM;CAC9B;CACA,IAAI,SAAS,QAAQ,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW;EAC5E,OAAO,OAAO,KAAK;CACrB;CACA,IAAI,OAAO,UAAU,UAAU,OAAO,GAAG,MAAM;CAC/C,IAAI,OAAO,UAAU,YAAY,OAAO,aAAa,MAAM,QAAQ,YAAY;CAC/E,IAAI,OAAO,UAAU,UAAU,OAAO,OAAO,KAAK;CAClD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8 @@ function formatDiagnosticValue(value) {
27
27
  }
28
28
  var keys = [];
29
29
  for (var key in value) {
30
- if (Object.prototype.hasOwnProperty.call(value, key)) {
31
- keys.push(key);
32
- if (keys.length === 6) break;
33
- }
30
+ keys.push(key);
31
+ if (keys.length === 6) break;
34
32
  }
35
33
  var hasMore = keys.length === 6;
36
34
  if (hasMore) keys.pop();
@@ -45,13 +43,13 @@ function formatDiagnosticValue(value) {
45
43
  return `{ ${items1.join(", ")} }`;
46
44
  }
47
45
  function formatDiagnostic(code, component, message, action, prop, received) {
48
- if (process.env.NODE_ENV === "production") {
49
- return `${code}: ${message}`;
46
+ if (process.env.NODE_ENV === "development") {
47
+ var formattedValue = prop ? formatDiagnosticValue(received) : "";
48
+ var boundedValue = formattedValue.length > maxDiagnosticValueLength ? `${formattedValue.slice(0, maxDiagnosticValueLength - 1)}\u2026` : formattedValue;
49
+ var value = prop ? ` Received ${prop}=${boundedValue}.` : "";
50
+ return `${code} ${component}: ${message}.${value} ${action}`;
50
51
  }
51
- var formattedValue = prop ? formatDiagnosticValue(received) : "";
52
- var boundedValue = formattedValue.length > maxDiagnosticValueLength ? `${formattedValue.slice(0, maxDiagnosticValueLength - 1)}\u2026` : formattedValue;
53
- var value = prop ? ` Received ${prop}=${boundedValue}.` : "";
54
- return `${code} ${component}: ${message}.${value} ${action}`;
52
+ return `${code}: ${message}`;
55
53
  }
56
54
 
57
55
  export { formatDiagnostic };
@@ -1 +1 @@
1
- {"version":3,"file":"formatDiagnostic.native.js","names":[],"sources":["esm/helpers/formatDiagnostic.native.js"],"sourcesContent":["function _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar maxDiagnosticValueLength = 160;\nfunction formatDiagnosticValue(value) {\n var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, seen = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : /* @__PURE__ */ new WeakSet();\n if (typeof value === \"string\") {\n var output = value.length > maxDiagnosticValueLength ? `${value.slice(0, maxDiagnosticValueLength - 1)}\\u2026` : value;\n return JSON.stringify(output);\n }\n if (value == null || typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n if ((typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === \"bigint\") return `${value}n`;\n if (typeof value === \"function\") return `[Function ${value.name || \"anonymous\"}]`;\n if ((typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) !== \"object\") return String(value);\n if (seen.has(value)) return \"[Circular]\";\n if (depth === 2) return Array.isArray(value) ? \"[Array]\" : \"[Object]\";\n seen.add(value);\n if (Array.isArray(value)) {\n var items = value.slice(0, 5).map(function(item) {\n return formatDiagnosticValue(item, depth + 1, seen);\n });\n if (value.length > 5) items.push(`\\u2026 ${value.length - 5} more`);\n return `[${items.join(\", \")}]`;\n }\n var keys = [];\n for (var key in value) {\n if (Object.prototype.hasOwnProperty.call(value, key)) {\n keys.push(key);\n if (keys.length === 6) break;\n }\n }\n var hasMore = keys.length === 6;\n if (hasMore) keys.pop();\n var items1 = keys.map(function(key2) {\n try {\n return `${key2}: ${formatDiagnosticValue(value[key2], depth + 1, seen)}`;\n } catch (e) {\n return `${key2}: [Unavailable]`;\n }\n });\n if (hasMore) items1.push(\"\\u2026 more\");\n return `{ ${items1.join(\", \")} }`;\n}\nfunction formatDiagnostic(code, component, message, action, prop, received) {\n if (process.env.NODE_ENV === \"production\") {\n return `${code}: ${message}`;\n }\n var formattedValue = prop ? formatDiagnosticValue(received) : \"\";\n var boundedValue = formattedValue.length > maxDiagnosticValueLength ? `${formattedValue.slice(0, maxDiagnosticValueLength - 1)}\\u2026` : formattedValue;\n var value = prop ? ` Received ${prop}=${boundedValue}.` : \"\";\n return `${code} ${component}: ${message}.${value} ${action}`;\n}\nexport {\n formatDiagnostic\n};\n//# sourceMappingURL=formatDiagnostic.js.map\n"],"mappings":";AAAA,SAAS,SAAS,KAAK;CACrB;CACA,OA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AAe,KAAK,OAAO,GAAG,GAAG;GACpD,KAAK,KAAK,GAAG;GACb,IAAI,KAAK,WAAW,GAAG;EACzB;CACF;CACA,IAAI,UAAU,KAAK,WAAW;CAC9B,IAAI,SAAS,KAAK,IAAI;CACtB,IAAI,SAAS,KAAK,IAAI,SAAS,MAAM;EACnC,IAAI;GACF,OAAO,GAAG,KAAK,IAAI,sBAAsB,MAAM,OAAO,QAAQ,GAAG,IAAI;EACvE,SAAS,GAAG;GACV,OAAO,GAAG,KAAK;EACjB;CACF,CAAC;CACD,IAAI,SAAS,OAAO,KAAK,QAAa;CACtC,OAAO,KAAK,OAAO,KAAK,IAAI,EAAE;AAChC;AACA,SAAS,iBAAiB,MAAM,WAAW,SAAS,QAAQ,MAAM,UAAU;CAC1E,IAAI,QAAQ,IAAI,aAAa,cAAc;EACzC,OAAO,GAAG,KAAK,IAAI;CACrB;CACA,IAAI,iBAAiB,OAAO,sBAAsB,QAAQ,IAAI;CAC9D,IAAI,eAAe,eAAe,SAAS,2BAA2B,GAAG,eAAe,MAAM,GAAG,2BAA2B,CAAC,EAAE,UAAU;CACzI,IAAI,QAAQ,OAAO,aAAa,KAAK,GAAG,aAAa,KAAK;CAC1D,OAAO,GAAG,KAAK,GAAG,UAAU,IAAI,QAAQ,GAAG,MAAM,GAAG;AACtD"}
1
+ {"version":3,"file":"formatDiagnostic.native.js","names":[],"sources":["esm/helpers/formatDiagnostic.native.js"],"sourcesContent":["function _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar maxDiagnosticValueLength = 160;\nfunction formatDiagnosticValue(value) {\n var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, seen = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : /* @__PURE__ */ new WeakSet();\n if (typeof value === \"string\") {\n var output = value.length > maxDiagnosticValueLength ? `${value.slice(0, maxDiagnosticValueLength - 1)}\\u2026` : value;\n return JSON.stringify(output);\n }\n if (value == null || typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n if ((typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === \"bigint\") return `${value}n`;\n if (typeof value === \"function\") return `[Function ${value.name || \"anonymous\"}]`;\n if ((typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) !== \"object\") return String(value);\n if (seen.has(value)) return \"[Circular]\";\n if (depth === 2) return Array.isArray(value) ? \"[Array]\" : \"[Object]\";\n seen.add(value);\n if (Array.isArray(value)) {\n var items = value.slice(0, 5).map(function(item) {\n return formatDiagnosticValue(item, depth + 1, seen);\n });\n if (value.length > 5) items.push(`\\u2026 ${value.length - 5} more`);\n return `[${items.join(\", \")}]`;\n }\n var keys = [];\n for (var key in value) {\n keys.push(key);\n if (keys.length === 6) break;\n }\n var hasMore = keys.length === 6;\n if (hasMore) keys.pop();\n var items1 = keys.map(function(key2) {\n try {\n return `${key2}: ${formatDiagnosticValue(value[key2], depth + 1, seen)}`;\n } catch (e) {\n return `${key2}: [Unavailable]`;\n }\n });\n if (hasMore) items1.push(\"\\u2026 more\");\n return `{ ${items1.join(\", \")} }`;\n}\nfunction formatDiagnostic(code, component, message, action, prop, received) {\n if (process.env.NODE_ENV === \"development\") {\n var formattedValue = prop ? formatDiagnosticValue(received) : \"\";\n var boundedValue = formattedValue.length > maxDiagnosticValueLength ? `${formattedValue.slice(0, maxDiagnosticValueLength - 1)}\\u2026` : formattedValue;\n var value = prop ? ` Received ${prop}=${boundedValue}.` : \"\";\n return `${code} ${component}: ${message}.${value} ${action}`;\n }\n return `${code}: ${message}`;\n}\nexport {\n formatDiagnostic\n};\n//# sourceMappingURL=formatDiagnostic.js.map\n"],"mappings":";AAAA,SAAS,SAAS,KAAK;CACrB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAChG;AACA,IAAI,2BAA2B;AAC/B,SAAS,sBAAsB,OAAO;CACpC,I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