react-native-nitro-input 0.1.0 → 0.3.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 (221) hide show
  1. package/CHANGELOG.md +343 -3
  2. package/NitroInput.podspec +4 -4
  3. package/README.md +420 -53
  4. package/android/CMakeLists.txt +9 -3
  5. package/android/gradle.properties +1 -1
  6. package/android/src/main/cpp/JOutlineGeometry.hpp +1 -1
  7. package/android/src/main/cpp/JReflowEngine.cpp +132 -0
  8. package/android/src/main/cpp/{JMorphEngine.hpp → JReflowEngine.hpp} +7 -7
  9. package/android/src/main/cpp/JRollingEngine.cpp +223 -0
  10. package/android/src/main/cpp/JRollingEngine.hpp +68 -0
  11. package/android/src/main/cpp/cpp-adapter.cpp +4 -2
  12. package/android/src/main/java/com/margelo/nitro/nitroinput/AmountFormatter.kt +1 -1
  13. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +21 -1
  14. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberFormatPlatform.kt +209 -0
  15. package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +496 -0
  16. package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputPackage.kt +2 -1
  17. package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputView.kt +107 -26
  18. package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +1881 -0
  19. package/android/src/main/java/com/margelo/nitro/nitroinput/{MorphEngine.kt → ReflowEngine.kt} +2 -2
  20. package/android/src/main/java/com/margelo/nitro/nitroinput/RollingEngine.kt +60 -0
  21. package/cpp/AmountFormatter.cpp +5 -0
  22. package/cpp/AmountFormatter.hpp +10 -2
  23. package/cpp/{MorphEngine.cpp → ReflowEngine.cpp} +52 -47
  24. package/cpp/{MorphEngine.hpp → ReflowEngine.hpp} +12 -4
  25. package/cpp/RollingEngine.cpp +1234 -0
  26. package/cpp/RollingEngine.hpp +475 -0
  27. package/cpp/SwiftNonCopyable.hpp +22 -0
  28. package/cpp/numberformat/HybridNitroNumberFormat.cpp +498 -0
  29. package/cpp/numberformat/HybridNitroNumberFormat.hpp +74 -0
  30. package/cpp/numberformat/HybridNitroNumberFormatFactory.hpp +11 -0
  31. package/cpp/numberformat/NumberFormatCore.cpp +629 -0
  32. package/cpp/numberformat/NumberFormatCore.hpp +154 -0
  33. package/cpp/numberformat/NumberFormatProbe.cpp +354 -0
  34. package/cpp/numberformat/NumberFormatProbe.hpp +63 -0
  35. package/cpp/worklets/NitroInputWorkletsBridge.cpp +3 -3
  36. package/cpp/worklets/NitroInputWorkletsBridge.hpp +1 -1
  37. package/ios/{HybridMorphInputView.swift → HybridNitroInputView.swift} +16 -1
  38. package/ios/HybridNitroNumberFormatPlatform.swift +348 -0
  39. package/ios/HybridNitroNumberView.swift +458 -0
  40. package/ios/NitroInputView.swift +148 -64
  41. package/ios/NitroNumberView.swift +2074 -0
  42. package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +5 -0
  43. package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +61 -0
  44. package/lib/commonjs/src/NitroInput.js +27 -56
  45. package/lib/commonjs/src/NitroNumber.js +141 -0
  46. package/lib/commonjs/src/NumberFormat.js +525 -0
  47. package/lib/commonjs/src/formatProps.js +48 -0
  48. package/lib/commonjs/src/index.js +6 -3
  49. package/lib/commonjs/src/specs/NitroNumber.nitro.js +2 -0
  50. package/lib/commonjs/src/specs/NumberFormat.nitro.js +2 -0
  51. package/lib/commonjs/src/styleHelpers.js +36 -0
  52. package/lib/module/nitrogen/generated/shared/json/NitroInputViewConfig.json +5 -0
  53. package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +61 -0
  54. package/lib/module/src/NitroInput.js +18 -47
  55. package/lib/module/src/NitroNumber.js +102 -0
  56. package/lib/module/src/NumberFormat.js +521 -0
  57. package/lib/module/src/formatProps.js +45 -0
  58. package/lib/module/src/index.js +2 -1
  59. package/lib/module/src/specs/NitroNumber.nitro.js +1 -0
  60. package/lib/module/src/specs/NumberFormat.nitro.js +1 -0
  61. package/lib/module/src/styleHelpers.js +32 -0
  62. package/lib/typescript/src/NitroInput.d.ts +50 -21
  63. package/lib/typescript/src/NitroNumber.d.ts +246 -0
  64. package/lib/typescript/src/NumberFormat.d.ts +47 -0
  65. package/lib/typescript/src/formatProps.d.ts +21 -0
  66. package/lib/typescript/src/index.d.ts +5 -2
  67. package/lib/typescript/src/specs/NitroInput.nitro.d.ts +19 -9
  68. package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +250 -0
  69. package/lib/typescript/src/specs/NumberFormat.nitro.d.ts +139 -0
  70. package/lib/typescript/src/styleHelpers.d.ts +3 -0
  71. package/nitro.json +26 -0
  72. package/nitrogen/generated/android/NitroInput+autolinking.cmake +10 -0
  73. package/nitrogen/generated/android/NitroInputOnLoad.cpp +48 -0
  74. package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
  75. package/nitrogen/generated/android/c++/JFunc_void_double_double.hpp +10 -10
  76. package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp +45 -0
  77. package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +10 -0
  78. package/nitrogen/generated/android/c++/JHybridNitroNumberFormatPlatformSpec.cpp +118 -0
  79. package/nitrogen/generated/android/c++/JHybridNitroNumberFormatPlatformSpec.hpp +64 -0
  80. package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +590 -0
  81. package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +168 -0
  82. package/nitrogen/generated/android/c++/JHybridNitroPlatformNumberFormatterSpec.cpp +65 -0
  83. package/nitrogen/generated/android/c++/JHybridNitroPlatformNumberFormatterSpec.hpp +64 -0
  84. package/nitrogen/generated/android/c++/JNitroNumberAffixAlign.hpp +64 -0
  85. package/nitrogen/generated/android/c++/JNitroNumberDirection.hpp +64 -0
  86. package/nitrogen/generated/android/c++/JNitroNumberEasing.hpp +67 -0
  87. package/nitrogen/generated/android/c++/JNitroNumberRevealStyle.hpp +58 -0
  88. package/nitrogen/generated/android/c++/JNitroNumberTextAlign.hpp +64 -0
  89. package/nitrogen/generated/android/c++/JNitroNumberTransition.hpp +61 -0
  90. package/nitrogen/generated/android/c++/JNumberFormatCompactDisplay.hpp +58 -0
  91. package/nitrogen/generated/android/c++/JNumberFormatCurrencyDisplay.hpp +64 -0
  92. package/nitrogen/generated/android/c++/JNumberFormatCurrencySign.hpp +58 -0
  93. package/nitrogen/generated/android/c++/JNumberFormatNotation.hpp +64 -0
  94. package/nitrogen/generated/android/c++/JNumberFormatPlatformOptions.hpp +161 -0
  95. package/nitrogen/generated/android/c++/JNumberFormatPlatformSymbols.hpp +89 -0
  96. package/nitrogen/generated/android/c++/JNumberFormatRoundingMode.hpp +79 -0
  97. package/nitrogen/generated/android/c++/JNumberFormatSignDisplay.hpp +67 -0
  98. package/nitrogen/generated/android/c++/JNumberFormatStyle.hpp +64 -0
  99. package/nitrogen/generated/android/c++/JNumberFormatUnitDisplay.hpp +61 -0
  100. package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +25 -0
  101. package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +329 -0
  102. package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.hpp +54 -0
  103. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/Func_void.kt +78 -0
  104. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/Func_void_double_double.kt +9 -9
  105. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputViewSpec.kt +30 -0
  106. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberFormatPlatformSpec.kt +60 -0
  107. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +399 -0
  108. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroPlatformNumberFormatterSpec.kt +62 -0
  109. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberAffixAlign.kt +25 -0
  110. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberDirection.kt +25 -0
  111. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberEasing.kt +26 -0
  112. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberRevealStyle.kt +23 -0
  113. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberTextAlign.kt +25 -0
  114. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberTransition.kt +24 -0
  115. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatCompactDisplay.kt +23 -0
  116. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatCurrencyDisplay.kt +25 -0
  117. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatCurrencySign.kt +23 -0
  118. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatNotation.kt +25 -0
  119. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatPlatformOptions.kt +136 -0
  120. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatPlatformSymbols.kt +91 -0
  121. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatRoundingMode.kt +30 -0
  122. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatSignDisplay.kt +26 -0
  123. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatStyle.kt +25 -0
  124. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatUnitDisplay.kt +24 -0
  125. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/views/HybridNitroNumberViewManager.kt +96 -0
  126. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/views/HybridNitroNumberViewStateUpdater.kt +23 -0
  127. package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.cpp +59 -0
  128. package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +311 -0
  129. package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +63 -0
  130. package/nitrogen/generated/ios/NitroInputAutolinking.mm +26 -0
  131. package/nitrogen/generated/ios/NitroInputAutolinking.swift +24 -0
  132. package/nitrogen/generated/ios/c++/HybridNitroInputViewSpecSwift.hpp +30 -0
  133. package/nitrogen/generated/ios/c++/HybridNitroNumberFormatPlatformSpecSwift.cpp +11 -0
  134. package/nitrogen/generated/ios/c++/HybridNitroNumberFormatPlatformSpecSwift.hpp +122 -0
  135. package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.cpp +11 -0
  136. package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +474 -0
  137. package/nitrogen/generated/ios/c++/HybridNitroPlatformNumberFormatterSpecSwift.cpp +11 -0
  138. package/nitrogen/generated/ios/c++/HybridNitroPlatformNumberFormatterSpecSwift.hpp +94 -0
  139. package/nitrogen/generated/ios/c++/views/HybridNitroInputViewComponent.mm +30 -0
  140. package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +450 -0
  141. package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
  142. package/nitrogen/generated/ios/swift/Func_void_double_double.swift +5 -5
  143. package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec.swift +5 -0
  144. package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +55 -0
  145. package/nitrogen/generated/ios/swift/HybridNitroNumberFormatPlatformSpec.swift +56 -0
  146. package/nitrogen/generated/ios/swift/HybridNitroNumberFormatPlatformSpec_cxx.swift +159 -0
  147. package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +108 -0
  148. package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +1387 -0
  149. package/nitrogen/generated/ios/swift/HybridNitroPlatformNumberFormatterSpec.swift +56 -0
  150. package/nitrogen/generated/ios/swift/HybridNitroPlatformNumberFormatterSpec_cxx.swift +155 -0
  151. package/nitrogen/generated/ios/swift/NitroNumberAffixAlign.swift +48 -0
  152. package/nitrogen/generated/ios/swift/NitroNumberDirection.swift +48 -0
  153. package/nitrogen/generated/ios/swift/NitroNumberEasing.swift +52 -0
  154. package/nitrogen/generated/ios/swift/NitroNumberRevealStyle.swift +40 -0
  155. package/nitrogen/generated/ios/swift/NitroNumberTextAlign.swift +48 -0
  156. package/nitrogen/generated/ios/swift/NitroNumberTransition.swift +44 -0
  157. package/nitrogen/generated/ios/swift/NumberFormatCompactDisplay.swift +40 -0
  158. package/nitrogen/generated/ios/swift/NumberFormatCurrencyDisplay.swift +48 -0
  159. package/nitrogen/generated/ios/swift/NumberFormatCurrencySign.swift +40 -0
  160. package/nitrogen/generated/ios/swift/NumberFormatNotation.swift +48 -0
  161. package/nitrogen/generated/ios/swift/NumberFormatPlatformOptions.swift +159 -0
  162. package/nitrogen/generated/ios/swift/NumberFormatPlatformSymbols.swift +69 -0
  163. package/nitrogen/generated/ios/swift/NumberFormatRoundingMode.swift +68 -0
  164. package/nitrogen/generated/ios/swift/NumberFormatSignDisplay.swift +52 -0
  165. package/nitrogen/generated/ios/swift/NumberFormatStyle.swift +48 -0
  166. package/nitrogen/generated/ios/swift/NumberFormatUnitDisplay.swift +44 -0
  167. package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp +10 -0
  168. package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +10 -0
  169. package/nitrogen/generated/shared/c++/HybridNitroNumberFormatFactorySpec.cpp +22 -0
  170. package/nitrogen/generated/shared/c++/HybridNitroNumberFormatFactorySpec.hpp +70 -0
  171. package/nitrogen/generated/shared/c++/HybridNitroNumberFormatPlatformSpec.cpp +22 -0
  172. package/nitrogen/generated/shared/c++/HybridNitroNumberFormatPlatformSpec.hpp +70 -0
  173. package/nitrogen/generated/shared/c++/HybridNitroNumberFormatSpec.cpp +23 -0
  174. package/nitrogen/generated/shared/c++/HybridNitroNumberFormatSpec.hpp +71 -0
  175. package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +127 -0
  176. package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +187 -0
  177. package/nitrogen/generated/shared/c++/HybridNitroPlatformNumberFormatterSpec.cpp +23 -0
  178. package/nitrogen/generated/shared/c++/HybridNitroPlatformNumberFormatterSpec.hpp +65 -0
  179. package/nitrogen/generated/shared/c++/NitroNumberAffixAlign.hpp +84 -0
  180. package/nitrogen/generated/shared/c++/NitroNumberDirection.hpp +84 -0
  181. package/nitrogen/generated/shared/c++/NitroNumberEasing.hpp +88 -0
  182. package/nitrogen/generated/shared/c++/NitroNumberRevealStyle.hpp +76 -0
  183. package/nitrogen/generated/shared/c++/NitroNumberTextAlign.hpp +84 -0
  184. package/nitrogen/generated/shared/c++/NitroNumberTransition.hpp +80 -0
  185. package/nitrogen/generated/shared/c++/NumberFormatCompactDisplay.hpp +76 -0
  186. package/nitrogen/generated/shared/c++/NumberFormatCurrencyDisplay.hpp +84 -0
  187. package/nitrogen/generated/shared/c++/NumberFormatCurrencySign.hpp +76 -0
  188. package/nitrogen/generated/shared/c++/NumberFormatGrouping.hpp +80 -0
  189. package/nitrogen/generated/shared/c++/NumberFormatNotation.hpp +84 -0
  190. package/nitrogen/generated/shared/c++/NumberFormatOptions.hpp +193 -0
  191. package/nitrogen/generated/shared/c++/NumberFormatPart.hpp +87 -0
  192. package/nitrogen/generated/shared/c++/NumberFormatPlatformOptions.hpp +176 -0
  193. package/nitrogen/generated/shared/c++/NumberFormatPlatformSymbols.hpp +115 -0
  194. package/nitrogen/generated/shared/c++/NumberFormatRoundingMode.hpp +104 -0
  195. package/nitrogen/generated/shared/c++/NumberFormatRoundingPriority.hpp +80 -0
  196. package/nitrogen/generated/shared/c++/NumberFormatSignDisplay.hpp +88 -0
  197. package/nitrogen/generated/shared/c++/NumberFormatStyle.hpp +84 -0
  198. package/nitrogen/generated/shared/c++/NumberFormatTrailingZeroDisplay.hpp +76 -0
  199. package/nitrogen/generated/shared/c++/NumberFormatUnitDisplay.hpp +80 -0
  200. package/nitrogen/generated/shared/c++/ResolvedNumberFormatOptions.hpp +197 -0
  201. package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +10 -0
  202. package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +15 -0
  203. package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +136 -0
  204. package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +245 -0
  205. package/nitrogen/generated/shared/json/NitroInputViewConfig.json +5 -0
  206. package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +61 -0
  207. package/package.json +15 -7
  208. package/src/NitroInput.tsx +79 -67
  209. package/src/NitroNumber.tsx +531 -0
  210. package/src/NumberFormat.ts +563 -0
  211. package/src/formatProps.ts +59 -0
  212. package/src/index.ts +38 -6
  213. package/src/specs/NitroInput.nitro.ts +19 -9
  214. package/src/specs/NitroNumber.nitro.ts +271 -0
  215. package/src/specs/NumberFormat.nitro.ts +145 -0
  216. package/src/styleHelpers.ts +32 -0
  217. package/android/src/main/cpp/JMorphEngine.cpp +0 -132
  218. package/lib/commonjs/src/MorphInput.js +0 -42
  219. package/lib/module/src/MorphInput.js +0 -6
  220. package/lib/typescript/src/MorphInput.d.ts +0 -18
  221. package/src/MorphInput.tsx +0 -30
