react-native-nitro-input 0.3.8 → 0.4.1

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 (108) hide show
  1. package/CHANGELOG.md +105 -0
  2. package/README.md +6 -1
  3. package/android/src/main/java/com/margelo/nitro/nitroinput/DigitSlots.kt +143 -0
  4. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputMeasure.kt +52 -0
  5. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +80 -80
  6. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +18 -18
  7. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextView.kt +14 -14
  8. package/android/src/main/java/com/margelo/nitro/nitroinput/InputFonts.kt +244 -0
  9. package/android/src/main/java/com/margelo/nitro/nitroinput/InputSizing.kt +404 -0
  10. package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputView.kt +168 -338
  11. package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +178 -30
  12. package/ios/HybridNitroInputView.swift +73 -75
  13. package/ios/HybridNitroNumberView.swift +18 -18
  14. package/ios/HybridNitroTextView.swift +14 -14
  15. package/ios/InputSizing.swift +628 -0
  16. package/ios/NitroInputView.swift +180 -209
  17. package/ios/NitroNumberView.swift +98 -23
  18. package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +14 -8
  19. package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
  20. package/lib/commonjs/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
  21. package/lib/commonjs/src/NitroInput.js +166 -23
  22. package/lib/commonjs/src/NitroNumber.js +1 -1
  23. package/lib/commonjs/src/NitroText.js +6 -6
  24. package/lib/commonjs/src/specs/NitroInputMeasure.nitro.js +2 -0
  25. package/lib/module/nitrogen/generated/shared/json/NitroInputViewConfig.json +14 -8
  26. package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
  27. package/lib/module/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
  28. package/lib/module/src/NitroInput.js +167 -24
  29. package/lib/module/src/NitroNumber.js +1 -1
  30. package/lib/module/src/NitroText.js +6 -6
  31. package/lib/module/src/specs/NitroInputMeasure.nitro.js +1 -0
  32. package/lib/typescript/src/NitroInput.d.ts +20 -16
  33. package/lib/typescript/src/specs/NitroInput.nitro.d.ts +21 -8
  34. package/lib/typescript/src/specs/NitroInputMeasure.nitro.d.ts +69 -0
  35. package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +6 -6
  36. package/lib/typescript/src/specs/NitroText.nitro.d.ts +6 -6
  37. package/nitro.json +10 -0
  38. package/nitrogen/generated/android/NitroInput+autolinking.cmake +2 -0
  39. package/nitrogen/generated/android/NitroInputOnLoad.cpp +16 -0
  40. package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.cpp +93 -0
  41. package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.hpp +63 -0
  42. package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp +94 -40
  43. package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +28 -16
  44. package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +30 -30
  45. package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +12 -12
  46. package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.cpp +30 -30
  47. package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.hpp +12 -12
  48. package/nitrogen/generated/android/c++/JNitroInputSize.hpp +61 -0
  49. package/nitrogen/generated/android/c++/JNitroInputSizing.hpp +292 -0
  50. package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +54 -24
  51. package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +18 -18
  52. package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.cpp +18 -18
  53. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputMeasureSpec.kt +56 -0
  54. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputViewSpec.kt +44 -8
  55. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +6 -6
  56. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextViewSpec.kt +6 -6
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSize.kt +56 -0
  58. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSizing.kt +256 -0
  59. package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.cpp +17 -0
  60. package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +29 -0
  61. package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +11 -0
  62. package/nitrogen/generated/ios/NitroInputAutolinking.mm +8 -0
  63. package/nitrogen/generated/ios/NitroInputAutolinking.swift +12 -0
  64. package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.cpp +11 -0
  65. package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.hpp +112 -0
  66. package/nitrogen/generated/ios/c++/HybridNitroInputViewSpecSwift.hpp +68 -32
  67. package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +24 -24
  68. package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.hpp +24 -24
  69. package/nitrogen/generated/ios/c++/views/HybridNitroInputViewComponent.mm +68 -32
  70. package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +24 -24
  71. package/nitrogen/generated/ios/c++/views/HybridNitroTextViewComponent.mm +24 -24
  72. package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec.swift +55 -0
  73. package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec_cxx.swift +138 -0
  74. package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec.swift +14 -8
  75. package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +90 -24
  76. package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +6 -6
  77. package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +18 -18
  78. package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec.swift +6 -6
  79. package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec_cxx.swift +18 -18
  80. package/nitrogen/generated/ios/swift/NitroInputSize.swift +34 -0
  81. package/nitrogen/generated/ios/swift/NitroInputSizing.swift +252 -0
  82. package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.cpp +21 -0
  83. package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.hpp +66 -0
  84. package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp +28 -16
  85. package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +28 -16
  86. package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +12 -12
  87. package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +12 -12
  88. package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.cpp +12 -12
  89. package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.hpp +12 -12
  90. package/nitrogen/generated/shared/c++/NitroInputSize.hpp +87 -0
  91. package/nitrogen/generated/shared/c++/NitroInputSizing.hpp +271 -0
  92. package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +28 -16
  93. package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +42 -24
  94. package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +12 -12
  95. package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +18 -18
  96. package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.cpp +12 -12
  97. package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.hpp +18 -18
  98. package/nitrogen/generated/shared/json/NitroInputViewConfig.json +14 -8
  99. package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
  100. package/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
  101. package/package.json +4 -2
  102. package/src/NitroInput.tsx +215 -64
  103. package/src/NitroNumber.tsx +6 -6
  104. package/src/NitroText.tsx +6 -6
  105. package/src/specs/NitroInput.nitro.ts +21 -8
  106. package/src/specs/NitroInputMeasure.nitro.ts +78 -0
  107. package/src/specs/NitroNumber.nitro.ts +6 -6
  108. package/src/specs/NitroText.nitro.ts +6 -6
