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.
Files changed (53) 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 +42 -68
  14. package/cxx/parser/Parser.h +8 -13
  15. package/lib/commonjs/specs/NavigtionBar/index.js +1 -1
  16. package/lib/commonjs/specs/NavigtionBar/index.js.map +1 -1
  17. package/lib/commonjs/specs/ShadowRegistry/index.js +2 -2
  18. package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
  19. package/lib/commonjs/specs/StatusBar/index.js +1 -1
  20. package/lib/commonjs/specs/StatusBar/index.js.map +1 -1
  21. package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
  22. package/lib/commonjs/specs/UnistylesRuntime/index.js +1 -1
  23. package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -1
  24. package/lib/module/specs/NavigtionBar/index.js +1 -1
  25. package/lib/module/specs/NavigtionBar/index.js.map +1 -1
  26. package/lib/module/specs/ShadowRegistry/index.js +2 -2
  27. package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
  28. package/lib/module/specs/StatusBar/index.js +1 -1
  29. package/lib/module/specs/StatusBar/index.js.map +1 -1
  30. package/lib/module/specs/StyleSheet/index.js.map +1 -1
  31. package/lib/module/specs/UnistylesRuntime/index.js +1 -1
  32. package/lib/module/specs/UnistylesRuntime/index.js.map +1 -1
  33. package/lib/typescript/example/App.d.ts.map +1 -1
  34. package/lib/typescript/example/Typography.d.ts +11 -0
  35. package/lib/typescript/example/Typography.d.ts.map +1 -0
  36. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +2 -2
  37. package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
  38. package/lib/typescript/src/specs/StyleSheet/index.d.ts +2 -1
  39. package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/plugin/__tests__/dependencies.spec.js +181 -103
  42. package/plugin/__tests__/ref.spec.js +222 -158
  43. package/plugin/__tests__/stylesheet.spec.js +148 -55
  44. package/plugin/index.js +22 -11
  45. package/plugin/ref.js +35 -7
  46. package/plugin/style.js +5 -22
  47. package/plugin/stylesheet.js +44 -1
  48. package/plugin/variants.js +33 -0
  49. package/src/specs/NavigtionBar/index.ts +1 -1
  50. package/src/specs/ShadowRegistry/index.ts +4 -4
  51. package/src/specs/StatusBar/index.ts +1 -1
  52. package/src/specs/StyleSheet/index.ts +3 -1
  53. package/src/specs/UnistylesRuntime/index.ts +1 -1
@@ -41,4 +41,6 @@ HybridUnistylesStyleSheet.jsMethods = {
41
41
  processColor
42
42
  }
43
43
 
44
- export const StyleSheet = HybridUnistylesStyleSheet as Omit<UnistylesStyleSheet, 'jsMethods'>
44
+ type PrivateMethods = 'jsMethods'
45
+
46
+ export const StyleSheet = HybridUnistylesStyleSheet as Omit<UnistylesStyleSheet, PrivateMethods>
@@ -45,7 +45,7 @@ HybridUnistylesRuntime.navigationBar = HybridUnistylesRuntime.createHybridNaviga
45
45
  HybridUnistylesRuntime._setRootViewBackgroundColor = HybridUnistylesRuntime.setRootViewBackgroundColor
46
46
 
47
47
  HybridUnistylesRuntime.setRootViewBackgroundColor = (color?: string) => {
48
- const parsedColor = processColor(color)
48
+ const parsedColor = processColor(color) ?? 0
49
49
 
50
50
  HybridUnistylesRuntime._setRootViewBackgroundColor(parsedColor as number)
51
51
  }