react-native-nitro-input 0.3.8 → 0.4.0

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/README.md +5 -1
  3. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputMeasure.kt +52 -0
  4. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +74 -80
  5. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +18 -18
  6. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextView.kt +14 -14
  7. package/android/src/main/java/com/margelo/nitro/nitroinput/InputFonts.kt +199 -0
  8. package/android/src/main/java/com/margelo/nitro/nitroinput/InputSizing.kt +398 -0
  9. package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputView.kt +112 -333
  10. package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +178 -30
  11. package/ios/HybridNitroInputView.swift +69 -75
  12. package/ios/HybridNitroNumberView.swift +18 -18
  13. package/ios/HybridNitroTextView.swift +14 -14
  14. package/ios/InputSizing.swift +534 -0
  15. package/ios/NitroInputView.swift +102 -198
  16. package/ios/NitroNumberView.swift +98 -23
  17. package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +12 -8
  18. package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
  19. package/lib/commonjs/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
  20. package/lib/commonjs/src/NitroInput.js +164 -23
  21. package/lib/commonjs/src/NitroNumber.js +1 -1
  22. package/lib/commonjs/src/NitroText.js +6 -6
  23. package/lib/commonjs/src/specs/NitroInputMeasure.nitro.js +2 -0
  24. package/lib/module/nitrogen/generated/shared/json/NitroInputViewConfig.json +12 -8
  25. package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
  26. package/lib/module/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
  27. package/lib/module/src/NitroInput.js +165 -24
  28. package/lib/module/src/NitroNumber.js +1 -1
  29. package/lib/module/src/NitroText.js +6 -6
  30. package/lib/module/src/specs/NitroInputMeasure.nitro.js +1 -0
  31. package/lib/typescript/src/NitroInput.d.ts +9 -16
  32. package/lib/typescript/src/specs/NitroInput.nitro.d.ts +17 -8
  33. package/lib/typescript/src/specs/NitroInputMeasure.nitro.d.ts +67 -0
  34. package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +6 -6
  35. package/lib/typescript/src/specs/NitroText.nitro.d.ts +6 -6
  36. package/nitro.json +10 -0
  37. package/nitrogen/generated/android/NitroInput+autolinking.cmake +2 -0
  38. package/nitrogen/generated/android/NitroInputOnLoad.cpp +16 -0
  39. package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.cpp +93 -0
  40. package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.hpp +63 -0
  41. package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp +76 -40
  42. package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +24 -16
  43. package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +30 -30
  44. package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +12 -12
  45. package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.cpp +30 -30
  46. package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.hpp +12 -12
  47. package/nitrogen/generated/android/c++/JNitroInputSize.hpp +61 -0
  48. package/nitrogen/generated/android/c++/JNitroInputSizing.hpp +284 -0
  49. package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +44 -24
  50. package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +18 -18
  51. package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.cpp +18 -18
  52. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputMeasureSpec.kt +56 -0
  53. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputViewSpec.kt +32 -8
  54. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +6 -6
  55. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextViewSpec.kt +6 -6
  56. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSize.kt +56 -0
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSizing.kt +246 -0
  58. package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.cpp +17 -0
  59. package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +29 -0
  60. package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +11 -0
  61. package/nitrogen/generated/ios/NitroInputAutolinking.mm +8 -0
  62. package/nitrogen/generated/ios/NitroInputAutolinking.swift +12 -0
  63. package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.cpp +11 -0
  64. package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.hpp +112 -0
  65. package/nitrogen/generated/ios/c++/HybridNitroInputViewSpecSwift.hpp +56 -32
  66. package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +24 -24
  67. package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.hpp +24 -24
  68. package/nitrogen/generated/ios/c++/views/HybridNitroInputViewComponent.mm +56 -32
  69. package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +24 -24
  70. package/nitrogen/generated/ios/c++/views/HybridNitroTextViewComponent.mm +24 -24
  71. package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec.swift +55 -0
  72. package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec_cxx.swift +138 -0
  73. package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec.swift +12 -8
  74. package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +68 -24
  75. package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +6 -6
  76. package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +18 -18
  77. package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec.swift +6 -6
  78. package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec_cxx.swift +18 -18
  79. package/nitrogen/generated/ios/swift/NitroInputSize.swift +34 -0
  80. package/nitrogen/generated/ios/swift/NitroInputSizing.swift +242 -0
  81. package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.cpp +21 -0
  82. package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.hpp +66 -0
  83. package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp +24 -16
  84. package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +24 -16
  85. package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +12 -12
  86. package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +12 -12
  87. package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.cpp +12 -12
  88. package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.hpp +12 -12
  89. package/nitrogen/generated/shared/c++/NitroInputSize.hpp +87 -0
  90. package/nitrogen/generated/shared/c++/NitroInputSizing.hpp +263 -0
  91. package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +24 -16
  92. package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +36 -24
  93. package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +12 -12
  94. package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +18 -18
  95. package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.cpp +12 -12
  96. package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.hpp +18 -18
  97. package/nitrogen/generated/shared/json/NitroInputViewConfig.json +12 -8
  98. package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
  99. package/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
  100. package/package.json +4 -2
  101. package/src/NitroInput.tsx +201 -64
  102. package/src/NitroNumber.tsx +6 -6
  103. package/src/NitroText.tsx +6 -6
  104. package/src/specs/NitroInput.nitro.ts +17 -8
  105. package/src/specs/NitroInputMeasure.nitro.ts +76 -0
  106. package/src/specs/NitroNumber.nitro.ts +6 -6
  107. package/src/specs/NitroText.nitro.ts +6 -6
