react-native-unistyles 3.0.0-alpha.6 → 3.0.0-alpha.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/cxx/common/Helpers.h +24 -0
  2. package/cxx/core/HostStyle.cpp +4 -5
  3. package/cxx/core/HostStyle.h +4 -0
  4. package/cxx/core/StyleSheet.h +0 -1
  5. package/cxx/core/StyleSheetRegistry.cpp +9 -17
  6. package/cxx/core/StyleSheetRegistry.h +3 -4
  7. package/cxx/core/UnistyleData.h +22 -0
  8. package/cxx/core/UnistylesCommitHook.cpp +4 -1
  9. package/cxx/core/UnistylesRegistry.cpp +33 -49
  10. package/cxx/core/UnistylesRegistry.h +8 -8
  11. package/cxx/hybridObjects/HybridShadowRegistry.cpp +4 -3
  12. package/cxx/hybridObjects/HybridStyleSheet.cpp +8 -11
  13. package/cxx/parser/Parser.cpp +41 -57
  14. package/cxx/parser/Parser.h +8 -13
  15. package/lib/commonjs/specs/ShadowRegistry/index.js +2 -2
  16. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  17. package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
  18. package/lib/module/specs/ShadowRegistry/index.js +2 -2
  19. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  20. package/lib/module/specs/StyleSheet/index.js.map +1 -1
  21. package/lib/typescript/example/App.d.ts.map +1 -1
  22. package/lib/typescript/example/Typography.d.ts +11 -0
  23. package/lib/typescript/example/Typography.d.ts.map +1 -0
  24. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +2 -2
  25. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  26. package/lib/typescript/src/specs/StyleSheet/index.d.ts +2 -1
  27. package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
  28. package/package.json +1 -1
  29. package/plugin/__tests__/dependencies.spec.js +181 -103
  30. package/plugin/__tests__/ref.spec.js +222 -158
  31. package/plugin/__tests__/stylesheet.spec.js +148 -55
  32. package/plugin/index.js +22 -11
  33. package/plugin/ref.js +35 -7
  34. package/plugin/style.js +5 -22
  35. package/plugin/stylesheet.js +44 -1
  36. package/plugin/variants.js +33 -0
  37. package/src/specs/ShadowRegistry/index.ts +4 -4
  38. package/src/specs/StyleSheet/index.ts +3 -1
@@ -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, styleSheet->variants);
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, styleSheet->variants);
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 (const auto& [styleSheet, map] : dependencyMap) {
100
+ for (auto& [styleSheet, map] : dependencyMap) {
101
101
  jsi::Object unwrappedStyleSheet = this->unwrapStyleSheet(rt, styleSheet);
102
102
 
103
- for (const auto& [shadowNode, unistyles] : map) {
104
- for (const auto& unistyle : unistyles) {
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, styleSheet->variants);
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, styleSheet->variants);
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, unistyle->parsedStyle.value());
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& 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, Variants& variants) {
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, &variants](jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
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, variants);
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 (groupValue.hasProperty(rt, selectedVariantKey)) {
541
+ if (hasKey) {
535
542
  return groupValue.getProperty(rt, selectedVariantKey);
536
543
  }
537
544
 
@@ -660,31 +667,8 @@ jsi::Value parser::Parser::parseSecondLevel(jsi::Runtime &rt, Unistyle::Shared u
660
667
  return parsedStyle;
661
668
  }
662
669
 
663
- // helpers function that convert variants from JS to C++ variants
664
- Variants parser::Parser::variantsToPairs(jsi::Runtime& rt, jsi::Object&& variants) {
665
- Variants pairs{};
666
-
667
- helpers::enumerateJSIObject(rt, variants, [&](const std::string& variantName, jsi::Value& variantValue){
668
- if (variantValue.isUndefined() || variantValue.isNull()) {
669
- return;
670
- }
671
-
672
- if (variantValue.isBool()) {
673
- pairs.emplace_back(std::make_pair(variantName, variantValue.asBool() ? "true" : "false"));
674
-
675
- return;
676
- }
677
-
678
- if (variantValue.isString()) {
679
- pairs.emplace_back(std::make_pair(variantName, variantValue.asString(rt).utf8(rt)));
680
- }
681
- });
682
-
683
- return pairs;
684
- }
685
-
686
670
  // convert jsi::Object to RawValue with int colors
687
- RawProps parser::Parser::parseStylesToShadowTreeStyles(jsi::Runtime& rt, jsi::Object& styles) {
671
+ RawProps parser::Parser::parseStylesToShadowTreeStyles(jsi::Runtime& rt, const jsi::Object& styles) {
688
672
  jsi::Object convertedStyles = jsi::Object(rt);
689
673
  auto& state = core::UnistylesRegistry::get().getState(rt);
690
674
 
@@ -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
- Variants variantsToPairs(jsi::Runtime& rt, jsi::Object&& variants);
31
- void rebuildUnistylesWithVariants(jsi::Runtime& rt, std::shared_ptr<StyleSheet> styleSheet);
32
- void rebuildUnistylesInDependencyMap(jsi::Runtime& rt, DependencyMap& dependencyMap);
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& 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, Variants& variants);
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;
@@ -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;EAC1C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEC,MAAM,EAAE;IAC3B;EACJ;EAEAb,oBAAoB,CAACc,IAAI,CAACX,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACrE,CAAC;AAEDZ,oBAAoB,CAACe,MAAM,GAAG,CAACX,MAAM,EAAEQ,KAAK,KAAK;EAC7C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEC,MAAM,EAAE;IAC3B;EACJ;EAEAb,oBAAoB,CAACgB,MAAM,CAACb,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACvE,CAAC;AAQM,MAAMK,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGjB,oBAA4D","ignoreList":[]}
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":[]}
@@ -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;AAEM,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGV,yBAAmE","ignoreList":[]}
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":[]}
@@ -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;EAC1C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEC,MAAM,EAAE;IAC3B;EACJ;EAEAZ,oBAAoB,CAACa,IAAI,CAACX,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACrE,CAAC;AAEDX,oBAAoB,CAACc,MAAM,GAAG,CAACX,MAAM,EAAEQ,KAAK,KAAK;EAC7C,IAAI,CAACR,MAAM,IAAI,CAACQ,KAAK,EAAEC,MAAM,EAAE;IAC3B;EACJ;EAEAZ,oBAAoB,CAACe,MAAM,CAACb,uBAAuB,CAACC,MAAM,CAAC,EAAEQ,KAAK,CAAC;AACvE,CAAC;AAQD,OAAO,MAAMK,uBAAuB,GAAGhB,oBAA4D","ignoreList":[]}
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":[]}
@@ -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;AAED,OAAO,MAAMC,UAAU,GAAGE,yBAAmE","ignoreList":[]}
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":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../example/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAG/C,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,GAAG,yBAoBf,CAAA"}
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;IACjD,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEpD,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9C,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"}
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
- export declare const StyleSheet: Omit<UnistylesStyleSheet, "jsMethods">;
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,WAAW,CAAC,CAAA"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "3.0.0-alpha.6",
3
+ "version": "3.0.0-alpha.7",
4
4
  "description": "Level up your React Native StyleSheet",
5
5
  "scripts": {
6
6
  "test": "jest",