react-native-unistyles 2.6.0-rc.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +15 -2
- package/ios/UnistylesModule.h +2 -0
- package/ios/platform/Platform_tvOS.h +23 -0
- package/ios/platform/Platform_tvOS.mm +147 -0
- package/lib/commonjs/core/UnistylesModule.js +3 -0
- package/lib/commonjs/core/UnistylesModule.js.map +1 -1
- package/lib/module/core/UnistylesModule.js +3 -0
- package/lib/module/core/UnistylesModule.js.map +1 -1
- package/lib/typescript/src/core/UnistylesModule.d.ts.map +1 -1
- package/package.json +4 -1
- package/react-native-unistyles.podspec +1 -1
- package/src/core/UnistylesModule.ts +4 -1
package/README.md
CHANGED
@@ -9,9 +9,11 @@
|
|
9
9
|
[![platform - web](https://img.shields.io/badge/React_Native_Web-white?logo=react&logoColor=57BDDA&style=for-the-badge)](https://www.w3.org/)
|
10
10
|
[![platform - ios](https://img.shields.io/badge/iOS-000?logo=apple&style=for-the-badge)](https://developer.apple.com/ios/)
|
11
11
|
[![platform - macos](https://img.shields.io/badge/macOS-000?logo=apple&style=for-the-badge)](https://developer.apple.com/macos/)
|
12
|
+
[![platform - appletv](https://img.shields.io/badge/Apple_TV-000?logo=apple&style=for-the-badge)](https://developer.apple.com/tvos/)
|
12
13
|
[![platform - windows](https://img.shields.io/badge/windows-00a2ed?logo=windows&style=for-the-badge)](https://microsoft.github.io/react-native-windows/docs/getting-started)
|
13
14
|
[![platform - ssr](https://img.shields.io/badge/SSR-black?style=for-the-badge&logo=next.js&logoColor=white)](https://nextjs.org/)
|
14
15
|
[![platform - android](https://img.shields.io/badge/Android-44CD11?style=for-the-badge&logo=android&logoColor=white)](https://developer.android.com/)
|
16
|
+
[![platform - androidtv](https://img.shields.io/badge/Android_TV-44CD11?style=for-the-badge&logo=android&logoColor=white)](https://www.android.com/intl/pl_pl/tv/)
|
15
17
|
|
16
18
|
<a href="https://github.com/jpudysz?tab=followers">
|
17
19
|
<img src="https://img.shields.io/github/followers/jpudysz?label=Follow%20%40jpudysz&style=social" />
|
@@ -30,7 +32,7 @@
|
|
30
32
|
|
31
33
|
## Features
|
32
34
|
- 🚀 Shared core with C++ and JSI bindings
|
33
|
-
- 🌉 Supports new architecture
|
35
|
+
- 🌉 Supports new architecture and bridgeless mode
|
34
36
|
- 🔥 Crazy performance, adds under 0.1 ms to your StyleSheet
|
35
37
|
- 🎳 Share up to 100% of your styles across platforms in monorepo
|
36
38
|
- 🎯 Doesn't introduce new components, everything is packed in one hook
|
@@ -56,7 +58,18 @@
|
|
56
58
|
<a href="https://github.com/kmartinezmedia">
|
57
59
|
<img src="https://avatars.githubusercontent.com/u/6308123?s=200&v=4" height="70px" width="70px" alt="kmartinezmedia" />
|
58
60
|
</a>
|
61
|
+
<a href="https://github.com/mobily">
|
62
|
+
<img src="https://avatars.githubusercontent.com/u/1467712?v=4" height="70px" width="70px" alt="mobily" />
|
63
|
+
</a>
|
64
|
+
<a href="https://github.com/levibuzolic">
|
65
|
+
<img src="https://avatars.githubusercontent.com/u/721323?v=4" height="70px" width="70px" alt="levibuzolic" />
|
66
|
+
</a>
|
59
67
|
|
68
|
+
## UI Kits
|
69
|
+
|
70
|
+
<a href="https://stacks.grapp.dev/">
|
71
|
+
<img src="https://raw.githubusercontent.com/grapp-dev/stacks/main/assets/stacks-logo.png" height="70px" width="70px" alt="Stacks" />
|
72
|
+
</a>
|
60
73
|
|
61
74
|
## Installation
|
62
75
|
|
@@ -66,7 +79,7 @@ yarn add react-native-unistyles
|
|
66
79
|
|
67
80
|
## Benchmarks
|
68
81
|
|
69
|
-
<img src="https://
|
82
|
+
<img src="https://www.unistyl.es/_astro/benchmark-2.CMC1bK7S.png" />
|
70
83
|
|
71
84
|
|
72
85
|
## Discord
|
package/ios/UnistylesModule.h
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
#include <string>
|
2
|
+
#include <map>
|
3
|
+
#include <UnistylesRuntime.h>
|
4
|
+
|
5
|
+
@interface Platform : NSObject
|
6
|
+
|
7
|
+
@property (nonatomic, assign) Dimensions initialScreen;
|
8
|
+
@property (nonatomic, assign) std::string initialColorScheme;
|
9
|
+
@property (nonatomic, assign) std::string initialContentSizeCategory;
|
10
|
+
@property (nonatomic, assign) Insets initialInsets;
|
11
|
+
@property (nonatomic, assign) Dimensions initialStatusBar;
|
12
|
+
@property (nonatomic, assign) Dimensions initialNavigationBar;
|
13
|
+
@property (nonatomic, assign) void* unistylesRuntime;
|
14
|
+
|
15
|
+
- (instancetype)init;
|
16
|
+
|
17
|
+
- (void)onAppearanceChange:(NSNotification *)notification;
|
18
|
+
- (void)onContentSizeCategoryChange:(NSNotification *)notification;
|
19
|
+
|
20
|
+
- (std::string)getColorScheme;
|
21
|
+
|
22
|
+
@end
|
23
|
+
|
@@ -0,0 +1,147 @@
|
|
1
|
+
#if TARGET_OS_TV
|
2
|
+
|
3
|
+
#import "Platform_tvOS.h"
|
4
|
+
#import "UnistylesRuntime.h"
|
5
|
+
#import <React/RCTAppearance.h>
|
6
|
+
|
7
|
+
@implementation Platform
|
8
|
+
|
9
|
+
- (instancetype)init {
|
10
|
+
self = [super init];
|
11
|
+
if (self) {
|
12
|
+
UIScreen *screen = [UIScreen mainScreen];
|
13
|
+
UIContentSizeCategory contentSizeCategory = [[UIApplication sharedApplication] preferredContentSizeCategory];
|
14
|
+
|
15
|
+
self.initialScreen = {(int)screen.bounds.size.width, (int)screen.bounds.size.height};
|
16
|
+
self.initialColorScheme = [self getColorScheme];
|
17
|
+
self.initialContentSizeCategory = [self getContentSizeCategory:contentSizeCategory];
|
18
|
+
self.initialStatusBar = [self getStatusBarDimensions];
|
19
|
+
self.initialInsets = [self getInsets];
|
20
|
+
|
21
|
+
[self setupListeners];
|
22
|
+
}
|
23
|
+
return self;
|
24
|
+
}
|
25
|
+
|
26
|
+
- (void)dealloc {
|
27
|
+
if (self.unistylesRuntime != nullptr) {
|
28
|
+
self.unistylesRuntime = nullptr;
|
29
|
+
}
|
30
|
+
|
31
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self
|
32
|
+
name: UIContentSizeCategoryDidChangeNotification
|
33
|
+
object: nil];
|
34
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self
|
35
|
+
name: RCTUserInterfaceStyleDidChangeNotification
|
36
|
+
object: nil];
|
37
|
+
}
|
38
|
+
|
39
|
+
- (void)setupListeners {
|
40
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
41
|
+
selector:@selector(onAppearanceChange:)
|
42
|
+
name:RCTUserInterfaceStyleDidChangeNotification
|
43
|
+
object:nil];
|
44
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
45
|
+
selector:@selector(onContentSizeCategoryChange:)
|
46
|
+
name:UIContentSizeCategoryDidChangeNotification
|
47
|
+
object:nil];
|
48
|
+
}
|
49
|
+
|
50
|
+
- (void)onAppearanceChange:(NSNotification *)notification {
|
51
|
+
std::string colorScheme = [self getColorScheme];
|
52
|
+
|
53
|
+
if (self.unistylesRuntime != nullptr) {
|
54
|
+
((UnistylesRuntime*)self.unistylesRuntime)->handleAppearanceChange(colorScheme);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
- (void)onContentSizeCategoryChange:(NSNotification *)notification {
|
59
|
+
UIContentSizeCategory contentSizeCategory = [[UIApplication sharedApplication] preferredContentSizeCategory];
|
60
|
+
|
61
|
+
if (self.unistylesRuntime != nullptr) {
|
62
|
+
((UnistylesRuntime*)self.unistylesRuntime)->handleContentSizeCategoryChange([self getContentSizeCategory:contentSizeCategory]);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
- (std::string)getColorScheme {
|
67
|
+
UIUserInterfaceStyle colorScheme = [UIScreen mainScreen].traitCollection.userInterfaceStyle;
|
68
|
+
|
69
|
+
switch (colorScheme) {
|
70
|
+
case UIUserInterfaceStyleLight:
|
71
|
+
return UnistylesLightScheme;
|
72
|
+
case UIUserInterfaceStyleDark:
|
73
|
+
return UnistylesDarkScheme;
|
74
|
+
case UIUserInterfaceStyleUnspecified:
|
75
|
+
default:
|
76
|
+
return UnistylesUnspecifiedScheme;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
- (Insets)getInsets {
|
81
|
+
return {0, 0, 0, 0};
|
82
|
+
}
|
83
|
+
|
84
|
+
- (Dimensions)getStatusBarDimensions {
|
85
|
+
return {0, 0};
|
86
|
+
}
|
87
|
+
|
88
|
+
- (Dimensions)getNavigationBarDimensions {
|
89
|
+
return {0, 0};
|
90
|
+
}
|
91
|
+
|
92
|
+
- (std::string)getContentSizeCategory:(UIContentSizeCategory)contentSizeCategory {
|
93
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryExtraExtraExtraLarge]) {
|
94
|
+
return std::string([@"xxxLarge" UTF8String]);
|
95
|
+
}
|
96
|
+
|
97
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryExtraExtraLarge]) {
|
98
|
+
return std::string([@"xxLarge" UTF8String]);
|
99
|
+
}
|
100
|
+
|
101
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryExtraLarge]) {
|
102
|
+
return std::string([@"xLarge" UTF8String]);
|
103
|
+
}
|
104
|
+
|
105
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryLarge]) {
|
106
|
+
return std::string([@"Large" UTF8String]);
|
107
|
+
}
|
108
|
+
|
109
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryMedium]) {
|
110
|
+
return std::string([@"Medium" UTF8String]);
|
111
|
+
}
|
112
|
+
|
113
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategorySmall]) {
|
114
|
+
return std::string([@"Small" UTF8String]);
|
115
|
+
}
|
116
|
+
|
117
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryExtraSmall]) {
|
118
|
+
return std::string([@"xSmall" UTF8String]);
|
119
|
+
}
|
120
|
+
|
121
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryAccessibilityMedium]) {
|
122
|
+
return std::string([@"accessibilityMedium" UTF8String]);
|
123
|
+
}
|
124
|
+
|
125
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryAccessibilityLarge]) {
|
126
|
+
return std::string([@"accessibilityLarge" UTF8String]);
|
127
|
+
}
|
128
|
+
|
129
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryAccessibilityExtraLarge]) {
|
130
|
+
return std::string([@"accessibilityExtraLarge" UTF8String]);
|
131
|
+
}
|
132
|
+
|
133
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryAccessibilityExtraExtraLarge]) {
|
134
|
+
return std::string([@"accessibilityExtraExtraLarge" UTF8String]);
|
135
|
+
}
|
136
|
+
|
137
|
+
if ([contentSizeCategory isEqualToString:UIContentSizeCategoryAccessibilityExtraExtraExtraLarge]) {
|
138
|
+
return std::string([@"accessibilityExtraExtraExtraLarge" UTF8String]);
|
139
|
+
}
|
140
|
+
|
141
|
+
return std::string([@"unspecified" UTF8String]);
|
142
|
+
}
|
143
|
+
|
144
|
+
@end
|
145
|
+
|
146
|
+
|
147
|
+
#endif
|
@@ -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;EACrB,CAAC;EACD,CAACC,aAAa,GAAkB;IAC5BH,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,CAAC;IACRC,QAAQ,EAAEA,CAAA,KAAM,CAAC;EACrB,C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f,YAAYA,CAACH,UAAkB,EAAE;IACrC,IAAI,CAAC,CAACnC,cAAc,GAAG,IAAI,CAAC,CAACA,cAAc,CAACsD,MAAM,CAACpD,IAAI,IAAIA,IAAI,KAAKiC,UAAU,CAAC;IAC/E,IAAI,CAACkB,gBAAgB,CAAC,CAAC;EAC3B;EAEQxB,QAAQA,CAAA,EAA0B;
|
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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AW;UACxB2B,MAAM,EAAE,IAAI,CAAC,CAACvB;QAClB;MACJ;IACJ,CAAC,CAAC;EACN;AACJ;AAACkF,OAAA,CAAA3F,kBAAA,GAAAA,kBAAA;AAEM,MAAM4F,eAAe,GAAAD,OAAA,CAAAC,eAAA,GAAG,IAAI5F,kBAAkB,CAAC,CAAC","ignoreList":[]}
|
@@ -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,Q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,IAAI,CAAC,KAAKC,CAAC,IAAI,CAAC,CAAC,CAAgD;IAE/F,IAAI,CAAC/D,QAAQ,EAAE;MACX,IAAI,CAAC,CAACqB,UAAU,GAAG,IAAI,CAAC2C,4BAA4B,CAAC,IAAI,CAAC,CAAC1D,WAAqB,CAAC;IACrF;EACJ;EAEQyC,iBAAiBA,CAACD,MAAe,EAAE;IACvC,IAAI,CAAC,CAAC1C,iBAAiB,GAAG0C,MAAM;IAEhC,IAAI,CAAC,IAAI,CAAC,CAAC1C,iBAAiB,IAAI,CAAC,IAAI,CAAC,CAACC,4BAA4B,EAAE;MACjE;IACJ;IAEA,IAAI,IAAI,CAAC,CAACU,SAAS,KAAK,IAAI,CAAC,CAACF,WAAW,EAAE;MACvC,IAAI,CAAC,CAACE,SAAS,GAAG,IAAI,CAAC,CAACF,WAAoC;MAC5D,IAAI,CAAC6C,eAAe,CAAC,CAAC;IAC1B;EACJ;EAEQR,SAASA,CAACF,UAAkB,EAAEC,MAAe,EAAE;IACnD,IAAI,CAAC,CAACjC,cAAc,GAAG,CAACgC,UAAU,CAAC,CAACiB,MAAM,CAAC,IAAI,CAAC,CAACjD,cAAc,CAAC;IAEhE,IAAIiC,MAAM,EAAE;MACR,IAAI,CAACiB,gBAAgB,CAAC,CAAC;IAC3B;EACJ;EAEQf,YAAYA,CAACH,UAAkB,EAAE;IACrC,IAAI,CAAC,CAAChC,cAAc,GAAG,IAAI,CAAC,CAACA,cAAc,CAACmD,MAAM,CAAClD,IAAI,IAAIA,IAAI,KAAK+B,UAAU,CAAC;IAC/E,IAAI,CAACkB,gBAAgB,CAAC,CAAC;EAC3B;EAEQxB,QAAQA,CAAA,EAA0B;
|
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,aAA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AU,IAAInE,MAAM,CAACmE,UAAU,CAAC,8BAA8B,CAAC,CAACE,OAAO,EAAE;MAC7F,OAAO,MAAM;IACjB;IAEA,OAAO,OAAO;EAClB;EAEQV,gBAAgBA,CAAA,EAAG;IACvB,IAAI,CAAC,CAAChD,eAAe,CAACiE,IAAI,CAAC,qBAAqB,EAAE;MAC9CC,IAAI,EAAE;IACV,CAAC,CAAC;EACN;EAEQ1B,eAAeA,CAAA,EAAG;IACtB,IAAI,CAAC,CAACxC,eAAe,CAACiE,IAAI,CAAC,qBAAqB,EAAE;MAC9CC,IAAI,EAAE,OAAO;MACbC,OAAO,EAAE;QACLtE,SAAS,EAAE,IAAI,CAAC,CAACA;MACrB;IACJ,CAAC,CAAC;EACN;EAEQ0D,gBAAgBA,CAAA,EAAG;IACvB,IAAI,CAAC,CAACvD,eAAe,CAACiE,IAAI,CAAC,qBAAqB,EAAE;MAC9CC,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE;QACLhE,UAAU,EAAE,IAAI,CAAC,CAACA,UAAU;QAC5BiE,WAAW,EAAG,IAAI,CAAC,CAAChF,WAAW,GAAe,IAAI,CAAC,CAACG,YAAuB,GACrE,WAAW,GACX,UAAU;QAChB8E,MAAM,EAAE;UACJzD,KAAK,EAAE,IAAI,CAAC,CAACxB,WAAW;UACxBuB,MAAM,EAAE,IAAI,CAAC,CAACpB;QAClB;MACJ;IACJ,CAAC,CAAC;EACN;AACJ;AAEA,OAAO,MAAM+E,eAAe,GAAG,IAAIvF,kBAAkB,CAAC,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UnistylesModule.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.ts"],"names":[],"mappings":"AAMA,qBAAa,kBAAkB;;;IAwCpB,OAAO;IAuEd,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,WAAW;
|
1
|
+
{"version":3,"file":"UnistylesModule.d.ts","sourceRoot":"","sources":["../../../../src/core/UnistylesModule.ts"],"names":[],"mappings":"AAMA,qBAAa,kBAAkB;;;IAwCpB,OAAO;IAuEd,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,cAAc;IA6BtB,OAAO,CAAC,4BAA4B;IAgBpC,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,gBAAgB;CAe3B;AAED,eAAO,MAAM,eAAe,oBAA2B,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-unistyles",
|
3
|
-
"version": "2.6.0
|
3
|
+
"version": "2.6.0",
|
4
4
|
"description": "Level up your React Native StyleSheet",
|
5
5
|
"scripts": {
|
6
6
|
"test": "jest",
|
@@ -43,6 +43,7 @@
|
|
43
43
|
"react-native-macos",
|
44
44
|
"react-native-windows",
|
45
45
|
"react-native-web",
|
46
|
+
"react-native-tvos",
|
46
47
|
"expo"
|
47
48
|
],
|
48
49
|
"repository": "https://github.com/jpudysz/react-native-unistyles",
|
@@ -117,6 +118,7 @@
|
|
117
118
|
"examples/macos",
|
118
119
|
"examples/win",
|
119
120
|
"examples/bare",
|
121
|
+
"examples/tv",
|
120
122
|
"docs"
|
121
123
|
],
|
122
124
|
"packageManager": "yarn@3.6.4",
|
@@ -130,6 +132,7 @@
|
|
130
132
|
"<rootDir>/examples/macos/node_modules",
|
131
133
|
"<rootDir>/examples/win/node_modules",
|
132
134
|
"<rootDir>/examples/bare/node_modules",
|
135
|
+
"<rootDir>/examples/tv/node_modules",
|
133
136
|
"<rootDir>/docs/node_modules",
|
134
137
|
"<rootDir>/lib/"
|
135
138
|
],
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
10
10
|
s.license = package["license"]
|
11
11
|
s.authors = package["author"]
|
12
12
|
|
13
|
-
s.platforms = { :ios => min_ios_version_supported, :osx => "10.14" }
|
13
|
+
s.platforms = { :ios => min_ios_version_supported, :osx => "10.14", :tvos => "9.0" }
|
14
14
|
s.source = { :git => package["repository"], :tag => "#{s.version}" }
|
15
15
|
|
16
16
|
s.source_files = [
|
@@ -121,6 +121,10 @@ export class UnistylesBridgeWeb {
|
|
121
121
|
}
|
122
122
|
|
123
123
|
private updateTheme(themeName: keyof UnistylesThemes) {
|
124
|
+
if (!this.#themeName) {
|
125
|
+
this.#themeName = this.getTheme()
|
126
|
+
}
|
127
|
+
|
124
128
|
if (this.#themeName === themeName) {
|
125
129
|
this.emitThemeChange()
|
126
130
|
}
|
@@ -164,7 +168,6 @@ export class UnistylesBridgeWeb {
|
|
164
168
|
}
|
165
169
|
|
166
170
|
private getTheme(): keyof UnistylesThemes {
|
167
|
-
|
168
171
|
if (this.#themes.length === 1) {
|
169
172
|
return this.#themes.at(0) as keyof UnistylesThemes
|
170
173
|
}
|