@iternio/react-native-auto-play 0.0.4 → 0.0.6
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/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlay.kt +1 -9
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridMapTemplate.kt +42 -22
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/AndroidAutoTemplate.kt +21 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +58 -25
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/BitmapCache.kt +60 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/SymbolFont.kt +16 -31
- package/ios/hybrid/HybridMapTemplate.swift +25 -16
- package/ios/scenes/AutoPlayScene.swift +1 -8
- package/ios/scenes/SceneStore.swift +15 -3
- package/ios/scenes/WindowApplicationSceneDelegate.swift +14 -5
- package/lib/specs/MapTemplate.nitro.d.ts +5 -2
- package/lib/templates/MapTemplate.d.ts +4 -6
- package/lib/templates/MapTemplate.js +6 -0
- package/nitrogen/generated/android/ReactNativeAutoPlayOnLoad.cpp +0 -2
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +27 -25
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.hpp +3 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridMapTemplateSpec.kt +9 -1
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +0 -8
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +0 -34
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +0 -3
- package/nitrogen/generated/ios/c++/HybridMapTemplateSpecSwift.hpp +16 -9
- package/nitrogen/generated/ios/swift/HybridMapTemplateSpec.swift +3 -1
- package/nitrogen/generated/ios/swift/HybridMapTemplateSpec_cxx.swift +26 -5
- package/nitrogen/generated/shared/c++/HybridMapTemplateSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridMapTemplateSpec.hpp +7 -5
- package/package.json +1 -1
- package/src/specs/MapTemplate.nitro.ts +9 -2
- package/src/templates/MapTemplate.ts +9 -5
- package/nitrogen/generated/android/c++/JFunc_void_AutoText_std__optional_AutoText_.hpp +0 -82
- package/nitrogen/generated/android/c++/JNavigationAlertCallbacks.hpp +0 -91
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_AutoText_std__optional_AutoText_.kt +0 -80
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NavigationAlertCallbacks.kt +0 -45
- package/nitrogen/generated/ios/swift/Func_void_AutoText_std__optional_AutoText_.swift +0 -47
- package/nitrogen/generated/ios/swift/NavigationAlertCallbacks.swift +0 -74
- package/nitrogen/generated/shared/c++/NavigationAlertCallbacks.hpp +0 -82
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// Func_void_AutoText_std__optional_AutoText_.kt
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
package com.margelo.nitro.swe.iternio.reactnativeautoplay
|
|
9
|
-
|
|
10
|
-
import androidx.annotation.Keep
|
|
11
|
-
import com.facebook.jni.HybridData
|
|
12
|
-
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import dalvik.annotation.optimization.FastNative
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Represents the JavaScript callback `(title: struct, subtitle: optional) => void`.
|
|
18
|
-
* This can be either implemented in C++ (in which case it might be a callback coming from JS),
|
|
19
|
-
* or in Kotlin/Java (in which case it is a native callback).
|
|
20
|
-
*/
|
|
21
|
-
@DoNotStrip
|
|
22
|
-
@Keep
|
|
23
|
-
@Suppress("ClassName", "RedundantUnitReturnType")
|
|
24
|
-
fun interface Func_void_AutoText_std__optional_AutoText_: (AutoText, AutoText?) -> Unit {
|
|
25
|
-
/**
|
|
26
|
-
* Call the given JS callback.
|
|
27
|
-
* @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
|
|
28
|
-
*/
|
|
29
|
-
@DoNotStrip
|
|
30
|
-
@Keep
|
|
31
|
-
override fun invoke(title: AutoText, subtitle: AutoText?): Unit
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Represents the JavaScript callback `(title: struct, subtitle: optional) => void`.
|
|
36
|
-
* This is implemented in C++, via a `std::function<...>`.
|
|
37
|
-
* The callback might be coming from JS.
|
|
38
|
-
*/
|
|
39
|
-
@DoNotStrip
|
|
40
|
-
@Keep
|
|
41
|
-
@Suppress(
|
|
42
|
-
"KotlinJniMissingFunction", "unused",
|
|
43
|
-
"RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
|
|
44
|
-
"ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
|
|
45
|
-
)
|
|
46
|
-
class Func_void_AutoText_std__optional_AutoText__cxx: Func_void_AutoText_std__optional_AutoText_ {
|
|
47
|
-
@DoNotStrip
|
|
48
|
-
@Keep
|
|
49
|
-
private val mHybridData: HybridData
|
|
50
|
-
|
|
51
|
-
@DoNotStrip
|
|
52
|
-
@Keep
|
|
53
|
-
private constructor(hybridData: HybridData) {
|
|
54
|
-
mHybridData = hybridData
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@DoNotStrip
|
|
58
|
-
@Keep
|
|
59
|
-
override fun invoke(title: AutoText, subtitle: AutoText?): Unit
|
|
60
|
-
= invoke_cxx(title,subtitle)
|
|
61
|
-
|
|
62
|
-
@FastNative
|
|
63
|
-
private external fun invoke_cxx(title: AutoText, subtitle: AutoText?): Unit
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Represents the JavaScript callback `(title: struct, subtitle: optional) => void`.
|
|
68
|
-
* This is implemented in Java/Kotlin, via a `(AutoText, AutoText?) -> Unit`.
|
|
69
|
-
* The callback is always coming from native.
|
|
70
|
-
*/
|
|
71
|
-
@DoNotStrip
|
|
72
|
-
@Keep
|
|
73
|
-
@Suppress("ClassName", "RedundantUnitReturnType", "unused")
|
|
74
|
-
class Func_void_AutoText_std__optional_AutoText__java(private val function: (AutoText, AutoText?) -> Unit): Func_void_AutoText_std__optional_AutoText_ {
|
|
75
|
-
@DoNotStrip
|
|
76
|
-
@Keep
|
|
77
|
-
override fun invoke(title: AutoText, subtitle: AutoText?): Unit {
|
|
78
|
-
return this.function(title, subtitle)
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NavigationAlertCallbacks.kt
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 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 "NavigationAlertCallbacks".
|
|
16
|
-
*/
|
|
17
|
-
@DoNotStrip
|
|
18
|
-
@Keep
|
|
19
|
-
data class NavigationAlertCallbacks(
|
|
20
|
-
@DoNotStrip
|
|
21
|
-
@Keep
|
|
22
|
-
val dismiss: Func_void,
|
|
23
|
-
@DoNotStrip
|
|
24
|
-
@Keep
|
|
25
|
-
val update: Func_void_AutoText_std__optional_AutoText_
|
|
26
|
-
) {
|
|
27
|
-
/**
|
|
28
|
-
* Create a new instance of NavigationAlertCallbacks from Kotlin
|
|
29
|
-
*/
|
|
30
|
-
constructor(dismiss: () -> Unit, update: (title: AutoText, subtitle: AutoText?) -> Unit):
|
|
31
|
-
this(Func_void_java(dismiss), Func_void_AutoText_std__optional_AutoText__java(update))
|
|
32
|
-
|
|
33
|
-
private companion object {
|
|
34
|
-
/**
|
|
35
|
-
* Constructor called from C++
|
|
36
|
-
*/
|
|
37
|
-
@DoNotStrip
|
|
38
|
-
@Keep
|
|
39
|
-
@Suppress("unused")
|
|
40
|
-
@JvmStatic
|
|
41
|
-
private fun fromCpp(dismiss: Func_void, update: Func_void_AutoText_std__optional_AutoText_): NavigationAlertCallbacks {
|
|
42
|
-
return NavigationAlertCallbacks(dismiss, update)
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// Func_void_AutoText_std__optional_AutoText_.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Wraps a Swift `(_ title: AutoText, _ subtitle: AutoText?) -> Void` as a class.
|
|
13
|
-
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
-
*/
|
|
15
|
-
public final class Func_void_AutoText_std__optional_AutoText_ {
|
|
16
|
-
public typealias bridge = margelo.nitro.swe.iternio.reactnativeautoplay.bridge.swift
|
|
17
|
-
|
|
18
|
-
private let closure: (_ title: AutoText, _ subtitle: AutoText?) -> Void
|
|
19
|
-
|
|
20
|
-
public init(_ closure: @escaping (_ title: AutoText, _ subtitle: AutoText?) -> Void) {
|
|
21
|
-
self.closure = closure
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@inline(__always)
|
|
25
|
-
public func call(title: AutoText, subtitle: bridge.std__optional_AutoText_) -> Void {
|
|
26
|
-
self.closure(title, subtitle.value)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Casts this instance to a retained unsafe raw pointer.
|
|
31
|
-
* This acquires one additional strong reference on the object!
|
|
32
|
-
*/
|
|
33
|
-
@inline(__always)
|
|
34
|
-
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
35
|
-
return Unmanaged.passRetained(self).toOpaque()
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Casts an unsafe pointer to a `Func_void_AutoText_std__optional_AutoText_`.
|
|
40
|
-
* The pointer has to be a retained opaque `Unmanaged<Func_void_AutoText_std__optional_AutoText_>`.
|
|
41
|
-
* This removes one strong reference from the object!
|
|
42
|
-
*/
|
|
43
|
-
@inline(__always)
|
|
44
|
-
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_AutoText_std__optional_AutoText_ {
|
|
45
|
-
return Unmanaged<Func_void_AutoText_std__optional_AutoText_>.fromOpaque(pointer).takeRetainedValue()
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NavigationAlertCallbacks.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Represents an instance of `NavigationAlertCallbacks`, backed by a C++ struct.
|
|
12
|
-
*/
|
|
13
|
-
public typealias NavigationAlertCallbacks = margelo.nitro.swe.iternio.reactnativeautoplay.NavigationAlertCallbacks
|
|
14
|
-
|
|
15
|
-
public extension NavigationAlertCallbacks {
|
|
16
|
-
private typealias bridge = margelo.nitro.swe.iternio.reactnativeautoplay.bridge.swift
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Create a new instance of `NavigationAlertCallbacks`.
|
|
20
|
-
*/
|
|
21
|
-
init(dismiss: @escaping () -> Void, update: @escaping (_ title: AutoText, _ subtitle: AutoText?) -> Void) {
|
|
22
|
-
self.init({ () -> bridge.Func_void in
|
|
23
|
-
let __closureWrapper = Func_void(dismiss)
|
|
24
|
-
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
25
|
-
}(), { () -> bridge.Func_void_AutoText_std__optional_AutoText_ in
|
|
26
|
-
let __closureWrapper = Func_void_AutoText_std__optional_AutoText_(update)
|
|
27
|
-
return bridge.create_Func_void_AutoText_std__optional_AutoText_(__closureWrapper.toUnsafe())
|
|
28
|
-
}())
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var dismiss: () -> Void {
|
|
32
|
-
@inline(__always)
|
|
33
|
-
get {
|
|
34
|
-
return { () -> () -> Void in
|
|
35
|
-
let __wrappedFunction = bridge.wrap_Func_void(self.__dismiss)
|
|
36
|
-
return { () -> Void in
|
|
37
|
-
__wrappedFunction.call()
|
|
38
|
-
}
|
|
39
|
-
}()
|
|
40
|
-
}
|
|
41
|
-
@inline(__always)
|
|
42
|
-
set {
|
|
43
|
-
self.__dismiss = { () -> bridge.Func_void in
|
|
44
|
-
let __closureWrapper = Func_void(newValue)
|
|
45
|
-
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
46
|
-
}()
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
var update: (_ title: AutoText, _ subtitle: AutoText?) -> Void {
|
|
51
|
-
@inline(__always)
|
|
52
|
-
get {
|
|
53
|
-
return { () -> (AutoText, AutoText?) -> Void in
|
|
54
|
-
let __wrappedFunction = bridge.wrap_Func_void_AutoText_std__optional_AutoText_(self.__update)
|
|
55
|
-
return { (__title: AutoText, __subtitle: AutoText?) -> Void in
|
|
56
|
-
__wrappedFunction.call(__title, { () -> bridge.std__optional_AutoText_ in
|
|
57
|
-
if let __unwrappedValue = __subtitle {
|
|
58
|
-
return bridge.create_std__optional_AutoText_(__unwrappedValue)
|
|
59
|
-
} else {
|
|
60
|
-
return .init()
|
|
61
|
-
}
|
|
62
|
-
}())
|
|
63
|
-
}
|
|
64
|
-
}()
|
|
65
|
-
}
|
|
66
|
-
@inline(__always)
|
|
67
|
-
set {
|
|
68
|
-
self.__update = { () -> bridge.Func_void_AutoText_std__optional_AutoText_ in
|
|
69
|
-
let __closureWrapper = Func_void_AutoText_std__optional_AutoText_(newValue)
|
|
70
|
-
return bridge.create_Func_void_AutoText_std__optional_AutoText_(__closureWrapper.toUnsafe())
|
|
71
|
-
}()
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NavigationAlertCallbacks.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
-
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
-
#else
|
|
13
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
-
#endif
|
|
15
|
-
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
-
#else
|
|
18
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
-
#endif
|
|
20
|
-
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
-
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
-
#else
|
|
23
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
-
#endif
|
|
25
|
-
|
|
26
|
-
// Forward declaration of `AutoText` to properly resolve imports.
|
|
27
|
-
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AutoText; }
|
|
28
|
-
|
|
29
|
-
#include <functional>
|
|
30
|
-
#include "AutoText.hpp"
|
|
31
|
-
#include <optional>
|
|
32
|
-
|
|
33
|
-
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* A struct which can be represented as a JavaScript object (NavigationAlertCallbacks).
|
|
37
|
-
*/
|
|
38
|
-
struct NavigationAlertCallbacks {
|
|
39
|
-
public:
|
|
40
|
-
std::function<void()> dismiss SWIFT_PRIVATE;
|
|
41
|
-
std::function<void(const AutoText& /* title */, const std::optional<AutoText>& /* subtitle */)> update SWIFT_PRIVATE;
|
|
42
|
-
|
|
43
|
-
public:
|
|
44
|
-
NavigationAlertCallbacks() = default;
|
|
45
|
-
explicit NavigationAlertCallbacks(std::function<void()> dismiss, std::function<void(const AutoText& /* title */, const std::optional<AutoText>& /* subtitle */)> update): dismiss(dismiss), update(update) {}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
49
|
-
|
|
50
|
-
namespace margelo::nitro {
|
|
51
|
-
|
|
52
|
-
// C++ NavigationAlertCallbacks <> JS NavigationAlertCallbacks (object)
|
|
53
|
-
template <>
|
|
54
|
-
struct JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertCallbacks> final {
|
|
55
|
-
static inline margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertCallbacks fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
57
|
-
return margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertCallbacks(
|
|
58
|
-
JSIConverter<std::function<void()>>::fromJSI(runtime, obj.getProperty(runtime, "dismiss")),
|
|
59
|
-
JSIConverter<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::AutoText&, const std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>&)>>::fromJSI(runtime, obj.getProperty(runtime, "update"))
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertCallbacks& arg) {
|
|
63
|
-
jsi::Object obj(runtime);
|
|
64
|
-
obj.setProperty(runtime, "dismiss", JSIConverter<std::function<void()>>::toJSI(runtime, arg.dismiss));
|
|
65
|
-
obj.setProperty(runtime, "update", JSIConverter<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::AutoText&, const std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>&)>>::toJSI(runtime, arg.update));
|
|
66
|
-
return obj;
|
|
67
|
-
}
|
|
68
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
69
|
-
if (!value.isObject()) {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
jsi::Object obj = value.getObject(runtime);
|
|
73
|
-
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
if (!JSIConverter<std::function<void()>>::canConvert(runtime, obj.getProperty(runtime, "dismiss"))) return false;
|
|
77
|
-
if (!JSIConverter<std::function<void(const margelo::nitro::swe::iternio::reactnativeautoplay::AutoText&, const std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>&)>>::canConvert(runtime, obj.getProperty(runtime, "update"))) return false;
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
} // namespace margelo::nitro
|