react-native-unistyles 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (396) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +38 -30
  3. package/lib/commonjs/UnistylesTheme.js +21 -0
  4. package/lib/commonjs/UnistylesTheme.js.map +1 -0
  5. package/lib/commonjs/createUnistyles.js +57 -0
  6. package/lib/commonjs/createUnistyles.js.map +1 -0
  7. package/lib/commonjs/hooks/index.js +3 -24
  8. package/lib/commonjs/hooks/index.js.map +1 -1
  9. package/lib/commonjs/hooks/useDimensions.js +10 -0
  10. package/lib/commonjs/hooks/useDimensions.js.map +1 -0
  11. package/lib/commonjs/hooks/useDimensions.web.js +34 -0
  12. package/lib/commonjs/hooks/useDimensions.web.js.map +1 -0
  13. package/lib/commonjs/index.js +6 -63
  14. package/lib/commonjs/index.js.map +1 -1
  15. package/lib/commonjs/types/index.js +0 -11
  16. package/lib/commonjs/types/index.js.map +1 -1
  17. package/lib/commonjs/types/mediaQueries.js +2 -0
  18. package/lib/commonjs/types/{unistyles.js.map → mediaQueries.js.map} +1 -1
  19. package/lib/commonjs/utils/breakpoints.js +122 -20
  20. package/lib/commonjs/utils/breakpoints.js.map +1 -1
  21. package/lib/commonjs/utils/common.js +20 -0
  22. package/lib/commonjs/utils/common.js.map +1 -0
  23. package/lib/commonjs/utils/index.js +54 -22
  24. package/lib/commonjs/utils/index.js.map +1 -1
  25. package/lib/commonjs/utils/mediaQueries.js +189 -0
  26. package/lib/commonjs/utils/mediaQueries.js.map +1 -0
  27. package/lib/{module/types/common.js.map → commonjs/utils/module.d.js.map} +1 -1
  28. package/lib/commonjs/utils/normalizeStyles.js +10 -0
  29. package/lib/commonjs/utils/normalizeStyles.js.map +1 -0
  30. package/lib/commonjs/{normalizer/normalizeStyle.js → utils/normalizeStyles.web.js} +5 -5
  31. package/lib/commonjs/utils/normalizeStyles.web.js.map +1 -0
  32. package/lib/commonjs/{normalizer → utils}/normalizer.js +3 -2
  33. package/lib/commonjs/utils/normalizer.js.map +1 -0
  34. package/lib/commonjs/utils/styles.js +72 -45
  35. package/lib/commonjs/utils/styles.js.map +1 -1
  36. package/lib/module/UnistylesTheme.js +12 -0
  37. package/lib/module/UnistylesTheme.js.map +1 -0
  38. package/lib/module/createUnistyles.js +50 -0
  39. package/lib/module/createUnistyles.js.map +1 -0
  40. package/lib/module/hooks/index.js +1 -4
  41. package/lib/module/hooks/index.js.map +1 -1
  42. package/lib/module/hooks/useDimensions.js +3 -0
  43. package/lib/module/hooks/useDimensions.js.map +1 -0
  44. package/lib/module/hooks/useDimensions.web.js +27 -0
  45. package/lib/module/hooks/useDimensions.web.js.map +1 -0
  46. package/lib/module/index.js +2 -30
  47. package/lib/module/index.js.map +1 -1
  48. package/lib/module/types/index.js +0 -1
  49. package/lib/module/types/index.js.map +1 -1
  50. package/lib/module/types/mediaQueries.js +2 -0
  51. package/lib/{commonjs/types/stylesheet.js.map → module/types/mediaQueries.js.map} +1 -1
  52. package/lib/module/utils/breakpoints.js +120 -19
  53. package/lib/module/utils/breakpoints.js.map +1 -1
  54. package/lib/module/utils/common.js +12 -0
  55. package/lib/module/utils/common.js.map +1 -0
  56. package/lib/module/utils/index.js +6 -6
  57. package/lib/module/utils/index.js.map +1 -1
  58. package/lib/module/utils/mediaQueries.js +176 -0
  59. package/lib/module/utils/mediaQueries.js.map +1 -0
  60. package/lib/{commonjs/types/variants.js.map → module/utils/module.d.js.map} +1 -1
  61. package/lib/module/utils/normalizeStyles.js +3 -0
  62. package/lib/module/utils/normalizeStyles.js.map +1 -0
  63. package/lib/module/{normalizer/normalizeStyle.js → utils/normalizeStyles.web.js} +3 -3
  64. package/lib/module/utils/normalizeStyles.web.js.map +1 -0
  65. package/lib/module/{normalizer → utils}/normalizer.js +3 -2
  66. package/lib/module/utils/normalizer.js.map +1 -0
  67. package/lib/module/utils/styles.js +72 -44
  68. package/lib/module/utils/styles.js.map +1 -1
  69. package/lib/typescript/examples/expo/src/App.d.ts +3 -0
  70. package/lib/typescript/examples/expo/src/App.d.ts.map +1 -0
  71. package/lib/typescript/examples/expo/src/examples/Breakpoints.d.ts +3 -0
  72. package/lib/typescript/examples/expo/src/examples/Breakpoints.d.ts.map +1 -0
  73. package/lib/typescript/examples/expo/src/examples/EmptyStyles.d.ts +3 -0
  74. package/lib/typescript/examples/expo/src/examples/EmptyStyles.d.ts.map +1 -0
  75. package/lib/typescript/examples/expo/src/examples/Extreme.d.ts +7 -0
  76. package/lib/typescript/examples/expo/src/examples/Extreme.d.ts.map +1 -0
  77. package/lib/typescript/examples/expo/src/examples/MediaQueries.d.ts +3 -0
  78. package/lib/typescript/examples/expo/src/examples/MediaQueries.d.ts.map +1 -0
  79. package/lib/typescript/examples/expo/src/examples/Memoization.d.ts +3 -0
  80. package/lib/typescript/examples/expo/src/examples/Memoization.d.ts.map +1 -0
  81. package/lib/typescript/examples/expo/src/examples/Minimal.d.ts +3 -0
  82. package/lib/typescript/examples/expo/src/examples/Minimal.d.ts.map +1 -0
  83. package/lib/typescript/examples/expo/src/examples/MinimalWithCreateStyleSheet.d.ts +3 -0
  84. package/lib/typescript/examples/expo/src/examples/MinimalWithCreateStyleSheet.d.ts.map +1 -0
  85. package/lib/typescript/examples/expo/src/examples/PlatformColors.d.ts +3 -0
  86. package/lib/typescript/examples/expo/src/examples/PlatformColors.d.ts.map +1 -0
  87. package/lib/typescript/examples/expo/src/examples/Theme.d.ts +3 -0
  88. package/lib/typescript/examples/expo/src/examples/Theme.d.ts.map +1 -0
  89. package/lib/typescript/examples/expo/src/examples/index.d.ts +9 -0
  90. package/lib/typescript/examples/expo/src/examples/index.d.ts.map +1 -0
  91. package/lib/typescript/examples/expo/src/index.d.ts +2 -0
  92. package/lib/typescript/examples/expo/src/index.d.ts.map +1 -0
  93. package/lib/typescript/examples/expo/src/styles/breakpoints.d.ts +8 -0
  94. package/lib/typescript/examples/expo/src/styles/breakpoints.d.ts.map +1 -0
  95. package/lib/typescript/examples/expo/src/styles/index.d.ts +46 -0
  96. package/lib/typescript/examples/expo/src/styles/index.d.ts.map +1 -0
  97. package/lib/typescript/examples/expo/src/styles/theme.d.ts +24 -0
  98. package/lib/typescript/examples/expo/src/styles/theme.d.ts.map +1 -0
  99. package/lib/typescript/src/UnistylesTheme.d.ts +9 -0
  100. package/lib/typescript/src/UnistylesTheme.d.ts.map +1 -0
  101. package/lib/typescript/src/createUnistyles.d.ts +10 -0
  102. package/lib/typescript/src/createUnistyles.d.ts.map +1 -0
  103. package/lib/typescript/src/hooks/index.d.ts +1 -4
  104. package/lib/typescript/src/hooks/index.d.ts.map +1 -1
  105. package/lib/typescript/src/hooks/useDimensions.d.ts +3 -0
  106. package/lib/typescript/src/hooks/useDimensions.d.ts.map +1 -0
  107. package/lib/typescript/src/hooks/useDimensions.web.d.ts +3 -0
  108. package/lib/typescript/src/hooks/useDimensions.web.d.ts.map +1 -0
  109. package/lib/typescript/src/index.d.ts +2 -76
  110. package/lib/typescript/src/index.d.ts.map +1 -1
  111. package/lib/typescript/src/types/breakpoints.d.ts +17 -25
  112. package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
  113. package/lib/typescript/src/types/core.d.ts +25 -11
  114. package/lib/typescript/src/types/core.d.ts.map +1 -1
  115. package/lib/typescript/src/types/index.d.ts +2 -7
  116. package/lib/typescript/src/types/index.d.ts.map +1 -1
  117. package/lib/typescript/src/types/mediaQueries.d.ts +8 -0
  118. package/lib/typescript/src/types/mediaQueries.d.ts.map +1 -0
  119. package/lib/typescript/src/utils/breakpoints.d.ts +62 -2
  120. package/lib/typescript/src/utils/breakpoints.d.ts.map +1 -1
  121. package/lib/typescript/src/utils/common.d.ts +7 -0
  122. package/lib/typescript/src/utils/common.d.ts.map +1 -0
  123. package/lib/typescript/src/utils/index.d.ts +6 -7
  124. package/lib/typescript/src/utils/index.d.ts.map +1 -1
  125. package/lib/typescript/src/utils/mediaQueries.d.ts +130 -0
  126. package/lib/typescript/src/utils/mediaQueries.d.ts.map +1 -0
  127. package/lib/typescript/src/utils/normalizeStyles.d.ts +2 -0
  128. package/lib/typescript/src/utils/normalizeStyles.d.ts.map +1 -0
  129. package/lib/typescript/src/utils/normalizeStyles.web.d.ts +5 -0
  130. package/lib/typescript/src/utils/normalizeStyles.web.d.ts.map +1 -0
  131. package/lib/typescript/src/utils/normalizer.d.ts.map +1 -0
  132. package/lib/typescript/src/utils/styles.d.ts +49 -3
  133. package/lib/typescript/src/utils/styles.d.ts.map +1 -1
  134. package/package.json +25 -46
  135. package/src/UnistylesTheme.tsx +17 -0
  136. package/src/__tests__/createUnistyles.spec.tsx +192 -0
  137. package/src/createUnistyles.ts +70 -0
  138. package/src/hooks/index.ts +1 -4
  139. package/src/hooks/useDimensions.ts +4 -0
  140. package/src/hooks/useDimensions.web.ts +34 -0
  141. package/src/index.ts +2 -50
  142. package/src/types/breakpoints.ts +33 -58
  143. package/src/types/core.ts +36 -11
  144. package/src/types/index.ts +7 -12
  145. package/src/types/mediaQueries.ts +10 -0
  146. package/src/utils/breakpoints.ts +124 -28
  147. package/src/utils/common.ts +14 -0
  148. package/src/utils/index.ts +13 -7
  149. package/src/utils/mediaQueries.ts +201 -0
  150. package/src/utils/normalizeStyles.ts +2 -0
  151. package/src/{normalizer/normalizeStyle.ts → utils/normalizeStyles.web.ts} +3 -3
  152. package/src/{normalizer → utils}/normalizer.ts +4 -5
  153. package/src/utils/styles.ts +102 -54
  154. package/android/CMakeLists.txt +0 -27
  155. package/android/build.gradle +0 -75
  156. package/android/src/main/cxx/cpp-adapter.cpp +0 -132
  157. package/android/src/main/java/com/unistyles/UnistylesModule.kt +0 -189
  158. package/android/src/main/java/com/unistyles/UnistylesPackage.kt +0 -18
  159. package/cxx/UnistylesRuntime.cpp +0 -318
  160. package/cxx/UnistylesRuntime.h +0 -74
  161. package/ios/UnistylesHelpers.h +0 -3
  162. package/ios/UnistylesHelpers.mm +0 -5
  163. package/ios/UnistylesModule.h +0 -16
  164. package/ios/UnistylesModule.mm +0 -138
  165. package/ios/platform/Platform_iOS.h +0 -21
  166. package/ios/platform/Platform_iOS.mm +0 -132
  167. package/ios/platform/Platform_macOS.h +0 -20
  168. package/ios/platform/Platform_macOS.mm +0 -83
  169. package/lib/commonjs/common.js +0 -60
  170. package/lib/commonjs/common.js.map +0 -1
  171. package/lib/commonjs/core/UnistyleRegistry.js +0 -94
  172. package/lib/commonjs/core/UnistyleRegistry.js.map +0 -1
  173. package/lib/commonjs/core/Unistyles.js +0 -32
  174. package/lib/commonjs/core/Unistyles.js.map +0 -1
  175. package/lib/commonjs/core/UnistylesModule.js +0 -197
  176. package/lib/commonjs/core/UnistylesModule.js.map +0 -1
  177. package/lib/commonjs/core/UnistylesModule.native.js +0 -9
  178. package/lib/commonjs/core/UnistylesModule.native.js.map +0 -1
  179. package/lib/commonjs/core/UnistylesRuntime.js +0 -140
  180. package/lib/commonjs/core/UnistylesRuntime.js.map +0 -1
  181. package/lib/commonjs/core/index.js +0 -13
  182. package/lib/commonjs/core/index.js.map +0 -1
  183. package/lib/commonjs/createStyleSheet.js +0 -14
  184. package/lib/commonjs/createStyleSheet.js.map +0 -1
  185. package/lib/commonjs/global.js +0 -2
  186. package/lib/commonjs/global.js.map +0 -1
  187. package/lib/commonjs/hooks/useCSS.js +0 -44
  188. package/lib/commonjs/hooks/useCSS.js.map +0 -1
  189. package/lib/commonjs/hooks/useCSS.native.js +0 -9
  190. package/lib/commonjs/hooks/useCSS.native.js.map +0 -1
  191. package/lib/commonjs/hooks/useInitialTheme.js +0 -17
  192. package/lib/commonjs/hooks/useInitialTheme.js.map +0 -1
  193. package/lib/commonjs/hooks/useUnistyles.js +0 -64
  194. package/lib/commonjs/hooks/useUnistyles.js.map +0 -1
  195. package/lib/commonjs/hooks/useVariants.js +0 -14
  196. package/lib/commonjs/hooks/useVariants.js.map +0 -1
  197. package/lib/commonjs/normalizer/index.js +0 -32
  198. package/lib/commonjs/normalizer/index.js.map +0 -1
  199. package/lib/commonjs/normalizer/module.d.js.map +0 -1
  200. package/lib/commonjs/normalizer/normalizeStyle.js.map +0 -1
  201. package/lib/commonjs/normalizer/normalizer.js.map +0 -1
  202. package/lib/commonjs/normalizer/normalizer.macos.js +0 -3
  203. package/lib/commonjs/normalizer/normalizer.macos.js.map +0 -1
  204. package/lib/commonjs/plugins/cssMediaQueriesPlugin.js +0 -14
  205. package/lib/commonjs/plugins/cssMediaQueriesPlugin.js.map +0 -1
  206. package/lib/commonjs/plugins/index.js +0 -20
  207. package/lib/commonjs/plugins/index.js.map +0 -1
  208. package/lib/commonjs/plugins/normalizeWebStylesPlugin.js +0 -12
  209. package/lib/commonjs/plugins/normalizeWebStylesPlugin.js.map +0 -1
  210. package/lib/commonjs/types/common.js +0 -2
  211. package/lib/commonjs/types/common.js.map +0 -1
  212. package/lib/commonjs/types/plugin.js +0 -6
  213. package/lib/commonjs/types/plugin.js.map +0 -1
  214. package/lib/commonjs/types/stylesheet.js +0 -6
  215. package/lib/commonjs/types/unistyles.js +0 -6
  216. package/lib/commonjs/types/variants.js +0 -2
  217. package/lib/commonjs/useStyles.js +0 -47
  218. package/lib/commonjs/useStyles.js.map +0 -1
  219. package/lib/commonjs/utils/cssMediaQuery.js +0 -244
  220. package/lib/commonjs/utils/cssMediaQuery.js.map +0 -1
  221. package/lib/commonjs/utils/generateId.js +0 -15
  222. package/lib/commonjs/utils/generateId.js.map +0 -1
  223. package/lib/commonjs/utils/hash32.js +0 -43
  224. package/lib/commonjs/utils/hash32.js.map +0 -1
  225. package/lib/commonjs/utils/mq.js +0 -38
  226. package/lib/commonjs/utils/mq.js.map +0 -1
  227. package/lib/commonjs/utils/mqParser.js +0 -89
  228. package/lib/commonjs/utils/mqParser.js.map +0 -1
  229. package/lib/commonjs/utils/withPlugins.js +0 -15
  230. package/lib/commonjs/utils/withPlugins.js.map +0 -1
  231. package/lib/module/common.js +0 -53
  232. package/lib/module/common.js.map +0 -1
  233. package/lib/module/core/UnistyleRegistry.js +0 -87
  234. package/lib/module/core/UnistyleRegistry.js.map +0 -1
  235. package/lib/module/core/Unistyles.js +0 -26
  236. package/lib/module/core/Unistyles.js.map +0 -1
  237. package/lib/module/core/UnistylesModule.js +0 -190
  238. package/lib/module/core/UnistylesModule.js.map +0 -1
  239. package/lib/module/core/UnistylesModule.native.js +0 -3
  240. package/lib/module/core/UnistylesModule.native.js.map +0 -1
  241. package/lib/module/core/UnistylesRuntime.js +0 -133
  242. package/lib/module/core/UnistylesRuntime.js.map +0 -1
  243. package/lib/module/core/index.js +0 -2
  244. package/lib/module/core/index.js.map +0 -1
  245. package/lib/module/createStyleSheet.js +0 -7
  246. package/lib/module/createStyleSheet.js.map +0 -1
  247. package/lib/module/global.js +0 -2
  248. package/lib/module/global.js.map +0 -1
  249. package/lib/module/hooks/useCSS.js +0 -37
  250. package/lib/module/hooks/useCSS.js.map +0 -1
  251. package/lib/module/hooks/useCSS.native.js +0 -2
  252. package/lib/module/hooks/useCSS.native.js.map +0 -1
  253. package/lib/module/hooks/useInitialTheme.js +0 -10
  254. package/lib/module/hooks/useInitialTheme.js.map +0 -1
  255. package/lib/module/hooks/useUnistyles.js +0 -57
  256. package/lib/module/hooks/useUnistyles.js.map +0 -1
  257. package/lib/module/hooks/useVariants.js +0 -7
  258. package/lib/module/hooks/useVariants.js.map +0 -1
  259. package/lib/module/normalizer/index.js +0 -3
  260. package/lib/module/normalizer/index.js.map +0 -1
  261. package/lib/module/normalizer/module.d.js.map +0 -1
  262. package/lib/module/normalizer/normalizeStyle.js.map +0 -1
  263. package/lib/module/normalizer/normalizer.js.map +0 -1
  264. package/lib/module/normalizer/normalizer.macos.js +0 -2
  265. package/lib/module/normalizer/normalizer.macos.js.map +0 -1
  266. package/lib/module/plugins/cssMediaQueriesPlugin.js +0 -7
  267. package/lib/module/plugins/cssMediaQueriesPlugin.js.map +0 -1
  268. package/lib/module/plugins/index.js +0 -3
  269. package/lib/module/plugins/index.js.map +0 -1
  270. package/lib/module/plugins/normalizeWebStylesPlugin.js +0 -6
  271. package/lib/module/plugins/normalizeWebStylesPlugin.js.map +0 -1
  272. package/lib/module/types/common.js +0 -2
  273. package/lib/module/types/plugin.js +0 -2
  274. package/lib/module/types/plugin.js.map +0 -1
  275. package/lib/module/types/stylesheet.js +0 -2
  276. package/lib/module/types/stylesheet.js.map +0 -1
  277. package/lib/module/types/unistyles.js +0 -2
  278. package/lib/module/types/unistyles.js.map +0 -1
  279. package/lib/module/types/variants.js +0 -2
  280. package/lib/module/types/variants.js.map +0 -1
  281. package/lib/module/useStyles.js +0 -40
  282. package/lib/module/useStyles.js.map +0 -1
  283. package/lib/module/utils/cssMediaQuery.js +0 -237
  284. package/lib/module/utils/cssMediaQuery.js.map +0 -1
  285. package/lib/module/utils/generateId.js +0 -7
  286. package/lib/module/utils/generateId.js.map +0 -1
  287. package/lib/module/utils/hash32.js +0 -36
  288. package/lib/module/utils/hash32.js.map +0 -1
  289. package/lib/module/utils/mq.js +0 -32
  290. package/lib/module/utils/mq.js.map +0 -1
  291. package/lib/module/utils/mqParser.js +0 -78
  292. package/lib/module/utils/mqParser.js.map +0 -1
  293. package/lib/module/utils/withPlugins.js +0 -8
  294. package/lib/module/utils/withPlugins.js.map +0 -1
  295. package/lib/typescript/src/common.d.ts +0 -46
  296. package/lib/typescript/src/common.d.ts.map +0 -1
  297. package/lib/typescript/src/core/UnistyleRegistry.d.ts +0 -56
  298. package/lib/typescript/src/core/UnistyleRegistry.d.ts.map +0 -1
  299. package/lib/typescript/src/core/Unistyles.d.ts +0 -13
  300. package/lib/typescript/src/core/Unistyles.d.ts.map +0 -1
  301. package/lib/typescript/src/core/UnistylesModule.d.ts +0 -19
  302. package/lib/typescript/src/core/UnistylesModule.d.ts.map +0 -1
  303. package/lib/typescript/src/core/UnistylesModule.native.d.ts +0 -6
  304. package/lib/typescript/src/core/UnistylesModule.native.d.ts.map +0 -1
  305. package/lib/typescript/src/core/UnistylesRuntime.d.ts +0 -81
  306. package/lib/typescript/src/core/UnistylesRuntime.d.ts.map +0 -1
  307. package/lib/typescript/src/core/index.d.ts +0 -3
  308. package/lib/typescript/src/core/index.d.ts.map +0 -1
  309. package/lib/typescript/src/createStyleSheet.d.ts +0 -8
  310. package/lib/typescript/src/createStyleSheet.d.ts.map +0 -1
  311. package/lib/typescript/src/global.d.ts +0 -7
  312. package/lib/typescript/src/global.d.ts.map +0 -1
  313. package/lib/typescript/src/hooks/useCSS.d.ts +0 -3
  314. package/lib/typescript/src/hooks/useCSS.d.ts.map +0 -1
  315. package/lib/typescript/src/hooks/useCSS.native.d.ts +0 -3
  316. package/lib/typescript/src/hooks/useCSS.native.d.ts.map +0 -1
  317. package/lib/typescript/src/hooks/useInitialTheme.d.ts +0 -3
  318. package/lib/typescript/src/hooks/useInitialTheme.d.ts.map +0 -1
  319. package/lib/typescript/src/hooks/useUnistyles.d.ts +0 -14
  320. package/lib/typescript/src/hooks/useUnistyles.d.ts.map +0 -1
  321. package/lib/typescript/src/hooks/useVariants.d.ts +0 -3
  322. package/lib/typescript/src/hooks/useVariants.d.ts.map +0 -1
  323. package/lib/typescript/src/normalizer/index.d.ts +0 -3
  324. package/lib/typescript/src/normalizer/index.d.ts.map +0 -1
  325. package/lib/typescript/src/normalizer/normalizeStyle.d.ts +0 -3
  326. package/lib/typescript/src/normalizer/normalizeStyle.d.ts.map +0 -1
  327. package/lib/typescript/src/normalizer/normalizer.d.ts.map +0 -1
  328. package/lib/typescript/src/normalizer/normalizer.macos.d.ts +0 -1
  329. package/lib/typescript/src/normalizer/normalizer.macos.d.ts.map +0 -1
  330. package/lib/typescript/src/plugins/cssMediaQueriesPlugin.d.ts +0 -3
  331. package/lib/typescript/src/plugins/cssMediaQueriesPlugin.d.ts.map +0 -1
  332. package/lib/typescript/src/plugins/index.d.ts +0 -3
  333. package/lib/typescript/src/plugins/index.d.ts.map +0 -1
  334. package/lib/typescript/src/plugins/normalizeWebStylesPlugin.d.ts +0 -3
  335. package/lib/typescript/src/plugins/normalizeWebStylesPlugin.d.ts.map +0 -1
  336. package/lib/typescript/src/types/common.d.ts +0 -3
  337. package/lib/typescript/src/types/common.d.ts.map +0 -1
  338. package/lib/typescript/src/types/plugin.d.ts +0 -7
  339. package/lib/typescript/src/types/plugin.d.ts.map +0 -1
  340. package/lib/typescript/src/types/stylesheet.d.ts +0 -40
  341. package/lib/typescript/src/types/stylesheet.d.ts.map +0 -1
  342. package/lib/typescript/src/types/unistyles.d.ts +0 -53
  343. package/lib/typescript/src/types/unistyles.d.ts.map +0 -1
  344. package/lib/typescript/src/types/variants.d.ts +0 -14
  345. package/lib/typescript/src/types/variants.d.ts.map +0 -1
  346. package/lib/typescript/src/useStyles.d.ts +0 -16
  347. package/lib/typescript/src/useStyles.d.ts.map +0 -1
  348. package/lib/typescript/src/utils/cssMediaQuery.d.ts +0 -4
  349. package/lib/typescript/src/utils/cssMediaQuery.d.ts.map +0 -1
  350. package/lib/typescript/src/utils/generateId.d.ts +0 -2
  351. package/lib/typescript/src/utils/generateId.d.ts.map +0 -1
  352. package/lib/typescript/src/utils/hash32.d.ts +0 -2
  353. package/lib/typescript/src/utils/hash32.d.ts.map +0 -1
  354. package/lib/typescript/src/utils/mq.d.ts +0 -26
  355. package/lib/typescript/src/utils/mq.d.ts.map +0 -1
  356. package/lib/typescript/src/utils/mqParser.d.ts +0 -16
  357. package/lib/typescript/src/utils/mqParser.d.ts.map +0 -1
  358. package/lib/typescript/src/utils/withPlugins.d.ts +0 -3
  359. package/lib/typescript/src/utils/withPlugins.d.ts.map +0 -1
  360. package/react-native-unistyles.podspec +0 -22
  361. package/src/__tests__/mocks.ts +0 -24
  362. package/src/common.ts +0 -55
  363. package/src/core/UnistyleRegistry.ts +0 -108
  364. package/src/core/Unistyles.ts +0 -35
  365. package/src/core/UnistylesModule.native.ts +0 -7
  366. package/src/core/UnistylesModule.ts +0 -230
  367. package/src/core/UnistylesRuntime.ts +0 -135
  368. package/src/core/index.ts +0 -2
  369. package/src/createStyleSheet.ts +0 -8
  370. package/src/global.ts +0 -6
  371. package/src/hooks/useCSS.native.ts +0 -3
  372. package/src/hooks/useCSS.ts +0 -51
  373. package/src/hooks/useInitialTheme.ts +0 -11
  374. package/src/hooks/useUnistyles.ts +0 -64
  375. package/src/hooks/useVariants.ts +0 -10
  376. package/src/normalizer/index.ts +0 -2
  377. package/src/normalizer/normalizer.macos.ts +0 -1
  378. package/src/plugins/cssMediaQueriesPlugin.ts +0 -8
  379. package/src/plugins/index.ts +0 -2
  380. package/src/plugins/normalizeWebStylesPlugin.ts +0 -7
  381. package/src/types/common.ts +0 -2
  382. package/src/types/plugin.ts +0 -7
  383. package/src/types/stylesheet.ts +0 -49
  384. package/src/types/unistyles.ts +0 -63
  385. package/src/types/variants.ts +0 -19
  386. package/src/useStyles.ts +0 -60
  387. package/src/utils/cssMediaQuery.ts +0 -268
  388. package/src/utils/generateId.ts +0 -10
  389. package/src/utils/hash32.ts +0 -53
  390. package/src/utils/mq.ts +0 -57
  391. package/src/utils/mqParser.ts +0 -99
  392. package/src/utils/withPlugins.ts +0 -13
  393. /package/lib/commonjs/{normalizer → utils}/module.d.js +0 -0
  394. /package/lib/module/{normalizer → utils}/module.d.js +0 -0
  395. /package/lib/typescript/src/{normalizer → utils}/normalizer.d.ts +0 -0
  396. /package/src/{normalizer → utils}/module.d.ts +0 -0
