react-native-unistyles 3.0.0-alpha.3 → 3.0.0-alpha.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (536) hide show
  1. package/README.md +7 -0
  2. package/android/CMakeLists.txt +12 -21
  3. package/cxx/common/Constants.h +3 -0
  4. package/cxx/common/Helpers.h +118 -5
  5. package/cxx/core/HostStyle.cpp +12 -8
  6. package/cxx/core/HostStyle.h +4 -0
  7. package/cxx/core/StyleSheet.h +0 -2
  8. package/cxx/core/StyleSheetRegistry.cpp +10 -13
  9. package/cxx/core/StyleSheetRegistry.h +4 -4
  10. package/cxx/core/Unistyle.h +7 -10
  11. package/cxx/core/UnistyleData.h +23 -0
  12. package/cxx/core/UnistyleWrapper.h +61 -12
  13. package/cxx/core/UnistylesCommitHook.cpp +14 -15
  14. package/cxx/core/UnistylesCommitHook.h +6 -11
  15. package/cxx/core/UnistylesCommitShadowNode.h +13 -0
  16. package/cxx/core/UnistylesMountHook.cpp +28 -0
  17. package/cxx/core/UnistylesMountHook.h +25 -0
  18. package/cxx/core/UnistylesRegistry.cpp +104 -89
  19. package/cxx/core/UnistylesRegistry.h +16 -13
  20. package/cxx/core/UnistylesState.cpp +29 -11
  21. package/cxx/core/UnistylesState.h +5 -2
  22. package/cxx/hybridObjects/HybridShadowRegistry.cpp +15 -13
  23. package/cxx/hybridObjects/HybridStyleSheet.cpp +136 -46
  24. package/cxx/hybridObjects/HybridStyleSheet.h +23 -5
  25. package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +51 -8
  26. package/cxx/hybridObjects/HybridUnistylesRuntime.h +12 -1
  27. package/cxx/parser/Parser.cpp +236 -165
  28. package/cxx/parser/Parser.h +11 -14
  29. package/cxx/shadowTree/ShadowLeafUpdate.h +2 -1
  30. package/cxx/shadowTree/ShadowTrafficController.h +60 -0
  31. package/cxx/shadowTree/ShadowTreeManager.cpp +17 -17
  32. package/cxx/shadowTree/ShadowTreeManager.h +3 -2
  33. package/ios/Equatable.swift +2 -1
  34. package/ios/NativePlatform+ios.swift +21 -5
  35. package/ios/NativePlatform+keyboard.swift +83 -0
  36. package/ios/NativePlatformListener+ios.swift +36 -23
  37. package/ios/Unistyles.h +1 -0
  38. package/ios/UnistylesModuleOnLoad.h +13 -2
  39. package/ios/UnistylesModuleOnLoad.mm +9 -1
  40. package/lib/commonjs/core/createUnistylesComponent.js +18 -0
  41. package/lib/commonjs/core/createUnistylesComponent.js.map +1 -0
  42. package/lib/commonjs/core/createUnistylesComponent.native.js +46 -0
  43. package/lib/commonjs/core/createUnistylesComponent.native.js.map +1 -0
  44. package/lib/commonjs/core/index.js +27 -0
  45. package/lib/commonjs/core/index.js.map +1 -0
  46. package/lib/commonjs/core/useBreakpoint.js +22 -0
  47. package/lib/commonjs/core/useBreakpoint.js.map +1 -0
  48. package/lib/commonjs/core/useBreakpoint.native.js +24 -0
  49. package/lib/commonjs/core/useBreakpoint.native.js.map +1 -0
  50. package/lib/commonjs/core/useTheme.js +22 -0
  51. package/lib/commonjs/core/useTheme.js.map +1 -0
  52. package/lib/commonjs/core/useTheme.native.js +24 -0
  53. package/lib/commonjs/core/useTheme.native.js.map +1 -0
  54. package/lib/commonjs/global.js +3 -0
  55. package/lib/commonjs/index.js +23 -11
  56. package/lib/commonjs/index.js.map +1 -1
  57. package/lib/commonjs/mq.js +1 -4
  58. package/lib/commonjs/mq.js.map +2 -1
  59. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js +1 -0
  60. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +2 -1
  61. package/lib/commonjs/specs/NativePlatform/index.js.map +1 -1
  62. package/lib/commonjs/specs/NavigtionBar/index.js +1 -1
  63. package/lib/commonjs/specs/NavigtionBar/index.js.map +1 -1
  64. package/lib/commonjs/specs/ShadowRegistry/index.js +7 -6
  65. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  66. package/lib/commonjs/specs/ShadowRegistry/types.js +3 -0
  67. package/lib/commonjs/specs/StatusBar/index.js +1 -1
  68. package/lib/commonjs/specs/StatusBar/index.js.map +1 -1
  69. package/lib/commonjs/specs/StyleSheet/UnistylesStyleSheet.nitro.js +2 -4
  70. package/lib/commonjs/specs/StyleSheet/UnistylesStyleSheet.nitro.js.map +1 -1
  71. package/lib/commonjs/specs/StyleSheet/index.js +1 -0
  72. package/lib/commonjs/specs/StyleSheet/index.js.map +2 -1
  73. package/lib/commonjs/specs/UnistylesRuntime/index.js +1 -1
  74. package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -1
  75. package/lib/commonjs/specs/index.js +7 -0
  76. package/lib/commonjs/specs/index.js.map +1 -1
  77. package/lib/commonjs/specs/index.web.js +1 -1
  78. package/lib/commonjs/specs/index.web.js.map +2 -1
  79. package/lib/commonjs/specs/types.js +10 -10
  80. package/lib/commonjs/specs/types.js.map +1 -0
  81. package/lib/commonjs/types/accessibility.js +1 -1
  82. package/lib/commonjs/types/accessibility.js.map +1 -0
  83. package/lib/commonjs/types/common.js +3 -0
  84. package/lib/commonjs/types/stylesheet.js.map +1 -1
  85. package/lib/commonjs/types/variants.js.map +1 -1
  86. package/lib/commonjs/web/convert/boxShadow.js +74 -0
  87. package/lib/commonjs/web/convert/boxShadow.js.map +2 -0
  88. package/lib/commonjs/web/convert/index.js +68 -0
  89. package/lib/commonjs/web/convert/index.js.map +2 -0
  90. package/lib/commonjs/web/convert/module.d.js +2 -0
  91. package/lib/commonjs/web/convert/module.d.js.map +1 -0
  92. package/lib/commonjs/web/convert/pseudo.js +10 -0
  93. package/lib/commonjs/web/convert/pseudo.js.map +2 -0
  94. package/lib/commonjs/web/convert/shadow.js +64 -0
  95. package/lib/commonjs/web/convert/shadow.js.map +1 -0
  96. package/lib/commonjs/web/convert/style.js +93 -0
  97. package/lib/commonjs/web/convert/style.js.map +2 -0
  98. package/lib/commonjs/web/convert/textShadow.js +73 -0
  99. package/lib/commonjs/web/convert/textShadow.js.map +1 -0
  100. package/lib/commonjs/web/convert/transform.js +72 -0
  101. package/lib/commonjs/web/convert/transform.js.map +2 -0
  102. package/lib/commonjs/web/convert/types.js +9 -0
  103. package/lib/commonjs/web/convert/types.js.map +1 -0
  104. package/lib/commonjs/web/convert/utils.js +54 -0
  105. package/lib/commonjs/web/convert/utils.js.map +2 -0
  106. package/lib/commonjs/web/create.js +48 -0
  107. package/lib/commonjs/web/create.js.map +1 -0
  108. package/lib/commonjs/web/index.js +60 -0
  109. package/lib/commonjs/web/index.js.map +1 -0
  110. package/lib/commonjs/web/listener.js +35 -0
  111. package/lib/commonjs/web/listener.js.map +1 -0
  112. package/lib/commonjs/web/mock.js +28 -0
  113. package/lib/commonjs/web/mock.js.map +1 -0
  114. package/lib/commonjs/web/mq.js +23 -0
  115. package/lib/commonjs/web/mq.js.map +1 -0
  116. package/lib/commonjs/web/registry.js +183 -0
  117. package/lib/commonjs/web/registry.js.map +2 -0
  118. package/lib/commonjs/web/runtime.js +167 -0
  119. package/lib/commonjs/web/runtime.js.map +2 -0
  120. package/lib/commonjs/web/shadowRegistry.js +114 -0
  121. package/lib/commonjs/web/shadowRegistry.js.map +2 -0
  122. package/lib/commonjs/web/state.js +69 -0
  123. package/lib/commonjs/web/state.js.map +2 -0
  124. package/lib/commonjs/web/utils/common.js +92 -0
  125. package/lib/commonjs/web/utils/common.js.map +1 -0
  126. package/lib/commonjs/web/utils/index.js +28 -0
  127. package/lib/commonjs/web/utils/index.js.map +1 -0
  128. package/lib/commonjs/web/utils/unistyle.js +82 -0
  129. package/lib/commonjs/web/utils/unistyle.js.map +2 -0
  130. package/lib/commonjs/web/variants/getVariants.js +39 -0
  131. package/lib/commonjs/web/variants/getVariants.js.map +2 -0
  132. package/lib/commonjs/web/variants/index.js +28 -0
  133. package/lib/commonjs/web/variants/index.js.map +1 -0
  134. package/lib/commonjs/web/variants/useVariants.js +58 -0
  135. package/lib/commonjs/web/variants/useVariants.js.map +2 -0
  136. package/lib/module/common.js.map +1 -1
  137. package/lib/module/core/createUnistylesComponent.js +12 -0
  138. package/lib/module/core/createUnistylesComponent.js.map +1 -0
  139. package/lib/module/core/createUnistylesComponent.native.js +39 -0
  140. package/lib/module/core/createUnistylesComponent.native.js.map +1 -0
  141. package/lib/module/core/index.js +6 -0
  142. package/lib/module/core/index.js.map +1 -0
  143. package/lib/module/core/useBreakpoint.js +17 -0
  144. package/lib/module/core/useBreakpoint.js.map +1 -0
  145. package/lib/module/core/useBreakpoint.native.js +19 -0
  146. package/lib/module/core/useBreakpoint.native.js.map +2 -0
  147. package/lib/module/core/useTheme.js +17 -0
  148. package/lib/module/core/useTheme.js.map +1 -0
  149. package/lib/module/core/useTheme.native.js +19 -0
  150. package/lib/module/core/useTheme.native.js.map +1 -0
  151. package/lib/module/global.js +1 -1
  152. package/lib/module/global.js.map +1 -0
  153. package/lib/module/index.js +1 -9
  154. package/lib/module/index.js.map +1 -1
  155. package/lib/module/mq.js +1 -4
  156. package/lib/module/mq.js.map +2 -1
  157. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js +1 -0
  158. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +2 -1
  159. package/lib/module/specs/NavigtionBar/UnistylesNavigationBar.nitro.js.map +1 -1
  160. package/lib/module/specs/NavigtionBar/index.js +1 -1
  161. package/lib/module/specs/NavigtionBar/index.js.map +1 -1
  162. package/lib/module/specs/ShadowRegistry/ShadowRegistry.nitro.js.map +1 -0
  163. package/lib/module/specs/ShadowRegistry/index.js +7 -6
  164. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  165. package/lib/module/specs/ShadowRegistry/types.js +2 -0
  166. package/lib/module/specs/ShadowRegistry/types.js.map +1 -1
  167. package/lib/module/specs/StatusBar/UnistylesStatusBar.nitro.js.map +1 -0
  168. package/lib/module/specs/StatusBar/index.js +1 -1
  169. package/lib/module/specs/StatusBar/index.js.map +1 -1
  170. package/lib/module/specs/StyleSheet/UnistylesStyleSheet.nitro.js +1 -1
  171. package/lib/module/specs/StyleSheet/UnistylesStyleSheet.nitro.js.map +1 -1
  172. package/lib/module/specs/StyleSheet/index.js +1 -0
  173. package/lib/module/specs/StyleSheet/index.js.map +2 -1
  174. package/lib/module/specs/UnistylesRuntime/UnistylesRuntime.nitro.js.map +1 -1
  175. package/lib/module/specs/UnistylesRuntime/index.js +1 -1
  176. package/lib/module/specs/UnistylesRuntime/index.js.map +2 -1
  177. package/lib/module/specs/index.js +2 -1
  178. package/lib/module/specs/index.js.map +1 -1
  179. package/lib/module/specs/index.web.js +1 -1
  180. package/lib/module/specs/index.web.js.map +2 -1
  181. package/lib/module/specs/types.js.map +1 -0
  182. package/lib/module/types/accessibility.js +1 -1
  183. package/lib/module/types/accessibility.js.map +1 -0
  184. package/lib/module/types/breakpoints.js.map +1 -1
  185. package/lib/module/types/common.js +1 -1
  186. package/lib/module/types/common.js.map +1 -0
  187. package/lib/module/types/core.js.map +1 -0
  188. package/lib/module/types/index.js.map +2 -1
  189. package/lib/module/types/stylesheet.js.map +1 -1
  190. package/lib/module/types/variants.js.map +1 -0
  191. package/lib/module/web/convert/boxShadow.js +72 -0
  192. package/lib/module/web/convert/boxShadow.js.map +1 -0
  193. package/lib/module/web/convert/index.js +69 -0
  194. package/lib/module/web/convert/index.js.map +1 -0
  195. package/lib/module/web/convert/module.d.js +2 -0
  196. package/lib/module/web/convert/module.d.js.map +1 -0
  197. package/lib/module/web/convert/pseudo.js +5 -0
  198. package/lib/module/web/convert/pseudo.js.map +1 -0
  199. package/lib/module/web/convert/shadow.js +63 -0
  200. package/lib/module/web/convert/shadow.js.map +1 -0
  201. package/lib/module/web/convert/style.js +88 -0
  202. package/lib/module/web/convert/style.js.map +1 -0
  203. package/lib/module/web/convert/textShadow.js +65 -0
  204. package/lib/module/web/convert/textShadow.js.map +2 -0
  205. package/lib/module/web/convert/transform.js +67 -0
  206. package/lib/module/web/convert/transform.js.map +1 -0
  207. package/lib/module/web/convert/types.js +5 -0
  208. package/lib/module/web/convert/types.js.map +1 -0
  209. package/lib/module/web/convert/utils.js +42 -0
  210. package/lib/module/web/convert/utils.js.map +2 -0
  211. package/lib/module/web/create.js +39 -0
  212. package/lib/module/web/create.js.map +2 -0
  213. package/lib/module/web/index.js +25 -0
  214. package/lib/module/web/index.js.map +1 -0
  215. package/lib/module/web/listener.js +31 -0
  216. package/lib/module/web/listener.js.map +2 -0
  217. package/lib/module/web/mock.js +24 -0
  218. package/lib/module/web/mock.js.map +1 -0
  219. package/lib/module/web/mq.js +17 -0
  220. package/lib/module/web/mq.js.map +1 -0
  221. package/lib/module/web/registry.js +179 -0
  222. package/lib/module/web/registry.js.map +1 -0
  223. package/lib/module/web/runtime.js +163 -0
  224. package/lib/module/web/runtime.js.map +1 -0
  225. package/lib/module/web/shadowRegistry.js +118 -0
  226. package/lib/module/web/shadowRegistry.js.map +1 -0
  227. package/lib/module/web/state.js +65 -0
  228. package/lib/module/web/state.js.map +2 -0
  229. package/lib/module/web/utils/common.js +78 -0
  230. package/lib/module/web/utils/common.js.map +2 -0
  231. package/lib/module/web/utils/index.js +5 -0
  232. package/lib/module/web/utils/index.js.map +1 -0
  233. package/lib/module/web/utils/unistyle.js +69 -0
  234. package/lib/module/web/utils/unistyle.js.map +2 -0
  235. package/lib/module/web/variants/getVariants.js +34 -0
  236. package/lib/module/web/variants/getVariants.js.map +1 -0
  237. package/lib/module/web/variants/index.js +5 -0
  238. package/lib/module/web/variants/index.js.map +1 -0
  239. package/lib/module/web/variants/useVariants.js +53 -0
  240. package/lib/module/web/variants/useVariants.js.map +1 -0
  241. package/lib/typescript/src/core/createUnistylesComponent.d.ts +6 -0
  242. package/lib/typescript/src/core/createUnistylesComponent.d.ts.map +1 -0
  243. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts +6 -0
  244. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts.map +1 -0
  245. package/lib/typescript/src/core/index.d.ts +4 -0
  246. package/lib/typescript/src/core/index.d.ts.map +1 -0
  247. package/lib/typescript/src/core/useBreakpoint.d.ts +2 -0
  248. package/lib/typescript/src/core/useBreakpoint.d.ts.map +1 -0
  249. package/lib/typescript/src/core/useBreakpoint.native.d.ts +2 -0
  250. package/lib/typescript/src/core/useBreakpoint.native.d.ts.map +1 -0
  251. package/lib/typescript/src/core/useTheme.d.ts +3 -0
  252. package/lib/typescript/src/core/useTheme.d.ts.map +1 -0
  253. package/lib/typescript/src/core/useTheme.native.d.ts +3 -0
  254. package/lib/typescript/src/core/useTheme.native.d.ts.map +1 -0
  255. package/lib/typescript/src/index.d.ts +2 -0
  256. package/lib/typescript/src/index.d.ts.map +1 -1
  257. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +6 -2
  258. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
  259. package/lib/typescript/src/specs/NavigtionBar/index.d.ts +5 -0
  260. package/lib/typescript/src/specs/NavigtionBar/index.d.ts.map +1 -1
  261. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +3 -3
  262. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  263. package/lib/typescript/src/specs/StatusBar/index.d.ts +5 -0
  264. package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
  265. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts +3 -1
  266. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts.map +1 -1
  267. package/lib/typescript/src/specs/StyleSheet/index.d.ts +3 -1
  268. package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
  269. package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts +0 -1
  270. package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts.map +1 -1
  271. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts +3 -1
  272. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
  273. package/lib/typescript/src/specs/index.d.ts +4 -2
  274. package/lib/typescript/src/specs/index.d.ts.map +1 -1
  275. package/lib/typescript/src/specs/index.web.d.ts +1 -1
  276. package/lib/typescript/src/specs/index.web.d.ts.map +1 -1
  277. package/lib/typescript/src/types/breakpoints.d.ts +11 -11
  278. package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
  279. package/lib/typescript/src/types/index.d.ts +1 -1
  280. package/lib/typescript/src/types/index.d.ts.map +1 -1
  281. package/lib/typescript/src/types/stylesheet.d.ts +6 -4
  282. package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
  283. package/lib/typescript/src/types/variants.d.ts +4 -1
  284. package/lib/typescript/src/types/variants.d.ts.map +1 -1
  285. package/lib/typescript/src/web/convert/boxShadow.d.ts +8 -0
  286. package/lib/typescript/src/web/convert/boxShadow.d.ts.map +1 -0
  287. package/lib/typescript/src/web/convert/index.d.ts +3 -0
  288. package/lib/typescript/src/web/convert/index.d.ts.map +1 -0
  289. package/lib/typescript/src/web/convert/pseudo.d.ts +6 -0
  290. package/lib/typescript/src/web/convert/pseudo.d.ts.map +1 -0
  291. package/lib/typescript/src/web/convert/shadow.d.ts.map +1 -0
  292. package/lib/typescript/src/web/convert/style.d.ts +2 -0
  293. package/lib/typescript/src/web/convert/style.d.ts.map +1 -0
  294. package/lib/typescript/src/web/convert/textShadow.d.ts +8 -0
  295. package/lib/typescript/src/web/convert/textShadow.d.ts.map +1 -0
  296. package/lib/typescript/src/web/convert/transform.d.ts +4 -0
  297. package/lib/typescript/src/web/convert/transform.d.ts.map +1 -0
  298. package/lib/typescript/{web → src/web}/convert/types.d.ts +1 -1
  299. package/lib/typescript/src/web/convert/types.d.ts.map +1 -0
  300. package/lib/typescript/src/web/convert/utils.d.ts.map +1 -0
  301. package/lib/typescript/src/web/create.d.ts +1443 -0
  302. package/lib/typescript/{web → src/web}/create.d.ts.map +1 -1
  303. package/lib/typescript/src/web/index.d.ts +1459 -0
  304. package/lib/typescript/{web → src/web}/index.d.ts.map +1 -1
  305. package/lib/typescript/{web/listener → src/web}/listener.d.ts +3 -2
  306. package/lib/typescript/src/web/listener.d.ts.map +1 -0
  307. package/lib/typescript/src/web/mock.d.ts +5 -0
  308. package/lib/typescript/src/web/mock.d.ts.map +1 -0
  309. package/lib/typescript/src/web/mq.d.ts +8 -0
  310. package/lib/typescript/src/web/mq.d.ts.map +1 -0
  311. package/lib/typescript/src/web/registry.d.ts +28 -0
  312. package/lib/typescript/src/web/registry.d.ts.map +1 -0
  313. package/lib/typescript/{web → src/web}/runtime.d.ts +9 -9
  314. package/lib/typescript/src/web/runtime.d.ts.map +1 -0
  315. package/lib/typescript/src/web/shadowRegistry.d.ts +16 -0
  316. package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -0
  317. package/lib/typescript/src/web/state.d.ts +18 -0
  318. package/lib/typescript/src/web/state.d.ts.map +1 -0
  319. package/lib/typescript/{web/utils.d.ts → src/web/utils/common.d.ts} +8 -9
  320. package/lib/typescript/src/web/utils/common.d.ts.map +1 -0
  321. package/lib/typescript/src/web/utils/index.d.ts +3 -0
  322. package/lib/typescript/src/web/utils/index.d.ts.map +1 -0
  323. package/lib/typescript/src/web/utils/unistyle.d.ts +20 -0
  324. package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -0
  325. package/lib/typescript/src/web/variants/getVariants.d.ts +3 -0
  326. package/lib/typescript/src/web/variants/getVariants.d.ts.map +1 -0
  327. package/lib/typescript/src/web/variants/index.d.ts +3 -0
  328. package/lib/typescript/src/web/variants/index.d.ts.map +1 -0
  329. package/lib/typescript/src/web/variants/useVariants.d.ts +3 -0
  330. package/lib/typescript/src/web/variants/useVariants.d.ts.map +1 -0
  331. package/nitrogen/generated/android/c++/JColorScheme.hpp +1 -1
  332. package/nitrogen/generated/android/c++/JFunc_void.hpp +48 -0
  333. package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency_.hpp +8 -8
  334. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +31 -22
  335. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +8 -3
  336. package/nitrogen/generated/android/c++/JOrientation.hpp +1 -1
  337. package/nitrogen/generated/android/c++/JUnistyleDependency.hpp +4 -1
  338. package/nitrogen/generated/android/c++/JUnistylesNativeMiniRuntime.hpp +9 -7
  339. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void.kt +45 -0
  340. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +25 -5
  341. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistyleDependency.kt +2 -1
  342. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistylesNativeMiniRuntime.kt +2 -1
  343. package/nitrogen/generated/android/unistyles+autolinking.cmake +13 -1
  344. package/nitrogen/generated/android/{UnistylesOnLoad.cpp → unistylesOnLoad.cpp} +4 -2
  345. package/nitrogen/generated/android/{UnistylesOnLoad.hpp → unistylesOnLoad.hpp} +1 -1
  346. package/nitrogen/generated/ios/Unistyles+autolinking.rb +5 -3
  347. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.cpp +25 -0
  348. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +53 -31
  349. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Umbrella.hpp +0 -29
  350. package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +7 -1
  351. package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +3 -13
  352. package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +167 -104
  353. package/nitrogen/generated/ios/swift/UnistyleDependency.swift +4 -0
  354. package/nitrogen/generated/ios/swift/UnistylesNativeMiniRuntime.swift +16 -5
  355. package/nitrogen/generated/shared/c++/ColorScheme.hpp +2 -2
  356. package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.cpp +2 -0
  357. package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +5 -0
  358. package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +3 -0
  359. package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.hpp +3 -0
  360. package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.hpp +3 -0
  361. package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +3 -0
  362. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +2 -1
  363. package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +10 -4
  364. package/nitrogen/generated/shared/c++/Orientation.hpp +2 -2
  365. package/nitrogen/generated/shared/c++/UnistyleDependency.hpp +2 -1
  366. package/nitrogen/generated/shared/c++/UnistylesCxxMiniRuntime.hpp +10 -9
  367. package/nitrogen/generated/shared/c++/UnistylesNativeMiniRuntime.hpp +9 -8
  368. package/package.json +18 -30
  369. package/plugin/common.js +12 -1
  370. package/plugin/index.js +110 -23
  371. package/plugin/ref.js +64 -13
  372. package/plugin/style.js +82 -22
  373. package/plugin/stylesheet.js +53 -3
  374. package/plugin/variants.js +33 -0
  375. package/src/common.js +4 -0
  376. package/src/core/createUnistylesComponent.js +6 -0
  377. package/src/core/createUnistylesComponent.native.js +31 -0
  378. package/src/core/createUnistylesComponent.native.tsx +44 -0
  379. package/src/core/createUnistylesComponent.tsx +10 -0
  380. package/src/core/index.js +3 -0
  381. package/src/core/index.ts +3 -0
  382. package/src/core/useBreakpoint.js +14 -0
  383. package/src/core/useBreakpoint.native.js +16 -0
  384. package/src/core/useBreakpoint.native.ts +21 -0
  385. package/src/core/useBreakpoint.ts +18 -0
  386. package/src/core/useTheme.js +14 -0
  387. package/src/core/useTheme.native.js +16 -0
  388. package/src/core/useTheme.native.ts +22 -0
  389. package/src/core/useTheme.ts +19 -0
  390. package/src/global.js +1 -0
  391. package/src/index.js +3 -0
  392. package/src/index.ts +2 -12
  393. package/src/mq.js +38 -0
  394. package/src/specs/NativePlatform/NativePlatform.nitro.js +19 -0
  395. package/src/specs/NativePlatform/NativePlatform.nitro.ts +7 -3
  396. package/src/specs/NativePlatform/index.js +1 -0
  397. package/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.js +1 -0
  398. package/src/specs/NavigtionBar/index.js +9 -0
  399. package/src/specs/NavigtionBar/index.ts +6 -1
  400. package/src/specs/ShadowRegistry/ShadowRegistry.nitro.js +1 -0
  401. package/src/specs/ShadowRegistry/index.js +26 -0
  402. package/src/specs/ShadowRegistry/index.ts +10 -9
  403. package/src/specs/ShadowRegistry/types.js +1 -0
  404. package/src/specs/StatusBar/UnistylesStatusBar.nitro.js +1 -0
  405. package/src/specs/StatusBar/index.js +25 -0
  406. package/src/specs/StatusBar/index.ts +6 -1
  407. package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.js +1 -0
  408. package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts +4 -1
  409. package/src/specs/StyleSheet/index.js +13 -0
  410. package/src/specs/StyleSheet/index.ts +6 -1
  411. package/src/specs/TurboUnistyles/NativeTurboUnistyles.js +2 -0
  412. package/src/specs/TurboUnistyles/index.js +1 -0
  413. package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.js +1 -0
  414. package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +0 -1
  415. package/src/specs/UnistylesRuntime/index.js +20 -0
  416. package/src/specs/UnistylesRuntime/index.ts +4 -2
  417. package/src/specs/index.js +8 -0
  418. package/src/specs/index.ts +6 -2
  419. package/src/specs/index.web.js +2 -0
  420. package/src/specs/index.web.ts +1 -1
  421. package/src/specs/types.js +17 -0
  422. package/src/types/accessibility.js +30 -0
  423. package/src/types/breakpoints.js +1 -0
  424. package/src/types/breakpoints.ts +25 -13
  425. package/src/types/common.js +1 -0
  426. package/src/types/core.js +1 -0
  427. package/src/types/index.js +1 -0
  428. package/src/types/index.ts +1 -1
  429. package/src/types/stylesheet.js +2 -0
  430. package/src/types/stylesheet.ts +7 -5
  431. package/src/types/variants.js +1 -0
  432. package/src/types/variants.ts +7 -1
  433. package/src/web/convert/boxShadow.js +59 -0
  434. package/{web → src/web}/convert/boxShadow.ts +14 -15
  435. package/src/web/convert/index.js +56 -0
  436. package/{web → src/web}/convert/index.ts +8 -15
  437. package/src/web/convert/pseudo.js +131 -0
  438. package/src/web/convert/pseudo.ts +137 -0
  439. package/src/web/convert/shadow.js +50 -0
  440. package/src/web/convert/style.js +137 -0
  441. package/{web → src/web}/convert/style.ts +61 -10
  442. package/src/web/convert/textShadow.js +56 -0
  443. package/{web → src/web}/convert/textShadow.ts +13 -14
  444. package/src/web/convert/transform.js +65 -0
  445. package/{web → src/web}/convert/transform.ts +7 -8
  446. package/src/web/convert/types.js +2 -0
  447. package/{web → src/web}/convert/types.ts +1 -1
  448. package/src/web/convert/utils.js +39 -0
  449. package/src/web/create.js +36 -0
  450. package/src/web/create.ts +47 -0
  451. package/src/web/index.js +22 -0
  452. package/{web → src/web}/index.ts +3 -2
  453. package/src/web/listener.js +26 -0
  454. package/{web/listener → src/web}/listener.ts +3 -3
  455. package/src/web/mock.js +21 -0
  456. package/{web → src/web}/mock.ts +2 -12
  457. package/src/web/mq.js +14 -0
  458. package/{web → src/web}/mq.ts +1 -3
  459. package/src/web/registry.js +165 -0
  460. package/src/web/registry.ts +236 -0
  461. package/src/web/runtime.js +160 -0
  462. package/{web → src/web}/runtime.ts +21 -18
  463. package/src/web/shadowRegistry.js +96 -0
  464. package/src/web/shadowRegistry.ts +121 -0
  465. package/src/web/state.js +68 -0
  466. package/src/web/state.ts +94 -0
  467. package/src/web/utils/common.js +79 -0
  468. package/{web/utils.ts → src/web/utils/common.ts} +48 -36
  469. package/src/web/utils/index.js +2 -0
  470. package/src/web/utils/index.ts +2 -0
  471. package/src/web/utils/unistyle.js +72 -0
  472. package/src/web/utils/unistyle.ts +104 -0
  473. package/src/web/variants/getVariants.js +26 -0
  474. package/src/web/variants/getVariants.ts +42 -0
  475. package/src/web/variants/index.js +2 -0
  476. package/src/web/variants/index.ts +2 -0
  477. package/src/web/variants/useVariants.js +50 -0
  478. package/src/web/variants/useVariants.ts +65 -0
  479. package/lib/typescript/example/App.d.ts +0 -4
  480. package/lib/typescript/example/App.d.ts.map +0 -1
  481. package/lib/typescript/example/unistyles.d.ts +0 -63
  482. package/lib/typescript/example/unistyles.d.ts.map +0 -1
  483. package/lib/typescript/expo-example/App.d.ts +0 -4
  484. package/lib/typescript/expo-example/App.d.ts.map +0 -1
  485. package/lib/typescript/expo-example/unistyles.d.ts +0 -63
  486. package/lib/typescript/expo-example/unistyles.d.ts.map +0 -1
  487. package/lib/typescript/web/convert/boxShadow.d.ts +0 -3
  488. package/lib/typescript/web/convert/boxShadow.d.ts.map +0 -1
  489. package/lib/typescript/web/convert/breakpoint.d.ts +0 -3
  490. package/lib/typescript/web/convert/breakpoint.d.ts.map +0 -1
  491. package/lib/typescript/web/convert/index.d.ts +0 -4
  492. package/lib/typescript/web/convert/index.d.ts.map +0 -1
  493. package/lib/typescript/web/convert/shadow.d.ts.map +0 -1
  494. package/lib/typescript/web/convert/style.d.ts +0 -3
  495. package/lib/typescript/web/convert/style.d.ts.map +0 -1
  496. package/lib/typescript/web/convert/textShadow.d.ts +0 -3
  497. package/lib/typescript/web/convert/textShadow.d.ts.map +0 -1
  498. package/lib/typescript/web/convert/transform.d.ts +0 -5
  499. package/lib/typescript/web/convert/transform.d.ts.map +0 -1
  500. package/lib/typescript/web/convert/types.d.ts.map +0 -1
  501. package/lib/typescript/web/convert/utils.d.ts.map +0 -1
  502. package/lib/typescript/web/create.d.ts +0 -2449
  503. package/lib/typescript/web/index.d.ts +0 -2464
  504. package/lib/typescript/web/listener/index.d.ts +0 -2
  505. package/lib/typescript/web/listener/index.d.ts.map +0 -1
  506. package/lib/typescript/web/listener/listener.d.ts.map +0 -1
  507. package/lib/typescript/web/mock.d.ts +0 -14
  508. package/lib/typescript/web/mock.d.ts.map +0 -1
  509. package/lib/typescript/web/mq.d.ts +0 -4
  510. package/lib/typescript/web/mq.d.ts.map +0 -1
  511. package/lib/typescript/web/pseudo.d.ts +0 -4
  512. package/lib/typescript/web/pseudo.d.ts.map +0 -1
  513. package/lib/typescript/web/registry.d.ts +0 -12
  514. package/lib/typescript/web/registry.d.ts.map +0 -1
  515. package/lib/typescript/web/runtime.d.ts.map +0 -1
  516. package/lib/typescript/web/state.d.ts +0 -24
  517. package/lib/typescript/web/state.d.ts.map +0 -1
  518. package/lib/typescript/web/useVariants.d.ts +0 -3
  519. package/lib/typescript/web/useVariants.d.ts.map +0 -1
  520. package/lib/typescript/web/utils.d.ts.map +0 -1
  521. package/plugin/__tests__/dependencies.spec.js +0 -360
  522. package/plugin/__tests__/ref.spec.js +0 -991
  523. package/plugin/__tests__/stylesheet.spec.js +0 -396
  524. package/web/convert/breakpoint.ts +0 -21
  525. package/web/create.ts +0 -102
  526. package/web/listener/index.ts +0 -1
  527. package/web/pseudo.ts +0 -11
  528. package/web/registry.ts +0 -41
  529. package/web/state.ts +0 -148
  530. package/web/useVariants.ts +0 -99
  531. /package/lib/typescript/{web → src/web}/convert/shadow.d.ts +0 -0
  532. /package/lib/typescript/{web → src/web}/convert/utils.d.ts +0 -0
  533. /package/nitrogen/generated/android/{UnistylesOnLoad.kt → unistylesOnLoad.kt} +0 -0
  534. /package/{web → src/web}/convert/module.d.ts +0 -0
  535. /package/{web → src/web}/convert/shadow.ts +0 -0
  536. /package/{web → src/web}/convert/utils.ts +0 -0
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export * from './common';
4
+ export * from './unistyle';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["web/utils/index.ts"],"mappings":";;AAAA,cAAc,UAAU;AACxB,cAAc,YAAY","ignoreList":[]}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ import { ColorScheme, Orientation } from '../../specs/types';
4
+ import { isUnistylesMq, parseMq } from '../mq';
5
+ import { UnistylesState } from '../state';
6
+ import { keyInObject, reduceObject } from './common';
7
+ export const schemeToTheme = scheme => {
8
+ switch (scheme) {
9
+ case ColorScheme.Dark:
10
+ return 'dark';
11
+ case ColorScheme.Light:
12
+ default:
13
+ return 'light';
14
+ }
15
+ };
16
+ export const hexToRGBA = (hex, opacity) => hex.replace('#', '').split(/(?=(?:..)*$)/).map(x => parseInt(x, 16)).filter(num => !isNaN(num)).reduce((acc, color) => `${acc}${color},`, 'rgba(').concat(`${opacity})`);
17
+ export const assignSecrets = (object, secrets) => {
18
+ // @ts-expect-error - assign secrets to object
19
+ object[`__uni__secrets__${Math.random().toString(16).slice(2)}`] = secrets;
20
+ return object;
21
+ };
22
+ export const extractSecrets = object => {
23
+ const secrets = Object.entries(object).reduce((acc, [key, value]) => {
24
+ if (key.startsWith('__uni__secrets__')) {
25
+ acc.push(value);
26
+ }
27
+ return acc;
28
+ }, []);
29
+ return secrets;
30
+ };
31
+ export const getStyles = values => {
32
+ const returnValue = {};
33
+ Object.defineProperties(returnValue, reduceObject(values, value => ({
34
+ value,
35
+ enumerable: false,
36
+ configurable: true
37
+ })));
38
+ return returnValue;
39
+ };
40
+ export const isInDocument = element => document.body.contains(element);
41
+ export const extractMediaQueryValue = query => {
42
+ const [_, px] = query.match(/(\d+)px/) ?? [];
43
+ if (!px) {
44
+ return undefined;
45
+ }
46
+ const value = Number(px);
47
+ return isNaN(value) ? undefined : value;
48
+ };
49
+ export const getMediaQuery = query => {
50
+ if (Object.values(Orientation).includes(query)) {
51
+ return `(orientation: ${query})`;
52
+ }
53
+ if (isUnistylesMq(query)) {
54
+ const {
55
+ minWidth,
56
+ maxWidth,
57
+ minHeight,
58
+ maxHeight
59
+ } = parseMq(query);
60
+ return [minWidth ? `(min-width: ${minWidth}px)` : undefined, maxWidth ? `(max-width: ${maxWidth}px)` : undefined, minHeight ? `(min-height: ${minHeight}px)` : undefined, maxHeight ? `(max-height: ${maxHeight}px)` : undefined].filter(Boolean).join(' and ');
61
+ }
62
+ const minWidth = UnistylesState.breakpoints && keyInObject(UnistylesState.breakpoints, query) ? UnistylesState.breakpoints[query] : undefined;
63
+ return `(min-width: ${minWidth ?? 0}px)`;
64
+ };
65
+ export const extractUnistyleDependencies = value => {
66
+ const dependencies = keyInObject(value, 'uni__dependencies') ? value.uni__dependencies : [];
67
+ return dependencies;
68
+ };
69
+ //# sourceMappingURL=unistyle.js.map
@@ -0,0 +1,2 @@
1
+ {"version":3,"names":["ColorScheme","Orientation","isUnistylesMq","parseMq","UnistylesState","keyInObject","reduceObject","schemeToTheme","scheme","Dark","Light","hexToRGBA","hex","opacity","replace","split","map","x","parseInt","filter","num","isNaN","reduce","acc","color","concat","assignSecrets","object","secrets","Math","random","toString","slice","extractSecrets","Object","entries","key","value","startsWith","push","getStyles","values","returnValue","defineProperties","enumerable","configurable","isInDocument","element","document","body","contains","extractMediaQueryValue","query","_","px","match","undefined","Number","getMediaQuery","includes","minWidth","maxWidth","minHeight","maxHeight","Boolean","join","breakpoints","extractUnistyleDependencies","dependencies","uni__dependencies"],"sourceRoot":"../../../../src","sources":["web/utils/unistyle.js"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,mBAAmB;AAC5D,SAASC,aAAa,EAAEC,OAAO,QAAQ,OAAO;AAC9C,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,WAAW,EAAEC,YAAY,QAAQ,UAAU;AACpD,OAAO,MAAMC,aAAa,GAAIC,MAAM,IAAK;EACrC,QAAQA,MAAM;IACV,KAAKR,WAAW,CAACS,IAAI;MACjB,OAAO,MAAM;IACjB,KAAKT,WAAW,CAACU,KAAK;IACtB;MACI,OAAO,OAAO;EACtB;AACJ,CAAC;AACD,OAAO,MAAMC,SAAS,GAAGA,CAACC,GAAG,EAAEC,OAAO,KAAKD,GAAG,CACzCE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAChBC,KAAK,CAAC,cAAc,CAAC,CACrBC,GAAG,CAACC,CAAC,IAAIC,QAAQ,CAACD,CAAC,EAAE,EAAE,CAAC,CAAC,CACzBE,MAAM,CAACC,GAAG,IAAI,CAACC,KAAK,CAACD,GAAG,CAAC,CAAC,CAC1BE,MAAM,CAAC,CAACC,GAA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E;EAC3F,OAAOD,YAAY;AACvB,CAAC","ignoreList":[]}
2
+ ist":[]}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ import { deepMergeObjects } from '../utils';
4
+ const hasVariants = value => 'variants' in value[1];
5
+ export const getVariants = (styles, selectedVariants) => {
6
+ return Object.entries(styles).filter(hasVariants).filter(([_key, {
7
+ variants
8
+ }]) => Object.keys(variants).some(variant => variant in variants)).map(([key, {
9
+ variants,
10
+ compoundVariants = []
11
+ }]) => {
12
+ const variantStyles = Object.entries(variants).flatMap(([variant, styles]) => {
13
+ const selectedVariant = selectedVariants[variant];
14
+ const selectedVariantStyles = styles[selectedVariant] ?? styles['default'];
15
+ if (!selectedVariantStyles) {
16
+ return [];
17
+ }
18
+ return selectedVariantStyles;
19
+ });
20
+ const compoundVariantStyles = compoundVariants.flatMap(compoundVariant => {
21
+ const {
22
+ styles,
23
+ ...conditions
24
+ } = compoundVariant;
25
+ if (Object.entries(conditions).some(([variant, value]) => String(selectedVariants[variant]) !== String(value))) {
26
+ return [];
27
+ }
28
+ return styles;
29
+ });
30
+ const mergedVariantStyles = deepMergeObjects(...variantStyles, ...compoundVariantStyles);
31
+ return [key, mergedVariantStyles];
32
+ });
33
+ };
34
+ //# sourceMappingURL=getVariants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["deepMergeObjects","hasVariants","value","getVariants","styles","selectedVariants","Object","entries","filter","_key","variants","keys","some","variant","map","key","compoundVariants","variantStyles","flatMap","selectedVariant","selectedVariantStyles","compoundVariantStyles","compoundVariant","conditions","String","mergedVariantStyles"],"sourceRoot":"../../../../src","sources":["web/variants/getVariants.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,UAAU;AAQ3C,MAAMC,WAAW,GAAsBC,KAAkB,IAAgD,UAAU,IAAIA,KAAK,CAAC,CAAC,CAAC;AAE/H,OAAO,MAAMC,WAAW,GAAGA,CAACC,MAAyC,EAAEC,gBAAqC,KAAK;EAC7G,OAAOC,MAAM,CA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B,CAAC;EACrC,CAAC,CAAC;AACV,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export * from './useVariants';
4
+ export * from './getVariants';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["web/variants/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,eAAe","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ import { useMemo, useRef, useState } from 'react';
4
+ import { equal, keyInObject, reduceObject } from '../utils';
5
+ import { getVariants } from './getVariants';
6
+ export const createUseVariants = (styles, setSelectedVariants) => {
7
+ const useVariants = selectedVariants => {
8
+ const [selectedVariantStylesMap] = useState(() => new Map());
9
+ const lastSelectedVariantsRef = useRef();
10
+ // Variable that determines if variants have changed and we need to recalculate styles
11
+ const variantsChanged = !equal(lastSelectedVariantsRef.current, selectedVariants);
12
+ if (variantsChanged) {
13
+ lastSelectedVariantsRef.current = selectedVariants;
14
+ setSelectedVariants(selectedVariants);
15
+ }
16
+ const combinedVariantStyles = useMemo(() => {
17
+ const result = getVariants(styles, selectedVariants);
18
+ result.forEach(([key, value]) => {
19
+ selectedVariantStylesMap.set(key, value);
20
+ });
21
+ return result;
22
+ }, [lastSelectedVariantsRef.current]);
23
+ combinedVariantStyles.forEach(([key]) => {
24
+ const styleEntry = styles[key];
25
+ if (!styleEntry) {
26
+ return;
27
+ }
28
+ const selectedVariantStyles = selectedVariantStylesMap.get(key);
29
+ Object.defineProperties(styleEntry, reduceObject(selectedVariantStyles ?? {}, value => ({
30
+ value,
31
+ enumerable: false,
32
+ configurable: true
33
+ })));
34
+ // Add __uni__variants to static styles
35
+ Object.keys(styleEntry).forEach(key => {
36
+ if (!key.startsWith('__uni__secrets__')) {
37
+ return;
38
+ }
39
+ const secret = keyInObject(styleEntry, key) ? styleEntry[key] : undefined;
40
+ if (!secret) {
41
+ return;
42
+ }
43
+ Object.defineProperty(secret, '__uni__variants', {
44
+ value: selectedVariants
45
+ });
46
+ });
47
+ });
48
+ };
49
+ Object.defineProperty(styles, 'useVariants', {
50
+ value: useVariants
51
+ });
52
+ };
53
+ //# sourceMappingURL=useVariants.js.mapp
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMemo","useRef","useState","equal","keyInObject","reduceObject","getVariants","createUseVariants","styles","setSelectedVariants","useVariants","selectedVariants","selectedVariantStylesMap","Map","lastSelectedVariantsRef","variantsChanged","current","combinedVariantStyles","result","forEach","key","value","set","styleEntry","selectedVariantStyles","get","Object","defineProperties","enumerable","configurable","keys","startsWith","secret","undefined","defineProperty"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEjD,SAASC,KAAK,EAAEC,WAAW,EAAEC,YAAY,QAAQ,UAAU;AAC3D,SAASC,WAAW,QAAQ,eAAe;AAE3C,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,MAAyC,EAAEC,mBAA4D,KAAK;EAC1I,MAAMC,WAAW,GAAIC,gBAAqC,IAAK;IAC3D,MAAM,CAACC,wBAAwB,CAAC,GAAGV,QAAQ,CAAC,MAAM,IAAIW,GAAG,CAA8B,CAAC,CAAC;IACzF,MAAMC,uBAAuB,GAAGb,MAAM,CAAsB,CAAC;IAC7D;IACA,MAAMc,eAAe,GAAG,CAACZ,KAAK,CAACW,uBAAuB,CAACE,OAAO,EAAEL,gBAAgB,CAAC;IAEjF,IAAII,eAAe,EAAE;MACjBD,uBAAuB,CAACE,OAAO,GAAGL,gBAAgB;MAClDF,mBAAmB,CAACE,gBAAgB,CAAC;IACzC;IAEA,MAAMM,qBAAqB,GAAGjB,OAAO,CAAC,MAAM;MACxC,MAAMkB,MAAM,GAAGZ,WAAW,CAACE,MAAM,EAAEG,gBAAgB,CAAC;MAEpDO,MAAM,CAACC,OAAO,CAAC,CAAC,CAACC,GAAG,E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{ UnistylesTheme } from '../types';
3
+ type Mappings<T extends ComponentType<any>> = (theme: UnistylesTheme) => Partial<ComponentProps<T>>;
4
+ export declare const createUnistylesComponent: <T extends ComponentType<any>>(Component: T, _: Mappings<T>) => (props: ComponentProps<T>) => React.JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=createUnistylesComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createUnistylesComponent.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,KAAK,QAAQ,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;AAEnG,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,aAChF,cAAc,CAAC,CAAC,CAAC,sBAGnC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React, { type ComponentProps, type ComponentType } from 'react';
2
+ import type { UnistylesTheme } from '../types';
3
+ type Mappings<T extends ComponentType<any>> = (theme: UnistylesTheme) => Partial<ComponentProps<T>>;
4
+ export declare const createUnistylesComponent: <T extends ComponentType<any>>(Component: T, mappings: Mappings<T>) => (props: ComponentProps<T>) => React.JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=createUnistylesComponent.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createUnistylesComponent.native.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesComponent.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAuB,MAAM,OAAO,CAAA;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,KAAK,QAAQ,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;AAEnG,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,aAAa,CAAC,YAAY,QAAQ,CAAC,CAAC,CAAC,aACvF,cAAc,CAAC,CAAC,CAAC,sBAoCnC,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { useBreakpoint } from './useBreakpoint';
2
+ export { useTheme } from './useTheme';
3
+ export { createUnistylesComponent } from './createUnistylesComponent';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const useBreakpoint: () => "portrait" | "landscape" | undefined;
2
+ //# sourceMappingURL=useBreakpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../../src/core/useBreakpoint.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,4CAYzB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const useBreakpoint: () => "portrait" | "landscape" | undefined;
2
+ //# sourceMappingURL=useBreakpoint.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBreakpoint.native.d.ts","sourceRoot":"","sources":["../../../../src/core/useBreakpoint.native.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,4CAgBzB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { UnistylesTheme } from '../types';
2
+ export declare const useTheme: () => UnistylesTheme;
3
+ //# sourceMappingURL=useTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/core/useTheme.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,eAAO,MAAM,QAAQ,QAAO,cAY3B,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { UnistylesTheme } from '../types';
2
+ export declare const useTheme: () => UnistylesTheme;
3
+ //# sourceMappingURL=useTheme.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheme.native.d.ts","sourceRoot":"","sources":["../../../../src/core/useTheme.native.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,eAAO,MAAM,QAAQ,QAAO,cAgB3B,CAAA"}
@@ -1,4 +1,6 @@
1
1
  export * from './specs';
2
2
  export { mq } from './mq';
3
3
  export type { UnistylesThemes, UnistylesBreakpoints } from './global';
4
+ export { useTheme, useBreakpoint, createUnistylesComponent } from './core';
5
+ export type { UnistylesVariants } from './types';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAA;AAC1E,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
@@ -16,7 +16,8 @@ export declare enum UnistyleDependency {
16
16
  PixelRatio = 10,
17
17
  FontScale = 11,
18
18
  StatusBar = 12,
19
- NavigationBar = 13
19
+ NavigationBar = 13,
20
+ Ime = 14
20
21
  }
21
22
  export interface UnistylesNativeMiniRuntime {
22
23
  readonly colorScheme: ColorScheme;
@@ -28,7 +29,8 @@ export interface UnistylesNativeMiniRuntime {
28
29
  readonly rtl: boolean;
29
30
  readonly statusBar: Dimensions;
30
31
  readonly navigationBar: Dimensions;
31
- readonly orientation: Orientation;
32
+ readonly isPortrait: boolean;
33
+ readonly isLandscape: boolean;
32
34
  }
33
35
  export interface NativePlatform extends HybridObject<{
34
36
  ios: 'swift';
@@ -52,6 +54,8 @@ export interface NativePlatform extends HybridObject<{
52
54
  setImmersiveMode(isEnabled: boolean): void;
53
55
  getMiniRuntime(): UnistylesNativeMiniRuntime;
54
56
  registerPlatformListener(callback: (dependencies: Array<UnistyleDependency>) => void): void;
57
+ registerImeListener(callback: () => void): void;
58
+ unregisterPlatformListeners(): void;
55
59
  }
56
60
  export {};
57
61
  //# sourceMappingURL=NativePlatform.nitro.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NativePlatform.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/NativePlatform/NativePlatform.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AAEvD,KAAK,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAA;AACnD,KAAK,WAAW,GAAG,UAAU,GAAG,WAAW,CAAA;AAE3C,oBAAY,kB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EAAE,KAAK,CAAC,kBAAkB,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC;IAC5F,mBAAmB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAChD,2BAA2B,IAAI,IAAI,CAAA;CACtC"}
@@ -1,6 +1,11 @@
1
1
  import type { UnistylesNavigationBar as UnistylesNavigationBarSpec } from './UnistylesNavigationBar.nitro';
2
2
  import type { Color } from '../types';
3
3
  interface PrivateUnistylesNavigationBar extends Omit<UnistylesNavigationBarSpec, 'setBackgroundColor'> {
4
+ /**
5
+ * Apps targeting Android SDK 35
6
+ * This API is deprecated but continues to affect 3-button navigation
7
+ * @deprecated
8
+ */
4
9
  setBackgroundColor(color?: string): void;
5
10
  _setBackgroundColor(color?: Color): void;
6
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/NavigtionBar/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC1G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAErC,UAAU,6BAA8B,SAAQ,IAAI,CAAC,0BAA0B,EAAE,oBAAoB,CAAC;IAClG,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,mBAAmB,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;CAC3C;AAED,eAAO,MAAM,4BAA4B,iBAAkB,sBAAsB,SAShF,CAAA;AAED,KAAK,cAAc,GACb,qBAAqB,GACrB,SAAS,CAAA;AAEf,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,6BAA6B,EAAE,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/NavigtionBar/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC1G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAErC,UAAU,6BAA8B,SAAQ,IAAI,CAAC,0BAA0B,EAAE,oBAAoB,CAAC;IAClG;;;;OAIG;IACH,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,mBAAmB,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;CAC3C;AAED,eAAO,MAAM,4BAA4B,iBAAkB,sBAAsB,SAShF,CAAA;AAED,KAAK,cAAc,GACb,qBAAqB,GACrB,SAAS,CAAA;AAEf,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,6BAA6B,EAAE,cAAc,CAAC,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import type { UnistylesShadowRegistry as UnistylesShadowRegistrySpec } from './ShadowRegistry.nitro';
2
2
  import type { ShadowNode, Unistyle, ViewHandle } from './types';
3
3
  interface ShadowRegistry extends UnistylesShadowRegistrySpec {
4
- add(handle?: ViewHandle, style?: Unistyle): void;
4
+ add(handle?: ViewHandle, style?: Unistyle, variants?: Record<string, string | boolean>, args?: Array<any>): void;
5
5
  remove(handle?: ViewHandle, style?: Unistyle): void;
6
- link(node: ShadowNode, style: Unistyle): void;
7
- unlink(node: ShadowNode, style: Unistyle): void;
6
+ link(node: ShadowNode, style?: Unistyle, variants?: Record<string, string | boolean>, args?: Array<any>): void;
7
+ unlink(node: ShadowNode): void;
8
8
  }
9
9
  type PrivateMethods = 'add' | 'remove' | 'link' | 'unlink';
10
10
  export declare const UnistylesShadowRegistry: Omit<ShadowRegistry, PrivateMethods>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,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,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAC/G,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;CACjC;AAkCD,KAAK,cAAc,GACb,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,CAAA;AAEd,eAAO,MAAM,uBAAuB,EAA2B,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA"}
@@ -5,6 +5,11 @@ interface PrivateUnistylesStatusBar extends Omit<UnistylesStatusBarSpec, 'setBac
5
5
  setStyle(style: StatusBarStyle, animated?: boolean): void;
6
6
  setHidden(isHidden: boolean, animation?: StatusBarHiddenAnimation): void;
7
7
  _setHidden(isHidden: boolean, animation?: StatusBarHiddenAnimation): void;
8
+ /**
9
+ * Apps targeting Android SDK 35
10
+ * This API is deprecated as status bar background color is always transparent
11
+ * @deprecated
12
+ */
8
13
  setBackgroundColor(color?: string): void;
9
14
  _setBackgroundColor(color?: Color): void;
10
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StatusBar/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAC9F,OAAO,EAAE,KAAK,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAErD,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAEhE,UAAU,yBAA0B,SAAQ,IAAI,CAAC,sBAAsB,EAAE,oBAAoB,GAAG,WAAW,CAAC;IACxG,QAAQ,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1D,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,wBAAwB,G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,wBAAwB,iBAAkB,kBAAkB,SA0BxE,CAAA;AAED,KAAK,cAAc,GACb,qBAAqB,GACrB,YAAY,GACZ,SAAS,CAAA;AAEf,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,EAAE,cAAc,CAAC,CAAA"}
@@ -1,9 +1,11 @@
1
1
  import type { HybridObject } from 'react-native-nitro-modules';
2
+ import { UnistyleDependency } from '../NativePlatform';
2
3
  export interface UnistylesStyleSheet extends HybridObject<{
3
4
  ios: 'c++';
4
5
  android: 'c++';
5
6
  }> {
6
7
  readonly hairlineWidth: number;
7
- readonly __unid: number;
8
+ readonly unid: number;
9
+ addChangeListener(onChanged: (dependencies: Array<UnistyleDependency>) => void): () => void;
8
10
  }
9
11
  //# sourceMappingURL=UnistylesStyleSheet.nitro.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnistylesStyleSheet.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC;IACrF,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAC1B"}
1
+ {"version":3,"file":"UnistylesStyleSheet.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC;IACrF,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,iBAAiB,CAAC,SAAS,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,kBAAkB,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAC9F"}
@@ -17,12 +17,14 @@ export interface UnistylesStyleSheet extends UnistylesStyleSheetSpec {
17
17
  absoluteFill: typeof NativeStyleSheetType.absoluteFill;
18
18
  compose: typeof NativeStyleSheetType.compose;
19
19
  flatten: typeof NativeStyleSheetType.flatten;
20
+ init(): void;
20
21
  create: CreateUnistylesStyleSheet;
21
22
  configure(config: UnistylesConfig): void;
22
23
  jsMethods: {
23
24
  processColor: typeof processColor;
24
25
  };
25
26
  }
26
- export declare const StyleSheet: Omit<UnistylesStyleSheet, "jsMethods">;
27
+ type PrivateMethods = 'jsMethods' | 'addChangeListener' | 'init';
28
+ export declare const StyleSheet: Omit<UnistylesStyleSheet, PrivateMethods>;
27
29
  export {};
28
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAkC,MAAM,cAAc,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,KAAK,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE5D,KAAK,iBAAiB,GAAG;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,MAAM,MAAM,eAAe,CAAC,GAAG,M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AM,MAAM,eAAe,GAAG;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,WAAW,CAAC,EAAE,oBAAoB,CAAA;CACrC,CAAA;AAED,MAAM,WAAW,mBAAoB,SAAQ,uBAAuB;IAChE,kBAAkB,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC;IACnE,YAAY,EAAE,OAAO,oBAAoB,CAAC,YAAY,CAAC;IACvD,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC7C,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAG7C,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,EAAE,yBAAyB,CAAC;IAClC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,SAAS,EAAE;QACP,YAAY,EAAE,OAAO,YAAY,CAAA;KACpC,CAAA;CACJ;AAeD,KAAK,cAAc,GAAG,WAAW,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAEhE,eAAO,MAAM,UAAU,EAAgC,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAA"}
@@ -7,7 +7,6 @@ type Orientation = 'portrait' | 'landscape';
7
7
  export interface UnistylesCxxMiniRuntime extends UnistylesNativeMiniRuntime {
8
8
  readonly themeName?: string;
9
9
  readonly breakpoint?: string;
10
- readonly orientation: Orientation;
11
10
  readonly hasAdaptiveThemes: boolean;
12
11
  }
13
12
  export interface UnistylesMiniRuntime extends UnistylesCxxMiniRuntime {
@@ -1 +1 @@
1
- {"version":3,"file":"UnistylesRuntime.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,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import { type UnistylesStatusBar } from '../StatusBar';
4
4
  import { type UnistylesNavigationBar } from '../NavigtionBar';
5
- import type { AndroidContentSizeCategory, IOSContentSizeCategory } from '../../types';
5
+ import type { AndroidContentSizeCategory, IOSContentSizeCategory, UnistylesTheme } from '../../types';
6
+ import type { UnistylesThemes } from '../../global';
6
7
  export interface UnistylesRuntimePrivate extends Omit<UnistylesRuntimeSpec, 'setRootViewBackgroundColor'> {
7
8
  readonly colorScheme: ColorScheme;
8
9
  readonly themeName?: AppThemeName;
@@ -11,6 +12,7 @@ export interface UnistylesRuntimePrivate extends Omit<UnistylesRuntimeSpec, 'set
11
12
  readonly orientation: Orientation;
12
13
  statusBar: UnistylesStatusBar;
13
14
  navigationBar: UnistylesNavigationBar;
15
+ getTheme(themeName?: keyof UnistylesThemes): UnistylesTheme;
14
16
  setTheme(themeName: AppThemeName): void;
15
17
  updateTheme(themeName: AppThemeName, updater: (currentTheme: AppTheme) => AppTheme): void;
16
18
  setRootViewBackgroundColor(color?: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/UnistylesRuntime/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC9G,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACtG,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAChF,OAAO,EAAgC,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC3F,OAAO,KAAK,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAGrF,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,4BAA4B,CAAC;IACrG,QAAQ,CAAC,WAAW,EAAE,WAAW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EAA6B,gBAAgB,CAAA;AAEjE,YAAY,EACR,oBAAoB,EACvB,CAAA"}
@@ -1,10 +1,12 @@
1
1
  import './TurboUnistyles';
2
2
  import { Runtime } from './UnistylesRuntime';
3
3
  import { StyleSheet } from './StyleSheet';
4
+ import type { UnistylesStyleSheet } from './StyleSheet';
4
5
  import { UnistylesShadowRegistry } from './ShadowRegistry';
5
6
  import type { UnistylesMiniRuntime } from './UnistylesRuntime';
6
7
  import { StatusBarStyle, ColorScheme, Orientation } from './types';
7
- export { StatusBarStyle, ColorScheme, Orientation };
8
+ import { UnistyleDependency } from './NativePlatform';
9
+ export { StatusBarStyle, ColorScheme, Orientation, UnistyleDependency };
8
10
  export { UnistylesShadowRegistry, Runtime as UnistylesRuntime, StyleSheet, };
9
- export type { UnistylesMiniRuntime };
11
+ export type { UnistylesMiniRuntime, UnistylesStyleSheet };
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAElE,OAAO,EACH,cAAc,EACd,WAAW,EACX,WAAW,EACd,CAAA;AAED,OAAO,EACH,uBAAuB,EACvB,OAAO,IAAI,gBAAgB,EAC3B,UAAU,GACb,CAAA;AAED,YAAY,EACR,oBAAoB,EACvB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EACH,cAAc,EACd,WAAW,EACX,WAAW,EACX,kBAAkB,EACrB,CAAA;AAED,OAAO,EACH,uBAAuB,EACvB,OAAO,IAAI,gBAAgB,EAC3B,UAAU,GACb,CAAA;AAED,YAAY,EACR,oBAAoB,EACpB,mBAAmB,EACtB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import type { ReactElement } from 'react';
2
2
  export declare const getSSRUnistyles: () => Array<ReactElement>;
3
- export * from '../../web';
3
+ export * from '../web';
4
4
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC,eAAO,MAAM,eAAe,QAAe,KAAK,CAAC,YAAY,CAAC,CAAA;AAE9D,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC,eAAO,MAAM,eAAe,QAAe,KAAK,CAAC,YAAY,CAAC,CAAA;AAE9D,cAAc,QAAQ,CAAA"}
@@ -8,28 +8,28 @@ type ExtractTransformArray<T> = T extends object ? {
8
8
  type ExtractBreakpoints<T> = T extends object ? keyof T extends BreakpointsOrMediaQueries ? T[keyof T] : T extends Array<ToDeepUnistyles<TransformStyles>> ? Array<ExtractTransformArray<T[number]>> : {
9
9
  [K in keyof T]: ExtractBreakpoints<T[K]>;
10
10
  } : T;
11
- type ParseNestedObject<T> = T extends (...args: infer A) => infer R ? (...args: A) => ParseNestedObject<R> : T extends object ? T extends {
11
+ type ParseNestedObject<T, ShouldFlatten> = T extends (...args: infer A) => infer R ? (...args: A) => ParseNestedObject<R, false> : T extends object ? T extends {
12
12
  variants: infer R;
13
13
  compoundVariants: infer C;
14
- } ? ParseVariants<FlattenVariants<R>> & FlattenCompoundVariants<C> & ParseNestedObject<Omit<T, 'variants' | 'compoundVariants'>> : T extends {
14
+ } ? (ParseVariants<FlattenVariants<R, false>> & FlattenCompoundVariants<C, false> & ParseNestedObject<Omit<T, 'variants' | 'compoundVariants'>, false>) extends never ? ParseVariants<FlattenVariants<R, true>> & FlattenCompoundVariants<C, true> & ParseNestedObject<Omit<T, 'variants' | 'compoundVariants'>, false> : ParseVariants<FlattenVariants<R, false>> & FlattenCompoundVariants<C, false> & ParseNestedObject<Omit<T, 'variants' | 'compoundVariants'>, false> : T extends {
15
15
  variants: infer R;
16
- } ? ParseVariants<FlattenVariants<R>> & ParseNestedObject<Omit<T, 'variants'>> : T extends {
16
+ } ? (ParseVariants<FlattenVariants<R, false>> & ParseNestedObject<Omit<T, 'variants'>, false>) extends never ? ParseVariants<FlattenVariants<R, true>> & ParseNestedObject<Omit<T, 'variants'>, false> : ParseVariants<FlattenVariants<R, false>> & ParseNestedObject<Omit<T, 'variants'>, false> : T extends {
17
17
  compoundVariants: object;
18
- } ? ParseNestedObject<Omit<T, 'compoundVariants'>> : {
19
- [K in keyof T as K extends '_web' ? never : K]: T[K] extends object ? T[K] extends OpaqueColorValue ? ColorValue : ExtractBreakpoints<T[K]> : T[K];
18
+ } ? ParseNestedObject<Omit<T, 'compoundVariants'>, false> : {
19
+ [K in keyof T as K extends '_web' ? never : K]: T[K] extends object ? T[K] extends OpaqueColorValue ? ColorValue : ExtractBreakpoints<T[K]> : T[K] extends string ? ShouldFlatten extends true ? string : T[K] : T[K];
20
20
  } : T;
21
- type FlattenVariants<T> = T extends object ? {
21
+ type FlattenVariants<T, ShouldFlatten> = T extends object ? {
22
22
  [K in keyof T]: T[K] extends object ? {
23
- [key in keyof T[K]]: T[K][key] extends object ? ParseNestedObject<T[K][key]> : never;
23
+ [key in keyof T[K]]: T[K][key] extends object ? ParseNestedObject<T[K][key], ShouldFlatten> : never;
24
24
  } : never;
25
25
  } : never;
26
- type FlattenCompoundVariants<T> = T extends Array<infer _> ? FlattenCompoundVariants<T[number]> : T extends {
26
+ type FlattenCompoundVariants<T, ShouldFlatten> = T extends Array<infer _> ? FlattenCompoundVariants<T[number], ShouldFlatten> : T extends {
27
27
  styles: infer S;
28
- } ? ParseNestedObject<S> : never;
29
- type ParseVariants<T> = T extends object ? T[keyof T] extends object ? UnionToIntersection<ParseVariants<T[keyof T]>> : T : T;
28
+ } ? ParseNestedObject<S, ShouldFlatten> : never;
29
+ type ParseVariants<T> = T extends object ? T[keyof T] extends object ? UnionToIntersection<ParseVariants<T[keyof T]>> extends never ? ParseVariants<T[keyof T]> : UnionToIntersection<ParseVariants<T[keyof T]>> : T : T;
30
30
  type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
31
31
  type ParseStyleKeys<T> = T extends object ? {
32
- [K in keyof T]: ParseNestedObject<T[K]>;
32
+ [K in keyof T]: ParseNestedObject<T[K], false>;
33
33
  } : never;
34
34
  export type ReactNativeStyleSheet<T> = ParseStyleKeys<SafeReturnType<T>>;
35
35
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../../../src/types/breakpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,C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able } from './common';
2
2
  export type { NestedStylePairs, UnistylesTheme, ScreenSize, NestedStyle, RNValue, RNStyle } from './core';
3
3
  export type { CreateUnistylesStyleSheet, StyleSheet, AllAvailableKeys, UnistylesValues, UnistyleText, UnistyleView, UnistyleImage } from './stylesheet';
4
4
  export type { ReactNativeStyleSheet } from './breakpoints';
5
- export type { ExtractVariantNames } from './variants';
5
+ export type { ExtractVariantNames, UnistylesVariants } from './variants';
6
6
  export { AndroidContentSizeCategory, IOSContentSizeCategory, WebContentSizeCategory } from './accessibility';
7
7
  //# sourceMappingURL=index.d.ts.map