package/CHANGELOG.md CHANGED
@@ -1,6 +1,228 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.0 (unreleased)
3
+ ## 0.3.0
4
+
5
+ - **`NumberFormat`**: `Intl.NumberFormat`'s API, formatted natively.
6
+ `new NumberFormat(locales, options)` learns the locale's format once from
7
+ the platform's formatter (Foundation / ICU, the data Hermes' `Intl` uses)
8
+ and formats in C++ from then on: `format`, `formatToParts` (on iOS too),
9
+ `formatRange`, `formatRangeToParts`, `resolvedOptions` and
10
+ `supportedLocalesOf`, every option of `Intl.NumberFormatOptions` (compact
11
+ notation, units and currency names printed by the platform formatter),
12
+ numbers, bigints and decimal strings. It passes 242 of test262's 251
13
+ `intl402/NumberFormat` tests on iOS and 244 on Android (Hermes' own `Intl`:
14
+ 121 and 101). On a Galaxy A22 a formatter builds in 9 µs instead of 3.3 ms
15
+ and formats in 2.8 µs instead of 10 µs. Where Hermes departs from ECMA-402 (iOS rounds ties to even on
16
+ the binary double, and prints NaN and infinities without the currency;
17
+ Android shows narrow currency symbols in zh-CN) it follows the
18
+ specification, as V8 does.
19
+ - **`format`** on `NitroNumber` and `NitroInput`: pass a `NumberFormat`
20
+ and the component takes its prefix and suffix, separators, fraction digits
21
+ (and, for the input, where the sign goes) from it; the individual props
22
+ still override.
23
+ - **`letterSpacing`**, **`prefixSpacing` / `suffixSpacing`** and
24
+ **`prefixOffset` / `suffixOffset`** on both components: tracking like
25
+ `Text`'s (affixes in proportion to their size), an exact gap between an
26
+ affix and the digits, and a nudge of an affix after its alignment.
27
+ - **`tabularNums={false}`** on `NitroNumber`: each digit at its own width
28
+ (the font's proportional figures) instead of the widest digit's. A
29
+ changing column's width eases once from the old digit's to the new one's,
30
+ on the roll's own easing, and a reveal keeps its target's widths
31
+ throughout. Tabular stays the default.
32
+ - **`direction="shortest"`** on `NitroNumber`: each digit rolls its own
33
+ shorter way round (1 → 2 is one step up even when the value falls), which
34
+ keeps a big jump calm; `auto` still follows the sign of the change.
35
+ - An `accessibilityLabel` given to `NitroNumber` is what VoiceOver and
36
+ TalkBack read; the figure was read instead.
37
+ - **Breaking:** the Android `minSdkVersion` default is 24 (was 23), as
38
+ React Native's: `NumberFormat` reads the platform's formats through
39
+ `android.icu`.
40
+
41
+ ## 0.2.0
42
+
43
+ - `react-native-nitro-rolling-number` is part of this package now, and its
44
+ `RollingNumber` is called **`NitroNumber`**, next to `NitroInput`: it plays
45
+ more than a roll (the numeric transition, the scramble, the reveal), and
46
+ the name says which package it comes from. The props and the handle are
47
+ the same; the types follow the name (`NitroNumberProps`,
48
+ `NitroNumberHandle`, `NitroNumberTransition`, …). Its engine, views and
49
+ JNI handle build into the `NitroInput` pod and `libNitroInput.so` next to
50
+ the input's, and its JS helpers (font weights, colours) are shared with
51
+ `NitroInput` instead of copied. Replace the import and drop the old
52
+ package: `import { NitroNumber } from 'react-native-nitro-input'`.
53
+ - **Breaking:** the morph is called the reflow, which is what it does: the
54
+ characters keep their shapes and move to where the new text puts them.
55
+ `MorphInput` and the `morph` prop are gone; pass `transition="reflow"` to
56
+ `NitroInput` instead (`'none'`, the default, is the plain field). A
57
+ reflowing field sizes itself to its content unless told otherwise, as
58
+ `MorphInput` did: `autoWidth` defaults to `'auto'` with it. The C++ engine
59
+ is `ReflowEngine` (was `MorphEngine`), and the docs page moved to
60
+ `/input/reflow`, with a redirect from `/input/morph`.
61
+
62
+ ### NitroNumber
63
+
64
+ - A change of `prefix`, `suffix`, `groupingSeparator` or `decimalSeparator`
65
+ plays instead of snapping: the old text softens and fades out while the
66
+ new one comes into focus, on the numeric transition's springs, and its
67
+ width eases from one to the other (`RollingEngine::changeText`). A change
68
+ of `fractionDigits` plays too, in every transition
69
+ (`RollingEngine::changeFormat`): the digits keep their place value, the
70
+ decimal columns that go close, new ones open blank and swap or roll their
71
+ digit in, and the decimal separator fades with them. A currency switch is
72
+ one transition, as SwiftUI's numeric text makes it, even when the next one
73
+ comes before it has finished (it used to show the old amount in the new
74
+ format for a frame, "¥838,712.00").
75
+ - `transition="numeric"`: a column opens on the arriving glyph's spring and
76
+ closes on the leaving glyph's blur, instead of the transition's easing,
77
+ which lagged the glyph and left a gap where a digit had just left.
78
+ - Android: a glyph fading with its column (a separator, the sign) left the
79
+ shared paint faded, and the next frame's digits were drawn faint or not at
80
+ all; a translucent `color` also turned opaque after the first change.
81
+ - A figure that hugs its content no longer jumps when it gains or loses a
82
+ digit at the end of a row. The view takes its new width at once, and with
83
+ the digits kept to its start edge a right-pinned figure (a fee at the end
84
+ of a `space-between` row) jumped a digit to the left and then opened a gap
85
+ after its prefix. `textAlign="auto"` now keeps the digits to whichever edge
86
+ the parent keeps the view to; a view with its own width is unchanged.
87
+ - A column opening or closing (a new leading digit, a separator, the sign)
88
+ keeps its glyph whole instead of cutting it to the half-open column, where
89
+ it read as a sliver: the right edge of a "1", a ")" of a 0 rolling past.
90
+ The glyph overhangs the column's far side, faded with it.
91
+ - `transition="numeric"`: a value re-targeted while a column was still
92
+ swapping to a glyph it keeps (typing, every keystroke) no longer cuts the
93
+ swap short; the column carries on from where it was, as SwiftUI's does.
94
+ - `transition="numeric"`: a second way a value change can play, after
95
+ SwiftUI's `.contentTransition(.numericText())`. Instead of rolling through
96
+ the digits between, each changed glyph swaps in place: the old one softens,
97
+ shrinks and slides out while the new one slides in from the other side, a
98
+ little small and out of focus, and resolves; the glyphs move up when the
99
+ value grows and down when it shrinks, the change cascades from the leftmost
100
+ digit to the right, and digits that don't change stay put. The engine
101
+ plans it as a blend per wheel (`fromGlyph` → `toGlyph`, `blend`), the same
102
+ `duration` and `stagger` apply (480 ms and, for the numeric transition, a
103
+ 150 ms cascade span shared out over the digits that change; `easing` and
104
+ `bounce` are not consulted, as SwiftUI's transition does not consult its
105
+ animation either). A changing digit runs four clocks scaled to the
106
+ duration, each a damped spring's step response: the position (ζ 0.54,
107
+ about 12 % overshoot, which is the wave; the glyph travels 0.34 line
108
+ heights), the size and opacity (critically damped, settled at 65 %; the
109
+ glyph grows from 0.4× as it fades in), the arriving glyph's blur (ζ 0.85,
110
+ settled at 74 %) and the leaving glyph's (critically damped, settled at
111
+ 46 %, so the old digit goes soft at once), with 0.08 line heights of blur
112
+ at full blur, SwiftUI's own; the transition runs 1.45 durations so the
113
+ position spring rings out instead of snapping its last pixel. The figures are
114
+ SwiftUI's, fitted to its frames at 60 fps: a model of our renderers was
115
+ rendered from the real glyphs and optimised until it reproduced SwiftUI's
116
+ frames, which cut the pixel error to a twentieth, and the result agrees
117
+ with the constants react-native-numeric-text published. A spring's
118
+ overshoot past the landing used to read as
119
+ settled and snapped the glyph sharp half way through. On iOS and Android
120
+ a glyph part way out of focus is the two nearest of six blurred copies
121
+ cross-faded, not the sharp glyph cross-faded with one fully blurred copy,
122
+ which showed a sharp digit inside a glow and read as a highlight rather
123
+ than a blur. On Android the sharp copy is a mask bitmap like the blurred
124
+ ones, not hardware text: text snaps to whole pixels as it moves and a
125
+ bitmap does not, and cross-faded the two slid in and out of register as
126
+ the spring settled, a bold/pale flicker at low blur; and each glyph's
127
+ bitmap is landed on whole device pixels, since a sharp bitmap drawn
128
+ between pixels is resampled and, creeping along the spring's tail, it
129
+ cycled crisp and soft once per pixel of travel (a shimmer a blurred copy
130
+ hides), and the last swap frame is now pixel for pixel the strip that
131
+ takes over from it. The blurred glyph masks are rendered on a background
132
+ thread as soon as the numeric transition is set, immutable and uploaded
133
+ ahead of their first draw; made on demand, the first change after launch
134
+ blocked the UI thread for 120–145 ms and dropped over 30 frames on a Galaxy
135
+ A22, and now drops none to a few. The two blur levels of a glyph are now weighted so
136
+ that composited one over the other they add up to the glyph's opacity;
137
+ weighted (1 − w) and w they came out only 75 % opaque half way between
138
+ levels, and the digit pulsed at every level crossing. Every renderer
139
+ draws the pair the same way: the
140
+ glyph's sharp and a blurred image cross-faded (Core Image on iOS, a
141
+ software blur once per font on Android, a canvas filter on the web), so a
142
+ frame of the transition costs what a frame of a roll does. The effect is
143
+ our own reading of the SwiftUI one; Giulio Amato's
144
+ [react-native-numeric-text](https://github.com/AmatoGiulio/react-native-numeric-text)
145
+ is a native re-implementation of it for React Native `Text` if a whole
146
+ text should transition rather than a rolling number. Checked frame by
147
+ frame against SwiftUI's own transition (a small reference app on the
148
+ simulator, same font size and colour): the direction had been ours the
149
+ wrong way round, so a value that grows now moves the glyphs up, the way
150
+ SwiftUI and an odometer do; the glyphs come in nearly full size from half
151
+ a line height away; and the arriving glyph comes into focus on its own
152
+ slower clock (`Wheel::focus`, over the whole duration) after the spring
153
+ has landed it, which is what makes the effect read as SwiftUI's rather
154
+ than as a quick fade. On iOS the blurred glyph images are a vImage tent
155
+ convolution now instead of Core Image, whose first render of a session
156
+ stalled the main thread for longer than the swap, and the ten digits'
157
+ sharp and blurred images are rendered a turn after mount, so the first
158
+ change of a session plays whole. On Android the blurred glyph is an
159
+ `ALPHA_8` mask filled with the digit colour at draw time, a quarter of
160
+ the memory of the coloured bitmap it was, and its radius matches iOS's.
161
+ A swapping glyph is no longer clipped to its digit cell, on any platform:
162
+ a blurred glyph's haze reaches well past the cell, and cut off at it the
163
+ haze ended in a hard edge, a pale box around every digit in transit (on
164
+ iOS the swap layers now sit on an unclipped layer above the strip
165
+ containers; on Android and the web the swap is drawn without the cell's
166
+ clip rect).
167
+
168
+ - `transition="scramble"`, on the same machinery: each changed digit shows
169
+ a different random digit every few frames, never the one it is leaving or
170
+ arriving at, until it locks on its target, the lock running from the left.
171
+ The engine does all of it, a renderer draws its strip as usual. Each swap
172
+ style has its own `duration` / `easing` / `stagger` defaults (scramble
173
+ 500 ms, `linear`, 60 ms).
174
+
175
+ - The change flash and the pop, with any transition. `flashUpColor` /
176
+ `flashDownColor` light every digit whose glyph changes in the up or the
177
+ down colour, keep it lit while it moves, and fade it back over
178
+ `flashDuration` once it has landed; a snap under Reduce Motion lights and
179
+ fades at once, a `jumpTo` never flashes. The tint is the digit's own ink
180
+ mixed towards the colour, whatever it is doing: on a rolling wheel the
181
+ strip itself is drawn again in the flash colour at the strip's own
182
+ offset, so the tint rides the roll (a tinted glyph laid over a moving
183
+ strip read as a doubled digit); on a swapping wheel both glyphs, the
184
+ leaving one and the arriving one, are drawn again in the colour with the
185
+ same blur and fade as their originals (a sharp tinted glyph over a
186
+ blurred one read as a smudge, and a fade that began during the swap
187
+ showed the digit landing already half way back to blue). `popOnChange`
188
+ punches the whole figure on every change, rung out like the reveal's
189
+ landing pop and folded into the same scale the renderers already apply.
190
+ Both are engine state (`Wheel::flash`, `revealScale()`), so every
191
+ renderer reads them the same way.
192
+
193
+
194
+ ### Performance
195
+
196
+ - iOS: Swift called every read-only method of a C++ engine on a copy of
197
+ it, vectors and all, dozens of times a frame per figure. `RollingEngine`,
198
+ `ReflowEngine` and `AmountFormatter` are `SWIFT_NONCOPYABLE` now and Swift
199
+ reads them in place. On an iPhone 11 Pro with 52 figures updating, a
200
+ frame's layout work went from ~45 to ~14 ms a second.
201
+ - iOS: every figure wrapped its frame in an explicit `CATransaction` to turn
202
+ implicit animations off, which outside UIKit's own transaction is a
203
+ commit to the render server per figure per frame. The layers never
204
+ animate implicitly now (`QuietLayer`), so a frame's changes join the run
205
+ loop's one transaction; a reflowing `NitroInput`'s layers too. Roll
206
+ render ~235 → ~68 ms a second, main thread ~265 → ~190.
207
+ - The numeric transition's blurred glyphs are kept while they are in use.
208
+ A cache that started over at a fixed count dropped glyphs about to be
209
+ drawn again on a screen with a few fonts and colours: on iOS ~2,900
210
+ vImage blurs a second (render ~750 → ~140 ms a second, 52 → 60 fps on
211
+ the 11 Pro); on Android the masks are bounded by size and each font set
212
+ keeps its own (numeric draw 6.9 → 4.4 ms a frame on a Galaxy A22).
213
+ A screen of many styles keeps more memory for them (~14 MB for a
214
+ 52-figure dashboard in nine font/colour pairs on iOS), released on a
215
+ memory warning.
216
+ - Android: prefixes, suffixes and separators are shaped once and drawn as
217
+ glyphs (`TextRunShaper` + `Canvas.drawGlyphs`, API 31+) instead of
218
+ re-shaped by `drawText` every frame: ~45 → ~5 µs a draw on a Galaxy A22,
219
+ a frame's draw for 52 figures 5.9 → 4.4 ms. A resting wheel is one bitmap
220
+ copy. A reflowing `NitroInput` draws its glyphs the same way: its draw
221
+ per animation frame halved (2.0–2.2 → 1.0–1.1 ms).
222
+
223
+ ## 0.1.0
224
+
225
+ ### NitroInput
4
226
 
