react-native-unistyles 2.0.0-beta.2 → 2.0.0-beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. package/lib/commonjs/core/UnistyleRegistry.js +6 -2
  2. package/lib/commonjs/core/UnistyleRegistry.js.map +1 -1
  3. package/lib/commonjs/core/Unistyles.js +2 -1
  4. package/lib/commonjs/core/Unistyles.js.map +1 -1
  5. package/lib/commonjs/core/UnistylesModule.web.js +18 -6
  6. package/lib/commonjs/core/UnistylesModule.web.js.map +1 -1
  7. package/lib/commonjs/core/UnistylesRuntime.js +3 -0
  8. package/lib/commonjs/core/UnistylesRuntime.js.map +1 -1
  9. package/lib/commonjs/hooks/index.js +7 -0
  10. package/lib/commonjs/hooks/index.js.map +1 -1
  11. package/lib/commonjs/hooks/useCSS.js +9 -0
  12. package/lib/commonjs/hooks/useCSS.js.map +1 -0
  13. package/lib/commonjs/hooks/useCSS.web.js +46 -0
  14. package/lib/commonjs/hooks/useCSS.web.js.map +1 -0
  15. package/lib/commonjs/normalizer/index.js.map +1 -0
  16. package/lib/commonjs/normalizer/module.d.js.map +1 -0
  17. package/lib/commonjs/{plugins/normalizer → normalizer}/normalizeStyle.js +1 -1
  18. package/lib/commonjs/normalizer/normalizeStyle.js.map +1 -0
  19. package/lib/commonjs/normalizer/normalizer.js.map +1 -0
  20. package/lib/commonjs/plugins/cssMediaQueriesPlugin.js +14 -0
  21. package/lib/commonjs/plugins/cssMediaQueriesPlugin.js.map +1 -0
  22. package/lib/commonjs/plugins/index.js +3 -21
  23. package/lib/commonjs/plugins/index.js.map +1 -1
  24. package/lib/commonjs/plugins/normalizeWebStylesPlugin.js +1 -1
  25. package/lib/commonjs/useStyles.js +4 -1
  26. package/lib/commonjs/useStyles.js.map +1 -1
  27. package/lib/commonjs/utils/cssMediaQuery.js +250 -0
  28. package/lib/commonjs/utils/cssMediaQuery.js.map +1 -0
  29. package/lib/commonjs/utils/generateId.js +15 -0
  30. package/lib/commonjs/utils/generateId.js.map +1 -0
  31. package/lib/commonjs/utils/hash32.js +43 -0
  32. package/lib/commonjs/utils/hash32.js.map +1 -0
  33. package/lib/commonjs/utils/index.js +13 -0
  34. package/lib/commonjs/utils/index.js.map +1 -1
  35. package/lib/commonjs/utils/mqParser.js +2 -1
  36. package/lib/commonjs/utils/mqParser.js.map +1 -1
  37. package/lib/commonjs/utils/styles.js +11 -1
  38. package/lib/commonjs/utils/styles.js.map +1 -1
  39. package/lib/module/core/UnistyleRegistry.js +7 -3
  40. package/lib/module/core/UnistyleRegistry.js.map +1 -1
  41. package/lib/module/core/Unistyles.js +2 -1
  42. package/lib/module/core/Unistyles.js.map +1 -1
  43. package/lib/module/core/UnistylesModule.web.js +18 -6
  44. package/lib/module/core/UnistylesModule.web.js.map +1 -1
  45. package/lib/module/core/UnistylesRuntime.js +3 -0
  46. package/lib/module/core/UnistylesRuntime.js.map +1 -1
  47. package/lib/module/hooks/index.js +1 -0
  48. package/lib/module/hooks/index.js.map +1 -1
  49. package/lib/module/hooks/useCSS.js +2 -0
  50. package/lib/module/hooks/useCSS.js.map +1 -0
  51. package/lib/module/hooks/useCSS.web.js +39 -0
  52. package/lib/module/hooks/useCSS.web.js.map +1 -0
  53. package/lib/module/normalizer/index.js.map +1 -0
  54. package/lib/module/normalizer/module.d.js.map +1 -0
  55. package/lib/module/{plugins/normalizer → normalizer}/normalizeStyle.js +1 -1
  56. package/lib/module/normalizer/normalizeStyle.js.map +1 -0
  57. package/lib/module/normalizer/normalizer.js.map +1 -0
  58. package/lib/module/plugins/cssMediaQueriesPlugin.js +7 -0
  59. package/lib/module/plugins/cssMediaQueriesPlugin.js.map +1 -0
  60. package/lib/module/plugins/index.js +1 -1
  61. package/lib/module/plugins/index.js.map +1 -1
  62. package/lib/module/plugins/normalizeWebStylesPlugin.js +1 -1
  63. package/lib/module/plugins/normalizeWebStylesPlugin.js.map +1 -1
  64. package/lib/module/useStyles.js +5 -2
  65. package/lib/module/useStyles.js.map +1 -1
  66. package/lib/module/utils/cssMediaQuery.js +243 -0
  67. package/lib/module/utils/cssMediaQuery.js.map +1 -0
  68. package/lib/module/utils/generateId.js +7 -0
  69. package/lib/module/utils/generateId.js.map +1 -0
  70. package/lib/module/utils/hash32.js +36 -0
  71. package/lib/module/utils/hash32.js.map +1 -0
  72. package/lib/module/utils/index.js +2 -1
  73. package/lib/module/utils/index.js.map +1 -1
  74. package/lib/module/utils/mqParser.js +1 -1
  75. package/lib/module/utils/mqParser.js.map +1 -1
  76. package/lib/module/utils/styles.js +11 -1
  77. package/lib/module/utils/styles.js.map +1 -1
  78. package/lib/typescript/src/core/UnistyleRegistry.d.ts.map +1 -1
  79. package/lib/typescript/src/core/Unistyles.d.ts.map +1 -1
  80. package/lib/typescript/src/core/UnistylesModule.web.d.ts.map +1 -1
  81. package/lib/typescript/src/core/UnistylesRuntime.d.ts +1 -0
  82. package/lib/typescript/src/core/UnistylesRuntime.d.ts.map +1 -1
  83. package/lib/typescript/src/hooks/index.d.ts +1 -0
  84. package/lib/typescript/src/hooks/index.d.ts.map +1 -1
  85. package/lib/typescript/src/hooks/useCSS.d.ts +3 -0
  86. package/lib/typescript/src/hooks/useCSS.d.ts.map +1 -0
  87. package/lib/typescript/src/hooks/useCSS.web.d.ts +3 -0
  88. package/lib/typescript/src/hooks/useCSS.web.d.ts.map +1 -0
  89. package/lib/typescript/src/normalizer/index.d.ts.map +1 -0
  90. package/lib/typescript/src/normalizer/normalizeStyle.d.ts +3 -0
  91. package/lib/typescript/src/normalizer/normalizeStyle.d.ts.map +1 -0
  92. package/lib/typescript/src/{plugins/normalizer → normalizer}/normalizer.d.ts +1 -1
  93. package/lib/typescript/src/normalizer/normalizer.d.ts.map +1 -0
  94. package/lib/typescript/src/plugins/cssMediaQueriesPlugin.d.ts +3 -0
  95. package/lib/typescript/src/plugins/cssMediaQueriesPlugin.d.ts.map +1 -0
  96. package/lib/typescript/src/plugins/index.d.ts +1 -1
  97. package/lib/typescript/src/plugins/index.d.ts.map +1 -1
  98. package/lib/typescript/src/types/unistyles.d.ts +2 -1
  99. package/lib/typescript/src/types/unistyles.d.ts.map +1 -1
  100. package/lib/typescript/src/useStyles.d.ts.map +1 -1
  101. package/lib/typescript/src/utils/cssMediaQuery.d.ts +4 -0
  102. package/lib/typescript/src/utils/cssMediaQuery.d.ts.map +1 -0
  103. package/lib/typescript/src/utils/generateId.d.ts +2 -0
  104. package/lib/typescript/src/utils/generateId.d.ts.map +1 -0
  105. package/lib/typescript/src/utils/hash32.d.ts +2 -0
  106. package/lib/typescript/src/utils/hash32.d.ts.map +1 -0
  107. package/lib/typescript/src/utils/index.d.ts +3 -1
  108. package/lib/typescript/src/utils/index.d.ts.map +1 -1
  109. package/lib/typescript/src/utils/mqParser.d.ts +2 -1
  110. package/lib/typescript/src/utils/mqParser.d.ts.map +1 -1
  111. package/lib/typescript/src/utils/styles.d.ts +1 -1
  112. package/lib/typescript/src/utils/styles.d.ts.map +1 -1
  113. package/package.json +3 -2
  114. package/src/core/UnistyleRegistry.ts +8 -3
  115. package/src/core/Unistyles.ts +2 -1
  116. package/src/core/UnistylesModule.web.ts +20 -7
  117. package/src/core/UnistylesRuntime.ts +4 -0
  118. package/src/hooks/index.ts +1 -0
  119. package/src/hooks/useCSS.ts +3 -0
  120. package/src/hooks/useCSS.web.ts +51 -0
  121. package/src/{plugins/normalizer → normalizer}/normalizeStyle.ts +2 -2
  122. package/src/{plugins/normalizer → normalizer}/normalizer.ts +2 -1
  123. package/src/plugins/cssMediaQueriesPlugin.ts +8 -0
  124. package/src/plugins/index.ts +1 -1
  125. package/src/plugins/normalizeWebStylesPlugin.ts +1 -1
  126. package/src/types/unistyles.ts +3 -2
  127. package/src/useStyles.ts +10 -2
  128. package/src/utils/cssMediaQuery.ts +268 -0
  129. package/src/utils/generateId.ts +10 -0
  130. package/src/utils/hash32.ts +53 -0
  131. package/src/utils/index.ts +3 -1
  132. package/src/utils/mqParser.ts +2 -2
  133. package/src/utils/styles.ts +12 -2
  134. package/lib/commonjs/plugins/normalizer/index.js.map +0 -1
  135. package/lib/commonjs/plugins/normalizer/module.d.js.map +0 -1
  136. package/lib/commonjs/plugins/normalizer/normalizeStyle.js.map +0 -1
  137. package/lib/commonjs/plugins/normalizer/normalizer.js.map +0 -1
  138. package/lib/module/plugins/normalizer/index.js.map +0 -1
  139. package/lib/module/plugins/normalizer/module.d.js.map +0 -1
  140. package/lib/module/plugins/normalizer/normalizeStyle.js.map +0 -1
  141. package/lib/module/plugins/normalizer/normalizer.js.map +0 -1
  142. package/lib/typescript/src/plugins/normalizer/index.d.ts.map +0 -1
  143. package/lib/typescript/src/plugins/normalizer/normalizeStyle.d.ts +0 -3
  144. package/lib/typescript/src/plugins/normalizer/normalizeStyle.d.ts.map +0 -1
  145. package/lib/typescript/src/plugins/normalizer/normalizer.d.ts.map +0 -1
  146. /package/lib/commonjs/{plugins/normalizer → normalizer}/index.js +0 -0
  147. /package/lib/commonjs/{plugins/normalizer → normalizer}/module.d.js +0 -0
  148. /package/lib/commonjs/{plugins/normalizer → normalizer}/normalizer.js +0 -0
  149. /package/lib/module/{plugins/normalizer → normalizer}/index.js +0 -0
  150. /package/lib/module/{plugins/normalizer → normalizer}/module.d.js +0 -0
  151. /package/lib/module/{plugins/normalizer → normalizer}/normalizer.js +0 -0
  152. /package/lib/typescript/src/{plugins/normalizer → normalizer}/index.d.ts +0 -0
  153. /package/src/{plugins/normalizer → normalizer}/index.ts +0 -0
  154. /package/src/{plugins/normalizer → normalizer}/module.d.ts +0 -0
