react-native-unistyles 2.8.2 → 2.8.3
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/core/mocks/UnistylesMockedRuntime.js +19 -0
- package/lib/commonjs/core/mocks/UnistylesMockedRuntime.js.map +1 -1
- package/lib/module/core/mocks/UnistylesMockedRuntime.js +19 -0
- package/lib/module/core/mocks/UnistylesMockedRuntime.js.map +1 -1
- package/lib/typescript/src/core/mocks/UnistylesMockedRuntime.d.ts +25 -0
- package/lib/typescript/src/core/mocks/UnistylesMockedRuntime.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/mocks/UnistylesMockedRuntime.ts +20 -0
@@ -13,6 +13,25 @@ class UnistylesMockedRuntime {
|
|
13
13
|
this.unistylesRegistry = unistylesRegistry;
|
14
14
|
this.unistylesRegistry = unistylesRegistry;
|
15
15
|
}
|
16
|
+
get miniRuntime() {
|
17
|
+
return {
|
18
|
+
contentSizeCategory: this.contentSizeCategory,
|
19
|
+
breakpoint: this.breakpoint,
|
20
|
+
screen: this.screen,
|
21
|
+
insets: this.insets,
|
22
|
+
statusBar: {
|
23
|
+
width: this.statusBar.width,
|
24
|
+
height: this.statusBar.height
|
25
|
+
},
|
26
|
+
navigationBar: {
|
27
|
+
width: this.navigationBar.width,
|
28
|
+
height: this.navigationBar.height
|
29
|
+
},
|
30
|
+
orientation: this.orientation,
|
31
|
+
pixelRatio: this.pixelRatio,
|
32
|
+
fontScale: this.fontScale
|
33
|
+
};
|
34
|
+
}
|
16
35
|
get colorScheme() {
|
17
36
|
return 'dark';
|
18
37
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_common","require","UnistylesMockedRuntime","constructor","unistylesBridge","unistylesRegistry","
|
1
|
+
{"version":3,"names":["_common","require","UnistylesMockedRuntime","constructor","unistylesBridge","unistylesRegistry","miniRuntime","contentSizeCategory","breakpoint","screen","insets","statusBar","width","height","navigationBar","orientation","pixelRatio","fontScale","colorScheme","hasAdaptiveThemes","themeName","themeNames","length","at","undefined","sortedBreakpointPairs","firstBreakpoint","breakpoints","enabledPlugins","plugins","top","right","bottom","left","setColor","setHidden","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;EACpF;EAEA,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,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,CAACf,iBAAiB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L;EAEA,IAAWrB,aAAaA,CAAA,EAAG;IACvB,OAAO;MACHD,MAAM,EAAE,CAAC;MACTD,KAAK,EAAE,CAAC;MACRsB,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;MAClBC,SAAS,EAAEA,CAAA,KAAM,CAAC;IACtB,CAAC;EACL;EAEA,IAAWpB,WAAWA,CAAA,EAAG;IACrB,OAAOqB,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,CAAAjD,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
@@ -6,6 +6,25 @@ export class UnistylesMockedRuntime {
|
|
6
6
|
this.unistylesRegistry = unistylesRegistry;
|
7
7
|
this.unistylesRegistry = unistylesRegistry;
|
8
8
|
}
|
9
|
+
get miniRuntime() {
|
10
|
+
return {
|
11
|
+
contentSizeCategory: this.contentSizeCategory,
|
12
|
+
breakpoint: this.breakpoint,
|
13
|
+
screen: this.screen,
|
14
|
+
insets: this.insets,
|
15
|
+
statusBar: {
|
16
|
+
width: this.statusBar.width,
|
17
|
+
height: this.statusBar.height
|
18
|
+
},
|
19
|
+
navigationBar: {
|
20
|
+
width: this.navigationBar.width,
|
21
|
+
height: this.navigationBar.height
|
22
|
+
},
|
23
|
+
orientation: this.orientation,
|
24
|
+
pixelRatio: this.pixelRatio,
|
25
|
+
fontScale: this.fontScale
|
26
|
+
};
|
27
|
+
}
|
9
28
|
get colorScheme() {
|
10
29
|
return 'dark';
|
11
30
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["ScreenOrientation","UnistylesMockedRuntime","constructor","unistylesBridge","unistylesRegistry","
|
1
|
+
{"version":3,"names":["ScreenOrientation","UnistylesMockedRuntime","constructor","unistylesBridge","unistylesRegistry","miniRuntime","contentSizeCategory","breakpoint","screen","insets","statusBar","width","height","navigationBar","orientation","pixelRatio","fontScale","colorScheme","hasAdaptiveThemes","themeName","themeNames","length","at","undefined","sortedBreakpointPairs","firstBreakpoint","breakpoints","enabledPlugins","plugins","top","right","bottom","left","setColor","setHidden","Portrait","setTheme","name","updateTheme","theme","setAdaptiveThemes","enabled","addPlugin","plugin","removePlugin","setRootViewBackgroundColor","color","setImmersiveMode","isEnabled"],"sourceRoot":"../../../../src","sources":["core/mocks/UnistylesMockedRuntime.ts"],"mappings":"AAAA;AACA,SAASA,iBAAiB,QAAQ,cAAc;AAMhD,OAAO,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;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,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,IAAWjB,UAAUA,CAAA,EAAG;IACpB,OAAO,GAAG;EACd;EAEA,IAAWC,SAASA,CAAA,EAAG;IACnB,OAAO,GAAG;EACd;EAEA,IAAWN,SAASA,CAAA,EAAG;IACnB,OAAO;MACHE,MAAM,EAAE,EAAE;MACVD,KAAK,EAAE,GAAG;MACVsB,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;MAClBC,SAAS,EAAEA,CAAA,KAAM,CAAC;IACtB,CAAC;EACL;EAEA,IAAWrB,aAAaA,CAAA,EAAG;IACvB,OAAO;MACHD,MAAM,EAAE,CAAC;MACTD,KAAK,EAAE,CAAC;MACRsB,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;MAClBC,SAAS,EAAEA,CAAA,KAAM,CAAC;IACtB,CAAC;EACL;EAEA,IAAWpB,WAAWA,CAAA,EAAG;IACrB,OAAOd,iBAAiB,CAACmC,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","ignoreList":[]}
|
@@ -6,6 +6,31 @@ export declare class UnistylesMockedRuntime {
|
|
6
6
|
private unistylesRegistry;
|
7
7
|
private unistylesRegistry;
|
8
8
|
constructor(unistylesBridge: UnistylesBridge, unistylesRegistry: UnistyleRegistry);
|
9
|
+
get miniRuntime(): {
|
10
|
+
contentSizeCategory: string;
|
11
|
+
breakpoint: number | keyof import("../../global").UnistylesBreakpoints | undefined;
|
12
|
+
screen: {
|
13
|
+
width: number;
|
14
|
+
height: number;
|
15
|
+
};
|
16
|
+
insets: {
|
17
|
+
top: number;
|
18
|
+
right: number;
|
19
|
+
bottom: number;
|
20
|
+
left: number;
|
21
|
+
};
|
22
|
+
statusBar: {
|
23
|
+
width: number;
|
24
|
+
height: number;
|
25
|
+
};
|
26
|
+
navigationBar: {
|
27
|
+
width: number;
|
28
|
+
height: number;
|
29
|
+
};
|
30
|
+
orientation: "portrait";
|
31
|
+
pixelRatio: number;
|
32
|
+
fontScale: number;
|
33
|
+
};
|
9
34
|
get colorScheme(): string;
|
10
35
|
get hasAdaptiveThemes(): boolean;
|
11
36
|
get themeName(): undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UnistylesMockedRuntime.d.ts","sourceRoot":"","sources":["../../../../../src/core/mocks/UnistylesMockedRuntime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,qBAAa,sBAAsB;IAGnB,OAAO,CAAC,eAAe;IAAmB,OAAO,CAAC,iBAAiB;IAF/E,OAAO,CAAC,iBAAiB,CAAyB;gBAE9B,eAAe,EAAE,eAAe,EAAU,iBAAiB,EAAE,gBAAgB;IAIjG,IAAW,WAAW,WAErB;IAED,IAAW,iBAAiB,YAE3B;IAED,IAAW,SAAS,cAInB;IAED,IAAW,mBAAmB,WAE7B;IAED,IAAW,UAAU,2EAUpB;IAED,IAAW,WAAW,gDAErB;IAED,IAAW,cAAc,sBAExB;IAED,IAAW,MAAM;;;MAKhB;IAED,IAAW,MAAM;;;;;MAOhB;IAED,IAAW,UAAU,WAEpB;IAED,IAAW,SAAS,WAEnB;IAED,IAAW,SAAS;;;;;MAOnB;IAED,IAAW,aAAa;;;;;MAOvB;IAED,IAAW,WAAW,eAErB;IAEM,QA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AAS,eAAe,CAAC,MAAM,eAAe,CAAC,UAAO;IAChG,iBAAiB,YAAa,OAAO,UAAO;IAC5C,SAAS,WAAY,eAAe,UAAO;IAC3C,YAAY,WAAY,eAAe,UAAO;IAC9C,0BAA0B,WAAY,KAAK,GAAG,MAAM,UAAO;IAC3D,gBAAgB,cAAe,OAAO,UAAO;CACvD"}
|
package/package.json
CHANGED
@@ -12,6 +12,26 @@ export class UnistylesMockedRuntime {
|
|
12
12
|
this.unistylesRegistry = unistylesRegistry as unknown as UnistylesMockedRegistry
|
13
13
|
}
|
14
14
|
|
15
|
+
public get miniRuntime() {
|
16
|
+
return {
|
17
|
+
contentSizeCategory: this.contentSizeCategory,
|
18
|
+
breakpoint: this.breakpoint,
|
19
|
+
screen: this.screen,
|
20
|
+
insets: this.insets,
|
21
|
+
statusBar: {
|
22
|
+
width: this.statusBar.width,
|
23
|
+
height: this.statusBar.height
|
24
|
+
},
|
25
|
+
navigationBar: {
|
26
|
+
width: this.navigationBar.width,
|
27
|
+
height: this.navigationBar.height
|
28
|
+
},
|
29
|
+
orientation: this.orientation,
|
30
|
+
pixelRatio: this.pixelRatio,
|
31
|
+
fontScale: this.fontScale
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
15
35
|
public get colorScheme() {
|
16
36
|
return 'dark'
|
17
37
|
}
|