@@ -1,19 +0,0 @@
1
- export declare class UnistylesBridgeWeb {
2
- #private;
3
- constructor();
4
- install(): boolean;
5
- private useTheme;
6
- private useBreakpoints;
7
- private useAdaptiveThemes;
8
- private addPlugin;
9
- private removePlugin;
10
- private getTheme;
11
- private setupListeners;
12
- private getBreakpointFromScreenWidth;
13
- private getPreferredColorScheme;
14
- private emitPluginChange;
15
- private emitThemeChange;
16
- private emitLayoutChange;
17
- }
18
- export declare const UnistylesModule: UnistylesBridgeWeb;
19
- //# sourceMappingURL=UnistylesModule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnistylesModule.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.ts"],"names":[],"mappings":"AAMA,qBAAa,kBAAkB;;;IAwBpB,OAAO;IA+Dd,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,cAAc;IA6BtB,OAAO,CAAC,4BAA4B;IAgBpC,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,gBAAgB;CAe3B;AAED,eAAO,MAAM,eAAe,oBAA2B,CAAA"}
@@ -1,6 +0,0 @@
1
- type UnistylesNativeModule = {
2
- install(): boolean;
3
- };
4
- export declare const UnistylesModule: UnistylesNativeModule;
5
- export {};
6
- //# sourceMappingURL=UnistylesModule.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnistylesModule.native.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.native.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IACzB,OAAO,IAAI,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,eAAe,uBAAoD,CAAA"}
@@ -1,81 +0,0 @@
1
- import type { UnistylesBridge, UnistylesPlugin } from '../types';
2
- import type { UnistylesThemes } from '../global';
3
- import type { UnistyleRegistry } from './UnistyleRegistry';
4
- /**
5
- * Utility to interact with the Unistyles during runtime
6
- */
7
- export declare class UnistylesRuntime {
8
- private unistylesBridge;
9
- private unistylesRegistry;
10
- constructor(unistylesBridge: UnistylesBridge, unistylesRegistry: UnistyleRegistry);
11
- /**
12
- * Get the current color scheme
13
- * @returns - The current color scheme
14
- */
15
- get colorScheme(): import("../types").ColorSchemeName;
16
- /**
17
- * Get info about adaptive themes
18
- * @returns - boolean indicating if the adaptive themes are enabled
19
- */
20
- get hasAdaptiveThemes(): boolean;
21
- /**
22
- * Get the current theme name
23
- * @returns - The current theme name
24
- */
25
- get themeName(): never;
26
- /**
27
- * Get the current content size category
28
- * @returns - The current content size category
29
- */
30
- get contentSizeCategory(): import("../common").IOSContentSizeCategory | import("../common").AndroidContentSizeCategory;
31
- /**
32
- * Get the current breakpoint based on device size
33
- * @returns - The current breakpoint
34
- */
35
- get breakpoint(): keyof import("../global").UnistylesBreakpoints;
36
- /**
37
- * Get registered breakpoints with UnitylesRegistry
38
- * @returns - The registered breakpoints
39
- */
40
- get breakpoints(): import("../global").UnistylesBreakpoints;
41
- /**
42
- * Get the names of currently enabled plugins
43
- * @returns - The names of currently enabled plugins
44
- */
45
- get enabledPlugins(): string[];
46
- /**
47
- * Get the screen size
48
- * @returns - The screen size { width, height }
49
- */
50
- get screen(): {
51
- width: number;
52
- height: number;
53
- };
54
- /**
55
- * Get the screen orientation
56
- * @returns - The screen orientation
57
- */
58
- get orientation(): "landscape" | "portrait";
59
- /**
60
- * Switch to a different theme
61
- * @param name - The name of the theme to switch to
62
- * @returns - boolean indicating if the theme was switched
63
- */
64
- setTheme: (name: keyof UnistylesThemes) => true | undefined;
65
- /**
66
- * Enable or disable adaptive themes
67
- * @param enable - boolean indicating if adaptive themes should be enabled
68
- */
69
- setAdaptiveThemes: (enable: boolean) => void;
70
- /**
71
- * Enable a plugin
72
- * @param plugin - Plugin that conforms to UnistylesPlugin interface
73
- */
74
- addPlugin: (plugin: UnistylesPlugin) => void;
75
- /**
76
- * Disable a plugin
77
- * @param plugin - Plugin that conforms to UnistylesPlugin interface
78
- */
79
- removePlugin: (plugin: UnistylesPlugin) => void;
80
- }
81
- //# sourceMappingURL=UnistylesRuntime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnistylesRuntime.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesRuntime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE1D;;GAEG;AACH,qBAAa,gBAAgB;IACb,OAAO,CAAC,eAAe;IAAmB,OAAO,CAAC,iBAAiB;gBAA3D,eAAe,EAAE,eAAe,EAAU,iBAAiB,EAAE,gBAAgB;IAEjG;;;OAGG;IACH,IAAW,WAAW,uCAErB;IAED;;;OAGG;IACH,IAAW,iBAAiB,YAE3B;IAED;;;OAGG;IACH,IAAW,SAAS,UAEnB;IAED;;;OAGG;IACH,IAAW,mBAAmB,gGAE7B;IAED;;;OAGG;IACH,IAAW,UAAU,mDAEpB;IAED;;;OAGG;IACH,IAAW,WAAW,6CAErB;IAED;;;OAGG;IACH,IAAW,cAAc,aAExB;IAED;;;OAGG;IACH,IAAW,MAAM;;;MAKhB;IAED;;;OAGG;IACH,IAAW,WAAW,6BAQrB;IAED;;;;OAIG;IACI,QAAQ,SAAU,MAAM,eAAe,sBAY7C;IAED;;;OAGG;IACI,iBAAiB,WAAY,OAAO,UAE1C;IAED;;;OAGG;IACI,SAAS,WAAY,eAAe,UAE1C;IAED;;;OAGG;IACI,YAAY,WAAY,eAAe,UAE7C;CACJ"}
@@ -1,3 +0,0 @@
1
- export { unistyles } from './Unistyles';
2
- export type { UnistylesRuntime } from './UnistylesRuntime';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,8 +0,0 @@
1
- import type { StyleSheetWithSuperPowers } from './types';
2
- /**
3
- * Utility to create a stylesheet with superpowers
4
- * Compatible with React Native StyleSheet.create
5
- * @param stylesheet - The stylesheet with superpowers to be used
6
- */
7
- export declare const createStyleSheet: <S extends StyleSheetWithSuperPowers>(stylesheet: S) => S;
8
- //# sourceMappingURL=createStyleSheet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createStyleSheet.d.ts","sourceRoot":"","sources":["../../../src/createStyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAExD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,2DAAwE,CAAA"}
@@ -1,7 +0,0 @@
1
- export interface UnistylesThemes {
2
- }
3
- export interface UnistylesBreakpoints {
4
- landscape?: number;
5
- portrait?: number;
6
- }
7
- //# sourceMappingURL=global.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/global.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;CAAG;AACnC,MAAM,WAAW,oBAAoB;IAEjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -1,3 +0,0 @@
1
- import type { ReactNativeStyleSheet } from '../types';
2
- export declare const useCSS: <T>(stylesheet: ReactNativeStyleSheet<T>) => void;
3
- //# sourceMappingURL=useCSS.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCSS.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAGrD,eAAO,MAAM,MAAM,mDA6ClB,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { ReactNativeStyleSheet } from '../types';
2
- export declare const useCSS: <T>(_stylesheet: ReactNativeStyleSheet<T>) => void;
3
- //# sourceMappingURL=useCSS.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCSS.native.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAErD,eAAO,MAAM,MAAM,gDAA+C,IAAU,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { UnistylesThemes } from '../global';
2
- export declare const useInitialTheme: (forName: keyof UnistylesThemes) => void;
3
- //# sourceMappingURL=useInitialTheme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useInitialTheme.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useInitialTheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD,eAAO,MAAM,eAAe,YAAa,MAAM,eAAe,SAM7D,CAAA"}
@@ -1,14 +0,0 @@
1
- export declare const useUnistyles: () => {
2
- plugins: string[];
3
- theme: never;
4
- layout: {
5
- breakpoint: keyof import("..").UnistylesBreakpoints;
6
- orientation: "landscape" | "portrait";
7
- screenSize: {
8
- width: number;
9
- height: number;
10
- };
11
- };
12
- contentSizeCategory: import("../common").IOSContentSizeCategory | import("../common").AndroidContentSizeCategory;
13
- };
14
- //# sourceMappingURL=useUnistyles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUnistyles.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useUnistyles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;;;;CAuDxB,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { Optional } from '../types';
2
- export declare const useVariants: (variantsMap?: Record<string, Optional<string>>) => Optional<Record<string, Optional<string>>>;
3
- //# sourceMappingURL=useVariants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useVariants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,eAAO,MAAM,WAAW,iBAAkB,OAAO,MAAM,EAAE,SAAS,MAAM,CAAC,CAAC,+CAMzE,CAAA"}
@@ -1,3 +0,0 @@
1
- export { normalizeStyle } from './normalizeStyle';
2
- export { preprocessor, normalizeNumericValue, normalizeColor } from './normalizer';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/normalizer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { RNStyle } from '../types';
2
- export declare const normalizeStyle: <T extends RNStyle>(style: T) => T;
3
- //# sourceMappingURL=normalizeStyle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeStyle.d.ts","sourceRoot":"","sources":["../../../../src/normalizer/normalizeStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoE,OAAO,EAAE,MAAM,UAAU,CAAA;AAuDzG,eAAO,MAAM,cAAc,oCAwB1B,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../../../src/normalizer/normalizer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAY,MAAM,UAAU,CAAA;AAE3E,KAAK,YAAY,GAAG;IAChB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC;IACjD,oBAAoB,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;IACzD,oBAAoB,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC;CAClE,CAAA;AAED,eAAO,MAAM,cAAc,UAAW,MAAM,YAAW,MAAM,WAyB5D,CAAA;AAED,eAAO,MAAM,qBAAqB,UAAW,MAAM,oBAAiC,CAAA;AAyDpF,eAAO,MAAM,YAAY,EAAE,YAI1B,CAAA"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=normalizer.macos.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizer.macos.d.ts","sourceRoot":"","sources":["../../../../src/normalizer/normalizer.macos.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import type { UnistylesPlugin } from '../types';
2
- export declare const cssMediaQueriesPlugin: UnistylesPlugin;
3
- //# sourceMappingURL=cssMediaQueriesPlugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cssMediaQueriesPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/cssMediaQueriesPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,eAAO,MAAM,qBAAqB,EAAE,eAGnC,CAAA"}
@@ -1,3 +0,0 @@
1
- export { normalizeWebStylesPlugin } from './normalizeWebStylesPlugin';
2
- export { cssMediaQueriesPlugin } from './cssMediaQueriesPlugin';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { UnistylesPlugin } from '../types';
2
- export declare const normalizeWebStylesPlugin: UnistylesPlugin;
3
- //# sourceMappingURL=normalizeWebStylesPlugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeWebStylesPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/normalizeWebStylesPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAG/C,eAAO,MAAM,wBAAwB,EAAE,eAGtC,CAAA"}
@@ -1,3 +0,0 @@
1
- export type Optional<T> = T | undefined;
2
- export type Nullable<T> = T | null;
3
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;AACvC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA"}
@@ -1,7 +0,0 @@
1
- import type { RNStyle } from './core';
2
- import type { UnistylesRuntime } from '../core';
3
- export type UnistylesPlugin = {
4
- name: string;
5
- onParsedStyle?: (styleKey: string, style: RNStyle, runtime: UnistylesRuntime) => RNStyle;
6
- };
7
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAA;CAC3F,CAAA"}
@@ -1,40 +0,0 @@
1
- import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
2
- import type { ShadowOffset, TransformStyles, UnistylesTheme } from './core';
3
- import type { UnistylesBreakpoints } from '../global';
4
- type NestedKeys = 'shadowOffset' | 'transform' | 'textShadowOffset';
5
- type UnistyleView = Omit<ViewStyle, NestedKeys>;
6
- type UnistyleText = Omit<TextStyle, NestedKeys>;
7
- type UnistyleImage = Omit<ImageStyle, NestedKeys>;
8
- type UnistyleNestedStyles = {
9
- shadowOffset?: ToDeepUnistyles<ShadowOffset>;
10
- textShadowOffset?: ToDeepUnistyles<ShadowOffset>;
11
- transform?: Array<ToDeepUnistyles<TransformStyles>>;
12
- };
13
- type Variants = {
14
- variants?: {
15
- [variantName: string]: {
16
- [variant: string]: Omit<UnistylesValues, 'variants'>;
17
- };
18
- };
19
- };
20
- export type ToDeepUnistyles<T> = {
21
- [K in keyof T]?: T[K] | {
22
- [key in BreakpointsOrMediaQueries]?: T[K];
23
- };
24
- };
25
- type AllAvailableStyles = UnistyleView & UnistyleText & UnistyleImage & UnistyleNestedStyles;
26
- export type AllAvailableKeys = keyof (UnistyleView & UnistyleText & UnistyleImage);
27
- export type BreakpointsOrMediaQueries = keyof UnistylesBreakpoints | symbol;
28
- export type UnistylesValues = {
29
- [propName in AllAvailableKeys]?: AllAvailableStyles[propName] | {
30
- [key in BreakpointsOrMediaQueries]?: AllAvailableStyles[propName];
31
- };
32
- } & Variants & {
33
- [propName in NestedKeys]?: UnistyleNestedStyles[propName];
34
- };
35
- export type StyleSheet = {
36
- [styleName: string]: UnistylesValues | ((...args: any) => UnistylesValues);
37
- };
38
- export type StyleSheetWithSuperPowers = ((theme: UnistylesTheme) => StyleSheet) | StyleSheet;
39
- export {};
40
- //# sourceMappingURL=stylesheet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stylesheet.d.ts","sourceRoot":"","sources":["../../../../src/types/stylesheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAGrD,KAAK,UAAU,GAAG,cAAc,GAAG,WAAW,GAAG,kBAAkB,CAAA;AAEnE,KAAK,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;AAC/C,KAAK,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;AAC/C,KAAK,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;AAEjD,KAAK,oBAAoB,GAAG;IACxB,YAAY,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAA;CACtD,CAAA;AAED,KAAK,QAAQ,GAAG;IACZ,QAAQ,CAAC,EAAE;QACP,CAAC,WAAW,EAAE,MAAM,GAAG;YACnB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAA;SACvD,CAAA;KACJ,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;KAC5B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG;SACnB,GAAG,IAAI,yBAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KAC5C;CACJ,CAAA;AAED,KAAK,kBAAkB,GAAG,YAAY,GAAG,YAAY,GAAG,aAAa,GAAG,oBAAoB,CAAA;AAE5F,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,GAAG,YAAY,GAAG,aAAa,CAAC,CAAA;AAClF,MAAM,MAAM,yBAAyB,GAAG,MAAM,oBAAoB,GAAG,MAAM,CAAA;AAE3E,MAAM,MAAM,eAAe,GAAG;KACzB,QAAQ,IAAI,gBAAgB,CAAC,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG;SAC3D,GAAG,IAAI,yBAAyB,CAAC,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC;KACpE;CACJ,GAAG,QAAQ,GAAG;KACV,QAAQ,IAAI,UAAU,CAAC,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC;CAC5D,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,eAAe,CAAC,CAAA;CAC7E,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,EAAE,cAAc,KAAK,UAAU,CAAC,GAAG,UAAU,CAAA"}
@@ -1,53 +0,0 @@
1
- import { UnistylesEventType, ScreenOrientation, IOSContentSizeCategory, AndroidContentSizeCategory } from '../common';
2
- import type { UnistylesThemes, UnistylesBreakpoints } from '../global';
3
- import type { ScreenSize } from './core';
4
- import type { UnistylesPlugin } from './plugin';
5
- export type ColorSchemeName = 'light' | 'dark' | 'unspecified';
6
- export type UnistylesConfig = {
7
- adaptiveThemes?: boolean;
8
- initialTheme?: keyof UnistylesThemes;
9
- plugins?: Array<UnistylesPlugin>;
10
- experimentalCSSMediaQueries?: boolean;
11
- };
12
- export type UnistylesBridge = {
13
- screenWidth: number;
14
- screenHeight: number;
15
- enabledPlugins: Array<string>;
16
- hasAdaptiveThemes: boolean;
17
- themeName: keyof UnistylesThemes;
18
- breakpoint: keyof UnistylesBreakpoints;
19
- colorScheme: ColorSchemeName;
20
- contentSizeCategory: IOSContentSizeCategory | AndroidContentSizeCategory;
21
- sortedBreakpointPairs: Array<[keyof UnistylesBreakpoints, UnistylesBreakpoints[keyof UnistylesBreakpoints]]>;
22
- themes: Array<keyof UnistylesThemes>;
23
- useBreakpoints(breakpoints: UnistylesBreakpoints): void;
24
- useTheme(name: keyof UnistylesThemes): void;
25
- useAdaptiveThemes(enable: boolean): void;
26
- addPlugin(pluginName: string, notify: boolean): void;
27
- removePlugin(pluginName: string): void;
28
- };
29
- export type UnistylesThemeEvent = {
30
- type: UnistylesEventType.Theme;
31
- payload: {
32
- themeName: keyof UnistylesThemes;
33
- };
34
- };
35
- export type UnistylesMobileLayoutEvent = {
36
- type: UnistylesEventType.Layout;
37
- payload: {
38
- screen: ScreenSize;
39
- breakpoint: keyof UnistylesBreakpoints;
40
- orientation: typeof ScreenOrientation[keyof typeof ScreenOrientation];
41
- };
42
- };
43
- export type UnistylesPluginEvent = {
44
- type: UnistylesEventType.Plugin;
45
- };
46
- export type UnistylesDynamicTypeSizeEvent = {
47
- type: UnistylesEventType.DynamicTypeSize;
48
- payload: {
49
- contentSizeCategory: IOSContentSizeCategory | AndroidContentSizeCategory;
50
- };
51
- };
52
- export type UnistylesEvents = UnistylesThemeEvent | UnistylesMobileLayoutEvent | UnistylesPluginEvent | UnistylesDynamicTypeSizeEvent;
53
- //# sourceMappingURL=unistyles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unistyles.d.ts","sourceRoot":"","sources":["../../../../src/types/unistyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAA;AACrH,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,CAAA;AAE9D,MAAM,MAAM,eAAe,GAAG;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,eAAe,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IACjC,2BAA2B,CAAC,EAAE,OAAO,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAE1B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,MAAM,eAAe,CAAC;IACjC,UAAU,EAAE,MAAM,oBAAoB,CAAC;IACvC,WAAW,EAAE,eAAe,CAAC;IAC7B,mBAAmB,EAAE,sBAAsB,GAAG,0BAA0B,CAAC;IACzE,qBAAqB,EAAE,KAAK,CAAC,CAAC,MAAM,oBAAoB,EAAE,oBAAoB,CAAC,MAAM,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAG7G,MAAM,EAAE,KAAK,CAAC,MAAM,eAAe,CAAC,CAAC;IACrC,cAAc,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;IAC5C,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACzC,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACrD,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,EAAE,kBAAkB,CAAC,KAAK,CAAC;IAC/B,OAAO,EAAE;QACL,SAAS,EAAE,MAAM,eAAe,CAAA;KACnC,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACrC,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC;IAChC,OAAO,EAAE;QACL,MAAM,EAAE,UAAU,CAAC;QACnB,UAAU,EAAE,MAAM,oBAAoB,CAAC;QACvC,WAAW,EAAE,OAAO,iBAAiB,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAA;KACxE,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IAC/B,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IACxC,IAAI,EAAE,kBAAkB,CAAC,eAAe,CAAC;IACzC,OAAO,EAAE;QACL,mBAAmB,EAAE,sBAAsB,GAAG,0BAA0B,CAAA;KAC3E,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,0BAA0B,GAAG,oBAAoB,GAAG,6BAA6B,CAAA"}
@@ -1,14 +0,0 @@
1
- export type ExtractVariantNames<T> = T extends (...args: any) => infer R ? ExtractVariantKeys<R> : ExtractVariantKeys<T>;
2
- type ExtractVariantKeys<T> = T extends object ? ExtractVariant<T[keyof T]> : never;
3
- type ExtractSubVariantKeys<T> = T extends object ? keyof Omit<T, 'default'> | undefined : never;
4
- type ExtractVariant<T> = T extends (...args: any) => infer R ? R extends {
5
- variants: infer V;
6
- } ? {
7
- [key in keyof V]?: ExtractSubVariantKeys<V[key]>;
8
- } : never : T extends {
9
- variants: infer V;
10
- } ? {
11
- [key in keyof V]?: ExtractSubVariantKeys<V[key]>;
12
- } : never;
13
- export {};
14
- //# sourceMappingURL=variants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/types/variants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,GAClE,kBAAkB,CAAC,CAAC,CAAC,GACrB,kBAAkB,CAAC,CAAC,CAAC,CAAA;AAE3B,KAAK,kBAAkB,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACvC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAC1B,KAAK,CAAA;AAEX,KAAK,qBAAqB,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAC1C,MAAM,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,SAAS,GACpC,KAAK,CAAA;AAEX,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,GACtD,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;CAAE,GAC3B;KAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAAE,GACpD,KAAK,GACT,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;CAAE,GAC3B;KAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAAE,GACpD,KAAK,CAAA"}
@@ -1,16 +0,0 @@
1
- import type { UnistylesBreakpoints } from './global';
2
- import type { ExtractVariantNames, ReactNativeStyleSheet, StyleSheetWithSuperPowers, UnistylesTheme } from './types';
3
- type ParsedStylesheet<ST extends StyleSheetWithSuperPowers> = {
4
- theme: UnistylesTheme;
5
- breakpoint: keyof UnistylesBreakpoints;
6
- styles: ReactNativeStyleSheet<ST>;
7
- };
8
- /**
9
- * Hook that enables all the features of Unistyles
10
- * @param stylesheet - The stylesheet with superpowers to be used
11
- * @param variantsMap - The map of variants to be used
12
- * @returns - The theme, current breakpoint and RN compatible styles
13
- */
14
- export declare const useStyles: <ST extends StyleSheetWithSuperPowers>(stylesheet?: ST | undefined, variantsMap?: ExtractVariantNames<ST> | undefined) => ParsedStylesheet<ST>;
15
- export {};
16
- //# sourceMappingURL=useStyles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useStyles.d.ts","sourceRoot":"","sources":["../../../src/useStyles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIpH,KAAK,gBAAgB,CAAC,EAAE,SAAS,yBAAyB,IAAI;IAC1D,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,MAAM,oBAAoB,CAAC;IACvC,MAAM,EAAE,qBAAqB,CAAC,EAAE,CAAC,CAAA;CACpC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,gJAsCrB,CAAA"}
@@ -1,4 +0,0 @@
1
- import type { RNStyle } from '../types';
2
- import type { UnistylesRuntime } from '../core';
3
- export declare const createMediaQueryForStyles: (styles: RNStyle, runtime: UnistylesRuntime) => RNStyle;
4
- //# sourceMappingURL=cssMediaQuery.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cssMediaQuery.d.ts","sourceRoot":"","sources":["../../../../src/utils/cssMediaQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAW,MAAM,UAAU,CAAA;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,eAAO,MAAM,yBAAyB,WAAY,OAAO,WAAW,gBAAgB,KAAG,OA8BtF,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const generateReactNativeWebId: (key: string, value: string) => string;
2
- //# sourceMappingURL=generateId.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateId.d.ts","sourceRoot":"","sources":["../../../../src/utils/generateId.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,QAAS,MAAM,SAAS,MAAM,KAAG,MAMrE,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const murmurhash2_32_gc: (str: string, seed: number) => number;
2
- //# sourceMappingURL=hash32.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hash32.d.ts","sourceRoot":"","sources":["../../../../src/utils/hash32.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,QAAS,MAAM,QAAQ,MAAM,WA+C1D,CAAA"}
@@ -1,26 +0,0 @@
1
- import type { Nullable } from '../types';
2
- import type { UnistylesBreakpoints } from '../global';
3
- type MQValue = keyof UnistylesBreakpoints | number;
4
- type MQHandler = {
5
- only: {
6
- width(wMin?: Nullable<MQValue>, wMax?: MQValue): symbol;
7
- height(hMin?: Nullable<MQValue>, hMax?: MQValue): symbol;
8
- };
9
- width(wMin?: Nullable<MQValue>, wMax?: MQValue): {
10
- and: {
11
- height(hMin?: Nullable<MQValue>, hMax?: MQValue): symbol;
12
- };
13
- };
14
- height(hMin?: Nullable<MQValue>, hMax?: MQValue): {
15
- and: {
16
- width(wMin?: Nullable<MQValue>, wMax?: MQValue): symbol;
17
- };
18
- };
19
- };
20
- /**
21
- * Utility to create cross-platform media queries
22
- * @returns - JavaScript symbol to be used in your stylesheet
23
- */
24
- export declare const mq: MQHandler;
25
- export {};
26
- //# sourceMappingURL=mq.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mq.d.ts","sourceRoot":"","sources":["../../../../src/utils/mq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAGrD,KAAK,OAAO,GAAG,MAAM,oBAAoB,GAAG,MAAM,CAAA;AAElD,KAAK,SAAS,GAAG;IACb,IAAI,EAAE;QACF,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACxD,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KAC5D,CAAC;IACF,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG;QAC7C,GAAG,EAAE;YACD,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;SAC3D,CAAA;KACJ,CAAC;IACF,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG;QAC9C,GAAG,EAAE;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;SAC1D,CAAA;KACJ,CAAA;CACJ,CAAA;AAcD;;;GAGG;AACH,eAAO,MAAM,EAAE,EAAE,SAiBhB,CAAA"}
@@ -1,16 +0,0 @@
1
- import type { Optional, RNValue, ScreenSize } from '../types';
2
- type ParsedMqDimension = {
3
- from: number;
4
- to: number;
5
- };
6
- export type UnistylesParsedMq = {
7
- width?: ParsedMqDimension;
8
- height?: ParsedMqDimension;
9
- };
10
- export declare const parseMq: (mq: string) => UnistylesParsedMq;
11
- export declare const isUnistylesMq: (mq: string) => boolean;
12
- export declare const isValidMq: (parsedMq: UnistylesParsedMq) => boolean;
13
- export declare const isWithinTheWidthAndHeight: (parsedMq: UnistylesParsedMq, screenSize: ScreenSize) => boolean;
14
- export declare const getKeyForUnistylesMediaQuery: (mediaQueries: Array<[string, RNValue]>, screenSize: ScreenSize) => Optional<string>;
15
- export {};
16
- //# sourceMappingURL=mqParser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mqParser.d.ts","sourceRoot":"","sources":["../../../../src/utils/mqParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAM7D,KAAK,iBAAiB,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,iBAcpC,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,YAAgC,CAAA;AAExE,eAAO,MAAM,SAAS,aAAc,iBAAiB,YAgBpD,CAAA;AAED,eAAO,MAAM,yBAAyB,aAAc,iBAAiB,cAAc,UAAU,KAAG,OAgB/F,CAAA;AAcD,eAAO,MAAM,4BAA4B,iBAAkB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,cAAc,UAAU,KAAG,SAAS,MAAM,CAgB5H,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { RNStyle } from '../types';
2
- export declare const withPlugins: (key: string, style: RNStyle) => RNStyle;
3
- //# sourceMappingURL=withPlugins.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withPlugins.d.ts","sourceRoot":"","sources":["../../../../src/utils/withPlugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGvC,eAAO,MAAM,WAAW,QACf,MAAM,SACJ,OAAO,YAOT,CAAA"}
@@ -1,22 +0,0 @@
1
- require "json"
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
-
5
- Pod::Spec.new do |s|
6
- s.name = package["name"]
7
- s.version = package["version"]
8
- s.summary = package["description"]
9
- s.homepage = package["homepage"]
10
- s.license = package["license"]
11
- s.authors = package["author"]
12
-
13
- s.platforms = { :ios => min_ios_version_supported, :osx => "10.14" }
14
- s.source = { :git => package["repository"], :tag => "#{s.version}" }
15
-
16
- s.source_files = [
17
- "ios/**/*.{h,mm}",
18
- "cxx/*.{h,cpp}"
19
- ]
20
-
21
- install_modules_dependencies(s)
22
- end
@@ -1,24 +0,0 @@
1
- import type { ScreenSize } from '../types'
2
-
3
- const TEST_BREAKPOINTS = {
4
- xs: 0,
5
- sm: 300,
6
- md: 500,
7
- lg: 750,
8
- xl: 1000
9
- } as const
10
-
11
- export const mockRuntime = (screenSize: ScreenSize) => ({
12
- breakpoint: Object.entries(TEST_BREAKPOINTS)
13
- .reverse()
14
- .find(([, value]) => screenSize.width >= value)?.at(0),
15
- orientation: screenSize.width > screenSize.height
16
- ? 'landscape'
17
- : 'portrait',
18
- screen: screenSize
19
- })
20
-
21
- export const mockRegistry = () => ({
22
- sortedBreakpointPairs: Object.entries(TEST_BREAKPOINTS),
23
- plugins: []
24
- })