@@ -66,59 +66,59 @@ namespace margelo::nitro::nitroinput {
66
66
  static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* text */)>("setText");
67
67
  method(_javaPart, jni::make_jstring(text));
68
68
  }
69
- std::optional<double> JHybridNitroTextViewSpec::getFontSize() {
70
- static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getFontSize");
69
+ std::optional<double> JHybridNitroTextViewSpec::getTextSize() {
70
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getTextSize");
71
71
  auto __result = method(_javaPart);
72
72
  return __result != nullptr ? std::make_optional(__result->value()) : std::nullopt;
73
73
  }
74
- void JHybridNitroTextViewSpec::setFontSize(std::optional<double> fontSize) {
75
- static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* fontSize */)>("setFontSize");
76
- method(_javaPart, fontSize.has_value() ? jni::JDouble::valueOf(fontSize.value()) : nullptr);
74
+ void JHybridNitroTextViewSpec::setTextSize(std::optional<double> textSize) {
75
+ static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* textSize */)>("setTextSize");
76
+ method(_javaPart, textSize.has_value() ? jni::JDouble::valueOf(textSize.value()) : nullptr);
77
77
  }
78
- std::optional<double> JHybridNitroTextViewSpec::getFontWeight() {
79
- static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getFontWeight");
78
+ std::optional<double> JHybridNitroTextViewSpec::getTextWeight() {
79
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getTextWeight");
80
80
  auto __result = method(_javaPart);
81
81
  return __result != nullptr ? std::make_optional(__result->value()) : std::nullopt;
82
82
  }
83
- void JHybridNitroTextViewSpec::setFontWeight(std::optional<double> fontWeight) {
84
- static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* fontWeight */)>("setFontWeight");
85
- method(_javaPart, fontWeight.has_value() ? jni::JDouble::valueOf(fontWeight.value()) : nullptr);
83
+ void JHybridNitroTextViewSpec::setTextWeight(std::optional<double> textWeight) {
84
+ static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* textWeight */)>("setTextWeight");
85
+ method(_javaPart, textWeight.has_value() ? jni::JDouble::valueOf(textWeight.value()) : nullptr);
86
86
  }
87
- std::optional<std::string> JHybridNitroTextViewSpec::getFontFamily() {
88
- static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getFontFamily");
87
+ std::optional<std::string> JHybridNitroTextViewSpec::getTextFamily() {
88
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getTextFamily");
89
89
  auto __result = method(_javaPart);
90
90
  return __result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt;
91
91
  }
92
- void JHybridNitroTextViewSpec::setFontFamily(const std::optional<std::string>& fontFamily) {
93
- static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* fontFamily */)>("setFontFamily");
94
- method(_javaPart, fontFamily.has_value() ? jni::make_jstring(fontFamily.value()) : nullptr);
92
+ void JHybridNitroTextViewSpec::setTextFamily(const std::optional<std::string>& textFamily) {
93
+ static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* textFamily */)>("setTextFamily");
94
+ method(_javaPart, textFamily.has_value() ? jni::make_jstring(textFamily.value()) : nullptr);
95
95
  }
96
- std::optional<double> JHybridNitroTextViewSpec::getColor() {
97
- static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getColor");
96
+ std::optional<double> JHybridNitroTextViewSpec::getTextColor() {
97
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getTextColor");
98
98
  auto __result = method(_javaPart);
99
99
  return __result != nullptr ? std::make_optional(__result->value()) : std::nullopt;
100
100
  }
101
- void JHybridNitroTextViewSpec::setColor(std::optional<double> color) {
102
- static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* color */)>("setColor");
103
- method(_javaPart, color.has_value() ? jni::JDouble::valueOf(color.value()) : nullptr);
101
+ void JHybridNitroTextViewSpec::setTextColor(std::optional<double> textColor) {
102
+ static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* textColor */)>("setTextColor");
103
+ method(_javaPart, textColor.has_value() ? jni::JDouble::valueOf(textColor.value()) : nullptr);
104
104
  }
105
- std::optional<double> JHybridNitroTextViewSpec::getLetterSpacing() {
106
- static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getLetterSpacing");
105
+ std::optional<double> JHybridNitroTextViewSpec::getTextLetterSpacing() {
106
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getTextLetterSpacing");
107
107
  auto __result = method(_javaPart);
108
108
  return __result != nullptr ? std::make_optional(__result->value()) : std::nullopt;
109
109
  }
110
- void JHybridNitroTextViewSpec::setLetterSpacing(std::optional<double> letterSpacing) {
111
- static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* letterSpacing */)>("setLetterSpacing");
112
- method(_javaPart, letterSpacing.has_value() ? jni::JDouble::valueOf(letterSpacing.value()) : nullptr);
110
+ void JHybridNitroTextViewSpec::setTextLetterSpacing(std::optional<double> textLetterSpacing) {
111
+ static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* textLetterSpacing */)>("setTextLetterSpacing");
112
+ method(_javaPart, textLetterSpacing.has_value() ? jni::JDouble::valueOf(textLetterSpacing.value()) : nullptr);
113
113
  }
