react-native-nitro-input 0.2.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 +87 -0
- package/README.md +132 -2
- package/android/CMakeLists.txt +4 -0
- package/android/gradle.properties +1 -1
- 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 +43 -2
- package/android/src/main/cpp/JRollingEngine.hpp +9 -1
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroInputView.kt +20 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberFormatPlatform.kt +284 -0
- package/android/src/main/java/com/margelo/nitro/nitroinput/HybridNitroNumberView.kt +113 -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/NitroInputView.kt +69 -10
- package/android/src/main/java/com/margelo/nitro/nitroinput/NitroNumberView.kt +522 -130
- 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 +14 -2
- package/cpp/RollingEngine.cpp +102 -8
- package/cpp/RollingEngine.hpp +44 -3
- package/cpp/numberformat/HybridNitroNumberFormat.cpp +498 -0
- package/cpp/numberformat/HybridNitroNumberFormat.hpp +74 -0
- package/cpp/numberformat/HybridNitroNumberFormatFactory.hpp +11 -0
- package/cpp/numberformat/NumberFormatCore.cpp +629 -0
- package/cpp/numberformat/NumberFormatCore.hpp +154 -0
- package/cpp/numberformat/NumberFormatProbe.cpp +354 -0
- package/cpp/numberformat/NumberFormatProbe.hpp +63 -0
- package/ios/HybridNitroInputView.swift +15 -0
- package/ios/HybridNitroNumberFormatPlatform.swift +426 -0
- package/ios/HybridNitroNumberView.swift +101 -1
- package/ios/HybridNitroTextView.swift +134 -0
- package/ios/NitroInputView.swift +79 -19
- package/ios/NitroNumberView.swift +520 -147
- package/ios/NitroTextView.swift +583 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroInputViewConfig.json +5 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroNumberViewConfig.json +26 -0
- package/lib/commonjs/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/lib/commonjs/src/NitroInput.js +8 -6
- package/lib/commonjs/src/NitroNumber.js +54 -3
- package/lib/commonjs/src/NitroText.js +138 -0
- package/lib/commonjs/src/NitroTime.js +65 -0
- package/lib/commonjs/src/NumberFormat.js +525 -0
- package/lib/commonjs/src/formatProps.js +108 -0
- package/lib/commonjs/src/index.js +8 -1
- package/lib/commonjs/src/specs/NitroText.nitro.js +2 -0
- package/lib/commonjs/src/specs/NumberFormat.nitro.js +2 -0
- package/lib/module/nitrogen/generated/shared/json/NitroInputViewConfig.json +5 -0
- package/lib/module/nitrogen/generated/shared/json/NitroNumberViewConfig.json +26 -0
- package/lib/module/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/lib/module/src/NitroInput.js +8 -6
- package/lib/module/src/NitroNumber.js +54 -3
- package/lib/module/src/NitroText.js +98 -0
- package/lib/module/src/NitroTime.js +29 -0
- package/lib/module/src/NumberFormat.js +521 -0
- package/lib/module/src/formatProps.js +104 -0
- package/lib/module/src/index.js +3 -0
- package/lib/module/src/specs/NitroText.nitro.js +1 -0
- package/lib/module/src/specs/NumberFormat.nitro.js +1 -0
- package/lib/typescript/src/NitroInput.d.ts +22 -0
- package/lib/typescript/src/NitroNumber.d.ts +115 -2
- package/lib/typescript/src/NitroText.d.ts +67 -0
- package/lib/typescript/src/NitroTime.d.ts +19 -0
- package/lib/typescript/src/NumberFormat.d.ts +47 -0
- package/lib/typescript/src/formatProps.d.ts +47 -0
- package/lib/typescript/src/index.d.ts +6 -1
- package/lib/typescript/src/specs/NitroInput.nitro.d.ts +10 -0
- package/lib/typescript/src/specs/NitroNumber.nitro.d.ts +80 -1
- package/lib/typescript/src/specs/NitroText.nitro.d.ts +60 -0
- package/lib/typescript/src/specs/NumberFormat.nitro.d.ts +139 -0
- package/nitro.json +36 -0
- package/nitrogen/generated/android/NitroInput+autolinking.cmake +12 -0
- package/nitrogen/generated/android/NitroInputOnLoad.cpp +62 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.cpp +45 -0
- package/nitrogen/generated/android/c++/JHybridNitroInputViewSpec.hpp +10 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberFormatPlatformSpec.cpp +118 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberFormatPlatformSpec.hpp +64 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.cpp +297 -0
- package/nitrogen/generated/android/c++/JHybridNitroNumberViewSpec.hpp +52 -0
- package/nitrogen/generated/android/c++/JHybridNitroPlatformNumberFormatterSpec.cpp +65 -0
- package/nitrogen/generated/android/c++/JHybridNitroPlatformNumberFormatterSpec.hpp +64 -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++/JNitroNumberDirection.hpp +3 -0
- package/nitrogen/generated/android/c++/JNitroNumberShimmerDirection.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroNumberSignDisplay.hpp +67 -0
- package/nitrogen/generated/android/c++/JNumberFormatCompactDisplay.hpp +58 -0
- package/nitrogen/generated/android/c++/JNumberFormatCurrencyDisplay.hpp +64 -0
- package/nitrogen/generated/android/c++/JNumberFormatCurrencySign.hpp +58 -0
- package/nitrogen/generated/android/c++/JNumberFormatNotation.hpp +64 -0
- package/nitrogen/generated/android/c++/JNumberFormatPlatformOptions.hpp +161 -0
- package/nitrogen/generated/android/c++/JNumberFormatPlatformSymbols.hpp +89 -0
- package/nitrogen/generated/android/c++/JNumberFormatRoundingMode.hpp +79 -0
- package/nitrogen/generated/android/c++/JNumberFormatSignDisplay.hpp +67 -0
- package/nitrogen/generated/android/c++/JNumberFormatStyle.hpp +64 -0
- package/nitrogen/generated/android/c++/JNumberFormatUnitDisplay.hpp +61 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroInputViewStateUpdater.cpp +25 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroNumberViewStateUpdater.cpp +130 -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/HybridNitroInputViewSpec.kt +30 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberFormatPlatformSpec.kt +60 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroNumberViewSpec.kt +172 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/HybridNitroPlatformNumberFormatterSpec.kt +62 -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/NitroNumberDirection.kt +2 -1
- 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/NumberFormatCompactDisplay.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatCurrencyDisplay.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatCurrencySign.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatNotation.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatPlatformOptions.kt +136 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatPlatformSymbols.kt +91 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatRoundingMode.kt +30 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatSignDisplay.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatStyle.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatUnitDisplay.kt +24 -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 +68 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Bridge.hpp +184 -0
- package/nitrogen/generated/ios/NitroInput-Swift-Cxx-Umbrella.hpp +56 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.mm +34 -0
- package/nitrogen/generated/ios/NitroInputAutolinking.swift +36 -0
- package/nitrogen/generated/ios/c++/HybridNitroInputViewSpecSwift.hpp +30 -0
- package/nitrogen/generated/ios/c++/HybridNitroNumberFormatPlatformSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroNumberFormatPlatformSpecSwift.hpp +122 -0
- package/nitrogen/generated/ios/c++/HybridNitroNumberViewSpecSwift.hpp +188 -0
- package/nitrogen/generated/ios/c++/HybridNitroPlatformNumberFormatterSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroPlatformNumberFormatterSpecSwift.hpp +94 -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/HybridNitroInputViewComponent.mm +30 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroNumberViewComponent.mm +156 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroTextViewComponent.mm +264 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec.swift +5 -0
- package/nitrogen/generated/ios/swift/HybridNitroInputViewSpec_cxx.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberFormatPlatformSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberFormatPlatformSpec_cxx.swift +159 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec.swift +26 -0
- package/nitrogen/generated/ios/swift/HybridNitroNumberViewSpec_cxx.swift +658 -21
- package/nitrogen/generated/ios/swift/HybridNitroPlatformNumberFormatterSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridNitroPlatformNumberFormatterSpec_cxx.swift +155 -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/NitroNumberDirection.swift +4 -0
- package/nitrogen/generated/ios/swift/NitroNumberShimmerDirection.swift +44 -0
- package/nitrogen/generated/ios/swift/NitroNumberSignDisplay.swift +52 -0
- package/nitrogen/generated/ios/swift/NumberFormatCompactDisplay.swift +40 -0
- package/nitrogen/generated/ios/swift/NumberFormatCurrencyDisplay.swift +48 -0
- package/nitrogen/generated/ios/swift/NumberFormatCurrencySign.swift +40 -0
- package/nitrogen/generated/ios/swift/NumberFormatNotation.swift +48 -0
- package/nitrogen/generated/ios/swift/NumberFormatPlatformOptions.swift +159 -0
- package/nitrogen/generated/ios/swift/NumberFormatPlatformSymbols.swift +69 -0
- package/nitrogen/generated/ios/swift/NumberFormatRoundingMode.swift +68 -0
- package/nitrogen/generated/ios/swift/NumberFormatSignDisplay.swift +52 -0
- package/nitrogen/generated/ios/swift/NumberFormatStyle.swift +48 -0
- package/nitrogen/generated/ios/swift/NumberFormatUnitDisplay.swift +44 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.cpp +10 -0
- package/nitrogen/generated/shared/c++/HybridNitroInputViewSpec.hpp +10 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberFormatFactorySpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberFormatFactorySpec.hpp +70 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberFormatPlatformSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberFormatPlatformSpec.hpp +70 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberFormatSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberFormatSpec.hpp +71 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.cpp +52 -0
- package/nitrogen/generated/shared/c++/HybridNitroNumberViewSpec.hpp +58 -0
- package/nitrogen/generated/shared/c++/HybridNitroPlatformNumberFormatterSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridNitroPlatformNumberFormatterSpec.hpp +65 -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++/NitroNumberDirection.hpp +4 -0
- package/nitrogen/generated/shared/c++/NitroNumberShimmerDirection.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroNumberSignDisplay.hpp +88 -0
- package/nitrogen/generated/shared/c++/NumberFormatCompactDisplay.hpp +76 -0
- package/nitrogen/generated/shared/c++/NumberFormatCurrencyDisplay.hpp +84 -0
- package/nitrogen/generated/shared/c++/NumberFormatCurrencySign.hpp +76 -0
- package/nitrogen/generated/shared/c++/NumberFormatGrouping.hpp +80 -0
- package/nitrogen/generated/shared/c++/NumberFormatNotation.hpp +84 -0
- package/nitrogen/generated/shared/c++/NumberFormatOptions.hpp +193 -0
- package/nitrogen/generated/shared/c++/NumberFormatPart.hpp +87 -0
- package/nitrogen/generated/shared/c++/NumberFormatPlatformOptions.hpp +176 -0
- package/nitrogen/generated/shared/c++/NumberFormatPlatformSymbols.hpp +115 -0
- package/nitrogen/generated/shared/c++/NumberFormatRoundingMode.hpp +104 -0
- package/nitrogen/generated/shared/c++/NumberFormatRoundingPriority.hpp +80 -0
- package/nitrogen/generated/shared/c++/NumberFormatSignDisplay.hpp +88 -0
- package/nitrogen/generated/shared/c++/NumberFormatStyle.hpp +84 -0
- package/nitrogen/generated/shared/c++/NumberFormatTrailingZeroDisplay.hpp +76 -0
- package/nitrogen/generated/shared/c++/NumberFormatUnitDisplay.hpp +80 -0
- package/nitrogen/generated/shared/c++/ResolvedNumberFormatOptions.hpp +197 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.cpp +10 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroInputViewComponent.hpp +15 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.cpp +52 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroNumberViewComponent.hpp +80 -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/NitroInputViewConfig.json +5 -0
- package/nitrogen/generated/shared/json/NitroNumberViewConfig.json +26 -0
- package/nitrogen/generated/shared/json/NitroTextViewConfig.json +30 -0
- package/package.json +2 -2
- package/src/NitroInput.tsx +42 -7
- package/src/NitroNumber.tsx +236 -12
- package/src/NitroText.tsx +166 -0
- package/src/NitroTime.tsx +68 -0
- package/src/NumberFormat.ts +563 -0
- package/src/formatProps.ts +149 -0
- package/src/index.ts +23 -0
- package/src/specs/NitroInput.nitro.ts +10 -0
- package/src/specs/NitroNumber.nitro.ts +82 -1
- package/src/specs/NitroText.nitro.ts +65 -0
- package/src/specs/NumberFormat.nitro.ts +145 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NumberFormatPlatformOptions.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
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "NumberFormatPlatformOptions".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class NumberFormatPlatformOptions(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val locales: Array<String>,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val numberingSystem: String?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val style: NumberFormatStyle,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val currency: String?,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val currencyDisplay: NumberFormatCurrencyDisplay,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val currencySign: NumberFormatCurrencySign,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val unit: String?,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val unitDisplay: NumberFormatUnitDisplay,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val notation: NumberFormatNotation,
|
|
48
|
+
@DoNotStrip
|
|
49
|
+
@Keep
|
|
50
|
+
val compactDisplay: NumberFormatCompactDisplay,
|
|
51
|
+
@DoNotStrip
|
|
52
|
+
@Keep
|
|
53
|
+
val useGrouping: Boolean,
|
|
54
|
+
@DoNotStrip
|
|
55
|
+
@Keep
|
|
56
|
+
val minimumIntegerDigits: Double,
|
|
57
|
+
@DoNotStrip
|
|
58
|
+
@Keep
|
|
59
|
+
val minimumFractionDigits: Double,
|
|
60
|
+
@DoNotStrip
|
|
61
|
+
@Keep
|
|
62
|
+
val maximumFractionDigits: Double,
|
|
63
|
+
@DoNotStrip
|
|
64
|
+
@Keep
|
|
65
|
+
val minimumSignificantDigits: Double,
|
|
66
|
+
@DoNotStrip
|
|
67
|
+
@Keep
|
|
68
|
+
val maximumSignificantDigits: Double,
|
|
69
|
+
@DoNotStrip
|
|
70
|
+
@Keep
|
|
71
|
+
val roundingMode: NumberFormatRoundingMode,
|
|
72
|
+
@DoNotStrip
|
|
73
|
+
@Keep
|
|
74
|
+
val signDisplay: NumberFormatSignDisplay
|
|
75
|
+
) {
|
|
76
|
+
/* primary constructor */
|
|
77
|
+
|
|
78
|
+
override fun equals(other: Any?): Boolean {
|
|
79
|
+
if (this === other) return true
|
|
80
|
+
if (other !is NumberFormatPlatformOptions) return false
|
|
81
|
+
return Objects.deepEquals(this.locales, other.locales)
|
|
82
|
+
&& Objects.deepEquals(this.numberingSystem, other.numberingSystem)
|
|
83
|
+
&& Objects.deepEquals(this.style, other.style)
|
|
84
|
+
&& Objects.deepEquals(this.currency, other.currency)
|
|
85
|
+
&& Objects.deepEquals(this.currencyDisplay, other.currencyDisplay)
|
|
86
|
+
&& Objects.deepEquals(this.currencySign, other.currencySign)
|
|
87
|
+
&& Objects.deepEquals(this.unit, other.unit)
|
|
88
|
+
&& Objects.deepEquals(this.unitDisplay, other.unitDisplay)
|
|
89
|
+
&& Objects.deepEquals(this.notation, other.notation)
|
|
90
|
+
&& Objects.deepEquals(this.compactDisplay, other.compactDisplay)
|
|
91
|
+
&& Objects.deepEquals(this.useGrouping, other.useGrouping)
|
|
92
|
+
&& Objects.deepEquals(this.minimumIntegerDigits, other.minimumIntegerDigits)
|
|
93
|
+
&& Objects.deepEquals(this.minimumFractionDigits, other.minimumFractionDigits)
|
|
94
|
+
&& Objects.deepEquals(this.maximumFractionDigits, other.maximumFractionDigits)
|
|
95
|
+
&& Objects.deepEquals(this.minimumSignificantDigits, other.minimumSignificantDigits)
|
|
96
|
+
&& Objects.deepEquals(this.maximumSignificantDigits, other.maximumSignificantDigits)
|
|
97
|
+
&& Objects.deepEquals(this.roundingMode, other.roundingMode)
|
|
98
|
+
&& Objects.deepEquals(this.signDisplay, other.signDisplay)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
override fun hashCode(): Int {
|
|
102
|
+
return arrayOf<Any?>(
|
|
103
|
+
locales,
|
|
104
|
+
numberingSystem,
|
|
105
|
+
style,
|
|
106
|
+
currency,
|
|
107
|
+
currencyDisplay,
|
|
108
|
+
currencySign,
|
|
109
|
+
unit,
|
|
110
|
+
unitDisplay,
|
|
111
|
+
notation,
|
|
112
|
+
compactDisplay,
|
|
113
|
+
useGrouping,
|
|
114
|
+
minimumIntegerDigits,
|
|
115
|
+
minimumFractionDigits,
|
|
116
|
+
maximumFractionDigits,
|
|
117
|
+
minimumSignificantDigits,
|
|
118
|
+
maximumSignificantDigits,
|
|
119
|
+
roundingMode,
|
|
120
|
+
signDisplay
|
|
121
|
+
).contentDeepHashCode()
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
companion object {
|
|
125
|
+
/**
|
|
126
|
+
* Constructor called from C++
|
|
127
|
+
*/
|
|
128
|
+
@DoNotStrip
|
|
129
|
+
@Keep
|
|
130
|
+
@Suppress("unused")
|
|
131
|
+
@JvmStatic
|
|
132
|
+
private fun fromCpp(locales: Array<String>, numberingSystem: String?, style: NumberFormatStyle, currency: String?, currencyDisplay: NumberFormatCurrencyDisplay, currencySign: NumberFormatCurrencySign, unit: String?, unitDisplay: NumberFormatUnitDisplay, notation: NumberFormatNotation, compactDisplay: NumberFormatCompactDisplay, useGrouping: Boolean, minimumIntegerDigits: Double, minimumFractionDigits: Double, maximumFractionDigits: Double, minimumSignificantDigits: Double, maximumSignificantDigits: Double, roundingMode: NumberFormatRoundingMode, signDisplay: NumberFormatSignDisplay): NumberFormatPlatformOptions {
|
|
133
|
+
return NumberFormatPlatformOptions(locales, numberingSystem, style, currency, currencyDisplay, currencySign, unit, unitDisplay, notation, compactDisplay, useGrouping, minimumIntegerDigits, minimumFractionDigits, maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits, roundingMode, signDisplay)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NumberFormatPlatformSymbols.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
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "NumberFormatPlatformSymbols".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class NumberFormatPlatformSymbols(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val locale: String,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val numberingSystem: String,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val minusSign: String,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val plusSign: String,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val percentSign: String,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val currency: String,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val nan: String,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val infinity: String,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val exponentSeparator: String
|
|
48
|
+
) {
|
|
49
|
+
/* primary constructor */
|
|
50
|
+
|
|
51
|
+
override fun equals(other: Any?): Boolean {
|
|
52
|
+
if (this === other) return true
|
|
53
|
+
if (other !is NumberFormatPlatformSymbols) return false
|
|
54
|
+
return Objects.deepEquals(this.locale, other.locale)
|
|
55
|
+
&& Objects.deepEquals(this.numberingSystem, other.numberingSystem)
|
|
56
|
+
&& Objects.deepEquals(this.minusSign, other.minusSign)
|
|
57
|
+
&& Objects.deepEquals(this.plusSign, other.plusSign)
|
|
58
|
+
&& Objects.deepEquals(this.percentSign, other.percentSign)
|
|
59
|
+
&& Objects.deepEquals(this.currency, other.currency)
|
|
60
|
+
&& Objects.deepEquals(this.nan, other.nan)
|
|
61
|
+
&& Objects.deepEquals(this.infinity, other.infinity)
|
|
62
|
+
&& Objects.deepEquals(this.exponentSeparator, other.exponentSeparator)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
override fun hashCode(): Int {
|
|
66
|
+
return arrayOf<Any?>(
|
|
67
|
+
locale,
|
|
68
|
+
numberingSystem,
|
|
69
|
+
minusSign,
|
|
70
|
+
plusSign,
|
|
71
|
+
percentSign,
|
|
72
|
+
currency,
|
|
73
|
+
nan,
|
|
74
|
+
infinity,
|
|
75
|
+
exponentSeparator
|
|
76
|
+
).contentDeepHashCode()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
companion object {
|
|
80
|
+
/**
|
|
81
|
+
* Constructor called from C++
|
|
82
|
+
*/
|
|
83
|
+
@DoNotStrip
|
|
84
|
+
@Keep
|
|
85
|
+
@Suppress("unused")
|
|
86
|
+
@JvmStatic
|
|
87
|
+
private fun fromCpp(locale: String, numberingSystem: String, minusSign: String, plusSign: String, percentSign: String, currency: String, nan: String, infinity: String, exponentSeparator: String): NumberFormatPlatformSymbols {
|
|
88
|
+
return NumberFormatPlatformSymbols(locale, numberingSystem, minusSign, plusSign, percentSign, currency, nan, infinity, exponentSeparator)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatRoundingMode.kt
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NumberFormatRoundingMode.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 "NumberFormatRoundingMode".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class NumberFormatRoundingMode(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
CEIL(0),
|
|
20
|
+
FLOOR(1),
|
|
21
|
+
EXPAND(2),
|
|
22
|
+
TRUNC(3),
|
|
23
|
+
HALFCEIL(4),
|
|
24
|
+
HALFFLOOR(5),
|
|
25
|
+
HALFEXPAND(6),
|
|
26
|
+
HALFTRUNC(7),
|
|
27
|
+
HALFEVEN(8);
|
|
28
|
+
|
|
29
|
+
companion object
|
|
30
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatSignDisplay.kt
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NumberFormatSignDisplay.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 "NumberFormatSignDisplay".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class NumberFormatSignDisplay(@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,25 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NumberFormatStyle.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 "NumberFormatStyle".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class NumberFormatStyle(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
DECIMAL(0),
|
|
20
|
+
CURRENCY(1),
|
|
21
|
+
PERCENT(2),
|
|
22
|
+
UNIT(3);
|
|
23
|
+
|
|
24
|
+
companion object
|
|
25
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinput/NumberFormatUnitDisplay.kt
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NumberFormatUnitDisplay.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 "NumberFormatUnitDisplay".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class NumberFormatUnitDisplay(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
SHORT(0),
|
|
20
|
+
NARROW(1),
|
|
21
|
+
LONG(2);
|
|
22
|
+
|
|
23
|
+
companion object
|
|
24
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
// Include C++ implementation defined types
|
|
11
11
|
#include "HybridNitroInputViewSpecSwift.hpp"
|
|
12
|
+
#include "HybridNitroNumberFormatPlatformSpecSwift.hpp"
|
|
12
13
|
#include "HybridNitroNumberViewSpecSwift.hpp"
|
|
14
|
+
#include "HybridNitroPlatformNumberFormatterSpecSwift.hpp"
|
|
15
|
+
#include "HybridNitroTextMeasureSpecSwift.hpp"
|
|
16
|
+
#include "HybridNitroTextViewSpecSwift.hpp"
|
|
13
17
|
#include "NitroInput-Swift-Cxx-Umbrella.hpp"
|
|
14
18
|
#include <NitroModules/NitroDefines.hpp>
|
|
15
19
|
|
|
@@ -102,5 +106,69 @@ namespace margelo::nitro::nitroinput::bridge::swift {
|
|
|
102
106
|
NitroInput::HybridNitroNumberViewSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
103
107
|
return swiftPart.toUnsafe();
|
|
104
108
|
}
|
|
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
|
+
|
|
142
|
+
// pragma MARK: std::shared_ptr<HybridNitroPlatformNumberFormatterSpec>
|
|
143
|
+
std::shared_ptr<HybridNitroPlatformNumberFormatterSpec> create_std__shared_ptr_HybridNitroPlatformNumberFormatterSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
144
|
+
NitroInput::HybridNitroPlatformNumberFormatterSpec_cxx swiftPart = NitroInput::HybridNitroPlatformNumberFormatterSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
145
|
+
return std::make_shared<margelo::nitro::nitroinput::HybridNitroPlatformNumberFormatterSpecSwift>(swiftPart);
|
|
146
|
+
}
|
|
147
|
+
void* NON_NULL get_std__shared_ptr_HybridNitroPlatformNumberFormatterSpec_(std__shared_ptr_HybridNitroPlatformNumberFormatterSpec_ cppType) {
|
|
148
|
+
std::shared_ptr<margelo::nitro::nitroinput::HybridNitroPlatformNumberFormatterSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::nitroinput::HybridNitroPlatformNumberFormatterSpecSwift>(cppType);
|
|
149
|
+
#ifdef NITRO_DEBUG
|
|
150
|
+
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
151
|
+
throw std::runtime_error("Class \"HybridNitroPlatformNumberFormatterSpec\" is not implemented in Swift!");
|
|
152
|
+
}
|
|
153
|
+
#endif
|
|
154
|
+
NitroInput::HybridNitroPlatformNumberFormatterSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
155
|
+
return swiftPart.toUnsafe();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// pragma MARK: std::shared_ptr<HybridNitroNumberFormatPlatformSpec>
|
|
159
|
+
std::shared_ptr<HybridNitroNumberFormatPlatformSpec> create_std__shared_ptr_HybridNitroNumberFormatPlatformSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
160
|
+
NitroInput::HybridNitroNumberFormatPlatformSpec_cxx swiftPart = NitroInput::HybridNitroNumberFormatPlatformSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
161
|
+
return std::make_shared<margelo::nitro::nitroinput::HybridNitroNumberFormatPlatformSpecSwift>(swiftPart);
|
|
162
|
+
}
|
|
163
|
+
void* NON_NULL get_std__shared_ptr_HybridNitroNumberFormatPlatformSpec_(std__shared_ptr_HybridNitroNumberFormatPlatformSpec_ cppType) {
|
|
164
|
+
std::shared_ptr<margelo::nitro::nitroinput::HybridNitroNumberFormatPlatformSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::nitroinput::HybridNitroNumberFormatPlatformSpecSwift>(cppType);
|
|
165
|
+
#ifdef NITRO_DEBUG
|
|
166
|
+
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
167
|
+
throw std::runtime_error("Class \"HybridNitroNumberFormatPlatformSpec\" is not implemented in Swift!");
|
|
168
|
+
}
|
|
169
|
+
#endif
|
|
170
|
+
NitroInput::HybridNitroNumberFormatPlatformSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
171
|
+
return swiftPart.toUnsafe();
|
|
172
|
+
}
|
|
105
173
|
|
|
106
174
|
} // namespace margelo::nitro::nitroinput::bridge::swift
|