5
227
  - Memory: a dropped field is freed when Fabric drops it. The Nitro hybrid
6
228
  behind a view is kept alive by its C++ part until the JS handle from
@@ -19,7 +241,7 @@
19
241
  colour as the platform default.
20
242
 
21
243
  - Initial release: native single-line text / amount input (iOS + Android) with Torph-style text morphing, built with Nitro Modules.
22
- - One shared C++ engine (`cpp/MorphEngine`): caret matching for edits (grouping separators paired from the units end), place matching for programmatic sets, longest-common-subsequence for text; digits slide through the line box, separators from below, text fades and scales; entering and leaving characters ride with their nearest persisting neighbour; `expo` / `easeOut` / `easeInOut` / `linear` / `spring` timing; Reduce Motion snaps.
244
+ - One shared C++ engine (`cpp/ReflowEngine`): caret matching for edits (grouping separators paired from the units end), place matching for programmatic sets, longest-common-subsequence for text; digits slide through the line box, separators from below, text fades and scales; entering and leaving characters ride with their nearest persisting neighbour; `expo` / `easeOut` / `easeInOut` / `linear` / `spring` timing; Reduce Motion snaps.
23
245
  - `mode="number"`: every edit is formatted natively before a frame is drawn (`cpp/AmountFormatter`): grouping, one decimal, `fractionDigits` / `maxIntegerDigits` limits that reject the keystroke, backspace over a separator removes the digit before it, a decimal typed in the integer part moves the decimal point, `prefix` / `suffix` with their own sizes and alignment.
