react-native-unistyles 2.8.0-rc.1 → 2.8.0-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/ios/platform/Platform_tvOS.mm +16 -9
- package/lib/commonjs/core/UnistylesRuntime.js +10 -3
- package/lib/commonjs/core/UnistylesRuntime.js.map +1 -1
- package/lib/module/core/UnistylesRuntime.js +10 -3
- package/lib/module/core/UnistylesRuntime.js.map +1 -1
- package/lib/typescript/src/core/UnistylesModule.native.d.ts.map +1 -1
- package/lib/typescript/src/core/UnistylesModule.windows.d.ts.map +1 -1
- package/lib/typescript/src/core/UnistylesRuntime.d.ts.map +1 -1
- package/lib/typescript/src/createStyleSheet.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useCSS.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useCSS.native.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useVariants.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -12
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/normalizer/normalizeStyle.d.ts.map +1 -1
- package/lib/typescript/src/types/core.d.ts +2 -2
- package/lib/typescript/src/types/core.d.ts.map +1 -1
- package/lib/typescript/src/useStyles.d.ts +1 -1
- package/lib/typescript/src/useStyles.d.ts.map +1 -1
- package/lib/typescript/src/utils/breakpoints.d.ts.map +1 -1
- package/lib/typescript/src/utils/mqParser.d.ts.map +1 -1
- package/lib/typescript/src/utils/styles.d.ts.map +1 -1
- package/package.json +24 -24
- package/src/core/UnistylesRuntime.ts +13 -3
- package/src/types/core.ts +2 -2
@@ -39,9 +39,9 @@
|
|
39
39
|
|
40
40
|
- (void)makeShared:(void*)runtime {
|
41
41
|
self.unistylesRuntime = runtime;
|
42
|
-
|
42
|
+
|
43
43
|
auto unistylesRuntime = ((UnistylesRuntime*)self.unistylesRuntime);
|
44
|
-
|
44
|
+
|
45
45
|
unistylesRuntime->setScreenDimensionsCallback([self](){
|
46
46
|
return [self getScreenDimensions];
|
47
47
|
});
|
@@ -49,15 +49,19 @@
|
|
49
49
|
unistylesRuntime->setColorSchemeCallback([](){
|
50
50
|
return getColorScheme();
|
51
51
|
});
|
52
|
-
|
52
|
+
|
53
53
|
unistylesRuntime->setContentSizeCategoryCallback([](){
|
54
54
|
return getContentSizeCategory();
|
55
55
|
});
|
56
|
-
|
56
|
+
|
57
57
|
dispatch_async(dispatch_get_main_queue(), ^{
|
58
|
-
|
58
|
+
Screen screen = [self getScreenDimensions];
|
59
|
+
|
60
|
+
unistylesRuntime->screen = Dimensions({screen.width, screen.height});
|
59
61
|
unistylesRuntime->contentSizeCategory = getContentSizeCategory();
|
60
62
|
unistylesRuntime->colorScheme = getColorScheme();
|
63
|
+
unistylesRuntime->pixelRatio = screen.pixelRatio;
|
64
|
+
unistylesRuntime->fontScale = screen.fontScale;
|
61
65
|
});
|
62
66
|
}
|
63
67
|
|
@@ -73,11 +77,14 @@
|
|
73
77
|
}
|
74
78
|
}
|
75
79
|
|
76
|
-
- (
|
80
|
+
- (Screen)getScreenDimensions {
|
77
81
|
UIScreen *screen = [UIScreen mainScreen];
|
78
|
-
|
79
|
-
|
80
|
-
|
82
|
+
int width = (int)screen.bounds.size.width;
|
83
|
+
int height = (int)screen.bounds.size.height;
|
84
|
+
float pixelRatio = screen.scale;
|
85
|
+
float fontScale = getFontScale();
|
86
|
+
|
87
|
+
return Screen({width, height, pixelRatio, fontScale});
|
81
88
|
}
|
82
89
|
|
83
90
|
@end
|
@@ -122,7 +122,10 @@ class UnistylesRuntime {
|
|
122
122
|
return {
|
123
123
|
width: this.unistylesBridge.statusBar.width,
|
124
124
|
height: this.unistylesBridge.statusBar.height,
|
125
|
-
setColor: (color, alpha) =>
|
125
|
+
setColor: (color, alpha) => {
|
126
|
+
const [parsedColor, parsedAlpha] = (0, _utils.parseColor)(color, alpha);
|
127
|
+
this.unistylesBridge.statusBar.setColor(parsedColor, parsedAlpha);
|
128
|
+
},
|
126
129
|
setHidden: hidden => this.unistylesBridge.statusBar.setHidden(hidden)
|
127
130
|
};
|
128
131
|
}
|
@@ -135,7 +138,10 @@ class UnistylesRuntime {
|
|
135
138
|
return {
|
136
139
|
width: this.unistylesBridge.navigationBar.width,
|
137
140
|
height: this.unistylesBridge.navigationBar.height,
|
138
|
-
setColor: (color, alpha) =>
|
141
|
+
setColor: (color, alpha) => {
|
142
|
+
const [parsedColor, parsedAlpha] = (0, _utils.parseColor)(color, alpha);
|
143
|
+
this.unistylesBridge.navigationBar.setColor(parsedColor, parsedAlpha);
|
144
|
+
},
|
139
145
|
setHidden: hidden => this.unistylesBridge.navigationBar.setHidden(hidden)
|
140
146
|
};
|
141
147
|
}
|
@@ -186,7 +192,8 @@ class UnistylesRuntime {
|
|
186
192
|
* @param alpha - Color alpha - default is 1
|
187
193
|
*/
|
188
194
|
setRootViewBackgroundColor = (color, alpha) => {
|
189
|
-
|
195
|
+
const [parsedColor, parsedAlpha] = (0, _utils.parseColor)(color, alpha);
|
196
|
+
this.unistylesBridge.setRootViewBackgroundColor(parsedColor, parsedAlpha);
|
190
197
|
};
|
191
198
|
|
192
199
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_common","require","_utils","UnistylesRuntime","constructor","unistylesBridge","unistylesRegistry","miniRuntime","contentSizeCategory","breakpoint","screen","insets","statusBar","width","height","navigationBar","orientation","pixelRatio","fontScale","colorScheme","hasAdaptiveThemes","themeName","breakpoints","enabledPlugins","screenWidth","screenHeight","setColor","color","alpha","parseColor","setHidden","hidden","ScreenOrientation","Landscape","Portrait","toFixed","setImmersiveMode","isEnabled","setRootViewBackgroundColor","setTheme","name","hasTheme","useTheme","Error","UnistylesError","ThemeNotRegistered","updateTheme","updater","getTheme","setAdaptiveThemes","enable","useAdaptiveThemes","addPlugin","plugin","removePlugin","exports"],"sourceRoot":"../../../src","sources":["core/UnistylesRuntime.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACO,MAAME,gBAAgB,C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J,eAAe,CAACI,UAAU;EAC1C;;EAEA;AACJ;AACA;AACA;EACI,IAAWa,WAAWA,CAAA,EAAG;IACrB,OAAO,IAAI,CAAChB,iBAAiB,CAACgB,WAAW;EAC7C;;EAEA;AACJ;AACA;AACA;EACI,IAAWC,cAAcA,CAAA,EAAG;IACxB,OAAO,IAAI,CAAClB,eAAe,CAACkB,cAAc;EAC9C;;EAEA;AACJ;AACA;AACA;EACI,IAAWb,MAAMA,CAAA,EAAG;IAChB,OAAO;MACHG,KAAK,EAAE,IAAI,CAACR,eAAe,CAACmB,WAAW;MACvCV,MAAM,EAAE,IAAI,CAACT,eAAe,CAACoB;IACjC,CAAC;EACL;;EAEA;AACJ;AACA;AACA;EACI,IAAWd,MAAMA,CAAA,EAAG;IAChB,OAAO,IAAI,CAACN,eAAe,CAACM,MAAM;EACtC;;EAEA;AACJ;AACA;AACA;EACI,IAAWC,SAASA,CAAA,EAAG;IACnB,OAAO;MACHC,KAAK,EAAE,IAAI,CAACR,eAAe,CAACO,SAAS,CAACC,KAAK;MAC3CC,MAAM,EAAE,IAAI,CAACT,eAAe,CAACO,SAAS,CAACE,MAAM;MAC7CY,QAAQ,EAAEA,CAACC,KAAa,EAAEC,KAAc,KAAK,
|
1
|
+
{"version":3,"names":["_common","require","_utils","UnistylesRuntime","constructor","unistylesBridge","unistylesRegistry","miniRuntime","contentSizeCategory","breakpoint","screen","insets","statusBar","width","height","navigationBar","orientation","pixelRatio","fontScale","colorScheme","hasAdaptiveThemes","themeName","breakpoints","enabledPlugins","screenWidth","screenHeight","setColor","color","alpha","parsedColor","parsedAlpha","parseColor","setHidden","hidden","ScreenOrientation","Landscape","Portrait","toFixed","setImmersiveMode","isEnabled","setRootViewBackgroundColor","setTheme","name","hasTheme","useTheme","Error","UnistylesError","ThemeNotRegistered","updateTheme","updater","getTheme","setAdaptiveThemes","enable","useAdaptiveThemes","addPlugin","plugin","removePlugin","exports"],"sourceRoot":"../../../src","sources":["core/UnistylesRuntime.ts"],"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@@ -117,7 +117,10 @@ export class UnistylesRuntime {
|
|
117
117
|
return {
|
118
118
|
width: this.unistylesBridge.statusBar.width,
|
119
119
|
height: this.unistylesBridge.statusBar.height,
|
120
|
-
setColor: (color, alpha) =>
|
120
|
+
setColor: (color, alpha) => {
|
121
|
+
const [parsedColor, parsedAlpha] = parseColor(color, alpha);
|
122
|
+
this.unistylesBridge.statusBar.setColor(parsedColor, parsedAlpha);
|
123
|
+
},
|
121
124
|
setHidden: hidden => this.unistylesBridge.statusBar.setHidden(hidden)
|
122
125
|
};
|
123
126
|
}
|
@@ -130,7 +133,10 @@ export class UnistylesRuntime {
|
|
130
133
|
return {
|
131
134
|
width: this.unistylesBridge.navigationBar.width,
|
132
135
|
height: this.unistylesBridge.navigationBar.height,
|
133
|
-
setColor: (color, alpha) =>
|
136
|
+
setColor: (color, alpha) => {
|
137
|
+
const [parsedColor, parsedAlpha] = parseColor(color, alpha);
|
138
|
+
this.unistylesBridge.navigationBar.setColor(parsedColor, parsedAlpha);
|
139
|
+
},
|
134
140
|
setHidden: hidden => this.unistylesBridge.navigationBar.setHidden(hidden)
|
135
141
|
};
|
136
142
|
}
|
@@ -181,7 +187,8 @@ export class UnistylesRuntime {
|
|
181
187
|
* @param alpha - Color alpha - default is 1
|
182
188
|
*/
|
183
189
|
setRootViewBackgroundColor = (color, alpha) => {
|
184
|
-
|
190
|
+
const [parsedColor, parsedAlpha] = parseColor(color, alpha);
|
191
|
+
this.unistylesBridge.setRootViewBackgroundColor(parsedColor, parsedAlpha);
|
185
192
|
};
|
186
193
|
|
187
194
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["ScreenOrientation","UnistylesError","parseColor","UnistylesRuntime","constructor","unistylesBridge","unistylesRegistry","miniRuntime","contentSizeCategory","breakpoint","screen","insets","statusBar","width","height","navigationBar","orientation","pixelRatio","fontScale","colorScheme","hasAdaptiveThemes","themeName","breakpoints","enabledPlugins","screenWidth","screenHeight","setColor","color","alpha","setHidden","hidden","Landscape","Portrait","toFixed","setImmersiveMode","isEnabled","setRootViewBackgroundColor","setTheme","name","hasTheme","useTheme","Error","ThemeNotRegistered","updateTheme","updater","getTheme","setAdaptiveThemes","enable","useAdaptiveThemes","addPlugin","plugin","removePlugin"],"sourceRoot":"../../../src","sources":["core/UnistylesRuntime.ts"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,cAAc,QAAQ,WAAW;AAI7D,SAASC,UAAU,QAAQ,UAAU;;AAErC;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,CAAC;EAC1BC,WAAWA,CAASC,eAAgC,EAAUC,iBAAmC,EAAE;IAAA,KAA/ED,eAAgC,GAAhCA,eAAgC;IAAA,KAAUC,iBAAmC,GAAnCA,iBAAmC;EAAG;;EAEpG;AACJ;AACA;AACA;EACI,IAAWC,WAAWA,CAAA,EAAG;IACrB,OAAO;MACHC,mBAAmB,EAAE,IAAI,CAACA,mBAAmB;MAC7CC,UAAU,EAAE,IAAI,CAACA,UAAU;MAC3BC,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBC,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBC,SAAS,EAAE;QACPC,KAAK,EAAE,IAAI,CAACD,SAAS,CAACC,KAAK;QAC3BC,MAAM,EAAE,IAAI,CAACF,SAAS,CAACE;MAC3B,CAAC;MACDC,aAAa,EAAE;QACXF,KAAK,EAAE,IAAI,CAACE,aAAa,CAACF,KAAK;QAC/BC,MAAM,EAAE,IAAI,CAACC,aAAa,CAACD;MAC/B,CAAC;MACDE,WAAW,EAAE,IAAI,CAACA,WAAW;MAC7BC,UAAU,EAAE,IAAI,CAACA,UAAU;MAC3BC,SAAS,EAAE,IAAI,CAACA;IACpB,CAAC;EACL;;EAEA;AACJ;AACA;AACA;EACI,IAAWC,WAAWA,CAAA,EAAG;IACrB,OAAO,IAAI,CAACd,eAAe,CAACc,WAAW;EAC3C;;EAEA;AACJ;AACA;AACA;EACI,IAAWC,iBAAiBA,CAAA,EAAG;IAC3B,OAAO,IAAI,CAACf,eAAe,CAACe,iBAAiB;EACjD;;EAEA;AACJ;AACA;AACA;EACI,IAAWC,SAASA,CAAA,EAAG;IACnB,OAAO,IAAI,CAAChB,eAAe,CAACgB,SAAS;EACzC;;EAEA;AACJ;AACA;AACA;EACI,IAAWb,mBAAmBA,CAAA,EAAG;IAC7B,OAAO,IAAI,CAACH,eAAe,CAACG,mBAAmB;EACnD;;EAEA;AACJ;AACA;AACA;EACI,IAAWC,UAAUA,CAAA,EAAG;IACpB,OAAO,IAAI,CAACJ,eAAe,CAACI,UAAU;EAC1C;;EAEA;AACJ;AACA;AACA;EACI,IAAWa,WAAWA,CAAA,EAAG;IACrB,OAAO,IAAI,CAAChB,iBAAiB,CAACgB,WAAW;EAC7C;;EAEA;AACJ;AACA;AACA;EACI,IAAWC,cAAcA,CAAA,EAAG;IACxB,OAAO,IAAI,CAAClB,eAAe,CAACkB,cAAc;EAC9C;;EAEA;AACJ;AACA;AACA;EACI,IAAWb,MAAMA,CAAA,EAAG;IAChB,OAAO;MACHG,KAAK,EAAE,IAAI,CAACR,eAAe,CAACmB,WAAW;MACvCV,MAAM,EAAE,IAAI,CAACT,eAAe,CAACoB;IACjC,CAAC;EACL;;EAEA;AACJ;AACA;AACA;EACI,IAAWd,MAAMA,CAAA,EAAG;IAChB,OAAO,IAAI,CAACN,eAAe,CAACM,MAAM;EACtC;;EAEA;AACJ;AACA;AACA;EACI,IAAWC,SAASA,CAAA,EAAG;IACnB,OAAO;MACHC,KAAK,EAAE,IAAI,CAACR,eAAe,CAACO,SAAS,CAACC,KAAK;MAC3CC,MAAM,EAAE,IAAI,CAACT,eAAe,CAACO,SAAS,CAACE,MAAM;MAC7CY,QAAQ,EAAEA,CAACC,KAAa,EAAEC,KAAc,KAAK,IAAI,CAACvB,eAAe,CAACO,SAAS,CAACc,QAAQ,
|
1
|
+
{"version":3,"names":["ScreenOrientation","UnistylesError","parseColor","UnistylesRuntime","constructor","unistylesBridge","unistylesRegistry","miniRuntime","contentSizeCategory","breakpoint","screen","insets","statusBar","width","height","navigationBar","orientation","pixelRatio","fontScale","colorScheme","hasAdaptiveThemes","themeName","breakpoints","enabledPlugins","screenWidth","screenHeight","setColor","color","alpha","parsedColor","parsedAlpha","setHidden","hidden","Landscape","Portrait","toFixed","setImmersiveMode","isEnabled","setRootViewBackgroundColor","setTheme","name","hasTheme","useTheme","Error","ThemeNotRegistered","updateTheme","updater","getTheme","setAdaptiveThemes","enable","useAdaptiveThemes","addPlugin","plugin","removePlugin"],"sourceRoot":"../../../src","sources":["core/UnistylesRuntime.ts"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,cAAc,QAAQ,WAAW;AAI7D,SAASC,UAAU,QAAQ,UAAU;;AAErC;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,CAAC;EAC1BC,WAAWA,CAASC,eAAgC,EAAUC,iBAAmC,EAAE;IAAA,KAA/ED,eAAgC,GAAhCA,eAAgC;IAAA,KAAUC,iBAAmC,GAAnCA,iBAAmC;EAAG;;EAEpG;AACJ;AACA;AACA;EACI,IAAWC,WAAWA,CAAA,EAAG;IACrB,OAAO;MACHC,mBAAmB,EAAE,IAAI,CAACA,mBAAmB;MAC7CC,UAAU,EAAE,IAAI,CAACA,UAAU;MAC3BC,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBC,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBC,SAAS,EAAE;QACPC,KAAK,EAAE,IAAI,CAACD,SAAS,CAACC,KAAK;QAC3BC,MAAM,EAAE,IAAI,CAACF,SAAS,CAACE;MAC3B,CAAC;MACDC,aAAa,EAAE;QACXF,KAAK,EAAE,IAAI,CAACE,aAAa,CAACF,KAAK;QAC/BC,MAAM,EAAE,IAAI,CAACC,aAAa,CAACD;MAC/B,CAAC;MACDE,WAAW,EAAE,IAAI,CAACA,WAAW;MAC7BC,UAAU,EAAE,IAAI,CAACA,UAAU;MAC3BC,SAAS,EAAE,IAAI,CAACA;IACpB,CAAC;EACL;;EAEA;A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e,CAAC6C,iBAAiB,CAACD,MAAM,CAAC;EAClD,CAAC;;EAED;AACJ;AACA;AACA;EACWE,SAAS,GAAIC,MAAuB,IAAK;IAC5C,IAAI,CAAC9C,iBAAiB,CAAC6C,SAAS,CAACC,MAAM,CAAC;EAC5C,CAAC;;EAED;AACJ;AACA;AACA;EACWC,YAAY,GAAID,MAAuB,IAAK;IAC/C,IAAI,CAAC9C,iBAAiB,CAAC+C,YAAY,CAACD,MAAM,CAAC;EAC/C,CAAC;AACL","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UnistylesModule.native.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.native.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IACzB,OAAO,IAAI,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,eAAe,
|
1
|
+
{"version":3,"file":"UnistylesModule.native.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.native.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IACzB,OAAO,IAAI,OAAO,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,eAAe,EAA+B,qBAAqB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UnistylesModule.windows.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.windows.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IACzB,OAAO,IAAI,OAAO,CAAA;CACrB,CAAA;AAID,eAAO,MAAM,eAAe,
|
1
|
+
{"version":3,"file":"UnistylesModule.windows.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.windows.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IACzB,OAAO,IAAI,OAAO,CAAA;CACrB,CAAA;AAID,eAAO,MAAM,eAAe,EAAkF,qBAAqB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UnistylesRuntime.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesRuntime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAG1D;;GAEG;AACH,qBAAa,gBAAgB;IACb,OAAO,CAAC,eAAe;IAAmB,OAAO,CAAC,iBAAiB;gBAA3D,eAAe,EAAE,eAAe,EAAU,iBAAiB,EAAE,gBAAgB;IAEjG;;;OAGG;IACH,IAAW,WAAW;;;;;;;;;;;;;;;;;;;MAkBrB;IAED;;;OAGG;IACH,IAAW,WAAW,uCAErB;IAED;;;OAGG;IACH,IAAW,iBAAiB,YAE3B;IAED;;;OAGG;IACH,IAAW,SAAS,UAEnB;IAED;;;OAGG;IACH,IAAW,mBAAmB,gGAE7B;IAED;;;OAGG;IACH,IAAW,UAAU,mDAEpB;IAED;;;OAGG;IACH,IAAW,WAAW,6CAErB;IAED;;;OAGG;IACH,IAAW,cAAc,aAExB;IAED;;;OAGG;IACH,IAAW,MAAM;;;MAKhB;IAED;;;OAGG;IACH,IAAW,MAAM,oCAEhB;IAED;;;OAGG;IACH,IAAW,SAAS;;;2BAIO,KAAK,UAAU,MAAM;
|
1
|
+
{"version":3,"file":"UnistylesRuntime.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesRuntime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAG1D;;GAEG;AACH,qBAAa,gBAAgB;IACb,OAAO,CAAC,eAAe;IAAmB,OAAO,CAAC,iBAAiB;gBAA3D,eAAe,EA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ources":["../../../src/createStyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAExD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,
|
1
|
+
{"version":3,"file":"createStyleSheet.d.ts","sourceRoot":"","sources":["../../../src/createStyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAExD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,yBAAyB,cAAc,CAAC,KAAG,CAAe,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useCSS.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAGrD,eAAO,MAAM,MAAM,
|
1
|
+
{"version":3,"file":"useCSS.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAGrD,eAAO,MAAM,MAAM,GAAI,CAAC,cAAc,qBAAqB,CAAC,CAAC,CAAC,SA6C7D,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useCSS.native.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAErD,eAAO,MAAM,MAAM,
|
1
|
+
{"version":3,"file":"useCSS.native.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCSS.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAErD,eAAO,MAAM,MAAM,GAAI,CAAC,eAAe,qBAAqB,CAAC,CAAC,CAAC,KAAG,IAAU,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useVariants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,eAAO,MAAM,WAAW,iBAAkB,
|
1
|
+
{"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useVariants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,eAAO,MAAM,WAAW,iBAAkB,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,+CAMzE,CAAA"}
|
@@ -23,10 +23,7 @@ declare const UnistylesRegistry: {
|
|
23
23
|
};
|
24
24
|
};
|
25
25
|
addConfig: (config: import("./types").UnistylesConfig) => {
|
26
|
-
addBreakpoints:
|
27
|
-
addThemes: any;
|
28
|
-
addConfig: any;
|
29
|
-
};
|
26
|
+
addBreakpoints: any;
|
30
27
|
addThemes: any;
|
31
28
|
};
|
32
29
|
};
|
@@ -44,10 +41,7 @@ declare const UnistylesRegistry: {
|
|
44
41
|
};
|
45
42
|
addConfig: (config: import("./types").UnistylesConfig) => {
|
46
43
|
addBreakpoints: any;
|
47
|
-
addThemes:
|
48
|
-
addBreakpoints: any;
|
49
|
-
addConfig: any;
|
50
|
-
};
|
44
|
+
addThemes: any;
|
51
45
|
};
|
52
46
|
};
|
53
47
|
/**
|
@@ -63,10 +57,7 @@ declare const UnistylesRegistry: {
|
|
63
57
|
addConfig: any;
|
64
58
|
};
|
65
59
|
addThemes: (themes: UnistylesThemes) => {
|
66
|
-
addBreakpoints:
|
67
|
-
addThemes: any;
|
68
|
-
addConfig: any;
|
69
|
-
};
|
60
|
+
addBreakpoints: any;
|
70
61
|
addConfig: any;
|
71
62
|
};
|
72
63
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index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AAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EACnB,CAAA;AAED,YAAY,EACR,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,mBAAmB,IAAI,iBAAiB,EAC3C,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"normalizeStyle.d.ts","sourceRoot":"","sources":["../../../../src/normalizer/normalizeStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoE,OAAO,EAAE,MAAM,UAAU,CAAA;AAuDzG,eAAO,MAAM,cAAc,
|
1
|
+
{"version":3,"file":"normalizeStyle.d.ts","sourceRoot":"","sources":["../../../../src/normalizer/normalizeStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoE,OAAO,EAAE,MAAM,UAAU,CAAA;AAuDzG,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,OAAO,SAAS,CAAC,KAAG,CAwB5D,CAAA"}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import type { MatrixTransform,
|
1
|
+
import type { MatrixTransform, PerspectiveTransform, RotateTransform, RotateXTransform, RotateYTransform, RotateZTransform, ScaleTransform, ScaleXTransform, ScaleYTransform, SkewXTransform, SkewYTransform, TranslateXTransform, TranslateYTransform } from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
|
2
2
|
import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
|
3
3
|
import type { UnistylesBreakpoints, UnistylesThemes } from '../global';
|
4
4
|
export type ShadowOffset = {
|
5
5
|
width: number;
|
6
6
|
height: number;
|
7
7
|
};
|
8
|
-
export type TransformStyles =
|
8
|
+
export type TransformStyles = PerspectiveTransform & RotateTransform & RotateXTransform & RotateYTransform & RotateZTransform & ScaleTransform & ScaleXTransform & ScaleYTransform & TranslateXTransform & TranslateYTransform & SkewXTransform & SkewYTransform & MatrixTransform;
|
9
9
|
export type ScreenSize = {
|
10
10
|
width: number;
|
11
11
|
height: number;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/types/core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,eAAe,EACf,
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/types/core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,mDAAmD,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEtE,MAAM,MAAM,YAAY,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,eAAe,GACrB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,cAAc,GACd,cAAc,GACd,eAAe,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAA;AACxD,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,SAAS,CAAC,GAAG,SAAS,CAAC,MAAM,SAAS,CAAC,GAAG,UAAU,CAAC,MAAM,UAAU,CAAC,CAAA;AAC5G,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,EAAE,OAAO,CAAC,CAAA;AAC9E,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,CAAC,MAAM,oBAAoB,GAAG,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;AACpF,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,eAAe,CAAC,CAAA"}
|
@@ -11,6 +11,6 @@ type ParsedStylesheet<ST extends StyleSheetWithSuperPowers> = {
|
|
11
11
|
* @param variantsMap - The map of variants to be used
|
12
12
|
* @returns - The theme, current breakpoint and RN compatible styles
|
13
13
|
*/
|
14
|
-
export declare const useStyles: <ST extends StyleSheetWithSuperPowers>(stylesheet?: ST
|
14
|
+
export declare const useStyles: <ST extends StyleSheetWithSuperPowers>(stylesheet?: ST, variantsMap?: ExtractVariantNames<typeof stylesheet>) => ParsedStylesheet<ST>;
|
15
15
|
export {};
|
16
16
|
//# sourceMappingURL=useStyles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useStyles.d.ts","sourceRoot":"","sources":["../../../src/useStyles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIpH,KAAK,gBAAgB,CAAC,EAAE,SAAS,yBAAyB,IAAI;IAC1D,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,MAAM,oBAAoB,CAAC;IACvC,MAAM,EAAE,qBAAqB,CAAC,EAAE,CAAC,CAAA;CACpC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,
|
1
|
+
{"version":3,"file":"useStyles.d.ts","sourceRoot":"","sources":["../../../src/useStyles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIpH,KAAK,gBAAgB,CAAC,EAAE,SAAS,yBAAyB,IAAI;IAC1D,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,MAAM,oBAAoB,CAAC;IACvC,MAAM,EAAE,qBAAqB,CAAC,EAAE,CAAC,CAAA;CACpC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,EAAE,SAAS,yBAAyB,eAC7C,EAAE,gBACD,mBAAmB,CAAC,OAAO,UAAU,CAAC,KACrD,gBAAgB,CAAC,EAAE,CAmCrB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../../../src/utils/breakpoints.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAKjD,eAAO,MAAM,qBAAqB,UAAW,
|
1
|
+
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../../../src/utils/breakpoints.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAKjD,eAAO,MAAM,qBAAqB,UAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,QAAQ,CAAC,OAAO,CAqCtF,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mqParser.d.ts","sourceRoot":"","sources":["../../../../src/utils/mqParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAM7D,KAAK,iBAAiB,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,iBAcpC,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,YAAgC,CAAA;AAExE,eAAO,MAAM,SAAS,aAAc,iBAAiB,YAgBpD,CAAA;AAED,eAAO,MAAM,yBAAyB,aAAc,iBAAiB,cAAc,UAAU,KAAG,OAgB/F,CAAA;AAcD,eAAO,MAAM,4BAA4B,iBAAkB,
|
1
|
+
{"version":3,"file":"mqParser.d.ts","sourceRoot":"","sources":["../../../../src/utils/mqParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAM7D,KAAK,iBAAiB,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,iBAcpC,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,YAAgC,CAAA;AAExE,eAAO,MAAM,SAAS,aAAc,iBAAiB,YAgBpD,CAAA;AAED,eAAO,MAAM,yBAAyB,aAAc,iBAAiB,cAAc,UAAU,KAAG,OAgB/F,CAAA;AAcD,eAAO,MAAM,4BAA4B,iBAAkB,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,cAAc,UAAU,KAAG,QAAQ,CAAC,MAAM,CAgB5H,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/utils/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAW,MAAM,UAAU,CAAA;AAK1D,eAAO,MAAM,eAAe,QACnB,MAAM,MACP,QAAQ,YACF,
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/utils/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAW,MAAM,UAAU,CAAA;AAK1D,eAAO,MAAM,eAAe,QACnB,MAAM,MACP,QAAQ,YACF,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,KAC3C,QAED,CAAA;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,EAAE,SAAS,CAAC,KAAG,OAMxD,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,OAAO,SACjC,CAAC,YACC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,kCAE1C,CAuDY,CAAA"}
|
package/package.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-unistyles",
|
3
|
-
"version": "2.8.0-rc.
|
3
|
+
"version": "2.8.0-rc.3",
|
4
4
|
"description": "Level up your React Native StyleSheet",
|
5
5
|
"scripts": {
|
6
6
|
"test": "jest",
|
7
7
|
"test:coverage": "jest --coverage",
|
8
8
|
"tsc": "node_modules/typescript/bin/tsc --noEmit",
|
9
9
|
"lint": "eslint . --ext .ts,.tsx",
|
10
|
-
"prepare": "husky
|
10
|
+
"prepare": "husky && bob build",
|
11
11
|
"precommit": "concurrently 'yarn tsc' 'yarn lint' 'yarn test'",
|
12
12
|
"release": "release-it"
|
13
13
|
},
|
@@ -58,40 +58,40 @@
|
|
58
58
|
"registry": "https://registry.npmjs.org/"
|
59
59
|
},
|
60
60
|
"devDependencies": {
|
61
|
-
"@commitlint/config-conventional": "
|
62
|
-
"@react-native/eslint-config": "0.74.
|
63
|
-
"@react-native/normalize-colors": "0.74.
|
61
|
+
"@commitlint/config-conventional": "19.2.2",
|
62
|
+
"@react-native/eslint-config": "0.74.84",
|
63
|
+
"@react-native/normalize-colors": "0.74.84",
|
64
64
|
"@release-it/conventional-changelog": "8.0.1",
|
65
65
|
"@testing-library/react-hooks": "8.0.1",
|
66
|
-
"@types/jest": "29.5.
|
67
|
-
"@types/react": "18.
|
68
|
-
"@typescript-eslint/eslint-plugin": "6.
|
69
|
-
"@typescript-eslint/eslint-plugin-tslint": "6.
|
70
|
-
"@typescript-eslint/parser": "6.
|
71
|
-
"commitlint": "
|
66
|
+
"@types/jest": "29.5.12",
|
67
|
+
"@types/react": "18.3.3",
|
68
|
+
"@typescript-eslint/eslint-plugin": "6.21.0",
|
69
|
+
"@typescript-eslint/eslint-plugin-tslint": "6.21.0",
|
70
|
+
"@typescript-eslint/parser": "6.21.0",
|
71
|
+
"commitlint": "19.3.0",
|
72
72
|
"concurrently": "8.2.2",
|
73
|
-
"eslint": "8.
|
73
|
+
"eslint": "8.57.0",
|
74
74
|
"eslint-config-codemask": "1.1.7",
|
75
|
-
"eslint-plugin-functional": "6.
|
75
|
+
"eslint-plugin-functional": "6.6.0",
|
76
76
|
"eslint-plugin-import": "2.29.1",
|
77
77
|
"eslint-plugin-jsdoc": "46.10.1",
|
78
|
-
"eslint-plugin-jsx-a11y": "6.
|
78
|
+
"eslint-plugin-jsx-a11y": "6.9.0",
|
79
79
|
"eslint-plugin-nested-if": "1.0.0",
|
80
80
|
"eslint-plugin-no-else": "0.2.2",
|
81
|
-
"eslint-plugin-no-loops": "0.
|
81
|
+
"eslint-plugin-no-loops": "0.4.0",
|
82
82
|
"eslint-plugin-prefer-arrow": "1.2.3",
|
83
|
-
"eslint-plugin-react": "7.
|
84
|
-
"eslint-plugin-react-hooks": "4.6.
|
85
|
-
"husky": "
|
83
|
+
"eslint-plugin-react": "7.34.3",
|
84
|
+
"eslint-plugin-react-hooks": "4.6.2",
|
85
|
+
"husky": "9.0.11",
|
86
86
|
"jest": "29.7.0",
|
87
87
|
"metro-react-native-babel-preset": "0.77.0",
|
88
|
-
"react": "18.
|
89
|
-
"react-native": "0.
|
88
|
+
"react": "18.3.1",
|
89
|
+
"react-native": "0.74.2",
|
90
90
|
"react-native-builder-bob": "0.23.2",
|
91
|
-
"react-native-web": "0.19.
|
92
|
-
"react-test-renderer": "18.
|
93
|
-
"release-it": "17.0
|
94
|
-
"typescript": "5.
|
91
|
+
"react-native-web": "0.19.12",
|
92
|
+
"react-test-renderer": "18.3.1",
|
93
|
+
"release-it": "17.4.0",
|
94
|
+
"typescript": "5.5.2"
|
95
95
|
},
|
96
96
|
"peerDependencies": {
|
97
97
|
"@react-native/normalize-colors": "*",
|
@@ -117,7 +117,11 @@ export class UnistylesRuntime {
|
|
117
117
|
return {
|
118
118
|
width: this.unistylesBridge.statusBar.width,
|
119
119
|
height: this.unistylesBridge.statusBar.height,
|
120
|
-
setColor: (color?: Color, alpha?: number) =>
|
120
|
+
setColor: (color?: Color, alpha?: number) => {
|
121
|
+
const [parsedColor, parsedAlpha] = parseColor(color, alpha)
|
122
|
+
|
123
|
+
this.unistylesBridge.statusBar.setColor(parsedColor, parsedAlpha)
|
124
|
+
},
|
121
125
|
setHidden: (hidden: boolean) => this.unistylesBridge.statusBar.setHidden(hidden)
|
122
126
|
}
|
123
127
|
}
|
@@ -130,7 +134,11 @@ export class UnistylesRuntime {
|
|
130
134
|
return {
|
131
135
|
width: this.unistylesBridge.navigationBar.width,
|
132
136
|
height: this.unistylesBridge.navigationBar.height,
|
133
|
-
setColor: (color?: Color, alpha?: number) =>
|
137
|
+
setColor: (color?: Color, alpha?: number) => {
|
138
|
+
const [parsedColor, parsedAlpha] = parseColor(color, alpha)
|
139
|
+
|
140
|
+
this.unistylesBridge.navigationBar.setColor(parsedColor, parsedAlpha)
|
141
|
+
},
|
134
142
|
setHidden: (hidden: boolean) => this.unistylesBridge.navigationBar.setHidden(hidden)
|
135
143
|
}
|
136
144
|
}
|
@@ -181,7 +189,9 @@ export class UnistylesRuntime {
|
|
181
189
|
* @param alpha - Color alpha - default is 1
|
182
190
|
*/
|
183
191
|
public setRootViewBackgroundColor = (color?: Color, alpha?: number) => {
|
184
|
-
|
192
|
+
const [parsedColor, parsedAlpha] = parseColor(color, alpha)
|
193
|
+
|
194
|
+
this.unistylesBridge.setRootViewBackgroundColor(parsedColor, parsedAlpha)
|
185
195
|
}
|
186
196
|
|
187
197
|
/**
|
package/src/types/core.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type {
|
2
2
|
MatrixTransform,
|
3
|
-
|
3
|
+
PerspectiveTransform,
|
4
4
|
RotateTransform,
|
5
5
|
RotateXTransform,
|
6
6
|
RotateYTransform,
|
@@ -22,7 +22,7 @@ export type ShadowOffset = {
|
|
22
22
|
}
|
23
23
|
|
24
24
|
export type TransformStyles =
|
25
|
-
&
|
25
|
+
& PerspectiveTransform
|
26
26
|
& RotateTransform
|
27
27
|
& RotateXTransform
|
28
28
|
& RotateYTransform
|