@iternio/react-native-auto-play 0.3.11 → 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/README.md +103 -3
- package/ReactNativeAutoPlay.podspec +0 -4
- package/android/src/automotive/AndroidManifest.xml +1 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlay.kt +91 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VoiceInputManager.kt +214 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/MapTemplate.kt +2 -1
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +117 -38
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/BitmapCache.kt +14 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/SymbolFont.kt +29 -30
- package/ios/extensions/NitroImageExtensions.swift +10 -1
- package/ios/hybrid/HybridAutoPlay.swift +51 -4
- package/ios/templates/GridTemplate.swift +7 -0
- package/ios/templates/MapTemplate.swift +14 -0
- package/ios/templates/Parser.swift +91 -4
- package/ios/utils/SymbolFont.swift +44 -44
- package/ios/utils/VoiceInputManager.swift +233 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/specs/AutoPlay.nitro.d.ts +31 -1
- package/lib/types/Image.d.ts +46 -4
- package/lib/types/Maneuver.d.ts +2 -10
- package/lib/utils/NitroImage.d.ts +29 -3
- package/lib/utils/NitroImage.js +64 -3
- package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +1 -1
- package/nitrogen/generated/android/c++/JGlyphImage.hpp +6 -1
- package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp +48 -1
- package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.hpp +4 -0
- package/nitrogen/generated/android/c++/JHybridClusterSpec.cpp +4 -0
- package/nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridInformationTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridListTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridMessageTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridSearchTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridSignInTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JImageLane.hpp +2 -0
- package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JLaneGuidance.hpp +2 -0
- package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JMapTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JMessageTemplateConfig.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroAction.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroAttributedString.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroAttributedStringImage.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroBaseMapTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JNitroGridButton.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroImage.cpp +6 -2
- package/nitrogen/generated/android/c++/JNitroImage.hpp +20 -3
- package/nitrogen/generated/android/c++/JNitroManeuver.hpp +3 -1
- package/nitrogen/generated/android/c++/JNitroMapButton.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroMessageManeuver.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroNavigationAlert.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroRoutingManeuver.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroRow.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroSection.hpp +3 -1
- package/nitrogen/generated/android/c++/JPreferredImageLane.hpp +2 -0
- package/nitrogen/generated/android/c++/JRemoteImage.hpp +68 -0
- package/nitrogen/generated/android/c++/JSearchTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JSignInTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.cpp +30 -0
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.hpp +92 -0
- package/nitrogen/generated/android/c++/JVariant_PreferredImageLane_ImageLane.hpp +3 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GlyphImage.kt +5 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlaySpec.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/MessageTemplateConfig.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroAction.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroImage.kt +14 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroMessageManeuver.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroNavigationAlert.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRoutingManeuver.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRow.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/RemoteImage.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/{Variant_GlyphImage_AssetImage.kt → Variant_GlyphImage_AssetImage_RemoteImage.kt} +20 -8
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +16 -8
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +156 -79
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +4 -0
- package/nitrogen/generated/ios/c++/HybridAutoPlaySpecSwift.hpp +37 -0
- package/nitrogen/generated/ios/c++/HybridCarPlayDashboardSpecSwift.hpp +4 -1
- package/nitrogen/generated/ios/c++/HybridClusterSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridGridTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridInformationTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridListTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridMapTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridMessageTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridSearchTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +46 -0
- package/nitrogen/generated/ios/swift/GlyphImage.swift +7 -2
- package/nitrogen/generated/ios/swift/HybridAutoPlaySpec.swift +4 -0
- package/nitrogen/generated/ios/swift/HybridAutoPlaySpec_cxx.swift +82 -0
- package/nitrogen/generated/ios/swift/ImageLane.swift +9 -4
- package/nitrogen/generated/ios/swift/MessageTemplateConfig.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroAction.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroAttributedStringImage.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroCarPlayDashboardButton.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroGridButton.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroImage.swift +2 -1
- package/nitrogen/generated/ios/swift/NitroMapButton.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroMessageManeuver.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroNavigationAlert.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroRoutingManeuver.swift +25 -15
- package/nitrogen/generated/ios/swift/NitroRow.swift +16 -11
- package/nitrogen/generated/ios/swift/PreferredImageLane.swift +9 -4
- package/nitrogen/generated/ios/swift/RemoteImage.swift +58 -0
- package/nitrogen/generated/ios/swift/{Variant_GlyphImage_AssetImage.swift → Variant_GlyphImage_AssetImage_RemoteImage.swift} +4 -3
- package/nitrogen/generated/shared/c++/GlyphImage.hpp +6 -1
- package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.cpp +4 -0
- package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.hpp +5 -0
- package/nitrogen/generated/shared/c++/ImageLane.hpp +8 -5
- package/nitrogen/generated/shared/c++/MessageTemplateConfig.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroAction.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroAttributedStringImage.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroCarPlayDashboardButton.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroGridButton.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroMapButton.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroMessageManeuver.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroNavigationAlert.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroRoutingManeuver.hpp +12 -9
- package/nitrogen/generated/shared/c++/NitroRow.hpp +8 -5
- package/nitrogen/generated/shared/c++/PreferredImageLane.hpp +8 -5
- package/nitrogen/generated/shared/c++/RemoteImage.hpp +94 -0
- package/package.json +2 -3
- package/src/index.ts +1 -0
- package/src/specs/AutoPlay.nitro.ts +39 -1
- package/src/types/Image.ts +65 -16
- package/src/types/Maneuver.ts +3 -10
- package/src/utils/NitroImage.ts +81 -6
- package/android/src/main/res/font/materialsymbolsoutlined_regular.ttf +0 -0
- package/ios/Assets/MaterialSymbolsOutlined-Regular.ttf +0 -0
- package/lib/types/Glyphmap.d.ts +0 -4105
- package/lib/types/Glyphmap.js +0 -4105
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.hpp +0 -75
- package/src/types/Glyphmap.ts +0 -4107
|
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
|
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
13
|
import com.margelo.nitro.core.Promise
|
|
14
|
+
import com.margelo.nitro.core.ArrayBuffer
|
|
14
15
|
import com.margelo.nitro.core.HybridObject
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -56,6 +57,22 @@ abstract class HybridAutoPlaySpec: HybridObject() {
|
|
|
56
57
|
return Func_void_java(__result)
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
@DoNotStrip
|
|
61
|
+
@Keep
|
|
62
|
+
abstract fun hasVoiceInputPermission(): Boolean
|
|
63
|
+
|
|
64
|
+
@DoNotStrip
|
|
65
|
+
@Keep
|
|
66
|
+
abstract fun requestVoiceInputPermission(): Promise<Boolean>
|
|
67
|
+
|
|
68
|
+
@DoNotStrip
|
|
69
|
+
@Keep
|
|
70
|
+
abstract fun startVoiceInput(silenceThresholdMs: Double?, maxDurationMs: Double?, listeningText: String?): Promise<ArrayBuffer>
|
|
71
|
+
|
|
72
|
+
@DoNotStrip
|
|
73
|
+
@Keep
|
|
74
|
+
abstract fun stopVoiceInput(): Unit
|
|
75
|
+
|
|
59
76
|
@DoNotStrip
|
|
60
77
|
@Keep
|
|
61
78
|
abstract fun setRootTemplate(templateId: String): Promise<Unit>
|
|
@@ -52,7 +52,7 @@ data class MessageTemplateConfig(
|
|
|
52
52
|
val actions: Array<NitroAction>?,
|
|
53
53
|
@DoNotStrip
|
|
54
54
|
@Keep
|
|
55
|
-
val image:
|
|
55
|
+
val image: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
56
56
|
@DoNotStrip
|
|
57
57
|
@Keep
|
|
58
58
|
val mapConfig: NitroBaseMapTemplateConfig?
|
|
@@ -60,7 +60,7 @@ data class MessageTemplateConfig(
|
|
|
60
60
|
/**
|
|
61
61
|
* Create a new instance of MessageTemplateConfig from Kotlin
|
|
62
62
|
*/
|
|
63
|
-
constructor(id: String, onWillAppear: ((animated: Boolean?) -> Unit)?, onWillDisappear: ((animated: Boolean?) -> Unit)?, onDidAppear: ((animated: Boolean?) -> Unit)?, onDidDisappear: ((animated: Boolean?) -> Unit)?, onPopped: (() -> Unit)?, autoDismissMs: Double?, headerActions: Array<NitroAction>?, title: AutoText?, message: AutoText, actions: Array<NitroAction>?, image:
|
|
63
|
+
constructor(id: String, onWillAppear: ((animated: Boolean?) -> Unit)?, onWillDisappear: ((animated: Boolean?) -> Unit)?, onDidAppear: ((animated: Boolean?) -> Unit)?, onDidDisappear: ((animated: Boolean?) -> Unit)?, onPopped: (() -> Unit)?, autoDismissMs: Double?, headerActions: Array<NitroAction>?, title: AutoText?, message: AutoText, actions: Array<NitroAction>?, image: Variant_GlyphImage_AssetImage_RemoteImage?, mapConfig: NitroBaseMapTemplateConfig?):
|
|
64
64
|
this(id, onWillAppear?.let { Func_void_std__optional_bool__java(it) }, onWillDisappear?.let { Func_void_std__optional_bool__java(it) }, onDidAppear?.let { Func_void_std__optional_bool__java(it) }, onDidDisappear?.let { Func_void_std__optional_bool__java(it) }, onPopped?.let { Func_void_java(it) }, autoDismissMs, headerActions, title, message, actions, image, mapConfig)
|
|
65
65
|
|
|
66
66
|
companion object {
|
|
@@ -71,7 +71,7 @@ data class MessageTemplateConfig(
|
|
|
71
71
|
@Keep
|
|
72
72
|
@Suppress("unused")
|
|
73
73
|
@JvmStatic
|
|
74
|
-
private fun fromCpp(id: String, onWillAppear: Func_void_std__optional_bool_?, onWillDisappear: Func_void_std__optional_bool_?, onDidAppear: Func_void_std__optional_bool_?, onDidDisappear: Func_void_std__optional_bool_?, onPopped: Func_void?, autoDismissMs: Double?, headerActions: Array<NitroAction>?, title: AutoText?, message: AutoText, actions: Array<NitroAction>?, image:
|
|
74
|
+
private fun fromCpp(id: String, onWillAppear: Func_void_std__optional_bool_?, onWillDisappear: Func_void_std__optional_bool_?, onDidAppear: Func_void_std__optional_bool_?, onDidDisappear: Func_void_std__optional_bool_?, onPopped: Func_void?, autoDismissMs: Double?, headerActions: Array<NitroAction>?, title: AutoText?, message: AutoText, actions: Array<NitroAction>?, image: Variant_GlyphImage_AssetImage_RemoteImage?, mapConfig: NitroBaseMapTemplateConfig?): MessageTemplateConfig {
|
|
75
75
|
return MessageTemplateConfig(id, onWillAppear, onWillDisappear, onDidAppear, onDidDisappear, onPopped, autoDismissMs, headerActions, title, message, actions, image, mapConfig)
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -22,7 +22,7 @@ data class NitroAction(
|
|
|
22
22
|
val title: String?,
|
|
23
23
|
@DoNotStrip
|
|
24
24
|
@Keep
|
|
25
|
-
val image:
|
|
25
|
+
val image: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
26
26
|
@DoNotStrip
|
|
27
27
|
@Keep
|
|
28
28
|
val enabled: Boolean?,
|
|
@@ -45,7 +45,7 @@ data class NitroAction(
|
|
|
45
45
|
/**
|
|
46
46
|
* Create a new instance of NitroAction from Kotlin
|
|
47
47
|
*/
|
|
48
|
-
constructor(title: String?, image:
|
|
48
|
+
constructor(title: String?, image: Variant_GlyphImage_AssetImage_RemoteImage?, enabled: Boolean?, onPress: () -> Unit, type: NitroActionType, alignment: NitroAlignment?, flags: Double?, style: NitroButtonStyle?):
|
|
49
49
|
this(title, image, enabled, Func_void_java(onPress), type, alignment, flags, style)
|
|
50
50
|
|
|
51
51
|
companion object {
|
|
@@ -56,7 +56,7 @@ data class NitroAction(
|
|
|
56
56
|
@Keep
|
|
57
57
|
@Suppress("unused")
|
|
58
58
|
@JvmStatic
|
|
59
|
-
private fun fromCpp(title: String?, image:
|
|
59
|
+
private fun fromCpp(title: String?, image: Variant_GlyphImage_AssetImage_RemoteImage?, enabled: Boolean?, onPress: Func_void, type: NitroActionType, alignment: NitroAlignment?, flags: Double?, style: NitroButtonStyle?): NitroAction {
|
|
60
60
|
return NitroAction(title, image, enabled, onPress, type, alignment, flags, style)
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -11,7 +11,7 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the TypeScript variant "GlyphImage | AssetImage".
|
|
14
|
+
* Represents the TypeScript variant "GlyphImage | AssetImage | RemoteImage".
|
|
15
15
|
*/
|
|
16
16
|
@Suppress("ClassName")
|
|
17
17
|
@DoNotStrip
|
|
@@ -20,11 +20,15 @@ sealed class NitroImage {
|
|
|
20
20
|
data class First(@DoNotStrip val value: GlyphImage): NitroImage()
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
data class Second(@DoNotStrip val value: AssetImage): NitroImage()
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
data class Third(@DoNotStrip val value: RemoteImage): NitroImage()
|
|
23
25
|
|
|
24
26
|
val isFirst: Boolean
|
|
25
27
|
get() = this is First
|
|
26
28
|
val isSecond: Boolean
|
|
27
29
|
get() = this is Second
|
|
30
|
+
val isThird: Boolean
|
|
31
|
+
get() = this is Third
|
|
28
32
|
|
|
29
33
|
fun asFirstOrNull(): GlyphImage? {
|
|
30
34
|
val value = (this as? First)?.value ?: return null
|
|
@@ -34,11 +38,16 @@ sealed class NitroImage {
|
|
|
34
38
|
val value = (this as? Second)?.value ?: return null
|
|
35
39
|
return value
|
|
36
40
|
}
|
|
41
|
+
fun asThirdOrNull(): RemoteImage? {
|
|
42
|
+
val value = (this as? Third)?.value ?: return null
|
|
43
|
+
return value
|
|
44
|
+
}
|
|
37
45
|
|
|
38
|
-
inline fun <R> match(first: (GlyphImage) -> R, second: (AssetImage) -> R): R {
|
|
46
|
+
inline fun <R> match(first: (GlyphImage) -> R, second: (AssetImage) -> R, third: (RemoteImage) -> R): R {
|
|
39
47
|
return when (this) {
|
|
40
48
|
is First -> first(value)
|
|
41
49
|
is Second -> second(value)
|
|
50
|
+
is Third -> third(value)
|
|
42
51
|
}
|
|
43
52
|
}
|
|
44
53
|
|
|
@@ -49,5 +58,8 @@ sealed class NitroImage {
|
|
|
49
58
|
@JvmStatic
|
|
50
59
|
@DoNotStrip
|
|
51
60
|
fun create(value: AssetImage): NitroImage = Second(value)
|
|
61
|
+
@JvmStatic
|
|
62
|
+
@DoNotStrip
|
|
63
|
+
fun create(value: RemoteImage): NitroImage = Third(value)
|
|
52
64
|
}
|
|
53
65
|
}
|
|
@@ -25,7 +25,7 @@ data class NitroMessageManeuver(
|
|
|
25
25
|
val text: String?,
|
|
26
26
|
@DoNotStrip
|
|
27
27
|
@Keep
|
|
28
|
-
val image:
|
|
28
|
+
val image: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
29
29
|
@DoNotStrip
|
|
30
30
|
@Keep
|
|
31
31
|
val cardBackgroundColor: NitroColor
|
|
@@ -40,7 +40,7 @@ data class NitroMessageManeuver(
|
|
|
40
40
|
@Keep
|
|
41
41
|
@Suppress("unused")
|
|
42
42
|
@JvmStatic
|
|
43
|
-
private fun fromCpp(title: String, text: String?, image:
|
|
43
|
+
private fun fromCpp(title: String, text: String?, image: Variant_GlyphImage_AssetImage_RemoteImage?, cardBackgroundColor: NitroColor): NitroMessageManeuver {
|
|
44
44
|
return NitroMessageManeuver(title, text, image, cardBackgroundColor)
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -28,7 +28,7 @@ data class NitroNavigationAlert(
|
|
|
28
28
|
val subtitle: AutoText?,
|
|
29
29
|
@DoNotStrip
|
|
30
30
|
@Keep
|
|
31
|
-
val image:
|
|
31
|
+
val image: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
32
32
|
@DoNotStrip
|
|
33
33
|
@Keep
|
|
34
34
|
val primaryAction: NavigationAlertAction,
|
|
@@ -51,7 +51,7 @@ data class NitroNavigationAlert(
|
|
|
51
51
|
/**
|
|
52
52
|
* Create a new instance of NitroNavigationAlert from Kotlin
|
|
53
53
|
*/
|
|
54
|
-
constructor(id: Double, title: AutoText, subtitle: AutoText?, image:
|
|
54
|
+
constructor(id: Double, title: AutoText, subtitle: AutoText?, image: Variant_GlyphImage_AssetImage_RemoteImage?, primaryAction: NavigationAlertAction, secondaryAction: NavigationAlertAction?, durationMs: Double, onWillShow: (() -> Unit)?, onDidDismiss: ((reason: AlertDismissalReason) -> Unit)?, priority: Double):
|
|
55
55
|
this(id, title, subtitle, image, primaryAction, secondaryAction, durationMs, onWillShow?.let { Func_void_java(it) }, onDidDismiss?.let { Func_void_AlertDismissalReason_java(it) }, priority)
|
|
56
56
|
|
|
57
57
|
companion object {
|
|
@@ -62,7 +62,7 @@ data class NitroNavigationAlert(
|
|
|
62
62
|
@Keep
|
|
63
63
|
@Suppress("unused")
|
|
64
64
|
@JvmStatic
|
|
65
|
-
private fun fromCpp(id: Double, title: AutoText, subtitle: AutoText?, image:
|
|
65
|
+
private fun fromCpp(id: Double, title: AutoText, subtitle: AutoText?, image: Variant_GlyphImage_AssetImage_RemoteImage?, primaryAction: NavigationAlertAction, secondaryAction: NavigationAlertAction?, durationMs: Double, onWillShow: Func_void?, onDidDismiss: Func_void_AlertDismissalReason?, priority: Double): NitroNavigationAlert {
|
|
66
66
|
return NitroNavigationAlert(id, title, subtitle, image, primaryAction, secondaryAction, durationMs, onWillShow, onDidDismiss, priority)
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -25,7 +25,7 @@ data class NitroRoutingManeuver(
|
|
|
25
25
|
val symbolImage: NitroImage,
|
|
26
26
|
@DoNotStrip
|
|
27
27
|
@Keep
|
|
28
|
-
val junctionImage:
|
|
28
|
+
val junctionImage: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
29
29
|
@DoNotStrip
|
|
30
30
|
@Keep
|
|
31
31
|
val turnType: TurnType?,
|
|
@@ -85,7 +85,7 @@ data class NitroRoutingManeuver(
|
|
|
85
85
|
@Keep
|
|
86
86
|
@Suppress("unused")
|
|
87
87
|
@JvmStatic
|
|
88
|
-
private fun fromCpp(attributedInstructionVariants: Array<NitroAttributedString>, symbolImage: NitroImage, junctionImage:
|
|
88
|
+
private fun fromCpp(attributedInstructionVariants: Array<NitroAttributedString>, symbolImage: NitroImage, junctionImage: Variant_GlyphImage_AssetImage_RemoteImage?, turnType: TurnType?, angle: Double?, elementAngles: DoubleArray?, exitNumber: Double?, offRampType: OffRampType?, onRampType: OnRampType?, forkType: ForkType?, keepType: KeepType?, linkedLaneGuidance: LaneGuidance?, cardBackgroundColor: NitroColor, id: String, travelEstimates: TravelEstimates, trafficSide: TrafficSide, maneuverType: ManeuverType, roadName: Array<String>?, highwayExitLabel: String?): NitroRoutingManeuver {
|
|
89
89
|
return NitroRoutingManeuver(attributedInstructionVariants, symbolImage, junctionImage, turnType, angle, elementAngles, exitNumber, offRampType, onRampType, forkType, keepType, linkedLaneGuidance, cardBackgroundColor, id, travelEstimates, trafficSide, maneuverType, roadName, highwayExitLabel)
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -31,7 +31,7 @@ data class NitroRow(
|
|
|
31
31
|
val enabled: Boolean,
|
|
32
32
|
@DoNotStrip
|
|
33
33
|
@Keep
|
|
34
|
-
val image:
|
|
34
|
+
val image: Variant_GlyphImage_AssetImage_RemoteImage?,
|
|
35
35
|
@DoNotStrip
|
|
36
36
|
@Keep
|
|
37
37
|
val checked: Boolean?,
|
|
@@ -45,7 +45,7 @@ data class NitroRow(
|
|
|
45
45
|
/**
|
|
46
46
|
* Create a new instance of NitroRow from Kotlin
|
|
47
47
|
*/
|
|
48
|
-
constructor(title: AutoText, detailedText: AutoText?, browsable: Boolean?, enabled: Boolean, image:
|
|
48
|
+
constructor(title: AutoText, detailedText: AutoText?, browsable: Boolean?, enabled: Boolean, image: Variant_GlyphImage_AssetImage_RemoteImage?, checked: Boolean?, onPress: ((checked: Boolean?) -> Unit)?, selected: Boolean?):
|
|
49
49
|
this(title, detailedText, browsable, enabled, image, checked, onPress?.let { Func_void_std__optional_bool__java(it) }, selected)
|
|
50
50
|
|
|
51
51
|
companion object {
|
|
@@ -56,7 +56,7 @@ data class NitroRow(
|
|
|
56
56
|
@Keep
|
|
57
57
|
@Suppress("unused")
|
|
58
58
|
@JvmStatic
|
|
59
|
-
private fun fromCpp(title: AutoText, detailedText: AutoText?, browsable: Boolean?, enabled: Boolean, image:
|
|
59
|
+
private fun fromCpp(title: AutoText, detailedText: AutoText?, browsable: Boolean?, enabled: Boolean, image: Variant_GlyphImage_AssetImage_RemoteImage?, checked: Boolean?, onPress: Func_void_std__optional_bool_?, selected: Boolean?): NitroRow {
|
|
60
60
|
return NitroRow(title, detailedText, browsable, enabled, image, checked, onPress, selected)
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RemoteImage.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.swe.iternio.reactnativeautoplay
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "RemoteImage".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class RemoteImage(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val uri: String,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val color: NitroColor?,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val timeoutMs: Double?
|
|
29
|
+
) {
|
|
30
|
+
/* primary constructor */
|
|
31
|
+
|
|
32
|
+
companion object {
|
|
33
|
+
/**
|
|
34
|
+
* Constructor called from C++
|
|
35
|
+
*/
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
@Suppress("unused")
|
|
39
|
+
@JvmStatic
|
|
40
|
+
private fun fromCpp(uri: String, color: NitroColor?, timeoutMs: Double?): RemoteImage {
|
|
41
|
+
return RemoteImage(uri, color, timeoutMs)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// Variant_GlyphImage_AssetImage_RemoteImage.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © Marc Rousavy @ Margelo
|
|
@@ -11,20 +11,24 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the TypeScript variant "GlyphImage | AssetImage".
|
|
14
|
+
* Represents the TypeScript variant "GlyphImage | AssetImage | RemoteImage".
|
|
15
15
|
*/
|
|
16
16
|
@Suppress("ClassName")
|
|
17
17
|
@DoNotStrip
|
|
18
|
-
sealed class
|
|
18
|
+
sealed class Variant_GlyphImage_AssetImage_RemoteImage {
|
|
19
19
|
@DoNotStrip
|
|
20
|
-
data class First(@DoNotStrip val value: GlyphImage):
|
|
20
|
+
data class First(@DoNotStrip val value: GlyphImage): Variant_GlyphImage_AssetImage_RemoteImage()
|
|
21
21
|
@DoNotStrip
|
|
22
|
-
data class Second(@DoNotStrip val value: AssetImage):
|
|
22
|
+
data class Second(@DoNotStrip val value: AssetImage): Variant_GlyphImage_AssetImage_RemoteImage()
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
data class Third(@DoNotStrip val value: RemoteImage): Variant_GlyphImage_AssetImage_RemoteImage()
|
|
23
25
|
|
|
24
26
|
val isFirst: Boolean
|
|
25
27
|
get() = this is First
|
|
26
28
|
val isSecond: Boolean
|
|
27
29
|
get() = this is Second
|
|
30
|
+
val isThird: Boolean
|
|
31
|
+
get() = this is Third
|
|
28
32
|
|
|
29
33
|
fun asFirstOrNull(): GlyphImage? {
|
|
30
34
|
val value = (this as? First)?.value ?: return null
|
|
@@ -34,20 +38,28 @@ sealed class Variant_GlyphImage_AssetImage {
|
|
|
34
38
|
val value = (this as? Second)?.value ?: return null
|
|
35
39
|
return value
|
|
36
40
|
}
|
|
41
|
+
fun asThirdOrNull(): RemoteImage? {
|
|
42
|
+
val value = (this as? Third)?.value ?: return null
|
|
43
|
+
return value
|
|
44
|
+
}
|
|
37
45
|
|
|
38
|
-
inline fun <R> match(first: (GlyphImage) -> R, second: (AssetImage) -> R): R {
|
|
46
|
+
inline fun <R> match(first: (GlyphImage) -> R, second: (AssetImage) -> R, third: (RemoteImage) -> R): R {
|
|
39
47
|
return when (this) {
|
|
40
48
|
is First -> first(value)
|
|
41
49
|
is Second -> second(value)
|
|
50
|
+
is Third -> third(value)
|
|
42
51
|
}
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
companion object {
|
|
46
55
|
@JvmStatic
|
|
47
56
|
@DoNotStrip
|
|
48
|
-
fun create(value: GlyphImage):
|
|
57
|
+
fun create(value: GlyphImage): Variant_GlyphImage_AssetImage_RemoteImage = First(value)
|
|
58
|
+
@JvmStatic
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
fun create(value: AssetImage): Variant_GlyphImage_AssetImage_RemoteImage = Second(value)
|
|
49
61
|
@JvmStatic
|
|
50
62
|
@DoNotStrip
|
|
51
|
-
fun create(value:
|
|
63
|
+
fun create(value: RemoteImage): Variant_GlyphImage_AssetImage_RemoteImage = Third(value)
|
|
52
64
|
}
|
|
53
65
|
}
|
|
@@ -46,6 +46,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
// pragma MARK: std::function<void(bool /* result */)>
|
|
50
|
+
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
51
|
+
auto swiftClosure = ReactNativeAutoPlay::Func_void_bool::fromUnsafe(swiftClosureWrapper);
|
|
52
|
+
return [swiftClosure = std::move(swiftClosure)](bool result) mutable -> void {
|
|
53
|
+
swiftClosure.call(result);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
49
57
|
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
50
58
|
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
51
59
|
auto swiftClosure = ReactNativeAutoPlay::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
@@ -54,6 +62,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
|
|
|
54
62
|
};
|
|
55
63
|
}
|
|
56
64
|
|
|
65
|
+
// pragma MARK: std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>
|
|
66
|
+
Func_void_std__shared_ptr_ArrayBuffer_ create_Func_void_std__shared_ptr_ArrayBuffer_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
67
|
+
auto swiftClosure = ReactNativeAutoPlay::Func_void_std__shared_ptr_ArrayBuffer_::fromUnsafe(swiftClosureWrapper);
|
|
68
|
+
return [swiftClosure = std::move(swiftClosure)](const std::shared_ptr<ArrayBuffer>& result) mutable -> void {
|
|
69
|
+
swiftClosure.call(ArrayBufferHolder(result));
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
57
73
|
// pragma MARK: std::function<void(const SafeAreaInsets& /* insets */)>
|
|
58
74
|
Func_void_SafeAreaInsets create_Func_void_SafeAreaInsets(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
59
75
|
auto swiftClosure = ReactNativeAutoPlay::Func_void_SafeAreaInsets::fromUnsafe(swiftClosureWrapper);
|
|
@@ -158,14 +174,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
|
|
|
158
174
|
};
|
|
159
175
|
}
|
|
160
176
|
|
|
161
|
-
// pragma MARK: std::function<void(bool /* isPanningInterfaceVisible */)>
|
|
162
|
-
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
163
|
-
auto swiftClosure = ReactNativeAutoPlay::Func_void_bool::fromUnsafe(swiftClosureWrapper);
|
|
164
|
-
return [swiftClosure = std::move(swiftClosure)](bool isPanningInterfaceVisible) mutable -> void {
|
|
165
|
-
swiftClosure.call(isPanningInterfaceVisible);
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
177
|
// pragma MARK: std::shared_ptr<HybridGridTemplateSpec>
|
|
170
178
|
std::shared_ptr<HybridGridTemplateSpec> create_std__shared_ptr_HybridGridTemplateSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
171
179
|
ReactNativeAutoPlay::HybridGridTemplateSpec_cxx swiftPart = ReactNativeAutoPlay::HybridGridTemplateSpec_cxx::fromUnsafe(swiftUnsafePointer);
|