react-native-unistyles 2.8.0-beta.5 → 2.8.0-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/android/src/main/cxx/cpp-adapter.cpp +1 -1
- package/android/src/main/cxx/helpers.cpp +61 -0
- package/android/src/main/cxx/helpers.h +5 -0
- package/android/src/main/cxx/platform.cpp +51 -41
- package/android/src/main/cxx/platform.h +7 -4
- package/android/src/main/java/com/unistyles/Models.kt +13 -50
- package/android/src/main/java/com/unistyles/Platform.kt +175 -40
- package/android/src/main/java/com/unistyles/UnistylesModule.kt +17 -93
- package/cxx/UnistylesImpl.cpp +57 -2
- package/cxx/UnistylesModel.cpp +6 -2
- package/cxx/UnistylesModel.h +34 -8
- package/cxx/UnistylesRuntime.h +9 -1
- package/ios/platform/Platform_Shared.h +2 -0
- package/ios/platform/Platform_Shared.mm +84 -1
- package/ios/platform/Platform_iOS.h +2 -0
- package/ios/platform/Platform_iOS.mm +57 -14
- package/lib/commonjs/core/UnistylesModule.js +17 -2
- package/lib/commonjs/core/UnistylesModule.js.map +1 -1
- package/lib/commonjs/core/UnistylesRuntime.js +72 -4
- package/lib/commonjs/core/UnistylesRuntime.js.map +1 -1
- package/lib/commonjs/core/mocks/UnistylesMockedBridge.js +4 -0
- package/lib/commonjs/core/mocks/UnistylesMockedBridge.js.map +1 -1
- package/lib/commonjs/core/mocks/UnistylesMockedRuntime.js +12 -2
- package/lib/commonjs/core/mocks/UnistylesMockedRuntime.js.map +1 -1
- package/lib/commonjs/types/color.js +2 -0
- package/lib/commonjs/types/color.js.map +1 -0
- package/lib/commonjs/types/index.js +11 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/useStyles.js +1 -1
- package/lib/commonjs/useStyles.js.map +1 -1
- package/lib/commonjs/utils/index.js +7 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/parseColor.js +30 -0
- package/lib/commonjs/utils/parseColor.js.map +1 -0
- package/lib/module/core/UnistylesModule.js +17 -2
- package/lib/module/core/UnistylesModule.js.map +1 -1
- package/lib/module/core/UnistylesRuntime.js +73 -4
- package/lib/module/core/UnistylesRuntime.js.map +1 -1
- package/lib/module/core/index.js +2 -1
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/mocks/UnistylesMockedBridge.js +4 -0
- package/lib/module/core/mocks/UnistylesMockedBridge.js.map +1 -1
- package/lib/module/core/mocks/UnistylesMockedRuntime.js +12 -2
- package/lib/module/core/mocks/UnistylesMockedRuntime.js.map +1 -1
- package/lib/module/types/color.js +2 -0
- package/lib/module/types/color.js.map +1 -0
- package/lib/module/types/index.js +1 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/useStyles.js +1 -1
- package/lib/module/useStyles.js.map +1 -1
- package/lib/module/utils/index.js +1 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/parseColor.js +23 -0
- package/lib/module/utils/parseColor.js.map +1 -0
- package/lib/typescript/src/core/UnistylesModule.d.ts +1 -0
- package/lib/typescript/src/core/UnistylesModule.d.ts.map +1 -1
- package/lib/typescript/src/core/UnistylesRuntime.d.ts +52 -5
- package/lib/typescript/src/core/UnistylesRuntime.d.ts.map +1 -1
- package/lib/typescript/src/core/index.d.ts +3 -1
- package/lib/typescript/src/core/index.d.ts.map +1 -1
- package/lib/typescript/src/core/mocks/UnistylesMockedBridge.d.ts +4 -0
- package/lib/typescript/src/core/mocks/UnistylesMockedBridge.d.ts.map +1 -1
- package/lib/typescript/src/core/mocks/UnistylesMockedRuntime.d.ts +7 -1
- package/lib/typescript/src/core/mocks/UnistylesMockedRuntime.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/breakpoints.d.ts +2 -2
- package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
- package/lib/typescript/src/types/color.d.ts +4 -0
- package/lib/typescript/src/types/color.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +1 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts +2 -2
- package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/types/unistyles.d.ts +8 -2
- package/lib/typescript/src/types/unistyles.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +1 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/parseColor.d.ts +3 -0
- package/lib/typescript/src/utils/parseColor.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/core/UnistylesModule.ts +19 -3
- package/src/core/UnistylesRuntime.ts +77 -5
- package/src/core/index.ts +7 -1
- package/src/core/mocks/UnistylesMockedBridge.ts +4 -0
- package/src/core/mocks/UnistylesMockedRuntime.ts +15 -3
- package/src/index.ts +3 -2
- package/src/types/breakpoints.ts +2 -2
- package/src/types/color.ts +26 -0
- package/src/types/index.ts +1 -0
- package/src/types/stylesheet.ts +2 -2
- package/src/types/unistyles.ts +10 -4
- package/src/useStyles.ts +1 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/parseColor.ts +27 -0
@@ -31,13 +31,17 @@ class UnistylesBridgeWeb {
|
|
31
31
|
#statusBar = {
|
32
32
|
height: 0,
|
33
33
|
width: 0,
|
34
|
-
setColor: () => {}
|
34
|
+
setColor: () => {},
|
35
|
+
setHidden: () => {}
|
35
36
|
};
|
36
37
|
#navigationBar = {
|
37
38
|
height: 0,
|
38
39
|
width: 0,
|
39
|
-
setColor: () => {}
|
40
|
+
setColor: () => {},
|
41
|
+
setHidden: () => {}
|
40
42
|
};
|
43
|
+
#pixelRatio = 1.0;
|
44
|
+
#fontScale = 1.0;
|
41
45
|
constructor() {
|
42
46
|
if (!_common.isServer) {
|
43
47
|
this.setupListeners();
|
@@ -77,6 +81,10 @@ class UnistylesBridgeWeb {
|
|
77
81
|
return this.#statusBar;
|
78
82
|
case 'navigationBar':
|
79
83
|
return this.#navigationBar;
|
84
|
+
case 'pixelRatio':
|
85
|
+
return this.#pixelRatio;
|
86
|
+
case 'fontScale':
|
87
|
+
return this.#fontScale;
|
80
88
|
case 'useTheme':
|
81
89
|
return themeName => this.useTheme(themeName);
|
82
90
|
case 'updateTheme':
|
@@ -89,6 +97,10 @@ class UnistylesBridgeWeb {
|
|
89
97
|
return (pluginName, notify) => this.addPlugin(pluginName, notify);
|
90
98
|
case 'removePlugin':
|
91
99
|
return pluginName => this.removePlugin(pluginName);
|
100
|
+
case 'setRootViewBackgroundColor':
|
101
|
+
return color => this.setRootViewBackgroundColor(color);
|
102
|
+
case 'setImmersiveMode':
|
103
|
+
return () => {};
|
92
104
|
default:
|
93
105
|
return Reflect.get(this, prop);
|
94
106
|
}
|
@@ -197,6 +209,9 @@ class UnistylesBridgeWeb {
|
|
197
209
|
}
|
198
210
|
return 'light';
|
199
211
|
}
|
212
|
+
setRootViewBackgroundColor(color) {
|
213
|
+
document.body.style.backgroundColor = color;
|
214
|
+
}
|
200
215
|
emitPluginChange() {
|
201
216
|
this.#unistylesEvents.emit('__unistylesOnChange', {
|
202
217
|
type: 'plugin'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_plugins","_common","UnistylesBridgeWeb","timerRef","undefined","hasAdaptiveThemes","supportsAutomaticColorScheme","screenWidth","isServer","window","innerWidth","screenHeight","innerHeight","themes","breakpoints","colorScheme","getPreferredColorScheme","themeName","enabledPlugins","normalizeWebStylesPlugin","name","unistylesEvents","NativeEventEmitter","NativeModules","Unistyles","sortedBreakpointPairs","breakpoint","contentSizeCategory","insets","top","right","bottom","left","statusBar","height","width","setColor","navigationBar","constructor","setupListeners","install","globalThis","__UNISTYLES__","Proxy","get","_target","prop","getTheme","useTheme","updateTheme","useBreakpoints","enable","useAdaptiveThemes","pluginName","notify","addPlugin","removePlugin","Reflect","set","target","newValue","receiver","includes","emitThemeChange","Object","entries","sort","a","b","getBreakpointFromScreenWidth","concat","emitPluginChange","filter","length","at","addEventListener","clearTimeout","setTimeout","emitLayoutChange","matchMedia","event","matches","find","value","index","otherBreakpoints","minVal","maxVal","emit","type","payload","orientation","screen","exports","UnistylesModule"],"sourceRoot":"../../../src","sources":["core/UnistylesModule.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEO,MAAMG,kBAAkB,CAAC;EAC5B,CAACC,QAAQ,GAAmCC,SAAS;EACrD,CAACC,iBAAiB,GAAY,KAAK;EACnC,CAACC,4BAA4B,GAAG,KAAK;EACrC,CAACC,WAAW,GAAGC,gBAAQ,GAAGJ,SAAS,GAAGK,MAAM,CAACC,UAAU;EACvD,CAACC,YAAY,GAAGH,gBAAQ,GAAGJ,SAAS,GAAGK,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,CAACC,iCAAwB,CAACC,IAAI,CAAC;EAChE,CAACC,eAAe,GAAG,IAAIC,+BAAkB,CAACC,0BAAa,CAACC,SAAS,CAAC;EAClE,CAACC,qBAAqB,GAAgD,EAAE;EACxE,CAACC,UAAU,GAA+B,EAAE;EAC5C,CAACC,mBAAmB,GAAW,aAAa;EAC5C,CAACC,MAAM,GAAiB;IACpBC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE;EACV,CAAC;EACD,CAACC,SAAS,GAAc;IACpBC,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,CAAC;IACRC,QAAQ,EAAEA,CAAA,KAAM,CAAC;
|
1
|
+
{"version":3,"names":["_reactNative","require","_plugins","_common","UnistylesBridgeWeb","timerRef","undefined","hasAdaptiveThemes","supportsAutomaticColorScheme","screenWidth","isServer","window","innerWidth","screenHeight","innerHeight","themes","breakpoints","colorScheme","getPreferredColorScheme","themeName","enabledPlugins","normalizeWebStylesPlugin","name","unistylesEvents","NativeEventEmitter","NativeModules","Unistyles","sortedBreakpointPairs","breakpoint","contentSizeCategory","insets","top","right","bottom","left","statusBar","height","width","setColor","setHidden","navigationBar","pixelRatio","fontScale","constructor","setupListeners","install","globalThis","__UNISTYLES__","Proxy","get","_target","prop","getTheme","useTheme","updateTheme","useBreakpoints","enable","useAdaptiveThemes","pluginName","notify","addPlugin","removePlugin","color","setRootViewBackgroundColor","Reflect","set","target","newValue","receiver","includes","emitThemeChange","Object","entries","sort","a","b","getBreakpointFromScreenWidth","concat","emitPluginChange","filter","length","at","addEventListener","clearTimeout","setTimeout","emitLayoutChange","matchMedia","event","matches","find","value","index","otherBreakpoints","minVal","maxVal","document","body","style","backgroundColor","emit","type","payload","orientation","screen","exports","UnistylesModule"],"sourceRoot":"../../../src","sources":["core/UnistylesModule.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEO,MAAMG,kBAAkB,CAAC;EAC5B,CAACC,QAAQ,GAAmCC,SAAS;EACrD,CAACC,iBAAiB,GAAY,KAAK;EACnC,CAACC,4BAA4B,GAAG,KAAK;EACrC,CAACC,WAAW,GAAGC,gBAAQ,GAAGJ,SAAS,GAAGK,MAAM,CAACC,UAAU;EACvD,CAACC,YAAY,GAAGH,gBAAQ,GAAGJ,SAAS,GAAGK,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,CAACC,iCAAwB,CAACC,IAAI,CAAC;EAChE,CAACC,eAAe,GAAG,IAAIC,+BAAk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AAE;QACLzE,UAAU,EAAE,IAAI,CAAC,CAACA,UAAU;QAC5B0E,WAAW,EAAG,IAAI,CAAC,CAAC7F,WAAW,GAAe,IAAI,CAAC,CAACI,YAAuB,GACrE,WAAW,GACX,UAAU;QAChB0F,MAAM,EAAE;UACJlE,KAAK,EAAE,IAAI,CAAC,CAAC5B,WAAW;UACxB2B,MAAM,EAAE,IAAI,CAAC,CAACvB;QAClB;MACJ;IACJ,CAAC,CAAC;EACN;AACJ;AAAC2F,OAAA,CAAApG,kBAAA,GAAAA,kBAAA;AAEM,MAAMqG,eAAe,GAAAD,OAAA,CAAAC,eAAA,GAAG,IAAIrG,kBAAkB,CAAC,CAAC","ignoreList":[]}
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.UnistylesRuntime = void 0;
|
7
7
|
var _common = require("../common");
|
8
|
+
var _utils = require("../utils");
|
8
9
|
/**
|
9
10
|
* Utility to interact with the Unistyles during runtime
|
10
11
|
*/
|
@@ -14,6 +15,30 @@ class UnistylesRuntime {
|
|
14
15
|
this.unistylesRegistry = unistylesRegistry;
|
15
16
|
}
|
16
17
|
|
18
|
+
/**
|
19
|
+
* Get the mini runtime injected to creteStyleSheet
|
20
|
+
* @returns - The mini runtime
|
21
|
+
*/
|
22
|
+
get miniRuntime() {
|
23
|
+
return {
|
24
|
+
contentSizeCategory: this.contentSizeCategory,
|
25
|
+
breakpoint: this.breakpoint,
|
26
|
+
screen: this.screen,
|
27
|
+
insets: this.insets,
|
28
|
+
statusBar: {
|
29
|
+
width: this.statusBar.width,
|
30
|
+
height: this.statusBar.height
|
31
|
+
},
|
32
|
+
navigationBar: {
|
33
|
+
width: this.navigationBar.width,
|
34
|
+
height: this.navigationBar.height
|
35
|
+
},
|
36
|
+
orientation: this.orientation,
|
37
|
+
pixelRatio: this.pixelRatio,
|
38
|
+
fontScale: this.fontScale
|
39
|
+
};
|
40
|
+
}
|
41
|
+
|
17
42
|
/**
|
18
43
|
* Get the current color scheme
|
19
44
|
* @returns - The current color scheme
|
@@ -91,25 +116,33 @@ class UnistylesRuntime {
|
|
91
116
|
|
92
117
|
/**
|
93
118
|
* Get the status bar info
|
94
|
-
* @returns - The status bar api { width, height, setColor }
|
119
|
+
* @returns - The status bar api { width, height, setColor, setHidden }
|
95
120
|
*/
|
96
121
|
get statusBar() {
|
97
122
|
return {
|
98
123
|
width: this.unistylesBridge.statusBar.width,
|
99
124
|
height: this.unistylesBridge.statusBar.height,
|
100
|
-
setColor: color =>
|
125
|
+
setColor: (color, alpha) => {
|
126
|
+
const [parsedColor, parsedAlpha] = (0, _utils.parseColor)(color, alpha);
|
127
|
+
this.unistylesBridge.statusBar.setColor(parsedColor, parsedAlpha);
|
128
|
+
},
|
129
|
+
setHidden: hidden => this.unistylesBridge.statusBar.setHidden(hidden)
|
101
130
|
};
|
102
131
|
}
|
103
132
|
|
104
133
|
/**
|
105
134
|
* Get the navigation bar info (Android)
|
106
|
-
* @returns - The navigation bar api { width, height, setColor }
|
135
|
+
* @returns - The navigation bar api { width, height, setColor, setHidden }
|
107
136
|
*/
|
108
137
|
get navigationBar() {
|
109
138
|
return {
|
110
139
|
width: this.unistylesBridge.navigationBar.width,
|
111
140
|
height: this.unistylesBridge.navigationBar.height,
|
112
|
-
setColor: color =>
|
141
|
+
setColor: (color, alpha) => {
|
142
|
+
const [parsedColor, parsedAlpha] = (0, _utils.parseColor)(color, alpha);
|
143
|
+
this.unistylesBridge.navigationBar.setColor(parsedColor, parsedAlpha);
|
144
|
+
},
|
145
|
+
setHidden: hidden => this.unistylesBridge.navigationBar.setHidden(hidden)
|
113
146
|
};
|
114
147
|
}
|
115
148
|
|
@@ -128,6 +161,41 @@ class UnistylesRuntime {
|
|
128
161
|
return _common.ScreenOrientation.Portrait;
|
129
162
|
}
|
130
163
|
|
164
|
+
/**
|
165
|
+
* Get the pixel ratio
|
166
|
+
* @returns - The pixel ratio
|
167
|
+
*/
|
168
|
+
get pixelRatio() {
|
169
|
+
return this.unistylesBridge.pixelRatio;
|
170
|
+
}
|
171
|
+
|
172
|
+
/**
|
173
|
+
* Get the font scale
|
174
|
+
* @returns - The font scale
|
175
|
+
*/
|
176
|
+
get fontScale() {
|
177
|
+
const fontScale = this.unistylesBridge.fontScale;
|
178
|
+
return fontScale === 1.0 ? 1 : fontScale.toFixed(2);
|
179
|
+
}
|
180
|
+
|
181
|
+
/**
|
182
|
+
* Get the immersive mode (both status bar and navigation bar hidden (Android))
|
183
|
+
* @param isEnabled
|
184
|
+
*/
|
185
|
+
setImmersiveMode(isEnabled) {
|
186
|
+
return this.unistylesBridge.setImmersiveMode(isEnabled);
|
187
|
+
}
|
188
|
+
|
189
|
+
/**
|
190
|
+
* Set the root view background color
|
191
|
+
* @param color - The color to set
|
192
|
+
* @param alpha - Color alpha - default is 1
|
193
|
+
*/
|
194
|
+
setRootViewBackgroundColor = (color, alpha) => {
|
195
|
+
const [parsedColor, parsedAlpha] = (0, _utils.parseColor)(color, alpha);
|
196
|
+
this.unistylesBridge.setRootViewBackgroundColor(parsedColor, parsedAlpha);
|
197
|
+
};
|
198
|
+
|
131
199
|
/**
|
132
200
|
* Switch to a different theme
|
133
201
|
* @param name - The name of the theme to switch to
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_common","require","UnistylesRuntime","constructor","unistylesBridge","unistylesRegistry","
|
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"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACO,MAAME,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,S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,CAAC;EAC/C,CAAC;AACL;AAACE,OAAA,CAAAtD,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
@@ -18,6 +18,8 @@ class UnistylesMockedBridge {
|
|
18
18
|
contentSizeCategory() {}
|
19
19
|
sortedBreakpointPairs() {}
|
20
20
|
insets() {}
|
21
|
+
pixelRatio() {}
|
22
|
+
fontScale() {}
|
21
23
|
statusBar() {}
|
22
24
|
navigationBar() {}
|
23
25
|
themes(themes) {}
|
@@ -27,6 +29,8 @@ class UnistylesMockedBridge {
|
|
27
29
|
useAdaptiveThemes(enable) {}
|
28
30
|
addPlugin(pluginName, notify) {}
|
29
31
|
removePlugin(pluginName) {}
|
32
|
+
setRootViewBackgroundColor(color, alpha) {}
|
33
|
+
setImmersiveMode(isEnabled) {}
|
30
34
|
}
|
31
35
|
exports.UnistylesMockedBridge = UnistylesMockedBridge;
|
32
36
|
//# sourceMappingURL=UnistylesMockedBridge.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["UnistylesMockedBridge","constructor","screenWidth","screenHeight","enabledPlugins","hasAdaptiveThemes","themeName","breakpoint","colorScheme","contentSizeCategory","sortedBreakpointPairs","insets","statusBar","navigationBar","themes","useBreakpoints","breakpoints","useTheme","name","updateTheme","useAdaptiveThemes","enable","addPlugin","pluginName","notify","removePlugin","exports"],"sourceRoot":"../../../../src","sources":["core/mocks/UnistylesMockedBridge.ts"],"mappings":";;;;;;AAAA;;AAGO,MAAMA,qBAAqB,CAAC;EAC/BC,WAAWA,CAAA,EAAG,CAAC;EAERC,WAAWA,CAAA,EAAG,CAAC;EACfC,YAAYA,CAAA,EAAG,CAAC;EAChBC,cAAcA,CAAA,EAAG,CAAC;EAClBC,iBAAiBA,CAAA,EAAG,CAAC;EACrBC,SAASA,CAAA,EAAG,CAAC;EACbC,UAAUA,CAAA,EAAG,CAAC;EACdC,WAAWA,CAAA,EAAG,CAAC;EACfC,mBAAmBA,CAAA,EAAG,CAAC;EACvBC,qBAAqBA,CAAA,EAAG,CAAC;EACzBC,MAAMA,CAAA,EAAG,CAAC;EACVC,SAASA,CAAA,EAAG,CAAC;EACbC,aAAaA,CAAA,EAAG,CAAC;EACjBC,MAAMA,CAACA,MAAoC,EAAE,CAAC;EAC9CC,cAAcA,CAACC,WAAiC,EAAE,CAAC;EACnDC,QAAQA,CAACC,IAA2B,EAAE,CAAC;EACvCC,WAAWA,CAACD,IAA2B,EAAE,CAAC;EAC1CE,iBAAiBA,CAACC,MAAe,EAAE,CAAC;EACpCC,SAASA,CAACC,UAAkB,EAAEC,MAAe,EAAE,CAAC;EAChDC,YAAYA,CAACF,UAAkB,EAAE,CAAC;
|
1
|
+
{"version":3,"names":["UnistylesMockedBridge","constructor","screenWidth","screenHeight","enabledPlugins","hasAdaptiveThemes","themeName","breakpoint","colorScheme","contentSizeCategory","sortedBreakpointPairs","insets","pixelRatio","fontScale","statusBar","navigationBar","themes","useBreakpoints","breakpoints","useTheme","name","updateTheme","useAdaptiveThemes","enable","addPlugin","pluginName","notify","removePlugin","setRootViewBackgroundColor","color","alpha","setImmersiveMode","isEnabled","exports"],"sourceRoot":"../../../../src","sources":["core/mocks/UnistylesMockedBridge.ts"],"mappings":";;;;;;AAAA;;AAGO,MAAMA,qBAAqB,CAAC;EAC/BC,WAAWA,CAAA,EAAG,CAAC;EAERC,WAAWA,CAAA,EAAG,CAAC;EACfC,YAAYA,CAAA,EAAG,CAAC;EAChBC,cAAcA,CAAA,EAAG,CAAC;EAClBC,iBAAiBA,CAAA,EAAG,CAAC;EACrBC,SAASA,CAAA,EAAG,CAAC;EACbC,UAAUA,CAAA,EAAG,CAAC;EACdC,WAAWA,CAAA,EAAG,CAAC;EACfC,mBAAmBA,CAAA,EAAG,CAAC;EACvBC,qBAAqBA,CAAA,EAAG,CAAC;EACzBC,MAAMA,CAAA,EAAG,CAAC;EACVC,UAAUA,CAAA,EAAG,CAAC;EACdC,SAASA,CAAA,EAAG,CAAC;EACbC,SAASA,CAAA,EAAG,CAAC;EACbC,aAAaA,CAAA,EAAG,CAAC;EACjBC,MAAMA,CAACA,MAAoC,EAAE,CAAC;EAC9CC,cAAcA,CAACC,WAAiC,EAAE,CAAC;EACnDC,QAAQA,CAACC,IAA2B,EAAE,CAAC;EACvCC,WAAWA,CAACD,IAA2B,EAAE,CAAC;EAC1CE,iBAAiBA,CAACC,MAAe,EAAE,CAAC;EACpCC,SAASA,CAACC,UAAkB,EAAEC,MAAe,EAAE,CAAC;EAChDC,YAAYA,CAACF,UAAkB,EAAE,CAAC;EAClCG,0BAA0BA,CAACC,KAAc,EAAEC,KAAc,EAAE,CAAC;EAC5DC,gBAAgBA,CAACC,SAAkB,EAAE,CAAC;AACjD;AAACC,OAAA,CAAAjC,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
@@ -52,18 +52,26 @@ class UnistylesMockedRuntime {
|
|
52
52
|
left: 0
|
53
53
|
};
|
54
54
|
}
|
55
|
+
get pixelRatio() {
|
56
|
+
return 1.0;
|
57
|
+
}
|
58
|
+
get fontScale() {
|
59
|
+
return 1.0;
|
60
|
+
}
|
55
61
|
get statusBar() {
|
56
62
|
return {
|
57
63
|
height: 24,
|
58
64
|
width: 800,
|
59
|
-
setColor: () => {}
|
65
|
+
setColor: () => {},
|
66
|
+
setHidden: () => {}
|
60
67
|
};
|
61
68
|
}
|
62
69
|
get navigationBar() {
|
63
70
|
return {
|
64
71
|
height: 0,
|
65
72
|
width: 0,
|
66
|
-
setColor: () => {}
|
73
|
+
setColor: () => {},
|
74
|
+
setHidden: () => {}
|
67
75
|
};
|
68
76
|
}
|
69
77
|
get orientation() {
|
@@ -74,6 +82,8 @@ class UnistylesMockedRuntime {
|
|
74
82
|
setAdaptiveThemes = enabled => {};
|
75
83
|
addPlugin = plugin => {};
|
76
84
|
removePlugin = plugin => {};
|
85
|
+
setRootViewBackgroundColor = color => {};
|
86
|
+
setImmersiveMode = isEnabled => {};
|
77
87
|
}
|
78
88
|
exports.UnistylesMockedRuntime = UnistylesMockedRuntime;
|
79
89
|
//# sourceMappingURL=UnistylesMockedRuntime.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_common","require","UnistylesMockedRuntime","constructor","unistylesBridge","unistylesRegistry","colorScheme","hasAdaptiveThemes","themeName","themeNames","length","at","undefined","contentSizeCategory","breakpoint","sortedBreakpointPairs","firstBreakpoint","breakpoints","enabledPlugins","plugins","screen","width","height","insets","top","right","bottom","left","statusBar","setColor","navigationBar","orientation","ScreenOrientation","Portrait","setTheme","name","updateTheme","theme","setAdaptiveThemes","enabled","addPlugin","plugin","removePlugin","exports"],"sourceRoot":"../../../../src","sources":["core/mocks/UnistylesMockedRuntime.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AADA;;AAOO,MAAMC,sBAAsB,CAAC;EAGhCC,WAAWA,CAASC,eAAgC,EAAUC,iBAAmC,EAAE;IAAA,KAA/ED,eAAgC,GAAhCA,eAAgC;IAAA,KAAUC,iBAAmC,GAAnCA,iBAAmC;IAC7F,IAAI,CAACA,iBAAiB,GAAGA,iBAAuD;EACpF;EAEA,IAAWC,WAAWA,CAAA,EAAG;IACrB,OAAO,MAAM;EACjB;EAEA,IAAWC,iBAAiBA,CAAA,EAAG;IAC3B,OAAO,IAAI;EACf;EAEA,IAAWC,SAASA,CAAA,EAAG;IACnB,OAAO,IAAI,CAACH,iBAAiB,CAACI,UAAU,CAACC,MAAM,GAAG,CAAC,GAC7C,IAAI,CAACL,iBAAiB,CAACI,UAAU,CAACE,EAAE,CAAC,CAAC,CAAC,GACvCC,SAAS;EACnB;EAEA,IAAWC,mBAAmBA,CAAA,EAAG;IAC7B,OAAO,aAAa;EACxB;EAEA,IAAWC,UAAUA,CAAA,EAAG;IACpB,IAAI,IAAI,CAACT,iBAAiB,CAACU,qBAAqB,CAACL,MAAM,KAAK,CAAC,EAAE;MAC3D,OAAOE,SAAS;IACpB;IAEA,MAAMI,eAAe,GAAG,IAAI,CAACX,iBAAiB,CAACU,qBAAqB,CAACJ,EAAE,CAAC,CAAC,CAAC;IAE1E,OAAOK,eAAe,GAChBA,eAAe,CAACL,EAAE,CAAC,CAAC,CAAC,GACrBC,SAAS;EACnB;EAEA,IAAWK,WAAWA,CAAA,EAAG;IACrB,OAAO,IAAI,CAACZ,iBAAiB,CAACY,WAAW;EAC7C;EAEA,IAAWC,cAAcA,CAAA,EAAG;IACxB,OAAO,IAAI,CAACb,iBAAiB,CAACc,OAAO;EACzC;EAEA,IAAWC,MAAMA,CAAA,EAAG;IAChB,OAAO;MACHC,KAAK,EAAE,GAAG;MACVC,MAAM,EAAE;IACZ,CAAC;EACL;EAEA,IAAWC,MAAMA,CAAA,EAAG;IAChB,OAAO;MACHC,GAAG,EAAE,CAAC;MACNC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,CAAC;MACTC,IAAI,EAAE;IACV,CAAC;EACL;EAEA,IAAWC,SAASA,CAAA,EAAG;IACnB,OAAO;
|
1
|
+
{"version":3,"names":["_common","require","UnistylesMockedRuntime","constructor","unistylesBridge","unistylesRegistry","colorScheme","hasAdaptiveThemes","themeName","themeNames","length","at","undefined","contentSizeCategory","breakpoint","sortedBreakpointPairs","firstBreakpoint","breakpoints","enabledPlugins","plugins","screen","width","height","insets","top","right","bottom","left","pixelRatio","fontScale","statusBar","setColor","setHidden","navigationBar","orientation","ScreenOrientation","Portrait","setTheme","name","updateTheme","theme","setAdaptiveThemes","enabled","addPlugin","plugin","removePlugin","setRootViewBackgroundColor","color","setImmersiveMode","isEnabled","exports"],"sourceRoot":"../../../../src","sources":["core/mocks/UnistylesMockedRuntime.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AADA;;AAOO,MAAMC,sBAAsB,CAAC;EAGhCC,WAAWA,CAASC,eAAgC,EAAUC,iBAAmC,EAAE;IAAA,KAA/ED,eAAgC,GAAhCA,eAAgC;IAAA,KAAUC,iBAAmC,GAAnCA,iBAAmC;IAC7F,IAAI,CAACA,iBAAiB,GAAGA,iBAAuD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,CAAA,EAAG;IACnB,OAAO;MACHR,MAAM,EAAE,EAAE;MACVD,KAAK,EAAE,GAAG;MACVU,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;MAClBC,SAAS,EAAEA,CAAA,KAAM,CAAC;IACtB,CAAC;EACL;EAEA,IAAWC,aAAaA,CAAA,EAAG;IACvB,OAAO;MACHX,MAAM,EAAE,CAAC;MACTD,KAAK,EAAE,CAAC;MACRU,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;MAClBC,SAAS,EAAEA,CAAA,KAAM,CAAC;IACtB,CAAC;EACL;EAEA,IAAWE,WAAWA,CAAA,EAAG;IACrB,OAAOC,yBAAiB,CAACC,QAAQ;EACrC;EAEOC,QAAQ,GAAIC,IAA2B,IAAK,IAAI;EAChDC,WAAW,GAAGA,CAACD,IAA2B,EAAEE,KAA6C,KAAK,CAAC,CAAC;EAChGC,iBAAiB,GAAIC,OAAgB,IAAK,CAAC,CAAC;EAC5CC,SAAS,GAAIC,MAAuB,IAAK,CAAC,CAAC;EAC3CC,YAAY,GAAID,MAAuB,IAAK,CAAC,CAAC;EAC9CE,0BAA0B,GAAIC,KAAsB,IAAK,CAAC,CAAC;EAC3DC,gBAAgB,GAAIC,SAAkB,IAAK,CAAC,CAAC;AACxD;AAACC,OAAA,CAAAhD,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/color.ts"],"mappings":"","ignoreList":[]}
|
@@ -25,4 +25,15 @@ Object.keys(_unistyles).forEach(function (key) {
|
|
25
25
|
}
|
26
26
|
});
|
27
27
|
});
|
28
|
+
var _color = require("./color");
|
29
|
+
Object.keys(_color).forEach(function (key) {
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
31
|
+
if (key in exports && exports[key] === _color[key]) return;
|
32
|
+
Object.defineProperty(exports, key, {
|
33
|
+
enumerable: true,
|
34
|
+
get: function () {
|
35
|
+
return _color[key];
|
36
|
+
}
|
37
|
+
});
|
38
|
+
});
|
28
39
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_normalizer","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_unistyles"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,UAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,UAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,UAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,UAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_normalizer","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_unistyles","_color"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,UAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,UAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,UAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,UAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,MAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,MAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,MAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,MAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
@@ -23,7 +23,7 @@ const useStyles = (stylesheet, variantsMap) => {
|
|
23
23
|
plugins
|
24
24
|
} = (0, _hooks.useUnistyles)();
|
25
25
|
const variants = (0, _hooks.useVariants)(variantsMap);
|
26
|
-
const parsedStyles = (0, _react.useMemo)(() => typeof stylesheet === 'function' ? stylesheet(theme, _core.unistyles.runtime) : stylesheet, [theme, stylesheet, layout]);
|
26
|
+
const parsedStyles = (0, _react.useMemo)(() => typeof stylesheet === 'function' ? stylesheet(theme, _core.unistyles.runtime.miniRuntime) : stylesheet, [theme, stylesheet, layout]);
|
27
27
|
const dynamicStyleSheet = (0, _react.useMemo)(() => Object.entries(parsedStyles || {}).reduce((acc, [key, value]) => {
|
28
28
|
if (typeof value === 'function') {
|
29
29
|
return {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_utils","_hooks","_core","_common","useStyles","stylesheet","variantsMap","theme","layout","plugins","useUnistyles","variants","useVariants","parsedStyles","useMemo","unistyles","runtime","dynamicStyleSheet","Object","entries","reduce","acc","key","value","proxifyFunction","StyleSheet","create","withPlugins","parseStyle","isWeb","registry","config","experimentalCSSMediaQueries","useCSS","breakpoint","styles","exports"],"sourceRoot":"../../src","sources":["useStyles.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAQA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,SAAS,GAAGA,CACrBC,UAAe,EACfC,WAAoD,KAC7B;EACvB,MAAM;IAAEC,KAAK;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,mBAAY,EAAC,CAAC;EACjD,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EAACN,WAAW,CAAC;EACzC,MAAMO,YAAY,GAAG,IAAAC,cAAO,EAAC,MAAM,OAAOT,UAAU,KAAK,UAAU,GAC7DA,UAAU,CAACE,KAAK,EAAEQ,eAAS,CAACC,OAAO,CAAC,
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_hooks","_core","_common","useStyles","stylesheet","variantsMap","theme","layout","plugins","useUnistyles","variants","useVariants","parsedStyles","useMemo","unistyles","runtime","miniRuntime","dynamicStyleSheet","Object","entries","reduce","acc","key","value","proxifyFunction","StyleSheet","create","withPlugins","parseStyle","isWeb","registry","config","experimentalCSSMediaQueries","useCSS","breakpoint","styles","exports"],"sourceRoot":"../../src","sources":["useStyles.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAQA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,SAAS,GAAGA,CACrBC,UAAe,EACfC,WAAoD,KAC7B;EACvB,MAAM;IAAEC,KAAK;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,mBAAY,EAAC,CAAC;EACjD,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EAACN,WAAW,CAAC;EACzC,MAAMO,YAAY,GAAG,IAAAC,cAAO,EAAC,MAAM,OAAOT,UAAU,KAAK,UAAU,GAC7DA,UAAU,CAACE,KAAK,EAAEQ,eAAS,CAACC,OAAO,CAACC,WAAW,CAAC,GAChDZ,UAAU,EAAE,CAACE,KAAK,EAAEF,UAAU,EAAEG,MAAM,CAAC,CAAC;EAE9C,MAAMU,iBAAiB,GAAG,IAAAJ,cAAO,EAAC,MAAMK,MAAM,CACzCC,OAAO,CAACP,YAAY,IAAI,CAAC,CAAC,CAAC,CAC3BQ,MAAM,CAAC,CAACC,GAAG,EAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;IAC3B,IAAI,OAAOA,KAAK,KAAK,UAAU,EAAE;MAC7B,OAAO;QACH,GAAGF,GAAG;QACN,CAACC,GAAG,GAAG,IAAAE,sBAAe,EAACF,GAAG,EAAEC,KAAK,EAAEb,QAAQ;MAC/C,CAAC;IACL;IAEA,OAAOe,uBAAU,CAACC,MAAM,CAAC;MACrB,GAAGL,GAAG;MACN,CAACC,GAAG,GAAG,IAAAK,kBAAW,EAACL,GAAG,EAAE,IAAAM,iBAAU,EAC9BL,KAAK,EACLb,QAAQ,EACR,CAACmB,aAAK,IAAI,CAACf,eAAS,CAACgB,QAAQ,CAACC,MAAM,CAACC,2BAA2B,CACpE;IACJ,CAAC,CAAC;EACN,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAACpB,YAAY,EAAEF,QAAQ,EAAEF,OAAO,EAAED,MAAM,CACpD,CAAC;EAED,IAAA0B,aAAM,EAAChB,iBAA8C,CAAC;EAEtD,OAAO;IACHX,KAAK;IACL4B,UAAU,EAAE3B,MAAM,CAAC2B,UAAU;IAC7BC,MAAM,EAAElB;EACZ,CAAC;AACL,CAAC;AAAAmB,OAAA,CAAAjC,SAAA,GAAAA,SAAA","ignoreList":[]}
|
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "mq", {
|
|
51
51
|
return _mq.mq;
|
52
52
|
}
|
53
53
|
});
|
54
|
+
Object.defineProperty(exports, "parseColor", {
|
55
|
+
enumerable: true,
|
56
|
+
get: function () {
|
57
|
+
return _parseColor.parseColor;
|
58
|
+
}
|
59
|
+
});
|
54
60
|
Object.defineProperty(exports, "parseMq", {
|
55
61
|
enumerable: true,
|
56
62
|
get: function () {
|
@@ -81,4 +87,5 @@ var _breakpoints = require("./breakpoints");
|
|
81
87
|
var _styles = require("./styles");
|
82
88
|
var _withPlugins = require("./withPlugins");
|
83
89
|
var _generateId = require("./generateId");
|
90
|
+
var _parseColor = require("./parseColor");
|
84
91
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_mq","require","_mqParser","_breakpoints","_styles","_withPlugins","_generateId"],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":"
|
1
|
+
{"version":3,"names":["_mq","require","_mqParser","_breakpoints","_styles","_withPlugins","_generateId","_parseColor"],"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;AACA,IAAAM,WAAA,GAAAN,OAAA","ignoreList":[]}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.parseColor = void 0;
|
7
|
+
const parseAlpha = alpha => {
|
8
|
+
if (alpha > 1 || alpha < 0) {
|
9
|
+
return 1;
|
10
|
+
}
|
11
|
+
return alpha;
|
12
|
+
};
|
13
|
+
const parseColor = (color, alpha = 1) => {
|
14
|
+
if (!color) {
|
15
|
+
return ['', 1];
|
16
|
+
}
|
17
|
+
|
18
|
+
// ignore alpha for 8 digit hex colors
|
19
|
+
if (color.startsWith('#') && color.length === 9) {
|
20
|
+
return [color, 1];
|
21
|
+
}
|
22
|
+
if (color.startsWith('#') && color.length === 7) {
|
23
|
+
return [color, parseAlpha(alpha)];
|
24
|
+
}
|
25
|
+
|
26
|
+
// named colors
|
27
|
+
return [color, 1];
|
28
|
+
};
|
29
|
+
exports.parseColor = parseColor;
|
30
|
+
//# sourceMappingURL=parseColor.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["parseAlpha","alpha","parseColor","color","startsWith","length","exports"],"sourceRoot":"../../../src","sources":["utils/parseColor.ts"],"mappings":";;;;;;AAEA,MAAMA,UAAU,GAAIC,KAAa,IAAK;EAClC,IAAIA,KAAK,GAAG,CAAC,IAAIA,KAAK,GAAG,CAAC,EAAE;IACxB,OAAO,CAAC;EACZ;EAEA,OAAOA,KAAK;AAChB,CAAC;AAEM,MAAMC,UAAU,GAAGA,CAACC,KAAa,EAAEF,KAAa,GAAG,CAAC,KAAuB;EAC9E,IAAI,CAACE,KAAK,EAAE;IACR,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;EAClB;;EAEA;EACA,IAAIA,KAAK,CAACC,UAAU,CAAC,GAAG,CAAC,IAAID,KAAK,CAACE,MAAM,KAAK,CAAC,EAAE;IAC7C,OAAO,CAACF,KAAK,EAAE,CAAC,CAAC;EACrB;EAEA,IAAIA,KAAK,CAACC,UAAU,CAAC,GAAG,CAAC,IAAID,KAAK,CAACE,MAAM,KAAK,CAAC,EAAE;IAC7C,OAAO,CAACF,KAAK,EAAEH,UAAU,CAACC,KAAK,CAAC,CAAC;EACrC;;EAEA;EACA,OAAO,CAACE,KAAK,EAAE,CAAC,CAAC;AACrB,CAAC;AAAAG,OAAA,CAAAJ,UAAA,GAAAA,UAAA","ignoreList":[]}
|
@@ -25,13 +25,17 @@ export class UnistylesBridgeWeb {
|
|
25
25
|
#statusBar = {
|
26
26
|
height: 0,
|
27
27
|
width: 0,
|
28
|
-
setColor: () => {}
|
28
|
+
setColor: () => {},
|
29
|
+
setHidden: () => {}
|
29
30
|
};
|
30
31
|
#navigationBar = {
|
31
32
|
height: 0,
|
32
33
|
width: 0,
|
33
|
-
setColor: () => {}
|
34
|
+
setColor: () => {},
|
35
|
+
setHidden: () => {}
|
34
36
|
};
|
37
|
+
#pixelRatio = 1.0;
|
38
|
+
#fontScale = 1.0;
|
35
39
|
constructor() {
|
36
40
|
if (!isServer) {
|
37
41
|
this.setupListeners();
|
@@ -71,6 +75,10 @@ export class UnistylesBridgeWeb {
|
|
71
75
|
return this.#statusBar;
|
72
76
|
case 'navigationBar':
|
73
77
|
return this.#navigationBar;
|
78
|
+
case 'pixelRatio':
|
79
|
+
return this.#pixelRatio;
|
80
|
+
case 'fontScale':
|
81
|
+
return this.#fontScale;
|
74
82
|
case 'useTheme':
|
75
83
|
return themeName => this.useTheme(themeName);
|
76
84
|
case 'updateTheme':
|
@@ -83,6 +91,10 @@ export class UnistylesBridgeWeb {
|
|
83
91
|
return (pluginName, notify) => this.addPlugin(pluginName, notify);
|
84
92
|
case 'removePlugin':
|
85
93
|
return pluginName => this.removePlugin(pluginName);
|
94
|
+
case 'setRootViewBackgroundColor':
|
95
|
+
return color => this.setRootViewBackgroundColor(color);
|
96
|
+
case 'setImmersiveMode':
|
97
|
+
return () => {};
|
86
98
|
default:
|
87
99
|
return Reflect.get(this, prop);
|
88
100
|
}
|
@@ -191,6 +203,9 @@ export class UnistylesBridgeWeb {
|
|
191
203
|
}
|
192
204
|
return 'light';
|
193
205
|
}
|
206
|
+
setRootViewBackgroundColor(color) {
|
207
|
+
document.body.style.backgroundColor = color;
|
208
|
+
}
|
194
209
|
emitPluginChange() {
|
195
210
|
this.#unistylesEvents.emit('__unistylesOnChange', {
|
196
211
|
type: 'plugin'
|
@@ -1 +1 @@
|
|
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","contentSizeCategory","insets","top","right","bottom","left","statusBar","height","width","setColor","navigationBar","constructor","setupListeners","install","globalThis","__UNISTYLES__","Proxy","get","_target","prop","getTheme","useTheme","updateTheme","useBreakpoints","enable","useAdaptiveThemes","pluginName","notify","addPlugin","removePlugin","Reflect","set","target","newValue","receiver","includes","emitThemeChange","Object","entries","sort","a","b","getBreakpointFromScreenWidth","concat","emitPluginChange","filter","length","at","addEventListener","clearTimeout","setTimeout","emitLayoutChange","matchMedia","event","matches","find","value","index","otherBreakpoints","minVal","maxVal","emit","type","payload","orientation","screen","UnistylesModule"],"sourceRoot":"../../../src","sources":["core/UnistylesModule.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;EAC5C,CAACC,mBAAmB,GAAW,aAAa;EAC5C,CAACC,MAAM,GAAiB;IACpBC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE;EACV,CAAC;EACD,CAACC,SAAS,GAAc;IACpBC,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,CAAC;IACRC,QAAQ,EAAEA,CAAA,KAAM,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","contentSizeCategory","insets","top","right","bottom","left","statusBar","height","width","setColor","setHidden","navigationBar","pixelRatio","fontScale","constructor","setupListeners","install","globalThis","__UNISTYLES__","Proxy","get","_target","prop","getTheme","useTheme","updateTheme","useBreakpoints","enable","useAdaptiveThemes","pluginName","notify","addPlugin","removePlugin","color","setRootViewBackgroundColor","Reflect","set","target","newValue","receiver","includes","emitThemeChange","Object","entries","sort","a","b","getBreakpointFromScreenWidth","concat","emitPluginChange","filter","length","at","addEventListener","clearTimeout","setTimeout","emitLayoutChange","matchMedia","event","matches","find","value","index","otherBreakpoints","minVal","maxVal","document","body","style","backgroundColor","emit","type","payload","orientation","screen","UnistylesModule"],"sourceRoot":"../../../src","sources":["core/UnistylesModule.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;EAC5C,CAACC,mBAAmB,GAAW,aAAa;EAC5C,CAACC,MAAM,GAAiB;IAC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