react-native-unistyles 3.0.0-alpha.32 → 3.0.0-alpha.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. package/cxx/common/Helpers.h +24 -2
  2. package/cxx/core/HostStyle.cpp +1 -1
  3. package/cxx/core/UnistyleWrapper.h +31 -1
  4. package/cxx/core/UnistylesMountHook.cpp +1 -1
  5. package/cxx/core/UnistylesMountHook.h +4 -2
  6. package/cxx/core/UnistylesRegistry.cpp +7 -2
  7. package/cxx/hybridObjects/HybridShadowRegistry.cpp +1 -2
  8. package/cxx/hybridObjects/HybridStyleSheet.cpp +4 -1
  9. package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +12 -0
  10. package/cxx/hybridObjects/HybridUnistylesRuntime.h +2 -0
  11. package/cxx/parser/Parser.cpp +6 -6
  12. package/cxx/parser/Parser.h +1 -1
  13. package/cxx/shadowTree/ShadowTrafficController.h +5 -8
  14. package/lib/commonjs/components/Display.js +18 -0
  15. package/lib/commonjs/components/Display.js.map +1 -0
  16. package/lib/commonjs/components/Hide.js +18 -0
  17. package/lib/commonjs/components/Hide.js.map +1 -0
  18. package/lib/commonjs/components/index.js +20 -0
  19. package/lib/commonjs/components/index.js.map +1 -0
  20. package/lib/commonjs/components/useMedia.js +59 -0
  21. package/lib/commonjs/components/useMedia.js.map +1 -0
  22. package/lib/commonjs/core/createUnistylesComponent.js +2 -1
  23. package/lib/commonjs/core/createUnistylesComponent.js.map +1 -1
  24. package/lib/commonjs/core/createUnistylesComponent.native.js +43 -4
  25. package/lib/commonjs/core/createUnistylesComponent.native.js.map +1 -1
  26. package/lib/commonjs/core/index.js +0 -14
  27. package/lib/commonjs/core/index.js.map +1 -1
  28. package/lib/commonjs/global.js +0 -4
  29. package/lib/commonjs/global.js.map +1 -1
  30. package/lib/commonjs/index.js +12 -14
  31. package/lib/commonjs/index.js.map +1 -1
  32. package/lib/commonjs/mq.js +25 -12
  33. package/lib/commonjs/mq.js.map +1 -1
  34. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js +4 -5
  35. package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +0 -1
  36. package/lib/commonjs/specs/ShadowRegistry/ShadowRegistry.nitro.js.map +1 -1
  37. package/lib/commonjs/specs/ShadowRegistry/types.js +0 -4
  38. package/lib/commonjs/specs/ShadowRegistry/types.js.map +1 -1
  39. package/lib/commonjs/specs/StatusBar/UnistylesStatusBar.nitro.js.map +1 -1
  40. package/lib/commonjs/specs/StyleSheet/UnistylesStyleSheet.nitro.js +4 -2
  41. package/lib/commonjs/specs/StyleSheet/UnistylesStyleSheet.nitro.js.map +1 -1
  42. package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js +3 -1
  43. package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -2
  44. package/lib/commonjs/specs/types.js.map +0 -1
  45. package/lib/commonjs/types/accessibility.js +1 -1
  46. package/lib/commonjs/types/accessibility.js.map +0 -1
  47. package/lib/commonjs/types/common.js +0 -3
  48. package/lib/commonjs/types/stylesheet.js +2 -1
  49. package/lib/commonjs/web/convert/index.js +7 -1
  50. package/lib/commonjs/web/convert/index.js.map +1 -2
  51. package/lib/commonjs/web/convert/pseudo.js.map +1 -2
  52. package/lib/commonjs/web/convert/shadow.js +5 -1
  53. package/lib/commonjs/web/convert/shadow.js.map +1 -2
  54. package/lib/commonjs/web/convert/style.js.map +1 -2
  55. package/lib/commonjs/web/convert/textShadow.js +4 -1
  56. package/lib/commonjs/web/convert/textShadow.js.map +1 -2
  57. package/lib/commonjs/web/convert/transform.js.map +1 -2
  58. package/lib/commonjs/web/convert/types.js.map +1 -1
  59. package/lib/commonjs/web/convert/utils.js +2 -1
  60. package/lib/commonjs/web/convert/utils.js.map +1 -2
  61. package/lib/commonjs/web/listener.js.map +1 -2
  62. package/lib/commonjs/web/mock.js.map +1 -2
  63. package/lib/commonjs/web/shadowRegistry.js +9 -1
  64. package/lib/commonjs/web/shadowRegistry.js.map +1 -2
  65. package/lib/commonjs/web/utils/unistyle.js +1 -1
  66. package/lib/commonjs/web/variants/index.js.map +1 -1
  67. package/lib/commonjs/web/variants/useVariants.js +2 -1
  68. package/lib/commonjs/web/variants/useVariants.js.map +1 -2
  69. package/lib/module/common.js.map +1 -1
  70. package/lib/module/components/Display.js +13 -0
  71. package/lib/module/components/Display.js.map +1 -0
  72. package/lib/module/components/Hide.js +13 -0
  73. package/lib/module/components/Hide.js.map +1 -0
  74. package/lib/module/components/index.js +5 -0
  75. package/lib/module/components/index.js.map +1 -0
  76. package/lib/module/components/useMedia.js +54 -0
  77. package/lib/module/components/useMedia.js.map +1 -0
  78. package/lib/module/core/createUnistylesComponent.js +2 -1
  79. package/lib/module/core/createUnistylesComponent.js.map +1 -1
  80. package/lib/module/core/createUnistylesComponent.native.js +41 -3
  81. package/lib/module/core/createUnistylesComponent.native.js.map +1 -1
  82. package/lib/module/core/index.js +0 -2
  83. package/lib/module/core/index.js.map +1 -1
  84. package/lib/module/global.js +1 -1
  85. package/lib/module/global.js.map +0 -1
  86. package/lib/module/index.js +2 -1
  87. package/lib/module/index.js.map +1 -1
  88. package/lib/module/mq.js +21 -11
  89. package/lib/module/mq.js.map +1 -1
  90. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js +6 -5
  91. package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +0 -1
  92. package/lib/module/specs/NavigtionBar/UnistylesNavigationBar.nitro.js.map +1 -1
  93. package/lib/module/specs/ShadowRegistry/ShadowRegistry.nitro.js.map +0 -1
  94. package/lib/module/specs/ShadowRegistry/types.js +0 -2
  95. package/lib/module/specs/ShadowRegistry/types.js.map +0 -1
  96. package/lib/module/specs/StatusBar/UnistylesStatusBar.nitro.js.map +0 -1
  97. package/lib/module/specs/StyleSheet/UnistylesStyleSheet.nitro.js +1 -1
  98. package/lib/module/specs/StyleSheet/UnistylesStyleSheet.nitro.js.map +0 -1
  99. package/lib/module/specs/StyleSheet/index.js.map +1 -2
  100. package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -2
  101. package/lib/module/specs/UnistylesRuntime/UnistylesRuntime.nitro.js.map +0 -1
  102. package/lib/module/specs/UnistylesRuntime/index.js.map +1 -2
  103. package/lib/module/specs/types.js.map +0 -1
  104. package/lib/module/types/accessibility.js +9 -9
  105. package/lib/module/types/accessibility.js.map +1 -1
  106. package/lib/module/types/breakpoints.js.map +0 -1
  107. package/lib/module/types/common.js +0 -2
  108. package/lib/module/types/common.js.map +1 -1
  109. package/lib/module/types/core.js.map +1 -1
  110. package/lib/module/types/stylesheet.js +2 -2
  111. package/lib/module/types/variants.js.map +1 -1
  112. package/lib/module/web/convert/boxShadow.js +4 -1
  113. package/lib/module/web/convert/boxShadow.js.map +1 -2
  114. package/lib/module/web/convert/pseudo.js.map +1 -2
  115. package/lib/module/web/convert/textShadow.js +4 -1
  116. package/lib/module/web/convert/transform.js.map +1 -2
  117. package/lib/module/web/convert/types.js.map +1 -1
  118. package/lib/module/web/convert/utils.js +2 -1
  119. package/lib/module/web/registry.js +3 -1
  120. package/lib/module/web/registry.js.map +1 -2
  121. package/lib/module/web/runtime.js.map +1 -2
  122. package/lib/module/web/shadowRegistry.js +9 -1
  123. package/lib/module/web/utils/common.js +3 -1
  124. package/lib/module/web/utils/common.js.map +1 -2
  125. package/lib/module/web/utils/index.js.map +1 -1
  126. package/lib/module/web/utils/unistyle.js +1 -1
  127. package/lib/module/web/utils/unistyle.js.map +1 -1
  128. package/lib/module/web/variants/index.js.map +1 -1
  129. package/lib/module/web/variants/useVariants.js +2 -1
  130. package/lib/module/web/variants/useVariants.js.map +1 -2
  131. package/lib/typescript/src/components/Display.d.ts +7 -0
  132. package/lib/typescript/src/components/Display.d.ts.map +1 -0
  133. package/lib/typescript/src/components/Hide.d.ts +7 -0
  134. package/lib/typescript/src/components/Hide.d.ts.map +1 -0
  135. package/lib/typescript/src/components/index.d.ts +3 -0
  136. package/lib/typescript/src/components/index.d.ts.map +1 -0
  137. package/lib/typescript/src/components/useMedia.d.ts +6 -0
  138. package/lib/typescript/src/components/useMedia.d.ts.map +1 -0
  139. package/lib/typescript/src/core/createUnistylesComponent.d.ts +3 -2
  140. package/lib/typescript/src/core/createUnistylesComponent.d.ts.map +1 -1
  141. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts +3 -2
  142. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts.map +1 -1
  143. package/lib/typescript/src/core/index.d.ts +0 -2
  144. package/lib/typescript/src/core/index.d.ts.map +1 -1
  145. package/lib/typescript/src/index.d.ts +2 -1
  146. package/lib/typescript/src/index.d.ts.map +1 -1
  147. package/lib/typescript/src/mq.d.ts +8 -0
  148. package/lib/typescript/src/mq.d.ts.map +1 -1
  149. package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts +1 -0
  150. package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts.map +1 -1
  151. package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.cpp +1 -0
  152. package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.hpp +2 -0
  153. package/package.json +1 -1
  154. package/plugin/ref.js +4 -4
  155. package/plugin/style.js +15 -3
  156. package/src/components/Display.tsx +12 -0
  157. package/src/components/Hide.tsx +12 -0
  158. package/src/components/index.ts +2 -0
  159. package/src/components/useMedia.ts +64 -0
  160. package/src/core/createUnistylesComponent.native.tsx +48 -4
  161. package/src/core/createUnistylesComponent.tsx +4 -2
  162. package/src/core/index.ts +0 -2
  163. package/src/index.ts +2 -1
  164. package/src/mq.ts +27 -9
  165. package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +1 -0
  166. package/src/web/utils/unistyle.ts +1 -1
  167. package/lib/commonjs/core/useBreakpoint.js +0 -22
  168. package/lib/commonjs/core/useBreakpoint.js.map +0 -1
  169. package/lib/commonjs/core/useBreakpoint.native.js +0 -24
  170. package/lib/commonjs/core/useBreakpoint.native.js.map +0 -2
  171. package/lib/commonjs/core/useTheme.js +0 -22
  172. package/lib/commonjs/core/useTheme.js.map +0 -1
  173. package/lib/commonjs/core/useTheme.native.js +0 -24
  174. package/lib/commonjs/core/useTheme.native.js.map +0 -2
  175. package/lib/commonjs/web/mq.js +0 -23
  176. package/lib/commonjs/web/mq.js.map +0 -1
  177. package/lib/module/core/useBreakpoint.js +0 -17
  178. package/lib/module/core/useBreakpoint.js.map +0 -1
  179. package/lib/module/core/useBreakpoint.native.js +0 -19
  180. package/lib/module/core/useBreakpoint.native.js.map +0 -1
  181. package/lib/module/core/useTheme.js +0 -17
  182. package/lib/module/core/useTheme.js.map +0 -2
  183. package/lib/module/core/useTheme.native.js +0 -19
  184. package/lib/module/core/useTheme.native.js.map +0 -1
  185. package/lib/module/web/mq.js +0 -17
  186. package/lib/module/web/mq.js.map +0 -1
  187. package/lib/typescript/src/core/useBreakpoint.d.ts +0 -2
  188. package/lib/typescript/src/core/useBreakpoint.d.ts.map +0 -1
  189. package/lib/typescript/src/core/useBreakpoint.native.d.ts +0 -2
  190. package/lib/typescript/src/core/useBreakpoint.native.d.ts.map +0 -1
  191. package/lib/typescript/src/core/useTheme.d.ts +0 -3
  192. package/lib/typescript/src/core/useTheme.d.ts.map +0 -1
  193. package/lib/typescript/src/core/useTheme.native.d.ts +0 -3
  194. package/lib/typescript/src/core/useTheme.native.d.ts.map +0 -1
  195. package/lib/typescript/src/web/mq.d.ts +0 -8
  196. package/lib/typescript/src/web/mq.d.ts.map +0 -1
  197. package/src/common.js +0 -4
  198. package/src/core/createUnistylesComponent.js +0 -6
  199. package/src/core/createUnistylesComponent.native.js +0 -31
  200. package/src/core/index.js +0 -3
  201. package/src/core/useBreakpoint.js +0 -14
  202. package/src/core/useBreakpoint.native.js +0 -16
  203. package/src/core/useBreakpoint.native.ts +0 -21
  204. package/src/core/useBreakpoint.ts +0 -18
  205. package/src/core/useTheme.js +0 -14
  206. package/src/core/useTheme.native.js +0 -16
  207. package/src/core/useTheme.native.ts +0 -22
  208. package/src/core/useTheme.ts +0 -19
  209. package/src/global.js +0 -1
  210. package/src/index.js +0 -3
  211. package/src/mq.js +0 -38
  212. package/src/specs/NativePlatform/NativePlatform.nitro.js +0 -19
  213. package/src/specs/NativePlatform/index.js +0 -1
  214. package/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.js +0 -1
  215. package/src/specs/NavigtionBar/index.js +0 -9
  216. package/src/specs/ShadowRegistry/ShadowRegistry.nitro.js +0 -1
  217. package/src/specs/ShadowRegistry/index.js +0 -26
  218. package/src/specs/ShadowRegistry/types.js +0 -1
  219. package/src/specs/StatusBar/UnistylesStatusBar.nitro.js +0 -1
  220. package/src/specs/StatusBar/index.js +0 -25
  221. package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.js +0 -1
  222. package/src/specs/StyleSheet/index.js +0 -13
  223. package/src/specs/TurboUnistyles/NativeTurboUnistyles.js +0 -2
  224. package/src/specs/TurboUnistyles/index.js +0 -1
  225. package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.js +0 -1
  226. package/src/specs/UnistylesRuntime/index.js +0 -20
  227. package/src/specs/index.js +0 -8
  228. package/src/specs/index.web.js +0 -2
  229. package/src/specs/types.js +0 -17
  230. package/src/types/accessibility.js +0 -30
  231. package/src/types/breakpoints.js +0 -1
  232. package/src/types/common.js +0 -1
  233. package/src/types/core.js +0 -1
  234. package/src/types/index.js +0 -1
  235. package/src/types/stylesheet.js +0 -2
  236. package/src/types/variants.js +0 -1
  237. package/src/web/convert/boxShadow.js +0 -59
  238. package/src/web/convert/index.js +0 -56
  239. package/src/web/convert/pseudo.js +0 -131
  240. package/src/web/convert/shadow.js +0 -50
  241. package/src/web/convert/style.js +0 -137
  242. package/src/web/convert/textShadow.js +0 -56
  243. package/src/web/convert/transform.js +0 -65
  244. package/src/web/convert/types.js +0 -2
  245. package/src/web/convert/utils.js +0 -39
  246. package/src/web/create.js +0 -36
  247. package/src/web/index.js +0 -22
  248. package/src/web/listener.js +0 -26
  249. package/src/web/mock.js +0 -21
  250. package/src/web/mq.js +0 -14
  251. package/src/web/mq.ts +0 -17
  252. package/src/web/registry.js +0 -165
  253. package/src/web/runtime.js +0 -160
  254. package/src/web/shadowRegistry.js +0 -96
  255. package/src/web/state.js +0 -68
  256. package/src/web/utils/common.js +0 -79
  257. package/src/web/utils/index.js +0 -2
  258. package/src/web/utils/unistyle.js +0 -72
  259. package/src/web/variants/getVariants.js +0 -26
  260. package/src/web/variants/index.js +0 -2
  261. package/src/web/variants/useVariants.js +0 -50