@@ -0,0 +1,250 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createMediaQueryForStyles = void 0;
7
+ var _normalizer = require("../normalizer");
8
+ var _mqParser = require("./mqParser");
9
+ var _generateId = require("./generateId");
10
+ const createMediaQueryForStyles = (styles, runtime) => {
11
+ const withMediaQueries = Object.entries(styles).filter(_ref => {
12
+ let [, value] = _ref;
13
+ return typeof value === 'object';
14
+ }).reduce((acc, _ref2) => {
15
+ let [prop, value] = _ref2;
16
+ const objectKeys = Object.keys(value);
17
+ const mediaQueries = objectKeys.filter(key => (0, _mqParser.isUnistylesMq)(key));
18
+ const breakpoints = objectKeys.filter(key => runtime.breakpoints[key]);
19
+ if (mediaQueries.length === 0 && breakpoints.length === 0) {
20
+ return acc;
21
+ }
22
+ const className = (0, _generateId.generateReactNativeWebId)(prop, '""');
23
+ const breakpointsStyles = getBreakpointsStyles(prop, value, runtime, className);
24
+ const mediaQueriesStyles = getMediaQueriesFromMQ(prop, value, className);
25
+ return {
26
+ ...acc,
27
+ [prop]: `
28
+ ${breakpointsStyles}
29
+ ${mediaQueriesStyles}
30
+ `.trim()
31
+ };
32
+ }, {});
33
+ return {
34
+ ...styles,
35
+ ...withMediaQueries
36
+ };
37
+ };
38
+ exports.createMediaQueryForStyles = createMediaQueryForStyles;
39
+ const getMaxWidthMediaQuery = width => {
40
+ if (!width) {
41
+ return '';
42
+ }
43
+ if (width.to === Infinity) {
44
+ return '';
45
+ }
46
+ return `and (max-width: ${width.to}px)`;
47
+ };
48
+ const getMaxHeightMediaQuery = height => {
49
+ if (!height) {
50
+ return '';
51
+ }
52
+ if (height.to === Infinity) {
53
+ return '';
54
+ }
55
+ return `and (max-height: ${height.to}px)`;
56
+ };
57
+ const getMediaQueriesFromMQ = (prop, value, className) => Object.entries(value).reduce((acc, _ref3) => {
58
+ let [key, value] = _ref3;
59
+ const result = (0, _mqParser.parseMq)(key);
60
+ if (!(0, _mqParser.isValidMq)(result)) {
61
+ return acc;
62
+ }
63
+ if (result.width && result.height) {
64
+ return `${acc}
65
+
66
+ @media screen and (min-width: ${result.width.from}px) and (min-height: ${result.height.from}px) ${getMaxWidthMediaQuery(result.width)} ${getMaxHeightMediaQuery(result.height)} {
67
+ .${className} {
68
+ ${normalizePropName(prop)}: ${normalizeWebValue(prop, value)};
69
+ }
70
+ }
71
+ `;
72
+ }
73
+ if (result.width) {
74
+ return `${acc}
75
+
76
+ @media screen and (min-width: ${result.width.from}px) ${getMaxWidthMediaQuery(result.width)} {
77
+ .${className} {
78
+ ${normalizePropName(prop)}: ${normalizeWebValue(prop, value)};
79
+ }
80
+ }
81
+ `;
82
+ }
83
+ if (result.height) {
84
+ return `${acc}
85
+
86
+ @media screen and (min-height: ${result.height.from}px) ${getMaxHeightMediaQuery(result.height)} {
87
+ .${className} {
88
+ ${normalizePropName(prop)}: ${normalizeWebValue(prop, value)};
89
+ }
90
+ }
91
+ `;
92
+ }
93
+ return acc;
94
+ }, '');
95
+ const getBreakpointsStyles = (prop, value, runtime, className) => Object.entries(value).reduce((acc, _ref4) => {
96
+ let [key, value] = _ref4;
97
+ const breakpoint = runtime.breakpoints[key];
98
+ if (breakpoint === undefined) {
99
+ return acc;
100
+ }
101
+ return `${acc}
102
+
103
+ @media screen and (min-width: ${breakpoint}px) {
104
+ .${className} {
105
+ ${normalizePropName(prop)}: ${normalizeWebValue(prop, value)};
106
+ }
107
+ }
108
+ `;
109
+ }, '');
110
+ const normalizePropName = prop => prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
111
+ const normalizeWebValue = (prop, value) => {
112
+ if (value === undefined) {
113
+ return 'unset';
114
+ }
115
+ switch (prop) {
116
+ // colors
117
+ case 'color':
118
+ case 'backgroundColor':
119
+ case 'borderColor':
120
+ case 'borderBottomColor':
121
+ case 'borderLeftColor':
122
+ case 'borderRightColor':
123
+ case 'borderTopColor':
124
+ case 'borderBlockColor':
125
+ case 'borderBlockEndColor':
126
+ case 'borderBlockStartColor':
127
+ case 'textDecorationColor':
128
+ return (0, _normalizer.normalizeColor)(value);
129
+
130
+ // dimensions
131
+ case 'width':
132
+ case 'height':
133
+ case 'minWidth':
134
+ case 'minHeight':
135
+ case 'maxWidth':
136
+ case 'maxHeight':
137
+ case 'borderRadius':
138
+ case 'borderWidth':
139
+ case 'borderBottomLeftRadius':
140
+ case 'borderBottomRightRadius':
141
+ case 'borderEndEndRadius':
142
+ case 'borderEndStartRadius':
143
+ case 'borderStartEndRadius':
144
+ case 'borderStartStartRadius':
145
+ case 'borderTopLeftRadius':
146
+ case 'borderTopRightRadius':
147
+ case 'borderBottomWidth':
148
+ case 'borderLeftWidth':
149
+ case 'borderRightWidth':
150
+ case 'borderTopWidth':
151
+ case 'bottom':
152
+ case 'left':
153
+ case 'right':
154
+ case 'top':
155
+ case 'marginTop':
156
+ case 'marginBottom':
157
+ case 'marginLeft':
158
+ case 'marginRight':
159
+ case 'paddingTop':
160
+ case 'paddingBottom':
161
+ case 'paddingLeft':
162
+ case 'paddingRight':
163
+ case 'flexBasis':
164
+ case 'rowGap':
165
+ case 'columnGap':
166
+ case 'gap':
167
+ case 'margin':
168
+ case 'padding':
169
+ case 'fontSize':
170
+ case 'letterSpacing':
171
+ return `${value}px`;
172
+
173
+ // without unit
174
+ case 'borderStyle':
175
+ case 'pointerEvents':
176
+ case 'backfaceVisibility':
177
+ case 'alignContent':
178
+ case 'alignItems':
179
+ case 'alignSelf':
180
+ case 'flexDirection':
181
+ case 'flexWrap':
182
+ case 'flex':
183
+ case 'aspectRatio':
184
+ case 'opacity':
185
+ case 'direction':
186
+ case 'zIndex':
187
+ case 'justifyContent':
188
+ case 'overflow':
189
+ case 'display':
190
+ case 'position':
191
+ case 'flexGrow':
192
+ case 'flexShrink':
193
+ case 'fontFamily':
194
+ case 'fontStyle':
195
+ case 'textDecorationLine':
196
+ case 'textAlign':
197
+ case 'textDecorationStyle':
198
+ case 'lineHeight':
199
+ case 'textTransform':
200
+ case 'fontVariant':
201
+ case 'verticalAlign':
202
+ case 'objectFit':
203
+ return value;
204
+
205
+ // to be transformed for now
206
+ // not supported
207
+ case 'marginHorizontal':
208
+ case 'paddingHorizontal':
209
+ case 'marginVertical':
210
+ case 'paddingVertical':
211
+ case 'shadowColor':
212
+ case 'shadowOffset':
213
+ case 'shadowOpacity':
214
+ case 'shadowRadius':
215
+ case 'transform':
216
+ case 'transformMatrix':
217
+ case 'fontWeight':
218
+ case 'textShadowOffset':
219
+ case 'textShadowRadius':
220
+ case 'textShadowColor':
221
+ return '';
222
+
223
+ // unsupported
224
+ case 'borderStartColor':
225
+ case 'borderEndColor':
226
+ case 'borderEndWidth':
227
+ case 'borderBottomEndRadius':
228
+ case 'borderBottomStartRadius':
229
+ case 'borderCurve':
230
+ case 'elevation':
231
+ case 'borderTopEndRadius':
232
+ case 'borderTopStartRadius':
233
+ case 'borderStartWidth':
234
+ case 'start':
235
+ case 'end':
236
+ case 'margin-end':
237
+ case 'margin-start':
238
+ case 'padding-end':
239
+ case 'padding-start':
240
+ case 'writingDirection':
241
+ case 'textAlignVertical':
242
+ case 'includeFontPadding':
243
+ case 'resizeMode':
244
+ case 'overlayColor':
245
+ case 'tintColor':
246
+ default:
247
+ return '';
248
+ }
249
+ };
250
+ //# sourceMappingURL=cssMediaQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_normalizer","require","_mqParser","_generateId","createMediaQueryForStyles","styles","runtime","withMediaQueries","Object","entries","filter","_ref","value","reduce","acc","_ref2","prop","objectKeys","keys","mediaQueries","key","isUnistylesMq","breakpoints","length","className","generateReactNativeWebId","breakpointsStyles","getBreakpointsStyles","mediaQueriesStyles","getMediaQueriesFromMQ","trim","exports","getMaxWidthMediaQuery","width","to","Infinity","getMaxHeightMediaQuery","height","_ref3","result","parseMq","isValidMq","from","normalizePropName","normalizeWebValue","_ref4","breakpoint","undefined","replace","toLowerCase","normalizeColor"],"sourceRoot":"../../../src","sources":["utils/cssMediaQuery.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAGO,MAAMG,yBAAyB,GAAGA,CAACC,MAAe,EAAEC,OAAyB,KAAc;EAC9F,MAAMC,gBAAgB,GAAGC,MAAM,CAC1BC,OAAO,CAACJ,MAAM,CAAC,CACfK,MAAM,CAACC,IAAA;IAAA,IAAC,GAAGC,KAAK,CAAC,GAAAD,IAAA;IAAA,OAAK,OAAOC,KAA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;IACjB,KAAK,cAAc;IACnB,KAAK,WAAW;IAChB;MACI,OAAO,EAAE;EACjB;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.generateReactNativeWebId = void 0;
7
+ var _hash = require("./hash32");
8
+ // eslint-disable-next-line camelcase
9
+
10
+ const generateReactNativeWebId = (key, value) => {
11
+ const hashedString = (0, _hash.murmurhash2_32_gc)(key + value, 1).toString(36);
12
+ return process.env.NODE_ENV !== 'production' ? `r-${key}-${hashedString}` : `r-${hashedString}`;
13
+ };
14
+ exports.generateReactNativeWebId = generateReactNativeWebId;
15
+ //# sourceMappingURL=generateId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_hash","require","generateReactNativeWebId","key","value","hashedString","murmurhash2_32_gc","toString","process","env","NODE_ENV","exports"],"sourceRoot":"../../../src","sources":["utils/generateId.ts"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA;;AAGO,MAAMC,wBAAwB,GAAGA,CAACC,GAAW,EAAEC,KAAa,KAAa;EAC5E,MAAMC,YAAY,GAAG,IAAAC,uBAAiB,EAACH,GAAG,GAAGC,KAAK,EAAE,CAAC,CAAC,CAACG,QAAQ,CAAC,EAAE,CAAC;EAEnE,OAAOC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GACrC,KAAIP,GAAI,IAAGE,YAAa,EAAC,GACzB,KAAIA,YAAa,EAAC;AAC7B,CAAC;AAAAM,OAAA,CAAAT,wBAAA,GAAAA,wBAAA"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.murmurhash2_32_gc = void 0;
7
+ /*
8
+ Authors: Gary Court and Austin Appleby
9
+ Compatible with React Native Web
10
+ https://github.com/necolas/react-native-web/blob/master/packages/react-native-web/src/exports/StyleSheet/compiler/hash.js#L65
11
+ */
12
+ const murmurhash2_32_gc = (str, seed) => {
13
+ let l = str.length;
14
+ let h = seed ^ l;
15
+ let i = 0;
16
+ let k;
17
+ while (l >= 4) {
18
+ k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
19
+ k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
20
+ k ^= k >>> 24;
21
+ k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
22
+ h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;
23
+ l -= 4;
24
+ ++i;
25
+ }
26
+ switch (l) {
27
+ // @ts-ignore
28
+ case 3:
29
+ h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
30
+ // @ts-ignore
31
+ case 2:
32
+ h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
33
+ case 1:
34
+ h ^= str.charCodeAt(i) & 0xff;
35
+ h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
36
+ }
37
+ h ^= h >>> 13;
38
+ h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
39
+ h ^= h >>> 15;
40
+ return h >>> 0;
41
+ };
42
+ exports.murmurhash2_32_gc = murmurhash2_32_gc;
43
+ //# sourceMappingURL=hash32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["murmurhash2_32_gc","str","seed","l","length","h","i","k","charCodeAt","exports"],"sourceRoot":"../../../src","sources":["utils/hash32.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,iBAAiB,GAAGA,CAACC,GAAW,EAAEC,IAAY,KAAK;EAC5D,IAAIC,CAAC,GAAGF,GAAG,CAACG,MAAM;EAClB,IAAIC,CA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,UAAU,CAACF,CAAC,CAAC,GAAG,IAAI;MAC7BD,CAAC,GACH,CAACA,CAAC,GAAG,MAAM,IAAI,UAAU,IACxB,CAAE,CAACA,CAAC,KAAK,EAAE,IAAI,UAAU,GAAI,MAAM,KAAK,EAAE,CAAC;EAClD;EAEAA,CAAC,IAAIA,CAAC,KAAK,EAAE;EACbA,CAAC,GAAG,CAACA,CAAC,GAAG,MAAM,IAAI,UAAU,IAAI,CAAE,CAACA,CAAC,KAAK,EAAE,IAAI,UAAU,GAAI,MAAM,KAAK,EAAE,CAAC;EAC5EA,CAAC,IAAIA,CAAC,KAAK,EAAE;EAEb,OAAOA,CAAC,KAAK,CAAC;AAClB,CAAC;AAAAI,OAAA,CAAAT,iBAAA,GAAAA,iBAAA"}
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "generateReactNativeWebId", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _generateId.generateReactNativeWebId;
10
+ }
11
+ });
6
12
  Object.defineProperty(exports, "getKeyForUnistylesMediaQuery", {
7
13
  enumerable: true,
8
14
  get: function () {
@@ -15,6 +21,12 @@ Object.defineProperty(exports, "getValueForBreakpoint", {
15
21
  return _breakpoints.getValueForBreakpoint;
16
22
  }
17
23
  });
24
+ Object.defineProperty(exports, "isUnistylesMq", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _mqParser.isUnistylesMq;
28
+ }
29
+ });
18
30
  Object.defineProperty(exports, "isValidMq", {
19
31
  enumerable: true,
20
32
  get: function () {
@@ -62,4 +74,5 @@ var _mqParser = require("./mqParser");
62
74
  var _breakpoints = require("./breakpoints");
63
75
  var _styles = require("./styles");
64
76
  var _withPlugins = require("./withPlugins");
77
+ var _generateId = require("./generateId");
65
78
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_mq","require","_mqParser","_breakpoints","_styles","_withPlugins"],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA"}
1
+ {"version":3,"names":["_mq","require","_mqParser","_breakpoints","_styles","_withPlugins","_generateId"],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.parseMq = exports.isWithinTheWidthAndHeight = exports.isValidMq = exports.getKeyForUnistylesMediaQuery = void 0;
6
+ exports.parseMq = exports.isWithinTheWidthAndHeight = exports.isValidMq = exports.isUnistylesMq = exports.getKeyForUnistylesMediaQuery = void 0;
7
7
  const IS_UNISTYLES_REGEX = /:([hw])\[(\d+)(?:,\s*(\d+|Infinity))?]/;
8
8
  const UNISTYLES_WIDTH_REGEX = /:(w)\[(\d+)(?:,\s*(\d+|Infinity))?]/;
9
9
  const UNISTYLES_HEIGHT_REGEX = /:(h)\[(\d+)(?:,\s*(\d+|Infinity))?]/;
@@ -23,6 +23,7 @@ const parseMq = mq => {
23
23
  };
24
24
  exports.parseMq = parseMq;
25
25
  const isUnistylesMq = mq => IS_UNISTYLES_REGEX.test(mq);
26
+ exports.isUnistylesMq = isUnistylesMq;
26
27
  const isValidMq = parsedMq => {
27
28
  const {
28
29
  width,
@@ -1 +1 @@
1
- {"version":3,"names":["IS_UNISTYLES_REGEX","UNISTYLES_WIDTH_REGEX","UNISTYLES_HEIGHT_REGEX","parseMq","mq","width","fromW","toW","exec","height","fromH","toH","from","Number","to","undefined","exports","isUnistylesMq","test","isValidMq","parsedMq","isWithinTheWidthAndHeight","screenSize","isWithinTheWidth","isWithinTheHeight","screenWidth","screenHeight","getKeyForUnistylesMediaQuery","mediaQueries","find","_ref","key","at"],"sourceRoot":"../../../src","sources":["utils/mqParser.ts"],"mappings":";;;;;;AAEA,MAAMA,kBAAkB,GAAG,wCAAwC;AACnE,MAAMC,qBAAqB,GAAG,qCAAqC;AACnE,MAAMC,sBAAsB,GAAG,qCAAqC;AAY7D,MAAMC,OAAO,GAAIC,EAAU,IAAwB;EACtD,MAAM,GAAGC,KAAK,EAAEC,KAAK,EAAEC,GAAG,CAAC,GAAGN,qBAAqB,CAACO,IAAI,CAACJ,EAAE,CAAC,IAAI,EAAE;EAClE,MAAM,GAAGK,MAAM,EAAEC,KAAK,EAAEC,GAAG,CAAC,GAAGT,sBAAsB,CAACM,IAAI,CAACJ,EAAE,CAAC,IAAI,EAAE;EAEpE,OAAO;IACHC,KAAK,EAAEA,KAAK,GAAG;MACXO,IAAI,EAAEC,MAAM,CAACP,KAAK,CAAC;MACnBQ,EAAE,EAAED,MAAM,CAACN,GAAG;IAClB,CAAC,GAAGQ,SAAS;IACbN,MAAM,EAAEA,MAAM,GAAG;MACbG,IAAI,EAAEC,MAAM,CAACH,KAAK,CAAC;MACnBI,EAAE,EAAED,MAAM,CAACF,GAAG;IAClB,CAAC,GAAGI;EACR,CAAC;AACL,CAAC;AAAAC,OAAA,CAAAb,OAAA,GAAAA,OAAA;AAED,MAAMc,aAAa,GAAIb,EAAU,IAAKJ,kBAAkB,CAACkB,IAAI,CAACd,EAAE,CAAC;AAE1D,MAAMe,SAAS,GAAIC,QAA2B,IAAK;EACtD,MAAM;IAAEf,KAAK;IA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YAAoB,KAAc;EAC9F,MAAM;IAAEd,IAAI;IAAEE;EAAG,CAAC,GAAGL,MAA2B;EAEhD,OAAOiB,YAAY,IAAId,IAAI,IAAIc,YAAY,IAAIZ,EAAE;AACrD,CAAC;AAEM,MAAMa,4BAA4B,GAAGA,CAACC,YAAsC,EAAEN,UAAsB,KAAuB;EAC9H,MAAMlB,EAAE,GAAGwB,YAAY,CAACC,IAAI,CAACC,IAAA,IAAW;IAAA,IAAV,CAACC,GAAG,CAAC,GAAAD,IAAA;IAC/B,IAAI,CAACb,aAAa,CAACc,GAAa,CAAC,EAAE;MAC/B,OAAO,KAAK;IAChB;IAEA,MAAMX,QAAQ,GAAGjB,OAAO,CAAC4B,GAAa,CAAC;IAEvC,IAAI,CAACZ,SAAS,CAACC,QAAQ,CAAC,EAAE;MACtB,OAAO,KAAK;IAChB;IAEA,OAAOC,yBAAyB,CAACD,QAAQ,EAAEE,UAAU,CAAC;EAC1D,CAAC,CAAC;EAEF,OAAOlB,EAAE,EAAE4B,EAAE,CAAC,CAAC,CAAC;AACpB,CAAC;AAAAhB,OAAA,CAAAW,4BAAA,GAAAA,4BAAA"}
1
+ {"version":3,"names":["IS_UNISTYLES_REGEX","UNISTYLES_WIDTH_REGEX","UNISTYLES_HEIGHT_REGEX","parseMq","mq","width","fromW","toW","exec","height","fromH","toH","from","Number","to","undefined","exports","isUnistylesMq","test","isValidMq","parsedMq","isWithinTheWidthAndHeight","screenSize","isWithinTheWidth","isWithinTheHeight","screenWidth","screenHeight","getKeyForUnistylesMediaQuery","mediaQueries","find","_ref","key","at"],"sourceRoot":"../../../src","sources":["utils/mqParser.ts"],"mappings":";;;;;;AAEA,MAAMA,kBAAkB,GAAG,wCAAwC;AACnE,MAAMC,qBAAqB,GAAG,qCAAqC;AACnE,MAAMC,sBAAsB,GAAG,qCAAqC;AAY7D,MAAMC,OAAO,GAAIC,EAAU,IAAwB;EACtD,MAAM,GAAGC,KAAK,EAAEC,KAAK,EAAEC,GAAG,CAAC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ChB;IAEA,OAAOC,yBAAyB,CAACD,QAAQ,EAAEE,UAAU,CAAC;EAC1D,CAAC,CAAC;EAEF,OAAOlB,EAAE,EAAE4B,EAAE,CAAC,CAAC,CAAC;AACpB,CAAC;AAAAhB,OAAA,CAAAW,4BAAA,GAAAA,4BAAA"}
@@ -20,6 +20,7 @@ const isPlatformColor = value => {
20
20
  exports.isPlatformColor = isPlatformColor;
21
21
  const parseStyle = function (style) {
22
22
  let variant = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
23
+ let parseMediaQueries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
23
24
  return Object.entries(style || {}).reduce((acc, _ref) => {
24
25
  let [key, value] = _ref;
25
26
  // nested objects
@@ -44,10 +45,19 @@ const parseStyle = function (style) {
44
45
  ...acc,
45
46
  ...Object.keys(value).reduce((acc, key) => ({
46
47
  ...acc,
47
- ...parseStyle(value[key][variant[key] || 'default'] ?? {})
48
+ // this will parse the styles of the selected variant (or default if it is undefined), if selected variant has no styles then it will fallback to default styles
49
+ ...parseStyle(value[key][variant[key] || 'default'] ?? value[key].default ?? {})
48
50
  }), {})
49
51
  };
50
52
  }
53
+
54
+ // don't parse media queries and breakpoints
55
+ if (!parseMediaQueries) {
56
+ return {
57
+ ...acc,
58
+ [key]: value
59
+ };
60
+ }
51
61
  return {
52
62
  ...acc,
53
63
  [key]: (0, _breakpoints.getValueForBreakpoint)(value)
@@ -1 +1 @@
1
- {"version":3,"names":["_breakpoints","require","_common","_withPlugins","proxifyFunction","key","fn","variant","Proxy","apply","target","thisArg","argumentsList","withPlugins","parseStyle","exports","isPlatformColor","value","isIOS","semantic","isAndroid","resource_paths","style","arguments","length","undefined","Object","entries","reduce","acc","_ref","Array","isArray","map","keys","getValueForBreakpoint"],"sourceRoot":"../../../src","sources":["utils/styles.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF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EAAE;MAC7CY,GAAG,CAACxB,GAAG,CAAC,GAAGY,KAAK,CAACgB,GAAG,CAAChB,KAAK,IAAIH,UAAU,CAACG,KAAK,EAAEV,OAAO,CAAC,CAAC;MAEzD,OAAOsB,GAAG;IACd;;IAEA;IACA,IAAI,OAAOZ,KAAK,KAAK,QAAQ,IAAID,eAAe,CAACC,KAAK,CAAC,EAAE;MACrDY,GAAG,CAACxB,GAAG,CAAY,GAAGY,KAAK;MAE3B,OAAOY,GAAG;IACd;IAEA,IAAIxB,GAAG,KAAK,UAAU,EAAE;MACpB,OAAO;QACH,GAAGwB,GAAG;QACN,GAAIH,MAAM,CACLQ,IAAI,CAACjB,KAAK,CAAC,CACXW,MAAM,CAAC,CAACC,GAAG,EAAExB,GAAG,MAAM;UACnB,GAAGwB,GAAG;UACN,GAAGf,UAAU,CAAEG,KAAK,CAAEZ,GAAG,CAAC,CAACE,OAAO,CAACF,GAAG,CAAyB,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;QACvF,CAAC,CAAC,EAAE,CAAC,CAAC;MACd,CAAC;IACL;IAEA,OAAO;MACH,GAAGwB,GAAG;MACN,CAACxB,GAAG,GAAG,IAAA8B,kCAAqB,EAAClB,KAAgC;IACjE,CAAC;EACL,CAAC,EAAE,CAAC,CAAM,CAAC;AAAA;AAAAF,OAAA,CAAAD,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"names":["_breakpoints","require","_common","_withPlugins","proxifyFunction","key","fn","variant","Proxy","apply","target","thisArg","argumentsList","withPlugins","parseStyle","exports","isPlatformColor","value","isIOS","semantic","isAndroid","resource_paths","style","arguments","length","undefined","parseMediaQueries","Object","entries","reduce","acc","_ref","Array","isArray","map","keys","default","getValueForBreakpoint"],"sourceRoot":"../../../src","sources":["utils/styles.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEO,MAAMG,eAAe,GAA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IAAIzB,GAAG,KAAK,WAAW,IAAI2B,KAAK,CAACC,OAAO,CAAChB,KAAK,CAAC,EAAE;MAC7Ca,GAAG,CAACzB,GAAG,CAAC,GAAGY,KAAK,CAACiB,GAAG,CAACjB,KAAK,IAAIH,UAAU,CAACG,KAAK,EAAEV,OAAO,CAAC,CAAC;MAEzD,OAAOuB,GAAG;IACd;;IAEA;IACA,IAAI,OAAOb,KAAK,KAAK,QAAQ,IAAID,eAAe,CAACC,KAAK,CAAC,EAAE;MACrDa,GAAG,CAACzB,GAAG,CAAY,GAAGY,KAAK;MAE3B,OAAOa,GAAG;IACd;IAEA,IAAIzB,GAAG,KAAK,UAAU,EAAE;MACpB,OAAO;QACH,GAAGyB,GAAG;QACN,GAAIH,MAAM,CACLQ,IAAI,CAAClB,KAAK,CAAC,CACXY,MAAM,CAAC,CAACC,GAAG,EAAEzB,GAAG,MAAM;UACnB,GAAGyB,GAAG;UACN;UACA,GAAGhB,UAAU,CAAEG,KAAK,CAAEZ,GAAG,CAAC,CAACE,OAAO,CAACF,GAAG,CAAyB,IAAI,SAAS,CAAC,IAAKY,KAAK,CAAEZ,GAAG,CAAC,CAAC+B,OAAO,IAAI,CAAC,CAAC;QAC/G,CAAC,CAAC,EAAE,CAAC,CAAC;MACd,CAAC;IACL;;IAEA;IACA,IAAI,CAACV,iBAAiB,EAAE;MACpB,OAAO;QACH,GAAGI,GAAG;QACN,CAACzB,GAAG,GAAGY;MACX,CAAC;IACL;IAEA,OAAO;MACH,GAAGa,GAAG;MACN,CAACzB,GAAG,GAAG,IAAAgC,kCAAqB,EAACpB,KAAgC;IACjE,CAAC;EACL,CAAC,EAAE,CAAC,CAAM,CAAC;AAAA;AAAAF,OAAA,CAAAD,UAAA,GAAAA,UAAA"}
@@ -1,5 +1,5 @@
1
1
  import { isWeb, UnistylesError } from '../common';
2
- import { normalizeWebStylesPlugin } from '../plugins';
2
+ import { cssMediaQueriesPlugin, normalizeWebStylesPlugin } from '../plugins';
3
3
  export class UnistyleRegistry {
4
4
  config = {};
5
5
  plugins = isWeb ? [normalizeWebStylesPlugin] : [];
@@ -34,12 +34,16 @@ export class UnistyleRegistry {
34
34
  if (config.adaptiveThemes) {
35
35
  this.unistylesBridge.useAdaptiveThemes(config.adaptiveThemes);
36
36
  }
37
- if (config.experimentalPlugins) {
38
- config.experimentalPlugins.forEach(plugin => this.addPlugin(plugin, false));
37
+ if (config.plugins) {
38
+ config.plugins.forEach(plugin => this.addPlugin(plugin, false));
39
39
  }
40
40
  if (config.initialTheme) {
41
41
  this.unistylesBridge.useTheme(config.initialTheme);
42
42
  }
43
+ if (config.experimentalCSSMediaQueries) {
44
+ this.plugins = [cssMediaQueriesPlugin].concat(this.plugins);
45
+ this.unistylesBridge.addPlugin(cssMediaQueriesPlugin.name, false);
46
+ }
43
47
  return {
44
48
  addBreakpoints: this.addBreakpoints,
45
49
  addThemes: this.addThemes
@@ -1 +1 @@
1
- {"version":3,"names":["isWeb","UnistylesError","normalizeWebStylesPlugin","UnistyleRegistry","config","plugins","themeNames","themes","breakpoints","sortedBreakpointPairs","constructor","unistylesBridge","addThemes","keys","Object","addBreakpoints","addConfig","useBreakpoints","adaptiveThemes","useAdaptiveThemes","experimentalPlugins","forEach","plugin","addPlugin","initialTheme","useTheme","getTheme","forName","length","hasTheme","themeName","Error","ThemeNotFound","ThemeNotSelected","_this","notify","arguments","undefined","name","startsWith","InvalidPluginName","some","_ref","DuplicatePluginName","concat","removePlugin","CantRemoveInternalPlugin","filter","_ref2"],"sourceRoot":"../../../src","sources":["core/UnistyleRegistry.ts"],"mappings":"AAEA,SAASA,KAAK,EAAEC,cAAc,QAAQ,WAAW;AACjD,SAASC,wBAAwB,QAAQ,YAAY;AAErD,OAAO,MAAMC,gBAAgB,CAAC;EACnBC,MAAM,GAAoB,CAAC,CAAC;EAC5BC,OAAO,GAA2BL,KAAK,GACxC,CAACE,wBAAwB,CAAC,GAC1B,EAAE;EACDI,UAAU,GAAiC,EAAE;EAC7CC,MAAM,G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CAACD,MAAM,CAACgB,IAAI,EAAEH,MAAM,CAAC;IACvD,CAAC;EAAA;EAEMU,YAAY,GAAIvB,MAAuB,IAAK;IAC/C,IAAIA,MAAM,CAACgB,IAAI,CAACC,UAAU,CAAC,aAAa,CAAC,EAAE;MACvC,MAAM,IAAIR,KAAK,CAAC9B,cAAc,CAAC6C,wBAAwB,CAAC;IAC5D;IAEA,IAAI,CAACzC,OAAO,GAAG,IAAI,CAACA,OAAO,CAAC0C,MAAM,CAACC,KAAA;MAAA,IAAC;QAAEV;MAAK,CAAC,GAAAU,KAAA;MAAA,OAAKV,IAAI,KAAKhB,MAAM,CAACgB,IAAI;IAAA,EAAC;IACtE,IAAI,CAAC3B,eAAe,CAACkC,YAAY,CAACvB,MAAM,CAACgB,IAAI,CAAC;EAClD,CAAC;EAEMT,QAAQ,GAAIS,IAA2B,IAAKA,IAAI,IAAI,IAAI,CAAC/B,MAAM;AAC1E"}
1
+ {"version":3,"names":["isWeb","UnistylesError","cssMediaQueriesPlugin","normalizeWebStylesPlugin","UnistyleRegistry","config","plugins","themeNames","themes","breakpoints","sortedBreakpointPairs","constructor","unistylesBridge","addThemes","keys","Object","addBreakpoints","addConfig","useBreakpoints","adaptiveThemes","useAdaptiveThemes","forEach","plugin","addPlugin","initialTheme","useTheme","experimentalCSSMediaQueries","concat","name","getTheme","forName","length","hasTheme","themeName","Error","ThemeNotFound","ThemeNotSelected","_this","notify","arguments","undefined","startsWith","InvalidPluginName","some","_ref","DuplicatePluginName","removePlugin","CantRemoveInternalPlugin","filter","_ref2"],"sourceRoot":"../../../src","sources":["core/UnistyleRegistry.ts"],"mappings":"AAEA,SAASA,KAAK,EAAEC,cAAc,QAAQ,WAAW;AACjD,SAASC,qBAAqB,EAAEC,wBAAwB,QAAQ,YAAY;AAE5E,OAAO,MAAMC,gBAAgB,CAAC;EACnBC,MAAM,GAAoB,CAAC,CAAC;EAC5BC,OAAO,GAA2BN,KAAK,GACxC,CAACG,wBAAwB,CAAC,GAC1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OAAKhB,IAAI,KAAKN,MAAM,CAACM,IAAI;MAAA,EAAC,EAAE;QACvD,MAAM,IAAIM,KAAK,CAACjC,cAAc,CAAC4C,mBAAmB,CAAC;MACvD;MAEAR,KAAI,CAAC/B,OAAO,GAAG,CAACgB,MAAM,CAAC,CAACK,MAAM,CAACU,KAAI,CAAC/B,OAAO,CAAC;MAC5C+B,KAAI,CAACzB,eAAe,CAACW,SAAS,CAACD,MAAM,CAACM,IAAI,EAAEU,MAAM,CAAC;IACvD,CAAC;EAAA;EAEMQ,YAAY,GAAIxB,MAAuB,IAAK;IAC/C,IAAIA,MAAM,CAACM,IAAI,CAACa,UAAU,CAAC,aAAa,CAAC,EAAE;MACvC,MAAM,IAAIP,KAAK,CAACjC,cAAc,CAAC8C,wBAAwB,CAAC;IAC5D;IAEA,IAAI,CAACzC,OAAO,GAAG,IAAI,CAACA,OAAO,CAAC0C,MAAM,CAACC,KAAA;MAAA,IAAC;QAAErB;MAAK,CAAC,GAAAqB,KAAA;MAAA,OAAKrB,IAAI,KAAKN,MAAM,CAACM,IAAI;IAAA,EAAC;IACtE,IAAI,CAAChB,eAAe,CAACkC,YAAY,CAACxB,MAAM,CAACM,IAAI,CAAC;EAClD,CAAC;EAEMI,QAAQ,GAAIJ,IAA2B,IAAKA,IAAI,IAAI,IAAI,CAACpB,MAAM;AAC1E"}
@@ -10,7 +10,8 @@ class Unistyles {
10
10
  }
11
11
 
12
12
  // @ts-ignore
13
- this._bridge = (isWeb ? window : global).__UNISTYLES__;
13
+ // eslint-disable-next-line no-undef
14
+ this._bridge = (isWeb ? globalThis : global).__UNISTYLES__;
14
15
  this._registry = new UnistyleRegistry(this._bridge);
15
16
  this._runtime = new UnistylesRuntime(this._bridge, this._registry);
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"names":["UnistylesModule","UnistylesRuntime","UnistyleRegistry","UnistylesError","isWeb","Unistyles","constructor","isInstalled","install","Error","RuntimeUnavailable","_bridge","window","global","__UNISTYLES__","_registry","_runtime","registry","runtime","unistyles"],"sourceRoot":"../../../src","sources":["core/Unistyles.ts"],"mappings":"AAAA,SAASA,eAAe,QAAQ,mBAAmB;AACnD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,SAASC,cAAc,EAAEC,KAAK,QAAQ,WAAW;AAEjD,MAAMC,SAAS,CAAC;EAKZC,WAAWA,CAAA,EAAG;IACV,MAAMC,WAAW,GAAGP,eAAe,EAAEQ,OAAO,CAAC,CAAC,IAAI,KAAK;IAEvD,IAAI,CAACD,WAAW,EAAE;MACd,MAAM,IAAIE,KAAK,CAACN,cAAc,CAACO,kBAAkB,CAAC;IACtD;;IAEA;IACA,IAAI,CAACC,OAAO,GAAG,CAACP,KAAK,GAAGQ,MAAM,GAAGC,MAAM,EAAEC,aAAgC;IACzE,IAAI,CAACC,SAAS,GAAG,IAAIb,gBAAgB,CAAC,IAAI,CAACS,OAAO,CAAC;IACnD,IAAI,CAACK,QAAQ,GAAG,IAAIf,gBAAgB,CAAC,IAAI,CAACU,OAAO,EAAE,IAAI,CAACI,SAAS,CAAC;EACtE;EAEA,IAAWE,QAAQA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACF,SAAS;EACzB;EAEA,IAAWG,OAAOA,CAAA,EAAG;IACjB,OAAO,IAAI,CAACF,QAAQ;EACxB;AACJ;AAEA,OAAO,MAAMG,SAAS,GAAG,IAAId,SAAS,CAAC,CAAC"}
1
+ {"version":3,"names":["UnistylesModule","UnistylesRuntime","UnistyleRegistry","UnistylesError","isWeb","Unistyles","constructor","isInstalled","install","Error","RuntimeUnavailable","_bridge","globalThis","global","__UNISTYLES__","_registry","_runtime","registry","runtime","unistyles"],"sourceRoot":"../../../src","sources":["core/Unistyles.ts"],"mappings":"AAAA,SAASA,eAAe,QAAQ,mBAAmB;AACnD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,SAASC,cAAc,EAAEC,KAAK,QAAQ,WAAW;AAEjD,MAAMC,SAAS,CAAC;EAKZC,WAAWA,CAAA,EAAG;IACV,MAAMC,WAAW,GAAGP,eAAe,EAAEQ,OAAO,CAAC,CAAC,IAAI,KAAK;IAEvD,IAAI,CAACD,WAAW,EAAE;MACd,MAAM,IAAIE,KAAK,CAACN,cAAc,CAACO,kBAAkB,CAAC;IACtD;;IAEA;IACA;IACA,IAAI,CAACC,OAAO,GAAG,CAACP,KAAK,GAAGQ,UAAU,GAAGC,MAAM,EAAEC,aAAgC;IAC7E,IAAI,CAACC,SAAS,GAAG,IAAIb,gBAAgB,CAAC,IAAI,CAACS,OAAO,CAAC;IACnD,IAAI,CAACK,QAAQ,GAAG,IAAIf,gBAAgB,CAAC,IAAI,CAACU,OAAO,EAAE,IAAI,CAACI,SAAS,CAAC;EACtE;EAEA,IAAWE,QAAQA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACF,SAAS;EACzB;EAEA,IAAWG,OAAOA,CAAA,EAAG;IACjB,OAAO,IAAI,CAACF,QAAQ;EACxB;AACJ;AAEA,OAAO,MAAMG,SAAS,GAAG,IAAId,SAAS,CAAC,CAAC"}
@@ -1,12 +1,14 @@
1
1
  import { NativeEventEmitter, NativeModules } from 'react-native';
2
2
  import { normalizeWebStylesPlugin } from '../plugins';
3
+ import { isServer } from '../common';
3
4
  export class UnistylesBridgeWeb {
4
5
  #timerRef = undefined;
5
6
  #hasAdaptiveThemes = false;
6
7
  #supportsAutomaticColorScheme = false;
7
- #screenWidth = window.innerWidth;
8
- #screenHeight = window.innerHeight;
8
+ #screenWidth = isServer ? undefined : window.innerWidth;
9
+ #screenHeight = isServer ? undefined : window.innerHeight;
9
10
  #themes = [];
11
+ #breakpoints = {};
10
12
  #colorScheme = this.getPreferredColorScheme();
11
13
  #themeName = '';
12
14
  #enabledPlugins = [normalizeWebStylesPlugin.name];
@@ -14,11 +16,16 @@ export class UnistylesBridgeWeb {
14
16
  #sortedBreakpointPairs = [];
15
17
  #breakpoint = '';
16
18
  constructor() {
17
- this.setupListeners();
19
+ if (!isServer) {
20
+ this.setupListeners();
21
+ this.#screenWidth = window.innerWidth;
22
+ this.#screenHeight = window.innerHeight;
23
+ }
18
24
  }
19
25
  install() {
20
26
  // @ts-ignore
21
- window.__UNISTYLES__ = new Proxy({}, {
27
+ // eslint-disable-next-line no-undef
28
+ globalThis.__UNISTYLES__ = new Proxy({}, {
22
29
  get: (_target, prop) => {
23
30
  switch (prop) {
24
31
  case 'themeName':
@@ -29,6 +36,8 @@ export class UnistylesBridgeWeb {
29
36
  return this.#screenHeight;
30
37
  case 'breakpoint':
31
38
  return this.#breakpoint || undefined;
39
+ case 'breakpoints':
40
+ return this.#breakpoints;
32
41
  case 'hasAdaptiveThemes':
33
42
  return this.#hasAdaptiveThemes;
34
43
  case 'sortedBreakpointPairs':
@@ -77,12 +86,15 @@ export class UnistylesBridgeWeb {
77
86
  this.emitThemeChange();
78
87
  }
79
88
  useBreakpoints(breakpoints) {
89
+ this.#breakpoints = breakpoints;
80
90
  this.#sortedBreakpointPairs = Object.entries(breakpoints).sort((_ref, _ref2) => {
81
91
  let [, a] = _ref;
82
92
  let [, b] = _ref2;
83
93
  return (a ?? 0) - (b ?? 0);
84
94
  });
85
- this.#breakpoint = this.getBreakpointFromScreenWidth(this.#screenWidth);
95
+ if (!isServer) {
96
+ this.#breakpoint = this.getBreakpointFromScreenWidth(this.#screenWidth);
97
+ }
86
98
  }
87
99
  useAdaptiveThemes(enable) {
88
100
  this.#hasAdaptiveThemes = enable;
@@ -144,7 +156,7 @@ export class UnistylesBridgeWeb {
144
156
  return breakpoint?.at(0);
145
157
  }
146
158
  getPreferredColorScheme() {
147
- if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
159
+ if (!isServer && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
148
160
  return 'dark';
149
161
  }
150
162
  return 'light';
@@ -1 +1 @@
1
- {"version":3,"names":["NativeEventEmitter","NativeModules","normalizeWebStylesPlugin","UnistylesBridgeWeb","timerRef","undefined","hasAdaptiveThemes","supportsAutomaticColorScheme","screenWidth","window","innerWidth","screenHeight","innerHeight","themes","colorScheme","getPreferredColorScheme","themeName","enabledPlugins","name","unistylesEvents","Unistyles","sortedBreakpointPairs","breakpoint","constructor","setupListeners","install","__UNISTYLES__","Proxy","get","_target","prop","getTheme","useTheme","breakpoints","useBreakpoints","enable","useAdaptiveThemes","pluginName","notify","addPlugin","removePlugin","Reflect","set","target","newValue","receiver","includes","emitThemeChange","Object","entries","sort","_ref","_ref2","a","b","getBreakpointFromScreenWidth","concat","emitPluginChange","filter","length","at","addEventListener","clearTimeout","setTimeout","emitLayoutChange","matchMedia","event","matches","width","find","_ref3","index","otherBreakpoints","value","minVal","maxVal","emit","type","payload","orientation","screen","height","UnistylesModule"],"sourceRoot":"../../../src","sources":["core/UnistylesModule.web.ts"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAGhE,SAASC,wBAAwB,QAAQ,YAAY;AAErD,OAAO,MAAMC,kBAAkB,CAAC;EAC5B,CAACC,QAAQ,GAAmCC,SAAS;EACrD,CAACC,iBAAiB,GAAY,KAAK;EACnC,CAACC,4BAA4B,GAAG,KAAK;EACrC,CAACC,WAAW,GAAWC,MAAM,CAACC,UAAU;EACxC,CAACC,YAAY,GAAWF,MAAM,CAACG,WAAW;EAC1C,CAACC,MAAM,GAAiC,EAAE;EAC1C,CAACC,WAAW,GAAoB,IAAI,CAACC,uBAAuB,CAAC,CAAC;EAC9D,CAACC,SAAS,GAA0B,EAAE;EACtC,CAACC,cAAc,GAAkB,CAACf,wBAAwB,CAACgB,IAAI,CAAC;EAChE,CAACC,eAAe,GAAG,IAAInB,kBAAkB,CAACC,aAAa,CAACmB,SAAS,CAAC;EAClE,CAACC,qBAAqB,GAAgD,EAAE;EACxE,CAACC,UAAU,GAA+B,EAAE;EAE5CC,WAAWA,CAAA,EAAG;IACV,IAAI,CAACC,cAAc,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,CAACwD,UAAU,IAAIxD,MAAM,CAACwD,UAAU,CAAC,8BAA8B,CAAC,CAACE,OAAO,EAAE;MAChF,OAAO,MAAM;IACjB;IAEA,OAAO,OAAO;EAClB;EAEQV,gBAAgBA,CAAA,EAAG;IACvB,IAAI,CAAC,CAACtC,eAAe,CAACyD,IAAI,CAAC,qBAAqB,EAAE;MAC9CC,IAAI,EAAE;IACV,CAAC,CAAC;EACN;EAEQ9B,eAAeA,CAAA,EAAG;IACtB,IAAI,CAAC,CAAC5B,eAAe,CAACyD,IAAI,CAAC,qBAAqB,EAAE;MAC9CC,IAAI,EAAE,OAAO;MACbC,OAAO,EAAE;QACL9D,SAAS,EAAE,IAAI,CAAC,CAACA;MACrB;IACJ,CAAC,CAAC;EACN;EAEQgD,gBAAgBA,CAAA,EAAG;IACvB,IAAI,CAAC,CAAC7C,eAAe,CAACyD,IAAI,CAAC,qBAAqB,EAAE;MAC9CC,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE;QACLxD,UAAU,EAAE,IAAI,CAAC,CAACA,UAAU;QAC5ByD,WAAW,EAAE,IAAI,CAAC,CAACvE,WAAW,GAAG,IAAI,CAAC,CAACG,YAAY,GAC7C,WAAW,GACX,UAAU;QAChBqE,MAAM,EAAE;UACJZ,KAAK,EAAE,IAAI,CAAC,CAAC5D,WAAW;UACxByE,MAAM,EAAE,IAAI,CAAC,CAACtE;QAClB;MACJ;IACJ,CAAC,CAAC;EACN;AACJ;AAEA,OAAO,MAAMuE,eAAe,GAAG,IAAI/E,kBAAkB,CAAC,CAAC"}
1
+ {"version":3,"names":["NativeEventEmitter","NativeModules","normalizeWebStylesPlugin","isServer","UnistylesBridgeWeb","timerRef","undefined","hasAdaptiveThemes","supportsAutomaticColorScheme","screenWidth","window","innerWidth","screenHeight","innerHeight","themes","breakpoints","colorScheme","getPreferredColorScheme","themeName","enabledPlugins","name","unistylesEvents","Unistyles","sortedBreakpointPairs","breakpoint","constructor","setupListeners","install","globalThis","__UNISTYLES__","Proxy","get","_target","prop","getTheme","useTheme","useBreakpoints","enable","useAdaptiveThemes","pluginName","notify","addPlugin","removePlugin","Reflect","set","target","newValue","receiver","includes","emitThemeChange","Object","entries","sort","_ref","_ref2","a","b","getBreakpointFromScreenWidth","concat","emitPluginChange","filter","length","at","addEventListener","clearTimeout","setTimeout","emitLayoutChange","matchMedia","event","matches","width","find","_ref3","index","otherBreakpoints","value","minVal","maxVal","emit","type","payload","orientation","screen","height","UnistylesModule"],"sourceRoot":"../../../src","sources":["core/UnistylesModule.web.ts"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAGhE,SAASC,wBAAwB,QAAQ,YAAY;AACrD,SAASC,QAAQ,QAAQ,WAAW;AAEpC,OAAO,MAAMC,kBAAkB,CAAC;EAC5B,CAACC,QAAQ,GAAmCC,SAAS;EACrD,CAACC,iBAAiB,GAAY,KAAK;EACnC,CAACC,4BAA4B,GAAG,KAAK;EACrC,CAACC,WAAW,GAAGN,QAAQ,GAAGG,SAAS,GAAGI,MAAM,CAACC,UAAU;EACvD,CAACC,YAAY,GAAGT,QAAQ,GAAGG,SAAS,GAAGI,MAAM,CAACG,WAAW;EACzD,CAACC,MAAM,GAAiC,EAAE;EAC1C,CAACC,WAAW,GAAyB,CAAC,CAAC;EACvC,CAACC,WAAW,GAAoB,IAAI,CAACC,uBAAuB,CAAC,CAAC;EAC9D,CAACC,SAAS,GAA0B,EAAE;EACtC,CAACC,cAAc,GAAkB,CAACjB,wBAAwB,CAACkB,IAAI,CAAC;EAChE,CAACC,eAAe,GAAG,IAAIrB,kBAAkB,CAACC,aAAa,CAACqB,SAAS,CAAC;EAClE,CAACC,qBAAqB,GAAgD,EAAE;EACxE,CAACC,UAAU,GAA+B,EAAE;EAE5CC,WAAWA,CAAA,EAAG;IACV,IAAI,CAACtB,QAAQ,EAAE;MACX,IAAI,CAACuB,cAAc,CAAC,CAAC;MACrB,IAAI,CAAC,CAACjB,WAAW,GAAGC,MAAM,CA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