react-native-nitro-input 0.3.7 → 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 +133 -0
- package/README.md +9 -4
- package/android/CMakeLists.txt +1 -0
- 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/cpp/RollingEngine.cpp +68 -5
- package/cpp/RollingEngine.hpp +13 -0
- package/cpp/numberformat/FormatFigure.cpp +134 -0
- package/cpp/numberformat/FormatFigure.hpp +65 -0
- package/cpp/numberformat/HybridNitroNumberFormat.cpp +32 -10
- package/cpp/numberformat/HybridNitroNumberFormat.hpp +9 -1
- 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 +19 -11
- package/lib/commonjs/src/NitroText.js +6 -6
- package/lib/commonjs/src/NumberFormat.js +20 -0
- package/lib/commonjs/src/formatProps.js +57 -81
- 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 +20 -12
- package/lib/module/src/NitroText.js +6 -6
- package/lib/module/src/NumberFormat.js +18 -0
- package/lib/module/src/formatProps.js +54 -81
- package/lib/module/src/specs/NitroInputMeasure.nitro.js +1 -0
- package/lib/typescript/src/NitroInput.d.ts +9 -16
- package/lib/typescript/src/NitroNumber.d.ts +25 -7
- package/lib/typescript/src/NumberFormat.d.ts +15 -1
- package/lib/typescript/src/formatProps.d.ts +23 -18
- 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/lib/typescript/src/specs/NumberFormat.nitro.d.ts +33 -0
- 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++/HybridNitroNumberFormatSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberFormatSpec.hpp +8 -0
- 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++/NumberFigure.hpp +95 -0
- package/nitrogen/generated/shared/c++/NumberFormatLayout.hpp +112 -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 +5 -3
- package/src/NitroInput.tsx +201 -64
- package/src/NitroNumber.tsx +54 -25
- package/src/NitroText.tsx +6 -6
- package/src/NumberFormat.ts +22 -0
- package/src/formatProps.ts +59 -99
- 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
- package/src/specs/NumberFormat.nitro.ts +35 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroInputMeasureSpecSwift.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "HybridNitroInputMeasureSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridNitroInputMeasureSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace NitroInput { class HybridNitroInputMeasureSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `NitroInputSize` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::nitroinput { struct NitroInputSize; }
|
|
17
|
+
// Forward declaration of `NitroInputSizing` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::nitroinput { struct NitroInputSizing; }
|
|
19
|
+
// Forward declaration of `NitroInputMode` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputMode; }
|
|
21
|
+
// Forward declaration of `NitroInputSignPlacement` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputSignPlacement; }
|
|
23
|
+
// Forward declaration of `NitroInputNotation` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::nitroinput { struct NitroInputNotation; }
|
|
25
|
+
// Forward declaration of `NitroInputMaskAffinity` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputMaskAffinity; }
|
|
27
|
+
// Forward declaration of `NitroInputTextCase` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputTextCase; }
|
|
29
|
+
// Forward declaration of `NitroInputCharacterMapping` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::nitroinput { struct NitroInputCharacterMapping; }
|
|
31
|
+
// Forward declaration of `NitroInputVariant` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputVariant; }
|
|
33
|
+
// Forward declaration of `NitroInputLabelBehavior` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::nitroinput { enum class NitroInputLabelBehavior; }
|
|
35
|
+
|
|
36
|
+
#include "NitroInputSize.hpp"
|
|
37
|
+
#include "NitroInputSizing.hpp"
|
|
38
|
+
#include <string>
|
|
39
|
+
#include "NitroInputMode.hpp"
|
|
40
|
+
#include "NitroInputSignPlacement.hpp"
|
|
41
|
+
#include "NitroInputNotation.hpp"
|
|
42
|
+
#include <vector>
|
|
43
|
+
#include "NitroInputMaskAffinity.hpp"
|
|
44
|
+
#include "NitroInputTextCase.hpp"
|
|
45
|
+
#include "NitroInputCharacterMapping.hpp"
|
|
46
|
+
#include "NitroInputVariant.hpp"
|
|
47
|
+
#include "NitroInputLabelBehavior.hpp"
|
|
48
|
+
|
|
49
|
+
#include "NitroInput-Swift-Cxx-Umbrella.hpp"
|
|
50
|
+
|
|
51
|
+
namespace margelo::nitro::nitroinput {
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The C++ part of HybridNitroInputMeasureSpec_cxx.swift.
|
|
55
|
+
*
|
|
56
|
+
* HybridNitroInputMeasureSpecSwift (C++) accesses HybridNitroInputMeasureSpec_cxx (Swift), and might
|
|
57
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
58
|
+
*
|
|
59
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
60
|
+
* the future, HybridNitroInputMeasureSpec_cxx can directly inherit from the C++ class HybridNitroInputMeasureSpec
|
|
61
|
+
* to simplify the whole structure and memory management.
|
|
62
|
+
*/
|
|
63
|
+
class HybridNitroInputMeasureSpecSwift: public virtual HybridNitroInputMeasureSpec {
|
|
64
|
+
public:
|
|
65
|
+
// Constructor from a Swift instance
|
|
66
|
+
explicit HybridNitroInputMeasureSpecSwift(const NitroInput::HybridNitroInputMeasureSpec_cxx& swiftPart):
|
|
67
|
+
HybridObject(HybridNitroInputMeasureSpec::TAG),
|
|
68
|
+
_swiftPart(swiftPart) { }
|
|
69
|
+
|
|
70
|
+
public:
|
|
71
|
+
// Get the Swift part
|
|
72
|
+
inline NitroInput::HybridNitroInputMeasureSpec_cxx& getSwiftPart() noexcept {
|
|
73
|
+
return _swiftPart;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public:
|
|
77
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
78
|
+
return _swiftPart.getMemorySize();
|
|
79
|
+
}
|
|
80
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
81
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridNitroInputMeasureSpecSwift>(other)) {
|
|
82
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
void dispose() noexcept override {
|
|
87
|
+
_swiftPart.dispose();
|
|
88
|
+
}
|
|
89
|
+
std::string toString() override {
|
|
90
|
+
return _swiftPart.toString();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
public:
|
|
94
|
+
// Properties
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
public:
|
|
98
|
+
// Methods
|
|
99
|
+
inline NitroInputSize measure(const NitroInputSizing& sizing) override {
|
|
100
|
+
auto __result = _swiftPart.measure(std::forward<decltype(sizing)>(sizing));
|
|
101
|
+
if (__result.hasError()) [[unlikely]] {
|
|
102
|
+
std::rethrow_exception(__result.error());
|
|
103
|
+
}
|
|
104
|
+
auto __value = std::move(__result.value());
|
|
105
|
+
return __value;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
private:
|
|
109
|
+
NitroInput::HybridNitroInputMeasureSpec_cxx _swiftPart;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
} // namespace margelo::nitro::nitroinput
|
|
@@ -353,11 +353,11 @@ namespace margelo::nitro::nitroinput {
|
|
|
353
353
|
inline void setSuffixAlign(NitroInputAffixAlign suffixAlign) noexcept override {
|
|
354
354
|
_swiftPart.setSuffixAlign(static_cast<int>(suffixAlign));
|
|
355
355
|
}
|
|
356
|
-
inline double
|
|
357
|
-
return _swiftPart.
|
|
356
|
+
inline double getTextLetterSpacing() noexcept override {
|
|
357
|
+
return _swiftPart.getTextLetterSpacing();
|
|
358
358
|
}
|
|
359
|
-
inline void
|
|
360
|
-
_swiftPart.
|
|
359
|
+
inline void setTextLetterSpacing(double textLetterSpacing) noexcept override {
|
|
360
|
+
_swiftPart.setTextLetterSpacing(std::forward<decltype(textLetterSpacing)>(textLetterSpacing));
|
|
361
361
|
}
|
|
362
362
|
inline double getPrefixSpacing() noexcept override {
|
|
363
363
|
return _swiftPart.getPrefixSpacing();
|
|
@@ -422,43 +422,43 @@ namespace margelo::nitro::nitroinput {
|
|
|
422
422
|
inline void setEffect(NitroInputEffect effect) noexcept override {
|
|
423
423
|
_swiftPart.setEffect(static_cast<int>(effect));
|
|
424
424
|
}
|
|
425
|
-
inline double
|
|
426
|
-
return _swiftPart.
|
|
425
|
+
inline double getTextSize() noexcept override {
|
|
426
|
+
return _swiftPart.getTextSize();
|
|
427
427
|
}
|
|
428
|
-
inline void
|
|
429
|
-
_swiftPart.
|
|
428
|
+
inline void setTextSize(double textSize) noexcept override {
|
|
429
|
+
_swiftPart.setTextSize(std::forward<decltype(textSize)>(textSize));
|
|
430
430
|
}
|
|
431
|
-
inline double
|
|
432
|
-
return _swiftPart.
|
|
431
|
+
inline double getTextLineHeight() noexcept override {
|
|
432
|
+
return _swiftPart.getTextLineHeight();
|
|
433
433
|
}
|
|
434
|
-
inline void
|
|
435
|
-
_swiftPart.
|
|
434
|
+
inline void setTextLineHeight(double textLineHeight) noexcept override {
|
|
435
|
+
_swiftPart.setTextLineHeight(std::forward<decltype(textLineHeight)>(textLineHeight));
|
|
436
436
|
}
|
|
437
|
-
inline double
|
|
438
|
-
return _swiftPart.
|
|
437
|
+
inline double getTextWeight() noexcept override {
|
|
438
|
+
return _swiftPart.getTextWeight();
|
|
439
439
|
}
|
|
440
|
-
inline void
|
|
441
|
-
_swiftPart.
|
|
440
|
+
inline void setTextWeight(double textWeight) noexcept override {
|
|
441
|
+
_swiftPart.setTextWeight(std::forward<decltype(textWeight)>(textWeight));
|
|
442
442
|
}
|
|
443
|
-
inline std::string
|
|
444
|
-
auto __result = _swiftPart.
|
|
443
|
+
inline std::string getTextFamily() noexcept override {
|
|
444
|
+
auto __result = _swiftPart.getTextFamily();
|
|
445
445
|
return __result;
|
|
446
446
|
}
|
|
447
|
-
inline void
|
|
448
|
-
_swiftPart.
|
|
447
|
+
inline void setTextFamily(const std::string& textFamily) noexcept override {
|
|
448
|
+
_swiftPart.setTextFamily(textFamily);
|
|
449
449
|
}
|
|
450
|
-
inline double
|
|
451
|
-
return _swiftPart.
|
|
450
|
+
inline double getTextColor() noexcept override {
|
|
451
|
+
return _swiftPart.getTextColor();
|
|
452
452
|
}
|
|
453
|
-
inline void
|
|
454
|
-
_swiftPart.
|
|
453
|
+
inline void setTextColor(double textColor) noexcept override {
|
|
454
|
+
_swiftPart.setTextColor(std::forward<decltype(textColor)>(textColor));
|
|
455
455
|
}
|
|
456
|
-
inline NitroInputTextAlign
|
|
457
|
-
auto __result = _swiftPart.
|
|
456
|
+
inline NitroInputTextAlign getTextAlignment() noexcept override {
|
|
457
|
+
auto __result = _swiftPart.getTextAlignment();
|
|
458
458
|
return static_cast<NitroInputTextAlign>(__result);
|
|
459
459
|
}
|
|
460
|
-
inline void
|
|
461
|
-
_swiftPart.
|
|
460
|
+
inline void setTextAlignment(NitroInputTextAlign textAlignment) noexcept override {
|
|
461
|
+
_swiftPart.setTextAlignment(static_cast<int>(textAlignment));
|
|
462
462
|
}
|
|
463
463
|
inline bool getRightToLeft() noexcept override {
|
|
464
464
|
return _swiftPart.getRightToLeft();
|
|
@@ -553,12 +553,36 @@ namespace margelo::nitro::nitroinput {
|
|
|
553
553
|
inline void setNumberOfLines(double numberOfLines) noexcept override {
|
|
554
554
|
_swiftPart.setNumberOfLines(std::forward<decltype(numberOfLines)>(numberOfLines));
|
|
555
555
|
}
|
|
556
|
-
inline NitroInputTextAlignVertical
|
|
557
|
-
auto __result = _swiftPart.
|
|
556
|
+
inline NitroInputTextAlignVertical getTextVerticalAlignment() noexcept override {
|
|
557
|
+
auto __result = _swiftPart.getTextVerticalAlignment();
|
|
558
558
|
return static_cast<NitroInputTextAlignVertical>(__result);
|
|
559
559
|
}
|
|
560
|
-
inline void
|
|
561
|
-
_swiftPart.
|
|
560
|
+
inline void setTextVerticalAlignment(NitroInputTextAlignVertical textVerticalAlignment) noexcept override {
|
|
561
|
+
_swiftPart.setTextVerticalAlignment(static_cast<int>(textVerticalAlignment));
|
|
562
|
+
}
|
|
563
|
+
inline double getTextInsetLeft() noexcept override {
|
|
564
|
+
return _swiftPart.getTextInsetLeft();
|
|
565
|
+
}
|
|
566
|
+
inline void setTextInsetLeft(double textInsetLeft) noexcept override {
|
|
567
|
+
_swiftPart.setTextInsetLeft(std::forward<decltype(textInsetLeft)>(textInsetLeft));
|
|
568
|
+
}
|
|
569
|
+
inline double getTextInsetTop() noexcept override {
|
|
570
|
+
return _swiftPart.getTextInsetTop();
|
|
571
|
+
}
|
|
572
|
+
inline void setTextInsetTop(double textInsetTop) noexcept override {
|
|
573
|
+
_swiftPart.setTextInsetTop(std::forward<decltype(textInsetTop)>(textInsetTop));
|
|
574
|
+
}
|
|
575
|
+
inline double getTextInsetRight() noexcept override {
|
|
576
|
+
return _swiftPart.getTextInsetRight();
|
|
577
|
+
}
|
|
578
|
+
inline void setTextInsetRight(double textInsetRight) noexcept override {
|
|
579
|
+
_swiftPart.setTextInsetRight(std::forward<decltype(textInsetRight)>(textInsetRight));
|
|
580
|
+
}
|
|
581
|
+
inline double getTextInsetBottom() noexcept override {
|
|
582
|
+
return _swiftPart.getTextInsetBottom();
|
|
583
|
+
}
|
|
584
|
+
inline void setTextInsetBottom(double textInsetBottom) noexcept override {
|
|
585
|
+
_swiftPart.setTextInsetBottom(std::forward<decltype(textInsetBottom)>(textInsetBottom));
|
|
562
586
|
}
|
|
563
587
|
inline bool getScrollEnabled() noexcept override {
|
|
564
588
|
return _swiftPart.getScrollEnabled();
|
|
@@ -318,12 +318,12 @@ namespace margelo::nitro::nitroinput {
|
|
|
318
318
|
inline void setShimmerDelay(std::optional<double> shimmerDelay) noexcept override {
|
|
319
319
|
_swiftPart.setShimmerDelay(shimmerDelay);
|
|
320
320
|
}
|
|
321
|
-
inline std::optional<double>
|
|
322
|
-
auto __result = _swiftPart.
|
|
321
|
+
inline std::optional<double> getTextSize() noexcept override {
|
|
322
|
+
auto __result = _swiftPart.getTextSize();
|
|
323
323
|
return __result;
|
|
324
324
|
}
|
|
325
|
-
inline void
|
|
326
|
-
_swiftPart.
|
|
325
|
+
inline void setTextSize(std::optional<double> textSize) noexcept override {
|
|
326
|
+
_swiftPart.setTextSize(textSize);
|
|
327
327
|
}
|
|
328
328
|
inline std::optional<double> getPrefixFontSize() noexcept override {
|
|
329
329
|
auto __result = _swiftPart.getPrefixFontSize();
|
|
@@ -360,12 +360,12 @@ namespace margelo::nitro::nitroinput {
|
|
|
360
360
|
inline void setSuffixAlign(std::optional<NitroNumberAffixAlign> suffixAlign) noexcept override {
|
|
361
361
|
_swiftPart.setSuffixAlign(suffixAlign);
|
|
362
362
|
}
|
|
363
|
-
inline std::optional<double>
|
|
364
|
-
auto __result = _swiftPart.
|
|
363
|
+
inline std::optional<double> getTextLetterSpacing() noexcept override {
|
|
364
|
+
auto __result = _swiftPart.getTextLetterSpacing();
|
|
365
365
|
return __result;
|
|
366
366
|
}
|
|
367
|
-
inline void
|
|
368
|
-
_swiftPart.
|
|
367
|
+
inline void setTextLetterSpacing(std::optional<double> textLetterSpacing) noexcept override {
|
|
368
|
+
_swiftPart.setTextLetterSpacing(textLetterSpacing);
|
|
369
369
|
}
|
|
370
370
|
inline std::optional<double> getPrefixSpacing() noexcept override {
|
|
371
371
|
auto __result = _swiftPart.getPrefixSpacing();
|
|
@@ -521,33 +521,33 @@ namespace margelo::nitro::nitroinput {
|
|
|
521
521
|
inline void setMaxFontSizeMultiplier(std::optional<double> maxFontSizeMultiplier) noexcept override {
|
|
522
522
|
_swiftPart.setMaxFontSizeMultiplier(maxFontSizeMultiplier);
|
|
523
523
|
}
|
|
524
|
-
inline std::optional<double>
|
|
525
|
-
auto __result = _swiftPart.
|
|
524
|
+
inline std::optional<double> getTextWeight() noexcept override {
|
|
525
|
+
auto __result = _swiftPart.getTextWeight();
|
|
526
526
|
return __result;
|
|
527
527
|
}
|
|
528
|
-
inline void
|
|
529
|
-
_swiftPart.
|
|
528
|
+
inline void setTextWeight(std::optional<double> textWeight) noexcept override {
|
|
529
|
+
_swiftPart.setTextWeight(textWeight);
|
|
530
530
|
}
|
|
531
|
-
inline std::optional<std::string>
|
|
532
|
-
auto __result = _swiftPart.
|
|
531
|
+
inline std::optional<std::string> getTextFamily() noexcept override {
|
|
532
|
+
auto __result = _swiftPart.getTextFamily();
|
|
533
533
|
return __result;
|
|
534
534
|
}
|
|
535
|
-
inline void
|
|
536
|
-
_swiftPart.
|
|
535
|
+
inline void setTextFamily(const std::optional<std::string>& textFamily) noexcept override {
|
|
536
|
+
_swiftPart.setTextFamily(textFamily);
|
|
537
537
|
}
|
|
538
|
-
inline std::optional<double>
|
|
539
|
-
auto __result = _swiftPart.
|
|
538
|
+
inline std::optional<double> getTextColor() noexcept override {
|
|
539
|
+
auto __result = _swiftPart.getTextColor();
|
|
540
540
|
return __result;
|
|
541
541
|
}
|
|
542
|
-
inline void
|
|
543
|
-
_swiftPart.
|
|
542
|
+
inline void setTextColor(std::optional<double> textColor) noexcept override {
|
|
543
|
+
_swiftPart.setTextColor(textColor);
|
|
544
544
|
}
|
|
545
|
-
inline std::optional<NitroNumberTextAlign>
|
|
546
|
-
auto __result = _swiftPart.
|
|
545
|
+
inline std::optional<NitroNumberTextAlign> getTextAlignment() noexcept override {
|
|
546
|
+
auto __result = _swiftPart.getTextAlignment();
|
|
547
547
|
return __result;
|
|
548
548
|
}
|
|
549
|
-
inline void
|
|
550
|
-
_swiftPart.
|
|
549
|
+
inline void setTextAlignment(std::optional<NitroNumberTextAlign> textAlignment) noexcept override {
|
|
550
|
+
_swiftPart.setTextAlignment(textAlignment);
|
|
551
551
|
}
|
|
552
552
|
inline std::optional<bool> getRightToLeft() noexcept override {
|
|
553
553
|
auto __result = _swiftPart.getRightToLeft();
|
|
@@ -81,47 +81,47 @@ namespace margelo::nitro::nitroinput {
|
|
|
81
81
|
inline void setText(const std::string& text) noexcept override {
|
|
82
82
|
_swiftPart.setText(text);
|
|
83
83
|
}
|
|
84
|
-
inline std::optional<double>
|
|
85
|
-
auto __result = _swiftPart.
|
|
84
|
+
inline std::optional<double> getTextSize() noexcept override {
|
|
85
|
+
auto __result = _swiftPart.getTextSize();
|
|
86
86
|
return __result;
|
|
87
87
|
}
|
|
88
|
-
inline void
|
|
89
|
-
_swiftPart.
|
|
88
|
+
inline void setTextSize(std::optional<double> textSize) noexcept override {
|
|
89
|
+
_swiftPart.setTextSize(textSize);
|
|
90
90
|
}
|
|
91
|
-
inline std::optional<double>
|
|
92
|
-
auto __result = _swiftPart.
|
|
91
|
+
inline std::optional<double> getTextWeight() noexcept override {
|
|
92
|
+
auto __result = _swiftPart.getTextWeight();
|
|
93
93
|
return __result;
|
|
94
94
|
}
|
|
95
|
-
inline void
|
|
96
|
-
_swiftPart.
|
|
95
|
+
inline void setTextWeight(std::optional<double> textWeight) noexcept override {
|
|
96
|
+
_swiftPart.setTextWeight(textWeight);
|
|
97
97
|
}
|
|
98
|
-
inline std::optional<std::string>
|
|
99
|
-
auto __result = _swiftPart.
|
|
98
|
+
inline std::optional<std::string> getTextFamily() noexcept override {
|
|
99
|
+
auto __result = _swiftPart.getTextFamily();
|
|
100
100
|
return __result;
|
|
101
101
|
}
|
|
102
|
-
inline void
|
|
103
|
-
_swiftPart.
|
|
102
|
+
inline void setTextFamily(const std::optional<std::string>& textFamily) noexcept override {
|
|
103
|
+
_swiftPart.setTextFamily(textFamily);
|
|
104
104
|
}
|
|
105
|
-
inline std::optional<double>
|
|
106
|
-
auto __result = _swiftPart.
|
|
105
|
+
inline std::optional<double> getTextColor() noexcept override {
|
|
106
|
+
auto __result = _swiftPart.getTextColor();
|
|
107
107
|
return __result;
|
|
108
108
|
}
|
|
109
|
-
inline void
|
|
110
|
-
_swiftPart.
|
|
109
|
+
inline void setTextColor(std::optional<double> textColor) noexcept override {
|
|
110
|
+
_swiftPart.setTextColor(textColor);
|
|
111
111
|
}
|
|
112
|
-
inline std::optional<double>
|
|
113
|
-
auto __result = _swiftPart.
|
|
112
|
+
inline std::optional<double> getTextLetterSpacing() noexcept override {
|
|
113
|
+
auto __result = _swiftPart.getTextLetterSpacing();
|
|
114
114
|
return __result;
|
|
115
115
|
}
|
|
116
|
-
inline void
|
|
117
|
-
_swiftPart.
|
|
116
|
+
inline void setTextLetterSpacing(std::optional<double> textLetterSpacing) noexcept override {
|
|
117
|
+
_swiftPart.setTextLetterSpacing(textLetterSpacing);
|
|
118
118
|
}
|
|
119
|
-
inline std::optional<NitroNumberTextAlign>
|
|
120
|
-
auto __result = _swiftPart.
|
|
119
|
+
inline std::optional<NitroNumberTextAlign> getTextAlignment() noexcept override {
|
|
120
|
+
auto __result = _swiftPart.getTextAlignment();
|
|
121
121
|
return __result;
|
|
122
122
|
}
|
|
123
|
-
inline void
|
|
124
|
-
_swiftPart.
|
|
123
|
+
inline void setTextAlignment(std::optional<NitroNumberTextAlign> textAlignment) noexcept override {
|
|
124
|
+
_swiftPart.setTextAlignment(textAlignment);
|
|
125
125
|
}
|
|
126
126
|
inline std::optional<bool> getRightToLeft() noexcept override {
|
|
127
127
|
auto __result = _swiftPart.getRightToLeft();
|
|
@@ -314,11 +314,11 @@ using namespace margelo::nitro::nitroinput::views;
|
|
|
314
314
|
: !newViewProps.suffixAlign.hasSameValue(oldViewProps->suffixAlign)) {
|
|
315
315
|
swiftPart.setSuffixAlign(static_cast<int>(newViewProps.suffixAlign.get()));
|
|
316
316
|
}
|
|
317
|
-
//
|
|
317
|
+
// textLetterSpacing: number
|
|
318
318
|
if (oldViewProps == nullptr
|
|
319
|
-
? newViewProps.
|
|
320
|
-
: !newViewProps.
|
|
321
|
-
swiftPart.
|
|
319
|
+
? newViewProps.textLetterSpacing.isProvided()
|
|
320
|
+
: !newViewProps.textLetterSpacing.hasSameValue(oldViewProps->textLetterSpacing)) {
|
|
321
|
+
swiftPart.setTextLetterSpacing(newViewProps.textLetterSpacing.get());
|
|
322
322
|
}
|
|
323
323
|
// prefixSpacing: number
|
|
324
324
|
if (oldViewProps == nullptr
|
|
@@ -380,41 +380,41 @@ using namespace margelo::nitro::nitroinput::views;
|
|
|
380
380
|
: !newViewProps.effect.hasSameValue(oldViewProps->effect)) {
|
|
381
381
|
swiftPart.setEffect(static_cast<int>(newViewProps.effect.get()));
|
|
382
382
|
}
|
|
383
|
-
//
|
|
383
|
+
// textSize: number
|
|
384
384
|
if (oldViewProps == nullptr
|
|
385
|
-
? newViewProps.
|
|
386
|
-
: !newViewProps.
|
|
387
|
-
swiftPart.
|
|
385
|
+
? newViewProps.textSize.isProvided()
|
|
386
|
+
: !newViewProps.textSize.hasSameValue(oldViewProps->textSize)) {
|
|
387
|
+
swiftPart.setTextSize(newViewProps.textSize.get());
|
|
388
388
|
}
|
|
389
|
-
//
|
|
389
|
+
// textLineHeight: number
|
|
390
390
|
if (oldViewProps == nullptr
|
|
391
|
-
? newViewProps.
|
|
392
|
-
: !newViewProps.
|
|
393
|
-
swiftPart.
|
|
391
|
+
? newViewProps.textLineHeight.isProvided()
|
|
392
|
+
: !newViewProps.textLineHeight.hasSameValue(oldViewProps->textLineHeight)) {
|
|
393
|
+
swiftPart.setTextLineHeight(newViewProps.textLineHeight.get());
|
|
394
394
|
}
|
|
395
|
-
//
|
|
395
|
+
// textWeight: number
|
|
396
396
|
if (oldViewProps == nullptr
|
|
397
|
-
? newViewProps.
|
|
398
|
-
: !newViewProps.
|
|
399
|
-
swiftPart.
|
|
397
|
+
? newViewProps.textWeight.isProvided()
|
|
398
|
+
: !newViewProps.textWeight.hasSameValue(oldViewProps->textWeight)) {
|
|
399
|
+
swiftPart.setTextWeight(newViewProps.textWeight.get());
|
|
400
400
|
}
|
|
401
|
-
//
|
|
401
|
+
// textFamily: string
|
|
402
402
|
if (oldViewProps == nullptr
|
|
403
|
-
? newViewProps.
|
|
404
|
-
: !newViewProps.
|
|
405
|
-
swiftPart.
|
|
403
|
+
? newViewProps.textFamily.isProvided()
|
|
404
|
+
: !newViewProps.textFamily.hasSameValue(oldViewProps->textFamily)) {
|
|
405
|
+
swiftPart.setTextFamily(newViewProps.textFamily.get());
|
|
406
406
|
}
|
|
407
|
-
//
|
|
407
|
+
// textColor: number
|
|
408
408
|
if (oldViewProps == nullptr
|
|
409
|
-
? newViewProps.
|
|
410
|
-
: !newViewProps.
|
|
411
|
-
swiftPart.
|
|
409
|
+
? newViewProps.textColor.isProvided()
|
|
410
|
+
: !newViewProps.textColor.hasSameValue(oldViewProps->textColor)) {
|
|
411
|
+
swiftPart.setTextColor(newViewProps.textColor.get());
|
|
412
412
|
}
|
|
413
|
-
//
|
|
413
|
+
// textAlignment: enum
|
|
414
414
|
if (oldViewProps == nullptr
|
|
415
|
-
? newViewProps.
|
|
416
|
-
: !newViewProps.
|
|
417
|
-
swiftPart.
|
|
415
|
+
? newViewProps.textAlignment.isProvided()
|
|
416
|
+
: !newViewProps.textAlignment.hasSameValue(oldViewProps->textAlignment)) {
|
|
417
|
+
swiftPart.setTextAlignment(static_cast<int>(newViewProps.textAlignment.get()));
|
|
418
418
|
}
|
|
419
419
|
// rightToLeft: boolean
|
|
420
420
|
if (oldViewProps == nullptr
|
|
@@ -506,11 +506,35 @@ using namespace margelo::nitro::nitroinput::views;
|
|
|
506
506
|
: !newViewProps.numberOfLines.hasSameValue(oldViewProps->numberOfLines)) {
|
|
507
507
|
swiftPart.setNumberOfLines(newViewProps.numberOfLines.get());
|
|
508
508
|
}
|
|
509
|
-
//
|
|
509
|
+
// textVerticalAlignment: enum
|
|
510
510
|
if (oldViewProps == nullptr
|
|
511
|
-
? newViewProps.
|
|
512
|
-
: !newViewProps.
|
|
513
|
-
swiftPart.
|
|
511
|
+
? newViewProps.textVerticalAlignment.isProvided()
|
|
512
|
+
: !newViewProps.textVerticalAlignment.hasSameValue(oldViewProps->textVerticalAlignment)) {
|
|
513
|
+
swiftPart.setTextVerticalAlignment(static_cast<int>(newViewProps.textVerticalAlignment.get()));
|
|
514
|
+
}
|
|
515
|
+
// textInsetLeft: number
|
|
516
|
+
if (oldViewProps == nullptr
|
|
517
|
+
? newViewProps.textInsetLeft.isProvided()
|
|
518
|
+
: !newViewProps.textInsetLeft.hasSameValue(oldViewProps->textInsetLeft)) {
|
|
519
|
+
swiftPart.setTextInsetLeft(newViewProps.textInsetLeft.get());
|
|
520
|
+
}
|
|
521
|
+
// textInsetTop: number
|
|
522
|
+
if (oldViewProps == nullptr
|
|
523
|
+
? newViewProps.textInsetTop.isProvided()
|
|
524
|
+
: !newViewProps.textInsetTop.hasSameValue(oldViewProps->textInsetTop)) {
|
|
525
|
+
swiftPart.setTextInsetTop(newViewProps.textInsetTop.get());
|
|
526
|
+
}
|
|
527
|
+
// textInsetRight: number
|
|
528
|
+
if (oldViewProps == nullptr
|
|
529
|
+
? newViewProps.textInsetRight.isProvided()
|
|
530
|
+
: !newViewProps.textInsetRight.hasSameValue(oldViewProps->textInsetRight)) {
|
|
531
|
+
swiftPart.setTextInsetRight(newViewProps.textInsetRight.get());
|
|
532
|
+
}
|
|
533
|
+
// textInsetBottom: number
|
|
534
|
+
if (oldViewProps == nullptr
|
|
535
|
+
? newViewProps.textInsetBottom.isProvided()
|
|
536
|
+
: !newViewProps.textInsetBottom.hasSameValue(oldViewProps->textInsetBottom)) {
|
|
537
|
+
swiftPart.setTextInsetBottom(newViewProps.textInsetBottom.get());
|
|
514
538
|
}
|
|
515
539
|
// scrollEnabled: boolean
|
|
516
540
|
if (oldViewProps == nullptr
|
|
@@ -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
|