react-native-nitro-input 0.3.8 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/README.md +5 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputMeasure.kt +52 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +74 -80
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +18 -18
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroTextView.kt +14 -14
- package/android/src/main/java/com/margelo/nitro/nitroinput/InputFonts.kt +199 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/InputSizing.kt +398 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroInputView.kt +112 -333
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +178 -30
- package/ios/HybridNitroInputView.swift +69 -75
- package/ios/HybridNitroNumberView.swift +18 -18
- package/ios/HybridNitroTextView.swift +14 -14
- package/ios/InputSizing.swift +534 -0
- package/ios/NitroInputView.swift +102 -198
- package/ios/NitroNumberView.swift +98 -23
- package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +12 -8
- package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
- package/lib/commonjs/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
- package/lib/commonjs/src/NitroInput.js +164 -23
- package/lib/commonjs/src/NitroNumber.js +1 -1
- package/lib/commonjs/src/NitroText.js +6 -6
- package/lib/commonjs/src/specs/NitroInputMeasure.nitro.js +2 -0
- package/lib/module/nitrogen/generated/shared/json/NitroInputViewConfig.json +12 -8
- package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
- package/lib/module/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
- package/lib/module/src/NitroInput.js +165 -24
- package/lib/module/src/NitroNumber.js +1 -1
- package/lib/module/src/NitroText.js +6 -6
- package/lib/module/src/specs/NitroInputMeasure.nitro.js +1 -0
- package/lib/typescript/src/NitroInput.d.ts +9 -16
- package/lib/typescript/src/specs/NitroInput.nitro.d.ts +17 -8
- package/lib/typescript/src/specs/NitroInputMeasure.nitro.d.ts +67 -0
- package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +6 -6
- package/lib/typescript/src/specs/NitroText.nitro.d.ts +6 -6
- package/nitro.json +10 -0
- package/nitrogen/generated/android/NitroInput+autolinking.cmake +2 -0
- package/nitrogen/generated/android/NitroInputOnLoad.cpp +16 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.cpp +93 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputMeasureSpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp +76 -40
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +24 -16
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +30 -30
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +12 -12
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.cpp +30 -30
- package/nitrogen/generated/android/c++/JHybridNitroTextViewSpec.hpp +12 -12
- package/nitrogen/generated/android/c++/JNitroInputSize.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroInputSizing.hpp +284 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +44 -24
- package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +18 -18
- package/nitrogen/generated/android/c++/views/JHybridNitroTextViewStateUpdater.cpp +18 -18
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputMeasureSpec.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroInputViewSpec.kt +32 -8
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroTextViewSpec.kt +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSize.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NitroInputSizing.kt +246 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +29 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +11 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.mm +8 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.swift +12 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputMeasureSpecSwift.hpp +112 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputViewSpecSwift.hpp +56 -32
- package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +24 -24
- package/nitrogen/generated/ios/c++/HybridNitroTextViewSpecSwift.hpp +24 -24
- package/nitrogen/generated/ios/c++/views/HybridNitroInputViewComponent.mm +56 -32
- package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +24 -24
- package/nitrogen/generated/ios/c++/views/HybridNitroTextViewComponent.mm +24 -24
- package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputMeasureSpec_cxx.swift +138 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec.swift +12 -8
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +68 -24
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +18 -18
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridNitroTextViewSpec_cxx.swift +18 -18
- package/nitrogen/generated/ios/swift/NitroInputSize.swift +34 -0
- package/nitrogen/generated/ios/swift/NitroInputSizing.swift +242 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputMeasureSpec.hpp +66 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp +24 -16
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +24 -16
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +12 -12
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +12 -12
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.cpp +12 -12
- package/nitrogen/generated/shared/c++/HybridNitroTextViewSpec.hpp +12 -12
- package/nitrogen/generated/shared/c++/NitroInputSize.hpp +87 -0
- package/nitrogen/generated/shared/c++/NitroInputSizing.hpp +263 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +24 -16
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +36 -24
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +12 -12
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +18 -18
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.cpp +12 -12
- package/nitrogen/generated/shared/c++/views/HybridNitroTextViewComponent.hpp +18 -18
- package/nitrogen/generated/shared/json/NitroInputViewConfig.json +12 -8
- package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +6 -6
- package/nitrogen/generated/shared/json/NitroTextViewConfig.json +6 -6
- package/package.json +4 -2
- package/src/NitroInput.tsx +201 -64
- package/src/NitroNumber.tsx +6 -6
- package/src/NitroText.tsx +6 -6
- package/src/specs/NitroInput.nitro.ts +17 -8
- package/src/specs/NitroInputMeasure.nitro.ts +76 -0
- package/src/specs/NitroNumber.nitro.ts +6 -6
- package/src/specs/NitroText.nitro.ts +6 -6
|
@@ -296,11 +296,11 @@ using namespace margelo::nitro::nitroinput::views;
|
|
|
296
296
|
: !newViewProps.shimmerDelay.hasSameValue(oldViewProps->shimmerDelay)) {
|
|
297
297
|
swiftPart.setShimmerDelay(newViewProps.shimmerDelay.get());
|
|
298
298
|
}
|
|
299
|
-
//
|
|
299
|
+
// textSize: optional
|
|
300
300
|
if (oldViewProps == nullptr
|
|
301
|
-
? newViewProps.
|
|
302
|
-
: !newViewProps.
|
|
303
|
-
swiftPart.
|
|
301
|
+
? newViewProps.textSize.isProvided()
|
|
302
|
+
: !newViewProps.textSize.hasSameValue(oldViewProps->textSize)) {
|
|
303
|
+
swiftPart.setTextSize(newViewProps.textSize.get());
|
|
304
304
|
}
|
|
305
305
|
// prefixFontSize: optional
|
|
306
306
|
if (oldViewProps == nullptr
|
|
@@ -332,11 +332,11 @@ using namespace margelo::nitro::nitroinput::views;
|
|
|
332
332
|
: !newViewProps.suffixAlign.hasSameValue(oldViewProps->suffixAlign)) {
|
|
333
333
|
swiftPart.setSuffixAlign(newViewProps.suffixAlign.get());
|
|
334
334
|
}
|
|
335
|
-
//
|
|
335
|
+
// textLetterSpacing: optional
|
|
336
336
|
if (oldViewProps == nullptr
|
|
337
|
-
? newViewProps.
|
|
338
|
-
: !newViewProps.
|
|
339
|
-
swiftPart.
|
|
337
|
+
? newViewProps.textLetterSpacing.isProvided()
|
|
338
|
+
: !newViewProps.textLetterSpacing.hasSameValue(oldViewProps->textLetterSpacing)) {
|
|
339
|
+
swiftPart.setTextLetterSpacing(newViewProps.textLetterSpacing.get());
|
|
340
340
|
}
|
|
341
341
|
// prefixSpacing: optional
|
|
342
342
|
if (oldViewProps == nullptr
|
|
@@ -470,29 +470,29 @@ using namespace margelo::nitro::nitroinput::views;
|
|
|
470
470
|
: !newViewProps.maxFontSizeMultiplier.hasSameValue(oldViewProps->maxFontSizeMultiplier)) {
|
|
471
471
|
swiftPart.setMaxFontSizeMultiplier(newViewProps.maxFontSizeMultiplier.get());
|
|
472
472
|
}
|
|
473
|
-
//
|
|
473
|
+
// textWeight: optional
|
|
474
474
|
if (oldViewProps == nullptr
|
|
475
|
-
? newViewProps.
|
|
476
|
-
: !newViewProps.
|
|
477
|
-
swiftPart.
|
|
475
|
+
? newViewProps.textWeight.isProvided()
|
|
476
|
+
: !newViewProps.textWeight.hasSameValue(oldViewProps->textWeight)) {
|
|
477
|
+
swiftPart.setTextWeight(newViewProps.textWeight.get());
|
|
478
478
|
}
|
|
479
|
-
//
|
|
479
|
+
// textFamily: optional
|
|
480
480
|
if (oldViewProps == nullptr
|
|
481
|
-
? newViewProps.
|
|
482
|
-
: !newViewProps.
|
|
483
|
-
swiftPart.
|
|
481
|
+
? newViewProps.textFamily.isProvided()
|
|
482
|
+
: !newViewProps.textFamily.hasSameValue(oldViewProps->textFamily)) {
|
|
483
|
+
swiftPart.setTextFamily(newViewProps.textFamily.get());
|
|
484
484
|
}
|
|
485
|
-
//
|
|
485
|
+
// textColor: optional
|
|
486
486
|
if (oldViewProps == nullptr
|
|
487
|
-
? newViewProps.
|
|
488
|
-
: !newViewProps.
|
|
489
|
-
swiftPart.
|
|
487
|
+
? newViewProps.textColor.isProvided()
|
|
488
|
+
: !newViewProps.textColor.hasSameValue(oldViewProps->textColor)) {
|
|
489
|
+
swiftPart.setTextColor(newViewProps.textColor.get());
|
|
490
490
|
}
|
|
491
|
-
//
|
|
491
|
+
// textAlignment: optional
|
|
492
492
|
if (oldViewProps == nullptr
|
|
493
|
-
? newViewProps.
|
|
494
|
-
: !newViewProps.
|
|
495
|
-
swiftPart.
|
|
493
|
+
? newViewProps.textAlignment.isProvided()
|
|
494
|
+
: !newViewProps.textAlignment.hasSameValue(oldViewProps->textAlignment)) {
|
|
495
|
+
swiftPart.setTextAlignment(newViewProps.textAlignment.get());
|
|
496
496
|
}
|
|
497
497
|
// rightToLeft: optional
|
|
498
498
|
if (oldViewProps == nullptr
|
|
@@ -104,41 +104,41 @@ using namespace margelo::nitro::nitroinput::views;
|
|
|
104
104
|
: !newViewProps.text.hasSameValue(oldViewProps->text)) {
|
|
105
105
|
swiftPart.setText(newViewProps.text.get());
|
|
106
106
|
}
|
|
107
|
-
//
|
|
107
|
+
// textSize: optional
|
|
108
108
|
if (oldViewProps == nullptr
|
|
109
|
-
? newViewProps.
|
|
110
|
-
: !newViewProps.
|
|
111
|
-
swiftPart.
|
|
109
|
+
? newViewProps.textSize.isProvided()
|
|
110
|
+
: !newViewProps.textSize.hasSameValue(oldViewProps->textSize)) {
|
|
111
|
+
swiftPart.setTextSize(newViewProps.textSize.get());
|
|
112
112
|
}
|
|
113
|
-
//
|
|
113
|
+
// textWeight: optional
|
|
114
114
|
if (oldViewProps == nullptr
|
|
115
|
-
? newViewProps.
|
|
116
|
-
: !newViewProps.
|
|
117
|
-
swiftPart.
|
|
115
|
+
? newViewProps.textWeight.isProvided()
|
|
116
|
+
: !newViewProps.textWeight.hasSameValue(oldViewProps->textWeight)) {
|
|
117
|
+
swiftPart.setTextWeight(newViewProps.textWeight.get());
|
|
118
118
|
}
|
|
119
|
-
//
|
|
119
|
+
// textFamily: optional
|
|
120
120
|
if (oldViewProps == nullptr
|
|
121
|
-
? newViewProps.
|
|
122
|
-
: !newViewProps.
|
|
123
|
-
swiftPart.
|
|
121
|
+
? newViewProps.textFamily.isProvided()
|
|
122
|
+
: !newViewProps.textFamily.hasSameValue(oldViewProps->textFamily)) {
|
|
123
|
+
swiftPart.setTextFamily(newViewProps.textFamily.get());
|
|
124
124
|
}
|
|
125
|
-
//
|
|
125
|
+
// textColor: optional
|
|
126
126
|
if (oldViewProps == nullptr
|
|
127
|
-
? newViewProps.
|
|
128
|
-
: !newViewProps.
|
|
129
|
-
swiftPart.
|
|
127
|
+
? newViewProps.textColor.isProvided()
|
|
128
|
+
: !newViewProps.textColor.hasSameValue(oldViewProps->textColor)) {
|
|
129
|
+
swiftPart.setTextColor(newViewProps.textColor.get());
|
|
130
130
|
}
|
|
131
|
-
//
|
|
131
|
+
// textLetterSpacing: optional
|
|
132
132
|
if (oldViewProps == nullptr
|
|
133
|
-
? newViewProps.
|
|
134
|
-
: !newViewProps.
|
|
135
|
-
swiftPart.
|
|
133
|
+
? newViewProps.textLetterSpacing.isProvided()
|
|
134
|
+
: !newViewProps.textLetterSpacing.hasSameValue(oldViewProps->textLetterSpacing)) {
|
|
135
|
+
swiftPart.setTextLetterSpacing(newViewProps.textLetterSpacing.get());
|
|
136
136
|
}
|
|
137
|
-
//
|
|
137
|
+
// textAlignment: optional
|
|
138
138
|
if (oldViewProps == nullptr
|
|
139
|
-
? newViewProps.
|
|
140
|
-
: !newViewProps.
|
|
141
|
-
swiftPart.
|
|
139
|
+
? newViewProps.textAlignment.isProvided()
|
|
140
|
+
: !newViewProps.textAlignment.hasSameValue(oldViewProps->textAlignment)) {
|
|
141
|
+
swiftPart.setTextAlignment(newViewProps.textAlignment.get());
|
|
142
142
|
}
|
|
143
143
|
// rightToLeft: optional
|
|
144
144
|
if (oldViewProps == nullptr
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroInputMeasureSpec.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/// See ``HybridNitroInputMeasureSpec``
|
|
11
|
+
public protocol HybridNitroInputMeasureSpec_protocol: HybridObject {
|
|
12
|
+
// Properties
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// Methods
|
|
16
|
+
func measure(sizing: NitroInputSizing) throws -> NitroInputSize
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public extension HybridNitroInputMeasureSpec_protocol {
|
|
20
|
+
/// Default implementation of ``HybridObject.toString``
|
|
21
|
+
func toString() -> String {
|
|
22
|
+
return "[HybridObject NitroInputMeasure]"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/// See ``HybridNitroInputMeasureSpec``
|
|
27
|
+
open class HybridNitroInputMeasureSpec_base {
|
|
28
|
+
private weak var cxxWrapper: HybridNitroInputMeasureSpec_cxx? = nil
|
|
29
|
+
public init() { }
|
|
30
|
+
public func getCxxWrapper() -> HybridNitroInputMeasureSpec_cxx {
|
|
31
|
+
#if DEBUG
|
|
32
|
+
guard self is any HybridNitroInputMeasureSpec else {
|
|
33
|
+
fatalError("`self` is not a `HybridNitroInputMeasureSpec`! Did you accidentally inherit from `HybridNitroInputMeasureSpec_base` instead of `HybridNitroInputMeasureSpec`?")
|
|
34
|
+
}
|
|
35
|
+
#endif
|
|
36
|
+
if let cxxWrapper = self.cxxWrapper {
|
|
37
|
+
return cxxWrapper
|
|
38
|
+
} else {
|
|
39
|
+
let cxxWrapper = HybridNitroInputMeasureSpec_cxx(self as! any HybridNitroInputMeasureSpec)
|
|
40
|
+
self.cxxWrapper = cxxWrapper
|
|
41
|
+
return cxxWrapper
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A Swift base-protocol representing the NitroInputMeasure HybridObject.
|
|
48
|
+
* Implement this protocol to create Swift-based instances of NitroInputMeasure.
|
|
49
|
+
* ```swift
|
|
50
|
+
* class HybridNitroInputMeasure : HybridNitroInputMeasureSpec {
|
|
51
|
+
* // ...
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
public typealias HybridNitroInputMeasureSpec = HybridNitroInputMeasureSpec_protocol & HybridNitroInputMeasureSpec_base
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroInputMeasureSpec_cxx.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A class implementation that bridges HybridNitroInputMeasureSpec over to C++.
|
|
12
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
13
|
+
*
|
|
14
|
+
* Also, some Swift types need to be bridged with special handling:
|
|
15
|
+
* - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
|
|
16
|
+
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
17
|
+
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
18
|
+
*/
|
|
19
|
+
open class HybridNitroInputMeasureSpec_cxx {
|
|
20
|
+
/**
|
|
21
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::nitroinput::bridge::swift`)
|
|
22
|
+
* from `NitroInput-Swift-Cxx-Bridge.hpp`.
|
|
23
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
24
|
+
*/
|
|
25
|
+
public typealias bridge = margelo.nitro.nitroinput.bridge.swift
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Holds an instance of the `HybridNitroInputMeasureSpec` Swift protocol.
|
|
29
|
+
*/
|
|
30
|
+
private var __implementation: any HybridNitroInputMeasureSpec
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
34
|
+
*/
|
|
35
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridNitroInputMeasureSpec_
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Create a new `HybridNitroInputMeasureSpec_cxx` that wraps the given `HybridNitroInputMeasureSpec`.
|
|
39
|
+
* All properties and methods bridge to C++ types.
|
|
40
|
+
*/
|
|
41
|
+
public init(_ implementation: any HybridNitroInputMeasureSpec) {
|
|
42
|
+
self.__implementation = implementation
|
|
43
|
+
self.__cxxPart = .init()
|
|
44
|
+
/* no base class */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get the actual `HybridNitroInputMeasureSpec` instance this class wraps.
|
|
49
|
+
*/
|
|
50
|
+
@inline(__always)
|
|
51
|
+
public func getHybridNitroInputMeasureSpec() -> any HybridNitroInputMeasureSpec {
|
|
52
|
+
return __implementation
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
57
|
+
* This acquires one additional strong reference on the object!
|
|
58
|
+
*/
|
|
59
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
60
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Casts an unsafe pointer to a `HybridNitroInputMeasureSpec_cxx`.
|
|
65
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridNitroInputMeasureSpec_cxx>`.
|
|
66
|
+
* This removes one strong reference from the object!
|
|
67
|
+
*/
|
|
68
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridNitroInputMeasureSpec_cxx {
|
|
69
|
+
return Unmanaged<HybridNitroInputMeasureSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
74
|
+
* The C++ part is a `std::shared_ptr<HybridNitroInputMeasureSpec>`.
|
|
75
|
+
*/
|
|
76
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridNitroInputMeasureSpec_ {
|
|
77
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
78
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
79
|
+
return cachedCxxPart
|
|
80
|
+
} else {
|
|
81
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridNitroInputMeasureSpec_(self.toUnsafe())
|
|
82
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridNitroInputMeasureSpec_(newCxxPart)
|
|
83
|
+
return newCxxPart
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
91
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
92
|
+
*/
|
|
93
|
+
@inline(__always)
|
|
94
|
+
public var memorySize: Int {
|
|
95
|
+
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Compares this object with the given [other] object for reference equality.
|
|
100
|
+
*/
|
|
101
|
+
@inline(__always)
|
|
102
|
+
public func equals(other: HybridNitroInputMeasureSpec_cxx) -> Bool {
|
|
103
|
+
return self.__implementation === other.__implementation
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Call dispose() on the Swift class.
|
|
108
|
+
* This _may_ be called manually from JS.
|
|
109
|
+
*/
|
|
110
|
+
@inline(__always)
|
|
111
|
+
public func dispose() {
|
|
112
|
+
self.__implementation.dispose()
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Call toString() on the Swift class.
|
|
117
|
+
*/
|
|
118
|
+
@inline(__always)
|
|
119
|
+
public func toString() -> String {
|
|
120
|
+
return self.__implementation.toString()
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Properties
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
// Methods
|
|
127
|
+
@inline(__always)
|
|
128
|
+
public final func measure(sizing: NitroInputSizing) -> bridge.Result_NitroInputSize_ {
|
|
129
|
+
do {
|
|
130
|
+
let __result = try self.__implementation.measure(sizing: sizing)
|
|
131
|
+
let __resultCpp = __result
|
|
132
|
+
return bridge.create_Result_NitroInputSize_(__resultCpp)
|
|
133
|
+
} catch (let __error) {
|
|
134
|
+
let __exceptionPtr = __error.toCpp()
|
|
135
|
+
return bridge.create_Result_NitroInputSize_(__exceptionPtr)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -46,7 +46,7 @@ public protocol HybridNitroInputViewSpec_protocol: HybridObject, HybridView {
|
|
|
46
46
|
var signPlacement: NitroInputSignPlacement { get set }
|
|
47
47
|
var prefixAlign: NitroInputAffixAlign { get set }
|
|
48
48
|
var suffixAlign: NitroInputAffixAlign { get set }
|
|
49
|
-
var
|
|
49
|
+
var textLetterSpacing: Double { get set }
|
|
50
50
|
var prefixSpacing: Double { get set }
|
|
51
51
|
var suffixSpacing: Double { get set }
|
|
52
52
|
var prefixOffset: Double { get set }
|
|
@@ -57,12 +57,12 @@ public protocol HybridNitroInputViewSpec_protocol: HybridObject, HybridView {
|
|
|
57
57
|
var easing: NitroInputEasing { get set }
|
|
58
58
|
var bounce: Double { get set }
|
|
59
59
|
var effect: NitroInputEffect { get set }
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
65
|
-
var
|
|
60
|
+
var textSize: Double { get set }
|
|
61
|
+
var textLineHeight: Double { get set }
|
|
62
|
+
var textWeight: Double { get set }
|
|
63
|
+
var textFamily: String { get set }
|
|
64
|
+
var textColor: Double { get set }
|
|
65
|
+
var textAlignment: NitroInputTextAlign { get set }
|
|
66
66
|
var rightToLeft: Bool { get set }
|
|
67
67
|
var caretColor: Double { get set }
|
|
68
68
|
var selectionColor: Double { get set }
|
|
@@ -78,7 +78,11 @@ public protocol HybridNitroInputViewSpec_protocol: HybridObject, HybridView {
|
|
|
78
78
|
var editable: Bool { get set }
|
|
79
79
|
var multiline: Bool { get set }
|
|
80
80
|
var numberOfLines: Double { get set }
|
|
81
|
-
var
|
|
81
|
+
var textVerticalAlignment: NitroInputTextAlignVertical { get set }
|
|
82
|
+
var textInsetLeft: Double { get set }
|
|
83
|
+
var textInsetTop: Double { get set }
|
|
84
|
+
var textInsetRight: Double { get set }
|
|
85
|
+
var textInsetBottom: Double { get set }
|
|
82
86
|
var scrollEnabled: Bool { get set }
|
|
83
87
|
var autoFocus: Bool { get set }
|
|
84
88
|
var fieldTestID: String { get set }
|
|
@@ -535,14 +535,14 @@ open class HybridNitroInputViewSpec_cxx {
|
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
-
public final var
|
|
538
|
+
public final var textLetterSpacing: Double {
|
|
539
539
|
@inline(__always)
|
|
540
540
|
get {
|
|
541
|
-
return self.__implementation.
|
|
541
|
+
return self.__implementation.textLetterSpacing
|
|
542
542
|
}
|
|
543
543
|
@inline(__always)
|
|
544
544
|
set {
|
|
545
|
-
self.__implementation.
|
|
545
|
+
self.__implementation.textLetterSpacing = newValue
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
|
|
@@ -656,69 +656,69 @@ open class HybridNitroInputViewSpec_cxx {
|
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
|
|
659
|
-
public final var
|
|
659
|
+
public final var textSize: Double {
|
|
660
660
|
@inline(__always)
|
|
661
661
|
get {
|
|
662
|
-
return self.__implementation.
|
|
662
|
+
return self.__implementation.textSize
|
|
663
663
|
}
|
|
664
664
|
@inline(__always)
|
|
665
665
|
set {
|
|
666
|
-
self.__implementation.
|
|
666
|
+
self.__implementation.textSize = newValue
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
public final var
|
|
670
|
+
public final var textLineHeight: Double {
|
|
671
671
|
@inline(__always)
|
|
672
672
|
get {
|
|
673
|
-
return self.__implementation.
|
|
673
|
+
return self.__implementation.textLineHeight
|
|
674
674
|
}
|
|
675
675
|
@inline(__always)
|
|
676
676
|
set {
|
|
677
|
-
self.__implementation.
|
|
677
|
+
self.__implementation.textLineHeight = newValue
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
680
|
|
|
681
|
-
public final var
|
|
681
|
+
public final var textWeight: Double {
|
|
682
682
|
@inline(__always)
|
|
683
683
|
get {
|
|
684
|
-
return self.__implementation.
|
|
684
|
+
return self.__implementation.textWeight
|
|
685
685
|
}
|
|
686
686
|
@inline(__always)
|
|
687
687
|
set {
|
|
688
|
-
self.__implementation.
|
|
688
|
+
self.__implementation.textWeight = newValue
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
|
|
692
|
-
public final var
|
|
692
|
+
public final var textFamily: std.string {
|
|
693
693
|
@inline(__always)
|
|
694
694
|
get {
|
|
695
|
-
return std.string(self.__implementation.
|
|
695
|
+
return std.string(self.__implementation.textFamily)
|
|
696
696
|
}
|
|
697
697
|
@inline(__always)
|
|
698
698
|
set {
|
|
699
|
-
self.__implementation.
|
|
699
|
+
self.__implementation.textFamily = String(newValue)
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
|
|
703
|
-
public final var
|
|
703
|
+
public final var textColor: Double {
|
|
704
704
|
@inline(__always)
|
|
705
705
|
get {
|
|
706
|
-
return self.__implementation.
|
|
706
|
+
return self.__implementation.textColor
|
|
707
707
|
}
|
|
708
708
|
@inline(__always)
|
|
709
709
|
set {
|
|
710
|
-
self.__implementation.
|
|
710
|
+
self.__implementation.textColor = newValue
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
-
public final var
|
|
714
|
+
public final var textAlignment: Int32 {
|
|
715
715
|
@inline(__always)
|
|
716
716
|
get {
|
|
717
|
-
return self.__implementation.
|
|
717
|
+
return self.__implementation.textAlignment.rawValue
|
|
718
718
|
}
|
|
719
719
|
@inline(__always)
|
|
720
720
|
set {
|
|
721
|
-
self.__implementation.
|
|
721
|
+
self.__implementation.textAlignment = margelo.nitro.nitroinput.NitroInputTextAlign(rawValue: newValue)!
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
|
|
@@ -887,14 +887,58 @@ open class HybridNitroInputViewSpec_cxx {
|
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
-
public final var
|
|
890
|
+
public final var textVerticalAlignment: Int32 {
|
|
891
891
|
@inline(__always)
|
|
892
892
|
get {
|
|
893
|
-
return self.__implementation.
|
|
893
|
+
return self.__implementation.textVerticalAlignment.rawValue
|
|
894
894
|
}
|
|
895
895
|
@inline(__always)
|
|
896
896
|
set {
|
|
897
|
-
self.__implementation.
|
|
897
|
+
self.__implementation.textVerticalAlignment = margelo.nitro.nitroinput.NitroInputTextAlignVertical(rawValue: newValue)!
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
public final var textInsetLeft: Double {
|
|
902
|
+
@inline(__always)
|
|
903
|
+
get {
|
|
904
|
+
return self.__implementation.textInsetLeft
|
|
905
|
+
}
|
|
906
|
+
@inline(__always)
|
|
907
|
+
set {
|
|
908
|
+
self.__implementation.textInsetLeft = newValue
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
public final var textInsetTop: Double {
|
|
913
|
+
@inline(__always)
|
|
914
|
+
get {
|
|
915
|
+
return self.__implementation.textInsetTop
|
|
916
|
+
}
|
|
917
|
+
@inline(__always)
|
|
918
|
+
set {
|
|
919
|
+
self.__implementation.textInsetTop = newValue
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
public final var textInsetRight: Double {
|
|
924
|
+
@inline(__always)
|
|
925
|
+
get {
|
|
926
|
+
return self.__implementation.textInsetRight
|
|
927
|
+
}
|
|
928
|
+
@inline(__always)
|
|
929
|
+
set {
|
|
930
|
+
self.__implementation.textInsetRight = newValue
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
public final var textInsetBottom: Double {
|
|
935
|
+
@inline(__always)
|
|
936
|
+
get {
|
|
937
|
+
return self.__implementation.textInsetBottom
|
|
938
|
+
}
|
|
939
|
+
@inline(__always)
|
|
940
|
+
set {
|
|
941
|
+
self.__implementation.textInsetBottom = newValue
|
|
898
942
|
}
|
|
899
943
|
}
|
|
900
944
|
|
|
@@ -43,13 +43,13 @@ public protocol HybridNitroNumberViewSpec_protocol: HybridObject, HybridView {
|
|
|
43
43
|
var shimmerBaseColor: Double? { get set }
|
|
44
44
|
var shimmerDirection: NitroNumberShimmerDirection? { get set }
|
|
45
45
|
var shimmerDelay: Double? { get set }
|
|
46
|
-
var
|
|
46
|
+
var textSize: Double? { get set }
|
|
47
47
|
var prefixFontSize: Double? { get set }
|
|
48
48
|
var suffixFontSize: Double? { get set }
|
|
49
49
|
var affixAlign: NitroNumberAffixAlign? { get set }
|
|
50
50
|
var prefixAlign: NitroNumberAffixAlign? { get set }
|
|
51
51
|
var suffixAlign: NitroNumberAffixAlign? { get set }
|
|
52
|
-
var
|
|
52
|
+
var textLetterSpacing: Double? { get set }
|
|
53
53
|
var prefixSpacing: Double? { get set }
|
|
54
54
|
var suffixSpacing: Double? { get set }
|
|
55
55
|
var prefixOffset: Double? { get set }
|
|
@@ -72,10 +72,10 @@ public protocol HybridNitroNumberViewSpec_protocol: HybridObject, HybridView {
|
|
|
72
72
|
var minimumFontScale: Double? { get set }
|
|
73
73
|
var allowFontScaling: Bool? { get set }
|
|
74
74
|
var maxFontSizeMultiplier: Double? { get set }
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
75
|
+
var textWeight: Double? { get set }
|
|
76
|
+
var textFamily: String? { get set }
|
|
77
|
+
var textColor: Double? { get set }
|
|
78
|
+
var textAlignment: NitroNumberTextAlign? { get set }
|
|
79
79
|
var rightToLeft: Bool? { get set }
|
|
80
80
|
var onSizeChange: ((_ width: Double, _ height: Double) -> Void)? { get set }
|
|
81
81
|
var onRevealEnd: (() -> Void)? { get set }
|