24
246
  - Controlled `value` with the `text` + `mostRecentEventCount` handshake (a stale value never fights the user); `onChangeText`, `onChangeValue`, `onFocus` / `onBlur`, `onSubmitEditing`; `focus` / `blur` / `clear` / `setText` / `setValue` / `getText` / `getValue` / `isFocused`.
25
247
  - Worklets (optional, with `react-native-worklets`): a `transform` worklet and `'worklet'`-marked `onChangeText` / `onChangeValue` run synchronously on the UI thread inside the native edit, via a `NitroInputWorklets` bridge that holds the worklets UI runtime; no-ops when the package is not installed.
@@ -52,7 +274,7 @@
52
274
  - iOS: `focus()` / `blur()`, `Keyboard.dismiss()` and a ScrollView's auto-blur now reach a multiline field (the Fabric command only looked for a `UITextField`). `maxIntegerDigits` accepts up to 30, as on Android. Turning `morph` back on after plain mode no longer leaves the field blank until the next edit.
53
275
  - Android: toggling `secureTextEntry` at runtime re-feeds the glyphs (the real characters used to stay on screen until the next edit); `maxLength` no longer clips a mask's own punctuation (it applies to `mode="text"` only, as on iOS); `focus()` and `autoFocus` respect `showSoftInputOnFocus={false}`; a `lineHeight` removed at runtime resets the spacing; tabular figures in text mode too, matching iOS.
