react-native-unistyles 3.0.0-alpha.40 → 3.0.0-alpha.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. package/README.md +7 -1
  2. package/android/CMakeLists.txt +3 -0
  3. package/android/build.gradle +10 -0
  4. package/android/src/main/java/com/unistyles/NativePlatform+android.kt +10 -1
  5. package/cxx/core/UnistyleData.h +3 -2
  6. package/cxx/core/UnistylesRegistry.cpp +15 -5
  7. package/cxx/core/UnistylesRegistry.h +2 -2
  8. package/cxx/hybridObjects/HybridShadowRegistry.cpp +5 -2
  9. package/cxx/parser/Parser.cpp +10 -4
  10. package/cxx/shadowTree/ShadowLeafUpdate.h +1 -0
  11. package/cxx/shadowTree/ShadowTreeManager.cpp +4 -0
  12. package/ios/Extensions.swift +3 -1
  13. package/ios/NativePlatform+ios.swift +13 -2
  14. package/ios/NativePlatformListener+ios.swift +0 -1
  15. package/lib/commonjs/components/Display.js +2 -2
  16. package/lib/commonjs/components/Display.js.map +1 -1
  17. package/lib/commonjs/components/Hide.js +2 -2
  18. package/lib/commonjs/components/Hide.js.map +1 -1
  19. package/lib/commonjs/components/Pressable.js +64 -0
  20. package/lib/commonjs/components/Pressable.js.map +1 -0
  21. package/lib/commonjs/components/Pressable.web.js +97 -0
  22. package/lib/commonjs/components/Pressable.web.js.map +1 -0
  23. package/lib/commonjs/components/index.js +7 -0
  24. package/lib/commonjs/components/index.js.map +1 -1
  25. package/lib/commonjs/core/getBoundArgs.js +18 -0
  26. package/lib/commonjs/core/getBoundArgs.js.map +1 -0
  27. package/lib/commonjs/core/getId.js +9 -0
  28. package/lib/commonjs/core/getId.js.map +1 -0
  29. package/lib/commonjs/core/index.js +14 -0
  30. package/lib/commonjs/core/index.js.map +1 -1
  31. package/lib/commonjs/hooks/index.js +13 -0
  32. package/lib/commonjs/hooks/index.js.map +1 -0
  33. package/lib/commonjs/hooks/useMedia.js.map +1 -0
  34. package/lib/commonjs/hooks/useMedia.web.js.map +1 -0
  35. package/lib/commonjs/index.js +8 -1
  36. package/lib/commonjs/index.js.map +1 -1
  37. package/lib/commonjs/mq.js +6 -6
  38. package/lib/commonjs/mq.js.map +1 -1
  39. package/lib/commonjs/specs/ShadowRegistry/index.js +3 -4
  40. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  41. package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
  42. package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js +1 -2
  43. package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
  44. package/lib/commonjs/specs/index.web.js +0 -7
  45. package/lib/commonjs/specs/index.web.js.map +1 -1
  46. package/lib/commonjs/utils.js +1 -1
  47. package/lib/commonjs/utils.js.map +1 -1
  48. package/lib/commonjs/web/convert/types.js.map +1 -1
  49. package/lib/commonjs/web/convert/utils.js +1 -1
  50. package/lib/commonjs/web/convert/utils.js.map +1 -1
  51. package/lib/commonjs/web/create.js +4 -1
  52. package/lib/commonjs/web/create.js.map +1 -1
  53. package/lib/commonjs/web/index.js +7 -5
  54. package/lib/commonjs/web/index.js.map +1 -1
  55. package/lib/commonjs/web/listener.js.map +1 -1
  56. package/lib/commonjs/web/runtime.js +7 -7
  57. package/lib/commonjs/web/runtime.js.map +1 -1
  58. package/lib/commonjs/web/shadowRegistry.js.map +1 -1
  59. package/lib/commonjs/web/state.js +23 -16
  60. package/lib/commonjs/web/state.js.map +1 -1
  61. package/lib/commonjs/web/utils/common.js +3 -3
  62. package/lib/commonjs/web/utils/common.js.map +1 -1
  63. package/lib/commonjs/web/utils/unistyle.js +2 -4
  64. package/lib/commonjs/web/utils/unistyle.js.map +1 -1
  65. package/lib/commonjs/web/variants/getVariants.js +1 -1
  66. package/lib/commonjs/web/variants/getVariants.js.map +1 -1
  67. package/lib/commonjs/web/variants/useVariants.js +1 -1
  68. package/lib/module/components/Display.js +1 -1
  69. package/lib/module/components/Display.js.map +1 -1
  70. package/lib/module/components/Hide.js +1 -1
  71. package/lib/module/components/Hide.js.map +1 -1
  72. package/lib/module/components/Pressable.js +58 -0
  73. package/lib/module/components/Pressable.js.map +1 -0
  74. package/lib/module/components/Pressable.web.js +91 -0
  75. package/lib/module/components/Pressable.web.js.map +1 -0
  76. package/lib/module/components/index.js +1 -0
  77. package/lib/module/components/index.js.map +1 -1
  78. package/lib/module/core/getBoundArgs.js +13 -0
  79. package/lib/module/core/getBoundArgs.js.map +1 -0
  80. package/lib/module/core/getId.js +4 -0
  81. package/lib/module/core/getId.js.map +1 -0
  82. package/lib/module/core/index.js +2 -0
  83. package/lib/module/core/index.js.map +1 -1
  84. package/lib/module/hooks/index.js +4 -0
  85. package/lib/module/hooks/index.js.map +1 -0
  86. package/lib/module/hooks/useMedia.js.map +1 -0
  87. package/lib/module/hooks/useMedia.web.js.map +1 -0
  88. package/lib/module/index.js +1 -1
  89. package/lib/module/index.js.map +1 -1
  90. package/lib/module/mq.js +6 -6
  91. package/lib/module/mq.js.map +1 -1
  92. package/lib/module/specs/ShadowRegistry/index.js +3 -4
  93. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  94. package/lib/module/specs/StyleSheet/index.js.map +1 -1
  95. package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js +1 -2
  96. package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
  97. package/lib/module/specs/index.web.js +0 -1
  98. package/lib/module/specs/index.web.js.map +1 -1
  99. package/lib/module/utils.js +1 -1
  100. package/lib/module/utils.js.map +1 -1
  101. package/lib/module/web/convert/types.js.map +1 -1
  102. package/lib/module/web/convert/utils.js +1 -1
  103. package/lib/module/web/convert/utils.js.map +1 -1
  104. package/lib/module/web/create.js +5 -2
  105. package/lib/module/web/create.js.map +1 -1
  106. package/lib/module/web/index.js +7 -3
  107. package/lib/module/web/index.js.map +1 -1
  108. package/lib/module/web/listener.js.map +1 -1
  109. package/lib/module/web/runtime.js +8 -8
  110. package/lib/module/web/runtime.js.map +1 -1
  111. package/lib/module/web/shadowRegistry.js.map +1 -1
  112. package/lib/module/web/state.js +24 -17
  113. package/lib/module/web/state.js.map +1 -1
  114. package/lib/module/web/utils/common.js +1 -1
  115. package/lib/module/web/utils/common.js.map +1 -1
  116. package/lib/module/web/utils/unistyle.js +1 -2
  117. package/lib/module/web/utils/unistyle.js.map +1 -1
  118. package/lib/module/web/variants/getVariants.js +1 -1
  119. package/lib/module/web/variants/getVariants.js.map +1 -1
  120. package/lib/module/web/variants/useVariants.js +1 -1
  121. package/lib/typescript/src/components/Pressable.d.ts +7 -0
  122. package/lib/typescript/src/components/Pressable.d.ts.map +1 -0
  123. package/lib/typescript/src/components/Pressable.web.d.ts +13 -0
  124. package/lib/typescript/src/components/Pressable.web.d.ts.map +1 -0
  125. package/lib/typescript/src/components/index.d.ts +1 -0
  126. package/lib/typescript/src/components/index.d.ts.map +1 -1
  127. package/lib/typescript/src/core/getBoundArgs.d.ts +2 -0
  128. package/lib/typescript/src/core/getBoundArgs.d.ts.map +1 -0
  129. package/lib/typescript/src/core/getId.d.ts +2 -0
  130. package/lib/typescript/src/core/getId.d.ts.map +1 -0
  131. package/lib/typescript/src/core/index.d.ts +2 -0
  132. package/lib/typescript/src/core/index.d.ts.map +1 -1
  133. package/lib/typescript/src/hooks/index.d.ts +2 -0
  134. package/lib/typescript/src/hooks/index.d.ts.map +1 -0
  135. package/lib/typescript/src/hooks/useMedia.d.ts.map +1 -0
  136. package/lib/typescript/src/hooks/useMedia.web.d.ts.map +1 -0
  137. package/lib/typescript/src/index.d.ts +1 -1
  138. package/lib/typescript/src/index.d.ts.map +1 -1
  139. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +1 -1
  140. package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
  141. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +2 -2
  142. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  143. package/lib/typescript/src/specs/ShadowRegistry/types.d.ts +1 -0
  144. package/lib/typescript/src/specs/ShadowRegistry/types.d.ts.map +1 -1
  145. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts +1 -1
  146. package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts.map +1 -1
  147. package/lib/typescript/src/specs/StyleSheet/index.d.ts +3 -2
  148. package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
  149. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts +1 -1
  150. package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
  151. package/lib/typescript/src/specs/index.web.d.ts +0 -2
  152. package/lib/typescript/src/specs/index.web.d.ts.map +1 -1
  153. package/lib/typescript/src/types/common.d.ts +1 -0
  154. package/lib/typescript/src/types/common.d.ts.map +1 -1
  155. package/lib/typescript/src/types/index.d.ts +1 -1
  156. package/lib/typescript/src/types/index.d.ts.map +1 -1
  157. package/lib/typescript/src/web/convert/types.d.ts +1 -1
  158. package/lib/typescript/src/web/convert/types.d.ts.map +1 -1
  159. package/lib/typescript/src/web/create.d.ts +1 -1
  160. package/lib/typescript/src/web/create.d.ts.map +1 -1
  161. package/lib/typescript/src/web/index.d.ts +8 -2
  162. package/lib/typescript/src/web/index.d.ts.map +1 -1
  163. package/lib/typescript/src/web/listener.d.ts.map +1 -1
  164. package/lib/typescript/src/web/runtime.d.ts.map +1 -1
  165. package/lib/typescript/src/web/state.d.ts.map +1 -1
  166. package/lib/typescript/src/web/utils/common.d.ts +1 -1
  167. package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
  168. package/lib/typescript/src/web/utils/unistyle.d.ts +0 -1
  169. package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
  170. package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Umbrella.hpp +1 -1
  171. package/package.json +14 -18
  172. package/plugin/common.js +1 -4
  173. package/plugin/import.js +29 -3
  174. package/plugin/index.js +16 -6
  175. package/plugin/ref.js +4 -54
  176. package/plugin/style.js +116 -43
  177. package/src/components/Display.tsx +1 -1
  178. package/src/components/Hide.tsx +1 -1
  179. package/src/components/Pressable.tsx +72 -0
  180. package/src/components/Pressable.web.tsx +103 -0
  181. package/src/components/index.ts +1 -0
  182. package/src/core/getBoundArgs.ts +15 -0
  183. package/src/core/getId.ts +1 -0
  184. package/src/core/index.ts +2 -0
  185. package/src/hooks/index.ts +1 -0
  186. package/src/index.ts +1 -1
  187. package/src/mq.ts +6 -6
  188. package/src/specs/NativePlatform/NativePlatform.nitro.ts +1 -1
  189. package/src/specs/ShadowRegistry/index.ts +5 -6
  190. package/src/specs/ShadowRegistry/types.ts +2 -1
  191. package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts +1 -1
  192. package/src/specs/StyleSheet/index.ts +3 -2
  193. package/src/specs/TurboUnistyles/NativeTurboUnistyles.ts +1 -2
  194. package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +1 -1
  195. package/src/specs/UnistylesRuntime/index.ts +1 -1
  196. package/src/specs/index.web.ts +0 -4
  197. package/src/types/common.ts +1 -0
  198. package/src/types/index.ts +1 -1
  199. package/src/utils.ts +1 -1
  200. package/src/web/convert/types.ts +1 -1
  201. package/src/web/convert/utils.ts +2 -2
  202. package/src/web/create.ts +6 -2
  203. package/src/web/index.ts +7 -3
  204. package/src/web/listener.ts +2 -0
  205. package/src/web/registry.ts +1 -1
  206. package/src/web/runtime.ts +9 -9
  207. package/src/web/shadowRegistry.ts +2 -2
  208. package/src/web/state.ts +36 -17
  209. package/src/web/utils/common.ts +1 -1
  210. package/src/web/utils/unistyle.ts +3 -9
  211. package/src/web/variants/getVariants.ts +1 -1
  212. package/src/web/variants/useVariants.ts +1 -1
  213. package/lib/commonjs/components/useMedia.js.map +0 -1
  214. package/lib/commonjs/components/useMedia.web.js.map +0 -1
  215. package/lib/module/components/useMedia.js.map +0 -1
  216. package/lib/module/components/useMedia.web.js.map +0 -1
  217. package/lib/typescript/src/components/useMedia.d.ts.map +0 -1
  218. package/lib/typescript/src/components/useMedia.web.d.ts.map +0 -1
  219. /package/lib/commonjs/{components → hooks}/useMedia.js +0 -0
  220. /package/lib/commonjs/{components → hooks}/useMedia.web.js +0 -0
  221. /package/lib/module/{components → hooks}/useMedia.js +0 -0
  222. /package/lib/module/{components → hooks}/useMedia.web.js +0 -0
  223. /package/lib/typescript/src/{components → hooks}/useMedia.d.ts +0 -0
  224. /package/lib/typescript/src/{components → hooks}/useMedia.web.d.ts +0 -0
  225. /package/src/{components → hooks}/useMedia.ts +0 -0
  226. /package/src/{components → hooks}/useMedia.web.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["UnistyleDependency","UnistylesRuntime","UnistylesListenerBuilder","isInitialized","listeners","Array","from","length","Object","keys","Set","stylesheetListeners","emitChange","dependency","forEach","listener","initListeners","darkMedia","addEventListener","event","matches","ColorScheme","hasAdaptiveThemes","Theme","lightMedia","window","Orientation","Dimensions","addListeners","dependencies","add","delete","addStylesheetListeners","UnistylesListener"],"sourceRoot":"../../../src","sources":["web/listener.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,gBAAgB,QAAQ,WAAW;AAE5C,MAAMC,wBAAwB,CAAC;EACnBC,aAAa,GAAG,KAAK;EACrBC,SAAS,GAAGC,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAEC,MAAM,CAACC,IAAI,CAACT,kBAAkB,CAAC,CAACO,MAAM,GAAG;EAAE,CAAC,EAAE,MAAM,IAAIG,GAAG,CAAe,CAAC,CAAC;EAC7GC,mBAAmB,GAAGN,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAEC,MAAM,CAACC,IAAI,CAACT,kBAAkB,CAAC,CAACO,MAAM,GAAG;EAAE,CAAC,EAAE,MAAM,IAAIG,GAAG,CAAe,CAAC,CAAC;EAE/HE,UAAU,GAAIC,UAA8B,IAAK;IAC7C,IAAI,CAACF,mBAAmB,CAACE,UAAU,CAAC,EAAEC,OAAO,CAACC,QAAQ,IAAIA,QAA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IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEiB,GAAG,CAACf,QAAQ,CAAC,CAAC;IAE7E,OAAO,MAAM;MACTc,YAAY,CAACf,OAAO,CAACD,UAAU,IAAI,IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEkB,MAAM,CAAChB,QAAQ,CAAC,CAAC;IACpF,CAAC;EACL,CAAC;EAEDiB,sBAAsB,GAAGA,CAACH,YAAuC,EAAEd,QAAsB,KAAK;IAC1Fc,YAAY,CAACf,OAAO,CAACD,UAAU,IAAI,IAAI,CAACF,mBAAmB,CAACE,UAAU,CAAC,EAAEiB,GAAG,CAACf,QAAQ,CAAC,CAAC;IAEvF,OAAO,MAAM;MACTc,YAAY,CAACf,OAAO,CAACD,UAAU,IAAI,IAAI,CAACF,mBAAmB,CAACE,UAAU,CAAC,EAAEkB,MAAM,CAAChB,QAAQ,CAAC,CAAC;IAC9F,CAAC;EACL,CAAC;AACL;AAEA,OAAO,MAAMkB,iBAAiB,GAAG,IAAI/B,wBAAwB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["UnistyleDependency","UnistylesRuntime","UnistylesListenerBuilder","isInitialized","listeners","Array","from","length","Object","keys","Set","stylesheetListeners","emitChange","dependency","forEach","listener","initListeners","darkMedia","addEventListener","event","matches","ColorScheme","hasAdaptiveThemes","Theme","lightMedia","window","Orientation","Dimensions","addListeners","dependencies","add","delete","addStylesheetListeners","UnistylesListener"],"sourceRoot":"../../../src","sources":["web/listener.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,gBAAgB,QAAQ,WAAW;AAE5C,MAAMC,wBAAwB,CAAC;EACnBC,aAAa,GAAG,KAAK;EACrBC,SAAS,GAAGC,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAEC,MAAM,CAACC,IAAI,CAACT,kBAAkB,CAAC,CAACO,MAAM,GAAG;EAAE,CAAC,EAAE,MAAM,IAAIG,GAAG,CAAe,CA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CAAC,mBAAmB,EAAE,MAAM,IAAI,CAACN,UAAU,CAACZ,kBAAkB,CAAC0B,WAAW,CAAC,CAAC;IACnGD,MAAM,CAACP,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAACN,UAAU,CAACZ,kBAAkB,CAAC2B,UAAU,CAAC,CAAC;EAC3F,CAAC;EAEDC,YAAY,GAAGA,CAACC,YAAuC,EAAEd,QAAsB,KAAK;IAChFc,YAAY,CAACf,OAAO,CAACD,UAAU,IAAI,IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEiB,GAAG,CAACf,QAAQ,CAAC,CAAC;IAE7E,OAAO,MAAM;MACTc,YAAY,CAACf,OAAO,CAACD,UAAU,IAAI,IAAI,CAACT,SAAS,CAACS,UAAU,CAAC,EAAEkB,MAAM,CAAChB,QAAQ,CAAC,CAAC;IACpF,CAAC;EACL,CAAC;EAEDiB,sBAAsB,GAAGA,CAACH,YAAuC,EAAEd,QAAsB,KAAK;IAC1Fc,YAAY,CAACf,OAAO,CAACD,UAAU,IAAI,IAAI,CAACF,mBAAmB,CAACE,UAAU,CAAC,EAAEiB,GAAG,CAACf,QAAQ,CAAC,CAAC;IAEvF,OAAO,MAAM;MACTc,YAAY,CAACf,OAAO,CAACD,UAAU,IAAI,IAAI,CAACF,mBAAmB,CAACE,UAAU,CAAC,EAAEkB,MAAM,CAAChB,QAAQ,CAAC,CAAC;IAC9F,CAAC;EACL,CAAC;AACL;AAEA,OAAO,MAAMkB,iBAAiB,GAAG,IAAI/B,wBAAwB,CAAC,CAAC","ignoreList":[]}
@@ -6,7 +6,7 @@ import { WebContentSizeCategory } from '../types';
6
6
  import { UnistylesListener } from './listener';
7
7
  import { NavigationBar, StatusBar } from './mock';
8
8
  import { UnistylesState } from './state';
9
- import { isServer, schemeToTheme } from './utils';
9
+ import { error, isServer, schemeToTheme } from './utils';
10
10
  class UnistylesRuntimeBuilder {
11
11
  lightMedia = this.getLightMedia();
12
12
  darkMedia = this.getDarkMedia();
@@ -126,6 +126,9 @@ class UnistylesRuntimeBuilder {
126
126
  };
127
127
  }
128
128
  setTheme = themeName => {
129
+ if (this.hasAdaptiveThemes) {
130
+ throw error(`You're trying to set theme to: '${themeName}', but adaptiveThemes are enabled.`);
131
+ }
129
132
  if (themeName === UnistylesRuntime.themeName) {
130
133
  return;
131
134
  }
@@ -150,17 +153,14 @@ class UnistylesRuntimeBuilder {
150
153
  updateTheme = (themeName, updater) => {
151
154
  const oldTheme = UnistylesState.themes.get(themeName);
152
155
  if (!oldTheme) {
153
- throw new Error(`🦄 Theme "${themeName}" is not registered!`);
156
+ throw error(`Unistyles: You're trying to update theme "${themeName}" but it wasn't registered.`);
154
157
  }
155
158
  UnistylesState.themes.set(themeName, updater(oldTheme));
156
159
  };
157
160
  getTheme = (themeName = this.themeName) => {
158
- if (!themeName) {
159
- throw new Error('🦄 No theme selected!');
160
- }
161
- const theme = UnistylesState.themes.get(themeName);
162
- if (!theme) {
163
- throw new Error(`🦄 Theme "${this.themeName}" is not registered!`);
161
+ const theme = UnistylesState.themes.get(themeName ?? '');
162
+ if (!themeName || !theme) {
163
+ throw error(`You're trying to get theme "${themeName}" but it wasn't registered.`);
164
164
  }
165
165
  return theme;
166
166
  };
@@ -1 +1 @@
1
- {"version":3,"names":["UnistyleDependency","ColorScheme","Orientation","WebContentSizeCategory","UnistylesListener","NavigationBar","StatusBar","UnistylesState","isServer","schemeToTheme","UnistylesRuntimeBuilder","lightMedia","getLightMedia","darkMedia","getDarkMedia","window","matchMedia","colorScheme","matches","Light","Dark","Unspecified","themeName","hasAdaptiveThemes","contentSizeCategory","breakpoints","breakpoint","orientation","Portrait","screen","type","includes","Landscape","theme","getTheme","pixelRatio","devicePixelRatio","width","height","innerWidth","innerHeight","fontScale","insets","top","bottom","left","right","ime","statusBar","rtl","document","documentElement","dir","navigationBar","miniRuntime","isLandscape","isPortrait","setTheme","UnistylesRuntime","emitChange","Theme","ThemeName","setAdaptiveThemes","isEnabled","setRootViewBackgroundColor","color","style","backgroundColor","setImmersiveMode","updateTheme","updater","oldTheme","themes","get","Error","set"],"sourceRoot":"../../../src","sources":["web/runtime.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,WAAW,EAAEC,WAAW,QAA0C,gBAAgB;AAE3F,SAASC,sBAAsB,QAAQ,UAAU;AACjD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,aAAa,EAAEC,SAAS,QAAQ,QAAQ;AACjD,SAASC,cAAc,QAAQ,SAAS;AACxC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,SAAS;AAEjD,MAAMC,uBAAuB,CAAC;EAC1BC,UAAU,GAAG,IAAI,CAACC,aAAa,CAAC,CAAC;EACjCC,SAAS,GAAG,IAAI,CAACC,YAAY,CAAC,CAAC;EAEvBF,aAAaA,CAAA,EAA0B;IAC3C,IAAIJ,QAAQ,CAAC,CAAC,EAAE;MACZ,OAAO,IAAI;IACf;IAEA,IAAI,CAAC,IAAI,CAACG,UAAU,EAAE;MAClB,IAAI,CAACA,UAAU,GAAGI,MAAM,CAACC,UAAU,CAAC,+BAA+B,CAAC;IACxE;IAEA,OAAO,IAAI,CAACL,UAAU;EAC1B;EAEQG,YAAYA,CAAA,EAA0B;IAC1C,IAAIN,QAAQ,CAAC,CAAC,EAAE;MACZ,OAAO,IAAI;IACf;IAEA,IAAI,CAAC,IAAI,CAACK,SAAS,EAAE;MACjB,IAAI,CAACA,SAAS,GAAGE,MAAM,CAACC,UAAU,CAAC,8BAA8B,CAAC;IACtE;IAEA,OAAO,IAAI,CAACH,SAAS;EACzB;EAEA,IAAII,WAAWA,CAAA,EAAG;IACd,QAAQ,IAAI;MACR,KAAK,IAAI,CAACL,aAAa,CAAC,CAAC,EAAEM,OAAO;QAC9B,OAAOjB,WAAW,CAACkB,KAAK;MAC5B,KAAK,IAAI,CAACL,YAAY,CAAC,CAAC,EAAEI,OAAO;QAC7B,OAAOjB,WAAW,CAACmB,IAAI;MAC3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,CAACA,SAAS,EAAE;MACZ,MAAM,IAAIoD,KAAK,CAAC,uBAAuB,CAAC;IAC5C;IAEA,MAAMzC,KAAK,GAAG1B,cAAc,CAACiE,MAAM,CAACC,GAAG,CAACnD,SAAS,CAAC;IAElD,IAAI,CAACW,KAAK,EAAE;MACR,MAAM,IAAIyC,KAAK,CAAC,aAAa,IAAI,CAACpD,SAAS,sBAAsB,CAAC;IACtE;IAEA,OAAOW,KAAK;EAChB,CAAC;AACL;AAEA,OAAO,MAAMyB,gBAAgB,GAAG,IAAIhD,uBAAuB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["UnistyleDependency","ColorScheme","Orientation","WebContentSizeCategory","UnistylesListener","NavigationBar","StatusBar","UnistylesState","error","isServer","schemeToTheme","UnistylesRuntimeBuilder","lightMedia","getLightMedia","darkMedia","getDarkMedia","window","matchMedia","colorScheme","matches","Light","Dark","Unspecified","themeName","hasAdaptiveThemes","contentSizeCategory","breakpoints","breakpoint","orientation","Portrait","screen","type","includes","Landscape","theme","getTheme","pixelRatio","devicePixelRatio","width","height","innerWidth","innerHeight","fontScale","insets","top","bottom","left","right","ime","statusBar","rtl","document","documentElement","dir","navigationBar","miniRuntime","isLandscape","isPortrait","setTheme","UnistylesRuntime","emitChange","Theme","ThemeName","setAdaptiveThemes","isEnabled","setRootViewBackgroundColor","color","style","backgroundColor","setImmersiveMode","updateTheme","updater","oldTheme","themes","get","set"],"sourceRoot":"../../../src","sources":["web/runtime.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,WAAW,EAAEC,WAAW,QAA0C,gBAAgB;AAE3F,SAASC,sBAAsB,QAAQ,UAAU;AACjD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,aAAa,EAAEC,SAAS,QAAQ,QAAQ;AACjD,SAASC,cAAc,QAAQ,SAAS;AACxC,SAASC,KAAK,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,SAAS;AAExD,MAAMC,u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CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["convertUnistyles","UnistylesListener","UnistylesRegistry","deepMergeObjects","equal","extractSecrets","extractUnistyleDependencies","isInDocument","getVariants","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","Map","hashMap","classNamesMap","add","ref","_style","_variants","_args","secrets","forEach","__uni__refs","oldResult","get","delete","remove","HTMLElement","styles","filter","style","Object","keys","some","key","startsWith","length","parsedStyles","flatMap","styleIndex","map","secret","__uni__key","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","variants","args","result","variantsResult","fromEntries","resultWithVariants","dependencies","addDependenciesToStylesheet","addListeners","hash","newComputedStyleSheet","newValue","applyStyles","combinedStyles","oldStyles","oldClassNames","className","classList","set","existingHash","injectedClassNames","_web","_classNames","newClassNames","Array","isArray","concat","UnistylesShadowRegistry"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,gBAAgB,QAAQ,UAAU;AAC3C,SAASC,KAAK,EAAEC,cAAc,EAAEC,2BAA2B,EAAEC,YAAY,QAAQ,SAAS;AAC1F,SAASC,WAAW,QAAQ,YAAY;AAIxC,MAAMC,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,IAAIC,GAAG,CAA+B,CAAC;EACpDC,OAAO,GAAG,IAAID,GAAG,CAAsB,CAAC;EACxCE,aAAa,GAAG,IAAIF,GAAG,CAA6B,CAAC;EAE7DG,GAAG,GAAGA,CAACC,GAAQ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cAAc,CAAC;IACpE,MAAMO,kBAAkB,GAAGP,cAAc,EAAEQ,IAAI,EAAEC,WAAW,IAAI,EAAE;IAClE,MAAMC,aAAa,GAAG,CAACC,KAAK,CAACC,OAAO,CAACL,kBAAkB,CAAC,GAAGA,kBAAkB,GAAG,CAACA,kBAAkB,CAAC,EAAEM,MAAM,CAACjB,IAAI,CAAC;IAElH,IAAI,CAAC3C,aAAa,CAACoD,GAAG,CAAClD,GAAG,EAAEuD,aAAa,CAAC;IAC1C;IACAvD,GAAG,CAACiD,SAAS,CAAClD,GAAG,CAAC,GAAGwD,aAAa,CAAC;;IAEnC;IACA,IAAI,CAACJ,YAAY,EAAE;MACf,IAAI,CAACtD,OAAO,CAACqD,GAAG,CAAClD,GAAG,EAAEyC,IAAI,CAAC;IAC/B;IAEA,OAAOc,aAAa;EACxB,CAAC;EAED7C,MAAM,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB;AAEA,OAAO,MAAMiD,uBAAuB,GAAG,IAAItE,8BAA8B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["convertUnistyles","UnistylesListener","UnistylesRegistry","deepMergeObjects","equal","extractSecrets","extractUnistyleDependencies","isInDocument","getVariants","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","Map","hashMap","classNamesMap","add","ref","_style","_variants","_args","secrets","forEach","__uni__refs","oldResult","get","delete","remove","HTMLElement","styles","filter","style","Object","keys","some","key","startsWith","length","parsedStyles","flatMap","styleIndex","map","secret","__uni__key","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","variants","args","result","variantsResult","fromEntries","resultWithVariants","dependencies","addDependenciesToStylesheet","addListeners","hash","newComputedStyleSheet","newValue","applyStyles","combinedStyles","oldStyles","oldClassNames","className","classList","set","existingHash","injectedClassNames","_web","_classNames","newClassNames","Array","isArray","concat","UnistylesShadowRegistry"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.ts"],"mappings":";;AACA,SAASA,g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AG,IAAItE,8BAA8B,CAAC,CAAC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import { UnistylesRuntime } from './runtime';
4
- import { isServer, schemeToTheme } from './utils';
4
+ import { error, isServer, schemeToTheme } from './utils';
5
5
  import { UnistylesListener } from './listener';
6
6
  import { UnistyleDependency } from '../specs/NativePlatform';
7
7
  class UnistylesStateBuilder {
@@ -15,7 +15,9 @@ class UnistylesStateBuilder {
15
15
  init = config => {
16
16
  this.initThemes(config.themes);
17
17
  this.initBreakpoints(config.breakpoints);
18
- this.initSettings(config.settings);
18
+ if (config.settings) {
19
+ this.initSettings(config.settings);
20
+ }
19
21
  if (isServer()) {
20
22
  return;
21
23
  }
@@ -28,31 +30,36 @@ class UnistylesStateBuilder {
28
30
  };
29
31
  initSettings = settings => {
30
32
  this.hasAdaptiveThemes = settings?.adaptiveThemes ?? false;
31
- const themeNames = Array.from(this.themes.keys());
32
-
33
- // Single theme + no settings
34
- if (!settings?.adaptiveThemes && !settings?.initialTheme && themeNames.length === 1) {
35
- this.themeName = themeNames[0];
36
- return;
37
- }
38
-
39
- // No settings
40
- if (!settings?.adaptiveThemes && !settings?.initialTheme) {
41
- throw new Error('🦄 You need to specify either "initialTheme" or "adaptiveThemes" in your config');
33
+ if (settings.initialTheme && settings.adaptiveThemes) {
34
+ throw error('You\'re trying to set initial theme and enable adaptiveThemes, but these options are mutually exclusive.');
42
35
  }
43
36
 
44
37
  // Adaptive themes
45
38
  if (settings.adaptiveThemes) {
39
+ if (!this.themes.get('light') || !this.themes.get('dark')) {
40
+ throw error(`You're trying to enable adaptiveThemes, but you didn't register both 'light' and 'dark' themes.`);
41
+ }
46
42
  this.themeName = schemeToTheme(UnistylesRuntime.colorScheme);
47
43
  return;
48
44
  }
49
-
50
- // Initial theme
51
- this.themeName = typeof settings.initialTheme === 'function' ? settings.initialTheme() : settings.initialTheme;
45
+ if (settings.initialTheme) {
46
+ const initialTheme = typeof settings.initialTheme === 'function' ? settings.initialTheme() : settings.initialTheme;
47
+ if (!this.themes.get(initialTheme)) {
48
+ throw error(`You're trying to select theme "${initialTheme}" but it wasn't registered.`);
49
+ }
50
+ this.themeName = initialTheme;
51
+ }
52
52
  };
53
53
  initBreakpoints = (breakpoints = {}) => {
54
54
  this.breakpoints = breakpoints;
55
- Object.entries(breakpoints).sort(([, a], [, b]) => a - b).forEach(([breakpoint, value]) => {
55
+ const breakpointsEntries = Object.entries(breakpoints);
56
+ if (breakpointsEntries.length === 0) {
57
+ throw error('StyleSheet.configure\'s breakpoints can\'t be empty.');
58
+ }
59
+ if (breakpointsEntries?.[0]?.[1] !== 0) {
60
+ throw error('StyleSheet.configure\'s first breakpoint must start from 0.');
61
+ }
62
+ breakpointsEntries.sort(([, a], [, b]) => a - b).forEach(([breakpoint, value]) => {
56
63
  if (isServer()) {
57
64
  return;
58
65
  }
@@ -1 +1 @@
1
- {"version":3,"names":["UnistylesRuntime","isServer","schemeToTheme","UnistylesListener","UnistyleDependency","UnistylesStateBuilder","themes","Map","matchingBreakpoints","breakpoint","currentBreakpoint","Array","from","reverse","find","_key","value","hasAdaptiveThemes","init","config","initThemes","initBreakpoints","breakpoints","initSettings","settings","initListeners","Object","entries","forEach","themeName","theme","set","adaptiveThemes","themeNames","keys","initialTheme","length","Error","colorScheme","sort","a","b","mediaQuery","window","matchMedia","matches","addEventListener","event","emitChange","Breakpoints","UnistylesState"],"sourceRoot":"../../../src","sources":["web/state.ts"],"mappings":";;AAIA,SAASA,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,QAAQ,EAAEC,aAAa,QAAQ,SAAS;AACjD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,MAAMC,qBAAqB,CAAC;EACxBC,MAAM,GAAG,IAAIC,GAAG,CAAyB,CAAC;EAGlCC,mBAAmB,GAAG,IAAID,GAAG,CAAkB,CAAC;EAExD,IAAIE,UAAUA,CAAA,EAAG;IACb,MAA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,IAAI7C,qBAAqB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["UnistylesRuntime","error","isServer","schemeToTheme","UnistylesListener","UnistyleDependency","UnistylesStateBuilder","themes","Map","matchingBreakpoints","breakpoint","currentBreakpoint","Array","from","reverse","find","_key","value","hasAdaptiveThemes","init","config","initThemes","initBreakpoints","breakpoints","settings","initSettings","initListeners","Object","entries","forEach","themeName","theme","set","adaptiveThemes","initialTheme","get","colorScheme","breakpointsEntries","length","sort","a","b","mediaQuery","window","matchMedia","matches","addEventListener","event","emitChange","Breakpoints","UnistylesState"],"sourceRoot":"../../../src","sources":["web/state.ts"],"mappings":";;AAIA,SAASA,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,KAAK,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,SAAS;AACxD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,kBAAkB,QAAQ,yBAAyB;AAK5D,MAAMC,qBAAqB,CAAC;EACxBC,MAAM,GAAG,IAAIC,GAAG,CAAyB,CAAC;EAGlCC,mBAAmB,GAAG,IAAID,GAAG,CAAkB,CAAC;EAExD,IAAIE,UAAUA,CAAA,EAAG;IACb,MAAM,CAACC,iBAAiB,CAAC,GAAGC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACJ,mBAAmB,CAAC,CAC3DK,OAAO,CAAC,CAAC,CACTC,IAAI,CAAC,CAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,KAAKA,KAAK,CAAC,IAAI,EAAE;IAEzC,OAAON,iBAAiB;EAC5B;EAIAO,iBAAiB,GAAG,KAAK;EAEzBC,IAAI,GAAIC,MAAuB,IAAK;IAChC,IAAI,CAACC,UAAU,CAACD,MAAM,CAACb,MAAM,CAAC;IAC9B,IAAI,CAACe,eAAe,CAACF,MAAM,CAACG,WAAW,CAAC;IAExC,IAAIH,MAAM,CAACI,QAAQ,EAAE;MACjB,IAAI,CAACC,YAAY,CAACL,MAAM,CAACI,QAA6B,CAAC;IAC3D;IA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j).map(([key, value]) => [key, reducer(value, key)]));
4
4
  export const keyInObject = (obj, key) => key in obj;
5
5
  export const isServer = () => typeof window === 'undefined';
6
- export const warn = message => console.warn(`🦄 [react-native-unistyles] ${message}`);
6
+ export const error = message => new Error(`Unistyles: ${message}`);
7
7
  export const equal = (a, b) => {
8
8
  if (Object.is(a, b)) {
9
9
  return true;
@@ -1 +1 @@
1
- {"version":3,"names":["reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","keyInObject","isServer","window","warn","message","console","equal","a","b","is","keysA","keys","length","every","prototype","hasOwnProperty","call","generateHash","str","JSON","stringify","hasher","charCodeAt","toString","hyphenate","propertyName","replace","m","toLowerCase"],"sourceRoot":"../../../../src","sources":["web/utils/common.ts"],"mappings":";;AAAA,OAAO,MAAMA,YAAY,GAAGA,CACxBC,GAAS,EACTC,OAA+D,KAC9DC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACJ,GAAG,CAAC,CAACK,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAACD,GAAG,EAAEL,OAAO,CAACM,KAAK,EAAsBD,GAAG,CAAC,CAAC,CAAC,CAAoC;AAErJ,OAAO,MAAME,WAAW,GAAGA,CAAgCR,GAAM,EAAEM,GAAgB,KAAqBA,GAAG,IAAIN,GAAG;AAElH,OAAO,MAAMS,QAAQ,GAAGA,CAAA,KAAM,OAAOC,MAAM,KAAK,WAAW;AAE3D,OAAO,MAAMC,IAAI,GAAIC,OAAe,IAAKC,OAAO,CAACF,IAAI,CAAC,+BAA+BC,OAAO,EAAE,CAAC;AAE/F,OAAO,MAAME,KAAK,GAAGA,CAAIC,CAAI,EAAEC,CAAI,KAAK;EACpC,IAAId,MAAM,CAACe,EAAE,CAACF,CAAC,EAAEC,CAAC,CAAC,EAAE;IACjB,OAAO,IAAI;EACf;EAEA,IACI,OAAOD,CAAC,KAAK,QAAQ,IAClBA,CAAC,KAAK,IAAI,IACV,OAAOC,CAAC,KAAK,QAAQ,IACrBA,CAAC,KAAK,IAAI,EACf;IACE,OAAO,KAAK;EAChB;EAEA,MAAME,KAAK,GAAGhB,MAAM,CAACiB,IAAI,CAACJ,CAAC,CAAmB;EAE9C,IAAIG,KAAK,CAACE,MAAM,KAAKlB,MAAM,CAACiB,IAAI,CAACH,CAAC,CAAC,CAACI,MAAM,EAAE;IACxC,OAAO,KAAK;EAChB;EAEA,OAAOF,KAAK,CAACG,KAAK,CAACf,GAAG,IAAIJ,MAAM,CAACe,EAAE,CAACF,CAAC,CAACT,GAAG,CAAC,EAAEU,CAAC,CAACV,GAAG,CAAC,CAAC,IAAIJ,MAAM,CAACoB,SAAS,CAACC,cAAc,CAACC,IAAI,CAACR,CAAC,EAAEV,GAAG,CAAC,CAAC;AACxG,CAAC;AAED,OAAO,MAAMmB,YAAY,GAAIlB,KAAU,IAAK;EACxC,MAAMmB,GAAG,GAAGC,IAAI,CAACC,SAAS,CAACrB,KAAK,CAAC;EACjC,IAAIsB,MAAM,GAAG,IAAI;EACjB,IAAIT,MAAM,GAAGM,GAAG,CAACN,MAAM;EAEvB,OAAOA,MAAM,EAAE,EAAES,MAAM,GAAIA,MAAM,GAAG,EAAE,GAAIH,GAAG,CAACI,UAAU,CAACV,MAAM,CAAC;EAEhE,OAAO,aAAa,CAACS,MAAM,KAAK,CAAC,EAAEE,QAAQ,CAAC,EAAE,CAAC,EAAE;AACrD,CAAC;AAED,OAAO,MAAMC,SAAS,GAAIC,YAAoB,IAAKA,YAAY,CAACC,OAAO,CAAC,QAAQ,EAAGC,CAAS,IAAK,IAAIA,CAAC,CAACC,WAAW,CAAC,CAAC,EAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","keyInObject","isServer","window","error","message","Error","equal","a","b","is","keysA","keys","length","every","prototype","hasOwnProperty","call","generateHash","str","JSON","stringify","hasher","charCodeAt","toString","hyphenate","propertyName","replace","m","toLowerCase"],"sourceRoot":"../../../../src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C,EAAEV,GAAG,CAAC,CAAC;AACxG,CAAC;AAED,OAAO,MAAMmB,YAAY,GAAIlB,KAAU,IAAK;EACxC,MAAMmB,GAAG,GAAGC,IAAI,CAACC,SAAS,CAACrB,KAAK,CAAC;EACjC,IAAIsB,MAAM,GAAG,IAAI;EACjB,IAAIT,MAAM,GAAGM,GAAG,CAACN,MAAM;EAEvB,OAAOA,MAAM,EAAE,EAAES,MAAM,GAAIA,MAAM,GAAG,EAAE,GAAIH,GAAG,CAACI,UAAU,CAACV,MAAM,CAAC;EAEhE,OAAO,aAAa,CAACS,MAAM,KAAK,CAAC,EAAEE,QAAQ,CAAC,EAAE,CAAC,EAAE;AACrD,CAAC;AAED,OAAO,MAAMC,SAAS,GAAIC,YAAoB,IAAKA,YAAY,CAACC,OAAO,CAAC,QAAQ,EAAGC,CAAS,IAAK,IAAIA,CAAC,CAACC,WAAW,CAAC,CAAC,EAAE,CAAC","ignoreList":[]}
@@ -13,7 +13,6 @@ export const schemeToTheme = scheme => {
13
13
  return 'light';
14
14
  }
15
15
  };
16
- export const hexToRGBA = (hex, opacity) => hex.replace('#', '').split(/(?=(?:..)*$)/).map(x => parseInt(x, 16)).filter(num => !isNaN(num)).reduce((acc, color) => `${acc}${color},`, 'rgba(').concat(`${opacity})`);
17
16
  export const assignSecrets = (object, secrets) => {
18
17
  // @ts-expect-error - assign secrets to object
19
18
  object[`__uni__secrets__${Math.random().toString(16).slice(2)}`] = secrets;
@@ -44,7 +43,7 @@ export const extractMediaQueryValue = query => {
44
43
  return undefined;
45
44
  }
46
45
  const value = Number(px);
47
- return isNaN(value) ? undefined : value;
46
+ return Number.isNaN(value) ? undefined : value;
48
47
  };
49
48
  export const getMediaQuery = query => {
50
49
  if (Object.values(Orientation).includes(query)) {
@@ -1 +1 @@
1
- {"version":3,"names":["ColorScheme","Orientation","isUnistylesMq","parseMq","UnistylesState","keyInObject","reduceObject","schemeToTheme","scheme","Dark","Light","hexToRGBA","hex","opacity","replace","split","map","x","parseInt","filter","num","isNaN","reduce","acc","color","concat","assignSecrets","object","secrets","Math","random","toString","slice","extractSecrets","Object","entries","key","value","startsWith","push","getStyles","values","returnValue","defineProperties","enumerable","configurable","isInDocument","element","document","body","contains","extractMediaQueryValue","query","_","px","match","undefined","Number","getMediaQuery","includes","minWidth","maxWidth","minHeight","maxHeight","Boolean","join","breakpoints","extractUnistyleDependencies","dependencies","uni__dependencies","Array","isArray"],"sourceRoot":"../../../../src","sources":["web/utils/unistyle.ts"],"mappings":";;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,mBAAmB;AAE5D,SAASC,aAAa,EAAEC,OAAO,QAAQ,UAAU;AACjD,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,WAAW,EAAEC,YAAY,QAAQ,UAAU;AAEpD,OAAO,MAAMC,aAAa,GAAIC,MAAmB,IAAK;EAClD,QAAQA,MAAM;IACV,KAAKR,WAAW,CAACS,IAAI;MACjB,OAAO,MAAM;IACjB,KAAKT,WAAW,CAACU,KAAK;IACtB;MACI,OAAO,OAAO;EACtB;AACJ,CAAC;AAED,OAAO,MAAMC,SAAS,GAAGA,CAACC,GAAW,EAAEC,OAAe,KAAKD,GAAG,CACzDE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAChBC,KAAK,CAAC,cAAc,CAAC,CACrBC,GAAG,CAACC,CAAC,IAAIC,QAAQ,CAACD,CAAC,EAAE,EAAE,CAAC,CAAC,CACzBE,MAAM,CAACC,GAAG,IAAI,CAACC,KAAK,CAACD,GAAG,CAAC,CAAC,CAC1BE,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAK,GAAGD,GAAG,GAAGC,KAAK,GAAG,EAAE,OAAO,CAAC,CAClDC,MAAM,CAAC,GAAGZ,OAAO,GAAG,CAAC;AAU1B,OAAO,MAAMa,aAAa,GAAGA,CAAIC,MAAS,EAAEC,OAAwB,KAAK;EACrE;EACAD,MAAM,CAAC,mBAAmBE,IAAI,CAACC,MAAM,CAAC,CAAC,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eToTheme","scheme","Dark","Light","assignSecrets","object","secrets","Math","random","toString","slice","extractSecrets","Object","entries","reduce","acc","key","value","startsWith","push","getStyles","values","returnValue","defineProperties","enumerable","configurable","isInDocument","element","document","body","contains","extractMediaQueryValue","query","_","px","match","undefined","Number","isNaN","getMediaQuery","includes","minWidth","maxWidth","minHeight","maxHeight","filter","Boolean","join","breakpoints","extractUnistyleDependencies","dependencies","uni__dependencies","Array","isArray"],"sourceRoot":"../../../../src","sources":["web/utils/unistyle.ts"],"mappings":";;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,mBAAmB;AAE5D,SAASC,aAAa,EAAEC,OAAO,QAAQ,UAAU;AACjD,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,WAAW,EAAEC,YAAY,QAAQ,UAAU;AAEpD,OAAO,MAAMC,aAAa,GAAIC,MAAmB,IAAK;EAClD,QAAQA,MAAM;IACV,KAAKR,WAAW,CAACS,IAAI;MACjB,OAAO,MAAM;IACjB,KAAKT,WAAW,CAACU,KAAK;IACtB;MACI,OAAO,OAAO;EACtB;AACJ,CAAC;AAUD,OAAO,MAAMC,aAAa,GAAGA,CAAIC,MAAS,EAAEC,OAAwB,KAAK;EACrE;EACAD,MAAM,CAAC,mBAAmBE,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAGJ,OAAO;EAE1E,OAAOD,MAAM;AACjB,CAAC;AAED,OAAO,MAAMM,cAAc,GAAIN,MAAW,IAAK;EAC3C,MAAMC,OAAO,GAAGM,MAAM,CAACC,OAAO,CAACR,MAAM,CAAC,CAACS,MAAM,CAAC,CAACC,GAAG,EAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;IACjE,IAAID,GAAG,CAACE,UAAU,CAAC,kBAAkB,CAAC,EAAE;MACpCH,GAAG,CAACI,IAAI,CAACF,KAAwB,CAAC;IACtC;IAEA,OAAOF,GAAG;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AAGN,SAAS,EACnDO,SAAS,GAAG,gBAAgBA,SAAS,KAAK,GAAGP,SAAS,EACtDQ,SAAS,GAAG,gBAAgBA,SAAS,KAAK,GAAGR,SAAS,CACzD,CAACS,MAAM,CAACC,OAAO,CAAC,CAACC,IAAI,CAAC,OAAO,CAAC;EACnC;EAEA,MAAMN,QAAQ,GAAG5C,cAAc,CAACmD,WAAW,IAAIlD,WAAW,CAACD,cAAc,CAACmD,WAAW,EAAEhB,KAAK,CAAC,GAAGnC,cAAc,CAACmD,WAAW,CAAChB,KAAK,CAAC,GAAGI,SAAS;EAE7I,OAAO,eAAeK,QAAQ,IAAI,CAAC,KAAK;AAC5C,CAAC;AAED,OAAO,MAAMQ,2BAA2B,GAAIhC,KAAU,IAAK;EACvD,IAAI,CAACA,KAAK,EAAE;IACR,OAAO,EAAE;EACb;EAEA,MAAMiC,YAAuC,GAAGpD,WAAW,CAACmB,KAAK,EAAE,mBAAmB,CAAC,GAAGA,KAAK,CAACkC,iBAAiB,GAAG,EAAE;EAEtH,OAAOC,KAAK,CAACC,OAAO,CAACH,YAAY,CAAC,GAAGA,YAAY,GAAG,EAAE;AAC1D,CAAC","ignoreList":[]}
@@ -11,7 +11,7 @@ export const getVariants = (styles, selectedVariants) => {
11
11
  }]) => {
12
12
  const variantStyles = Object.entries(variants).flatMap(([variant, styles]) => {
13
13
  const selectedVariant = selectedVariants[variant];
14
- const selectedVariantStyles = styles[selectedVariant] ?? styles['default'];
14
+ const selectedVariantStyles = styles[selectedVariant] ?? styles.default;
15
15
  if (!selectedVariantStyles) {
16
16
  return [];
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"names":["deepMergeObjects","hasVariants","value","getVariants","styles","selectedVariants","Object","entries","filter","_key","variants","keys","some","variant","map","key","compoundVariants","variantStyles","flatMap","selectedVariant","selectedVariantStyles","compoundVariantStyles","compoundVariant","conditions","String","mergedVariantStyles"],"sourceRoot":"../../../../src","sources":["web/variants/getVariants.ts"],"mappings":";;AACA,SAASA,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C,EAAE;QAC5G,OAAO,EAAE;MACb;MAEA,OAAOE,MAAM;IACjB,CAAC,CAAC;IAEF,MAAMqB,mBAAmB,GAAGzB,gBAAgB,CAAC,GAAGiB,aAAa,EAAE,GAAGI,qBAAqB,CAAC;IAExF,OAAO,CAACN,GAAG,EAAEU,mBAAmB,CAAC;EACrC,CAAC,CAAC;AACV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["deepMergeObjects","hasVariants","value","getVariants","styles","selectedVariants","Object","entries","filter","_key","variants","keys","some","variant","map","key","compoundVariants","variantStyles","flatMap","selectedVariant","selectedVariantStyles","default","compoundVariantStyles","compoundVariant","conditions","String","mergedVariantStyles"],"sourceRoot":"../../../../src","sources":["web/variants/getVariants.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,aAAa;AAQ9C,MAAMC,WAAW,GAAsBC,KAAkB,IAAgD,UAAU,IAAIA,KAAK,CAAC,CAAC,CAAC;AAE/H,OAAO,MAAMC,WAAW,GAAGA,CAACC,MAAyC,EAAEC,gBAAqC,KAAK;EAC7G,OAAOC,MAAM,CAACC,OAAO,CAACH,MAAM,CAAC,CACxBI,MAAM,CAACP,WAAW,CAAC,CACnBO,MAAM,CAAC,CAAC,CAACC,IAAI,EAAE;IAAEC;EAAS,CAAC,CAAC,KAAKJ,MAAM,CAACK,IAAI,CAACD,QAAQ,CAAC,CAACE,IAAI,CAACC,OAAO,IAAIA,OAAO,IAAIH,QAAQ,CAAC,CAAC,CAC5FI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAE;IAAEL,QAAQ;IAAEM,gBAAgB,GAAG;EAAG,CAAC,CAAC,KAAK;IACjD,MAAMC,aAAa,GAAGX,MAAM,CAACC,OAAO,CAACG,QAAQ,CAAC,CAACQ,OAAO,CAAC,CAAC,CAACL,OAAO,EAAET,MAAM,CAAC,KAAK;MAC1E,MAAMe,eAAe,GAAGd,gBAAgB,CAACQ,OAAO,CAAC;MACjD,MAAMO,qBAAqB,GAAGhB,MAAM,CAACe,eAAe,CAAC,IAAIf,MAAM,CAACiB,OAAO;MAEvE,IAAI,CAACD,qBAAqB,EAAE;QACxB,OAAO,EAAE;MACb;MAEA,OAAOA,qBAAqB;IAChC,CAAC,CAAC;IAEF,MAAME,qBAAqB,GAAGN,gBAAgB,CAACE,OAAO,CAACK,eAAe,IAAI;MACtE,MAAM;QAAEnB,MAAM;QAAE,GAAGoB;MAAW,CAAC,GAAGD,eAAe;MAEjD,IAAIjB,MAAM,CAACC,OAAO,CAACiB,UAAU,CAAC,CAACZ,IAAI,CAAC,CAAC,CAACC,OAAO,EAAEX,KAAK,CAAC,KAAKuB,MAAM,CAACpB,gBAAgB,CAACQ,OAAO,CAAC,CAAC,KAAKY,MAAM,CAACvB,KAAK,CAAC,CAAC,EAAE;QAC5G,OAAO,EAAE;MACb;MAEA,OAAOE,MAAM;IACjB,CAAC,CAAC;IAEF,MAAMsB,mBAAmB,GAAG1B,gBAAgB,CAAC,GAAGiB,aAAa,EAAE,GAAGK,qBAAqB,CAAC;IAExF,OAAO,CAACP,GAAG,EAAEW,mBAAmB,CAAC;EACrC,CAAC,CAAC;AACV,CAAC","ignoreList":[]}
@@ -7,7 +7,7 @@ export const createUseVariants = (styles, setSelectedVariants) => {
7
7
  const useVariants = selectedVariants => {
8
8
  const [selectedVariantStylesMap] = useState(() => new Map());
9
9
  const lastSelectedVariantsRef = useRef();
10
- // Variable that determines if variants have changed and we need to recalculate styles
10
+ // Variable that determines if variants have changed, and we need to recalculate styles
11
11
  const variantsChanged = !equal(lastSelectedVariantsRef.current, selectedVariants);
12
12
  if (variantsChanged) {
13
13
  lastSelectedVariantsRef.current = selectedVariants;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { PressableProps as Props, View } from 'react-native';
3
+ export declare const Pressable: React.ForwardRefExoticComponent<Props & {
4
+ rawStyle?: Array<any>;
5
+ variants?: Record<string, string | boolean>;
6
+ } & React.RefAttributes<View>>;
7
+ //# sourceMappingURL=Pressable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAEjD,OAAO,KAAK,EAAE,cAAc,IAAI,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AASjE,eAAO,MAAM,SAAS;eAJP,KAAK,CAAC,GAAG,CAAC;eACV,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;8BA+D7C,CAAA"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { PressableProps as Props, View, ViewStyle } from 'react-native';
3
+ type WebPressableState = {
4
+ pressed: boolean;
5
+ hovered: boolean;
6
+ focused: boolean;
7
+ };
8
+ export declare const Pressable: React.ForwardRefExoticComponent<Props & {
9
+ variants?: Record<string, string | boolean>;
10
+ style?: ((state: WebPressableState) => ViewStyle) | ViewStyle;
11
+ } & React.RefAttributes<View>>;
12
+ export {};
13
+ //# sourceMappingURL=Pressable.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pressable.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAE5D,OAAO,KAAK,EAAE,cAAc,IAAI,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAG5E,KAAK,iBAAiB,GAAG;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAA;CACnB,CAAA;AAsBD,eAAO,MAAM,SAAS;eAnBP,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;YACnC,CAAC,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,CAAC,GAAG,SAAS;8BAyF/D,CAAA"}
@@ -1,3 +1,4 @@
1
1
  export { Hide } from './Hide';
2
2
  export { Display } from './Display';
3
+ export { Pressable } from './Pressable';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const getBoundArgs: (fn: Function) => Function;
2
+ //# sourceMappingURL=getBoundArgs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBoundArgs.d.ts","sourceRoot":"","sources":["../../../../src/core/getBoundArgs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,OAAQ,QAAQ,aAcxC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const getId: () => string;
2
+ //# sourceMappingURL=getId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getId.d.ts","sourceRoot":"","sources":["../../../../src/core/getId.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,cAAwD,CAAA"}
@@ -1,2 +1,4 @@
1
1
  export { createUnistylesComponent } from './createUnistylesComponent';
2
+ export { getBoundArgs } from './getBoundArgs';
3
+ export { getId } from './getId';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { useMedia } from './useMedia';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMedia.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,WAAY;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;CA2D9C,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMedia.web.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMedia.web.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,WAAY;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;CA2C9C,CAAA"}
@@ -1,7 +1,7 @@
1
1
  export * from './specs';
2
2
  export { mq } from './mq';
3
3
  export type { UnistylesThemes, UnistylesBreakpoints } from './global';
4
- export { createUnistylesComponent } from './core';
4
+ export { createUnistylesComponent, getBoundArgs } from './core';
5
5
  export type { UnistylesVariants } from './types';
6
6
  export * from './components';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAA;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAC/D,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,cAAc,cAAc,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { HybridObject } from 'react-native-nitro-modules';
2
- import { type Dimensions, type Insets } from '../types';
2
+ import type { Dimensions, Insets } from '../types';
3
3
  type ColorScheme = 'dark' | 'light' | 'unspecified';
4
4
  type Orientation = 'portrait' | 'landscape';
5
5
  export declare enum UnistyleDependency {
@@ -1 +1 @@
1
- {"version":3,"file":"NativePlatform.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/NativePlatform/NativePlatform.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AAEvD,KAAK,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAA;AACnD,KAAK,WAAW,GAAG,UAAU,GAAG,WAAW,CAAA;AAE3C,oBAAY,kBAAkB;IAC1B,KAAK,IAAI;IACT,SAAS,IAAI;IACb,cAAc,IAAI;IAClB,WAAW,IAAI;IACf,QAAQ,IAAI;IACZ,WAAW,IAAI;IACf,UAAU,IAAI;IACd,WAAW,IAAI;IACf,mBAAmB,IAAI;IACvB,MAAM,IAAI;IACV,UAAU,KAAK;IACf,SAAS,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egistry as UnistylesShadowRegistrySpec } from './ShadowRegistry.nitro';
2
2
  import type { ShadowNode, Unistyle, ViewHandle } from './types';
3
3
  interface ShadowRegistry extends UnistylesShadowRegistrySpec {
4
- add(handle?: ViewHandle, styles?: Array<Unistyle>, variants?: Record<string, string | boolean>, args?: Array<Array<any>>): void;
4
+ add(handle?: ViewHandle, styles?: Array<Unistyle>, variants?: Record<string, string | boolean>, args?: Array<Array<any>>, id?: string): void;
5
5
  remove(handle?: ViewHandle): void;
6
- link(node: ShadowNode, styles?: Array<Unistyle>, variants?: Record<string, string | boolean>, args?: Array<Array<any>>): void;
6
+ link(node: ShadowNode, styles?: Array<Unistyle>, variants?: Record<string, string | boolean>, args?: Array<Array<any>>, id?: string): void;
7
7
  unlink(node: ShadowNode): void;
8
8
  }
9
9
  type PrivateMethods = 'add' | 'remove' | 'link' | 'unlink';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE/D,UAAU,cAAe,SAAQ,2BAA2B;IAExD,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;IAChI,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAElC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAA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AC;IAC3I,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;CACjC;AAsCD,KAAK,cAAc,GACb,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,CAAA;AAEd,eAAO,MAAM,uBAAuB,EAA2B,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA"}
@@ -7,6 +7,7 @@ export type ShadowNode = {
7
7
  export type ViewHandle = {
8
8
  __internalInstanceHandle?: {
9
9
  stateNode?: StateNode;
10
+ elementType?: string;
10
11
  };
11
12
  getScrollResponder?: () => {
12
13
  getNativeScrollRef?: () => ({
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,CAAC,EAAE,UAAU,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,6BAA6B,EAAE,GAAG,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,wBAAwB,CAAC,EAAE;QACvB,SAAS,CAAC,EAAE,SAAS,CAAA;KACxB,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM;QACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;YACxB,wBAAwB,CAAC,EAAE;gBACvB,SAAS,CAAC,EAAE,SAAS,CAAA;aACxB,CAAA;SACJ,CAAC,CAAA;KACL,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;QACxB,wBAAwB,CAAC,EAAE;YACvB,SAAS,CAAC,EAAE,SAAS,CAAA;SACxB,CAAA;KACJ,CAAC,CAAA;CACL,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KACvB,CAAA;CACJ,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,CAAC,EAAE,UAAU,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,6BAA6B,EAAE,GAAG,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,wBAAwB,CAAC,EAAE;QACvB,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAA;KACvB,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM;QACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;YACxB,wBAAwB,CAAC,EAAE;gBACvB,SAAS,CAAC,EAAE,SAAS,CAAA;aACxB,CAAA;SACJ,CAAC,CAAA;KACL,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;QACxB,wBAAwB,CAAC,EAAE;YACvB,SAAS,CAAC,EAAE,SAAS,CAAA;SACxB,CAAA;KACJ,CAAC,CAAA;CACL,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KACvB,CAAA;CACJ,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { HybridObject } from 'react-native-nitro-modules';
2
- import { UnistyleDependency } from '../NativePlatform';
2
+ import type { UnistyleDependency } from '../NativePlatform';
3
3
  export interface UnistylesStyleSheet extends HybridObject<{
4
4
  ios: 'c++';
5
5
  android: 'c++';
@@ -1 +1 @@
1
- {"version":3,"file":"UnistylesStyleSheet.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC;IACrF,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,iBAAiB,CAAC,SAAS,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,kBAAkB,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAC9F"}
1
+ {"version":3,"file":"UnistylesStyleSheet.nitro.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC;IACrF,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,iBAAiB,CAAC,SAAS,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,kBAAkB,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAC9F"}
@@ -4,8 +4,9 @@ import type { UnistylesStyleSheet as UnistylesStyleSheetSpec } from './Unistyles
4
4
  import type { UnistylesBreakpoints, UnistylesThemes } from '../../global';
5
5
  import type { CreateUnistylesStyleSheet } from '../../types';
6
6
  type UnistylesSettings = {
7
- adaptiveThemes?: boolean;
8
- initialTheme?: (() => keyof UnistylesThemes) | keyof UnistylesThemes;
7
+ initialTheme: (() => keyof UnistylesThemes) | keyof UnistylesThemes;
8
+ } | {
9
+ adaptiveThemes: boolean;
9
10
  };
10
11
  export type UnistylesConfig = {
11
12
  settings?: UnistylesSettings;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAkC,MAAM,cAAc,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,KAAK,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE5D,KAAK,iBAAiB,GAAG;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,MAAM,MAAM,eAAe,CAAC,GAAG,MAAM,eAAe,CAAA;CACvE,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,WAAW,CAAC,EAAE,oBAAoB,CAAA;CACrC,CAAA;AAED,MAAM,WAAW,mBAAoB,SAAQ,uBAAuB;IAChE,kBAAkB,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC;IACnE,YAAY,EAAE,OAAO,oBAAoB,CAAC,YAAY,CAAC;IACvD,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC7C,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAG7C,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,EAAE,yBAAyB,CAAC;IAClC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,SAAS,EAAE;QACP,YAAY,EAAE,OAAO,YAAY,CAAA;KACpC,CAAA;CACJ;AAeD,KAAK,cAAc,GAAG,WAAW,GAAG,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A;KACpC,CAAA;CACJ;AAeD,KAAK,cAAc,GAAG,WAAW,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAEhE,eAAO,MAAM,UAAU,EAAgC,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import type { UnistylesRuntime as UnistylesRuntimeSpec, UnistylesMiniRuntime } from './UnistylesRuntime.nitro';
2
2
  import type { AppBreakpoint, AppTheme, AppThemeName, Color, ColorScheme, Orientation } from '../types';
3
3
  import { type UnistylesStatusBar } from '../StatusBar';
4
- import { type UnistylesNavigationBar } from '../NavigtionBar';
4
+ import type { UnistylesNavigationBar } from '../NavigtionBar';
5
5
  import type { AndroidContentSizeCategory, IOSContentSizeCategory, UnistylesTheme } from '../../types';
6
6
  import type { UnistylesThemes } from '../../global';
7
7
  export interface UnistylesRuntimePrivate extends Omit<UnistylesRuntimeSpec, 'setRootViewBackgroundColor'> {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/UnistylesRuntime/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC9G,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AACtG,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAChF,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,KAAK,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAErG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,4BAA4B,CAAC;IACrG,QAAQ,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AAK,gBAAgB,GAAG,IAAI,CAAC,uBAAuB,EAAE,cAAc,CAAC,CAAA;AAqBrE,eAAO,MAAM,OAAO,EAA6B,gBAAgB,CAAA;AAEjE,YAAY,EACR,oBAAoB,EACvB,CAAA"}
@@ -1,4 +1,2 @@
1
- import type { ReactElement } from 'react';
2
- export declare const getSSRUnistyles: () => Array<ReactElement>;
3
1
  export * from '../web';
4
2
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC,eAAO,MAAM,eAAe,QAAe,KAAK,CAAC,YAAY,CAAC,CAAA;AAE9D,cAAc,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/specs/index.web.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
@@ -2,4 +2,5 @@ export type Optional<T> = T | undefined;
2
2
  export type Nullable<T> = T | null;
3
3
  export type SafeReturnType<T> = T extends (...args: any) => infer R ? R : T;
4
4
  export type PartialBy<T, K> = Omit<T, K & keyof T> & Partial<Pick<T, K & keyof T>>;
5
+ export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
5
6
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
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;AAClC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAC3E,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA"}
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;AAClC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAC3E,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;AAClF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,KAAK,CAAA"}
@@ -1,4 +1,4 @@
1
- export type { Optional, Nullable } from './common';
1
+ export type { Optional, Nullable, UnionToIntersection } from './common';
2
2
  export type { NestedStylePairs, UnistylesTheme, ScreenSize, NestedStyle, RNValue, RNStyle } from './core';
3
3
  export type { CreateUnistylesStyleSheet, StyleSheet, AllAvailableKeys, UnistylesValues, UnistyleText, UnistyleView, UnistyleImage } from './stylesheet';
4
4
  export type { ReactNativeStyleSheet } from './breakpoints';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAClD,YAAY,EACR,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,WAAW,EACX,OAAO,EACP,OAAO,EACV,MAAM,QAAQ,CAAA;AACf,YAAY,EACR,yBAAyB,EACzB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EAChB,MAAM,cAAc,CAAA;AACrB,YAAY,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACxE,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACvE,YAAY,EACR,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,WAAW,EACX,OAAO,EACP,OAAO,EACV,MAAM,QAAQ,CAAA;AACf,YAAY,EACR,yBAAyB,EACzB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EAChB,MAAM,cAAc,CAAA;AACrB,YAAY,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACxE,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA"}