@@ -53,13 +53,13 @@ namespace margelo::nitro::nitroinput::views {
53
53
  shimmerBaseColor(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "shimmerBaseColor", rawProps, sourceProps.shimmerBaseColor)),
54
54
  shimmerDirection(nitro::ReactProp<std::optional<NitroNumberShimmerDirection>>::fromRawValue("NitroNumberView", "shimmerDirection", rawProps, sourceProps.shimmerDirection)),
55
55
  shimmerDelay(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "shimmerDelay", rawProps, sourceProps.shimmerDelay)),
56
- fontSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "fontSize", rawProps, sourceProps.fontSize)),
56
+ textSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "textSize", rawProps, sourceProps.textSize)),
57
57
  prefixFontSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "prefixFontSize", rawProps, sourceProps.prefixFontSize)),
58
58
  suffixFontSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "suffixFontSize", rawProps, sourceProps.suffixFontSize)),
59
59
  affixAlign(nitro::ReactProp<std::optional<NitroNumberAffixAlign>>::fromRawValue("NitroNumberView", "affixAlign", rawProps, sourceProps.affixAlign)),
60
60
  prefixAlign(nitro::ReactProp<std::optional<NitroNumberAffixAlign>>::fromRawValue("NitroNumberView", "prefixAlign", rawProps, sourceProps.prefixAlign)),
61
61
  suffixAlign(nitro::ReactProp<std::optional<NitroNumberAffixAlign>>::fromRawValue("NitroNumberView", "suffixAlign", rawProps, sourceProps.suffixAlign)),
62
- letterSpacing(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "letterSpacing", rawProps, sourceProps.letterSpacing)),
62
+ textLetterSpacing(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "textLetterSpacing", rawProps, sourceProps.textLetterSpacing)),
63
63
  prefixSpacing(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "prefixSpacing", rawProps, sourceProps.prefixSpacing)),
64
64
  suffixSpacing(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "suffixSpacing", rawProps, sourceProps.suffixSpacing)),
65
65
  prefixOffset(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "prefixOffset", rawProps, sourceProps.prefixOffset)),
@@ -82,10 +82,10 @@ namespace margelo::nitro::nitroinput::views {
82
82
  minimumFontScale(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "minimumFontScale", rawProps, sourceProps.minimumFontScale)),
83
83
  allowFontScaling(nitro::ReactProp<std::optional<bool>>::fromRawValue("NitroNumberView", "allowFontScaling", rawProps, sourceProps.allowFontScaling)),
84
84
  maxFontSizeMultiplier(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "maxFontSizeMultiplier", rawProps, sourceProps.maxFontSizeMultiplier)),