54
276
  - Less work per frame and per keystroke: iOS keeps one layer entry per glyph and re-uses it (no per-glyph allocation per frame), positions the caret once per step and caches the right-to-left caret blocks when a frame is published; Android resolves its theme colours once instead of per draw, reads the animator duration scale once (refreshed by a settings observer) instead of querying the settings provider per keystroke below API 33, and the outlined frame's geometry is written into a reused buffer instead of two vectors per draw.
55
- - Removed dead code: `MaskEngine::format` / `totalTextLength` / `totalValueLength` / `placeholder`, the worklets bridge's `uninstallRuntime` and `isReady`, `MorphEngine::rightToLeft`, the unused JNI bindings behind them, and an unreachable pre-iOS-15 branch.
277
+ - Removed dead code: `MaskEngine::format` / `totalTextLength` / `totalValueLength` / `placeholder`, the worklets bridge's `uninstallRuntime` and `isReady`, `ReflowEngine::rightToLeft`, the unused JNI bindings behind them, and an unreachable pre-iOS-15 branch.
56
278
  - Android build: the Android Gradle plugin is only pinned when the library builds on its own, Java 17 source/target, an unused `kotlinVersion` property removed, `cmake_minimum_required` before `project()`.
57
279
  - Fixed: in a plain (text-mode) field with `morph` on, the decimal point of a number typed by hand dipped and rose again on every keystroke after it, although it never moved. The engine took a lone `.` or `,` for a grouping separator and re-paired it from the units end on each edit; it is the decimal point now, part of the typed sequence like the digits. Repeated punctuation (`192.168.0.1`, `21.09.2026`) is still structure.
