react-native-unistyles 3.0.0-alpha.5 → 3.0.0-alpha.7
Sign up to get free protection for your applications and to get access to all the features.
- package/cxx/common/Helpers.h +24 -0
- package/cxx/core/HostStyle.cpp +4 -5
- package/cxx/core/HostStyle.h +4 -0
- package/cxx/core/StyleSheet.h +0 -1
- package/cxx/core/StyleSheetRegistry.cpp +9 -17
- package/cxx/core/StyleSheetRegistry.h +3 -4
- package/cxx/core/UnistyleData.h +22 -0
- package/cxx/core/UnistylesCommitHook.cpp +4 -1
- package/cxx/core/UnistylesRegistry.cpp +33 -49
- package/cxx/core/UnistylesRegistry.h +8 -8
- package/cxx/hybridObjects/HybridShadowRegistry.cpp +4 -3
- package/cxx/hybridObjects/HybridStyleSheet.cpp +8 -11
- package/cxx/parser/Parser.cpp +42 -68
- package/cxx/parser/Parser.h +8 -13
- package/lib/commonjs/specs/NavigtionBar/index.js +1 -1
- package/lib/commonjs/specs/NavigtionBar/index.js.map +1 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js +2 -2
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/specs/StatusBar/index.js +1 -1
- package/lib/commonjs/specs/StatusBar/index.js.map +1 -1
- package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
- package/lib/commonjs/specs/UnistylesRuntime/index.js +1 -1
- package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -1
- package/lib/module/specs/NavigtionBar/index.js +1 -1
- package/lib/module/specs/NavigtionBar/index.js.map +1 -1
- package/lib/module/specs/ShadowRegistry/index.js +2 -2
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/specs/StatusBar/index.js +1 -1
- package/lib/module/specs/StatusBar/index.js.map +1 -1
- package/lib/module/specs/StyleSheet/index.js.map +1 -1
- package/lib/module/specs/UnistylesRuntime/index.js +1 -1
- package/lib/module/specs/UnistylesRuntime/index.js.map +1 -1
- package/lib/typescript/example/App.d.ts.map +1 -1
- package/lib/typescript/example/Typography.d.ts +11 -0
- package/lib/typescript/example/Typography.d.ts.map +1 -0
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +2 -2
- package/lib/typescript/src/specs/ShadowRegistry/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/package.json +1 -1
- package/plugin/__tests__/dependencies.spec.js +181 -103
- package/plugin/__tests__/ref.spec.js +222 -158
- package/plugin/__tests__/stylesheet.spec.js +148 -55
- package/plugin/index.js +22 -11
- package/plugin/ref.js +35 -7
- package/plugin/style.js +5 -22
- package/plugin/stylesheet.js +44 -1
- package/plugin/variants.js +33 -0
- package/src/specs/NavigtionBar/index.ts +1 -1
- package/src/specs/ShadowRegistry/index.ts +4 -4
- package/src/specs/StatusBar/index.ts +1 -1
- package/src/specs/StyleSheet/index.ts +3 -1
- package/src/specs/UnistylesRuntime/index.ts +1 -1
package/cxx/parser/Parser.cpp
CHANGED
@@ -68,14 +68,14 @@ jsi::Object parser::Parser::unwrapStyleSheet(jsi::Runtime& rt, std::shared_ptr<S
|
|
68
68
|
void parser::Parser::parseUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet) {
|
69
69
|
for (const auto& [_, unistyle] : styleSheet->unistyles) {
|
70
70
|
if (unistyle->type == core::UnistyleType::Object) {
|
71
|
-
auto result = this->parseFirstLevel(rt, unistyle,
|
71
|
+
auto result = this->parseFirstLevel(rt, unistyle, std::nullopt);
|
72
72
|
|
73
73
|
unistyle->parsedStyle = std::move(result);
|
74
74
|
unistyle->seal();
|
75
75
|
}
|
76
76
|
|
77
77
|
if (unistyle->type == core::UnistyleType::DynamicFunction) {
|
78
|
-
auto hostFn = this->createDynamicFunctionProxy(rt, unistyle
|
78
|
+
auto hostFn = this->createDynamicFunctionProxy(rt, unistyle);
|
79
79
|
auto unistyleFn = std::dynamic_pointer_cast<UnistyleDynamicFunction>(unistyle);
|
80
80
|
|
81
81
|
// defer parsing dynamic functions
|
@@ -85,39 +85,40 @@ void parser::Parser::parseUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet
|
|
85
85
|
}
|
86
86
|
|
87
87
|
// rebuild all unistyles in StyleSheet that depends on variants
|
88
|
-
void parser::Parser::rebuildUnistylesWithVariants(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet) {
|
88
|
+
void parser::Parser::rebuildUnistylesWithVariants(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, Variants& variants) {
|
89
89
|
for (const auto& [_, unistyle] : styleSheet->unistyles) {
|
90
90
|
if (!unistyle->dependsOn(UnistyleDependency::VARIANTS)) {
|
91
91
|
continue;
|
92
92
|
}
|
93
93
|
|
94
|
-
this->rebuildUnistyle(rt, styleSheet, unistyle);
|
94
|
+
this->rebuildUnistyle(rt, styleSheet, unistyle, variants);
|
95
95
|
}
|
96
96
|
}
|
97
97
|
|
98
98
|
// rebuild all unistyles that are affected by platform event
|
99
99
|
void parser::Parser::rebuildUnistylesInDependencyMap(jsi::Runtime& rt, DependencyMap& dependencyMap) {
|
100
|
-
for (
|
100
|
+
for (auto& [styleSheet, map] : dependencyMap) {
|
101
101
|
jsi::Object unwrappedStyleSheet = this->unwrapStyleSheet(rt, styleSheet);
|
102
102
|
|
103
|
-
for (
|
104
|
-
for (
|
103
|
+
for (auto& [shadowNode, unistyles] : map) {
|
104
|
+
for (auto& [unistyle, variants, parsedStyle] : unistyles) {
|
105
105
|
// StyleSheet might have styles that are not affected
|
106
106
|
if (!unwrappedStyleSheet.hasProperty(rt, unistyle->styleKey.c_str())) {
|
107
107
|
continue;
|
108
108
|
}
|
109
109
|
|
110
110
|
unistyle->rawValue = unwrappedStyleSheet.getProperty(rt, unistyle->styleKey.c_str()).asObject(rt);
|
111
|
-
this->rebuildUnistyle(rt, styleSheet, unistyle);
|
111
|
+
this->rebuildUnistyle(rt, styleSheet, unistyle, variants);
|
112
|
+
parsedStyle = jsi::Value(rt, unistyle->parsedStyle.value()).asObject(rt);
|
112
113
|
}
|
113
114
|
}
|
114
115
|
}
|
115
116
|
}
|
116
117
|
|
117
118
|
// rebuild single unistyle
|
118
|
-
void parser::Parser::rebuildUnistyle(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, Unistyle::Shared unistyle) {
|
119
|
+
void parser::Parser::rebuildUnistyle(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, Unistyle::Shared unistyle, const Variants& variants) {
|
119
120
|
if (unistyle->type == core::UnistyleType::Object) {
|
120
|
-
auto result = this->parseFirstLevel(rt, unistyle,
|
121
|
+
auto result = this->parseFirstLevel(rt, unistyle, variants);
|
121
122
|
|
122
123
|
unistyle->parsedStyle = std::move(result);
|
123
124
|
}
|
@@ -133,7 +134,7 @@ void parser::Parser::rebuildUnistyle(jsi::Runtime& rt, std::shared_ptr<StyleShee
|
|
133
134
|
// convert arguments to jsi::Value
|
134
135
|
auto metadata = unistyleFn->dynamicFunctionMetadata.value();
|
135
136
|
std::vector<jsi::Value> args{};
|
136
|
-
|
137
|
+
|
137
138
|
args.reserve(3);
|
138
139
|
|
139
140
|
for (int i = 0; i < metadata.count; i++) {
|
@@ -148,20 +149,20 @@ void parser::Parser::rebuildUnistyle(jsi::Runtime& rt, std::shared_ptr<StyleShee
|
|
148
149
|
auto functionResult = unistyleFn->proxiedFunction.value().callAsConstructor(rt, argStart, metadata.count).asObject(rt);
|
149
150
|
|
150
151
|
unistyleFn->unprocessedValue = std::move(functionResult);
|
151
|
-
unistyleFn->parsedStyle = this->parseFirstLevel(rt, unistyleFn,
|
152
|
+
unistyleFn->parsedStyle = this->parseFirstLevel(rt, unistyleFn, variants);
|
152
153
|
}
|
153
154
|
}
|
154
155
|
|
155
156
|
// convert dependency map to shadow tree updates
|
156
|
-
shadow::ShadowLeafUpdates parser::Parser::dependencyMapToShadowLeafUpdates(DependencyMap& dependencyMap) {
|
157
|
+
shadow::ShadowLeafUpdates parser::Parser::dependencyMapToShadowLeafUpdates(core::DependencyMap& dependencyMap) {
|
157
158
|
shadow::ShadowLeafUpdates updates;
|
158
159
|
auto& rt = this->_unistylesRuntime->getRuntime();
|
159
160
|
|
160
161
|
for (const auto& [styleSheet, map] : dependencyMap) {
|
161
162
|
for (const auto& [shadowNode, unistyles] : map) {
|
162
|
-
for (const auto& unistyle : unistyles) {
|
163
|
-
auto rawProps = this->parseStylesToShadowTreeStyles(rt,
|
164
|
-
|
163
|
+
for (const auto& [unistyle, variants, parsedStyle] : unistyles) {
|
164
|
+
auto rawProps = this->parseStylesToShadowTreeStyles(rt, parsedStyle.value());
|
165
|
+
|
165
166
|
if (updates.contains(shadowNode)) {
|
166
167
|
updates[shadowNode].emplace_back(std::move(rawProps));
|
167
168
|
|
@@ -179,7 +180,7 @@ shadow::ShadowLeafUpdates parser::Parser::dependencyMapToShadowLeafUpdates(Depen
|
|
179
180
|
// convert jsi::Value arguments to folly::dynamic
|
180
181
|
std::vector<folly::dynamic> parser::Parser::parseDynamicFunctionArguments(jsi::Runtime& rt, size_t count, const jsi::Value* arguments) {
|
181
182
|
std::vector<folly::dynamic> parsedArgument{};
|
182
|
-
|
183
|
+
|
183
184
|
parsedArgument.reserve(3);
|
184
185
|
|
185
186
|
for (size_t i = 0; i < count; i++) {
|
@@ -234,7 +235,7 @@ std::vector<folly::dynamic> parser::Parser::parseDynamicFunctionArguments(jsi::R
|
|
234
235
|
|
235
236
|
// first level of StyleSheet, we can expect here different properties than on second level
|
236
237
|
// eg. variants, compoundVariants, mq, breakpoints etc.
|
237
|
-
jsi::Object parser::Parser::parseFirstLevel(jsi::Runtime& rt, Unistyle::Shared unistyle, Variants
|
238
|
+
jsi::Object parser::Parser::parseFirstLevel(jsi::Runtime& rt, Unistyle::Shared unistyle, std::optional<Variants> variants) {
|
238
239
|
// for objects - we simply operate on them
|
239
240
|
// for functions we need to work on the unprocessed result (object)
|
240
241
|
auto& style = unistyle->type == core::UnistyleType::Object
|
@@ -317,15 +318,15 @@ jsi::Object parser::Parser::parseFirstLevel(jsi::Runtime& rt, Unistyle::Shared u
|
|
317
318
|
parsedStyle.setProperty(rt, jsi::PropNameID::forUtf8(rt, propertyName), this->parseSecondLevel(rt, unistyle, valueFromBreakpoint));
|
318
319
|
});
|
319
320
|
|
320
|
-
if (shouldParseVariants && !variants.empty()) {
|
321
|
+
if (shouldParseVariants && variants.has_value() && !variants.value().empty()) {
|
321
322
|
auto propertyValueObject = style.getProperty(rt, "variants").asObject(rt);
|
322
|
-
auto parsedVariant = this->parseVariants(rt, unistyle, propertyValueObject, variants);
|
323
|
+
auto parsedVariant = this->parseVariants(rt, unistyle, propertyValueObject, variants.value());
|
323
324
|
|
324
325
|
helpers::mergeJSIObjects(rt, parsedStyle, parsedVariant);
|
325
326
|
|
326
327
|
if (shouldParseCompoundVariants) {
|
327
328
|
auto compoundVariants = style.getProperty(rt, "compoundVariants").asObject(rt);
|
328
|
-
auto parsedCompoundVariants = this->parseCompoundVariants(rt, unistyle, compoundVariants, variants);
|
329
|
+
auto parsedCompoundVariants = this->parseCompoundVariants(rt, unistyle, compoundVariants, variants.value());
|
329
330
|
|
330
331
|
helpers::mergeJSIObjects(rt, parsedStyle, parsedCompoundVariants);
|
331
332
|
}
|
@@ -335,14 +336,14 @@ jsi::Object parser::Parser::parseFirstLevel(jsi::Runtime& rt, Unistyle::Shared u
|
|
335
336
|
}
|
336
337
|
|
337
338
|
// function replaces original user dynamic function with additional logic to memoize arguments
|
338
|
-
jsi::Function parser::Parser::createDynamicFunctionProxy(jsi::Runtime& rt, Unistyle::Shared unistyle
|
339
|
+
jsi::Function parser::Parser::createDynamicFunctionProxy(jsi::Runtime& rt, Unistyle::Shared unistyle) {
|
339
340
|
auto unistylesRuntime = this->_unistylesRuntime;
|
340
341
|
|
341
342
|
return jsi::Function::createFromHostFunction(
|
342
343
|
rt,
|
343
344
|
jsi::PropNameID::forUtf8(rt, unistyle->styleKey),
|
344
345
|
1,
|
345
|
-
[this, unistylesRuntime, unistyle
|
346
|
+
[this, unistylesRuntime, unistyle](jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
346
347
|
auto thisObject = thisVal.asObject(rt);
|
347
348
|
auto parser = parser::Parser(unistylesRuntime);
|
348
349
|
|
@@ -358,7 +359,7 @@ jsi::Function parser::Parser::createDynamicFunctionProxy(jsi::Runtime& rt, Unist
|
|
358
359
|
};
|
359
360
|
|
360
361
|
unistyleFn->unprocessedValue = jsi::Value(rt, result).asObject(rt);
|
361
|
-
unistyleFn->parsedStyle = this->parseFirstLevel(rt, unistyleFn,
|
362
|
+
unistyleFn->parsedStyle = this->parseFirstLevel(rt, unistyleFn, std::nullopt);
|
362
363
|
unistyleFn->seal();
|
363
364
|
|
364
365
|
return jsi::Value(rt, unistyleFn->parsedStyle.value());
|
@@ -370,7 +371,7 @@ std::vector<UnistyleDependency> parser::Parser::parseDependencies(jsi::Runtime &
|
|
370
371
|
helpers::assertThat(rt, dependencies.isArray(rt), "Unistyles: Babel transform is invalid - unexpected type for dependencies.");
|
371
372
|
|
372
373
|
std::vector<UnistyleDependency> parsedDependencies{};
|
373
|
-
|
374
|
+
|
374
375
|
parsedDependencies.reserve(5);
|
375
376
|
|
376
377
|
helpers::iterateJSIArray(rt, dependencies.asArray(rt), [&](size_t i, jsi::Value& value){
|
@@ -389,7 +390,7 @@ jsi::Value parser::Parser::parseTransforms(jsi::Runtime& rt, Unistyle::Shared un
|
|
389
390
|
}
|
390
391
|
|
391
392
|
std::vector<jsi::Value> parsedTransforms{};
|
392
|
-
|
393
|
+
|
393
394
|
parsedTransforms.reserve(2);
|
394
395
|
|
395
396
|
helpers::iterateJSIArray(rt, obj.asArray(rt), [&](size_t i, jsi::Value& value){
|
@@ -438,7 +439,7 @@ jsi::Value parser::Parser::getValueFromBreakpoints(jsi::Runtime& rt, Unistyle::S
|
|
438
439
|
auto propertyName = propertyNames.getValueAtIndex(rt, i).asString(rt).utf8(rt);
|
439
440
|
auto propertyValue = obj.getProperty(rt, propertyName.c_str());
|
440
441
|
auto mq = core::UnistylesMQ{propertyName};
|
441
|
-
|
442
|
+
|
442
443
|
if (mq.isMQ()) {
|
443
444
|
unistyle->addDependency(UnistyleDependency::BREAKPOINTS);
|
444
445
|
}
|
@@ -451,11 +452,11 @@ jsi::Value parser::Parser::getValueFromBreakpoints(jsi::Runtime& rt, Unistyle::S
|
|
451
452
|
|
452
453
|
// check orientation breakpoints if user didn't register own breakpoint
|
453
454
|
bool hasOrientationBreakpoint = obj.hasProperty(rt, currentOrientation);
|
454
|
-
|
455
|
+
|
455
456
|
if (hasOrientationBreakpoint) {
|
456
457
|
unistyle->addDependency(UnistyleDependency::BREAKPOINTS);
|
457
458
|
}
|
458
|
-
|
459
|
+
|
459
460
|
if (!hasBreakpoints && hasOrientationBreakpoint) {
|
460
461
|
return obj.getProperty(rt, currentOrientation);
|
461
462
|
}
|
@@ -463,7 +464,7 @@ jsi::Value parser::Parser::getValueFromBreakpoints(jsi::Runtime& rt, Unistyle::S
|
|
463
464
|
if (!currentBreakpoint.has_value()) {
|
464
465
|
return jsi::Value::undefined();
|
465
466
|
}
|
466
|
-
|
467
|
+
|
467
468
|
unistyle->addDependency(UnistyleDependency::BREAKPOINTS);
|
468
469
|
|
469
470
|
// if you're still here it means that there is no
|
@@ -509,7 +510,7 @@ jsi::Object parser::Parser::parseVariants(jsi::Runtime& rt, Unistyle::Shared uni
|
|
509
510
|
: std::nullopt;
|
510
511
|
|
511
512
|
// we've got a match, but we need to check some condition
|
512
|
-
auto styles = this->getStylesForVariant(rt, groupValue.asObject(rt), selectedVariant);
|
513
|
+
auto styles = this->getStylesForVariant(rt, groupName, groupValue.asObject(rt), selectedVariant, variants);
|
513
514
|
|
514
515
|
// oops, invalid variant
|
515
516
|
if (styles.isUndefined() || !styles.isObject()) {
|
@@ -525,13 +526,19 @@ jsi::Object parser::Parser::parseVariants(jsi::Runtime& rt, Unistyle::Shared uni
|
|
525
526
|
}
|
526
527
|
|
527
528
|
// helpers function to support 'default' variants
|
528
|
-
jsi::Value parser::Parser::getStylesForVariant(jsi::Runtime& rt, jsi::Object&& groupValue, std::optional<std::string> selectedVariant) {
|
529
|
+
jsi::Value parser::Parser::getStylesForVariant(jsi::Runtime& rt, const std::string groupName, jsi::Object&& groupValue, std::optional<std::string> selectedVariant, Variants& variants) {
|
529
530
|
// if there is no value, let's try 'default'
|
530
531
|
auto selectedVariantKey = selectedVariant.has_value()
|
531
532
|
? selectedVariant.value().c_str()
|
532
533
|
: "default";
|
534
|
+
auto hasKey = groupValue.hasProperty(rt, selectedVariantKey);
|
535
|
+
|
536
|
+
if (hasKey && !selectedVariant.has_value()) {
|
537
|
+
// add 'default' selection to variants map
|
538
|
+
variants.emplace_back(groupName, selectedVariantKey);
|
539
|
+
}
|
533
540
|
|
534
|
-
if (
|
541
|
+
if (hasKey) {
|
535
542
|
return groupValue.getProperty(rt, selectedVariantKey);
|
536
543
|
}
|
537
544
|
|
@@ -571,22 +578,12 @@ bool parser::Parser::shouldApplyCompoundVariants(jsi::Runtime& rt, const Variant
|
|
571
578
|
return false;
|
572
579
|
}
|
573
580
|
|
574
|
-
jsi::Array propertyNames = compoundVariant.getPropertyNames(rt);
|
575
|
-
size_t length = propertyNames.size(rt);
|
576
|
-
size_t allConditions = compoundVariant.hasProperty(rt, "styles")
|
577
|
-
? length - 1
|
578
|
-
: length;
|
579
|
-
|
580
|
-
if (allConditions != variants.size()) {
|
581
|
-
return false;
|
582
|
-
}
|
583
|
-
|
584
581
|
for (auto it = variants.cbegin(); it != variants.cend(); ++it) {
|
585
582
|
auto variantKey = it->first;
|
586
583
|
auto variantValue = it->second;
|
587
584
|
|
588
585
|
if (!compoundVariant.hasProperty(rt, variantKey.c_str())) {
|
589
|
-
|
586
|
+
continue;
|
590
587
|
}
|
591
588
|
|
592
589
|
auto property = compoundVariant.getProperty(rt, variantKey.c_str());
|
@@ -670,31 +667,8 @@ jsi::Value parser::Parser::parseSecondLevel(jsi::Runtime &rt, Unistyle::Shared u
|
|
670
667
|
return parsedStyle;
|
671
668
|
}
|
672
669
|
|
673
|
-
// helpers function that convert variants from JS to C++ variants
|
674
|
-
Variants parser::Parser::variantsToPairs(jsi::Runtime& rt, jsi::Object&& variants) {
|
675
|
-
Variants pairs{};
|
676
|
-
|
677
|
-
helpers::enumerateJSIObject(rt, variants, [&](const std::string& variantName, jsi::Value& variantValue){
|
678
|
-
if (variantValue.isUndefined() || variantValue.isNull()) {
|
679
|
-
return;
|
680
|
-
}
|
681
|
-
|
682
|
-
if (variantValue.isBool()) {
|
683
|
-
pairs.emplace_back(std::make_pair(variantName, variantValue.asBool() ? "true" : "false"));
|
684
|
-
|
685
|
-
return;
|
686
|
-
}
|
687
|
-
|
688
|
-
if (variantValue.isString()) {
|
689
|
-
pairs.emplace_back(std::make_pair(variantName, variantValue.asString(rt).utf8(rt)));
|
690
|
-
}
|
691
|
-
});
|
692
|
-
|
693
|
-
return pairs;
|
694
|
-
}
|
695
|
-
|
696
670
|
// convert jsi::Object to RawValue with int colors
|
697
|
-
RawProps parser::Parser::parseStylesToShadowTreeStyles(jsi::Runtime& rt, jsi::Object& styles) {
|
671
|
+
RawProps parser::Parser::parseStylesToShadowTreeStyles(jsi::Runtime& rt, const jsi::Object& styles) {
|
698
672
|
jsi::Object convertedStyles = jsi::Object(rt);
|
699
673
|
auto& state = core::UnistylesRegistry::get().getState(rt);
|
700
674
|
|
package/cxx/parser/Parser.h
CHANGED
@@ -17,36 +17,31 @@ using namespace facebook;
|
|
17
17
|
using namespace margelo::nitro::unistyles::core;
|
18
18
|
|
19
19
|
using Variants = std::vector<std::pair<std::string, std::string>>;
|
20
|
-
using DependencyMap = std::unordered_map<
|
21
|
-
std::shared_ptr<core::StyleSheet>,
|
22
|
-
std::unordered_map<const ShadowNodeFamily*, std::vector<core::Unistyle::Shared>>
|
23
|
-
>;
|
24
20
|
|
25
21
|
struct Parser {
|
26
22
|
Parser(std::shared_ptr<HybridUnistylesRuntime> unistylesRuntime): _unistylesRuntime{unistylesRuntime} {}
|
27
23
|
|
28
24
|
void buildUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet);
|
29
25
|
void parseUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet);
|
30
|
-
|
31
|
-
void
|
32
|
-
|
33
|
-
shadow::ShadowLeafUpdates dependencyMapToShadowLeafUpdates(DependencyMap& dependencyMap);
|
26
|
+
void rebuildUnistylesWithVariants(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, Variants& variants);
|
27
|
+
void rebuildUnistylesInDependencyMap(jsi::Runtime& rt, core::DependencyMap& dependencyMap);
|
28
|
+
shadow::ShadowLeafUpdates dependencyMapToShadowLeafUpdates(core::DependencyMap& dependencyMap);
|
34
29
|
|
35
30
|
private:
|
36
|
-
void rebuildUnistyle(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, Unistyle::Shared unistyle);
|
31
|
+
void rebuildUnistyle(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet, Unistyle::Shared unistyle, const Variants& variants);
|
37
32
|
jsi::Object unwrapStyleSheet(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet);
|
38
|
-
jsi::Object parseFirstLevel(jsi::Runtime& rt, Unistyle::Shared unistyle, Variants
|
33
|
+
jsi::Object parseFirstLevel(jsi::Runtime& rt, Unistyle::Shared unistyle, std::optional<Variants> variants);
|
39
34
|
jsi::Value parseSecondLevel(jsi::Runtime& rt, Unistyle::Shared unistyle, jsi::Value& nestedObject);
|
40
|
-
jsi::Function createDynamicFunctionProxy(jsi::Runtime& rt, Unistyle::Shared unistyle
|
35
|
+
jsi::Function createDynamicFunctionProxy(jsi::Runtime& rt, Unistyle::Shared unistyle);
|
41
36
|
std::vector<folly::dynamic> parseDynamicFunctionArguments(jsi::Runtime& rt, size_t count, const jsi::Value* arguments);
|
42
37
|
std::vector<UnistyleDependency> parseDependencies(jsi::Runtime &rt, jsi::Object&& dependencies);
|
43
38
|
jsi::Value parseTransforms(jsi::Runtime& rt, Unistyle::Shared unistyle, jsi::Object& obj);
|
44
39
|
jsi::Value getValueFromBreakpoints(jsi::Runtime& rt, Unistyle::Shared unistyle, jsi::Object& obj);
|
45
40
|
jsi::Object parseVariants(jsi::Runtime& rt, Unistyle::Shared unistyle, jsi::Object& obj, Variants& variants);
|
46
|
-
jsi::Value getStylesForVariant(jsi::Runtime& rt, jsi::Object&& groupValue, std::optional<std::string> selectedVariant);
|
41
|
+
jsi::Value getStylesForVariant(jsi::Runtime& rt, const std::string groupName, jsi::Object&& groupValue, std::optional<std::string> selectedVariant, Variants& variants);
|
47
42
|
jsi::Object parseCompoundVariants(jsi::Runtime& rt, Unistyle::Shared unistyle, jsi::Object& obj, Variants& variants);
|
48
43
|
bool shouldApplyCompoundVariants(jsi::Runtime& rt, const Variants& variants, jsi::Object& compoundVariant);
|
49
|
-
RawProps parseStylesToShadowTreeStyles(jsi::Runtime& rt, jsi::Object& parsedStyles);
|
44
|
+
RawProps parseStylesToShadowTreeStyles(jsi::Runtime& rt, const jsi::Object& parsedStyles);
|
50
45
|
bool isColor(const std::string& propertyName);
|
51
46
|
|
52
47
|
std::shared_ptr<HybridUnistylesRuntime> _unistylesRuntime;
|
@@ -9,7 +9,7 @@ const attachNavigationBarJSMethods = hybridObject => {
|
|
9
9
|
const privateHybrid = hybridObject;
|
10
10
|
privateHybrid._setBackgroundColor = hybridObject.setBackgroundColor;
|
11
11
|
hybridObject.setBackgroundColor = color => {
|
12
|
-
const parsedColor = (0, _reactNative.processColor)(color);
|
12
|
+
const parsedColor = (0, _reactNative.processColor)(color) ?? 0;
|
13
13
|
privateHybrid._setBackgroundColor(parsedColor);
|
14
14
|
};
|
15
15
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","attachNavigationBarJSMethods","hybridObject","privateHybrid","_setBackgroundColor","setBackgroundColor","color","parsedColor","processColor","exports"],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASO,MAAMC,4BAA4B,GAAIC,YAAoC,IAAK;EAClF,MAAMC,aAAa,GAAGD,YAA6C;EAEnEC,aAAa,CAACC,mBAAmB,GAAGF,YAAY,CAACG,kBAAkB;EACnEH,YAAY,CAACG,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC;
|
1
|
+
{"version":3,"names":["_reactNative","require","attachNavigationBarJSMethods","hybridObject","privateHybrid","_setBackgroundColor","setBackgroundColor","color","parsedColor","processColor","exports"],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASO,MAAMC,4BAA4B,GAAIC,YAAoC,IAAK;EAClF,MAAMC,aAAa,GAAGD,YAA6C;EAEnEC,aAAa,CAACC,mBAAmB,GAAGF,YAAY,CAACG,kBAAkB;EACnEH,YAAY,CAACG,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC,IAAI,CAAC;IAE5CH,aAAa,CAACC,mBAAmB,CAACG,WAAqB,CAAC;EAC5D,CAAC;AACL,CAAC;AAAAE,OAAA,CAAAR,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
@@ -14,11 +14,11 @@ const findShadowNodeForHandle = handle => {
|
|
14
14
|
}
|
15
15
|
return node;
|
16
16
|
};
|
17
|
-
HybridShadowRegistry.add = (handle, style) => {
|
17
|
+
HybridShadowRegistry.add = (handle, style, variants) => {
|
18
18
|
if (!handle || !style?.__unid) {
|
19
19
|
return;
|
20
20
|
}
|
21
|
-
HybridShadowRegistry.link(findShadowNodeForHandle(handle), style);
|
21
|
+
HybridShadowRegistry.link(findShadowNodeForHandle(handle), style, variants ?? {});
|
22
22
|
};
|
23
23
|
HybridShadowRegistry.remove = (handle, style) => {
|
24
24
|
if (!handle || !style?.__unid) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","__unid","link","remove","unlink","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAaA,MAAMC,oBAAoB,GAAGC,qCAAY,CAACC,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEhF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EAEA,OAAOL,IAAI;AACf,CAAC;AAEDL,oBAAoB,CAACW,GAAG,GAAG,CAACP,MAAM,EAAEQ,KAAK,KAAK;
|
1
|
+
{"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","variants","__unid","link","remove","unlink","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAaA,MAAMC,oBAAoB,GAAGC,qCAAY,CAACC,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEhF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EAEA,OAAOL,IAAI;AACf,CAAC;AAEDL,oBAAoB,CAACW,GAAG,GAAG,CAACP,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,KAAK;EACpD,IAAI,CAACT,MAAM,IAAI,CAACQ,KAAK,EAAEE,MAAM,EAAE;IAC3B;EACJ;EAEAd,oBAAoB,CAACe,IAAI,CAACZ,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,EAAEC,QAAQ,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC;AAEDb,oBAAoB,CAACgB,MAAM,GAAG,CAACZ,MAAM,EAAEQ,KAAK,KAAK;EAC7C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEE,MAAM,EAAE;IAC3B;EACJ;EAEAd,oBAAoB,CAACiB,MAAM,CAACd,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACvE,CAAC;AAQM,MAAMM,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGlB,oBAA4D","ignoreList":[]}
|
@@ -25,7 +25,7 @@ const attachStatusBarJSMethods = hybridObject => {
|
|
25
25
|
};
|
26
26
|
privateHybrid._setBackgroundColor = hybridObject.setBackgroundColor;
|
27
27
|
hybridObject.setBackgroundColor = color => {
|
28
|
-
const parsedColor = (0, _reactNative.processColor)(color);
|
28
|
+
const parsedColor = (0, _reactNative.processColor)(color) ?? 0;
|
29
29
|
privateHybrid._setBackgroundColor(parsedColor);
|
30
30
|
};
|
31
31
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_types","attachStatusBarJSMethods","hybridObject","setStyle","style","animated","StatusBarStyle","Light","NativeStatusBar","setBarStyle","Dark","Default","privateHybrid","_setHidden","setHidden","isHidden","animation","_setBackgroundColor","setBackgroundColor","color","parsedColor","processColor","exports"],"sourceRoot":"../../../../src","sources":["specs/StatusBar/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAYO,MAAME,wBAAwB,GAAIC,YAAgC,IAAK;EAC1EA,YAAY,CAACC,QAAQ,GAAG,CAACC,KAAqB,EAAEC,QAAkB,KAAK;IACnE,QAAQD,KAAK;MACT,KAAKE,qBAAc,CAACC,KAAK;QACrB,OAAOC,sBAAe,CAACC,WAAW,CAAC,eAAe,EAAEJ,QAAQ,CAAC;MACjE,KAAKC,qBAAc,CAACI,IAAI;QACpB,OAAOF,sBAAe,CAACC,WAAW,CAAC,cAAc,EAAEJ,QAAQ,CAAC;MAChE,KAAKC,qBAAc,CAACK,OAAO;QACvB,OAAOH,sBAAe,CAACC,WAAW,CAAC,SAAS,EAAEJ,QAAQ,CAAC;IAC/D;EACJ,CAAC;EAED,MAAMO,aAAa,GAAGV,YAAyC;EAE/DU,aAAa,CAACC,UAAU,GAAGX,YAAY,CAACY,SAAS;EACjDZ,YAAY,CAACY,SAAS,GAAG,CAACC,QAAiB,EAAEC,SAAoC,KAAK;IAClFR,sBAAe,CAACM,SAAS,CAACC,QAAQ,EAAEC,SAAS,CAAC;IAC9CJ,aAAa,CAACC,UAAU,CAACE,QAAQ,CAAC;EACtC,CAAC;EAEDH,aAAa,CAACK,mBAAmB,GAAGf,YAAY,CAACgB,kBAAkB;EACnEhB,YAAY,CAACgB,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC;
|
1
|
+
{"version":3,"names":["_reactNative","require","_types","attachStatusBarJSMethods","hybridObject","setStyle","style","animated","StatusBarStyle","Light","NativeStatusBar","setBarStyle","Dark","Default","privateHybrid","_setHidden","setHidden","isHidden","animation","_setBackgroundColor","setBackgroundColor","color","parsedColor","processColor","exports"],"sourceRoot":"../../../../src","sources":["specs/StatusBar/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAYO,MAAME,wBAAwB,GAAIC,YAAgC,IAAK;EAC1EA,YAAY,CAACC,QAAQ,GAAG,CAACC,KAAqB,EAAEC,QAAkB,KAAK;IACnE,QAAQD,KAAK;MACT,KAAKE,qBAAc,CAACC,KAAK;QACrB,OAAOC,sBAAe,CAACC,WAAW,CAAC,eAAe,EAAEJ,QAAQ,CAAC;MACjE,KAAKC,qBAAc,CAACI,IAAI;QACpB,OAAOF,sBAAe,CAACC,WAAW,CAAC,cAAc,EAAEJ,QAAQ,CAAC;MAChE,KAAKC,qBAAc,CAACK,OAAO;QACvB,OAAOH,sBAAe,CAACC,WAAW,CAAC,SAAS,EAAEJ,QAAQ,CAAC;IAC/D;EACJ,CAAC;EAED,MAAMO,aAAa,GAAGV,YAAyC;EAE/DU,aAAa,CAACC,UAAU,GAAGX,YAAY,CAACY,SAAS;EACjDZ,YAAY,CAACY,SAAS,GAAG,CAACC,QAAiB,EAAEC,SAAoC,KAAK;IAClFR,sBAAe,CAACM,SAAS,CAACC,QAAQ,EAAEC,SAAS,CAAC;IAC9CJ,aAAa,CAACC,UAAU,CAACE,QAAQ,CAAC;EACtC,CAAC;EAEDH,aAAa,CAACK,mBAAmB,GAAGf,YAAY,CAACgB,kBAAkB;EACnEhB,YAAY,CAACgB,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC,IAAI,CAAC;IAE5CP,aAAa,CAACK,mBAAmB,CAACG,WAAqB,CAAC;EAC5D,CAAC;AACL,CAAC;AAAAE,OAAA,CAAArB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
@@ -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;AA+BA,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;
|
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;AA+BA,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;AAIM,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGV,yBAAsE","ignoreList":[]}
|
@@ -14,7 +14,7 @@ HybridUnistylesRuntime.statusBar = HybridUnistylesRuntime.createHybridStatusBar(
|
|
14
14
|
HybridUnistylesRuntime.navigationBar = HybridUnistylesRuntime.createHybridNavigationBar();
|
15
15
|
HybridUnistylesRuntime._setRootViewBackgroundColor = HybridUnistylesRuntime.setRootViewBackgroundColor;
|
16
16
|
HybridUnistylesRuntime.setRootViewBackgroundColor = color => {
|
17
|
-
const parsedColor = (0, _reactNative.processColor)(color);
|
17
|
+
const parsedColor = (0, _reactNative.processColor)(color) ?? 0;
|
18
18
|
HybridUnistylesRuntime._setRootViewBackgroundColor(parsedColor);
|
19
19
|
};
|
20
20
|
if (_common.isIOS) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeNitroModules","_StatusBar","_NavigtionBar","_common","HybridUnistylesRuntime","NitroModules","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","processColor","isIOS","setImmersiveMode","isEnabled","setHidden","attachStatusBarJSMethods","attachNavigationBarJSMethods","Runtime","exports"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAgCA,MAAMK,sBAAsB,GAAGC,qCAAY,CACtCC,kBAAkB,CAA0B,kBAAkB,CAAC;AAEpEF,sBAAsB,CAACG,SAAS,GAAGH,sBAAsB,CAACI,qBAAqB,CAAC,CAAC;AACjFJ,sBAAsB,CAACK,aAAa,GAAGL,sBAAsB,CAACM,yBAAyB,CAAC,CAAC;AACzFN,sBAAsB,CAACO,2BAA2B,GAAGP,sBAAsB,CAACQ,0BAA0B;AAEtGR,sBAAsB,CAACQ,0BAA0B,GAAIC,KAAc,IAAK;EACpE,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC;
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeNitroModules","_StatusBar","_NavigtionBar","_common","HybridUnistylesRuntime","NitroModules","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","processColor","isIOS","setImmersiveMode","isEnabled","setHidden","attachStatusBarJSMethods","attachNavigationBarJSMethods","Runtime","exports"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAgCA,MAAMK,sBAAsB,GAAGC,qCAAY,CACtCC,kBAAkB,CAA0B,kBAAkB,CAAC;AAEpEF,sBAAsB,CAACG,SAAS,GAAGH,sBAAsB,CAACI,qBAAqB,CAAC,CAAC;AACjFJ,sBAAsB,CAACK,aAAa,GAAGL,sBAAsB,CAACM,yBAAyB,CAAC,CAAC;AACzFN,sBAAsB,CAACO,2BAA2B,GAAGP,sBAAsB,CAACQ,0BAA0B;AAEtGR,sBAAsB,CAACQ,0BAA0B,GAAIC,KAAc,IAAK;EACpE,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC,IAAI,CAAC;EAE5CT,sBAAsB,CAACO,2BAA2B,CAACG,WAAqB,CAAC;AAC7E,CAAC;AAED,IAAIE,aAAK,EAAE;EACPZ,sBAAsB,CAACa,gBAAgB,GAAIC,SAAkB,IAAKd,sBAAsB,CAACG,SAAS,CAACY,SAAS,CAACD,SAAS,EAAE,MAAM,CAAC;AACnI;AAEA,IAAAE,mCAAwB,EAAChB,sBAAsB,CAACG,SAAS,CAAC;AAC1D,IAAAc,0CAA4B,EAACjB,sBAAsB,CAACK,aAAa,CAAC;AAE3D,MAAMa,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAGlB,sBAA0C","ignoreList":[]}
|
@@ -5,7 +5,7 @@ export const attachNavigationBarJSMethods = hybridObject => {
|
|
5
5
|
const privateHybrid = hybridObject;
|
6
6
|
privateHybrid._setBackgroundColor = hybridObject.setBackgroundColor;
|
7
7
|
hybridObject.setBackgroundColor = color => {
|
8
|
-
const parsedColor = processColor(color);
|
8
|
+
const parsedColor = processColor(color) ?? 0;
|
9
9
|
privateHybrid._setBackgroundColor(parsedColor);
|
10
10
|
};
|
11
11
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["processColor","attachNavigationBarJSMethods","hybridObject","privateHybrid","_setBackgroundColor","setBackgroundColor","color","parsedColor"],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAS3C,OAAO,MAAMC,4BAA4B,GAAIC,YAAoC,IAAK;EAClF,MAAMC,aAAa,GAAGD,YAA6C;EAEnEC,aAAa,CAACC,mBAAmB,GAAGF,YAAY,CAACG,kBAAkB;EACnEH,YAAY,CAACG,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAGP,YAAY,CAACM,KAAK,CAAC;
|
1
|
+
{"version":3,"names":["processColor","attachNavigationBarJSMethods","hybridObject","privateHybrid","_setBackgroundColor","setBackgroundColor","color","parsedColor"],"sourceRoot":"../../../../src","sources":["specs/NavigtionBar/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAS3C,OAAO,MAAMC,4BAA4B,GAAIC,YAAoC,IAAK;EAClF,MAAMC,aAAa,GAAGD,YAA6C;EAEnEC,aAAa,CAACC,mBAAmB,GAAGF,YAAY,CAACG,kBAAkB;EACnEH,YAAY,CAACG,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAGP,YAAY,CAACM,KAAK,CAAC,IAAI,CAAC;IAE5CH,aAAa,CAACC,mBAAmB,CAACG,WAAqB,CAAC;EAC5D,CAAC;AACL,CAAC","ignoreList":[]}
|
@@ -10,11 +10,11 @@ const findShadowNodeForHandle = handle => {
|
|
10
10
|
}
|
11
11
|
return node;
|
12
12
|
};
|
13
|
-
HybridShadowRegistry.add = (handle, style) => {
|
13
|
+
HybridShadowRegistry.add = (handle, style, variants) => {
|
14
14
|
if (!handle || !style?.__unid) {
|
15
15
|
return;
|
16
16
|
}
|
17
|
-
HybridShadowRegistry.link(findShadowNodeForHandle(handle), style);
|
17
|
+
HybridShadowRegistry.link(findShadowNodeForHandle(handle), style, variants ?? {});
|
18
18
|
};
|
19
19
|
HybridShadowRegistry.remove = (handle, style) => {
|
20
20
|
if (!handle || !style?.__unid) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["NitroModules","HybridShadowRegistry","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","__unid","link","remove","unlink","UnistylesShadowRegistry"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAazD,MAAMC,oBAAoB,GAAGD,YAAY,CAACE,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEhF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EAEA,OAAOL,IAAI;AACf,CAAC;AAEDJ,oBAAoB,CAACU,GAAG,GAAG,CAACP,MAAM,EAAEQ,KAAK,KAAK;
|
1
|
+
{"version":3,"names":["NitroModules","HybridShadowRegistry","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","Error","add","style","variants","__unid","link","remove","unlink","UnistylesShadowRegistry"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAazD,MAAMC,oBAAoB,GAAGD,YAAY,CAACE,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEhF,IAAI,CAACA,IAAI,EAAE;IACP;IACA,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC5E;EAEA,OAAOL,IAAI;AACf,CAAC;AAEDJ,oBAAoB,CAACU,GAAG,GAAG,CAACP,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,KAAK;EACpD,IAAI,CAACT,MAAM,IAAI,CAACQ,KAAK,EAAEE,MAAM,EAAE;IAC3B;EACJ;EAEAb,oBAAoB,CAACc,IAAI,CAACZ,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,EAAEC,QAAQ,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC;AAEDZ,oBAAoB,CAACe,MAAM,GAAG,CAACZ,MAAM,EAAEQ,KAAK,KAAK;EAC7C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEE,MAAM,EAAE;IAC3B;EACJ;EAEAb,oBAAoB,CAACgB,MAAM,CAACd,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACvE,CAAC;AAQD,OAAO,MAAMM,uBAAuB,GAAGjB,oBAA4D","ignoreList":[]}
|
@@ -21,7 +21,7 @@ export const attachStatusBarJSMethods = hybridObject => {
|
|
21
21
|
};
|
22
22
|
privateHybrid._setBackgroundColor = hybridObject.setBackgroundColor;
|
23
23
|
hybridObject.setBackgroundColor = color => {
|
24
|
-
const parsedColor = processColor(color);
|
24
|
+
const parsedColor = processColor(color) ?? 0;
|
25
25
|
privateHybrid._setBackgroundColor(parsedColor);
|
26
26
|
};
|
27
27
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["processColor","StatusBar","NativeStatusBar","StatusBarStyle","attachStatusBarJSMethods","hybridObject","setStyle","style","animated","Light","setBarStyle","Dark","Default","privateHybrid","_setHidden","setHidden","isHidden","animation","_setBackgroundColor","setBackgroundColor","color","parsedColor"],"sourceRoot":"../../../../src","sources":["specs/StatusBar/index.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,SAAS,IAAIC,eAAe,QAAQ,cAAc;AAEzE,SAAqBC,cAAc,QAAQ,UAAU;AAYrD,OAAO,MAAMC,wBAAwB,GAAIC,YAAgC,IAAK;EAC1EA,YAAY,CAACC,QAAQ,GAAG,CAACC,KAAqB,EAAEC,QAAkB,KAAK;IACnE,QAAQD,KAAK;MACT,KAAKJ,cAAc,CAACM,KAAK;QACrB,OAAOP,eAAe,CAACQ,WAAW,CAAC,eAAe,EAAEF,QAAQ,CAAC;MACjE,KAAKL,cAAc,CAACQ,IAAI;QACpB,OAAOT,eAAe,CAACQ,WAAW,CAAC,cAAc,EAAEF,QAAQ,CAAC;MAChE,KAAKL,cAAc,CAACS,OAAO;QACvB,OAAOV,eAAe,CAACQ,WAAW,CAAC,SAAS,EAAEF,QAAQ,CAAC;IAC/D;EACJ,CAAC;EAED,MAAMK,aAAa,GAAGR,YAAyC;EAE/DQ,aAAa,CAACC,UAAU,GAAGT,YAAY,CAACU,SAAS;EACjDV,YAAY,CAACU,SAAS,GAAG,CAACC,QAAiB,EAAEC,SAAoC,KAAK;IAClFf,eAAe,CAACa,SAAS,CAACC,QAAQ,EAAEC,SAAS,CAAC;IAC9CJ,aAAa,CAACC,UAAU,CAACE,QAAQ,CAAC;EACtC,CAAC;EAEDH,aAAa,CAACK,mBAAmB,GAAGb,YAAY,CAACc,kBAAkB;EACnEd,YAAY,CAACc,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAGrB,YAAY,CAACoB,KAAK,CAAC;
|
1
|
+
{"version":3,"names":["processColor","StatusBar","NativeStatusBar","StatusBarStyle","attachStatusBarJSMethods","hybridObject","setStyle","style","animated","Light","setBarStyle","Dark","Default","privateHybrid","_setHidden","setHidden","isHidden","animation","_setBackgroundColor","setBackgroundColor","color","parsedColor"],"sourceRoot":"../../../../src","sources":["specs/StatusBar/index.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,SAAS,IAAIC,eAAe,QAAQ,cAAc;AAEzE,SAAqBC,cAAc,QAAQ,UAAU;AAYrD,OAAO,MAAMC,wBAAwB,GAAIC,YAAgC,IAAK;EAC1EA,YAAY,CAACC,QAAQ,GAAG,CAACC,KAAqB,EAAEC,QAAkB,KAAK;IACnE,QAAQD,KAAK;MACT,KAAKJ,cAAc,CAACM,KAAK;QACrB,OAAOP,eAAe,CAACQ,WAAW,CAAC,eAAe,EAAEF,QAAQ,CAAC;MACjE,KAAKL,cAAc,CAACQ,IAAI;QACpB,OAAOT,eAAe,CAACQ,WAAW,CAAC,cAAc,EAAEF,QAAQ,CAAC;MAChE,KAAKL,cAAc,CAACS,OAAO;QACvB,OAAOV,eAAe,CAACQ,WAAW,CAAC,SAAS,EAAEF,QAAQ,CAAC;IAC/D;EACJ,CAAC;EAED,MAAMK,aAAa,GAAGR,YAAyC;EAE/DQ,aAAa,CAACC,UAAU,GAAGT,YAAY,CAACU,SAAS;EACjDV,YAAY,CAACU,SAAS,GAAG,CAACC,QAAiB,EAAEC,SAAoC,KAAK;IAClFf,eAAe,CAACa,SAAS,CAACC,QAAQ,EAAEC,SAAS,CAAC;IAC9CJ,aAAa,CAACC,UAAU,CAACE,QAAQ,CAAC;EACtC,CAAC;EAEDH,aAAa,CAACK,mBAAmB,GAAGb,YAAY,CAACc,kBAAkB;EACnEd,YAAY,CAACc,kBAAkB,GAAIC,KAAc,IAAK;IAClD,MAAMC,WAAW,GAAGrB,YAAY,CAACoB,KAAK,CAAC,IAAI,CAAC;IAE5CP,aAAa,CAACK,mBAAmB,CAACG,WAAqB,CAAC;EAC5D,CAAC;AACL,CAAC","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;AA+B3E,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;
|
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;AA+B3E,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;AAID,OAAO,MAAMC,UAAU,GAAGE,yBAAsE","ignoreList":[]}
|
@@ -10,7 +10,7 @@ HybridUnistylesRuntime.statusBar = HybridUnistylesRuntime.createHybridStatusBar(
|
|
10
10
|
HybridUnistylesRuntime.navigationBar = HybridUnistylesRuntime.createHybridNavigationBar();
|
11
11
|
HybridUnistylesRuntime._setRootViewBackgroundColor = HybridUnistylesRuntime.setRootViewBackgroundColor;
|
12
12
|
HybridUnistylesRuntime.setRootViewBackgroundColor = color => {
|
13
|
-
const parsedColor = processColor(color);
|
13
|
+
const parsedColor = processColor(color) ?? 0;
|
14
14
|
HybridUnistylesRuntime._setRootViewBackgroundColor(parsedColor);
|
15
15
|
};
|
16
16
|
if (isIOS) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["processColor","NitroModules","attachStatusBarJSMethods","attachNavigationBarJSMethods","isIOS","HybridUnistylesRuntime","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","setImmersiveMode","isEnabled","setHidden","Runtime"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAC3C,SAASC,YAAY,QAAQ,4BAA4B;AAGzD,SAASC,wBAAwB,QAAiC,cAAc;AAChF,SAASC,4BAA4B,QAAqC,iBAAiB;AAE3F,SAASC,KAAK,QAAQ,cAAc;AAgCpC,MAAMC,sBAAsB,GAAGJ,YAAY,CACtCK,kBAAkB,CAA0B,kBAAkB,CAAC;AAEpED,sBAAsB,CAACE,SAAS,GAAGF,sBAAsB,CAACG,qBAAqB,CAAC,CAAC;AACjFH,sBAAsB,CAACI,aAAa,GAAGJ,sBAAsB,CAACK,yBAAyB,CAAC,CAAC;AACzFL,sBAAsB,CAACM,2BAA2B,GAAGN,sBAAsB,CAACO,0BAA0B;AAEtGP,sBAAsB,CAACO,0BAA0B,GAAIC,KAAc,IAAK;EACpE,MAAMC,WAAW,GAAGd,YAAY,CAACa,KAAK,CAAC;
|
1
|
+
{"version":3,"names":["processColor","NitroModules","attachStatusBarJSMethods","attachNavigationBarJSMethods","isIOS","HybridUnistylesRuntime","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","setImmersiveMode","isEnabled","setHidden","Runtime"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAC3C,SAASC,YAAY,QAAQ,4BAA4B;AAGzD,SAASC,wBAAwB,QAAiC,cAAc;AAChF,SAASC,4BAA4B,QAAqC,iBAAiB;AAE3F,SAASC,KAAK,QAAQ,cAAc;AAgCpC,MAAMC,sBAAsB,GAAGJ,YAAY,CACtCK,kBAAkB,CAA0B,kBAAkB,CAAC;AAEpED,sBAAsB,CAACE,SAAS,GAAGF,sBAAsB,CAACG,qBAAqB,CAAC,CAAC;AACjFH,sBAAsB,CAACI,aAAa,GAAGJ,sBAAsB,CAACK,yBAAyB,CAAC,CAAC;AACzFL,sBAAsB,CAACM,2BAA2B,GAAGN,sBAAsB,CAACO,0BAA0B;AAEtGP,sBAAsB,CAACO,0BAA0B,GAAIC,KAAc,IAAK;EACpE,MAAMC,WAAW,GAAGd,YAAY,CAACa,KAAK,CAAC,IAAI,CAAC;EAE5CR,sBAAsB,CAACM,2BAA2B,CAACG,WAAqB,CAAC;AAC7E,CAAC;AAED,IAAIV,KAAK,EAAE;EACPC,sBAAsB,CAACU,gBAAgB,GAAIC,SAAkB,IAAKX,sBAAsB,CAACE,SAAS,CAACU,SAAS,CAACD,SAAS,EAAE,MAAM,CAAC;AACnI;AAEAd,wBAAwB,CAACG,sBAAsB,CAACE,SAAS,CAAC;AAC1DJ,4BAA4B,CAACE,sBAAsB,CAACI,aAAa,CAAC;AAElE,OAAO,MAAMS,OAAO,GAAGb,sBAA0C","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../example/App.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../example/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,aAAa,CAAA;AAGpB,eAAO,MAAM,GAAG,yBAWf,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { PropsWithChildren } from 'react';
|
3
|
+
interface TypographyProps extends PropsWithChildren {
|
4
|
+
isBold?: boolean;
|
5
|
+
isCentered?: boolean;
|
6
|
+
isPrimary?: boolean;
|
7
|
+
size?: 'large' | 'small';
|
8
|
+
}
|
9
|
+
export declare const Typography: React.FunctionComponent<TypographyProps>;
|
10
|
+
export {};
|
11
|
+
//# sourceMappingURL=Typography.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../example/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAI9C,UAAU,eAAgB,SAAQ,iBAAiB;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAmB/D,CAAA"}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { UnistylesShadowRegistry as UnistylesShadowRegistrySpec } from './ShadowRegistry.nitro';
|
2
2
|
import type { ShadowNode, Unistyle, ViewHandle } from './types';
|
3
3
|
interface ShadowRegistry extends UnistylesShadowRegistrySpec {
|
4
|
-
add(handle?: ViewHandle, style?: Unistyle): void;
|
4
|
+
add(handle?: ViewHandle, style?: Unistyle, variants?: Record<string, string | boolean>): void;
|
5
5
|
remove(handle?: ViewHandle, style?: Unistyle): void;
|
6
|
-
link(node: ShadowNode, style: Unistyle): void;
|
6
|
+
link(node: ShadowNode, style: Unistyle, variants?: Record<string, string | boolean>): void;
|
7
7
|
unlink(node: ShadowNode, style: Unistyle): void;
|
8
8
|
}
|
9
9
|
type PrivateMethods = 'add' | 'remove' | 'link' | 'unlink';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE/D,UAAU,cAAe,SAAQ,2BAA2B;IAExD,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE/D,UAAU,cAAe,SAAQ,2BAA2B;IAExD,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC;IAC9F,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEpD,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC;IAC3F,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;CAClD;AAiCD,KAAK,cAAc,GACb,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,CAAA;AAEd,eAAO,MAAM,uBAAuB,EAA2B,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA"}
|
@@ -23,6 +23,7 @@ export interface UnistylesStyleSheet extends UnistylesStyleSheetSpec {
|
|
23
23
|
processColor: typeof processColor;
|
24
24
|
};
|
25
25
|
}
|
26
|
-
|
26
|
+
type PrivateMethods = 'jsMethods';
|
27
|
+
export declare const StyleSheet: Omit<UnistylesStyleSheet, PrivateMethods>;
|
27
28
|
export {};
|
28
29
|
//# 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,6BAA6B,CAAA;AACjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,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,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;AAaD,eAAO,MAAM,UAAU,EAAgC,IAAI,CAAC,mBAAmB,EAAE,
|
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,6BAA6B,CAAA;AACjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,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,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;AAaD,KAAK,cAAc,GAAG,WAAW,CAAA;AAEjC,eAAO,MAAM,UAAU,EAAgC,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAA"}
|