85
- fontWeight(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "fontWeight", rawProps, sourceProps.fontWeight)),
86
- fontFamily(nitro::ReactProp<std::optional<std::string>>::fromRawValue("NitroNumberView", "fontFamily", rawProps, sourceProps.fontFamily)),
87
- color(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "color", rawProps, sourceProps.color)),
88
- textAlign(nitro::ReactProp<std::optional<NitroNumberTextAlign>>::fromRawValue("NitroNumberView", "textAlign", rawProps, sourceProps.textAlign)),
85
+ textWeight(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "textWeight", rawProps, sourceProps.textWeight)),
86
+ textFamily(nitro::ReactProp<std::optional<std::string>>::fromRawValue("NitroNumberView", "textFamily", rawProps, sourceProps.textFamily)),
87
+ textColor(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroNumberView", "textColor", rawProps, sourceProps.textColor)),
88
+ textAlignment(nitro::ReactProp<std::optional<NitroNumberTextAlign>>::fromRawValue("NitroNumberView", "textAlignment", rawProps, sourceProps.textAlignment)),
89
89
  rightToLeft(nitro::ReactProp<std::optional<bool>>::fromRawValue("NitroNumberView", "rightToLeft", rawProps, sourceProps.rightToLeft)),
90
90
  onSizeChange(nitro::ReactProp<std::optional<std::function<void(double /* width */, double /* height */)>>>::fromRawValue("NitroNumberView", "onSizeChange", rawProps, sourceProps.onSizeChange)),
91
91
  onRevealEnd(nitro::ReactProp<std::optional<std::function<void()>>>::fromRawValue("NitroNumberView", "onRevealEnd", rawProps, sourceProps.onRevealEnd)),
@@ -129,13 +129,13 @@ namespace margelo::nitro::nitroinput::views {
129
129
  case hashString("shimmerBaseColor"): return true;
130
130
  case hashString("shimmerDirection"): return true;
131
131
  case hashString("shimmerDelay"): return true;
132
- case hashString("fontSize"): return true;
132
+ case hashString("textSize"): return true;
133
133
  case hashString("prefixFontSize"): return true;
134
134
  case hashString("suffixFontSize"): return true;
135
135
  case hashString("affixAlign"): return true;
136
136
  case hashString("prefixAlign"): return true;
137
137
  case hashString("suffixAlign"): return true;
138
- case hashString("letterSpacing"): return true;
138
+ case hashString("textLetterSpacing"): return true;
139
139
  case hashString("prefixSpacing"): return true;
140
140
  case hashString("suffixSpacing"): return true;
141
141
  case hashString("prefixOffset"): return true;
@@ -158,10 +158,10 @@ namespace margelo::nitro::nitroinput::views {
158
158
  case hashString("minimumFontScale"): return true;
159
159
  case hashString("allowFontScaling"): return true;
160
160
  case hashString("maxFontSizeMultiplier"): return true;
161
- case hashString("fontWeight"): return true;
162
- case hashString("fontFamily"): return true;
163
- case hashString("color"): return true;
164
- case hashString("textAlign"): return true;
161
+ case hashString("textWeight"): return true;
162
+ case hashString("textFamily"): return true;
163
+ case hashString("textColor"): return true;
164
+ case hashString("textAlignment"): return true;
165
165
  case hashString("rightToLeft"): return true;
166
166
  case hashString("onSizeChange"): return true;
167
167
  case hashString("onRevealEnd"): return true;
@@ -85,13 +85,13 @@ namespace margelo::nitro::nitroinput::views {
85
85
  nitro::ReactProp<std::optional<double>> shimmerBaseColor;
86
86
  nitro::ReactProp<std::optional<NitroNumberShimmerDirection>> shimmerDirection;
87
87
  nitro::ReactProp<std::optional<double>> shimmerDelay;
88
- nitro::ReactProp<std::optional<double>> fontSize;
88
+ nitro::ReactProp<std::optional<double>> textSize;
89
89
  nitro::ReactProp<std::optional<double>> prefixFontSize;
90
90
  nitro::ReactProp<std::optional<double>> suffixFontSize;
91
91
  nitro::ReactProp<std::optional<NitroNumberAffixAlign>> affixAlign;
92
92
  nitro::ReactProp<std::optional<NitroNumberAffixAlign>> prefixAlign;
93
93
  nitro::ReactProp<std::optional<NitroNumberAffixAlign>> suffixAlign;
94
- nitro::ReactProp<std::optional<double>> letterSpacing;
94
+ nitro::ReactProp<std::optional<double>> textLetterSpacing;
95
95
  nitro::ReactProp<std::optional<double>> prefixSpacing;
96
96
  nitro::ReactProp<std::optional<double>> suffixSpacing;
97
97
  nitro::ReactProp<std::optional<double>> prefixOffset;
@@ -114,10 +114,10 @@ namespace margelo::nitro::nitroinput::views {
114
114
  nitro::ReactProp<std::optional<double>> minimumFontScale;
115
115
  nitro::ReactProp<std::optional<bool>> allowFontScaling;
116
116
  nitro::ReactProp<std::optional<double>> maxFontSizeMultiplier;
117
- nitro::ReactProp<std::optional<double>> fontWeight;
118
- nitro::ReactProp<std::optional<std::string>> fontFamily;
119
- nitro::ReactProp<std::optional<double>> color;
120
- nitro::ReactProp<std::optional<NitroNumberTextAlign>> textAlign;
117
+ nitro::ReactProp<std::optional<double>> textWeight;
118
+ nitro::ReactProp<std::optional<std::string>> textFamily;
119
+ nitro::ReactProp<std::optional<double>> textColor;
120
+ nitro::ReactProp<std::optional<NitroNumberTextAlign>> textAlignment;
121
121
  nitro::ReactProp<std::optional<bool>> rightToLeft;
122
122
  nitro::ReactProp<std::optional<std::function<void(double /* width */, double /* height */)>>> onSizeChange;
123
123
  nitro::ReactProp<std::optional<std::function<void()>>> onRevealEnd;
@@ -161,13 +161,13 @@ namespace margelo::nitro::nitroinput::views {
161
161
  shimmerBaseColor.hasSameValue(other.shimmerBaseColor) &&
162
162
  shimmerDirection.hasSameValue(other.shimmerDirection) &&
163
163
  shimmerDelay.hasSameValue(other.shimmerDelay) &&
164
- fontSize.hasSameValue(other.fontSize) &&
164
+ textSize.hasSameValue(other.textSize) &&
165
165
  prefixFontSize.hasSameValue(other.prefixFontSize) &&
166
166
  suffixFontSize.hasSameValue(other.suffixFontSize) &&
167
167
  affixAlign.hasSameValue(other.affixAlign) &&
168
168
  prefixAlign.hasSameValue(other.prefixAlign) &&
169
169
  suffixAlign.hasSameValue(other.suffixAlign) &&
170
- letterSpacing.hasSameValue(other.letterSpacing) &&
170
+ textLetterSpacing.hasSameValue(other.textLetterSpacing) &&
171
171
  prefixSpacing.hasSameValue(other.prefixSpacing) &&
172
172
  suffixSpacing.hasSameValue(other.suffixSpacing) &&
173
173
  prefixOffset.hasSameValue(other.prefixOffset) &&
@@ -190,10 +190,10 @@ namespace margelo::nitro::nitroinput::views {
190
190
  minimumFontScale.hasSameValue(other.minimumFontScale) &&
191
191
  allowFontScaling.hasSameValue(other.allowFontScaling) &&
192
192
  maxFontSizeMultiplier.hasSameValue(other.maxFontSizeMultiplier) &&
193
- fontWeight.hasSameValue(other.fontWeight) &&
194
- fontFamily.hasSameValue(other.fontFamily) &&
195
- color.hasSameValue(other.color) &&
196
- textAlign.hasSameValue(other.textAlign) &&
193
+ textWeight.hasSameValue(other.textWeight) &&
194
+ textFamily.hasSameValue(other.textFamily) &&
195
+ textColor.hasSameValue(other.textColor) &&
196
+ textAlignment.hasSameValue(other.textAlignment) &&
197
197
  rightToLeft.hasSameValue(other.rightToLeft) &&
198
198
  onSizeChange.hasSameValue(other.onSizeChange) &&
199
199
  onRevealEnd.hasSameValue(other.onRevealEnd) &&
@@ -238,13 +238,13 @@ namespace margelo::nitro::nitroinput::views {
238
238
  shimmerBaseColor.isProvided() ||
239
239
  shimmerDirection.isProvided() ||
240
240
  shimmerDelay.isProvided() ||
241
- fontSize.isProvided() ||
241
+ textSize.isProvided() ||
242
242
  prefixFontSize.isProvided() ||
243
243
  suffixFontSize.isProvided() ||
244
244
  affixAlign.isProvided() ||
245
245
  prefixAlign.isProvided() ||
246
246
  suffixAlign.isProvided() ||
247
- letterSpacing.isProvided() ||
247
+ textLetterSpacing.isProvided() ||
248
248
  prefixSpacing.isProvided() ||
249
249
  suffixSpacing.isProvided() ||
250
250
  prefixOffset.isProvided() ||
@@ -267,10 +267,10 @@ namespace margelo::nitro::nitroinput::views {
267
267
  minimumFontScale.isProvided() ||
268
268
  allowFontScaling.isProvided() ||
269
269
  maxFontSizeMultiplier.isProvided() ||
270
- fontWeight.isProvided() ||
271
- fontFamily.isProvided() ||
272
- color.isProvided() ||
273
- textAlign.isProvided() ||
270
+ textWeight.isProvided() ||
271
+ textFamily.isProvided() ||
272
+ textColor.isProvided() ||
273
+ textAlignment.isProvided() ||
274
274
  rightToLeft.isProvided() ||
275
275
  onSizeChange.isProvided() ||
276
276
  onRevealEnd.isProvided() ||
@@ -21,12 +21,12 @@ namespace margelo::nitro::nitroinput::views {
21
21
  const react::RawProps& rawProps):
22
22
  react::ViewProps(context, sourceProps, rawProps, filterObjectKeys),
23
23
  text(nitro::ReactProp<std::string>::fromRawValue("NitroTextView", "text", rawProps, sourceProps.text)),
24
- fontSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroTextView", "fontSize", rawProps, sourceProps.fontSize)),
25
- fontWeight(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroTextView", "fontWeight", rawProps, sourceProps.fontWeight)),
26
- fontFamily(nitro::ReactProp<std::optional<std::string>>::fromRawValue("NitroTextView", "fontFamily", rawProps, sourceProps.fontFamily)),
27
- color(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroTextView", "color", rawProps, sourceProps.color)),
28
- letterSpacing(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroTextView", "letterSpacing", rawProps, sourceProps.letterSpacing)),
29
- textAlign(nitro::ReactProp<std::optional<NitroNumberTextAlign>>::fromRawValue("NitroTextView", "textAlign", rawProps, sourceProps.textAlign)),
24
+ textSize(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroTextView", "textSize", rawProps, sourceProps.textSize)),
25
+ textWeight(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroTextView", "textWeight", rawProps, sourceProps.textWeight)),
26
+ textFamily(nitro::ReactProp<std::optional<std::string>>::fromRawValue("NitroTextView", "textFamily", rawProps, sourceProps.textFamily)),
27
+ textColor(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroTextView", "textColor", rawProps, sourceProps.textColor)),
28
+ textLetterSpacing(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroTextView", "textLetterSpacing", rawProps, sourceProps.textLetterSpacing)),
29
+ textAlignment(nitro::ReactProp<std::optional<NitroNumberTextAlign>>::fromRawValue("NitroTextView", "textAlignment", rawProps, sourceProps.textAlignment)),
30
30
  rightToLeft(nitro::ReactProp<std::optional<bool>>::fromRawValue("NitroTextView", "rightToLeft", rawProps, sourceProps.rightToLeft)),
31
31
  duration(nitro::ReactProp<std::optional<double>>::fromRawValue("NitroTextView", "duration", rawProps, sourceProps.duration)),
32
32
  easing(nitro::ReactProp<std::optional<NitroInputEasing>>::fromRawValue("NitroTextView", "easing", rawProps, sourceProps.easing)),
@@ -46,12 +46,12 @@ namespace margelo::nitro::nitroinput::views {
46
46
  bool HybridNitroTextViewProps::filterObjectKeys(const std::string& propName) {
47
47
  switch (hashString(propName)) {
48
48
  case hashString("text"): return true;
49
- case hashString("fontSize"): return true;
50
- case hashString("fontWeight"): return true;
51
- case hashString("fontFamily"): return true;
52
- case hashString("color"): return true;
53
- case hashString("letterSpacing"): return true;
54
- case hashString("textAlign"): return true;
49
+ case hashString("textSize"): return true;
50
+ case hashString("textWeight"): return true;
51
+ case hashString("textFamily"): return true;
52
+ case hashString("textColor"): return true;
53
+ case hashString("textLetterSpacing"): return true;
54
+ case hashString("textAlignment"): return true;
55
55
  case hashString("rightToLeft"): return true;
56
56
  case hashString("duration"): return true;
57
57
  case hashString("easing"): return true;
@@ -48,12 +48,12 @@ namespace margelo::nitro::nitroinput::views {
48
48
 
49
49
  public:
50
50
  nitro::ReactProp<std::string> text;
51
- nitro::ReactProp<std::optional<double>> fontSize;
52
- nitro::ReactProp<std::optional<double>> fontWeight;
53
- nitro::ReactProp<std::optional<std::string>> fontFamily;
54
- nitro::ReactProp<std::optional<double>> color;
55
- nitro::ReactProp<std::optional<double>> letterSpacing;
56
- nitro::ReactProp<std::optional<NitroNumberTextAlign>> textAlign;
51
+ nitro::ReactProp<std::optional<double>> textSize;
52
+ nitro::ReactProp<std::optional<double>> textWeight;
53
+ nitro::ReactProp<std::optional<std::string>> textFamily;
54
+ nitro::ReactProp<std::optional<double>> textColor;
55
+ nitro::ReactProp<std::optional<double>> textLetterSpacing;
56
+ nitro::ReactProp<std::optional<NitroNumberTextAlign>> textAlignment;
57
57
  nitro::ReactProp<std::optional<bool>> rightToLeft;
58
58
  nitro::ReactProp<std::optional<double>> duration;
59
59
  nitro::ReactProp<std::optional<NitroInputEasing>> easing;
@@ -73,12 +73,12 @@ namespace margelo::nitro::nitroinput::views {
73
73
  [[nodiscard]]
74
74
  bool hasSameProps(const HybridNitroTextViewProps& other) const noexcept {
75
75
  return text.hasSameValue(other.text) &&
76
- fontSize.hasSameValue(other.fontSize) &&
77
- fontWeight.hasSameValue(other.fontWeight) &&
78
- fontFamily.hasSameValue(other.fontFamily) &&
79
- color.hasSameValue(other.color) &&
80
- letterSpacing.hasSameValue(other.letterSpacing) &&
81
- textAlign.hasSameValue(other.textAlign) &&
76
+ textSize.hasSameValue(other.textSize) &&
77
+ textWeight.hasSameValue(other.textWeight) &&
78
+ textFamily.hasSameValue(other.textFamily) &&
79
+ textColor.hasSameValue(other.textColor) &&
80
+ textLetterSpacing.hasSameValue(other.textLetterSpacing) &&
81
+ textAlignment.hasSameValue(other.textAlignment) &&
82
82
  rightToLeft.hasSameValue(other.rightToLeft) &&
83
83
  duration.hasSameValue(other.duration) &&
84
84
  easing.hasSameValue(other.easing) &&
@@ -99,12 +99,12 @@ namespace margelo::nitro::nitroinput::views {
99
99
  [[nodiscard]]
100
100
  bool hasAnyProvidedProps() const noexcept {
101
101
  return text.isProvided() ||
102
- fontSize.isProvided() ||
103
- fontWeight.isProvided() ||
104
- fontFamily.isProvided() ||
105
- color.isProvided() ||
106
- letterSpacing.isProvided() ||
107
- textAlign.isProvided() ||
102
+ textSize.isProvided() ||
103
+ textWeight.isProvided() ||
104
+ textFamily.isProvided() ||
105
+ textColor.isProvided() ||
106
+ textLetterSpacing.isProvided() ||
107
+ textAlignment.isProvided() ||
108
108
  rightToLeft.isProvided() ||
109
109
  duration.isProvided() ||
110
110
  easing.isProvided() ||
@@ -40,7 +40,9 @@
40
40
  "signPlacement": true,
41
41
  "prefixAlign": true,
42
42
  "suffixAlign": true,
43
- "letterSpacing": true,
43
+ "textLetterSpacing": true,
44
+ "tabularNums": true,
45
+ "slotDigits": true,
44
46
  "prefixSpacing": true,
45
47
  "suffixSpacing": true,
46
48
  "prefixOffset": true,
@@ -51,12 +53,12 @@
51
53
  "easing": true,
52
54
  "bounce": true,
53
55
  "effect": true,
54
- "fontSize": true,
55
- "lineHeight": true,
56
- "fontWeight": true,
57
- "fontFamily": true,
58
- "color": true,
59
- "textAlign": true,
56
+ "textSize": true,
57
+ "textLineHeight": true,
58
+ "textWeight": true,
59
+ "textFamily": true,
60
+ "textColor": true,
61
+ "textAlignment": true,
60
62
  "rightToLeft": true,
61
63
  "caretColor": true,
62
64
  "selectionColor": true,
@@ -72,7 +74,11 @@
72
74
  "editable": true,
73
75
  "multiline": true,
74
76
  "numberOfLines": true,
75
- "textAlignVertical": true,
77
+ "textVerticalAlignment": true,
78
+ "textInsetLeft": true,
79
+ "textInsetTop": true,
80
+ "textInsetRight": true,
81
+ "textInsetBottom": true,
76
82
  "scrollEnabled": true,
77
83
  "autoFocus": true,
78
84
  "fieldTestID": true,
@@ -37,13 +37,13 @@
37
37
  "shimmerBaseColor": true,
38
38
  "shimmerDirection": true,
39
39
  "shimmerDelay": true,
40
- "fontSize": true,
40
+ "textSize": true,
41
41
  "prefixFontSize": true,
42
42
  "suffixFontSize": true,
43
43
  "affixAlign": true,
44
44
  "prefixAlign": true,
45
45
  "suffixAlign": true,
46
- "letterSpacing": true,
46
+ "textLetterSpacing": true,
47
47
  "prefixSpacing": true,
48
48
  "suffixSpacing": true,
49
49
  "prefixOffset": true,
@@ -66,10 +66,10 @@
66
66
  "minimumFontScale": true,
67
67
  "allowFontScaling": true,
68
68
  "maxFontSizeMultiplier": true,
69
- "fontWeight": true,
70
- "fontFamily": true,
71
- "color": true,
72
- "textAlign": true,
69
+ "textWeight": true,
70
+ "textFamily": true,
71
+ "textColor": true,
72
+ "textAlignment": true,
73
73
  "rightToLeft": true,
74
74
  "onSizeChange": true,
75
75
  "onRevealEnd": true,
@@ -5,12 +5,12 @@
5
5
  "directEventTypes": {},
6
6
  "validAttributes": {
7
7
  "text": true,
8
- "fontSize": true,
9
- "fontWeight": true,
10
- "fontFamily": true,
11
- "color": true,
12
- "letterSpacing": true,
13
- "textAlign": true,
8
+ "textSize": true,
9
+ "textWeight": true,
10
+ "textFamily": true,
11
+ "textColor": true,
12
+ "textLetterSpacing": true,
13
+ "textAlignment": true,
14
14
  "rightToLeft": true,
15
15
  "duration": true,
16
16
  "easing": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nitro-input",
3
- "version": "0.3.8",
3
+ "version": "0.4.1",
4
4
  "description": "Native text for React Native, built with Nitro: a text and amount input with native formatting, masks and a Torph-style reflow, and an animated number (odometer, SwiftUI-style numeric text, ticker) whose digits roll or swap natively, with currency layouts and animated currency switches, shrink-to-fit, a loading shimmer and a jackpot reveal.",
5
5
  "main": "lib/commonjs/src/index.js",
6
6
  "module": "lib/module/src/index.js",
@@ -140,10 +140,12 @@
140
140
  },
141
141
  "hooks": {
142
142
  "before:init": [
143
+ "node ../../scripts/release/stamp-changelog.mjs --check",
143
144
  "bun run typecheck",
144
145
  "bun run test",
145
146
  "bun run test:cpp"
146
- ]
147
+ ],
148
+ "after:bump": "node ../../scripts/release/stamp-changelog.mjs ${version}"
147
149
  }
148
150
  }
149
151
  }