58
280
  - `onChangeMask` reports the same way on both platforms: whenever the text changes, from a keystroke, `setText` / `clear` or the `value` prop. iOS used to report the untouched empty text once at mount, and Android never reported a prop change. Found by the new on-device suite.
@@ -61,3 +283,121 @@
61
283
  - The handle queues `focus()`, `blur()`, `clear()`, `setText()`, `setValue()` and `setSelection()` sent before the native view has attached and replays them the moment it does, as React Native queues a `TextInput`'s view commands; `useEffect(() => ref.current?.focus(), [])` and a `focus()` in a ref callback used to be silent no-ops. Found by the on-device suite that mirrors React Native's own `TextInput` tests.
62
284
  - `aria-busy`, `aria-checked`, `aria-disabled`, `aria-expanded` and `aria-selected` fold into `accessibilityState`, `aria-hidden` hides the element, and `aria-labelledby` reaches the host, the way `TextInput` resolves them (a Nitro view is handed the raw props, which the native parser drops). `NitroInput` and `MorphInput` carry a `displayName`.
63
285
  - Docs page with a live demo running the same engine and formatter compiled to WebAssembly.
286
+
287
+ ### RollingNumber (react-native-nitro-rolling-number 0.1.0)
288
+
289
+ - Android: the digit strip is a software-rendered bitmap inside a layer, and
290
+ it is recorded again when the renderer drops it. Two things were wrong with
291
+ the strip as a layer of GPU-rasterized text. Its digits came out thinner
292
+ and paler than the sign and affixes drawn as glyphs beside them, visibly on
293
+ a small red change value; text the software renderer rasterizes into a
294
+ bitmap has the pixels it should, and the bitmap goes into a layer once
295
+ because drawing it per wheel costs the renderer several milliseconds a
296
+ frame more than a layer does. And HWUI deletes a node's display list the
297
+ moment nothing in the view tree draws it, so once every rolling number on
298
+ screen had been unmounted and new ones mounted (or the app had been in the
299
+ background) the next ones reported their value to accessibility and painted
300
+ blank; the strip is recorded again whenever its display list is gone. At
301
+ rest the window lands on whole device pixels so a small digit is not
302
+ resampled soft. Found by the example's new Recycle check screen and
303
+ `scripts/ui/recycle-check.mjs`, which drive a 400-row list through argent
304
+ and compare what every visible row reports with what it painted, frames
305
+ in the middle of a roll included.
306
+
307
+ - Memory: a dropped rolling number is freed when Fabric drops it. The Nitro
308
+ hybrid behind a view is kept alive by its C++ part until the JS handle from
309
+ `hybridRef` is garbage-collected, and Hermes collects a handle it takes for
310
+ an empty object only when the JS heap fills up. On Android the hybrid held
311
+ the platform view, so in a mount/unmount loop on a Galaxy A22 every dropped
312
+ view stayed allocated: 24 more live `View`s per cycle, each with a digit-
313
+ strip texture, about 1 MB of resident memory a cycle, linear for as long as
314
+ the loop ran (the same for the fields of `react-native-nitro-input`). Now
315
+ the Android hybrid lets go of its view on drop (unless Fabric is recycling
316
+ it), so what lingers is a shell; iOS, where Fabric pools the component view
317
+ and reuses it, releases the display link, the element layers, the engine's
318
+ wheels and the buffers on drop. The digit strips (Android `RenderNode`s, iOS
319
+ glyph and strip images) are shared by every rolling number drawn with the
320
+ same font, colour and density instead of rasterized per view, and the
321
+ hybrid reports its `memorySize` to Nitro so the handle is collected in
322
+ time. `dispose()` on the ref does the same release eagerly.
323
+ - Android draws a settled wheel from a shared digit strip (one layer per
324
+ font and blank-zero variant, recorded once, drawn at an offset) instead of
325
+ two `drawText`s per wheel per frame, the way iOS has moved a `CALayer`
326
+ strip since the layer renderer. On a Galaxy A22 at 90 Hz
327
+ with 24 numbers fed a new value every frame, `onDraw` recording went from
328
+ 9.4 ms to 2.6 ms a frame and the `value` prop path from 72 fps with 91
329
+ dropped frames in five seconds to 89 fps with 7; needs Android 10, older
330
+ devices keep the text path (so does a wheel still growing or shrinking).
331
+ - A value change no longer re-applies the whole configuration. The wrapper
332
+ sent `NaN` for an unset colour, Nitro only calls a native setter when a
333
+ prop's value changed, and NaN never equals itself, so every render re-set
334
+ the colour, marked the configuration dirty and had the format, timing,
335
+ typography and shimmer applied again on each value. The sentinel is
336
+ `Infinity` now (both platforms already read a non-finite colour as the
337
+ platform default).
338
+ - iOS renders a roll from the display link's tick only: `animate(to:)` also
339
+ rendered the layers immediately, so a value stream did two layer passes per
340
+ view per frame. And a frame now sets only the layer properties that moved
341
+ (affixes, separators and wheels at rest were re-set every frame; each Core
342
+ Animation setter costs a transaction entry and a KVO round trip).
343
+ - The roll runs at a ProMotion panel's full rate: the display link asks for
344
+ the screen's maximum refresh rate (as a Reanimated animation does); a
345
+ default display link stays at 60 Hz on a 120 Hz iPhone.
346
+
347
+ - `jumpTo` and `animateTo` now agree on large figures: `jumpTo` clamped the
348
+ scaled magnitude at 10^15 while a roll clamped at 10^17, so with 9 fraction
349
+ digits any value above 10^6 jumped to "1,000,000" but rolled to the right
350
+ digits. Both paths share one limit (10^17, the 18 wheels); a double has no
351
+ exact integers past 2^53 either way.
352
+ - The digits follow a light/dark switch again when no `color` is set. iOS
353
+ rasterizes the glyphs with the resolved label color and re-rasterizes on a
354
+ trait change (also when the view moves to a display with another scale, and
355
+ the pixel density now comes from the view's traits instead of the deprecated
356
+ `UIScreen.main`); Android rebuilds its paints on a configuration change.
357
+ - Less work per frame: iOS reuses its wheel and element buffers, keys the
358
+ glyph caches by a value type and compares layers in place instead of
359
+ building arrays to compare; Android pools its layout elements, splits the
360
+ affixes once per format and slides one cached shimmer gradient instead of
361
+ allocating one per frame. Both platforms format the accessibility text only
362
+ when VoiceOver / TalkBack asks for it, instead of on every value update.
363
+ - Android reads the animator duration scale once (refreshed by a settings
364
+ observer) instead of querying the settings provider on every `animateTo`
365
+ below API 33.
366
+ - The `ref` handle is created once per mount; `getValue()` reads the latest
367
+ prop through a ref instead of the handle being rebuilt on every value change.
368
+ - Packaging: `lib/` now ships an ES module build (`lib/module`), a CommonJS
369
+ build (`lib/commonjs`) and the declarations (`lib/typescript`), with
370
+ `import` / `require` conditions in `exports`; the previous output was ES
371
+ modules only, which a CommonJS consumer could not load. `@types/node` and
372
+ `@types/react-test-renderer` are declared instead of relying on hoisting.
373
+ - Android build: the Android Gradle plugin is only pinned when the library
374
+ builds on its own (an app's root project already provides it), Java 17
375
+ source/target, an unused `kotlinVersion` property removed, and
376
+ `cmake_minimum_required` before `project()`.
377
+ - Removed dead code: the engine's unused `revealFraction`, the allocating
378
+ `frame()` JNI method (the view uses `frameInto`).
379
+
380
+ - The native prop behind `direction` is now `rollDirection`. The public prop is
381
+ unchanged — the wrapper maps it — but `direction` is Yoga's layout property,
382
+ and because a Hybrid View's props derive from `ViewProps` React Native parsed
383
+ ours too, logging `Could not parse yoga::Direction: up` on every update.
384
+
385
+ - Initial release: native rolling number view (iOS + Android) built with Nitro Modules.
386
+ - `value`-driven digit roll with easing/spring, `stagger` and `direction`.
387
+ - Formatting: fraction digits, grouping and decimal separators, prefix/suffix with independent font sizes and `top` / `bottom` / `baseline` / `center` pinning, zero padding, negatives.
388
+ - `adjustsFontSizeToFit` / `minimumFontScale` with a continuous scale that keeps the box fixed.
389
+ - `loading` shine glint (`shimmerColor`, `shimmerDuration`).
390
+ - Imperative `animateTo` / `jumpTo` / `getValue` via ref.
391
+ - VoiceOver / TalkBack read the formatted amount; Reduce Motion / "remove animations" snap instead of rolling.
392
+ - `allowFontScaling` / `maxFontSizeMultiplier` (off by default).
393
+ - View recycling (`RecyclableView`) for long lists.
394
+ - Rapid updates: a value that arrives mid-roll continues with the ease-out half of the curve instead of restarting from rest, so per-frame `value` updates keep rolling.
395
+ - Auto-size: when the settled width shrinks mid-roll the smaller size is reported after the roll finishes, so `adjustsFontSizeToFit` no longer squeezes the still-rolling digits and the amount no longer dips and grows back.
396
+ - Android: the per-frame engine bridge fills a reused array instead of allocating one.
397
+ - iOS renders with Core Animation layers (a wheel is a clipped strip of pre-rasterized digits that moves per frame) instead of redrawing a bitmap; the Core Graphics path is only used while the loading glint shows. `jumpTo` / `animateTo` coalesce to the newest value per main-thread turn on both platforms. See `BENCHMARKS.md`.
398
+ - Jackpot reveal (`reveal`, `revealStyle`, `revealDuration`, `revealBounce`, `revealStagger`, `revealMilestones`, `revealMilestoneHold`, `onRevealMilestone`, `onRevealEnd`, `revealTo()`): the casino win-meter rollup (count from 0, digits swapping in place, leading digits appearing as the count reaches them, tiers that punch and hold with equal time per tier) and the slot-reel reveal (reels spin, then lock from the left with a mechanical bounce), both landing with a spring pop. All in the shared engine; snaps under Reduce Motion.
399
+ - `affixAlign="bottom"` now pins the bottom of the glyphs' ink (a currency code sits on the digits' baseline) instead of the line boxes, which hung the affix down to where a comma's tail reaches.
400
+ - Docs site (`docs/`) with live demos driven by the engine compiled to WebAssembly.
401
+ - The count reveal now tallies like a slot's win counter (after the gaming-machine patents US 9,495,843 and US 9,111,423): a constant rate per tier that winds up out of each milestone and crawls into the next, the figure opening smaller and growing to full size over the count (`revealGrow`, default 0.2), and punches that are a single overshoot settling back without dipping under the resting size (`revealBounce` default 0.12).
402
+ - Reveal callbacks survive view recycling: a recycled view (Fabric reuses instances when a screen is swapped) dropped the hybrid's `onRevealEnd` / `onRevealMilestone` wiring, so no reveal reported its end after the first screen change on iOS.
403
+ - The wrapper always sends every native prop with an explicit value (defaults, `''` for fonts, `NaN` for "platform default" colors, `[]` for no milestones, a numeric `revealState`): removing an optional prop used to reach native as `null`, which Nitro's parser rejects and React Native turns into a fatal error.
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.authors = package["author"]
12
12
 
