react-native-unistyles 3.0.0-alpha.25 → 3.0.0-alpha.27
Sign up to get free protection for your applications and to get access to all the features.
- package/cxx/core/UnistylesRegistry.cpp +10 -10
- package/cxx/core/UnistylesState.cpp +8 -0
- package/cxx/core/UnistylesState.h +1 -0
- package/cxx/hybridObjects/HybridStyleSheet.cpp +15 -5
- package/cxx/hybridObjects/HybridStyleSheet.h +5 -0
- package/ios/UnistylesModuleOnLoad.h +10 -1
- package/lib/commonjs/core/useTheme.js.map +1 -1
- package/lib/commonjs/core/useTheme.native.js.map +1 -1
- package/lib/commonjs/index.js +0 -14
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/StyleSheet/index.js +1 -0
- package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
- package/lib/module/core/useTheme.js.map +1 -1
- package/lib/module/core/useTheme.native.js.map +1 -1
- package/lib/module/index.js +0 -13
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/StyleSheet/index.js +1 -0
- package/lib/module/specs/StyleSheet/index.js.map +1 -1
- package/lib/module/web/utils/unistyle.js.map +1 -1
- package/lib/typescript/src/core/useBreakpoint.d.ts +1 -1
- package/lib/typescript/src/core/useBreakpoint.d.ts.map +1 -1
- package/lib/typescript/src/core/useBreakpoint.native.d.ts +1 -1
- package/lib/typescript/src/core/useBreakpoint.native.d.ts.map +1 -1
- package/lib/typescript/src/core/useTheme.d.ts +2 -40
- package/lib/typescript/src/core/useTheme.d.ts.map +1 -1
- package/lib/typescript/src/core/useTheme.native.d.ts +2 -40
- package/lib/typescript/src/core/useTheme.native.d.ts.map +1 -1
- package/lib/typescript/src/global.d.ts +2 -0
- package/lib/typescript/src/global.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts +2 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
- package/lib/typescript/src/types/variants.d.ts +1 -1
- package/lib/typescript/src/types/variants.d.ts.map +1 -1
- package/lib/typescript/src/web/create.d.ts +10 -1220
- package/lib/typescript/src/web/create.d.ts.map +1 -1
- package/lib/typescript/src/web/index.d.ts +10 -1220
- package/lib/typescript/src/web/index.d.ts.map +1 -1
- package/lib/typescript/src/web/runtime.d.ts +4 -4
- package/lib/typescript/src/web/runtime.d.ts.map +1 -1
- package/lib/typescript/src/web/state.d.ts +1 -2
- package/lib/typescript/src/web/state.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/unistyle.d.ts +1 -1
- package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/core/useTheme.native.ts +2 -1
- package/src/core/useTheme.ts +2 -1
- package/src/global.ts +4 -1
- package/src/index.ts +0 -16
- package/src/specs/StyleSheet/index.ts +4 -1
- package/src/types/variants.ts +1 -1
- package/src/web/utils/unistyle.ts +1 -1
- package/lib/typescript/example/App.d.ts +0 -4
- package/lib/typescript/example/App.d.ts.map +0 -1
- package/lib/typescript/example/Typography.d.ts +0 -35
- package/lib/typescript/example/Typography.d.ts.map +0 -1
- package/lib/typescript/example/unistyles.d.ts +0 -63
- package/lib/typescript/example/unistyles.d.ts.map +0 -1
- package/lib/typescript/expo-example/App.d.ts +0 -4
- package/lib/typescript/expo-example/App.d.ts.map +0 -1
- package/lib/typescript/expo-example/app/(tabs)/_layout.d.ts +0 -3
- package/lib/typescript/expo-example/app/(tabs)/_layout.d.ts.map +0 -1
- package/lib/typescript/expo-example/app/(tabs)/explore.d.ts +0 -3
- package/lib/typescript/expo-example/app/(tabs)/explore.d.ts.map +0 -1
- package/lib/typescript/expo-example/app/(tabs)/index.d.ts +0 -3
- package/lib/typescript/expo-example/app/(tabs)/index.d.ts.map +0 -1
- package/lib/typescript/expo-example/app/+html.d.ts +0 -4
- package/lib/typescript/expo-example/app/+html.d.ts.map +0 -1
- package/lib/typescript/expo-example/app/+not-found.d.ts +0 -3
- package/lib/typescript/expo-example/app/+not-found.d.ts.map +0 -1
- package/lib/typescript/expo-example/app/_layout.d.ts +0 -3
- package/lib/typescript/expo-example/app/_layout.d.ts.map +0 -1
- package/lib/typescript/expo-example/unistyles.d.ts +0 -63
- package/lib/typescript/expo-example/unistyles.d.ts.map +0 -1
- package/plugin/__tests__/dependencies.spec.js +0 -448
- package/plugin/__tests__/ref.spec.js +0 -1427
- package/plugin/__tests__/stylesheet.spec.js +0 -507
@@ -88,16 +88,16 @@ void core::UnistylesRegistry::linkShadowNodeWithUnistyle(
|
|
88
88
|
}
|
89
89
|
|
90
90
|
void core::UnistylesRegistry::unlinkShadowNodeWithUnistyles(jsi::Runtime& rt, const ShadowNodeFamily* shadowNodeFamily) {
|
91
|
-
this->_shadowRegistry[&rt]
|
91
|
+
this->_shadowRegistry[&rt].erase(shadowNodeFamily);
|
92
92
|
}
|
93
93
|
|
94
94
|
core::Unistyle::Shared core::UnistylesRegistry::findUnistyleFromKey(jsi::Runtime& rt, std::string styleKey, int tag) {
|
95
95
|
auto targetStyleSheet = this->_styleSheetRegistry[&rt][tag];
|
96
|
-
|
96
|
+
|
97
97
|
if (targetStyleSheet == nullptr) {
|
98
98
|
return nullptr;
|
99
99
|
}
|
100
|
-
|
100
|
+
|
101
101
|
return targetStyleSheet.get()->unistyles[styleKey];
|
102
102
|
}
|
103
103
|
|
@@ -152,26 +152,26 @@ core::DependencyMap core::UnistylesRegistry::buildDependencyMap(jsi::Runtime& rt
|
|
152
152
|
|
153
153
|
std::vector<std::shared_ptr<core::StyleSheet>> core::UnistylesRegistry::getStyleSheetsToRefresh(jsi::Runtime& rt, bool themeDidChange, bool runtimeDidChange) {
|
154
154
|
std::vector<std::shared_ptr<core::StyleSheet>> stylesheetsToRefresh{};
|
155
|
-
|
155
|
+
|
156
156
|
if (!themeDidChange && !runtimeDidChange) {
|
157
157
|
return stylesheetsToRefresh;
|
158
158
|
}
|
159
|
-
|
159
|
+
|
160
160
|
auto& styleSheets = this->_styleSheetRegistry[&rt];
|
161
|
-
|
161
|
+
|
162
162
|
std::for_each(styleSheets.begin(), styleSheets.end(), [&](std::pair<int, std::shared_ptr<core::StyleSheet>> pair){
|
163
163
|
auto& [_, styleSheet] = pair;
|
164
|
-
|
164
|
+
|
165
165
|
if (styleSheet->type == StyleSheetType::ThemableWithMiniRuntime && runtimeDidChange) {
|
166
166
|
stylesheetsToRefresh.emplace_back(styleSheet);
|
167
|
-
|
167
|
+
|
168
168
|
return;
|
169
169
|
}
|
170
|
-
|
170
|
+
|
171
171
|
if (styleSheet->type == StyleSheetType::Themable && themeDidChange) {
|
172
172
|
stylesheetsToRefresh.emplace_back(styleSheet);
|
173
173
|
}
|
174
174
|
});
|
175
|
-
|
175
|
+
|
176
176
|
return stylesheetsToRefresh;
|
177
177
|
}
|
@@ -25,6 +25,10 @@ std::optional<std::string>& core::UnistylesState::getCurrentThemeName() {
|
|
25
25
|
|
26
26
|
jsi::Object core::UnistylesState::getCurrentJSTheme() {
|
27
27
|
auto hasSomeThemes = _registeredThemeNames.size() > 0;
|
28
|
+
|
29
|
+
if (!hasSomeThemes && !this->hasUserConfig) {
|
30
|
+
helpers::assertThat(*_rt, false, "Unistyles: One of your stylesheets is trying to get the theme, but no theme has been selected yet. Did you forget to call StyleSheet.configure? If you called it, make sure you did so before any StyleSheet.create.");
|
31
|
+
}
|
28
32
|
|
29
33
|
// return empty object, if user didn't register any themes
|
30
34
|
if (!hasSomeThemes) {
|
@@ -57,6 +61,10 @@ jsi::Object core::UnistylesState::getJSThemeByName(std::string& themeName) {
|
|
57
61
|
}
|
58
62
|
|
59
63
|
void core::UnistylesState::computeCurrentBreakpoint(int screenWidth) {
|
64
|
+
if (this->_sortedBreakpointPairs.size() == 0) {
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
|
60
68
|
this->_currentBreakpointName = helpers::getBreakpointFromScreenWidth(
|
61
69
|
screenWidth,
|
62
70
|
this->_sortedBreakpointPairs
|
@@ -42,11 +42,7 @@ jsi::Value HybridStyleSheet::configure(jsi::Runtime &rt, const jsi::Value &thisV
|
|
42
42
|
helpers::assertThat(rt, count == 1, "StyleSheet.configure expected to be called with one argument.");
|
43
43
|
helpers::assertThat(rt, arguments[0].isObject(), "StyleSheet.configure expected to be called with object.");
|
44
44
|
|
45
|
-
// create new state
|
46
45
|
auto config = arguments[0].asObject(rt);
|
47
|
-
auto& registry = core::UnistylesRegistry::get();
|
48
|
-
|
49
|
-
registry.createState(rt);
|
50
46
|
|
51
47
|
helpers::enumerateJSIObject(rt, config, [&](const std::string& propertyName, jsi::Value& propertyValue){
|
52
48
|
if (propertyName == "settings") {
|
@@ -71,9 +67,23 @@ jsi::Value HybridStyleSheet::configure(jsi::Runtime &rt, const jsi::Value &thisV
|
|
71
67
|
});
|
72
68
|
|
73
69
|
verifyAndSelectTheme(rt);
|
70
|
+
|
71
|
+
auto& state = core::UnistylesRegistry::get().getState(rt);
|
72
|
+
|
73
|
+
state.hasUserConfig = true;
|
74
|
+
|
75
|
+
return jsi::Value::undefined();
|
76
|
+
}
|
77
|
+
|
78
|
+
jsi::Value HybridStyleSheet::init(jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *arguments, size_t count) {
|
79
|
+
// create new state
|
80
|
+
auto& registry = core::UnistylesRegistry::get();
|
81
|
+
|
82
|
+
registry.createState(rt);
|
83
|
+
|
74
84
|
loadExternalMethods(thisVal, rt);
|
75
85
|
registerHooks(rt);
|
76
|
-
|
86
|
+
|
77
87
|
return jsi::Value::undefined();
|
78
88
|
}
|
79
89
|
|
@@ -32,11 +32,16 @@ struct HybridStyleSheet: public HybridUnistylesStyleSheetSpec {
|
|
32
32
|
const jsi::Value& thisValue,
|
33
33
|
const jsi::Value* args,
|
34
34
|
size_t count);
|
35
|
+
jsi::Value init(jsi::Runtime& rt,
|
36
|
+
const jsi::Value& thisValue,
|
37
|
+
const jsi::Value* args,
|
38
|
+
size_t count);
|
35
39
|
|
36
40
|
void loadHybridMethods() override {
|
37
41
|
HybridUnistylesStyleSheetSpec::loadHybridMethods();
|
38
42
|
|
39
43
|
registerHybrids(this, [](Prototype& prototype) {
|
44
|
+
prototype.registerRawHybridMethod("init", 1, &HybridStyleSheet::init);
|
40
45
|
prototype.registerRawHybridMethod("create", 1, &HybridStyleSheet::create);
|
41
46
|
prototype.registerRawHybridMethod("configure", 1, &HybridStyleSheet::configure);
|
42
47
|
});
|
@@ -1,7 +1,16 @@
|
|
1
1
|
#pragma once
|
2
2
|
|
3
|
+
#ifndef RCT_NEW_ARCH_ENABLED
|
4
|
+
#error "Unistyles 3.0 requires your project to have New Architecture enabled."
|
5
|
+
#endif
|
6
|
+
|
7
|
+
#if __has_include(<ReactCommon/RCTTurboModuleWithJSIBindings.h>)
|
8
|
+
#import <ReactCommon/RCTTurboModuleWithJSIBindings.h>
|
9
|
+
#else
|
10
|
+
#error "Unistyles 3.0 requires your project to use React Native 0.75 or higher."
|
11
|
+
#endif
|
12
|
+
|
3
13
|
#import <React/RCTEventEmitter.h>
|
4
|
-
#import <ReactCommon/RCTTurboModuleWithJSIBindings.h>
|
5
14
|
#import "TurboUnistyles/TurboUnistyles.h"
|
6
15
|
#import <React/RCTSurfacePresenter.h>
|
7
16
|
#import <React/RCTScheduler.h>
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","require","_web","_listener","_NativePlatform","useTheme","theme","setTheme","useState","UnistylesRuntime","getTheme","useEffect","removeChangeListener","UnistylesListener","addListeners","UnistyleDependency","Theme","exports"],"sourceRoot":"../../../src","sources":["core/useTheme.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;
|
1
|
+
{"version":3,"names":["_react","require","_web","_listener","_NativePlatform","useTheme","theme","setTheme","useState","UnistylesRuntime","getTheme","useEffect","removeChangeListener","UnistylesListener","addListeners","UnistyleDependency","Theme","exports"],"sourceRoot":"../../../src","sources":["core/useTheme.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAGO,MAAMI,QAAQ,GAAGA,CAAA,KAAsB;EAC1C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAACC,qBAAgB,CAACC,QAAQ,CAAC,CAAC,CAAC;EAE/D,IAAAC,gBAAS,EAAC,MAAM;IACZ,MAAMC,oBAAoB,GAAGC,2BAAiB,CAACC,YAAY,CAAC,CAACC,kCAAkB,CAACC,KAAK,CAAC,EAAE,MAAMT,QAAQ,CAACE,qBAAgB,CAACC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEpI,OAAO,MAAM;MACTE,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAON,KAAK;AAChB,CAAC;AAAAW,OAAA,CAAAZ,QAAA,GAAAA,QAAA","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","require","_specs","useTheme","theme","setTheme","useState","UnistylesRuntime","getTheme","useEffect","removeChangeListener","StyleSheet","addChangeListener","dependencies","includes","UnistyleDependency","Theme","exports"],"sourceRoot":"../../../src","sources":["core/useTheme.native.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;
|
1
|
+
{"version":3,"names":["_react","require","_specs","useTheme","theme","setTheme","useState","UnistylesRuntime","getTheme","useEffect","removeChangeListener","StyleSheet","addChangeListener","dependencies","includes","UnistyleDependency","Theme","exports"],"sourceRoot":"../../../src","sources":["core/useTheme.native.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAIO,MAAME,QAAQ,GAAGA,CAAA,KAAsB;EAC1C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAACC,uBAAgB,CAACC,QAAQ,CAAC,CAAC,CAAC;EAE/D,IAAAC,gBAAS,EAAC,MAAM;IACZ,MAAMC,oBAAoB,GAAIC,iBAAU,CAAyBC,iBAAiB,CAACC,YAAY,IAAI;MAC/F,IAAIA,YAAY,CAACC,QAAQ,CAACC,yBAAkB,CAACC,KAAK,CAAC,EAAE;QACjDX,QAAQ,CAACE,uBAAgB,CAACC,QAAQ,CAAC,CAAC,CAAC;MACzC;IACJ,CAAC,CAAC;IAEF,OAAO,MAAM;MACTE,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAON,KAAK;AAChB,CAAC;AAAAa,OAAA,CAAAd,QAAA,GAAAA,QAAA","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
@@ -26,7 +26,6 @@ Object.defineProperty(exports, "useTheme", {
|
|
26
26
|
return _core.useTheme;
|
27
27
|
}
|
28
28
|
});
|
29
|
-
var _react = _interopRequireDefault(require("react"));
|
30
29
|
var _specs = require("./specs");
|
31
30
|
Object.keys(_specs).forEach(function (key) {
|
32
31
|
if (key === "default" || key === "__esModule") return;
|
@@ -41,17 +40,4 @@ Object.keys(_specs).forEach(function (key) {
|
|
41
40
|
});
|
42
41
|
var _mq = require("./mq");
|
43
42
|
var _core = require("./core");
|
44
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
45
|
-
// TODO: export Native createUnistylesComponent
|
46
|
-
// can't import it this way, it will break native build
|
47
|
-
// export { createUnistylesComponent } from './web/createUnistylesComponent'
|
48
|
-
|
49
|
-
// todo verify true min version
|
50
|
-
const minReactVersionRequiredByUnistyles = '18.3.1';
|
51
|
-
if (_react.default.version < minReactVersionRequiredByUnistyles) {
|
52
|
-
throw new Error(`
|
53
|
-
You are using an outdated version of React (${_react.default.version}).
|
54
|
-
Unistyles requires at least React ${minReactVersionRequiredByUnistyles}.
|
55
|
-
`);
|
56
|
-
}
|
57
43
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["_specs","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_mq","_core"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,GAAA,GAAAb,OAAA;AAEA,IAAAc,KAAA,GAAAd,OAAA","ignoreList":[]}
|
@@ -14,5 +14,6 @@ HybridUnistylesStyleSheet.compose = _reactNative.StyleSheet.compose;
|
|
14
14
|
HybridUnistylesStyleSheet.jsMethods = {
|
15
15
|
processColor: _reactNative.processColor
|
16
16
|
};
|
17
|
+
HybridUnistylesStyleSheet.init();
|
17
18
|
const StyleSheet = exports.StyleSheet = HybridUnistylesStyleSheet;
|
18
19
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNativeNitroModules","require","_reactNative","HybridUnistylesStyleSheet","NitroModules","createHybridObject","absoluteFillObject","NativeStyleSheet","absoluteFill","flatten","compose","jsMethods","processColor","StyleSheet","exports"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;
|
1
|
+
{"version":3,"names":["_reactNativeNitroModules","require","_reactNative","HybridUnistylesStyleSheet","NitroModules","createHybridObject","absoluteFillObject","NativeStyleSheet","absoluteFill","flatten","compose","jsMethods","processColor","init","StyleSheet","exports"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAgCA,MAAME,yBAAyB,GAAGC,qCAAY,CACzCC,kBAAkB,CAAsB,qBAAqB,CAAC;AAEnEF,yBAAyB,CAACG,kBAAkB,GAAGC,uBAAgB,CAACD,kBAAkB;AAClFH,yBAAyB,CAACK,YAAY,GAAGD,uBAAgB,CAACC,YAAY;AACtEL,yBAAyB,CAACM,OAAO,GAAGF,uBAAgB,CAACE,OAAO;AAC5DN,yBAAyB,CAACO,OAAO,GAAGH,uBAAgB,CAACG,OAAO;AAC5DP,yBAAyB,CAACQ,SAAS,GAAG;EAClCC,YAAY,EAAZA;AACJ,CAAC;AAEDT,yBAAyB,CAACU,IAAI,CAAC,CAAC;AAIzB,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGX,yBAAsE","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useEffect","useState","UnistylesRuntime","UnistylesListener","UnistyleDependency","useTheme","theme","setTheme","getTheme","removeChangeListener","addListeners","Theme"],"sourceRoot":"../../../src","sources":["core/useTheme.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,gBAAgB,QAAQ,QAAQ;AACzC,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,kBAAkB,QAAQ,yBAAyB;
|
1
|
+
{"version":3,"names":["useEffect","useState","UnistylesRuntime","UnistylesListener","UnistyleDependency","useTheme","theme","setTheme","getTheme","removeChangeListener","addListeners","Theme"],"sourceRoot":"../../../src","sources":["core/useTheme.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,gBAAgB,QAAQ,QAAQ;AACzC,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,kBAAkB,QAAQ,yBAAyB;AAG5D,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAsB;EAC1C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGN,QAAQ,CAACC,gBAAgB,CAACM,QAAQ,CAAC,CAAC,CAAC;EAE/DR,SAAS,CAAC,MAAM;IACZ,MAAMS,oBAAoB,GAAGN,iBAAiB,CAACO,YAAY,CAAC,CAACN,kBAAkB,CAACO,KAAK,CAAC,EAAE,MAAMJ,QAAQ,CAACL,gBAAgB,CAACM,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEpI,OAAO,MAAM;MACTC,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOH,KAAK;AAChB,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","useTheme","theme","setTheme","getTheme","removeChangeListener","addChangeListener","dependencies","includes","Theme"],"sourceRoot":"../../../src","sources":["core/useTheme.native.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAQ,UAAU;
|
1
|
+
{"version":3,"names":["useEffect","useState","StyleSheet","UnistyleDependency","UnistylesRuntime","useTheme","theme","setTheme","getTheme","removeChangeListener","addChangeListener","dependencies","includes","Theme"],"sourceRoot":"../../../src","sources":["core/useTheme.native.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAQ,UAAU;AAI3E,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAsB;EAC1C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGN,QAAQ,CAACG,gBAAgB,CAACI,QAAQ,CAAC,CAAC,CAAC;EAE/DR,SAAS,CAAC,MAAM;IACZ,MAAMS,oBAAoB,GAAIP,UAAU,CAAyBQ,iBAAiB,CAACC,YAAY,IAAI;MAC/F,IAAIA,YAAY,CAACC,QAAQ,CAACT,kBAAkB,CAACU,KAAK,CAAC,EAAE;QACjDN,QAAQ,CAACH,gBAAgB,CAACI,QAAQ,CAAC,CAAC,CAAC;MACzC;IACJ,CAAC,CAAC;IAEF,OAAO,MAAM;MACTC,oBAAoB,CAAC,CAAC;IAC1B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOH,KAAK;AAChB,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
@@ -1,19 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
import React from 'react';
|
4
3
|
export * from './specs';
|
5
4
|
export { mq } from './mq';
|
6
5
|
export { useTheme, useBreakpoint } from './core';
|
7
|
-
// TODO: export Native createUnistylesComponent
|
8
|
-
// can't import it this way, it will break native build
|
9
|
-
// export { createUnistylesComponent } from './web/createUnistylesComponent'
|
10
|
-
|
11
|
-
// todo verify true min version
|
12
|
-
const minReactVersionRequiredByUnistyles = '18.3.1';
|
13
|
-
if (React.version < minReactVersionRequiredByUnistyles) {
|
14
|
-
throw new Error(`
|
15
|
-
You are using an outdated version of React (${React.version}).
|
16
|
-
Unistyles requires at least React ${minReactVersionRequiredByUnistyles}.
|
17
|
-
`);
|
18
|
-
}
|
19
6
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["mq","useTheme","useBreakpoint"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,SAAS;AACvB,SAASA,EAAE,QAAQ,MAAM;AAEzB,SAASC,QAAQ,EAAEC,aAAa,QAAQ,QAAQ","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["NitroModules","processColor","StyleSheet","NativeStyleSheet","HybridUnistylesStyleSheet","createHybridObject","absoluteFillObject","absoluteFill","flatten","compose","jsMethods"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AACzD,SAASC,YAAY,EAAEC,UAAU,IAAIC,gBAAgB,QAAQ,cAAc;
|
1
|
+
{"version":3,"names":["NitroModules","processColor","StyleSheet","NativeStyleSheet","HybridUnistylesStyleSheet","createHybridObject","absoluteFillObject","absoluteFill","flatten","compose","jsMethods","init"],"sourceRoot":"../../../../src","sources":["specs/StyleSheet/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AACzD,SAASC,YAAY,EAAEC,UAAU,IAAIC,gBAAgB,QAAQ,cAAc;AAgC3E,MAAMC,yBAAyB,GAAGJ,YAAY,CACzCK,kBAAkB,CAAsB,qBAAqB,CAAC;AAEnED,yBAAyB,CAACE,kBAAkB,GAAGH,gBAAgB,CAACG,kBAAkB;AAClFF,yBAAyB,CAACG,YAAY,GAAGJ,gBAAgB,CAACI,YAAY;AACtEH,yBAAyB,CAACI,OAAO,GAAGL,gBAAgB,CAACK,OAAO;AAC5DJ,yBAAyB,CAACK,OAAO,GAAGN,gBAAgB,CAACM,OAAO;AAC5DL,yBAAyB,CAACM,SAAS,GAAG;EAClCT;AACJ,CAAC;AAEDG,yBAAyB,CAACO,IAAI,CAAC,CAAC;AAIhC,OAAO,MAAMT,UAAU,GAAGE,yBAAsE","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["ColorScheme","Orientation","isUnistylesMq","parseMq","UnistylesState","keyInObject","reduceObject","schemeToTheme","scheme","Dark","Light","hexToRGBA","hex","opacity","replace","split","map","x","parseInt","filter","num","isNaN","reduce","acc","color","concat","assignSecrets","object","secrets","Math","random","toString","slice","extractSecrets","Object","entries","key","value","startsWith","push","getStyles","values","returnValue","defineProperties","enumerable","configurable","isInDocument","element","document","body","contains","extractMediaQueryValue","query","_","px","match","undefined","Number","getMediaQuery","includes","minWidth","maxWidth","minHeight","maxHeight","Boolean","join","breakpoints","extractUnistyleDependencies","dependencies","uni__dependencies"],"sourceRoot":"../../../../src","sources":["web/utils/unistyle.ts"],"mappings":";;AACA,
|
1
|
+
{"version":3,"names":["ColorScheme","Orientation","isUnistylesMq","parseMq","UnistylesState","keyInObject","reduceObject","schemeToTheme","scheme","Dark","Light","hexToRGBA","hex","opacity","replace","split","map","x","parseInt","filter","num","isNaN","reduce","acc","color","concat","assignSecrets","object","secrets","Math","random","toString","slice","extractSecrets","Object","entries","key","value","startsWith","push","getStyles","values","returnValue","defineProperties","enumerable","configurable","isInDocument","element","document","body","contains","extractMediaQueryValue","query","_","px","match","undefined","Number","getMediaQuery","includes","minWidth","maxWidth","minHeight","maxHeight","Boolean","join","breakpoints","extractUnistyleDependencies","dependencies","uni__dependencies"],"sourceRoot":"../../../../src","sources":["web/utils/unistyle.ts"],"mappings":";;AACA,SAA4BA,WAAW,EAAEC,WAAW,QAAQ,mBAAmB;AAE/E,SAASC,aAAa,EAAEC,OAAO,QAAQ,OAAO;AAC9C,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,WAAW,EAAEC,YAAY,QAAQ,UAAU;AAEpD,OAAO,MAAMC,aAAa,GAAIC,MAAmB,IAAmB;EAChE,QAAQA,MAAM;IACV,KAAKR,WAAW,CAACS,IAAI;MACjB,OAAO,MAAM;IACjB,KAAKT,WAAW,CAACU,KAAK;IACtB;MACI,OAAO,OAAO;EACtB;AACJ,CAAC;AAED,OAAO,MAAMC,SAAS,GAAGA,CAACC,GAAW,EAAEC,OAAe,KAAKD,GAAG,CACzDE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,C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GI,SAAS;EAE7I,OAAO,eAAeI,QAAQ,IAAI,CAAC,KAAK;AAC5C,CAAC;AAED,OAAO,MAAMO,2BAA2B,GAAI9B,KAAU,IAAK;EACvD,MAAM+B,YAAuC,GAAG/D,WAAW,CAACgC,KAAK,EAAE,mBAAmB,CAAC,GAAGA,KAAK,CAACgC,iBAAiB,GAAG,EAAE;EAEtH,OAAOD,YAAY;AACvB,CAAC","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const useBreakpoint: () => "portrait" | "landscape" |
|
1
|
+
export declare const useBreakpoint: () => "portrait" | "landscape" | undefined;
|
2
2
|
//# sourceMappingURL=useBreakpoint.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../../src/core/useBreakpoint.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../../src/core/useBreakpoint.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,4CAYzB,CAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const useBreakpoint: () => "portrait" | "landscape" |
|
1
|
+
export declare const useBreakpoint: () => "portrait" | "landscape" | undefined;
|
2
2
|
//# sourceMappingURL=useBreakpoint.native.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBreakpoint.native.d.ts","sourceRoot":"","sources":["../../../../src/core/useBreakpoint.native.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa
|
1
|
+
{"version":3,"file":"useBreakpoint.native.d.ts","sourceRoot":"","sources":["../../../../src/core/useBreakpoint.native.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,4CAgBzB,CAAA"}
|
@@ -1,41 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
backgroundColor: string;
|
4
|
-
typography: string;
|
5
|
-
accent: string;
|
6
|
-
barbie: string;
|
7
|
-
oak: string;
|
8
|
-
sky: string;
|
9
|
-
fog: string;
|
10
|
-
aloes: string;
|
11
|
-
blood: string;
|
12
|
-
};
|
13
|
-
gap: (v: number) => number;
|
14
|
-
} | {
|
15
|
-
colors: {
|
16
|
-
backgroundColor: string;
|
17
|
-
typography: string;
|
18
|
-
accent: string;
|
19
|
-
barbie: string;
|
20
|
-
oak: string;
|
21
|
-
sky: string;
|
22
|
-
fog: string;
|
23
|
-
aloes: string;
|
24
|
-
blood: string;
|
25
|
-
};
|
26
|
-
gap: (v: number) => number;
|
27
|
-
} | {
|
28
|
-
colors: {
|
29
|
-
backgroundColor: string;
|
30
|
-
typography: string;
|
31
|
-
accent: string;
|
32
|
-
barbie: string;
|
33
|
-
oak: string;
|
34
|
-
sky: string;
|
35
|
-
fog: string;
|
36
|
-
aloes: string;
|
37
|
-
blood: string;
|
38
|
-
};
|
39
|
-
gap: (v: number) => number;
|
40
|
-
};
|
1
|
+
import type { UnistylesTheme } from '../types';
|
2
|
+
export declare const useTheme: () => UnistylesTheme;
|
41
3
|
//# sourceMappingURL=useTheme.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/core/useTheme.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/core/useTheme.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,eAAO,MAAM,QAAQ,QAAO,cAY3B,CAAA"}
|
@@ -1,41 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
backgroundColor: string;
|
4
|
-
typography: string;
|
5
|
-
accent: string;
|
6
|
-
barbie: string;
|
7
|
-
oak: string;
|
8
|
-
sky: string;
|
9
|
-
fog: string;
|
10
|
-
aloes: string;
|
11
|
-
blood: string;
|
12
|
-
};
|
13
|
-
gap: (v: number) => number;
|
14
|
-
} | {
|
15
|
-
colors: {
|
16
|
-
backgroundColor: string;
|
17
|
-
typography: string;
|
18
|
-
accent: string;
|
19
|
-
barbie: string;
|
20
|
-
oak: string;
|
21
|
-
sky: string;
|
22
|
-
fog: string;
|
23
|
-
aloes: string;
|
24
|
-
blood: string;
|
25
|
-
};
|
26
|
-
gap: (v: number) => number;
|
27
|
-
} | {
|
28
|
-
colors: {
|
29
|
-
backgroundColor: string;
|
30
|
-
typography: string;
|
31
|
-
accent: string;
|
32
|
-
barbie: string;
|
33
|
-
oak: string;
|
34
|
-
sky: string;
|
35
|
-
fog: string;
|
36
|
-
aloes: string;
|
37
|
-
blood: string;
|
38
|
-
};
|
39
|
-
gap: (v: number) => number;
|
40
|
-
};
|
1
|
+
import type { UnistylesTheme } from '../types';
|
2
|
+
export declare const useTheme: () => UnistylesTheme;
|
41
3
|
//# sourceMappingURL=useTheme.native.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useTheme.native.d.ts","sourceRoot":"","sources":["../../../../src/core/useTheme.native.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useTheme.native.d.ts","sourceRoot":"","sources":["../../../../src/core/useTheme.native.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,eAAO,MAAM,QAAQ,QAAO,cAgB3B,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/global.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/global.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,EAAE,CAAA;IACT,IAAI,EAAE,EAAE,CAAA;CACX;AACD,MAAM,WAAW,oBAAoB;IAEjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAChD,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
|
@@ -17,13 +17,14 @@ export interface UnistylesStyleSheet extends UnistylesStyleSheetSpec {
|
|
17
17
|
absoluteFill: typeof NativeStyleSheetType.absoluteFill;
|
18
18
|
compose: typeof NativeStyleSheetType.compose;
|
19
19
|
flatten: typeof NativeStyleSheetType.flatten;
|
20
|
+
init(): void;
|
20
21
|
create: CreateUnistylesStyleSheet;
|
21
22
|
configure(config: UnistylesConfig): void;
|
22
23
|
jsMethods: {
|
23
24
|
processColor: typeof processColor;
|
24
25
|
};
|
25
26
|
}
|
26
|
-
type PrivateMethods = 'jsMethods' | 'addChangeListener';
|
27
|
+
type PrivateMethods = 'jsMethods' | 'addChangeListener' | 'init';
|
27
28
|
export declare const StyleSheet: Omit<UnistylesStyleSheet, PrivateMethods>;
|
28
29
|
export {};
|
29
30
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAkC,MAAM,cAAc,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,KAAK,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,6BAA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B,EAAE,MAAM,aAAa,CAAA;AAE5D,KAAK,iBAAiB,GAAG;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,MAAM,MAAM,eAAe,CAAC,GAAG,MAAM,eAAe,CAAA;CACvE,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,WAAW,CAAC,EAAE,oBAAoB,CAAA;CACrC,CAAA;AAED,MAAM,WAAW,mBAAoB,SAAQ,uBAAuB;IAChE,kBAAkB,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC;IACnE,YAAY,EAAE,OAAO,oBAAoB,CAAC,YAAY,CAAC;IACvD,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC7C,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAG7C,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,EAAE,yBAAyB,CAAC;IAClC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,SAAS,EAAE;QACP,YAAY,EAAE,OAAO,YAAY,CAAA;KACpC,CAAA;CACJ;AAeD,KAAK,cAAc,GAAG,WAAW,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAEhE,eAAO,MAAM,UAAU,EAAgC,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAA"}
|
@@ -7,7 +7,7 @@ type ExtractVariant<T> = T extends {
|
|
7
7
|
variants: infer V;
|
8
8
|
} ? {
|
9
9
|
[key in keyof V]?: ExtractSubVariantKeys<V[key]>;
|
10
|
-
} :
|
10
|
+
} : never;
|
11
11
|
export type UnistylesVariants<ST> = ST extends {
|
12
12
|
useVariants: infer V;
|
13
13
|
} ? V extends (variants: infer T) => void ? T : never : never;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/types/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;AAE1E,KAAK,kBAAkB,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACvC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAC1C,KAAK,CAAA;AAEX,KAAK,kBAAkB,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACpD,IAAI,GACJ,CAAC,SAAS,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,GAC1B,IAAI,GACJ,KAAK,CAAA;AAEf,KAAK,qBAAqB,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAC1C,kBAAkB,CAAC,CAAC,CAAC,SAAS,IAAI,GAC9B,MAAM,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,OAAO,GAAG,SAAS,GAC9C,MAAM,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,SAAS,GACxC,KAAK,CAAA;AAEX,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;CAAE,GAClD;KAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAAE,GACpD,
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/types/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;AAE1E,KAAK,kBAAkB,CAAC,C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