react-native-nitro-input 0.3.0 → 0.3.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.
- package/CHANGELOG.md +49 -0
- package/README.md +90 -2
- package/android/src/main/cpp/JReflowEngine.cpp +32 -0
- package/android/src/main/cpp/JReflowEngine.hpp +13 -0
- package/android/src/main/cpp/JRollingEngine.cpp +42 -2
- package/android/src/main/cpp/JRollingEngine.hpp +9 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberFormatPlatform.kt +76 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +88 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextMeasure.kt +25 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextView.kt +140 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputPackage.kt +2 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +388 -136
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroTextView.kt +868 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/ReflowEngine.kt +21 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/RollingEngine.kt +13 -2
- package/cpp/RollingEngine.cpp +92 -8
- package/cpp/RollingEngine.hpp +36 -2
- package/ios/HybridNitroNumberFormatPlatform.swift +87 -9
- package/ios/HybridNitroNumberView.swift +82 -1
- package/ios/HybridNitroTextView.swift +134 -0
- package/ios/NitroNumberView.swift +368 -135
- package/ios/NitroTextView.swift +583 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +20 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/lib/commonjs/src/NitroNumber.js +52 -3
- package/lib/commonjs/src/NitroText.js +138 -0
- package/lib/commonjs/src/NitroTime.js +65 -0
- package/lib/commonjs/src/formatProps.js +76 -16
- package/lib/commonjs/src/index.js +6 -1
- package/lib/commonjs/src/specs/NitroText.nitro.js +2 -0
- package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +20 -0
- package/lib/module/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/lib/module/src/NitroNumber.js +53 -4
- package/lib/module/src/NitroText.js +98 -0
- package/lib/module/src/NitroTime.js +29 -0
- package/lib/module/src/formatProps.js +76 -17
- package/lib/module/src/index.js +2 -0
- package/lib/module/src/specs/NitroText.nitro.js +1 -0
- package/lib/typescript/src/NitroNumber.d.ts +79 -1
- package/lib/typescript/src/NitroText.d.ts +67 -0
- package/lib/typescript/src/NitroTime.d.ts +19 -0
- package/lib/typescript/src/formatProps.d.ts +30 -4
- package/lib/typescript/src/index.d.ts +4 -1
- package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +67 -0
- package/lib/typescript/src/specs/NitroText.nitro.d.ts +60 -0
- package/nitro.json +20 -0
- package/nitrogen/generated/android/NitroInput+autolinking.cmake +6 -0
- package/nitrogen/generated/android/NitroInputOnLoad.cpp +34 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +243 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +40 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextMeasureSpec.cpp +58 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextMeasureSpec.hpp +64 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.cpp +253 -0
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.hpp +104 -0
- package/nitrogen/generated/android/c++/JNitroNumberShimmerDirection.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroNumberSignDisplay.hpp +67 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +100 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.cpp +174 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.hpp +54 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +136 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextMeasureSpec.kt +60 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextViewSpec.kt +179 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberShimmerDirection.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberSignDisplay.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/views/HybridNitroTextViewManager.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/views/HybridNitroTextViewStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.cpp +34 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +132 -11
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +16 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.mm +16 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.swift +24 -0
- package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +146 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextMeasureSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextMeasureSpecSwift.hpp +90 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.hpp +233 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +120 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroTextViewComponent.mm +264 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +20 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +493 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextMeasureSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextMeasureSpec_cxx.swift +150 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec.swift +75 -0
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec_cxx.swift +608 -0
- package/nitrogen/generated/ios/swift/NitroNumberShimmerDirection.swift +44 -0
- package/nitrogen/generated/ios/swift/NitroNumberSignDisplay.swift +52 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +46 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextMeasureSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextMeasureSpec.hpp +63 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.cpp +62 -0
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.hpp +115 -0
- package/nitrogen/generated/shared/c++/NitroNumberShimmerDirection.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroNumberSignDisplay.hpp +88 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +40 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +62 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.cpp +74 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.hpp +149 -0
- package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +20 -0
- package/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/package.json +1 -1
- package/src/NitroNumber.tsx +183 -9
- package/src/NitroText.tsx +166 -0
- package/src/NitroTime.tsx +68 -0
- package/src/formatProps.ts +108 -18
- package/src/index.ts +5 -0
- package/src/specs/NitroNumber.nitro.ts +69 -0
- package/src/specs/NitroText.nitro.ts +65 -0
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextViewSpec.kt
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroTextViewSpec.kt
|
|
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
|
+
package com.margelo.nitro.nitroinput
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.jni.HybridData
|
|
12
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
+
import dalvik.annotation.optimization.FastNative
|
|
14
|
+
import com.margelo.nitro.core.HybridObject
|
|
15
|
+
import com.margelo.nitro.views.HybridView
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A Kotlin class representing the NitroTextView HybridObject.
|
|
19
|
+
* Implement this abstract class to create Kotlin-based instances of NitroTextView.
|
|
20
|
+
*/
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
@Suppress(
|
|
24
|
+
"KotlinJniMissingFunction", "unused",
|
|
25
|
+
"RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
|
|
26
|
+
"LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
|
|
27
|
+
)
|
|
28
|
+
abstract class HybridNitroTextViewSpec: HybridView() {
|
|
29
|
+
// Properties
|
|
30
|
+
@get:DoNotStrip
|
|
31
|
+
@get:Keep
|
|
32
|
+
@set:DoNotStrip
|
|
33
|
+
@set:Keep
|
|
34
|
+
abstract var text: String
|
|
35
|
+
|
|
36
|
+
@get:DoNotStrip
|
|
37
|
+
@get:Keep
|
|
38
|
+
@set:DoNotStrip
|
|
39
|
+
@set:Keep
|
|
40
|
+
abstract var fontSize: Double?
|
|
41
|
+
|
|
42
|
+
@get:DoNotStrip
|
|
43
|
+
@get:Keep
|
|
44
|
+
@set:DoNotStrip
|
|
45
|
+
@set:Keep
|
|
46
|
+
abstract var fontWeight: Double?
|
|
47
|
+
|
|
48
|
+
@get:DoNotStrip
|
|
49
|
+
@get:Keep
|
|
50
|
+
@set:DoNotStrip
|
|
51
|
+
@set:Keep
|
|
52
|
+
abstract var fontFamily: String?
|
|
53
|
+
|
|
54
|
+
@get:DoNotStrip
|
|
55
|
+
@get:Keep
|
|
56
|
+
@set:DoNotStrip
|
|
57
|
+
@set:Keep
|
|
58
|
+
abstract var color: Double?
|
|
59
|
+
|
|
60
|
+
@get:DoNotStrip
|
|
61
|
+
@get:Keep
|
|
62
|
+
@set:DoNotStrip
|
|
63
|
+
@set:Keep
|
|
64
|
+
abstract var letterSpacing: Double?
|
|
65
|
+
|
|
66
|
+
@get:DoNotStrip
|
|
67
|
+
@get:Keep
|
|
68
|
+
@set:DoNotStrip
|
|
69
|
+
@set:Keep
|
|
70
|
+
abstract var textAlign: NitroNumberTextAlign?
|
|
71
|
+
|
|
72
|
+
@get:DoNotStrip
|
|
73
|
+
@get:Keep
|
|
74
|
+
@set:DoNotStrip
|
|
75
|
+
@set:Keep
|
|
76
|
+
abstract var rightToLeft: Boolean?
|
|
77
|
+
|
|
78
|
+
@get:DoNotStrip
|
|
79
|
+
@get:Keep
|
|
80
|
+
@set:DoNotStrip
|
|
81
|
+
@set:Keep
|
|
82
|
+
abstract var duration: Double?
|
|
83
|
+
|
|
84
|
+
@get:DoNotStrip
|
|
85
|
+
@get:Keep
|
|
86
|
+
@set:DoNotStrip
|
|
87
|
+
@set:Keep
|
|
88
|
+
abstract var easing: NitroInputEasing?
|
|
89
|
+
|
|
90
|
+
@get:DoNotStrip
|
|
91
|
+
@get:Keep
|
|
92
|
+
@set:DoNotStrip
|
|
93
|
+
@set:Keep
|
|
94
|
+
abstract var bounce: Double?
|
|
95
|
+
|
|
96
|
+
@get:DoNotStrip
|
|
97
|
+
@get:Keep
|
|
98
|
+
@set:DoNotStrip
|
|
99
|
+
@set:Keep
|
|
100
|
+
abstract var effect: NitroInputEffect?
|
|
101
|
+
|
|
102
|
+
@get:DoNotStrip
|
|
103
|
+
@get:Keep
|
|
104
|
+
@set:DoNotStrip
|
|
105
|
+
@set:Keep
|
|
106
|
+
abstract var respectReduceMotion: Boolean?
|
|
107
|
+
|
|
108
|
+
@get:DoNotStrip
|
|
109
|
+
@get:Keep
|
|
110
|
+
@set:DoNotStrip
|
|
111
|
+
@set:Keep
|
|
112
|
+
abstract var loading: Boolean?
|
|
113
|
+
|
|
114
|
+
@get:DoNotStrip
|
|
115
|
+
@get:Keep
|
|
116
|
+
@set:DoNotStrip
|
|
117
|
+
@set:Keep
|
|
118
|
+
abstract var shimmerColor: Double?
|
|
119
|
+
|
|
120
|
+
@get:DoNotStrip
|
|
121
|
+
@get:Keep
|
|
122
|
+
@set:DoNotStrip
|
|
123
|
+
@set:Keep
|
|
124
|
+
abstract var shimmerDuration: Double?
|
|
125
|
+
|
|
126
|
+
@get:DoNotStrip
|
|
127
|
+
@get:Keep
|
|
128
|
+
@set:DoNotStrip
|
|
129
|
+
@set:Keep
|
|
130
|
+
abstract var shimmerAngle: Double?
|
|
131
|
+
|
|
132
|
+
@get:DoNotStrip
|
|
133
|
+
@get:Keep
|
|
134
|
+
@set:DoNotStrip
|
|
135
|
+
@set:Keep
|
|
136
|
+
abstract var shimmerWidth: Double?
|
|
137
|
+
|
|
138
|
+
@get:DoNotStrip
|
|
139
|
+
@get:Keep
|
|
140
|
+
@set:DoNotStrip
|
|
141
|
+
@set:Keep
|
|
142
|
+
abstract var shimmerBaseColor: Double?
|
|
143
|
+
|
|
144
|
+
@get:DoNotStrip
|
|
145
|
+
@get:Keep
|
|
146
|
+
@set:DoNotStrip
|
|
147
|
+
@set:Keep
|
|
148
|
+
abstract var shimmerDirection: NitroNumberShimmerDirection?
|
|
149
|
+
|
|
150
|
+
@get:DoNotStrip
|
|
151
|
+
@get:Keep
|
|
152
|
+
@set:DoNotStrip
|
|
153
|
+
@set:Keep
|
|
154
|
+
abstract var shimmerDelay: Double?
|
|
155
|
+
|
|
156
|
+
// Methods
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
// Default implementation of `HybridObject.toString()`
|
|
160
|
+
override fun toString(): String {
|
|
161
|
+
return "[HybridObject NitroTextView]"
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// C++ backing class
|
|
165
|
+
@DoNotStrip
|
|
166
|
+
@Keep
|
|
167
|
+
protected open class CxxPart(javaPart: HybridNitroTextViewSpec): HybridObject.CxxPart(javaPart) {
|
|
168
|
+
// C++ JHybridNitroTextViewSpec::CxxPart::initHybrid(...)
|
|
169
|
+
@FastNative
|
|
170
|
+
external override fun initHybrid(): HybridData
|
|
171
|
+
}
|
|
172
|
+
override fun createCxxPart(): CxxPart {
|
|
173
|
+
return CxxPart(this)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
companion object {
|
|
177
|
+
protected const val TAG = "HybridNitroTextViewSpec"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroNumberShimmerDirection.kt
|
|
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
|
+
package com.margelo.nitro.nitroinput
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "NitroNumberShimmerDirection".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class NitroNumberShimmerDirection(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
AUTO(0),
|
|
20
|
+
LTR(1),
|
|
21
|
+
RTL(2);
|
|
22
|
+
|
|
23
|
+
companion object
|
|
24
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroNumberSignDisplay.kt
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroNumberSignDisplay.kt
|
|
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
|
+
package com.margelo.nitro.nitroinput
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "NitroNumberSignDisplay".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class NitroNumberSignDisplay(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
AUTO(0),
|
|
20
|
+
ALWAYS(1),
|
|
21
|
+
NEVER(2),
|
|
22
|
+
EXCEPTZERO(3),
|
|
23
|
+
NEGATIVE(4);
|
|
24
|
+
|
|
25
|
+
companion object
|
|
26
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroTextViewManager.kt
|
|
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
|
+
package com.margelo.nitro.nitroinput.views
|
|
9
|
+
|
|
10
|
+
import android.view.View
|
|
11
|
+
import com.facebook.react.uimanager.ReactStylesDiffMap
|
|
12
|
+
import com.facebook.react.uimanager.SimpleViewManager
|
|
13
|
+
import com.facebook.react.uimanager.StateWrapper
|
|
14
|
+
import com.facebook.react.uimanager.ThemedReactContext
|
|
15
|
+
import com.margelo.nitro.R.id.associated_hybrid_view_tag
|
|
16
|
+
import com.margelo.nitro.views.RecyclableView
|
|
17
|
+
import com.margelo.nitro.nitroinput.*
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Represents the React Native `ViewManager` for the "NitroTextView" Nitro HybridView.
|
|
21
|
+
*/
|
|
22
|
+
public class HybridNitroTextViewManager: SimpleViewManager<View>() {
|
|
23
|
+
/**
|
|
24
|
+
* Represents the View and its last state snapshot (mutable)
|
|
25
|
+
*/
|
|
26
|
+
private class HybridViewHolder(
|
|
27
|
+
val hybridView: HybridNitroTextView,
|
|
28
|
+
var lastState: StateWrapper? = null,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
init {
|
|
32
|
+
if (RecyclableView::class.java.isAssignableFrom(HybridNitroTextView::class.java)) {
|
|
33
|
+
// Enable view recycling
|
|
34
|
+
super.setupViewRecycling()
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
override fun getName(): String {
|
|
39
|
+
return "NitroTextView"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
override fun createViewInstance(reactContext: ThemedReactContext): View {
|
|
43
|
+
val hybridView = HybridNitroTextView(reactContext)
|
|
44
|
+
val view = hybridView.view
|
|
45
|
+
view.setTag(associated_hybrid_view_tag, HybridViewHolder(hybridView))
|
|
46
|
+
return view
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override fun updateState(view: View, props: ReactStylesDiffMap, stateWrapper: StateWrapper): Any? {
|
|
50
|
+
val holder = getHybridViewHolder(view)
|
|
51
|
+
?: throw Error("Couldn't find view $view in local views table!")
|
|
52
|
+
val hybridView = holder.hybridView
|
|
53
|
+
val oldState = holder.lastState
|
|
54
|
+
val newState = stateWrapper
|
|
55
|
+
|
|
56
|
+
// 1. Update each prop individually
|
|
57
|
+
hybridView.beforeUpdate()
|
|
58
|
+
HybridNitroTextViewStateUpdater.updateViewProps(hybridView, newState, oldState)
|
|
59
|
+
hybridView.afterUpdate()
|
|
60
|
+
holder.lastState = newState
|
|
61
|
+
|
|
62
|
+
// 2. Continue in base View props
|
|
63
|
+
return super.updateState(view, props, newState)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
override fun onDropViewInstance(view: View) {
|
|
67
|
+
val holder = getHybridViewHolder(view)
|
|
68
|
+
holder?.lastState = null
|
|
69
|
+
holder?.hybridView?.onDropView()
|
|
70
|
+
return super.onDropViewInstance(view)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
protected override fun prepareToRecycleView(reactContext: ThemedReactContext, view: View): View? {
|
|
74
|
+
val preparedView = super.prepareToRecycleView(reactContext, view)
|
|
75
|
+
?: return null
|
|
76
|
+
val holder = getHybridViewHolder(preparedView)
|
|
77
|
+
?: return null
|
|
78
|
+
val hybridView = holder.hybridView
|
|
79
|
+
holder.lastState = null
|
|
80
|
+
|
|
81
|
+
@Suppress("USELESS_IS_CHECK")
|
|
82
|
+
if (hybridView is RecyclableView) {
|
|
83
|
+
// Recycle in it's implementation
|
|
84
|
+
hybridView.prepareForRecycle()
|
|
85
|
+
|
|
86
|
+
// Maybe update the view if it changed
|
|
87
|
+
return hybridView.view
|
|
88
|
+
} else {
|
|
89
|
+
return null
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
private fun getHybridViewHolder(view: View): HybridViewHolder? {
|
|
94
|
+
return view.getTag(associated_hybrid_view_tag) as? HybridViewHolder
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroTextViewStateUpdater.kt
|
|
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
|
+
package com.margelo.nitro.nitroinput.views
|
|
9
|
+
|
|
10
|
+
import com.facebook.react.uimanager.StateWrapper
|
|
11
|
+
import com.margelo.nitro.nitroinput.*
|
|
12
|
+
|
|
13
|
+
internal class HybridNitroTextViewStateUpdater {
|
|
14
|
+
companion object {
|
|
15
|
+
/**
|
|
16
|
+
* Updates the props for [view] through C++.
|
|
17
|
+
* The [newState] prop is expected to contain [view]'s props as wrapped Fabric state.
|
|
18
|
+
*/
|
|
19
|
+
@Suppress("KotlinJniMissingFunction")
|
|
20
|
+
@JvmStatic
|
|
21
|
+
external fun updateViewProps(view: HybridNitroTextViewSpec, newState: StateWrapper, oldState: StateWrapper?)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
#include "HybridNitroNumberFormatPlatformSpecSwift.hpp"
|
|
13
13
|
#include "HybridNitroNumberViewSpecSwift.hpp"
|
|
14
14
|
#include "HybridNitroPlatformNumberFormatterSpecSwift.hpp"
|
|
15
|
+
#include "HybridNitroTextMeasureSpecSwift.hpp"
|
|
16
|
+
#include "HybridNitroTextViewSpecSwift.hpp"
|
|
15
17
|
#include "NitroInput-Swift-Cxx-Umbrella.hpp"
|
|
16
18
|
#include <NitroModules/NitroDefines.hpp>
|
|
17
19
|
|
|
@@ -105,6 +107,38 @@ namespace margelo::nitro::nitroinput::bridge::swift {
|
|
|
105
107
|
return swiftPart.toUnsafe();
|
|
106
108
|
}
|
|
107
109
|
|
|
110
|
+
// pragma MARK: std::shared_ptr<HybridNitroTextMeasureSpec>
|
|
111
|
+
std::shared_ptr<HybridNitroTextMeasureSpec> create_std__shared_ptr_HybridNitroTextMeasureSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
112
|
+
NitroInput::HybridNitroTextMeasureSpec_cxx swiftPart = NitroInput::HybridNitroTextMeasureSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
113
|
+
return std::make_shared<margelo::nitro::nitroinput::HybridNitroTextMeasureSpecSwift>(swiftPart);
|
|
114
|
+
}
|
|
115
|
+
void* NON_NULL get_std__shared_ptr_HybridNitroTextMeasureSpec_(std__shared_ptr_HybridNitroTextMeasureSpec_ cppType) {
|
|
116
|
+
std::shared_ptr<margelo::nitro::nitroinput::HybridNitroTextMeasureSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::nitroinput::HybridNitroTextMeasureSpecSwift>(cppType);
|
|
117
|
+
#ifdef NITRO_DEBUG
|
|
118
|
+
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
119
|
+
throw std::runtime_error("Class \"HybridNitroTextMeasureSpec\" is not implemented in Swift!");
|
|
120
|
+
}
|
|
121
|
+
#endif
|
|
122
|
+
NitroInput::HybridNitroTextMeasureSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
123
|
+
return swiftPart.toUnsafe();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// pragma MARK: std::shared_ptr<HybridNitroTextViewSpec>
|
|
127
|
+
std::shared_ptr<HybridNitroTextViewSpec> create_std__shared_ptr_HybridNitroTextViewSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
128
|
+
NitroInput::HybridNitroTextViewSpec_cxx swiftPart = NitroInput::HybridNitroTextViewSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
129
|
+
return std::make_shared<margelo::nitro::nitroinput::HybridNitroTextViewSpecSwift>(swiftPart);
|
|
130
|
+
}
|
|
131
|
+
void* NON_NULL get_std__shared_ptr_HybridNitroTextViewSpec_(std__shared_ptr_HybridNitroTextViewSpec_ cppType) {
|
|
132
|
+
std::shared_ptr<margelo::nitro::nitroinput::HybridNitroTextViewSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::nitroinput::HybridNitroTextViewSpecSwift>(cppType);
|
|
133
|
+
#ifdef NITRO_DEBUG
|
|
134
|
+
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
135
|
+
throw std::runtime_error("Class \"HybridNitroTextViewSpec\" is not implemented in Swift!");
|
|
136
|
+
}
|
|
137
|
+
#endif
|
|
138
|
+
NitroInput::HybridNitroTextViewSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
139
|
+
return swiftPart.toUnsafe();
|
|
140
|
+
}
|
|
141
|
+
|
|
108
142
|
// pragma MARK: std::shared_ptr<HybridNitroPlatformNumberFormatterSpec>
|
|
109
143
|
std::shared_ptr<HybridNitroPlatformNumberFormatterSpec> create_std__shared_ptr_HybridNitroPlatformNumberFormatterSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
110
144
|
NitroInput::HybridNitroPlatformNumberFormatterSpec_cxx swiftPart = NitroInput::HybridNitroPlatformNumberFormatterSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
@@ -16,6 +16,14 @@ namespace margelo::nitro::nitroinput { class HybridNitroNumberFormatPlatformSpec
|
|
|
16
16
|
namespace margelo::nitro::nitroinput { class HybridNitroNumberViewSpec; }
|
|
17
17
|
// Forward declaration of `HybridNitroPlatformNumberFormatterSpec` to properly resolve imports.
|
|
18
18
|
namespace margelo::nitro::nitroinput { class HybridNitroPlatformNumberFormatterSpec; }
|
|
19
|
+
// Forward declaration of `HybridNitroTextMeasureSpec` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::nitroinput { class HybridNitroTextMeasureSpec; }
|
|
21
|
+
// Forward declaration of `HybridNitroTextViewSpec` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::nitroinput { class HybridNitroTextViewSpec; }
|
|
23
|
+
// Forward declaration of `NitroInputEasing` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputEasing; }
|
|
25
|
+
// Forward declaration of `NitroInputEffect` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputEffect; }
|
|
19
27
|
// Forward declaration of `NitroInputNotation` to properly resolve imports.
|
|
20
28
|
namespace margelo::nitro::nitroinput { struct NitroInputNotation; }
|
|
21
29
|
// Forward declaration of `NitroNumberAffixAlign` to properly resolve imports.
|
|
@@ -26,6 +34,10 @@ namespace margelo::nitro::nitroinput { enum class NitroNumberDirection; }
|
|
|
26
34
|
namespace margelo::nitro::nitroinput { enum class NitroNumberEasing; }
|
|
27
35
|
// Forward declaration of `NitroNumberRevealStyle` to properly resolve imports.
|
|
28
36
|
namespace margelo::nitro::nitroinput { enum class NitroNumberRevealStyle; }
|
|
37
|
+
// Forward declaration of `NitroNumberShimmerDirection` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::nitroinput { enum class NitroNumberShimmerDirection; }
|
|
39
|
+
// Forward declaration of `NitroNumberSignDisplay` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::nitroinput { enum class NitroNumberSignDisplay; }
|
|
29
41
|
// Forward declaration of `NitroNumberTextAlign` to properly resolve imports.
|
|
30
42
|
namespace margelo::nitro::nitroinput { enum class NitroNumberTextAlign; }
|
|
31
43
|
// Forward declaration of `NitroNumberTransition` to properly resolve imports.
|
|
@@ -40,17 +52,27 @@ namespace NitroInput { class HybridNitroNumberFormatPlatformSpec_cxx; }
|
|
|
40
52
|
namespace NitroInput { class HybridNitroNumberViewSpec_cxx; }
|
|
41
53
|
// Forward declaration of `HybridNitroPlatformNumberFormatterSpec_cxx` to properly resolve imports.
|
|
42
54
|
namespace NitroInput { class HybridNitroPlatformNumberFormatterSpec_cxx; }
|
|
55
|
+
// Forward declaration of `HybridNitroTextMeasureSpec_cxx` to properly resolve imports.
|
|
56
|
+
namespace NitroInput { class HybridNitroTextMeasureSpec_cxx; }
|
|
57
|
+
// Forward declaration of `HybridNitroTextViewSpec_cxx` to properly resolve imports.
|
|
58
|
+
namespace NitroInput { class HybridNitroTextViewSpec_cxx; }
|
|
43
59
|
|
|
44
60
|
// Include C++ defined types
|
|
45
61
|
#include "HybridNitroInputViewSpec.hpp"
|
|
46
62
|
#include "HybridNitroNumberFormatPlatformSpec.hpp"
|
|
47
63
|
#include "HybridNitroNumberViewSpec.hpp"
|
|
48
64
|
#include "HybridNitroPlatformNumberFormatterSpec.hpp"
|
|
65
|
+
#include "HybridNitroTextMeasureSpec.hpp"
|
|
66
|
+
#include "HybridNitroTextViewSpec.hpp"
|
|
67
|
+
#include "NitroInputEasing.hpp"
|
|
68
|
+
#include "NitroInputEffect.hpp"
|
|
49
69
|
#include "NitroInputNotation.hpp"
|
|
50
70
|
#include "NitroNumberAffixAlign.hpp"
|
|
51
71
|
#include "NitroNumberDirection.hpp"
|
|
52
72
|
#include "NitroNumberEasing.hpp"
|
|
53
73
|
#include "NitroNumberRevealStyle.hpp"
|
|
74
|
+
#include "NitroNumberShimmerDirection.hpp"
|
|
75
|
+
#include "NitroNumberSignDisplay.hpp"
|
|
54
76
|
#include "NitroNumberTextAlign.hpp"
|
|
55
77
|
#include "NitroNumberTransition.hpp"
|
|
56
78
|
#include <NitroModules/Result.hpp>
|
|
@@ -509,6 +531,21 @@ namespace margelo::nitro::nitroinput::bridge::swift {
|
|
|
509
531
|
return optional.value();
|
|
510
532
|
}
|
|
511
533
|
|
|
534
|
+
// pragma MARK: std::optional<NitroNumberShimmerDirection>
|
|
535
|
+
/**
|
|
536
|
+
* Specialized version of `std::optional<NitroNumberShimmerDirection>`.
|
|
537
|
+
*/
|
|
538
|
+
using std__optional_NitroNumberShimmerDirection_ = std::optional<NitroNumberShimmerDirection>;
|
|
539
|
+
inline std::optional<NitroNumberShimmerDirection> create_std__optional_NitroNumberShimmerDirection_(const NitroNumberShimmerDirection& value) noexcept {
|
|
540
|
+
return std::optional<NitroNumberShimmerDirection>(value);
|
|
541
|
+
}
|
|
542
|
+
inline bool has_value_std__optional_NitroNumberShimmerDirection_(const std::optional<NitroNumberShimmerDirection>& optional) noexcept {
|
|
543
|
+
return optional.has_value();
|
|
544
|
+
}
|
|
545
|
+
inline NitroNumberShimmerDirection get_std__optional_NitroNumberShimmerDirection_(const std::optional<NitroNumberShimmerDirection>& optional) noexcept {
|
|
546
|
+
return optional.value();
|
|
547
|
+
}
|
|
548
|
+
|
|
512
549
|
// pragma MARK: std::optional<NitroNumberAffixAlign>
|
|
513
550
|
/**
|
|
514
551
|
* Specialized version of `std::optional<NitroNumberAffixAlign>`.
|
|
@@ -524,6 +561,47 @@ namespace margelo::nitro::nitroinput::bridge::swift {
|
|
|
524
561
|
return optional.value();
|
|
525
562
|
}
|
|
526
563
|
|
|
564
|
+
// pragma MARK: std::optional<NitroNumberSignDisplay>
|
|
565
|
+
/**
|
|
566
|
+
* Specialized version of `std::optional<NitroNumberSignDisplay>`.
|
|
567
|
+
*/
|
|
568
|
+
using std__optional_NitroNumberSignDisplay_ = std::optional<NitroNumberSignDisplay>;
|
|
569
|
+
inline std::optional<NitroNumberSignDisplay> create_std__optional_NitroNumberSignDisplay_(const NitroNumberSignDisplay& value) noexcept {
|
|
570
|
+
return std::optional<NitroNumberSignDisplay>(value);
|
|
571
|
+
}
|
|
572
|
+
inline bool has_value_std__optional_NitroNumberSignDisplay_(const std::optional<NitroNumberSignDisplay>& optional) noexcept {
|
|
573
|
+
return optional.has_value();
|
|
574
|
+
}
|
|
575
|
+
inline NitroNumberSignDisplay get_std__optional_NitroNumberSignDisplay_(const std::optional<NitroNumberSignDisplay>& optional) noexcept {
|
|
576
|
+
return optional.value();
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
// pragma MARK: std::vector<std::string>
|
|
580
|
+
/**
|
|
581
|
+
* Specialized version of `std::vector<std::string>`.
|
|
582
|
+
*/
|
|
583
|
+
using std__vector_std__string_ = std::vector<std::string>;
|
|
584
|
+
inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
|
|
585
|
+
std::vector<std::string> vector;
|
|
586
|
+
vector.reserve(size);
|
|
587
|
+
return vector;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// pragma MARK: std::optional<std::vector<std::string>>
|
|
591
|
+
/**
|
|
592
|
+
* Specialized version of `std::optional<std::vector<std::string>>`.
|
|
593
|
+
*/
|
|
594
|
+
using std__optional_std__vector_std__string__ = std::optional<std::vector<std::string>>;
|
|
595
|
+
inline std::optional<std::vector<std::string>> create_std__optional_std__vector_std__string__(const std::vector<std::string>& value) noexcept {
|
|
596
|
+
return std::optional<std::vector<std::string>>(value);
|
|
597
|
+
}
|
|
598
|
+
inline bool has_value_std__optional_std__vector_std__string__(const std::optional<std::vector<std::string>>& optional) noexcept {
|
|
599
|
+
return optional.has_value();
|
|
600
|
+
}
|
|
601
|
+
inline std::vector<std::string> get_std__optional_std__vector_std__string__(const std::optional<std::vector<std::string>>& optional) noexcept {
|
|
602
|
+
return optional.value();
|
|
603
|
+
}
|
|
604
|
+
|
|
527
605
|
// pragma MARK: std::optional<NitroNumberTextAlign>
|
|
528
606
|
/**
|
|
529
607
|
* Specialized version of `std::optional<NitroNumberTextAlign>`.
|
|
@@ -603,6 +681,60 @@ namespace margelo::nitro::nitroinput::bridge::swift {
|
|
|
603
681
|
using std__weak_ptr_HybridNitroNumberViewSpec_ = std::weak_ptr<HybridNitroNumberViewSpec>;
|
|
604
682
|
inline std__weak_ptr_HybridNitroNumberViewSpec_ weakify_std__shared_ptr_HybridNitroNumberViewSpec_(const std::shared_ptr<HybridNitroNumberViewSpec>& strong) noexcept { return strong; }
|
|
605
683
|
|
|
684
|
+
// pragma MARK: std::shared_ptr<HybridNitroTextMeasureSpec>
|
|
685
|
+
/**
|
|
686
|
+
* Specialized version of `std::shared_ptr<HybridNitroTextMeasureSpec>`.
|
|
687
|
+
*/
|
|
688
|
+
using std__shared_ptr_HybridNitroTextMeasureSpec_ = std::shared_ptr<HybridNitroTextMeasureSpec>;
|
|
689
|
+
std::shared_ptr<HybridNitroTextMeasureSpec> create_std__shared_ptr_HybridNitroTextMeasureSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
690
|
+
void* NON_NULL get_std__shared_ptr_HybridNitroTextMeasureSpec_(std__shared_ptr_HybridNitroTextMeasureSpec_ cppType);
|
|
691
|
+
|
|
692
|
+
// pragma MARK: std::weak_ptr<HybridNitroTextMeasureSpec>
|
|
693
|
+
using std__weak_ptr_HybridNitroTextMeasureSpec_ = std::weak_ptr<HybridNitroTextMeasureSpec>;
|
|
694
|
+
inline std__weak_ptr_HybridNitroTextMeasureSpec_ weakify_std__shared_ptr_HybridNitroTextMeasureSpec_(const std::shared_ptr<HybridNitroTextMeasureSpec>& strong) noexcept { return strong; }
|
|
695
|
+
|
|
696
|
+
// pragma MARK: std::optional<NitroInputEasing>
|
|
697
|
+
/**
|
|
698
|
+
* Specialized version of `std::optional<NitroInputEasing>`.
|
|
699
|
+
*/
|
|
700
|
+
using std__optional_NitroInputEasing_ = std::optional<NitroInputEasing>;
|
|
701
|
+
inline std::optional<NitroInputEasing> create_std__optional_NitroInputEasing_(const NitroInputEasing& value) noexcept {
|
|
702
|
+
return std::optional<NitroInputEasing>(value);
|
|
703
|
+
}
|
|
704
|
+
inline bool has_value_std__optional_NitroInputEasing_(const std::optional<NitroInputEasing>& optional) noexcept {
|
|
705
|
+
return optional.has_value();
|
|
706
|
+
}
|
|
707
|
+
inline NitroInputEasing get_std__optional_NitroInputEasing_(const std::optional<NitroInputEasing>& optional) noexcept {
|
|
708
|
+
return optional.value();
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
// pragma MARK: std::optional<NitroInputEffect>
|
|
712
|
+
/**
|
|
713
|
+
* Specialized version of `std::optional<NitroInputEffect>`.
|
|
714
|
+
*/
|
|
715
|
+
using std__optional_NitroInputEffect_ = std::optional<NitroInputEffect>;
|
|
716
|
+
inline std::optional<NitroInputEffect> create_std__optional_NitroInputEffect_(const NitroInputEffect& value) noexcept {
|
|
717
|
+
return std::optional<NitroInputEffect>(value);
|
|
718
|
+
}
|
|
719
|
+
inline bool has_value_std__optional_NitroInputEffect_(const std::optional<NitroInputEffect>& optional) noexcept {
|
|
720
|
+
return optional.has_value();
|
|
721
|
+
}
|
|
722
|
+
inline NitroInputEffect get_std__optional_NitroInputEffect_(const std::optional<NitroInputEffect>& optional) noexcept {
|
|
723
|
+
return optional.value();
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// pragma MARK: std::shared_ptr<HybridNitroTextViewSpec>
|
|
727
|
+
/**
|
|
728
|
+
* Specialized version of `std::shared_ptr<HybridNitroTextViewSpec>`.
|
|
729
|
+
*/
|
|
730
|
+
using std__shared_ptr_HybridNitroTextViewSpec_ = std::shared_ptr<HybridNitroTextViewSpec>;
|
|
731
|
+
std::shared_ptr<HybridNitroTextViewSpec> create_std__shared_ptr_HybridNitroTextViewSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
732
|
+
void* NON_NULL get_std__shared_ptr_HybridNitroTextViewSpec_(std__shared_ptr_HybridNitroTextViewSpec_ cppType);
|
|
733
|
+
|
|
734
|
+
// pragma MARK: std::weak_ptr<HybridNitroTextViewSpec>
|
|
735
|
+
using std__weak_ptr_HybridNitroTextViewSpec_ = std::weak_ptr<HybridNitroTextViewSpec>;
|
|
736
|
+
inline std__weak_ptr_HybridNitroTextViewSpec_ weakify_std__shared_ptr_HybridNitroTextViewSpec_(const std::shared_ptr<HybridNitroTextViewSpec>& strong) noexcept { return strong; }
|
|
737
|
+
|
|
606
738
|
// pragma MARK: std::shared_ptr<HybridNitroPlatformNumberFormatterSpec>
|
|
607
739
|
/**
|
|
608
740
|
* Specialized version of `std::shared_ptr<HybridNitroPlatformNumberFormatterSpec>`.
|
|
@@ -615,17 +747,6 @@ namespace margelo::nitro::nitroinput::bridge::swift {
|
|
|
615
747
|
using std__weak_ptr_HybridNitroPlatformNumberFormatterSpec_ = std::weak_ptr<HybridNitroPlatformNumberFormatterSpec>;
|
|
616
748
|
inline std__weak_ptr_HybridNitroPlatformNumberFormatterSpec_ weakify_std__shared_ptr_HybridNitroPlatformNumberFormatterSpec_(const std::shared_ptr<HybridNitroPlatformNumberFormatterSpec>& strong) noexcept { return strong; }
|
|
617
749
|
|
|
618
|
-
// pragma MARK: std::vector<std::string>
|
|
619
|
-
/**
|
|
620
|
-
* Specialized version of `std::vector<std::string>`.
|
|
621
|
-
*/
|
|
622
|
-
using std__vector_std__string_ = std::vector<std::string>;
|
|
623
|
-
inline std::vector<std::string> create_std__vector_std__string_(size_t size) noexcept {
|
|
624
|
-
std::vector<std::string> vector;
|
|
625
|
-
vector.reserve(size);
|
|
626
|
-
return vector;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
750
|
// pragma MARK: std::shared_ptr<HybridNitroNumberFormatPlatformSpec>
|
|
630
751
|
/**
|
|
631
752
|
* Specialized version of `std::shared_ptr<HybridNitroNumberFormatPlatformSpec>`.
|
|
@@ -16,6 +16,10 @@ namespace margelo::nitro::nitroinput { class HybridNitroNumberFormatPlatformSpec
|
|
|
16
16
|
namespace margelo::nitro::nitroinput { class HybridNitroNumberViewSpec; }
|
|
17
17
|
// Forward declaration of `HybridNitroPlatformNumberFormatterSpec` to properly resolve imports.
|
|
18
18
|
namespace margelo::nitro::nitroinput { class HybridNitroPlatformNumberFormatterSpec; }
|
|
19
|
+
// Forward declaration of `HybridNitroTextMeasureSpec` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::nitroinput { class HybridNitroTextMeasureSpec; }
|
|
21
|
+
// Forward declaration of `HybridNitroTextViewSpec` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::nitroinput { class HybridNitroTextViewSpec; }
|
|
19
23
|
// Forward declaration of `NitroInputAffixAlign` to properly resolve imports.
|
|
20
24
|
namespace margelo::nitro::nitroinput { enum class NitroInputAffixAlign; }
|
|
21
25
|
// Forward declaration of `NitroInputAutoCapitalize` to properly resolve imports.
|
|
@@ -54,6 +58,10 @@ namespace margelo::nitro::nitroinput { enum class NitroNumberDirection; }
|
|
|
54
58
|
namespace margelo::nitro::nitroinput { enum class NitroNumberEasing; }
|
|
55
59
|
// Forward declaration of `NitroNumberRevealStyle` to properly resolve imports.
|
|
56
60
|
namespace margelo::nitro::nitroinput { enum class NitroNumberRevealStyle; }
|
|
61
|
+
// Forward declaration of `NitroNumberShimmerDirection` to properly resolve imports.
|
|
62
|
+
namespace margelo::nitro::nitroinput { enum class NitroNumberShimmerDirection; }
|
|
63
|
+
// Forward declaration of `NitroNumberSignDisplay` to properly resolve imports.
|
|
64
|
+
namespace margelo::nitro::nitroinput { enum class NitroNumberSignDisplay; }
|
|
57
65
|
// Forward declaration of `NitroNumberTextAlign` to properly resolve imports.
|
|
58
66
|
namespace margelo::nitro::nitroinput { enum class NitroNumberTextAlign; }
|
|
59
67
|
// Forward declaration of `NitroNumberTransition` to properly resolve imports.
|
|
@@ -84,6 +92,8 @@ namespace margelo::nitro::nitroinput { enum class NumberFormatUnitDisplay; }
|
|
|
84
92
|
#include "HybridNitroNumberFormatPlatformSpec.hpp"
|
|
85
93
|
#include "HybridNitroNumberViewSpec.hpp"
|
|
86
94
|
#include "HybridNitroPlatformNumberFormatterSpec.hpp"
|
|
95
|
+
#include "HybridNitroTextMeasureSpec.hpp"
|
|
96
|
+
#include "HybridNitroTextViewSpec.hpp"
|
|
87
97
|
#include "NitroInputAffixAlign.hpp"
|
|
88
98
|
#include "NitroInputAutoCapitalize.hpp"
|
|
89
99
|
#include "NitroInputEasing.hpp"
|
|
@@ -103,6 +113,8 @@ namespace margelo::nitro::nitroinput { enum class NumberFormatUnitDisplay; }
|
|
|
103
113
|
#include "NitroNumberDirection.hpp"
|
|
104
114
|
#include "NitroNumberEasing.hpp"
|
|
105
115
|
#include "NitroNumberRevealStyle.hpp"
|
|
116
|
+
#include "NitroNumberShimmerDirection.hpp"
|
|
117
|
+
#include "NitroNumberSignDisplay.hpp"
|
|
106
118
|
#include "NitroNumberTextAlign.hpp"
|
|
107
119
|
#include "NitroNumberTransition.hpp"
|
|
108
120
|
#include "NumberFormatCompactDisplay.hpp"
|
|
@@ -141,6 +153,10 @@ namespace NitroInput { class HybridNitroNumberFormatPlatformSpec_cxx; }
|
|
|
141
153
|
namespace NitroInput { class HybridNitroNumberViewSpec_cxx; }
|
|
142
154
|
// Forward declaration of `HybridNitroPlatformNumberFormatterSpec_cxx` to properly resolve imports.
|
|
143
155
|
namespace NitroInput { class HybridNitroPlatformNumberFormatterSpec_cxx; }
|
|
156
|
+
// Forward declaration of `HybridNitroTextMeasureSpec_cxx` to properly resolve imports.
|
|
157
|
+
namespace NitroInput { class HybridNitroTextMeasureSpec_cxx; }
|
|
158
|
+
// Forward declaration of `HybridNitroTextViewSpec_cxx` to properly resolve imports.
|
|
159
|
+
namespace NitroInput { class HybridNitroTextViewSpec_cxx; }
|
|
144
160
|
|
|
145
161
|
// Include Swift defined types
|
|
146
162
|
#if __has_include("NitroInput-Swift.h")
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
#include "HybridNitroNumberViewSpecSwift.hpp"
|
|
16
16
|
#include "HybridNitroNumberFormatFactory.hpp"
|
|
17
17
|
#include "HybridNitroNumberFormatPlatformSpecSwift.hpp"
|
|
18
|
+
#include "HybridNitroTextViewSpecSwift.hpp"
|
|
19
|
+
#include "HybridNitroTextMeasureSpecSwift.hpp"
|
|
18
20
|
|
|
19
21
|
@interface NitroInputAutolinking : NSObject
|
|
20
22
|
@end
|
|
@@ -64,6 +66,20 @@
|
|
|
64
66
|
return hybridObject;
|
|
65
67
|
}
|
|
66
68
|
);
|
|
69
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
70
|
+
"NitroTextView",
|
|
71
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
72
|
+
std::shared_ptr<HybridNitroTextViewSpec> hybridObject = NitroInput::NitroInputAutolinking::createNitroTextView();
|
|
73
|
+
return hybridObject;
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
77
|
+
"NitroTextMeasure",
|
|
78
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
79
|
+
std::shared_ptr<HybridNitroTextMeasureSpec> hybridObject = NitroInput::NitroInputAutolinking::createNitroTextMeasure();
|
|
80
|
+
return hybridObject;
|
|
81
|
+
}
|
|
82
|
+
);
|
|
67
83
|
}
|
|
68
84
|
|
|
69
85
|
@end
|