react-native-unistyles 3.0.0-alpha.35 → 3.0.0-alpha.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. package/Unistyles.podspec +1 -1
  2. package/android/CMakeLists.txt +19 -36
  3. package/android/build.gradle +2 -1
  4. package/android/src/main/cxx/NativeUnistylesModule.cpp +71 -0
  5. package/android/src/main/cxx/NativeUnistylesModule.h +42 -0
  6. package/android/src/main/cxx/cpp-adapter.cpp +8 -86
  7. package/android/src/main/java/com/unistyles/Equatable.kt +61 -0
  8. package/android/src/main/java/com/unistyles/NativePlatform+android.kt +302 -0
  9. package/android/src/main/java/com/unistyles/NativePlatform+insets.kt +148 -0
  10. package/android/src/main/java/com/unistyles/NativePlatform+listener.kt +54 -0
  11. package/android/src/main/java/com/unistyles/UnistylesModule.kt +51 -0
  12. package/android/src/main/java/com/unistyles/UnistylesPackage.kt +16 -14
  13. package/cxx/NativePlatform.h +11 -0
  14. package/cxx/common/Helpers.h +1 -1
  15. package/cxx/core/Unistyle.h +1 -1
  16. package/cxx/core/UnistyleData.h +1 -1
  17. package/cxx/core/UnistyleWrapper.h +1 -2
  18. package/cxx/core/UnistylesCommitHook.cpp +1 -1
  19. package/cxx/core/UnistylesMountHook.cpp +1 -1
  20. package/cxx/core/UnistylesRegistry.cpp +4 -13
  21. package/cxx/core/UnistylesRegistry.h +2 -3
  22. package/cxx/core/UnistylesState.cpp +10 -7
  23. package/cxx/hybridObjects/HybridNavigationBar.h +3 -3
  24. package/cxx/hybridObjects/HybridStatusBar.h +3 -3
  25. package/cxx/hybridObjects/HybridStyleSheet.cpp +21 -18
  26. package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +4 -8
  27. package/cxx/hybridObjects/HybridUnistylesRuntime.h +2 -3
  28. package/cxx/parser/Parser.cpp +3 -27
  29. package/cxx/parser/Parser.h +2 -3
  30. package/cxx/shadowTree/ShadowTrafficController.h +9 -5
  31. package/cxx/shadowTree/ShadowTreeManager.cpp +10 -5
  32. package/cxx/shadowTree/ShadowTreeManager.h +1 -1
  33. package/lib/commonjs/components/useMedia.js.map +1 -1
  34. package/lib/commonjs/components/useMedia.web.js +43 -0
  35. package/lib/commonjs/components/useMedia.web.js.map +1 -0
  36. package/lib/commonjs/core/createUnistylesComponent.js +57 -4
  37. package/lib/commonjs/core/createUnistylesComponent.js.map +1 -1
  38. package/lib/commonjs/core/createUnistylesComponent.native.js +6 -5
  39. package/lib/commonjs/core/createUnistylesComponent.native.js.map +1 -1
  40. package/lib/commonjs/web/convert/index.js +16 -11
  41. package/lib/commonjs/web/convert/index.js.map +1 -1
  42. package/lib/commonjs/web/convert/object/boxShadow.js +58 -0
  43. package/lib/commonjs/web/convert/object/boxShadow.js.map +1 -0
  44. package/lib/commonjs/web/convert/object/filter.js +42 -0
  45. package/lib/commonjs/web/convert/object/filter.js.map +1 -0
  46. package/lib/commonjs/web/convert/object/index.js +39 -0
  47. package/lib/commonjs/web/convert/object/index.js.map +1 -0
  48. package/lib/commonjs/web/convert/object/objectStyle.js +55 -0
  49. package/lib/commonjs/web/convert/object/objectStyle.js.map +1 -0
  50. package/lib/commonjs/web/convert/object/transform.js +27 -0
  51. package/lib/commonjs/web/convert/object/transform.js.map +1 -0
  52. package/lib/commonjs/web/convert/{boxShadow.js → shadow/boxShadow.js} +9 -24
  53. package/lib/commonjs/web/convert/shadow/boxShadow.js.map +1 -0
  54. package/lib/commonjs/web/convert/shadow/getShadowBreakpoints.js +38 -0
  55. package/lib/commonjs/web/convert/shadow/getShadowBreakpoints.js.map +1 -0
  56. package/lib/commonjs/web/convert/shadow/index.js +28 -0
  57. package/lib/commonjs/web/convert/shadow/index.js.map +1 -0
  58. package/lib/commonjs/web/convert/{textShadow.js → shadow/textShadow.js} +9 -23
  59. package/lib/commonjs/web/convert/shadow/textShadow.js.map +1 -0
  60. package/lib/commonjs/web/convert/utils.js +7 -3
  61. package/lib/commonjs/web/convert/utils.js.map +1 -1
  62. package/lib/commonjs/web/listener.js +10 -0
  63. package/lib/commonjs/web/listener.js.map +1 -1
  64. package/lib/commonjs/web/registry.js +13 -26
  65. package/lib/commonjs/web/registry.js.map +1 -1
  66. package/lib/commonjs/web/runtime.js +3 -0
  67. package/lib/commonjs/web/runtime.js.map +1 -1
  68. package/lib/commonjs/web/shadowRegistry.js +79 -39
  69. package/lib/commonjs/web/shadowRegistry.js.map +1 -1
  70. package/lib/commonjs/web/utils/common.js +3 -33
  71. package/lib/commonjs/web/utils/common.js.map +1 -1
  72. package/lib/commonjs/web/utils/unistyle.js +4 -1
  73. package/lib/commonjs/web/utils/unistyle.js.map +1 -1
  74. package/lib/module/components/useMedia.js.map +1 -1
  75. package/lib/module/components/useMedia.web.js +38 -0
  76. package/lib/module/components/useMedia.web.js.map +1 -0
  77. package/lib/module/core/createUnistylesComponent.js +55 -3
  78. package/lib/module/core/createUnistylesComponent.js.map +1 -1
  79. package/lib/module/core/createUnistylesComponent.native.js +6 -5
  80. package/lib/module/core/createUnistylesComponent.native.js.map +1 -1
  81. package/lib/module/web/convert/index.js +14 -9
  82. package/lib/module/web/convert/index.js.map +1 -1
  83. package/lib/module/web/convert/object/boxShadow.js +53 -0
  84. package/lib/module/web/convert/object/boxShadow.js.map +1 -0
  85. package/lib/module/web/convert/object/filter.js +37 -0
  86. package/lib/module/web/convert/object/filter.js.map +1 -0
  87. package/lib/module/web/convert/object/index.js +6 -0
  88. package/lib/module/web/convert/object/index.js.map +1 -0
  89. package/lib/module/web/convert/object/objectStyle.js +50 -0
  90. package/lib/module/web/convert/object/objectStyle.js.map +1 -0
  91. package/lib/module/web/convert/object/transform.js +22 -0
  92. package/lib/module/web/convert/object/transform.js.map +1 -0
  93. package/lib/module/web/convert/{boxShadow.js → shadow/boxShadow.js} +9 -24
  94. package/lib/module/web/convert/shadow/boxShadow.js.map +1 -0
  95. package/lib/module/web/convert/shadow/getShadowBreakpoints.js +33 -0
  96. package/lib/module/web/convert/shadow/getShadowBreakpoints.js.map +1 -0
  97. package/lib/module/web/convert/shadow/index.js +5 -0
  98. package/lib/module/web/convert/shadow/index.js.map +1 -0
  99. package/lib/module/web/convert/{textShadow.js → shadow/textShadow.js} +9 -23
  100. package/lib/module/web/convert/shadow/textShadow.js.map +1 -0
  101. package/lib/module/web/convert/utils.js +4 -2
  102. package/lib/module/web/convert/utils.js.map +1 -1
  103. package/lib/module/web/listener.js +10 -0
  104. package/lib/module/web/listener.js.map +1 -1
  105. package/lib/module/web/registry.js +14 -27
  106. package/lib/module/web/registry.js.map +1 -1
  107. package/lib/module/web/runtime.js +3 -0
  108. package/lib/module/web/runtime.js.map +1 -1
  109. package/lib/module/web/shadowRegistry.js +80 -40
  110. package/lib/module/web/shadowRegistry.js.map +1 -1
  111. package/lib/module/web/utils/common.js +1 -31
  112. package/lib/module/web/utils/common.js.map +1 -1
  113. package/lib/module/web/utils/unistyle.js +4 -1
  114. package/lib/module/web/utils/unistyle.js.map +1 -1
  115. package/lib/typescript/src/components/useMedia.web.d.ts +6 -0
  116. package/lib/typescript/src/components/useMedia.web.d.ts.map +1 -0
  117. package/lib/typescript/src/core/createUnistylesComponent.d.ts +4 -3
  118. package/lib/typescript/src/core/createUnistylesComponent.d.ts.map +1 -1
  119. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts +4 -3
  120. package/lib/typescript/src/core/createUnistylesComponent.native.d.ts.map +1 -1
  121. package/lib/typescript/src/types/common.d.ts +1 -0
  122. package/lib/typescript/src/types/common.d.ts.map +1 -1
  123. package/lib/typescript/src/web/convert/index.d.ts.map +1 -1
  124. package/lib/typescript/src/web/convert/object/boxShadow.d.ts +9 -0
  125. package/lib/typescript/src/web/convert/object/boxShadow.d.ts.map +1 -0
  126. package/lib/typescript/src/web/convert/object/filter.d.ts +3 -0
  127. package/lib/typescript/src/web/convert/object/filter.d.ts.map +1 -0
  128. package/lib/typescript/src/web/convert/object/index.d.ts +4 -0
  129. package/lib/typescript/src/web/convert/object/index.d.ts.map +1 -0
  130. package/lib/typescript/src/web/convert/object/objectStyle.d.ts +5 -0
  131. package/lib/typescript/src/web/convert/object/objectStyle.d.ts.map +1 -0
  132. package/lib/typescript/src/web/convert/object/transform.d.ts +3 -0
  133. package/lib/typescript/src/web/convert/object/transform.d.ts.map +1 -0
  134. package/lib/typescript/src/web/convert/shadow/boxShadow.d.ts.map +1 -0
  135. package/lib/typescript/src/web/convert/shadow/getShadowBreakpoints.d.ts +2 -0
  136. package/lib/typescript/src/web/convert/shadow/getShadowBreakpoints.d.ts.map +1 -0
  137. package/lib/typescript/src/web/convert/shadow/index.d.ts +3 -0
  138. package/lib/typescript/src/web/convert/shadow/index.d.ts.map +1 -0
  139. package/lib/typescript/src/web/convert/shadow/textShadow.d.ts.map +1 -0
  140. package/lib/typescript/src/web/convert/types.d.ts +7 -1
  141. package/lib/typescript/src/web/convert/types.d.ts.map +1 -1
  142. package/lib/typescript/src/web/convert/utils.d.ts +8 -4
  143. package/lib/typescript/src/web/convert/utils.d.ts.map +1 -1
  144. package/lib/typescript/src/web/create.d.ts +8 -8
  145. package/lib/typescript/src/web/index.d.ts +8 -8
  146. package/lib/typescript/src/web/listener.d.ts +2 -0
  147. package/lib/typescript/src/web/listener.d.ts.map +1 -1
  148. package/lib/typescript/src/web/registry.d.ts +5 -9
  149. package/lib/typescript/src/web/registry.d.ts.map +1 -1
  150. package/lib/typescript/src/web/runtime.d.ts +1 -0
  151. package/lib/typescript/src/web/runtime.d.ts.map +1 -1
  152. package/lib/typescript/src/web/shadowRegistry.d.ts +4 -1
  153. package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
  154. package/lib/typescript/src/web/utils/common.d.ts +1 -6
  155. package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
  156. package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
  157. package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +6 -0
  158. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Dimensions.kt +1 -0
  159. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void.kt +1 -0
  160. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void_std__vector_UnistyleDependency_.kt +1 -0
  161. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Insets.kt +1 -0
  162. package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistylesNativeMiniRuntime.kt +1 -0
  163. package/nitrogen/generated/android/unistyles+autolinking.gradle +2 -0
  164. package/nitrogen/generated/ios/Unistyles+autolinking.rb +1 -1
  165. package/package.json +3 -3
  166. package/src/components/useMedia.ts +1 -1
  167. package/src/components/useMedia.web.ts +47 -0
  168. package/src/core/createUnistylesComponent.native.tsx +12 -10
  169. package/src/core/createUnistylesComponent.tsx +72 -6
  170. package/src/types/common.ts +1 -0
  171. package/src/web/convert/index.ts +16 -9
  172. package/src/web/convert/object/boxShadow.ts +54 -0
  173. package/src/web/convert/object/filter.ts +39 -0
  174. package/src/web/convert/object/index.ts +3 -0
  175. package/src/web/convert/object/objectStyle.ts +68 -0
  176. package/src/web/convert/object/transform.ts +24 -0
  177. package/src/web/convert/{boxShadow.ts → shadow/boxShadow.ts} +9 -30
  178. package/src/web/convert/shadow/getShadowBreakpoints.ts +34 -0
  179. package/src/web/convert/shadow/index.ts +2 -0
  180. package/src/web/convert/{textShadow.ts → shadow/textShadow.ts} +9 -29
  181. package/src/web/convert/types.ts +8 -1
  182. package/src/web/convert/utils.ts +11 -5
  183. package/src/web/listener.ts +10 -0
  184. package/src/web/registry.ts +10 -31
  185. package/src/web/runtime.ts +4 -0
  186. package/src/web/shadowRegistry.ts +85 -46
  187. package/src/web/utils/common.ts +1 -37
  188. package/src/web/utils/unistyle.ts +5 -1
  189. package/android/src/main/cxx/helpers.cpp +0 -105
  190. package/android/src/main/cxx/helpers.h +0 -16
  191. package/android/src/main/cxx/platform.cpp +0 -170
  192. package/android/src/main/cxx/platform.h +0 -20
  193. package/lib/commonjs/web/convert/boxShadow.js.map +0 -1
  194. package/lib/commonjs/web/convert/shadow.js +0 -68
  195. package/lib/commonjs/web/convert/shadow.js.map +0 -1
  196. package/lib/commonjs/web/convert/textShadow.js.map +0 -1
  197. package/lib/commonjs/web/convert/transform.js +0 -72
  198. package/lib/commonjs/web/convert/transform.js.map +0 -1
  199. package/lib/module/web/convert/boxShadow.js.map +0 -1
  200. package/lib/module/web/convert/shadow.js +0 -63
  201. package/lib/module/web/convert/shadow.js.map +0 -1
  202. package/lib/module/web/convert/textShadow.js.map +0 -1
  203. package/lib/module/web/convert/transform.js +0 -67
  204. package/lib/module/web/convert/transform.js.map +0 -1
  205. package/lib/typescript/src/web/convert/boxShadow.d.ts.map +0 -1
  206. package/lib/typescript/src/web/convert/shadow.d.ts +0 -2
  207. package/lib/typescript/src/web/convert/shadow.d.ts.map +0 -1
  208. package/lib/typescript/src/web/convert/textShadow.d.ts.map +0 -1
  209. package/lib/typescript/src/web/convert/transform.d.ts +0 -4
  210. package/lib/typescript/src/web/convert/transform.d.ts.map +0 -1
  211. package/src/web/convert/shadow.ts +0 -68
  212. package/src/web/convert/transform.ts +0 -88
  213. /package/lib/typescript/src/web/convert/{boxShadow.d.ts → shadow/boxShadow.d.ts} +0 -0
  214. /package/lib/typescript/src/web/convert/{textShadow.d.ts → shadow/textShadow.d.ts} +0 -0
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
 