114
- std::optional<NitroNumberTextAlign> JHybridNitroTextViewSpec::getTextAlign() {
115
- static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroNumberTextAlign>()>("getTextAlign");
114
+ std::optional<NitroNumberTextAlign> JHybridNitroTextViewSpec::getTextAlignment() {
115
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNitroNumberTextAlign>()>("getTextAlignment");
116
116
  auto __result = method(_javaPart);
117
117
  return __result != nullptr ? std::make_optional(__result->toCpp()) : std::nullopt;
118
118
  }
119
- void JHybridNitroTextViewSpec::setTextAlign(std::optional<NitroNumberTextAlign> textAlign) {
120
- static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroNumberTextAlign> /* textAlign */)>("setTextAlign");
121
- method(_javaPart, textAlign.has_value() ? JNitroNumberTextAlign::fromCpp(textAlign.value()) : nullptr);
119
+ void JHybridNitroTextViewSpec::setTextAlignment(std::optional<NitroNumberTextAlign> textAlignment) {
120
+ static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JNitroNumberTextAlign> /* textAlignment */)>("setTextAlignment");
121
+ method(_javaPart, textAlignment.has_value() ? JNitroNumberTextAlign::fromCpp(textAlignment.value()) : nullptr);
122
122
  }
123
123
  std::optional<bool> JHybridNitroTextViewSpec::getRightToLeft() {
124
124
  static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getRightToLeft");
@@ -52,18 +52,18 @@ namespace margelo::nitro::nitroinput {
52
52
  // Properties
53
53
  std::string getText() override;
54
54
  void setText(const std::string& text) override;
55
- std::optional<double> getFontSize() override;
56
- void setFontSize(std::optional<double> fontSize) override;
57
- std::optional<double> getFontWeight() override;
58
- void setFontWeight(std::optional<double> fontWeight) override;
59
- std::optional<std::string> getFontFamily() override;
60
- void setFontFamily(const std::optional<std::string>& fontFamily) override;
61
- std::optional<double> getColor() override;
62
- void setColor(std::optional<double> color) override;
63
- std::optional<double> getLetterSpacing() override;
64
- void setLetterSpacing(std::optional<double> letterSpacing) override;
65
- std::optional<NitroNumberTextAlign> getTextAlign() override;
66
- void setTextAlign(std::optional<NitroNumberTextAlign> textAlign) override;
55
+ std::optional<double> getTextSize() override;
56
+ void setTextSize(std::optional<double> textSize) override;
57
+ std::optional<double> getTextWeight() override;
58
+ void setTextWeight(std::optional<double> textWeight) override;
59
+ std::optional<std::string> getTextFamily() override;
60
+ void setTextFamily(const std::optional<std::string>& textFamily) override;
61
+ std::optional<double> getTextColor() override;
62
+ void setTextColor(std::optional<double> textColor) override;
63
+ std::optional<double> getTextLetterSpacing() override;
64
+ void setTextLetterSpacing(std::optional<double> textLetterSpacing) override;
65
+ std::optional<NitroNumberTextAlign> getTextAlignment() override;
66
+ void setTextAlignment(std::optional<NitroNumberTextAlign> textAlignment) override;
67
67
  std::optional<bool> getRightToLeft() override;
68
68
  void setRightToLeft(std::optional<bool> rightToLeft) override;
69
69
  std::optional<double> getDuration() override;
@@ -0,0 +1,61 @@
1
+ ///
2
+ /// JNitroInputSize.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include <fbjni/fbjni.h>
11
+ #include "NitroInputSize.hpp"
12
+
13
+
14
+
15
+ namespace margelo::nitro::nitroinput {
16
+
17
+ using namespace facebook;
18
+
19
+ /**
20
+ * The C++ JNI bridge between the C++ struct "NitroInputSize" and the Kotlin data class "NitroInputSize".
21
+ */
22
+ struct JNitroInputSize final: public jni::JavaClass<JNitroInputSize> {
23
+ public:
24
+ static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroinput/NitroInputSize;";
25
+
26
+ public:
27
+ /**
28
+ * Convert this Java/Kotlin-based struct to the C++ struct NitroInputSize by copying all values to C++.
29
+ */
30
+ [[maybe_unused]]
31
+ [[nodiscard]]
32
+ NitroInputSize toCpp() const {
33
+ static const auto clazz = javaClassStatic();
34
+ static const auto fieldWidth = clazz->getField<double>("width");
35
+ double width = this->getFieldValue(fieldWidth);
36
+ static const auto fieldHeight = clazz->getField<double>("height");
37
+ double height = this->getFieldValue(fieldHeight);
38
+ return NitroInputSize(
39
+ width,
40
+ height
41
+ );
42
+ }
43
+
44
+ public:
45
+ /**
46
+ * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
47
+ */
48
+ [[maybe_unused]]
49
+ static jni::local_ref<JNitroInputSize::javaobject> fromCpp(const NitroInputSize& value) {
50
+ using JSignature = JNitroInputSize(double, double);
51
+ static const auto clazz = javaClassStatic();
52
+ static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
53
+ return create(
54
+ clazz,
55
+ value.width,
56
+ value.height
57
+ );
58
+ }
59
+ };
60
+
61
+ } // namespace margelo::nitro::nitroinput
@@ -0,0 +1,284 @@
1
+ ///
2
+ /// JNitroInputSizing.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include <fbjni/fbjni.h>
11
+ #include "NitroInputSizing.hpp"
12
+
13
+ #include "JNitroInputCharacterMapping.hpp"
14
+ #include "JNitroInputLabelBehavior.hpp"
15
+ #include "JNitroInputMaskAffinity.hpp"
16
+ #include "JNitroInputMode.hpp"
17
+ #include "JNitroInputNotation.hpp"
18
+ #include "JNitroInputSignPlacement.hpp"
19
+ #include "JNitroInputTextCase.hpp"
20
+ #include "JNitroInputVariant.hpp"
21
+ #include "NitroInputCharacterMapping.hpp"
22
+ #include "NitroInputLabelBehavior.hpp"
23
+ #include "NitroInputMaskAffinity.hpp"
24
+ #include "NitroInputMode.hpp"
25
+ #include "NitroInputNotation.hpp"
26
+ #include "NitroInputSignPlacement.hpp"
27
+ #include "NitroInputTextCase.hpp"
28
+ #include "NitroInputVariant.hpp"
29
+ #include <string>
30
+ #include <vector>
31
+
32
+ namespace margelo::nitro::nitroinput {
33
+
34
+ using namespace facebook;
35
+
36
+ /**
37
+ * The C++ JNI bridge between the C++ struct "NitroInputSizing" and the Kotlin data class "NitroInputSizing".
38
+ */
39
+ struct JNitroInputSizing final: public jni::JavaClass<JNitroInputSizing> {
40
+ public:
41
+ static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroinput/NitroInputSizing;";
42
+
43
+ public:
44
+ /**
45
+ * Convert this Java/Kotlin-based struct to the C++ struct NitroInputSizing by copying all values to C++.
46
+ */
47
+ [[maybe_unused]]
48
+ [[nodiscard]]
49
+ NitroInputSizing toCpp() const {
50
+ static const auto clazz = javaClassStatic();
51
+ static const auto fieldText = clazz->getField<jni::JString>("text");
52
+ jni::local_ref<jni::JString> text = this->getFieldValue(fieldText);
53
+ static const auto fieldMode = clazz->getField<JNitroInputMode>("mode");
54
+ jni::local_ref<JNitroInputMode> mode = this->getFieldValue(fieldMode);
55
+ static const auto fieldPlain = clazz->getField<jboolean>("plain");
56
+ jboolean plain = this->getFieldValue(fieldPlain);
57
+ static const auto fieldMultiline = clazz->getField<jboolean>("multiline");
58
+ jboolean multiline = this->getFieldValue(fieldMultiline);
59
+ static const auto fieldSecureTextEntry = clazz->getField<jboolean>("secureTextEntry");
60
+ jboolean secureTextEntry = this->getFieldValue(fieldSecureTextEntry);
61
+ static const auto fieldMaxLength = clazz->getField<double>("maxLength");
62
+ double maxLength = this->getFieldValue(fieldMaxLength);
63
+ static const auto fieldFractionDigits = clazz->getField<double>("fractionDigits");
64
+ double fractionDigits = this->getFieldValue(fieldFractionDigits);
65
+ static const auto fieldMaxIntegerDigits = clazz->getField<double>("maxIntegerDigits");
66
+ double maxIntegerDigits = this->getFieldValue(fieldMaxIntegerDigits);
67
+ static const auto fieldGroupingSeparator = clazz->getField<jni::JString>("groupingSeparator");
68
+ jni::local_ref<jni::JString> groupingSeparator = this->getFieldValue(fieldGroupingSeparator);
69
+ static const auto fieldDecimalSeparator = clazz->getField<jni::JString>("decimalSeparator");
70
+ jni::local_ref<jni::JString> decimalSeparator = this->getFieldValue(fieldDecimalSeparator);
71
+ static const auto fieldPrefix = clazz->getField<jni::JString>("prefix");
72
+ jni::local_ref<jni::JString> prefix = this->getFieldValue(fieldPrefix);
73
+ static const auto fieldSuffix = clazz->getField<jni::JString>("suffix");
74
+ jni::local_ref<jni::JString> suffix = this->getFieldValue(fieldSuffix);
75
+ static const auto fieldSignPlacement = clazz->getField<JNitroInputSignPlacement>("signPlacement");
76
+ jni::local_ref<JNitroInputSignPlacement> signPlacement = this->getFieldValue(fieldSignPlacement);
77
+ static const auto fieldPlaceholder = clazz->getField<jni::JString>("placeholder");
78
+ jni::local_ref<jni::JString> placeholder = this->getFieldValue(fieldPlaceholder);
79
+ static const auto fieldMask = clazz->getField<jni::JString>("mask");
80
+ jni::local_ref<jni::JString> mask = this->getFieldValue(fieldMask);
81
+ static const auto fieldMaskNotations = clazz->getField<jni::JArrayClass<JNitroInputNotation>>("maskNotations");
82
+ jni::local_ref<jni::JArrayClass<JNitroInputNotation>> maskNotations = this->getFieldValue(fieldMaskNotations);
83
+ static const auto fieldMaskAutocomplete = clazz->getField<jboolean>("maskAutocomplete");
84
+ jboolean maskAutocomplete = this->getFieldValue(fieldMaskAutocomplete);
85
+ static const auto fieldMaskAutoSkip = clazz->getField<jboolean>("maskAutoSkip");
86
+ jboolean maskAutoSkip = this->getFieldValue(fieldMaskAutoSkip);
87
+ static const auto fieldMaskAffinityFormats = clazz->getField<jni::JArrayClass<jni::JString>>("maskAffinityFormats");
88
+ jni::local_ref<jni::JArrayClass<jni::JString>> maskAffinityFormats = this->getFieldValue(fieldMaskAffinityFormats);
89
+ static const auto fieldMaskAffinityStrategy = clazz->getField<JNitroInputMaskAffinity>("maskAffinityStrategy");
90
+ jni::local_ref<JNitroInputMaskAffinity> maskAffinityStrategy = this->getFieldValue(fieldMaskAffinityStrategy);
91
+ static const auto fieldMaskTextCase = clazz->getField<JNitroInputTextCase>("maskTextCase");
92
+ jni::local_ref<JNitroInputTextCase> maskTextCase = this->getFieldValue(fieldMaskTextCase);
93
+ static const auto fieldMaskCharacterMap = clazz->getField<jni::JArrayClass<JNitroInputCharacterMapping>>("maskCharacterMap");
94
+ jni::local_ref<jni::JArrayClass<JNitroInputCharacterMapping>> maskCharacterMap = this->getFieldValue(fieldMaskCharacterMap);
95
+ static const auto fieldMaskSlotPlaceholder = clazz->getField<jni::JString>("maskSlotPlaceholder");
96
+ jni::local_ref<jni::JString> maskSlotPlaceholder = this->getFieldValue(fieldMaskSlotPlaceholder);
97
+ static const auto fieldKeepPlaceholder = clazz->getField<jboolean>("keepPlaceholder");
98
+ jboolean keepPlaceholder = this->getFieldValue(fieldKeepPlaceholder);
99
+ static const auto fieldTextSize = clazz->getField<double>("textSize");
100
+ double textSize = this->getFieldValue(fieldTextSize);
101
+ static const auto fieldTextLineHeight = clazz->getField<double>("textLineHeight");
102
+ double textLineHeight = this->getFieldValue(fieldTextLineHeight);
103
+ static const auto fieldPrefixFontSize = clazz->getField<double>("prefixFontSize");
104
+ double prefixFontSize = this->getFieldValue(fieldPrefixFontSize);
105
+ static const auto fieldSuffixFontSize = clazz->getField<double>("suffixFontSize");
106
+ double suffixFontSize = this->getFieldValue(fieldSuffixFontSize);
107
+ static const auto fieldTextWeight = clazz->getField<double>("textWeight");
108
+ double textWeight = this->getFieldValue(fieldTextWeight);
109
+ static const auto fieldTextFamily = clazz->getField<jni::JString>("textFamily");
110
+ jni::local_ref<jni::JString> textFamily = this->getFieldValue(fieldTextFamily);
111
+ static const auto fieldTextLetterSpacing = clazz->getField<double>("textLetterSpacing");
112
+ double textLetterSpacing = this->getFieldValue(fieldTextLetterSpacing);
113
+ static const auto fieldPrefixSpacing = clazz->getField<double>("prefixSpacing");
114
+ double prefixSpacing = this->getFieldValue(fieldPrefixSpacing);
115
+ static const auto fieldSuffixSpacing = clazz->getField<double>("suffixSpacing");
116
+ double suffixSpacing = this->getFieldValue(fieldSuffixSpacing);
117
+ static const auto fieldAllowFontScaling = clazz->getField<jboolean>("allowFontScaling");
118
+ jboolean allowFontScaling = this->getFieldValue(fieldAllowFontScaling);
119
+ static const auto fieldMaxFontSizeMultiplier = clazz->getField<double>("maxFontSizeMultiplier");
120
+ double maxFontSizeMultiplier = this->getFieldValue(fieldMaxFontSizeMultiplier);
121
+ static const auto fieldVariant = clazz->getField<JNitroInputVariant>("variant");
122
+ jni::local_ref<JNitroInputVariant> variant = this->getFieldValue(fieldVariant);
123
+ static const auto fieldLabel = clazz->getField<jni::JString>("label");
124
+ jni::local_ref<jni::JString> label = this->getFieldValue(fieldLabel);
125
+ static const auto fieldLabelBehavior = clazz->getField<JNitroInputLabelBehavior>("labelBehavior");
126
+ jni::local_ref<JNitroInputLabelBehavior> labelBehavior = this->getFieldValue(fieldLabelBehavior);
127
+ static const auto fieldLabelFontSize = clazz->getField<double>("labelFontSize");
128
+ double labelFontSize = this->getFieldValue(fieldLabelFontSize);
129
+ static const auto fieldCornerRadius = clazz->getField<double>("cornerRadius");
130
+ double cornerRadius = this->getFieldValue(fieldCornerRadius);
131
+ return NitroInputSizing(
132
+ text->toStdString(),
133
+ mode->toCpp(),
134
+ static_cast<bool>(plain),
135
+ static_cast<bool>(multiline),
136
+ static_cast<bool>(secureTextEntry),
137
+ maxLength,
138
+ fractionDigits,
139
+ maxIntegerDigits,
140
+ groupingSeparator->toStdString(),
141
+ decimalSeparator->toStdString(),
142
+ prefix->toStdString(),
143
+ suffix->toStdString(),
144
+ signPlacement->toCpp(),
145
+ placeholder->toStdString(),
146
+ mask->toStdString(),
147
+ [&](auto&& __input) {
148
+ size_t __size = __input->size();
149
+ std::vector<NitroInputNotation> __vector;
150
+ __vector.reserve(__size);
151
+ for (size_t __i = 0; __i < __size; __i++) {
152
+ auto __element = __input->getElement(__i);
153
+ __vector.push_back(__element->toCpp());
154
+ }
155
+ return __vector;
156
+ }(maskNotations),
157
+ static_cast<bool>(maskAutocomplete),
158
+ static_cast<bool>(maskAutoSkip),
159
+ [&](auto&& __input) {
160
+ size_t __size = __input->size();
161
+ std::vector<std::string> __vector;
162
+ __vector.reserve(__size);
163
+ for (size_t __i = 0; __i < __size; __i++) {
164
+ auto __element = __input->getElement(__i);
165
+ __vector.push_back(__element->toStdString());
166
+ }
167
+ return __vector;
168
+ }(maskAffinityFormats),
169
+ maskAffinityStrategy->toCpp(),
170
+ maskTextCase->toCpp(),
171
+ [&](auto&& __input) {
172
+ size_t __size = __input->size();
173
+ std::vector<NitroInputCharacterMapping> __vector;
174
+ __vector.reserve(__size);
175
+ for (size_t __i = 0; __i < __size; __i++) {
176
+ auto __element = __input->getElement(__i);
177
+ __vector.push_back(__element->toCpp());
178
+ }
179
+ return __vector;
180
+ }(maskCharacterMap),
181
+ maskSlotPlaceholder->toStdString(),
182
+ static_cast<bool>(keepPlaceholder),
183
+ textSize,
184
+ textLineHeight,
185
+ prefixFontSize,
186
+ suffixFontSize,
187
+ textWeight,
188
+ textFamily->toStdString(),
189
+ textLetterSpacing,
190
+ prefixSpacing,
191
+ suffixSpacing,
192
+ static_cast<bool>(allowFontScaling),
193
+ maxFontSizeMultiplier,
194
+ variant->toCpp(),
195
+ label->toStdString(),
196
+ labelBehavior->toCpp(),
197
+ labelFontSize,
198
+ cornerRadius
199
+ );
200
+ }
201
+
202
+ public:
203
+ /**
204
+ * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
205
+ */
206
+ [[maybe_unused]]
207
+ static jni::local_ref<JNitroInputSizing::javaobject> fromCpp(const NitroInputSizing& value) {
208
+ using JSignature = JNitroInputSizing(jni::alias_ref<jni::JString>, jni::alias_ref<JNitroInputMode>, jboolean, jboolean, jboolean, double, double, double, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<JNitroInputSignPlacement>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JArrayClass<JNitroInputNotation>>, jboolean, jboolean, jni::alias_ref<jni::JArrayClass<jni::JString>>, jni::alias_ref<JNitroInputMaskAffinity>, jni::alias_ref<JNitroInputTextCase>, jni::alias_ref<jni::JArrayClass<JNitroInputCharacterMapping>>, jni::alias_ref<jni::JString>, jboolean, double, double, double, double, double, jni::alias_ref<jni::JString>, double, double, double, jboolean, double, jni::alias_ref<JNitroInputVariant>, jni::alias_ref<jni::JString>, jni::alias_ref<JNitroInputLabelBehavior>, double, double);
209
+ static const auto clazz = javaClassStatic();
210
+ static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
211
+ return create(
212
+ clazz,
213
+ jni::make_jstring(value.text),
214
+ JNitroInputMode::fromCpp(value.mode),
215
+ value.plain,
216
+ value.multiline,
217
+ value.secureTextEntry,
218
+ value.maxLength,
219
+ value.fractionDigits,
220
+ value.maxIntegerDigits,
221
+ jni::make_jstring(value.groupingSeparator),
222
+ jni::make_jstring(value.decimalSeparator),
223
+ jni::make_jstring(value.prefix),
224
+ jni::make_jstring(value.suffix),
225
+ JNitroInputSignPlacement::fromCpp(value.signPlacement),
226
+ jni::make_jstring(value.placeholder),
227
+ jni::make_jstring(value.mask),
228
+ [&](auto&& __input) {
229
+ size_t __size = __input.size();
230
+ jni::local_ref<jni::JArrayClass<JNitroInputNotation>> __array = jni::JArrayClass<JNitroInputNotation>::newArray(__size);
231
+ for (size_t __i = 0; __i < __size; __i++) {
232
+ const auto& __element = __input[__i];
233
+ auto __elementJni = JNitroInputNotation::fromCpp(__element);
234
+ __array->setElement(__i, *__elementJni);
235
+ }
236
+ return __array;
237
+ }(value.maskNotations),
238
+ value.maskAutocomplete,
239
+ value.maskAutoSkip,
240
+ [&](auto&& __input) {
241
+ size_t __size = __input.size();
242
+ jni::local_ref<jni::JArrayClass<jni::JString>> __array = jni::JArrayClass<jni::JString>::newArray(__size);
243
+ for (size_t __i = 0; __i < __size; __i++) {
244
+ const auto& __element = __input[__i];
245
+ auto __elementJni = jni::make_jstring(__element);
246
+ __array->setElement(__i, *__elementJni);
247
+ }
248
+ return __array;
249
+ }(value.maskAffinityFormats),
250
+ JNitroInputMaskAffinity::fromCpp(value.maskAffinityStrategy),
251
+ JNitroInputTextCase::fromCpp(value.maskTextCase),
252
+ [&](auto&& __input) {
253
+ size_t __size = __input.size();
254
+ jni::local_ref<jni::JArrayClass<JNitroInputCharacterMapping>> __array = jni::JArrayClass<JNitroInputCharacterMapping>::newArray(__size);
255
+ for (size_t __i = 0; __i < __size; __i++) {
256
+ const auto& __element = __input[__i];
257
+ auto __elementJni = JNitroInputCharacterMapping::fromCpp(__element);
258
+ __array->setElement(__i, *__elementJni);
259
+ }
260
+ return __array;
261
+ }(value.maskCharacterMap),
262
+ jni::make_jstring(value.maskSlotPlaceholder),
263
+ value.keepPlaceholder,
264
+ value.textSize,
265
+ value.textLineHeight,
266
+ value.prefixFontSize,
267
+ value.suffixFontSize,
268
+ value.textWeight,
269
+ jni::make_jstring(value.textFamily),
270
+ value.textLetterSpacing,
271
+ value.prefixSpacing,
272
+ value.suffixSpacing,
273
+ value.allowFontScaling,
274
+ value.maxFontSizeMultiplier,
275
+ JNitroInputVariant::fromCpp(value.variant),
276
+ jni::make_jstring(value.label),
277
+ JNitroInputLabelBehavior::fromCpp(value.labelBehavior),
278
+ value.labelFontSize,
279
+ value.cornerRadius
280
+ );
281
+ }
282
+ };
283
+
284
+ } // namespace margelo::nitro::nitroinput
@@ -234,9 +234,9 @@ void JHybridNitroInputViewStateUpdater::updateViewProps(jni::alias_ref<jni::JCla
234
234
  hybridView->setSuffixAlign(newProps->suffixAlign.get());
235
235
  }
236
236
  if (oldProps == nullptr
237
- ? newProps->letterSpacing.isProvided()
238
- : !newProps->letterSpacing.hasSameValue(oldProps->letterSpacing)) {
239
- hybridView->setLetterSpacing(newProps->letterSpacing.get());
237
+ ? newProps->textLetterSpacing.isProvided()
238
+ : !newProps->textLetterSpacing.hasSameValue(oldProps->textLetterSpacing)) {
239
+ hybridView->setTextLetterSpacing(newProps->textLetterSpacing.get());
240
240
  }
241
241
  if (oldProps == nullptr
242
242
  ? newProps->prefixSpacing.isProvided()
@@ -289,34 +289,34 @@ void JHybridNitroInputViewStateUpdater::updateViewProps(jni::alias_ref<jni::JCla
289
289
  hybridView->setEffect(newProps->effect.get());
290
290
  }
291
291
  if (oldProps == nullptr
292
- ? newProps->fontSize.isProvided()
293
- : !newProps->fontSize.hasSameValue(oldProps->fontSize)) {
294
- hybridView->setFontSize(newProps->fontSize.get());
292
+ ? newProps->textSize.isProvided()
293
+ : !newProps->textSize.hasSameValue(oldProps->textSize)) {
294
+ hybridView->setTextSize(newProps->textSize.get());
295
295
  }
296
296
  if (oldProps == nullptr
297
- ? newProps->lineHeight.isProvided()
298
- : !newProps->lineHeight.hasSameValue(oldProps->lineHeight)) {
299
- hybridView->setLineHeight(newProps->lineHeight.get());
297
+ ? newProps->textLineHeight.isProvided()
298
+ : !newProps->textLineHeight.hasSameValue(oldProps->textLineHeight)) {
299
+ hybridView->setTextLineHeight(newProps->textLineHeight.get());
300
300
  }
301
301
  if (oldProps == nullptr
302
- ? newProps->fontWeight.isProvided()
303
- : !newProps->fontWeight.hasSameValue(oldProps->fontWeight)) {
304
- hybridView->setFontWeight(newProps->fontWeight.get());
302
+ ? newProps->textWeight.isProvided()
303
+ : !newProps->textWeight.hasSameValue(oldProps->textWeight)) {
304
+ hybridView->setTextWeight(newProps->textWeight.get());
305
305
  }
306
306
  if (oldProps == nullptr
307
- ? newProps->fontFamily.isProvided()
308
- : !newProps->fontFamily.hasSameValue(oldProps->fontFamily)) {
309
- hybridView->setFontFamily(newProps->fontFamily.get());
307
+ ? newProps->textFamily.isProvided()
308
+ : !newProps->textFamily.hasSameValue(oldProps->textFamily)) {
309
+ hybridView->setTextFamily(newProps->textFamily.get());
310
310
  }
311
311
  if (oldProps == nullptr
312
- ? newProps->color.isProvided()
313
- : !newProps->color.hasSameValue(oldProps->color)) {
314
- hybridView->setColor(newProps->color.get());
312
+ ? newProps->textColor.isProvided()
313
+ : !newProps->textColor.hasSameValue(oldProps->textColor)) {
314
+ hybridView->setTextColor(newProps->textColor.get());
315
315
  }
316
316
  if (oldProps == nullptr
317
- ? newProps->textAlign.isProvided()
318
- : !newProps->textAlign.hasSameValue(oldProps->textAlign)) {
319
- hybridView->setTextAlign(newProps->textAlign.get());
317
+ ? newProps->textAlignment.isProvided()
318
+ : !newProps->textAlignment.hasSameValue(oldProps->textAlignment)) {
319
+ hybridView->setTextAlignment(newProps->textAlignment.get());
320
320
  }
321
321
  if (oldProps == nullptr
322
322
  ? newProps->rightToLeft.isProvided()
@@ -394,9 +394,29 @@ void JHybridNitroInputViewStateUpdater::updateViewProps(jni::alias_ref<jni::JCla
394
394
  hybridView->setNumberOfLines(newProps->numberOfLines.get());
395
395
  }
396
396
  if (oldProps == nullptr
397
- ? newProps->textAlignVertical.isProvided()
398
- : !newProps->textAlignVertical.hasSameValue(oldProps->textAlignVertical)) {
399
- hybridView->setTextAlignVertical(newProps->textAlignVertical.get());
397
+ ? newProps->textVerticalAlignment.isProvided()
398
+ : !newProps->textVerticalAlignment.hasSameValue(oldProps->textVerticalAlignment)) {
399
+ hybridView->setTextVerticalAlignment(newProps->textVerticalAlignment.get());
400
+ }
401
+ if (oldProps == nullptr
402
+ ? newProps->textInsetLeft.isProvided()
403
+ : !newProps->textInsetLeft.hasSameValue(oldProps->textInsetLeft)) {
404
+ hybridView->setTextInsetLeft(newProps->textInsetLeft.get());
405
+ }
406
+ if (oldProps == nullptr
407
+ ? newProps->textInsetTop.isProvided()
408
+ : !newProps->textInsetTop.hasSameValue(oldProps->textInsetTop)) {
409
+ hybridView->setTextInsetTop(newProps->textInsetTop.get());
410
+ }
411
+ if (oldProps == nullptr
412
+ ? newProps->textInsetRight.isProvided()
413
+ : !newProps->textInsetRight.hasSameValue(oldProps->textInsetRight)) {
414
+ hybridView->setTextInsetRight(newProps->textInsetRight.get());
415
+ }
416
+ if (oldProps == nullptr
417
+ ? newProps->textInsetBottom.isProvided()
418
+ : !newProps->textInsetBottom.hasSameValue(oldProps->textInsetBottom)) {
419
+ hybridView->setTextInsetBottom(newProps->textInsetBottom.get());
400
420
  }
401
421
  if (oldProps == nullptr
402
422
  ? newProps->scrollEnabled.isProvided()
@@ -219,9 +219,9 @@ void JHybridNitroNumberViewStateUpdater::updateViewProps(jni::alias_ref<jni::JCl
219
219
  hybridView->setShimmerDelay(newProps->shimmerDelay.get());
220
220
  }
221
221
  if (oldProps == nullptr
222
- ? newProps->fontSize.isProvided()
223
- : !newProps->fontSize.hasSameValue(oldProps->fontSize)) {
224
- hybridView->setFontSize(newProps->fontSize.get());
222
+ ? newProps->textSize.isProvided()
223
+ : !newProps->textSize.hasSameValue(oldProps->textSize)) {
224
+ hybridView->setTextSize(newProps->textSize.get());
225
225
  }
226
226
  if (oldProps == nullptr
227
227
  ? newProps->prefixFontSize.isProvided()
@@ -249,9 +249,9 @@ void JHybridNitroNumberViewStateUpdater::updateViewProps(jni::alias_ref<jni::JCl
249
249
  hybridView->setSuffixAlign(newProps->suffixAlign.get());
250
250
  }
251
251
  if (oldProps == nullptr
252
- ? newProps->letterSpacing.isProvided()
253
- : !newProps->letterSpacing.hasSameValue(oldProps->letterSpacing)) {
254
- hybridView->setLetterSpacing(newProps->letterSpacing.get());
252
+ ? newProps->textLetterSpacing.isProvided()
253
+ : !newProps->textLetterSpacing.hasSameValue(oldProps->textLetterSpacing)) {
254
+ hybridView->setTextLetterSpacing(newProps->textLetterSpacing.get());
255
255
  }
256
256
  if (oldProps == nullptr
257
257
  ? newProps->prefixSpacing.isProvided()
@@ -364,24 +364,24 @@ void JHybridNitroNumberViewStateUpdater::updateViewProps(jni::alias_ref<jni::JCl
364
364
  hybridView->setMaxFontSizeMultiplier(newProps->maxFontSizeMultiplier.get());
365
365
  }
366
366
  if (oldProps == nullptr
367
- ? newProps->fontWeight.isProvided()
368
- : !newProps->fontWeight.hasSameValue(oldProps->fontWeight)) {
369
- hybridView->setFontWeight(newProps->fontWeight.get());
367
+ ? newProps->textWeight.isProvided()
368
+ : !newProps->textWeight.hasSameValue(oldProps->textWeight)) {
369
+ hybridView->setTextWeight(newProps->textWeight.get());
370
370
  }
371
371
  if (oldProps == nullptr
372
- ? newProps->fontFamily.isProvided()
373
- : !newProps->fontFamily.hasSameValue(oldProps->fontFamily)) {
374
- hybridView->setFontFamily(newProps->fontFamily.get());
372
+ ? newProps->textFamily.isProvided()
373
+ : !newProps->textFamily.hasSameValue(oldProps->textFamily)) {
374
+ hybridView->setTextFamily(newProps->textFamily.get());
375
375
  }
376
376
  if (oldProps == nullptr
377
- ? newProps->color.isProvided()
378
- : !newProps->color.hasSameValue(oldProps->color)) {
379
- hybridView->setColor(newProps->color.get());
377
+ ? newProps->textColor.isProvided()
378
+ : !newProps->textColor.hasSameValue(oldProps->textColor)) {
379
+ hybridView->setTextColor(newProps->textColor.get());
380
380
  }
381
381
  if (oldProps == nullptr
382
- ? newProps->textAlign.isProvided()
383
- : !newProps->textAlign.hasSameValue(oldProps->textAlign)) {
384
- hybridView->setTextAlign(newProps->textAlign.get());
382
+ ? newProps->textAlignment.isProvided()
383
+ : !newProps->textAlignment.hasSameValue(oldProps->textAlignment)) {
384
+ hybridView->setTextAlignment(newProps->textAlignment.get());
385
385
  }
386
386
  if (oldProps == nullptr
387
387
  ? newProps->rightToLeft.isProvided()