react-native-unistyles 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
@@ -71,15 +71,18 @@ Then follow [installation guides](https://unistyl.es/v3/start/getting-started) f
|
|
71
71
|
<a href="https://github.com/happyfloat">
|
72
72
|
<img src="https://avatars.githubusercontent.com/u/186333704?s=200&v=4" height="70px" width="70px" alt="happyfloat" />
|
73
73
|
</a>
|
74
|
-
<a href="https://github.com/oscklm">
|
75
|
-
<img src="https://avatars.githubusercontent.com/u/22825865?v=4" height="70px" width="70px" alt="oscklm" />
|
76
|
-
</a>
|
77
74
|
<a href="https://github.com/ryanlanciaux">
|
78
75
|
<img src="https://avatars.githubusercontent.com/u/85041?v=4" height="70px" width="70px" alt="ryanlanciaux" />
|
79
76
|
</a>
|
80
77
|
<a href="https://github.com/loopsware">
|
81
78
|
<img src="https://avatars.githubusercontent.com/u/161434039?s=200&v=4" height="70px" width="70px" alt="loopsware" />
|
82
79
|
</a>
|
80
|
+
<a href="https://github.com/jordmccord">
|
81
|
+
<img src="https://avatars.githubusercontent.com/u/7591840?v=4" height="70px" width="70px" alt="jordmccord" />
|
82
|
+
</a>
|
83
|
+
<a href="https://github.com/kerwanp">
|
84
|
+
<img src="https://avatars.githubusercontent.com/u/36955373?v=4" height="70px" width="70px" alt="kerwanp" />
|
85
|
+
</a>
|
83
86
|
|
84
87
|
## Past sponsors
|
85
88
|
|
@@ -128,6 +131,9 @@ Then follow [installation guides](https://unistyl.es/v3/start/getting-started) f
|
|
128
131
|
<a href="https://github.com/avega99">
|
129
132
|
<img src="https://avatars.githubusercontent.com/u/177598670?v=4" height="60px" width="60px" alt="avega99" />
|
130
133
|
</a>
|
134
|
+
<a href="https://github.com/oscklm">
|
135
|
+
<img src="https://avatars.githubusercontent.com/u/22825865?v=4" height="60px" width="60px" alt="oscklm" />
|
136
|
+
</a>
|
131
137
|
|
132
138
|
## Sponsor my work
|
133
139
|
|
package/cxx/common/Helpers.h
CHANGED
@@ -314,4 +314,68 @@ inline void debugPrintJSIObject(jsi::Runtime& rt, std::string& name, jsi::Object
|
|
314
314
|
log.call(rt, "===/" + name + "===");
|
315
315
|
}
|
316
316
|
|
317
|
+
inline void debugPrintFollyDynamic(jsi::Runtime& rt, const std::string& name, const folly::dynamic& obj) {
|
318
|
+
auto console = rt.global().getPropertyAsObject(rt, "console");
|
319
|
+
auto log = console.getPropertyAsFunction(rt, "log");
|
320
|
+
|
321
|
+
std::function<void(const std::string&, const folly::dynamic&)> parser = [&](const std::string& key, const folly::dynamic& value) {
|
322
|
+
if (value.isBool()) {
|
323
|
+
std::string output = key + ": " + (value.getBool() ? "true" : "false");
|
324
|
+
log.call(rt, output);
|
325
|
+
return;
|
326
|
+
}
|
327
|
+
|
328
|
+
if (value.isNumber()) {
|
329
|
+
std::string output = key + ": " + std::to_string(value.asDouble());
|
330
|
+
log.call(rt, output);
|
331
|
+
return;
|
332
|
+
}
|
333
|
+
|
334
|
+
if (value.isString()) {
|
335
|
+
std::string output = key + ": " + value.getString();
|
336
|
+
log.call(rt, output);
|
337
|
+
return;
|
338
|
+
}
|
339
|
+
|
340
|
+
if (value.isNull()) {
|
341
|
+
std::string output = key + ": null";
|
342
|
+
log.call(rt, output);
|
343
|
+
return;
|
344
|
+
}
|
345
|
+
|
346
|
+
if (value.isArray()) {
|
347
|
+
for (size_t i = 0; i < value.size(); i++) {
|
348
|
+
std::string arrayKey = key + ": Array[" + std::to_string(i) + "]";
|
349
|
+
log.call(rt, arrayKey);
|
350
|
+
parser(arrayKey, value[i]);
|
351
|
+
std::string endKey = key + ": Array[end]";
|
352
|
+
log.call(rt, endKey);
|
353
|
+
}
|
354
|
+
return;
|
355
|
+
}
|
356
|
+
|
357
|
+
if (value.isObject()) {
|
358
|
+
for (const auto& pair : value.items()) {
|
359
|
+
parser(pair.first.asString(), pair.second);
|
360
|
+
}
|
361
|
+
return;
|
362
|
+
}
|
363
|
+
|
364
|
+
std::string output = key + ": [Unknown type]";
|
365
|
+
log.call(rt, output);
|
366
|
+
};
|
367
|
+
|
368
|
+
log.call(rt, "===" + name + "===");
|
369
|
+
|
370
|
+
if (obj.isObject()) {
|
371
|
+
for (const auto& pair : obj.items()) {
|
372
|
+
parser(pair.first.asString(), pair.second);
|
373
|
+
}
|
374
|
+
} else {
|
375
|
+
parser(name, obj);
|
376
|
+
}
|
377
|
+
|
378
|
+
log.call(rt, "===/" + name + "===");
|
379
|
+
}
|
380
|
+
|
317
381
|
}
|
@@ -6,7 +6,7 @@ import type { CreateUnistylesStyleSheet } from '../../types';
|
|
6
6
|
import type { UnistylesStyleSheet as UnistylesStyleSheetSpec } from './UnistylesStyleSheet.nitro';
|
7
7
|
type UnistylesThemeSettings = {
|
8
8
|
initialTheme: (() => keyof UnistylesThemes) | keyof UnistylesThemes;
|
9
|
-
adaptiveThemes?: never;
|
9
|
+
adaptiveThemes?: never | false;
|
10
10
|
} | {
|
11
11
|
adaptiveThemes: boolean;
|
12
12
|
initialTheme?: never;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/StyleSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,KAAK,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAEjG,KAAK,sBAAsB,GAAG;IAC1B,YAAY,EAAE,CAAC,MAAM,MAAM,eAAe,CAAC,GAAG,MAAM,eAAe,CAAA;I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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,CAAC;QAClC,oBAAoB,EAAE,OAAO,oBAAoB,CAAA;KACpD,CAAA;CACJ;AAgBD,KAAK,cAAc,GAAG,WAAW,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAEhE,eAAO,MAAM,UAAU,EAAgC,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -8,7 +8,7 @@ import type { UnistylesStyleSheet as UnistylesStyleSheetSpec } from './Unistyles
|
|
8
8
|
|
9
9
|
type UnistylesThemeSettings = {
|
10
10
|
initialTheme: (() => keyof UnistylesThemes) | keyof UnistylesThemes
|
11
|
-
adaptiveThemes?: never
|
11
|
+
adaptiveThemes?: never | false
|
12
12
|
} | {
|
13
13
|
adaptiveThemes: boolean
|
14
14
|
initialTheme?: never
|