3
+ import { convertUnistyles } from './convert';
4
+ import { UnistylesListener } from './listener';
3
5
  import { UnistylesRegistry } from './registry';
4
- import { createDoubleMap, deepMergeObjects, equal, extractSecrets, extractUnistyleDependencies, isInDocument } from './utils';
6
+ import { deepMergeObjects, equal, extractSecrets, extractUnistyleDependencies, isInDocument } from './utils';
5
7
  import { getVariants } from './variants';
6
8
  class UnistylesShadowRegistryBuilder {
7
9
  // MOCKS
@@ -12,9 +14,12 @@ class UnistylesShadowRegistryBuilder {
12
14
  dispose = () => {};
13
15
  // END MOCKS
14
16
 
15
- resultsMap = createDoubleMap();
16
- classNamesMap = createDoubleMap();
17
- add = (ref, _style, _variants, _args) => {
17
+ resultsMap = new Map();
18
+ hashMap = new Map();
19
+ classNamesMap = new Map();
20
+ timeoutMap = new Map();
21
+ queuedResultMap = new Map();
22
+ add = (ref, _style, _variants, _args) => new Promise(resolve => {
18
23
  // Style is not provided
19
24
  if (!_style) {
20
25
  return;
@@ -35,16 +40,15 @@ class UnistylesShadowRegistryBuilder {
35
40
  if (ref === null) {
36
41
  const secrets = extractSecrets(_style);
37
42
  secrets.forEach(({
38
- __uni__refs,
39
- __uni__key
43
+ __uni__refs
40
44
  }) => {
41
45
  __uni__refs.forEach(ref => {
42
46
  if (isInDocument(ref)) {
43
47
  return;
44
48
  }
45
- const oldResult = this.resultsMap.get(ref, __uni__key);
46
- this.resultsMap.delete(ref, __uni__key);
47
- this.classNamesMap.delete(ref, __uni__key);
49
+ const oldResult = this.resultsMap.get(ref);
50
+ this.resultsMap.delete(ref);
51
+ this.classNamesMap.delete(ref);
48
52
  if (oldResult) {
49
53
  UnistylesRegistry.remove(oldResult);
50
54
  }
@@ -76,42 +80,78 @@ class UnistylesShadowRegistryBuilder {
76
80
  variantsResult: result
77
81
  }, variants));
78
82
  const resultWithVariants = deepMergeObjects(result, variantsResult ?? {});
79
- const oldResult = this.resultsMap.get(ref, __uni__key);
80
83
 
81
- // If results are the same do nothing
82
- if (equal(oldResult, resultWithVariants)) {
83
- return;
84
- }
85
- const oldClassNames = this.classNamesMap.get(ref, __uni__key);
84
+ // Get stored result from queue
85
+ const storedResult = this.queuedResultMap.get(ref) ?? {};
86
+ // Merge stored result with new result
87
+ const newResult = deepMergeObjects(storedResult, resultWithVariants);
88
+ const timeout = this.timeoutMap.get(ref);
89
+
90
+ // Add callback to the queue and remove old one
91
+ this.queuedResultMap.set(ref, newResult);
92
+ clearTimeout(timeout);
93
+ this.timeoutMap.set(ref, setTimeout(() => {
94
+ const oldResult = this.resultsMap.get(ref);
95
+
96
+ // If results are the same do nothing
97
+ if (equal(oldResult, newResult)) {
98
+ return;
99
+ }
100
+ const oldClassNames = this.classNamesMap.get(ref);
101
+
102
+ // Remove old styles
103
+ if (oldResult) {
104
+ UnistylesRegistry.remove(oldResult);
105
+ }
106
+
107
+ // Remove old classnames from the ref
108
+ oldClassNames?.forEach(className => ref.classList.remove(className));
109
+ this.resultsMap.set(ref, newResult);
110
+ const {
111
+ hash,
112
+ existingHash
113
+ } = UnistylesRegistry.add(newResult);
114
+ const injectedClassNames = newResult?._web?._classNames ?? [];
115
+ const newClassNames = injectedClassNames.concat(hash);
116
+ const dependencies = extractUnistyleDependencies(newResult);
117
+ if (typeof __uni__stylesheet === 'function') {
118
+ // Add dependencies from dynamic styles to stylesheet
119
+ UnistylesRegistry.addDependenciesToStylesheet(__uni__stylesheet, dependencies);
120
+ }
121
+ __uni__refs.add(ref);
122
+ this.classNamesMap.set(ref, newClassNames);
123
+ // Add new classnames to the ref
124
+ ref.classList.add(...newClassNames);
125
+ resolve(newClassNames);
126
+
127
+ // If it is new hash add it to the map to use for the listener
128
+ if (!existingHash) {
129
+ this.hashMap.set(ref, hash);
130
+ }
131
+ }, 0));
86
132
 
87
- // Remove old styles
88
- if (oldResult) {
89
- UnistylesRegistry.remove(oldResult);
90
- }
133
+ // Listen for theme / runtime changes
134
+ const dispose = UnistylesListener.addListeners(extractUnistyleDependencies(newResult), () => {
135
+ const hash = this.hashMap.get(ref);
91
136
 
92
- // Remove old classnames from the ref
93
- oldClassNames?.forEach(className => ref.classList.remove(className));
94
- this.resultsMap.set(ref, __uni__key, resultWithVariants);
95
- const className = UnistylesRegistry.add({
96
- key: __uni__key,
97
- args,
98
- stylesheet: __uni__stylesheet,
99
- value: resultWithVariants,
100
- variants
137
+ // Dispose listener if there is no hash
138
+ if (!hash) {
139
+ dispose();
140
+ return;
141
+ }
142
+ const newComputedStyleSheet = UnistylesRegistry.getComputedStylesheet(__uni__stylesheet);
143
+ const newValue = newComputedStyleSheet[__uni__key];
144
+ const result = typeof newValue === 'function' ? newValue(...args) : newValue;
145
+ const {
146
+ variantsResult
147
+ } = Object.fromEntries(getVariants({
148
+ variantsResult: result
149
+ }, variants));
150
+ const resultWithVariants = deepMergeObjects(result, variantsResult ?? {});
151
+ UnistylesRegistry.applyStyles(hash, convertUnistyles(resultWithVariants));
101
152
  });
102
- const injectedClassNames = resultWithVariants?._web?._classNames ?? [];
103
- const newClassNames = injectedClassNames.concat(className);
104
- const dependencies = extractUnistyleDependencies(resultWithVariants);
105
- if (typeof __uni__stylesheet === 'function') {
106
- // Add dependencies from dynamic styles to stylesheet
107
- UnistylesRegistry.addDependenciesToStylesheet(__uni__stylesheet, dependencies);
108
- }
109
- __uni__refs.add(ref);
110
- this.classNamesMap.set(ref, __uni__key, newClassNames);
111
- // Add new classnames to the ref
112
- ref.classList.add(...newClassNames);
113
153
  });
114
- };
154
+ });
115
155
  remove = () => {};
116
156
  }
117
157
  export const UnistylesShadowRegistry = new UnistylesShadowRegistryBuilder();
@@ -1 +1 @@
1
- {"version":3,"names":["UnistylesRegistry","createDoubleMap","deepMergeObjects","equal","extractSecrets","extractUnistyleDependencies","isInDocument","getVariants","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","classNamesMap","add","ref","_style","_variants","_args","Array","isArray","forEach","style","Object","keys","some","key","startsWith","secrets","__uni__refs","__uni__key","oldResult","get","delete","remove","HTMLElement","secret","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","args","variants","length","result","variantsResult","fromEntries","resultWithVariants","oldClassNames","className","classList","set","stylesheet","value","injectedClassNames","_web","_classNames","newClassNames","concat","dependencies","addDependenciesToStylesheet","UnistylesShadowRegistry"],"sourceRoot":"../../../src","sources":["web/shadowRegistry.ts"],"mappings":";;AACA,SAASA,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,cAAc,EAAEC,2BAA2B,EAAEC,YAAY,QAAQ,SAAS;AAC7H,SAASC,WAAW,QAAQ,YAAY;AAIxC,MAAMC,8BAA8B,CAAC;EACjC;EACAC,IAAI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convertUnistyles","UnistylesListener","UnistylesRegistry","deepMergeObjects","equal","extractSecrets","extractUnistyleDependencies","isInDocument","getVariants","UnistylesShadowRegistryBuilder","name","__type","equals","toString","dispose","resultsMap","Map","hashMap","classNamesMap","timeoutMap","queuedResultMap","add","ref","_style","_variants","_args","Promise","resolve","Array","isArray","forEach","style","Object","keys","some","key","startsWith","secrets","__uni__refs","oldResult","get","delete","remove","HTMLElement","secret","__uni__key","__uni__stylesheet","__uni__variants","__uni__args","newComputedStylesheet","getComputedStylesheet","args","variants","length","result","variantsResult","fromEntries","resultWithVariants","storedResult","newResult","timeout","set","clearTimeout","setTimeout","oldClassNames","className","classList","hash","existingHash","injectedClassNames","_web","_classNames","newClassNames","concat","dependencies","addDependenciesToStylesheet","addListeners","newComputedStyleSheet","newValue","applyStyles","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,EAAEC,KAAK,EAAEC,cAAc,EAAEC,2BAA2B,EAAEC,YAAY,QAAQ,SAAS;AAC5G,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;EACrDG,UAAU,GAAG,IAAIH,GAAG,CAA8B,CAAC;EACnDI,eAAe,GAAG,IAAIJ,GAAG,CAAmC,C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,IAAI,CAAC;QAC/B;MACJ,CAAC,EAAE,CAAC,CAAC,CAAC;;MAEN;MACA,MAAMrD,OAAO,GAAGb,iBAAiB,CAAC2E,YAAY,CAACtE,2BAA2B,CAACqD,SAAS,CAAC,EAAE,MAAM;QACzF,MAAMQ,IAAI,GAAG,IAAI,CAAClD,OAAO,CAACuB,GAAG,CAAClB,GAAG,CAAC;;QAElC;QACA,IAAI,CAAC6C,IAAI,EAAE;UACPrD,OAAO,CAAC,CAAC;UAET;QACJ;QAEA,MAAM+D,qBAAqB,GAAG3E,iBAAiB,CAACgD,qBAAqB,CAACJ,iBAAiB,CAAC;QACxF,MAAMgC,QAAQ,GAAGD,qBAAqB,CAAChC,UAAU,CAAE;QACnD,MAAMS,MAAM,GAAG,OAAOwB,QAAQ,KAAK,UAAU,GACvCA,QAAQ,CAAC,GAAG3B,IAAI,CAAC,GACjB2B,QAAQ;QACd,MAAM;UAAEvB;QAAe,CAAC,GAAGvB,MAAM,CAACwB,WAAW,CAAChD,WAAW,CAAC;UAAE+C,cAAc,EAAED;QAAO,CAAC,EAAEF,QAAQ,CAAC,CAAC;QAChG,MAAMK,kBAAkB,GAAGtD,gBAAgB,CAACmD,MAAM,EAAEC,cAAc,IAAI,CAAC,CAAC,CAAC;QAEzErD,iBAAiB,CAAC6E,WAAW,CAACZ,IAAI,EAAEnE,gBAAgB,CAACyD,kBAAkB,CAAC,CAAC;MAC7E,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,CAAC;EAEFf,MAAM,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB;AAEA,OAAO,MAAMsC,uBAAuB,GAAG,IAAIvE,8BAA8B,CAAC,CAAC","ignoreList":[]}
@@ -46,35 +46,5 @@ export const generateHash = value => {
46
46
  while (length--) hasher = hasher * 33 ^ str.charCodeAt(length);
47
47
  return `unistyles-${(hasher >>> 0).toString(36)}`;
48
48
  };
49
- export const createDoubleMap = () => {
50
- const map = new Map();
51
- return {
52
- get: (key, secondKey) => {
53
- const mapForKey = map.get(key);
54
- if (!mapForKey) {
55
- return undefined;
56
- }
57
- return mapForKey.get(secondKey);
58
- },
59
- set: (key, secondKey, value) => {
60
- const mapForKey = map.get(key) ?? new Map();
61
- map.set(key, mapForKey);
62
- mapForKey.set(secondKey, value);
63
- },
64
- delete: (key, secondKey) => {
65
- const mapForKey = map.get(key);
66
- if (!mapForKey) {
67
- return;
68
- }
69
- mapForKey.delete(secondKey);
70
- },
71
- forEach: callback => {
72
- map.forEach((mapForKey, key) => {
73
- mapForKey.forEach((value, secondKey) => {
74
- callback(key, secondKey, value);
75
- });
76
- });
77
- }
78
- };
79
- };
49
+ export const hyphenate = propertyName => propertyName.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`);
80
50
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","keyInObject","isServer","window","deepMergeObjects","sources","target","forEach","source","keys","sourceValue","targetValue","warn","message","console","equal","a","b","is","keysA","length","every","prototype","hasOwnProperty","call","generateHash","str","JSON","stringify","hasher","charCodeAt","toString","createDoubleMap","Map","get","secondKey","mapForKey","undefined","set","delete","callback"],"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;AACA;AACA;AACA,OA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AACH,SAAS,EAAEnC,KAAK,CAAC;IACnC,CAAC;IACDuC,MAAM,EAAEA,CAACxC,GAAS,EAAEoC,SAAqB,KAAK;MAC1C,MAAMC,SAAS,GAAGtC,GAAG,CAACoC,GAAG,CAACnC,GAAG,CAAC;MAE9B,IAAI,CAACqC,SAAS,EAAE;QACZ;MACJ;MAEAA,SAAS,CAACG,MAAM,CAACJ,SAAS,CAAC;IAC/B,CAAC;IACD5B,OAAO,EAAGiC,QAAmE,IAAK;MAC9E1C,GAAG,CAACS,OAAO,CAAC,CAAC6B,SAAS,EAAErC,GAAG,KAAK;QAC5BqC,SAAS,CAAC7B,OAAO,CAAC,CAACP,KAAK,EAAEmC,SAAS,KAAK;UACpCK,QAAQ,CAACzC,GAAG,EAAEoC,SAAS,EAAEnC,KAAK,CAAC;QACnC,CAAC,CAAC;MACN,CAAC,CAAC;IACN;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["reduceObject","obj","reducer","Object","fromEntries","entries","map","key","value","keyInObject","isServer","window","deepMergeObjects","sources","target","forEach","source","keys","sourceValue","targetValue","warn","message","console","equal","a","b","is","keysA","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,C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CAAC,CAACG,MAAM,EAAE;IACxC,OAAO,KAAK;EAChB;EAEA,OAAOD,KAAK,CAACE,KAAK,CAACtB,GAAG,IAAIJ,MAAM,CAACuB,EAAE,CAACF,CAAC,CAACjB,GAAG,CAAC,EAAEkB,CAAC,CAAClB,GAAG,CAAC,CAAC,IAAIJ,MAAM,CAAC2B,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAElB,GAAG,CAAC,CAAC;AACxG,CAAC;AAED,OAAO,MAAM0B,YAAY,GAAIzB,KAAU,IAAK;EACxC,MAAM0B,GAAG,GAAGC,IAAI,CAACC,SAAS,CAAC5B,KAAK,CAAC;EACjC,IAAI6B,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":[]}
@@ -63,7 +63,10 @@ export const getMediaQuery = query => {
63
63
  return `(min-width: ${minWidth ?? 0}px)`;
64
64
  };
65
65
  export const extractUnistyleDependencies = value => {
66
+ if (!value) {
67
+ return [];
68
+ }
66
69
  const dependencies = keyInObject(value, 'uni__dependencies') ? value.uni__dependencies : [];
67
- return dependencies;
70
+ return Array.isArray(dependencies) ? dependencies : [];
68
71
  };
69
72
  //# sourceMappingURL=unistyle.js.map
@@ -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"],"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,IAAa;EAC1D,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,MAA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OAAO,MAAMqB,aAAa,GAAIN,KAAa,IAAK;EAC5C,IAAIlB,MAAM,CAACO,MAAM,CAACxC,WAAW,CAAC,CAAC0D,QAAQ,CAACP,KAAoB,CAAC,EAAE;IAC3D,OAAO,iBAAiBA,KAAK,GAAG;EACpC;EAEA,IAAIlD,aAAa,CAACkD,KAAK,CAAC,EAAE;IACtB,MAAM;MAAEQ,QAAQ;MAAEC,QAAQ;MAAEC,SAAS;MAAEC;IAAU,CAAC,GAAG5D,OAAO,CAACiD,KAAK,CAAC;IAEnE,OAAO,CACHQ,QAAQ,GAAG,eAAeA,QAAQ,KAAK,GAAGJ,SAAS,EACnDK,QAAQ,GAAG,eAAeA,QAAQ,KAAK,GAAGL,SAAS,EACnDM,SAAS,GAAG,gBAAgBA,SAAS,KAAK,GAAGN,SAAS,EACtDO,SAAS,GAAG,gBAAgBA,SAAS,KAAK,GAAGP,SAAS,CACzD,CAACrC,MAAM,CAAC6C,OAAO,CAAC,CAACC,IAAI,CAAC,OAAO,CAAC;EACnC;EAEA,MAAML,QAAQ,GAAGxD,cAAc,CAAC8D,WAAW,IAAI7D,WAAW,CAACD,cAAc,CAAC8D,WAAW,EAAEd,KAAK,CAAC,GAAGhD,cAAc,CAAC8D,WAAW,CAACd,KAAK,CAAC,GAAGI,SAAS;EAE7I,OAAO,eAAeI,QAAQ,IAAI,CAAC,KAAK;AAC5C,CAAC;AAED,OAAO,MAAMO,2BAA2B,GAAI9B,KAAU,IAAK;EACvD,MAAM+B,YAAuC,GAAG/D,WAAW,CAACgC,KAAK,EAAE,mBAAmB,CAAC,GAAGA,KAAK,CAACgC,iBAAiB,GAAG,EAAE;EAEtH,OAAOD,YAAY;AACvB,CAAC","ignoreList":[]}
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,IAAa;EAC1D,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,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KA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.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMedia.web.d.ts","sourceRoot":"","sources":["../../../../src/components/useMedia.web.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,WAAY;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;CA2C9C,CAAA"}
@@ -1,7 +1,8 @@
1
- import React, { type ComponentProps, type ComponentType } from 'react';
1
+ import React, { type ComponentType } from 'react';
2
2
  import type { UnistylesTheme } from '../types';
3
- type Mappings<T extends ComponentType<any>> = (theme: UnistylesTheme) => Partial<Omit<ComponentProps<T>, typeof SUPPORTED_STYLE_PROPS[number]>>;
3
+ import type { PartialBy } from '../types/common';
4
4
  declare const SUPPORTED_STYLE_PROPS: readonly ["style", "contentContainerStyle"];
5
- export declare const createUnistylesComponent: <T extends ComponentType<any>>(Component: T, _?: Mappings<T>) => (props: ComponentProps<T>) => React.JSX.Element;
5
+ type SupportedStyleProps = typeof SUPPORTED_STYLE_PROPS[number];
6
+ export declare const createUnistylesComponent: <TProps extends Record<string, any>, TMappings extends Partial<Omit<TProps, SupportedStyleProps>>>(Component: ComponentType<TProps>, mappings?: (theme: UnistylesTheme) => TMappings) => (props: PartialBy<TProps, keyof TMappings | SupportedStyleProps>) => React.JSX.Element;
6
7
  export {};
7
8
  //# sourceMappingURL=createUnistylesComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createUnistylesComponent.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,KAAK,QAAQ,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAE/I,QAAA,MAAM,qBAAqB,6CAA8C,CAAA;AAEzE,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,aAAa,CAAC,MAAK,QAAQ,CAAC,CAAC,CAAC,aAChF,cAAc,CAAC,CAAC,CAAC,sBAGnC,CAAA"}
1
+ {"version":3,"file":"createUnistylesComponent.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAuB,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAKhD,QAAA,MAAM,qBAAqB,6CAA8C,CAAA;AAGzE,KAAK,mBAAmB,GAAG,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAA;AA0B/D,eAAO,MAAM,wBAAwB,GAAI,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,SAAS,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,aAAa,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,cAAc,KAAK,SAAS,aACzM,SAAS,CAAC,MAAM,EAAE,MAAM,SAAS,GAAG,mBAAmB,CAAC,sBAsC1E,CAAA"}
@@ -1,7 +1,8 @@
1
- import React, { type ComponentProps, type ComponentType } from 'react';
1
+ import React, { type ComponentType } from 'react';
2
2
  import type { UnistylesTheme } from '../types';
3
- type Mappings<T extends ComponentType<any>> = (theme: UnistylesTheme) => Partial<Omit<ComponentProps<T>, typeof SUPPORTED_STYLE_PROPS[number]>>;
3
+ import type { PartialBy } from '../types/common';
4
4
  declare const SUPPORTED_STYLE_PROPS: readonly ["style", "contentContainerStyle"];
5
- export declare const createUnistylesComponent: <T extends ComponentType<any>>(Component: T, mappings?: Mappings<T>) => (props: ComponentProps<T>) => React.JSX.Element;
5
+ type SupportedStyleProps = typeof SUPPORTED_STYLE_PROPS[number];
6
+ export declare const createUnistylesComponent: <TProps extends Record<string, any>, TMappings extends Partial<Omit<TProps, SupportedStyleProps>>>(Component: ComponentType<TProps>, mappings?: (theme: UnistylesTheme) => TMappings) => (props: PartialBy<TProps, keyof TMappings | SupportedStyleProps>) => React.JSX.Element;
6
7
  export {};
7
8
  //# sourceMappingURL=createUnistylesComponent.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createUnistylesComponent.native.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesComponent.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAA+B,MAAM,OAAO,CAAA;AACnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C,KAAK,QAAQ,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAE/I,QAAA,MAAM,qBAAqB,6CAA8C,CAAA;AAEzE,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,aAAa,CAAC,aAAY,QAAQ,CAAC,CAAC,CAAC,aACvF,cAAc,CAAC,CAAC,CAAC,sBA8EnC,CAAA"}
1
+ {"version":3,"file":"createUnistylesComponent.native.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesComponent.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAA+B,MAAM,OAAO,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,QAAA,MAAM,qBAAqB,6CAA8C,CAAA;AACzE,KAAK,mBAAmB,GAAG,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAA;AAE/D,eAAO,MAAM,wBAAwB,GAAG,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,SAAS,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,aAAa,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,cAAc,KAAK,SAAS,aACxM,SAAS,CAAC,MAAM,EAAE,MAAM,SAAS,GAAG,mBAAmB,CAAC,sBAgF1E,CAAA"}
@@ -1,4 +1,5 @@
1
1
  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
+ export type PartialBy<T, K> = Omit<T, K & keyof T> & Partial<Pick<T, K & keyof T>>;
4
5
  //# 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"}
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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AASlD,eAAO,MAAM,gBAAgB,UAAW,eAAe,wBA6DtD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAQlD,eAAO,MAAM,gBAAgB,UAAW,eAAe,wBAqEtD,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { BoxShadowValue } from 'react-native';
2
+ export declare const getBoxShadow: (boxShadow: Array<BoxShadowValue>) => {
3
+ [x: string]: {
4
+ boxShadow: string;
5
+ };
6
+ } | {
7
+ boxShadow: string;
8
+ };
9
+ //# sourceMappingURL=boxShadow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boxShadow.d.ts","sourceRoot":"","sources":["../../../../../../src/web/convert/object/boxShadow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAUlD,eAAO,MAAM,YAAY,cAAe,KAAK,CAAC,cAAc,CAAC;;;;;;CA2C5D,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { Filters } from '../types';
2
+ export declare const getFilterStyle: (filters: Array<Filters>) => Record<string, any>;
3
+ //# sourceMappingURL=filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../../../src/web/convert/object/filter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAYvC,eAAO,MAAM,cAAc,YAAa,KAAK,CAAC,OAAO,CAAC,wBAwBrD,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './transform';
2
+ export * from './boxShadow';
3
+ export * from './filter';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/web/convert/object/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA"}
@@ -0,0 +1,5 @@
1
+ type Styles = Record<string, any>;
2
+ type Normalize<TStyles extends Styles> = (key: keyof TStyles, value: TStyles[keyof TStyles]) => any;
3
+ export declare const getObjectStyle: <TStyles extends Styles>(styles: Array<TStyles>, styleKey: string, normalize: Normalize<TStyles>) => Record<string, any>;
4
+ export {};
5
+ //# sourceMappingURL=objectStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectStyle.d.ts","sourceRoot":"","sources":["../../../../../../src/web/convert/object/objectStyle.ts"],"names":[],"mappings":"AAEA,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACjC,KAAK,SAAS,CAAC,OAAO,SAAS,MAAM,IAAI,CAAC,GAAG,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,OAAO,CAAC,KAAK,GAAG,CAAA;AAenG,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,MAAM,UAAU,KAAK,CAAC,OAAO,CAAC,YAAY,MAAM,aAAa,SAAS,CAAC,OAAO,CAAC,wBAiD7H,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { TransformStyles } from '../../../types/core';
2
+ export declare const getTransformStyle: (transforms: Array<TransformStyles>) => Record<string, any>;
3
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../../../../src/web/convert/object/transform.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAc1D,eAAO,MAAM,iBAAiB,eAAgB,KAAK,CAAC,eAAe,CAAC,wBAOlE,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boxShadow.d.ts","sourceRoot":"","sources":["../../../../../../src/web/convert/shadow/boxShadow.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,iBAAiB,WAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;CAkC5D,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const getShadowBreakpoints: (shadowProperties: ReadonlyArray<string>, styles: Record<string, any>) => string[];
2
+ //# sourceMappingURL=getShadowBreakpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getShadowBreakpoints.d.ts","sourceRoot":"","sources":["../../../../../../src/web/convert/shadow/getShadowBreakpoints.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,qBAAsB,aAAa,CAAC,MAAM,CAAC,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,aA+BxG,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './boxShadow';
2
+ export * from './textShadow';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/web/convert/shadow/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textShadow.d.ts","sourceRoot":"","sources":["../../../../../../src/web/convert/shadow/textShadow.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB,WAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;CAgC7D,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { TextStyle, ViewStyle } from 'react-native';
1
+ import type { FilterFunction, TextStyle, ViewStyle } from 'react-native';
2
2
  import type { ToDeepUnistyles } from '../../types/stylesheet';
3
3
  export type ShadowOffset = ToDeepUnistyles<{
4
4
  width: number;
@@ -10,4 +10,10 @@ export declare const BOX_SHADOW_STYLES: readonly ["shadowColor", "shadowRadius",
10
10
  export type BoxShadow = Required<Pick<ViewStyle, typeof BOX_SHADOW_STYLES[number]>>;
11
11
  export type AllShadow = TextShadow & BoxShadow;
12
12
  export type AllShadowKeys = keyof AllShadow;
13
+ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
14
+ type FilterKeys = keyof UnionToIntersection<FilterFunction>;
15
+ export type Filters = {
16
+ [K in FilterKeys]: UnionToIntersection<FilterFunction>[K];
17
+ };
18
+ export {};
13
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAE7D,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAE7E,eAAO,MAAM,kBAAkB,sEAAuE,CAAA;AAEtG,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAErF,eAAO,MAAM,iBAAiB,2EAA4E,CAAA;AAE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c,CAAC,CAAA;AAE3D,MAAM,MAAM,OAAO,GAAG;KACjB,CAAC,IAAI,UAAU,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;CAC5D,CAAA"}
@@ -1,8 +1,12 @@
1
- import { type AllShadow, type AllShadowKeys } from './types';
2
- export declare const isTransform: (key: string, value: any) => value is Array<Record<string, any>>;
1
+ import { type AllShadow, type AllShadowKeys, type Filters } from './types';
2
+ import type { TransformStyles } from '../../types/core';
3
+ import type { BoxShadowValue } from 'react-native';
4
+ export declare const isTransform: (key: string, value: any) => value is Array<TransformStyles>;
3
5
  export declare const isTextShadow: (key: string) => boolean;
4
- export declare const isBoxShadow: (key: string) => boolean;
5
- export declare const normalizeNumericValue: (value: number) => string | number;
6
+ export declare const isShadow: (key: string) => boolean;
7
+ export declare const isFilter: (key: string, value: any) => value is Array<Filters>;
8
+ export declare const isBoxShadow: (key: string, value: any) => value is Array<BoxShadowValue>;
9
+ export declare const normalizeNumericValue: (value: number | string) => string | number;
6
10
  export declare const normalizeColor: (color: string, opacity?: number) => string;
7
11
  export declare const extractShadowValue: <TKey extends AllShadowKeys>(key: TKey, breakpoint: string, styles: any) => AllShadow[TKey];
8
12
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyC,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAA;AAEnG,eAAO,MAAM,WAAW,QAAS,MAAM,SAAS,GAAG,KAAG,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAgD,CAAA;AAExI,eAAO,MAAM,YAAY,QAAS,MAAM,YAA0E,CAAA;AAElH,eAAO,MAAM,WAAW,QAAS,MAAM,YAAwE,CAAA;AAE/G,eAAO,MAAM,qBAAqB,UAAW,MAAM,oBAAiC,CAAA;AAEpF,eAAO,MAAM,cAAc,UAAW,MAAM,YAAW,MAAM,WAyB5D,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,IAAI,SAAS,aAAa,OAAO,IAAI,cAAc,MAAM,UAAU,GAAG,KAAG,SAAS,CAAC,IAAI,CAazH,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/web/convert/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyC,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAA;AACjH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,eAAO,MAAM,WAAW,QAAS,MAAM,SAAS,GAAG,KAAG,KAAK,IAAI,KAAK,CAAC,eAAe,CAAgD,CAAA;AAEpI,eAAO,MAAM,YAAY,QAAS,MAAM,YAA0E,CAAA;AAElH,eAAO,MAAM,QAAQ,QAAS,MAAM,YAAwE,CAAA;AAE5G,eAAO,MAAM,QAAQ,QAAS,MAAM,SAAS,GAAG,KAAG,KAAK,IAAI,KAAK,CAAC,OAAO,CAA6C,CAAA;AAEtH,eAAO,MAAM,WAAW,QAAS,MAAM,SAAS,GAAG,KAAG,KAAK,IAAI,KAAK,CAAC,cAAc,CAAgD,CAAA;AAEnI,eAAO,MAAM,qBAAqB,UAAW,MAAM,GAAG,MAAM,oBAA8D,CAAA;AAE1H,eAAO,MAAM,cAAc,UAAW,MAAM,6BAyB3C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,IAAI,SAAS,aAAa,OAAO,IAAI,cAAc,MAAM,UAAU,GAAG,KAAG,SAAS,CAAC,IAAI,CAazH,CAAA"}
@@ -606,10 +606,10 @@ export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet>)
606
606
  portrait?: "normal" | "italic" | undefined;
607
607
  landscape?: "normal" | "italic" | undefined;
608
608
  } | undefined;
609
- fontWeight?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | {
610
- [x: symbol]: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
611
- portrait?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
612
- landscape?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
609
+ fontWeight?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | {
610
+ [x: symbol]: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
611
+ portrait?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
612
+ landscape?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
613
613
  } | undefined;
614
614
  letterSpacing?: number | {
615
615
  [x: symbol]: number | undefined;
@@ -1325,10 +1325,10 @@ export declare const create: (stylesheet: StyleSheetWithSuperPowers<StyleSheet>)
1325
1325
  portrait?: "normal" | "italic" | undefined;
1326
1326
  landscape?: "normal" | "italic" | undefined;
1327
1327
  } | undefined;
1328
- fontWeight?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | {
1329
- [x: symbol]: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1330
- portrait?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1331
- landscape?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1328
+ fontWeight?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | {
1329
+ [x: symbol]: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1330
+ portrait?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1331
+ landscape?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1332
1332
  } | undefined;
1333
1333
  letterSpacing?: number | {
1334
1334
  [x: symbol]: number | undefined;
@@ -607,10 +607,10 @@ export declare const StyleSheet: {
607
607
  portrait?: "normal" | "italic" | undefined;
608
608
  landscape?: "normal" | "italic" | undefined;
609
609
  } | undefined;
610
- fontWeight?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | {
611
- [x: symbol]: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
612
- portrait?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
613
- landscape?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
610
+ fontWeight?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | {
611
+ [x: symbol]: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
612
+ portrait?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
613
+ landscape?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
614
614
  } | undefined;
615
615
  letterSpacing?: number | {
616
616
  [x: symbol]: number | undefined;
@@ -1326,10 +1326,10 @@ export declare const StyleSheet: {
1326
1326
  portrait?: "normal" | "italic" | undefined;
1327
1327
  landscape?: "normal" | "italic" | undefined;
1328
1328
  } | undefined;
1329
- fontWeight?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | {
1330
- [x: symbol]: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1331
- portrait?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1332
- landscape?: "light" | "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1329
+ fontWeight?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | {
1330
+ [x: symbol]: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1331
+ portrait?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1332
+ landscape?: "light" | "bold" | "normal" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black" | undefined;
1333
1333
  } | undefined;
1334
1334
  letterSpacing?: number | {
1335
1335
  [x: symbol]: number | undefined;
@@ -2,9 +2,11 @@ import { UnistyleDependency } from '../specs/NativePlatform';
2
2
  declare class UnistylesListenerBuilder {
3
3
  private isInitialized;
4
4
  private listeners;
5
+ private stylesheetListeners;
5
6
  emitChange: (dependency: UnistyleDependency) => void;
6
7
  initListeners: () => void;
7
8
  addListeners: (dependencies: Array<UnistyleDependency>, listener: VoidFunction) => () => void;
9
+ addStylesheetListeners: (dependencies: Array<UnistyleDependency>, listener: VoidFunction) => () => void;
8
10
  }
9
11
  export declare const UnistylesListener: UnistylesListenerBuilder;
10
12
  export {};