13
13
  s.platforms = { :ios => min_ios_version_supported, :visionos => 1.0 }
14
- s.source = { :git => "https://github.com/ronickg/react-native-nitro-rolling-number.git", :tag => "nitro-input-v#{s.version}" }
14
+ s.source = { :git => "https://github.com/ronickg/react-native-nitro-input.git", :tag => "nitro-input-v#{s.version}" }
15
15
 
16
16
  s.source_files = [
17
17
  # Implementation (Swift)
@@ -22,10 +22,10 @@ Pod::Spec.new do |s|
22
22
  "cpp/**/*.{hpp,cpp}",
23
23
  ]
24
24
 
25
- # The shared C++ engine and formatter are public headers so the pod's Swift
25
+ # The shared C++ engines and formatter are public headers so the pod's Swift
26
26
  # sources can call them directly through Swift/C++ interop (enabled by Nitro below).
27
27
  s.public_header_files = ["cpp/**/*.hpp"]
28
- # The engine's unit tests build as a host executable (`bun run test:cpp`).
28
+ # The engines' unit tests build as a host executable (`bun run test:cpp`).
29
29
  s.exclude_files = ["cpp/__tests__/**"]
30
30
 
31
31
  # Worklets are optional: with react-native-worklets in the app, `transform`
@@ -40,7 +40,7 @@ Pod::Spec.new do |s|
40
40
  Pod::UI.puts "[NitroInput] react-native-worklets found, worklet support enabled"
41
41
  s.dependency 'RNWorklets'
42
42
  s.pod_target_xcconfig = {
43
- "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) MORPH_INPUT_WORKLETS=1",
43
+ "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) NITRO_INPUT_WORKLETS=1",
44
44
  "HEADER_SEARCH_PATHS" => "$(inherited) \"$(PODS_ROOT)/Headers/Public/RNWorklets\"",
45
45
  }
46
46
  end