@@ -1,2 +1 @@
1
- {"version":3,"names":["_registry","require","_utils","_variants2","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","createDoubleMap","classNamesMap","add","ref","_style","_variants","_args","Array","isArray","forEach","style","Object","keys","some","key","startsWith","secrets","extractSecrets","__uni__refs","__uni__key","isInDocument","oldResult","get","delete","UnistylesRegistry","remove","HTMLElement","secret","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","args","variants","length","result","variantsResult","fromEntries","getVariants","resultWithVariants","deepMergeObjects","equal","oldClassNames","className","classList","set","stylesheet","value","injectedClassNames","_web","_classNames","newClassNames","concat","dependencies","extractUnistyleDependencies","addDependenciesToStylesheet","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.js"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,MAAMG,8BAA8B,CAAC;EACjC;EACAC,IAAI,GAAG,yBAAyB;EAChCC,MAAM,GAAG,KAAK;EACdC,MAAM,GAAGA,CAAA,KAAM,IAAI;EACnBC,QAAQ,GAAGA,CAAA,KAAM,yBAAyB;EAC1CC,OAAO,GAAGA,CAAA,KAAM,CAAE,CAAC;EACnB;EACAC,UAAU,GAAG,IAAAC,sBAAe,EAAC,CAAC;EAC9BC,aAAa,GAAG,IAAAD,sBAAe,EAAC,CAAC;EACjCE,GAAG,GAAGA,CAAC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E,IAAI,CAAC7C,UAAU,CAAC+C,GAAG,CAAC3C,GAAG,EAAEgB,UAAU,EAAEqB,kBAAkB,CAAC;MACxD,MAAMI,SAAS,GAAGpB,2BAAiB,CAACtB,GAAG,CAAC;QACpCY,GAAG,EAAEK,UAAU;QACfc,IAAI;QACJc,UAAU,EAAEnB,iBAAiB;QAC7BoB,KAAK,EAAER,kBAAkB;QACzBN;MACJ,CAAC,CAAC;MACF,MAAMe,kBAAkB,GAAGT,kBAAkB,EAAEU,IAAI,EAAEC,WAAW,IAAI,EAAE;MACtE,MAAMC,aAAa,GAAGH,kBAAkB,CAACI,MAAM,CAACT,SAAS,CAAC;MAC1D,MAAMU,YAAY,GAAG,IAAAC,kCAA2B,EAACf,kBAAkB,CAAC;MACpE,IAAI,OAAOZ,iBAAiB,KAAK,UAAU,EAAE;QACzC;QACAJ,2BAAiB,CAACgC,2BAA2B,CAAC5B,iBAAiB,EAAE0B,YAAY,CAAC;MAClF;MACApC,WAAW,CAAChB,GAAG,CAACC,GAAG,CAAC;MACpB,IAAI,CAACF,aAAa,CAAC6C,GAAG,CAAC3C,GAAG,EAAEgB,UAAU,EAAEiC,aAAa,CAAC;MACtD;MACAjD,GAAG,CAAC0C,SAAS,CAAC3C,GAAG,CAAC,GAAGkD,aAAa,CAAC;IACvC,CAAC,CAAC;EACN,CAAC;EACD3B,MAAM,GAAGA,CAAA,KAAM,CAAE,CAAC;AACtB;AACO,MAAMgC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,IAAIhE,8BAA8B,CAAC,CAAC","ignoreList":[]}
2
- oreList":[]}
1
+ {"version":3,"names":["_registry","require","_utils","_variants2","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","createDoubleMap","classNamesMap","add","ref","_style","_variants","_args","Array","isArray","forEach","style","Object","keys","some","key","startsWith","secrets","extractSecrets","__uni__refs","__uni__key","isInDocument","oldResult","get","delete","UnistylesRegistry","remove","HTMLElement","secret","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","args","variants","length","result","variantsResult","fromEntries","getVariants","resultWithVariants","deepMergeObjects","equal","oldClassNames","className","classList","set","stylesheet","value","injectedClassNames","_web","_classNames","newClassNames","concat","dependencies","extractUnistyleDependencies","addDependenciesToStylesheet","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.ts"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAIA,MAAMG,8BAA8B,CAAC;EACjC;EACAC,IAAI,GAAG,yBAAyB;EAChCC,MAAM,GAAG,KAAK;EACdC,MAAM,GAAGA,CAAA,KAAM,IAAI;EACnBC,QAAQ,GAAGA,CAAA,KAAM,yBAAyB;EAC1CC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClB;;EAEQC,UAAU,GAAG,IAAAC,sBAAe,EAAuC,CAAC;EACpEC,aAAa,GAAG,IAAAD,sBAAe,EAAqC,CAAC;EAE7EE,GAAG,GAAGA,CAACC,GAAQ,EAAEC,MAA6B,EAAEC,SAA+B,EAAEC,KAAkB,KAAK;IACpG;IACA,IAAI,CAACF,MAAM,EAAE;MACT;IACJ;;IAEA;IACA,IAAIG,KAAK,CAACC,OAAO,CAACJ,MAAM,CAAC,EAAE;MACvBA,MAAM,CAACK,OAAO,CAACC,KAAK,IAAI,IAAI,CAACR,GAAG,CAACC,GAAG,EAAEO,KAAK,EAAEL,SAAS,EAAEC,KAAK,CAAC,CAAC;MAE/D;IACJ;;IAEA;IACA,IAAI,CAACK,MAAM,CAACC,IAAI,CAACR,MAAM,CAAC,CAACS,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE;MAC7D;IACJ;;IAEA;IACA,IAAIZ,GAAG,KAAK,IAAI,EAAE;MACd,MAAMa,OAAO,GAAG,IAAAC,qBAAc,EA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ACzC;QACAJ,2BAAiB,CAACgC,2BAA2B,CAAC5B,iBAAiB,EAAE0B,YAAY,CAAC;MAClF;MAEApC,WAAW,CAAChB,GAAG,CAACC,GAAG,CAAC;MACpB,IAAI,CAACF,aAAa,CAAC6C,GAAG,CAAC3C,GAAG,EAAEgB,UAAU,EAAEiC,aAAa,CAAC;MACtD;MACAjD,GAAG,CAAC0C,SAAS,CAAC3C,GAAG,CAAC,GAAGkD,aAAa,CAAC;IACvC,CAAC,CAAC;EACN,CAAC;EAED3B,MAAM,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB;AAEO,MAAMgC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,IAAIhE,8BAA8B,CAAC,CAAC","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.schemeToTheme = exports.isInDocument = exports.hexToRGBA = exports.getStyles = exports.getMediaQuery = exports.extractUnistyleDependencies = exports.extractSecrets = exports.extractMediaQueryValue = exports.assignSecrets = void 0;
7
7
  var _types = require("../../specs/types");
8
- var _mq = require("../mq");
8
+ var _mq = require("../../mq");
9
9
  var _state = require("../state");
10
10
  var _common = require("./common");
11
11
  const schemeToTheme = scheme => {
@@ -1 +1 @@
1
- {"version":3,"names":["_useVariants","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getVariants"],"sourceRoot":"../../../../src","sources":["web/variants/index.js"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,YAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,YAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,YAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,YAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["_useVariants","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getVariants"],"sourceRoot":"../../../../src","sources":["web/variants/index.ts"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,YAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,YAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,YAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,YAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -35,6 +35,7 @@ const createUseVariants = (styles, setSelectedVariants) => {
35
35
  enumerable: false,
36
36
  configurable: true
37
37
  })));
38
+
38
39
  // Add __uni__variants to static styles
39
40
  Object.keys(styleEntry).forEach(key => {
40
41
  if (!key.startsWith('__uni__secrets__')) {
@@ -55,4 +56,4 @@ const createUseVariants = (styles, setSelectedVariants) => {
55
56
  });
56
57
  };
57
58
  exports.createUseVariants = createUseVariants;
58
- //# sourceMappingURL=useVariants.js.mapp
59
+ //# sourceMappingURL=useVariants.js.map
@@ -1,2 +1 @@
1
- {"version":3,"names":["_react","require","_utils","_getVariants","createUseVariants","styles","setSelectedVariants","useVariants","selectedVariants","selectedVariantStylesMap","useState","Map","lastSelectedVariantsRef","useRef","variantsChanged","equal","current","combinedVariantStyles","useMemo","result","getVariants","forEach","key","value","set","styleEntry","selectedVariantStyles","get","Object","defineProperties","reduceObject","enumerable","configurable","keys","startsWith","secret","keyInObject","undefined","defineProperty","exports"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.js"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACO,MAAMG,iBAAiB,GAAGA,CAACC,MAAM,EAAEC,mBAAmB,KAAK;EAC9D,MAAMC,WAAW,GAAIC,gBAAgB,IAAK;IACtC,MAAM,CAACC,wBAAwB,CAAC,GAAG,IAAAC,eAAQ,EAAC,MAAM,IAAIC,GAAG,CAAC,CAAC,CAAC;IAC5D,MAAMC,uBAAuB,GAAG,IAAAC,aAAM,EAAC,CAAC;IACxC;IACA,MAAMC,eAAe,GAAG,CAAC,IAAAC,YAAK,EAACH,uBAAuB,CAACI,OAAO,EAAER,gBAAgB,CAAC;IACjF,IAAIM,eAAe,EAAE;MACjBF,uBAAuB,CAACI,OAAO,GAAGR,gBAAgB;MAClDF,mBAAmB,CAACE,gBAAgB,CAAC;IACzC;IACA,MAAMS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B,MAAM,CAACU,cAAc,CAACjC,MAAM,EAAE,aAAa,EAAE;IACzCkB,KAAK,EAAEhB;EACX,CAAC,CAAC;AACN,CAAC;AAACgC,OAAA,CAAAnC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
2
- []}
1
+ {"version":3,"names":["_react","require","_utils","_getVariants","createUseVariants","styles","setSelectedVariants","useVariants","selectedVariants","selectedVariantStylesMap","useState","Map","lastSelectedVariantsRef","useRef","variantsChanged","equal","current","combinedVariantStyles","useMemo","result","getVariants","forEach","key","value","set","styleEntry","selectedVariantStyles","get","Object","defineProperties","reduceObject","enumerable","configurable","keys","startsWith","secret","keyInObject","undefined","defineProperty","exports"],"sourceRoot":"../../../../src","sources":["web/variants/useVariants.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEO,MAAMG,iBAAiB,GAAGA,CAACC,MAAyC,EAAEC,mBAA4D,KAAK;EAC1I,MAAMC,WAAW,GAAIC,gBAAqC,IAAK;IAC3D,MAAM,CAACC,wBAAwB,CAAC,GAAG,IAAAC,eAAQ,EAAC,MAAM,IAAIC,GAAG,CAA8B,CAAC,CAAC;IACzF,MAAMC,uBAAuB,GAAG,IAAAC,aAAM,EAAsB,CAAC;IAC7D;IACA,MAAMC,eAAe,GAAG,CAAC,IAAAC,YAAK,EAACH,uBAAuB,CAACI,OAAO,EAAER,gBAAgB,CAAC;IAEjF,IAAIM,eAAe,EAAE;MACjBF,uBAAuB,CAACI,OAAO,GAAGR,gBAAgB;MAClDF,mBAAmB,CAACE,gBAAgB,CAAC;IACzC;IAEA,MAAMS,qBAAqB,GAAG,IAAAC,cAAO,EAAC,MAAM;MACxC,MAAMC,MAAM,GAAG,IAAAC,wBAAW,EAACf,MAAM,EAAEG,gBAAgB,CAAC;MAEpDW,MAAM,CAACE,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC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
1
- {"version":3,"names":["Platform","isWeb","OS","isIOS","isAndroid"],"sourceRoot":"../../src","sources":["common.js"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAO,MAAMC,KAAK,GAAGD,QAAQ,CAACE,EAAE,KAAK,KAAK;AAC1C,OAAO,MAAMC,KAAK,GAAGH,QAAQ,CAACE,EAAE,KAAK,KAAK;AAC1C,OAAO,MAAME,SAAS,GAAGJ,QAAQ,CAACE,EAAE,KAAK,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["Platform","isWeb","OS","isIOS","isAndroid"],"sourceRoot":"../../src","sources":["common.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,MAAMC,KAAK,GAAGD,QAAQ,CAACE,EAAE,KAAK,KAAK;AAC1C,OAAO,MAAMC,KAAK,GAAGH,QAAQ,CAACE,EAAE,KAAK,KAAK;AAC1C,OAAO,MAAME,SAAS,GAAGJ,QAAQ,CAACE,EAAE,KAAK,SAAS","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ import { useMedia } from './useMedia';
4
+ export const Display = ({
5
+ children,
6
+ ...props
7
+ }) => {
8
+ const {
9
+ isVisible
10
+ } = useMedia(props);
11
+ return isVisible ? children : null;
12
+ };
13
+ //# sourceMappingURL=Display.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMedia","Display","children","props","isVisible"],"sourceRoot":"../../../src","sources":["components/Display.tsx"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,YAAY;AAIrC,OAAO,MAAMC,OAA8C,GAAGA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,KAAK;EACtF,MAAM;IAAEC;EAAU,CAAC,GAAGJ,QAAQ,CAACG,KAAK,CAAC;EAErC,OAAOC,SAAS,GACVF,QAAQ,GACR,IAAI;AACd,CAAC","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ import { useMedia } from './useMedia';
4
+ export const Hide = ({
5
+ children,
6
+ ...props
7
+ }) => {
8
+ const {
9
+ isVisible
10
+ } = useMedia(props);
11
+ return !isVisible ? children : null;
12
+ };
13
+ //# sourceMappingURL=Hide.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMedia","Hide","children","props","isVisible"],"sourceRoot":"../../../src","sources":["components/Hide.tsx"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,YAAY;AAIrC,OAAO,MAAMC,IAAwC,GAAGA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,KAAK;EAChF,MAAM;IAAEC;EAAU,CAAC,GAAGJ,QAAQ,CAACG,KAAK,CAAC;EAErC,OAAO,CAACC,SAAS,GACXF,QAAQ,GACR,IAAI;AACd,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export { Hide } from './Hide';
4
+ export { Display } from './Display';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Hide","Display"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,QAAQ;AAC7B,SAASC,OAAO,QAAQ,WAAW","ignoreList":[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ import { useEffect, useLayoutEffect, useState } from 'react';
4
+ import { StyleSheet, UnistyleDependency, UnistylesRuntime } from '../specs';
5
+ import { isValidMq, parseMq, isUnistylesMq } from '../mq';
6
+ export const useMedia = config => {
7
+ const computeIsVisible = () => {
8
+ const maybeMq = config.mq;
9
+ if (!isUnistylesMq(maybeMq)) {
10
+ console.error(`🦄 Unistyles: Received invalid mq: ${maybeMq}`);
11
+ return false;
12
+ }
13
+ const parsedMq = parseMq(maybeMq);
14
+ if (!isValidMq(parsedMq)) {
15
+ console.error(`🦄 Unistyles: Received invalid mq where min is greater than max: ${maybeMq}`);
16
+ return false;
17
+ }
18
+ const {
19
+ width,
20
+ height
21
+ } = UnistylesRuntime.screen;
22
+ if (parsedMq.minWidth !== undefined && width < parsedMq.minWidth) {
23
+ return false;
24
+ }
25
+ if (parsedMq.maxWidth !== undefined && width > parsedMq.maxWidth) {
26
+ return false;
27
+ }
28
+ if (parsedMq.minHeight !== undefined && height < parsedMq.minHeight) {
29
+ return false;
30
+ }
31
+ if (parsedMq.maxHeight !== undefined && height > parsedMq.maxHeight) {
32
+ return false;
33
+ }
34
+ return true;
35
+ };
36
+ const [isVisible, setIsVisible] = useState(computeIsVisible());
37
+ useEffect(() => {
38
+ setIsVisible(computeIsVisible());
39
+ }, [config.mq]);
40
+ useLayoutEffect(() => {
41
+ const removeChangeListener = StyleSheet.addChangeListener(dependencies => {
42
+ if (dependencies.includes(UnistyleDependency.Breakpoints)) {
43
+ setIsVisible(computeIsVisible());
44
+ }
45
+ });
46
+ return () => {
47
+ removeChangeListener();
48
+ };
49
+ }, [config.mq]);
50
+ return {
51
+ isVisible
52
+ };
53
+ };
54
+ //# sourceMappingURL=useMedia.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useLayoutEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","isValidMq","parseMq","isUnistylesMq","useMedia","config","computeIsVisible","maybeMq","mq","console","error","parsedMq","width","height","screen","minWidth","undefined","maxWidth","minHeight","maxHeight","isVisible","setIsVisible","removeChangeListener","addChangeListener","dependencies","includes","Breakpoints"],"sourceRoot":"../../../src","sources":["components/useMedia.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,eAAe,EAAEC,QAAQ,QAAQ,OAAO;AAC5D,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAkC,UAAU;AACrG,SAASC,SAAS,EAAEC,OAAO,EAAEC,aAAa,QAAQ,OAAO;AAEzD,OAAO,MAAMC,QAAQ,GAAIC,MAAsB,IAAK;EAChD,MAAMC,gBAAgB,GAAGA,CAAA,KAAe;IACpC,MAAMC,OAAO,GAAGF,MAAM,CAACG,EAAuB;IAE9C,IAAI,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Q,CAAC1B,kBAAkB,CAAC2B,WAAW,CAAC,EAAE;QACvDL,YAAY,CAACf,gBAAgB,CAAC,CAAC,CAAC;MACpC;IACJ,CAAC,CAAC;IAEF,OAAO,MAAM;MACTgB,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,CAACjB,MAAM,CAACG,EAAE,CAAC,CAAC;EAEf,OAAO;IACHY;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
@@ -2,7 +2,8 @@
2
2
 
3
3
  import React from 'react';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
- export const createUnistylesComponent = (Component, _) => {
5
+ const SUPPORTED_STYLE_PROPS = ['style', 'contentContainerStyle'];
6
+ export const createUnistylesComponent = (Component, _ = () => ({})) => {
6
7
  return props => {
7
8
  return /*#__PURE__*/_jsx(Component, {
8
9
  ...props
@@ -1 +1 @@
1
- {"version":3,"names":["React","jsx","_jsx","createUnistylesComponent","Component","_","props"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAmD,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAKtE,OAAO,MAAMC,wBAAwB,GAAGA,CAA+BC,SAAY,EAAEC,CAAc,KAAK;EACpG,OAAQC,KAAwB,IAAK;IACjC,oBAAOJ,IAAA,CAACE,SAAS;MAAA,GAAKE;IAAK,CAAG,CAAC;EACnC,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","jsx","_jsx","SUPPORTED_STYLE_PROPS","createUnistylesComponent","Component","_","props"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAmD,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAKtE,MAAMC,qBAAqB,GAAG,CAAC,OAAO,EAAE,uBAAuB,CAAU;AAEzE,OAAO,MAAMC,wBAAwB,GAAGA,CAA+BC,SAAY,EAAEC,CAAc,GAAGA,CAAA,MAAO,CAAC,CAAC,CAAC,KAAK;EACjH,OAAQC,KAAwB,IAAK;IACjC,oBAAOL,IAAA,CAACG,SAAS;MAAA,GAAKE;IAAK,CAAG,CAAC;EACnC,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,17 +1,47 @@
1
1
  "use strict";
2
2
 
3
- import React, { useEffect, useState } from 'react';
3
+ import React, { useEffect, useRef, useState } from 'react';
4
4
  import { StyleSheet, UnistyleDependency, UnistylesRuntime } from '../specs';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
- export const createUnistylesComponent = (Component, mappings) => {
6
+ const SUPPORTED_STYLE_PROPS = ['style', 'contentContainerStyle'];
7
+ export const createUnistylesComponent = (Component, mappings = () => ({})) => {
7
8
  return props => {
8
9
  const [theme, setTheme] = useState(UnistylesRuntime.getTheme());
9
10
  const [, setRt] = useState(0);
11
+ const stylesRef = useRef({});
12
+ const isForcedRef = useRef(false);
13
+ if (!isForcedRef.current) {
14
+ SUPPORTED_STYLE_PROPS.forEach(propName => {
15
+ if (props?.[propName]) {
16
+ if (Array.isArray(props[propName])) {
17
+ console.error(`🦄 Unistyles: createUnistylesComponent requires ${propName} to be an object. Please check props for component: ${Component.displayName}`);
18
+ }
19
+ if (props[propName].__unistyles_name && !props[propName].__proto__?.getStyle) {
20
+ console.error(`🦄 Unistyles: createUnistylesComponent received style that is not bound. You likely used the spread operator on a Unistyle style. Please check props for component: ${Component.displayName}`);
21
+ }
22
+ stylesRef.current = {
23
+ ...stylesRef.current,
24
+ [propName]: props[propName]
25
+ };
26
+ }
27
+ });
28
+ }
10
29
  useEffect(() => {
11
30
  const removeChangeListener = StyleSheet.addChangeListener(dependencies => {
12
- const componentDependencies = props.style?.uni__dependencies || mappings(theme).style?.uni__dependencies;
31
+ const componentDependencies = props.style?.__proto__.uni__dependencies || mappings(theme).style?.__proto__.uni__dependencies;
13
32
  if (dependencies.includes(UnistyleDependency.Theme) && (!componentDependencies || componentDependencies.includes(UnistyleDependency.Theme))) {
14
33
  setTheme(UnistylesRuntime.getTheme());
34
+
35
+ // override with Unistyles styles
36
+ SUPPORTED_STYLE_PROPS.forEach(propName => {
37
+ if (props?.[propName]) {
38
+ stylesRef.current = {
39
+ ...stylesRef.current,
40
+ [propName]: props[propName].__proto__?.getStyle() || props[propName]
41
+ };
42
+ }
43
+ });
44
+ isForcedRef.current = true;
15
45
  }
16
46
  if (dependencies.some(dependency => dependency >= 2) && (!componentDependencies || componentDependencies.some(dependency => dependency >= 2))) {
17
47
  setRt(prevState => prevState + 1);
@@ -31,6 +61,14 @@ export const createUnistylesComponent = (Component, mappings) => {
31
61
  }
32
62
  mergedProps[key] = props[key];
33
63
  });
64
+
65
+ // override with Unistyles styles
66
+ SUPPORTED_STYLE_PROPS.forEach(propName => {
67
+ if (mergedProps[propName]) {
68
+ mergedProps[propName] = stylesRef.current[propName];
69
+ }
70
+ });
71
+ isForcedRef.current = false;
34
72
  return /*#__PURE__*/_jsx(Component, {
35
73
  ...mergedProps
36
74
  });
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","jsx","_jsx","createUnistylesComponent","Component","mappings","props","theme","setTheme","getTheme","setRt","removeChangeListener","addChangeListener","dependencies","componentDependencies","style","uni__dependencies","includes","Theme","some","dependency","prevState","mergedProps","Object","keys","forEach","key","assign"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAA6CC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3F,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAkC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIrG,OAAO,MAAMC,wBAAwB,GAAGA,CAA+BC,SAAY,EAAEC,QAAqB,KAAK;EAC3G,OAAQC,KAAwB,IAAK;IACjC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGX,QAAQ,CAAiBG,gBAAgB,CAACS,QA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,CAACI,GAAG,CAAC,GAAGpB,KAAK,CAACoB,GAAG,CAAC;IACjC,CAAC,CAAC;IAEF,oBAAOxB,IAAA,CAACE,SAAS;MAAA,GAAKkB;IAAW,CAAG,CAAC;EACzC,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useRef","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","jsx","_jsx","SUPPORTED_STYLE_PROPS","createUnistylesComponent","Component","mappings","props","theme","setTheme","getTheme","setRt","stylesRef","isForcedRef","current","forEach","propName","Array","isArray","console","error","displayName","__unistyles_name","__proto__","getStyle","removeChangeListener","addChangeListener","dependencies","componentDependencies","style","uni__dependencies","includes","Theme","some","dependency","prevState","mergedProps","Object","keys","key","assign"],"sourceRoot":"../../../src","sources":["core/createUnistylesComponent.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAA6CC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEnG,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAkC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIrG,MAAMC,qBAAqB,GAAG,CAAC,OAAO,EAAE,uBAAuB,CAAU;AAEzE,OAAO,MAAMC,wBAAwB,GAAGA,CAA+BC,SAAY,EAAEC,QAAqB,GAAGA,CAAA,MAAO,CAAC,CAAC,CAAC,KAAK;EACxH,OAAQC,KAAwB,IAAK;IACjC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGZ,QAAQ,CAAiBG,gBAAgB,CAACU,QAAQ,CAAC,CAAC,CAAC;IAC/E,MAAM,GAAGC,KAAK,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;IAC7B,MAAMe,SAAS,GAAGhB,MAAM,CAAsB,CAAC,CAAC,CAAC;IACjD,MAAMiB,WAAW,GAAGjB,MAAM,CAAC,KAAK,CAAC;IAEjC,IAAI,CAACiB,WAAW,CAACC,OAAO,EAAE;MACtBX,qBAAqB,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AAA,CAACG,SAAS;MAAA,GAAK+B;IAAW,CAAG,CAAC;EACzC,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
2
 
3
- export { useBreakpoint } from './useBreakpoint';
4
- export { useTheme } from './useTheme';
5
3
  export { createUnistylesComponent } from './createUnistylesComponent';
6
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useBreakpoint","useTheme","createUnistylesComponent"],"sourceRoot":"../../../src","sources":["core/index.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,wBAAwB,QAAQ,4BAA4B","ignoreList":[]}
1
+ {"version":3,"names":["createUnistylesComponent"],"sourceRoot":"../../../src","sources":["core/index.ts"],"mappings":";;AAAA,SAASA,wBAAwB,QAAQ,4BAA4B","ignoreList":[]}
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- //# sourceMappingURL=global.js.maplobal.js.map
2
+ //# sourceMappingURL=global.js.map
@@ -1,2 +1 @@
1
1
  {"version":3,"names":[],"sourceRoot":"../../src","sources":["global.ts"],"mappings":"","ignoreList":[]}
2
- ":[]}
@@ -2,5 +2,6 @@
2
2
 
3
3
  export * from './specs';
4
4
  export { mq } from './mq';
5
- export { useTheme, useBreakpoint, createUnistylesComponent } from './core';
5
+ export { createUnistylesComponent } from './core';
6
+ export * from './components';
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["mq","useTheme","useBreakpoint","createUnistylesComponent"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,SAAS;AACvB,SAASA,EAAE,QAAQ,MAAM;AAEzB,SAASC,QAAQ,EAAEC,aAAa,EAAEC,wBAAwB,QAAQ,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["mq","createUnistylesComponent"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,SAAS;AACvB,SAASA,EAAE,QAAQ,MAAM;AAEzB,SAASC,wBAAwB,QAAQ,QAAQ;AAEjD,cAAc,cAAc","ignoreList":[]}
package/lib/module/mq.js CHANGED
@@ -1,5 +1,9 @@
1
1
  "use strict";
2
2
 
3
+ import { UnistylesRuntime } from './specs';
4
+ const IS_UNISTYLES_REGEX = /:([hw])\[(\d+)(?:,\s*(\d+|Infinity))?]/;
5
+ const UNISTYLES_WIDTH_REGEX = /:(w)\[(\d+)(?:,\s*(\d+|Infinity))?]/;
6
+ const UNISTYLES_HEIGHT_REGEX = /:(h)\[(\d+)(?:,\s*(\d+|Infinity))?]/;
3
7
  const getMQValue = value => {
4
8
  if (typeof value === 'number') {
5
9
  return value;
@@ -7,17 +11,7 @@ const getMQValue = value => {
7
11
  if (value === null) {
8
12
  return 0;
9
13
  }
10
-
11
- // todo take it from js
12
- const breakpoints = {
13
- xs: 0,
14
- sm: 300,
15
- md: 500,
16
- lg: 800,
17
- xl: 1200
18
- };
19
-
20
- // @ts-ignore
14
+ const breakpoints = UnistylesRuntime.breakpoints;
21
15
  return breakpoints[value] ?? 0;
22
16
  };
23
17
 
@@ -41,4 +35,20 @@ export const mq = {
41
35
  }
42
36
  })
43
37
  };
38
+ export const parseMq = mq => {
39
+ const [, width, fromW, toW] = UNISTYLES_WIDTH_REGEX.exec(mq) || [];
40
+ const [, height, fromH, toH] = UNISTYLES_HEIGHT_REGEX.exec(mq) || [];
41
+ return {
42
+ minWidth: !width || fromW === 'Infinity' ? undefined : Number(fromW),
43
+ maxWidth: !width || toW === 'Infinity' ? undefined : Number(toW),
44
+ minHeight: !height || fromH === 'Infinity' ? undefined : Number(fromH),
45
+ maxHeight: !height || toH === 'Infinity' ? undefined : Number(toH)
46
+ };
47
+ };
48
+ export const isUnistylesMq = mq => IS_UNISTYLES_REGEX.test(mq);
49
+ export const isValidMq = parsedMQ => {
50
+ const isWidthValid = parsedMQ.minWidth === undefined || parsedMQ.maxWidth === undefined || parsedMQ.minWidth <= parsedMQ.maxWidth;
51
+ const isHeightValid = parsedMQ.minHeight === undefined || parsedMQ.maxHeight === undefined || parsedMQ.minHeight <= parsedMQ.maxHeight;
52
+ return isWidthValid && isHeightValid;
53
+ };
44
54
  //# sourceMappingURL=mq.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getMQValue","value","breakpoints","xs","sm","md","lg","xl","mq","only","width","wMin","wMax","Infinity","height","hMin","hMax","and"],"sourceRoot":"../../src","sources":["mq.ts"],"mappings":";;AAsBA,MAAMA,UAAU,GAAIC,KAAwB,IAAK;EAC7C,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC3B,OAAOA,KAAK;EAChB;EAEA,IAAIA,KAAK,KAAK,IAAI,EAAE;IAChB,OAAO,CAAC;EACZ;;EAEA;EACA,MAAMC,WAAW,GAAG;IAChBC,EAAE,EAAE,CAAC;IACLC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE,GAAG;IACPC,EAAE,EAAE;EACR,CAAC;;EAED;EACA,OAAOL,WAAW,CAACD,KAAK,CAAC,IAAI,CAAC;AAClC,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMO,EAAa,GAAG;EACzBC,IAAI,EAAE;IACFC,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,KAAM,MAAMb,UAAU,CAACW,IAAI,CAAC,KAAKX,UAAU,CAACY,IAAI,CAAC,GAAyB;IACvIE,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,KAAM,MAAMb,UAAU,CAACe,IAAI,CAAC,KAAKf,UAAU,CAACgB,IAAI,CAAC;EACnH,CAAC;EACDN,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,MAAM;IAC/DI,GAAG,EAAE;MACDH,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,KACzD,MAAMb,UAAU,CAACW,IAAI,CAAC,KAAKX,UAAU,CAACY,IAAI,CAAC,OAAOZ,UAAU,CAACe,IAAI,CAAC,KAAKf,UAAU,CAACgB,IAAI,CAAC;IAChG;EACJ,CAAC,CAAC;EACFF,MAAM,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGH,QAAQ,MAAM;IAChEI,GAAG,EAAE;MACDP,KAAK,EAAEA,CAACC,IAAuB,GAAG,CAAC,EAAEC,IAAa,GAAGC,QAAQ,KACxD,MAAMb,UAAU,CAACW,IAAI,CAAC,KAAKX,UAAU,CAACY,IAAI,CAAC,OAAOZ,UAAU,CAACe,IAAI,CAAC,KAAKf,UAAU,CAACgB,IAAI,CAAC;IAChG;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["UnistylesRuntime","IS_UNISTYLES_REGEX","UNISTYLES_WIDTH_REGEX","UNISTYLES_HEIGHT_REGEX","getMQValue","value","breakpoints","mq","only","width","wMin","wMax","Infinity","height","hMin","hMax","and","parseMq","fromW","toW","exec","fromH","toH","minWidth","undefined","Number","maxWidth","minHeight","maxHeight","isUnistylesMq","test","isValidMq","parsedMQ","isWidthValid","isHeightValid"],"sourceRoot":"../../src","sources":["mq.ts"],"mappings":";;AAEA,SAASA,gBAAgB,QAAQ,SAAS;AAE1C,MAAMC,kBAAkB,GAAG,wCAAwC;AACnE,MAAMC,qBAAqB,GAAG,qCAAqC;AACnE,MAAMC,sBAAsB,GAAG,qCAAqC;AAqBpE,MAAMC,UAAU,GAAIC,KAAwB,IAAK;EAC7C,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC3B,OAAOA,KAAK;EAChB;EAEA,IAAIA,KAAK,KAAK,IAAI,EAAE;IAChB,OAAO,CAAC;EACZ;EAEA,MAAMC,WAAW,GAAGN,gBAAgB,CAACM,WAAW;EAEhD,OAAOA,WAAW,CAACD,KAAK,CAAC,IAAI,CAAC;AAClC,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AAEC,GAAG,CAAC,GAAGnB,sBAAsB,CAACiB,IAAI,CAACb,EAAE,CAAC,IAAI,EAAE;EAEpE,OAAO;IACHgB,QAAQ,EAAE,CAACd,KAAK,IAAIS,KAAK,KAAK,UAAU,GAAGM,SAAS,GAAGC,MAAM,CAACP,KAAK,CAAC;IACpEQ,QAAQ,EAAE,CAACjB,KAAK,IAAIU,GAAG,KAAK,UAAU,GAAGK,SAAS,GAAGC,MAAM,CAACN,GAAG,CAAC;IAChEQ,SAAS,EAAE,CAACd,MAAM,IAAIQ,KAAK,KAAK,UAAU,GAAGG,SAAS,GAAGC,MAAM,CAACJ,KAAK,CAAC;IACtEO,SAAS,EAAE,CAACf,MAAM,IAAIS,GAAG,KAAK,UAAU,GAAGE,SAAS,GAAGC,MAAM,CAACH,GAAG;EACrE,CAAC;AACL,CAAC;AAED,OAAO,MAAMO,aAAa,GAAItB,EAAU,IAAKN,kBAAkB,CAAC6B,IAAI,CAACvB,EAAE,CAAC;AAExE,OAAO,MAAMwB,SAAS,GAAIC,QAAoC,IAAK;EAC/D,MAAMC,YAAY,GAAGD,QAAQ,CAACT,QAAQ,KAAKC,SAAS,IAAIQ,QAAQ,CAACN,QAAQ,KAAKF,SAAS,IAAIQ,QAAQ,CAACT,QAAQ,IAAIS,QAAQ,CAACN,QAAQ;EACjI,MAAMQ,aAAa,GAAGF,QAAQ,CAACL,SAAS,KAAKH,SAAS,IAAIQ,QAAQ,CAACJ,SAAS,KAAKJ,SAAS,IAAIQ,QAAQ,CAACL,SAAS,IAAIK,QAAQ,CAACJ,SAAS;EAEtI,OAAOK,YAAY,IAAIC,aAAa;AACxC,CAAC","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import '../types';
4
- export var UnistyleDependency;
5
- (function (UnistyleDependency) {
3
+ export let UnistyleDependency = /*#__PURE__*/function (UnistyleDependency) {
6
4
  UnistyleDependency[UnistyleDependency["Theme"] = 0] = "Theme";
7
5
  UnistyleDependency[UnistyleDependency["ThemeName"] = 1] = "ThemeName";
8
6
  UnistyleDependency[UnistyleDependency["AdaptiveThemes"] = 2] = "AdaptiveThemes";
@@ -18,6 +16,9 @@ export var UnistyleDependency;
18
16
  UnistyleDependency[UnistyleDependency["StatusBar"] = 12] = "StatusBar";
19
17
  UnistyleDependency[UnistyleDependency["NavigationBar"] = 13] = "NavigationBar";
20
18
  UnistyleDependency[UnistyleDependency["Ime"] = 14] = "Ime";
21
- })(UnistyleDependency || (UnistyleDependency = {}));
22
- //# sourceMappingURL=NativePlatform.nitro.js.mapt available from JS
19
+ return UnistyleDependency;
20
+ }({});
21
+
22
+ // represents any native API that can communicate with Unistyles
23
+ // not available from JS
23
24
  //# sourceMappingURL=NativePlatform.nitro.js.map
@@ -1,2 +1 @@
1
1
  {"version":3,"names":["UnistyleDependency"],"sourceRoot":"../../../../src","sources":["specs/NativePlatform/NativePlatform.nitro.ts"],"mappings":";;AAMA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;;AAgC9B;AACA","ignoreList":[]}
2
- AY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY;EACvEA,kBAAkB,CAACA,kBAAkB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa;EACzEA,kBAAkB,CAACA,kBAAkB,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB;EACzFA,kBAAkB,CAACA,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ;EAC/DA,kBAAkB,CAACA,kBAAkB,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,GAAG,YAAY;EACxEA,kBAAkB,CAACA,kBAAkB,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,WAAW;EACtEA,kBAAkB,CAACA,kBAAkB,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,WAAW;EACtEA,kBAAkB,CAACA,kBAAkB,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,GAAG,eAAe;EAC9EA,kBAAkB,CAACA,kBAAkB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,KAAK;AAC9D,CAAC,EAAEA,kBAAkB,KAAKA,kBAAkB,GAAG,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/UnistylesNavigationBar.nitro.js"],"mappings":";;AAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/UnistylesNavigationBar.nitro.ts"],"mappings":"","ignoreList":[]}
@@ -1,2 +1 @@
1
1
  {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/ShadowRegistry.nitro.ts"],"mappings":"","ignoreList":[]}
2
- ":[]}
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
-
3
- export {};
4
2
  //# sourceMappingURL=types.js.map
@@ -1,2 +1 @@
1
1
  {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/types.ts"],"mappings":"","ignoreList":[]}
2
- ":[]}
@@ -1,2 +1 @@
1
1
  {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/StatusBar/UnistylesStatusBar.nitro.ts"],"mappings":"","ignoreList":[]}
2
- ":[]}
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
 
3
3
  export {};
4
- //# sourceMappingURL=UnistylesStyleSheet.nitro.js.mapceMappingURL=UnistylesStyleSheet.nitro.js.map
4
+ //# sourceMappingURL=UnistylesStyleSheet.nitro.js.map
@@ -1,2 +1 @@
1
1
  {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/UnistylesStyleSheet.nitro.ts"],"mappings":"","ignoreList":[]}
2
- ";;AAAA,SAASA,kBAAkB,QAAQ,mBAAmB","ignoreList":[]}
@@ -1,2 +1 @@
1
- {"version":3,"names":["NitroModules","processColor","StyleSheet","NativeStyleSheet","HybridUnistylesStyleSheet","createHybridObject","absoluteFillObject","absoluteFill","flatten","compose","jsMethods","init"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.js"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AACzD,SAASC,YAAY,EAAEC,UAAU,IAAIC,gBAAgB,QAAQ,cAAc;AAC3E,MAAMC,yBAAyB,GAAGJ,YAAY,CACzCK,kBAAkB,CAAC,qBAAqB,CAAC;AAC9CD,yBAAyB,CAACE,kBAAkB,GAAGH,gBAAgB,CAACG,kBAAkB;AAClFF,yBAAyB,CAACG,YAAY,GAAGJ,gBAAgB,CAACI,YAAY;AACtEH,yBAAyB,CAACI,OAAO,GAAGL,gBAAgB,CAACK,OAAO;AAC5DJ,yBAAyB,CAACK,OAAO,GAAGN,gBAAgB,CAACM,OAAO;AAC5DL,yBAAyB,CAACM,SAAS,GAAG;EAClCT;AACJ,CAAC;AACDG,yBAAyB,CAACO,IAAI,CAAC,CAAC;AAChC,OAAO,MAAMT,UAAU,GAAGE,yBAAyB","ignoreList":[]}
2
- }
1
+ {"version":3,"names":["NitroModules","processColor","StyleSheet","NativeStyleSheet","HybridUnistylesStyleSheet","createHybridObject","absoluteFillObject","absoluteFill","flatten","compose","jsMethods","init"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AACzD,SAASC,YAAY,EAAEC,UAAU,IAAIC,gBAAgB,QAAQ,cAAc;AAgC3E,MAAMC,yBAAyB,GAAGJ,YAAY,CACzCK,kBAAkB,CAAsB,qBAAqB,CAAC;AAEnED,yBAAyB,CAACE,kBAAkB,GAAGH,gBAAgB,CAACG,kBAAkB;AAClFF,yBAAyB,CAACG,YAAY,GAAGJ,gBAAgB,CAACI,YAAY;AACtEH,yBAAyB,CAACI,OAAO,GAAGL,gBAAgB,CAACK,OAAO;AAC5DJ,yBAAyB,CAACK,OAAO,GAAGN,gBAAgB,CAACM,OAAO;AAC5DL,yBAAyB,CAACM,SAAS,GAAG;EAClCT;AACJ,CAAC;AAEDG,yBAAyB,CAACO,IAAI,CAAC,CAAC;AAIhC,OAAO,MAAMT,UAAU,GAAGE,yBAAsE","ignoreList":[]}
@@ -1,2 +1 @@
1
- {"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../../src","sources":["specs/TurboUnistyles/NativeTurboUnistyles.js"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,cAAc;AAClDA,mBAAmB,CAACC,GAAG,CAAC,WAAW,CAAC","ignoreList":[]}
2
- reList":[]}
1
+ {"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../../src","sources":["specs/TurboUnistyles/NativeTurboUnistyles.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;AACA;;AAGAA,mBAAmB,CAACC,GAAG,CAAO,WAAW,CAAC","ignoreList":[]}
@@ -1,2 +1 @@
1
1
  {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/UnistylesRuntime.nitro.ts"],"mappings":"","ignoreList":[]}
2
- ":[]}
@@ -1,2 +1 @@
1
- {"version":3,"names":["processColor","NitroModules","attachStatusBarJSMethods","attachNavigationBarJSMethods","isIOS","HybridUnistylesRuntime","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","setImmersiveMode","isEnabled","setHidden","Runtime"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.js"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAC3C,SAASC,YAAY,QAAQ,4BAA4B;AACzD,SAASC,wBAAwB,QAAQ,cAAc;AACvD,SAASC,4BAA4B,QAAQ,iBAAiB;AAC9D,SAASC,KAAK,QAAQ,cAAc;AACpC,MAAMC,sBAAsB,GAAGJ,YAAY,CACtCK,kBAAkB,CAAC,kBAAkB,CAAC;AAC3CD,sBAAsB,CAACE,SAAS,GAAGF,sBAAsB,CAACG,qBAAqB,CAAC,CAAC;AACjFH,sBAAsB,CAACI,aAAa,GAAGJ,sBAAsB,CAACK,yBAAyB,CAAC,CAAC;AACzFL,sBAAsB,CAACM,2BAA2B,GAAGN,sBAAsB,CAACO,0BAA0B;AACtGP,sBAAsB,CAACO,0BAA0B,GAAIC,KAAK,IAAK;EAC3D,MAAMC,WAAW,GAAGd,YAAY,CAACa,KAAK,CAAC,IAAI,CAAC;EAC5CR,sBAAsB,CAACM,2BAA2B,CAACG,WAAW,CAAC;AACnE,CAAC;AACD,IAAIV,KAAK,EAAE;EACPC,sBAAsB,CAACU,gBAAgB,GAAIC,SAAS,IAAKX,sBAAsB,CAACE,SAAS,CAACU,SAAS,CAACD,SAAS,EAAE,MAAM,CAAC;AAC1H;AACAd,wBAAwB,CAACG,sBAAsB,CAACE,SAAS,CAAC;AAC1DJ,4BAA4B,CAACE,sBAAsB,CAACI,aAAa,CAAC;AAClE,OAAO,MAAMS,OAAO,GAAGb,sBAAsB","ignoreList":[]}
2
- ":[]}
1
+ {"version":3,"names":["processColor","NitroModules","attachStatusBarJSMethods","attachNavigationBarJSMethods","isIOS","HybridUnistylesRuntime","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","setImmersiveMode","isEnabled","setHidden","Runtime"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAC3C,SAASC,YAAY,QAAQ,4BAA4B;AAGzD,SAASC,wBAAwB,QAAiC,cAAc;AAChF,SAASC,4BAA4B,QAAqC,iBAAiB;AAE3F,SAASC,KAAK,QAAQ,cAAc;AAkCpC,MAAMC,sBAAsB,GAAGJ,YAAY,CACtCK,kBAAkB,CAA0B,kBAAkB,CAAC;AAEpED,sBAAsB,CAACE,SAAS,GAAGF,sBAAsB,CAACG,qBAAqB,CAAC,CAAC;AACjFH,sBAAsB,CAACI,aAAa,GAAGJ,sBAAsB,CAACK,yBAAyB,CAAC,CAAC;AACzFL,sBAAsB,CAACM,2BAA2B,GAAGN,sBAAsB,CAACO,0BAA0B;AAEtGP,sBAAsB,CAACO,0BAA0B,GAAIC,KAAc,IAAK;EACpE,MAAMC,WAAW,GAAGd,YAAY,CAACa,KAAK,CAAC,IAAI,CAAC;EAE5CR,sBAAsB,CAACM,2BAA2B,CAACG,WAAqB,CAAC;AAC7E,CAAC;AAED,IAAIV,KAAK,EAAE;EACPC,sBAAsB,CAACU,gBAAgB,GAAIC,SAAkB,IAAKX,sBAAsB,CAACE,SAAS,CAACU,SAAS,CAACD,SAAS,EAAE,MAAM,CAAC;AACnI;AAEAd,wBAAwB,CAACG,sBAAsB,CAACE,SAAS,CAAC;AAC1DJ,4BAA4B,CAACE,sBAAsB,CAACI,aAAa,CAAC;AAElE,OAAO,MAAMS,OAAO,GAAGb,sBAA0C","ignoreList":[]}
@@ -1,2 +1 @@
1
1
  {"version":3,"names":["ColorScheme","Orientation","StatusBarStyle"],"sourceRoot":"../../../src","sources":["specs/types.ts"],"mappings":";;AAGA,WAAYA,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAMvB,WAAYC,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAkBvB,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
2
- WAAW,EAAE;EACpBA,WAAW,CAAC,UAAU,CAAC,GAAG,UAAU;EACpCA,WAAW,CAAC,WAAW,CAAC,GAAG,WAAW;AAC1C,CAAC,EAAEA,WAAW,KAAKA,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC;AACrC,OAAO,IAAIC,cAAc;AACzB,CAAC,UAAUA,cAAc,EAAE;EACvBA,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS;EACrCA,cAAc,CAAC,OAAO,CAAC,GAAG,OAAO;EACjCA,cAAc,CAAC,MAAM,CAAC,GAAG,MAAM;AACnC,CAAC,EAAEA,cAAc,KAAKA,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
- export var IOSContentSizeCategory;
4
- (function (IOSContentSizeCategory) {
3
+ export let IOSContentSizeCategory = /*#__PURE__*/function (IOSContentSizeCategory) {
5
4
  IOSContentSizeCategory["AccessibilityExtraExtraExtraLarge"] = "accessibilityExtraExtraExtraLarge";
6
5
  IOSContentSizeCategory["AccessibilityExtraExtraLarge"] = "accessibilityExtraExtraLarge";
7
6
  IOSContentSizeCategory["AccessibilityExtraLarge"] = "accessibilityExtraLarge";
@@ -15,9 +14,9 @@ export var IOSContentSizeCategory;
15
14
  IOSContentSizeCategory["Small"] = "Small";
16
15
  IOSContentSizeCategory["ExtraSmall"] = "xSmall";
17
16
  IOSContentSizeCategory["Unspecified"] = "unspecified";
18
- })(IOSContentSizeCategory || (IOSContentSizeCategory = {}));
19
- export var AndroidContentSizeCategory;
20
- (function (AndroidContentSizeCategory) {
17
+ return IOSContentSizeCategory;
18
+ }({});
19
+ export let AndroidContentSizeCategory = /*#__PURE__*/function (AndroidContentSizeCategory) {
21
20
  AndroidContentSizeCategory["Small"] = "Small";
22
21
  AndroidContentSizeCategory["Default"] = "Default";
23
22
  AndroidContentSizeCategory["Large"] = "Large";
@@ -25,9 +24,10 @@ export var AndroidContentSizeCategory;
25
24
  AndroidContentSizeCategory["Huge"] = "Huge";
26
25
  AndroidContentSizeCategory["ExtraHuge"] = "ExtraHuge";
27
26
  AndroidContentSizeCategory["ExtraExtraHuge"] = "ExtraExtraHuge";
28
- })(AndroidContentSizeCategory || (AndroidContentSizeCategory = {}));
29
- export var WebContentSizeCategory;
30
- (function (WebContentSizeCategory) {
27
+ return AndroidContentSizeCategory;
28
+ }({});
29
+ export let WebContentSizeCategory = /*#__PURE__*/function (WebContentSizeCategory) {
31
30
  WebContentSizeCategory["Unspecified"] = "web-unspecified";
32
- })(WebContentSizeCategory || (WebContentSizeCategory = {}));
31
+ return WebContentSizeCategory;
32
+ }({});
33
33
  //# sourceMappingURL=accessibility.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["IOSContentSizeCategory","AndroidContentSizeCategory","WebContentSizeCategory"],"sourceRoot":"../../../src","sources":["types/accessibility.js"],"mappings":";;AAAA,OAAO,IAAIA,sBAAsB;AACjC,CAAC,UAAUA,sBAAsB,EAAE;EAC/BA,sBAAsB,CAAC,mCAAmC,CAAC,GAAG,mCAAmC;EACjGA,sBAAsB,CAAC,8BAA8B,CAAC,GAAG,8BAA8B;EACvFA,sBAAsB,CAAC,yBAAyB,CAAC,GAAG,yBAAyB;EAC7EA,sBAAsB,CAAC,oBAAoB,CAAC,GAAG,oBAAoB;EACnEA,sBAAsB,CAAC,qBAAqB,CAAC,GAAG,qBAAqB;EACrEA,sBAAsB,CAAC,sBAAsB,CAAC,GAAG,UAAU;EAC3DA,sBAAsB,CAAC,iBAAiB,CAAC,GAAG,SAAS;EACrDA,sBAAsB,CAAC,YAAY,CAAC,GAAG,QAAQ;EAC/CA,sBAAsB,CAAC,OAAO,CAAC,GAAG,OAAO;EACzCA,sBAAsB,CAAC,QAAQ,CAAC,GAAG,QAAQ;EAC3CA,sBAAsB,CAAC,OAAO,CAAC,GAAG,OAAO;EACzCA,sBAAsB,CAAC,YAAY,CAAC,GAAG,QAAQ;EAC/CA,sBAAsB,CAAC,aAAa,CAAC,GAAG,aAAa;AACzD,CAAC,EAAEA,sBAAsB,KAAKA,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3D,OAAO,IAAIC,0BAA0B;AACrC,CAAC,UAAUA,0BAA0B,EAAE;EACnCA,0BAA0B,CAAC,OAAO,CAAC,GAAG,OAAO;EAC7CA,0BAA0B,CAAC,SAAS,CAAC,GAAG,SAAS;EACjDA,0BAA0B,CAAC,OAAO,CAAC,GAAG,OAAO;EAC7CA,0BAA0B,CAAC,YAAY,CAAC,GAAG,YAAY;EACvDA,0BAA0B,CAAC,MAAM,CAAC,GAAG,MAAM;EAC3CA,0BAA0B,CAAC,WAAW,CAAC,GAAG,WAAW;EACrDA,0BAA0B,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;AACnE,CAAC,EAAEA,0BAA0B,KAAKA,0BAA0B,GAAG,CAAC,CAAC,CAAC,CAAC;AACnE,OAAO,IAAIC,sBAAsB;AACjC,CAAC,UAAUA,sBAAsB,EAAE;EAC/BA,sBAAsB,CAAC,aAAa,CAAC,GAAG,iBAAiB;AAC7D,CAAC,EAAEA,sBAAsB,KAAKA,sBAAsB,GAAG,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["IOSContentSizeCategory","AndroidContentSizeCategory","WebContentSizeCategory"],"sourceRoot":"../../../src","sources":["types/accessibility.ts"],"mappings":";;AAAA,WAAYA,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;AAgBlC,WAAYC,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;AAUtC,WAAYC,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA","ignoreList":[]}
@@ -1,2 +1 @@
1
1
  {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/breakpoints.ts"],"mappings":"","ignoreList":[]}
2
- ":[]}
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
-
3
- export {};
4
2
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/common.js"],"mappings":";;AAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/common.ts"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/core.js"],"mappings":";;AAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/core.ts"],"mappings":"","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ // these props are treated differently to nest breakpoints and media queries
4
+
3
5
  const create = stylesheet => stylesheet;
4
6
  export {};
5
- //# sourceMappingURL=stylesheet.js.map = stylesheet => stylesheet;
6
- export {};
7
7
  //# sourceMappingURL=stylesheet.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/variants.js"],"mappings":";;AAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/variants.ts"],"mappings":"","ignoreList":[]}