aix 0.6.0 → 0.6.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/ios/EditMenuDefaultActions.swift +70 -0
- package/ios/HybridAix.swift +28 -3
- package/ios/HybridAixCellView.swift +0 -1
- package/ios/HybridAixComposer.swift +82 -0
- package/ios/HybridAixDropzone.swift +104 -0
- package/ios/HybridAixInputWrapper.swift +447 -0
- package/ios/InputType.swift +40 -0
- package/ios/PasteFileManager.swift +92 -0
- package/nitro.json +8 -0
- package/nitrogen/generated/android/Aix+autolinking.cmake +8 -0
- package/nitrogen/generated/android/AixOnLoad.cpp +26 -0
- package/nitrogen/generated/android/c++/JAixInputWrapperOnPasteEvent.hpp +70 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_AixInputWrapperOnPasteEvent_.hpp +98 -0
- package/nitrogen/generated/android/c++/JHybridAixComposerSpec.cpp +9 -0
- package/nitrogen/generated/android/c++/JHybridAixComposerSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/JHybridAixDropzoneSpec.cpp +72 -0
- package/nitrogen/generated/android/c++/JHybridAixDropzoneSpec.hpp +66 -0
- package/nitrogen/generated/android/c++/JHybridAixInputWrapperSpec.cpp +144 -0
- package/nitrogen/generated/android/c++/JHybridAixInputWrapperSpec.hpp +74 -0
- package/nitrogen/generated/android/c++/views/JHybridAixComposerStateUpdater.cpp +4 -0
- package/nitrogen/generated/android/c++/views/JHybridAixDropzoneStateUpdater.cpp +56 -0
- package/nitrogen/generated/android/c++/views/JHybridAixDropzoneStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/c++/views/JHybridAixInputWrapperStateUpdater.cpp +72 -0
- package/nitrogen/generated/android/c++/views/JHybridAixInputWrapperStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixInputWrapperOnPasteEvent.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/Func_void_std__vector_AixInputWrapperOnPasteEvent_.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixComposerSpec.kt +6 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixDropzoneSpec.kt +67 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixInputWrapperSpec.kt +91 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixDropzoneManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixDropzoneStateUpdater.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixInputWrapperManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixInputWrapperStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/Aix-Swift-Cxx-Bridge.cpp +42 -0
- package/nitrogen/generated/ios/Aix-Swift-Cxx-Bridge.hpp +112 -0
- package/nitrogen/generated/ios/Aix-Swift-Cxx-Umbrella.hpp +14 -0
- package/nitrogen/generated/ios/AixAutolinking.mm +16 -0
- package/nitrogen/generated/ios/AixAutolinking.swift +30 -0
- package/nitrogen/generated/ios/c++/HybridAixComposerSpecSwift.hpp +7 -0
- package/nitrogen/generated/ios/c++/HybridAixDropzoneSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridAixDropzoneSpecSwift.hpp +80 -0
- package/nitrogen/generated/ios/c++/HybridAixInputWrapperSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridAixInputWrapperSpecSwift.hpp +108 -0
- package/nitrogen/generated/ios/c++/views/HybridAixComposerComponent.mm +5 -0
- package/nitrogen/generated/ios/c++/views/HybridAixDropzoneComponent.mm +96 -0
- package/nitrogen/generated/ios/c++/views/HybridAixInputWrapperComponent.mm +116 -0
- package/nitrogen/generated/ios/swift/AixInputWrapperOnPasteEvent.swift +107 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AixInputWrapperOnPasteEvent_.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridAixComposerSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridAixComposerSpec_cxx.swift +24 -0
- package/nitrogen/generated/ios/swift/HybridAixDropzoneSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridAixDropzoneSpec_cxx.swift +167 -0
- package/nitrogen/generated/ios/swift/HybridAixInputWrapperSpec.swift +60 -0
- package/nitrogen/generated/ios/swift/HybridAixInputWrapperSpec_cxx.swift +261 -0
- package/nitrogen/generated/shared/c++/AixInputWrapperOnPasteEvent.hpp +88 -0
- package/nitrogen/generated/shared/c++/HybridAixComposerSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridAixComposerSpec.hpp +2 -0
- package/nitrogen/generated/shared/c++/HybridAixDropzoneSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridAixDropzoneSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridAixInputWrapperSpec.cpp +30 -0
- package/nitrogen/generated/shared/c++/HybridAixInputWrapperSpec.hpp +76 -0
- package/nitrogen/generated/shared/c++/views/HybridAixComposerComponent.cpp +12 -0
- package/nitrogen/generated/shared/c++/views/HybridAixComposerComponent.hpp +1 -0
- package/nitrogen/generated/shared/c++/views/HybridAixDropzoneComponent.cpp +87 -0
- package/nitrogen/generated/shared/c++/views/HybridAixDropzoneComponent.hpp +109 -0
- package/nitrogen/generated/shared/c++/views/HybridAixInputWrapperComponent.cpp +135 -0
- package/nitrogen/generated/shared/c++/views/HybridAixInputWrapperComponent.hpp +114 -0
- package/nitrogen/generated/shared/json/AixComposerConfig.json +1 -0
- package/nitrogen/generated/shared/json/AixDropzoneConfig.json +10 -0
- package/nitrogen/generated/shared/json/AixInputWrapperConfig.json +14 -0
- package/package.json +1 -1
- package/src/dropzone.ios.tsx +27 -0
- package/src/dropzone.tsx +10 -0
- package/src/index.ts +3 -0
- package/src/input-wrapper.ios.tsx +30 -0
- package/src/input-wrapper.tsx +17 -0
- package/src/views/aix.nitro.ts +33 -19
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHybridAixInputWrapperStateUpdater.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "JHybridAixInputWrapperStateUpdater.hpp"
|
|
9
|
+
#include "views/HybridAixInputWrapperComponent.hpp"
|
|
10
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
11
|
+
|
|
12
|
+
namespace margelo::nitro::aix::views {
|
|
13
|
+
|
|
14
|
+
using namespace facebook;
|
|
15
|
+
using ConcreteStateData = react::ConcreteState<HybridAixInputWrapperState>;
|
|
16
|
+
|
|
17
|
+
void JHybridAixInputWrapperStateUpdater::updateViewProps(jni::alias_ref<jni::JClass> /* class */,
|
|
18
|
+
jni::alias_ref<JHybridAixInputWrapperSpec::javaobject> javaView,
|
|
19
|
+
jni::alias_ref<JStateWrapper::javaobject> stateWrapperInterface) {
|
|
20
|
+
JHybridAixInputWrapperSpec* view = javaView->cthis();
|
|
21
|
+
|
|
22
|
+
// Get concrete StateWrapperImpl from passed StateWrapper interface object
|
|
23
|
+
jobject rawStateWrapper = stateWrapperInterface.get();
|
|
24
|
+
if (!stateWrapperInterface->isInstanceOf(react::StateWrapperImpl::javaClassStatic())) {
|
|
25
|
+
throw std::runtime_error("StateWrapper is not a StateWrapperImpl");
|
|
26
|
+
}
|
|
27
|
+
auto stateWrapper = jni::alias_ref<react::StateWrapperImpl::javaobject>{
|
|
28
|
+
static_cast<react::StateWrapperImpl::javaobject>(rawStateWrapper)};
|
|
29
|
+
|
|
30
|
+
std::shared_ptr<const react::State> state = stateWrapper->cthis()->getState();
|
|
31
|
+
auto concreteState = std::dynamic_pointer_cast<const ConcreteStateData>(state);
|
|
32
|
+
const HybridAixInputWrapperState& data = concreteState->getData();
|
|
33
|
+
const std::optional<HybridAixInputWrapperProps>& maybeProps = data.getProps();
|
|
34
|
+
if (!maybeProps.has_value()) {
|
|
35
|
+
// Props aren't set yet!
|
|
36
|
+
throw std::runtime_error("HybridAixInputWrapperState's data doesn't contain any props!");
|
|
37
|
+
}
|
|
38
|
+
const HybridAixInputWrapperProps& props = maybeProps.value();
|
|
39
|
+
if (props.pasteConfiguration.isDirty) {
|
|
40
|
+
view->setPasteConfiguration(props.pasteConfiguration.value);
|
|
41
|
+
// TODO: Set isDirty = false
|
|
42
|
+
}
|
|
43
|
+
if (props.editMenuDefaultActions.isDirty) {
|
|
44
|
+
view->setEditMenuDefaultActions(props.editMenuDefaultActions.value);
|
|
45
|
+
// TODO: Set isDirty = false
|
|
46
|
+
}
|
|
47
|
+
if (props.maxLines.isDirty) {
|
|
48
|
+
view->setMaxLines(props.maxLines.value);
|
|
49
|
+
// TODO: Set isDirty = false
|
|
50
|
+
}
|
|
51
|
+
if (props.maxChars.isDirty) {
|
|
52
|
+
view->setMaxChars(props.maxChars.value);
|
|
53
|
+
// TODO: Set isDirty = false
|
|
54
|
+
}
|
|
55
|
+
if (props.onPaste.isDirty) {
|
|
56
|
+
view->setOnPaste(props.onPaste.value);
|
|
57
|
+
// TODO: Set isDirty = false
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Update hybridRef if it changed
|
|
61
|
+
if (props.hybridRef.isDirty) {
|
|
62
|
+
// hybridRef changed - call it with new this
|
|
63
|
+
const auto& maybeFunc = props.hybridRef.value;
|
|
64
|
+
if (maybeFunc.has_value()) {
|
|
65
|
+
std::shared_ptr<JHybridAixInputWrapperSpec> shared = javaView->cthis()->shared_cast<JHybridAixInputWrapperSpec>();
|
|
66
|
+
maybeFunc.value()(shared);
|
|
67
|
+
}
|
|
68
|
+
// TODO: Set isDirty = false
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
} // namespace margelo::nitro::aix::views
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHybridAixInputWrapperStateUpdater.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#ifndef RN_SERIALIZABLE_STATE
|
|
11
|
+
#error Aix was compiled without the 'RN_SERIALIZABLE_STATE' flag. This flag is required for Nitro Views - set it in your CMakeLists!
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
#include <fbjni/fbjni.h>
|
|
15
|
+
#include <react/fabric/StateWrapperImpl.h>
|
|
16
|
+
#include <react/fabric/CoreComponentsRegistry.h>
|
|
17
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
18
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
19
|
+
#include <NitroModules/JStateWrapper.hpp>
|
|
20
|
+
#include "JHybridAixInputWrapperSpec.hpp"
|
|
21
|
+
#include "views/HybridAixInputWrapperComponent.hpp"
|
|
22
|
+
|
|
23
|
+
namespace margelo::nitro::aix::views {
|
|
24
|
+
|
|
25
|
+
using namespace facebook;
|
|
26
|
+
|
|
27
|
+
class JHybridAixInputWrapperStateUpdater: public jni::JavaClass<JHybridAixInputWrapperStateUpdater> {
|
|
28
|
+
public:
|
|
29
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/aix/views/HybridAixInputWrapperStateUpdater;";
|
|
30
|
+
|
|
31
|
+
public:
|
|
32
|
+
static void updateViewProps(jni::alias_ref<jni::JClass> /* class */,
|
|
33
|
+
jni::alias_ref<JHybridAixInputWrapperSpec::javaobject> view,
|
|
34
|
+
jni::alias_ref<JStateWrapper::javaobject> stateWrapperInterface);
|
|
35
|
+
|
|
36
|
+
public:
|
|
37
|
+
static void registerNatives() {
|
|
38
|
+
// Register JNI calls
|
|
39
|
+
javaClassStatic()->registerNatives({
|
|
40
|
+
makeNativeMethod("updateViewProps", JHybridAixInputWrapperStateUpdater::updateViewProps),
|
|
41
|
+
});
|
|
42
|
+
// Register React Native view component descriptor
|
|
43
|
+
auto provider = react::concreteComponentDescriptorProvider<HybridAixInputWrapperComponentDescriptor>();
|
|
44
|
+
auto providerRegistry = react::CoreComponentsRegistry::sharedProviderRegistry();
|
|
45
|
+
providerRegistry->add(provider);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
} // namespace margelo::nitro::aix::views
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixInputWrapperOnPasteEvent.kt
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AixInputWrapperOnPasteEvent.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.aix
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "AixInputWrapperOnPasteEvent".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class AixInputWrapperOnPasteEvent(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val type: String,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val filePath: String,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val fileExtension: String?,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val fileName: String?
|
|
32
|
+
) {
|
|
33
|
+
/* primary constructor */
|
|
34
|
+
|
|
35
|
+
private companion object {
|
|
36
|
+
/**
|
|
37
|
+
* Constructor called from C++
|
|
38
|
+
*/
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
@Suppress("unused")
|
|
42
|
+
@JvmStatic
|
|
43
|
+
private fun fromCpp(type: String, filePath: String, fileExtension: String?, fileName: String?): AixInputWrapperOnPasteEvent {
|
|
44
|
+
return AixInputWrapperOnPasteEvent(type, filePath, fileExtension, fileName)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__vector_AixInputWrapperOnPasteEvent_.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.aix
|
|
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 `(events: array) => 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_std__vector_AixInputWrapperOnPasteEvent_: (Array<AixInputWrapperOnPasteEvent>) -> 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(events: Array<AixInputWrapperOnPasteEvent>): Unit
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Represents the JavaScript callback `(events: array) => 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_std__vector_AixInputWrapperOnPasteEvent__cxx: Func_void_std__vector_AixInputWrapperOnPasteEvent_ {
|
|
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(events: Array<AixInputWrapperOnPasteEvent>): Unit
|
|
60
|
+
= invoke_cxx(events)
|
|
61
|
+
|
|
62
|
+
@FastNative
|
|
63
|
+
private external fun invoke_cxx(events: Array<AixInputWrapperOnPasteEvent>): Unit
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Represents the JavaScript callback `(events: array) => void`.
|
|
68
|
+
* This is implemented in Java/Kotlin, via a `(Array<AixInputWrapperOnPasteEvent>) -> Unit`.
|
|
69
|
+
* The callback is always coming from native.
|
|
70
|
+
*/
|
|
71
|
+
@DoNotStrip
|
|
72
|
+
@Keep
|
|
73
|
+
@Suppress("ClassName", "RedundantUnitReturnType", "unused")
|
|
74
|
+
class Func_void_std__vector_AixInputWrapperOnPasteEvent__java(private val function: (Array<AixInputWrapperOnPasteEvent>) -> Unit): Func_void_std__vector_AixInputWrapperOnPasteEvent_ {
|
|
75
|
+
@DoNotStrip
|
|
76
|
+
@Keep
|
|
77
|
+
override fun invoke(events: Array<AixInputWrapperOnPasteEvent>): Unit {
|
|
78
|
+
return this.function(events)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -47,6 +47,12 @@ abstract class HybridAixComposerSpec: HybridView() {
|
|
|
47
47
|
@set:DoNotStrip
|
|
48
48
|
@set:Keep
|
|
49
49
|
abstract var stickToKeyboard: AixStickToKeyboard?
|
|
50
|
+
|
|
51
|
+
@get:DoNotStrip
|
|
52
|
+
@get:Keep
|
|
53
|
+
@set:DoNotStrip
|
|
54
|
+
@set:Keep
|
|
55
|
+
abstract var fixInput: Boolean?
|
|
50
56
|
|
|
51
57
|
// Methods
|
|
52
58
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAixDropzoneSpec.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.aix
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.jni.HybridData
|
|
12
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
+
import com.margelo.nitro.views.HybridView
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A Kotlin class representing the AixDropzone HybridObject.
|
|
17
|
+
* Implement this abstract class to create Kotlin-based instances of AixDropzone.
|
|
18
|
+
*/
|
|
19
|
+
@DoNotStrip
|
|
20
|
+
@Keep
|
|
21
|
+
@Suppress(
|
|
22
|
+
"KotlinJniMissingFunction", "unused",
|
|
23
|
+
"RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
|
|
24
|
+
"LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
|
|
25
|
+
)
|
|
26
|
+
abstract class HybridAixDropzoneSpec: HybridView() {
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
private var mHybridData: HybridData = initHybrid()
|
|
29
|
+
|
|
30
|
+
init {
|
|
31
|
+
super.updateNative(mHybridData)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
override fun updateNative(hybridData: HybridData) {
|
|
35
|
+
mHybridData = hybridData
|
|
36
|
+
super.updateNative(hybridData)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Default implementation of `HybridObject.toString()`
|
|
40
|
+
override fun toString(): String {
|
|
41
|
+
return "[HybridObject AixDropzone]"
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Properties
|
|
45
|
+
abstract var onDrop: ((events: Array<AixInputWrapperOnPasteEvent>) -> Unit)?
|
|
46
|
+
|
|
47
|
+
private var onDrop_cxx: Func_void_std__vector_AixInputWrapperOnPasteEvent_?
|
|
48
|
+
@Keep
|
|
49
|
+
@DoNotStrip
|
|
50
|
+
get() {
|
|
51
|
+
return onDrop?.let { Func_void_std__vector_AixInputWrapperOnPasteEvent__java(it) }
|
|
52
|
+
}
|
|
53
|
+
@Keep
|
|
54
|
+
@DoNotStrip
|
|
55
|
+
set(value) {
|
|
56
|
+
onDrop = value?.let { it }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Methods
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
private external fun initHybrid(): HybridData
|
|
63
|
+
|
|
64
|
+
companion object {
|
|
65
|
+
protected const val TAG = "HybridAixDropzoneSpec"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAixInputWrapperSpec.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.aix
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.jni.HybridData
|
|
12
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
+
import com.margelo.nitro.views.HybridView
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A Kotlin class representing the AixInputWrapper HybridObject.
|
|
17
|
+
* Implement this abstract class to create Kotlin-based instances of AixInputWrapper.
|
|
18
|
+
*/
|
|
19
|
+
@DoNotStrip
|
|
20
|
+
@Keep
|
|
21
|
+
@Suppress(
|
|
22
|
+
"KotlinJniMissingFunction", "unused",
|
|
23
|
+
"RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
|
|
24
|
+
"LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
|
|
25
|
+
)
|
|
26
|
+
abstract class HybridAixInputWrapperSpec: HybridView() {
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
private var mHybridData: HybridData = initHybrid()
|
|
29
|
+
|
|
30
|
+
init {
|
|
31
|
+
super.updateNative(mHybridData)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
override fun updateNative(hybridData: HybridData) {
|
|
35
|
+
mHybridData = hybridData
|
|
36
|
+
super.updateNative(hybridData)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Default implementation of `HybridObject.toString()`
|
|
40
|
+
override fun toString(): String {
|
|
41
|
+
return "[HybridObject AixInputWrapper]"
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Properties
|
|
45
|
+
@get:DoNotStrip
|
|
46
|
+
@get:Keep
|
|
47
|
+
@set:DoNotStrip
|
|
48
|
+
@set:Keep
|
|
49
|
+
abstract var pasteConfiguration: Array<String>?
|
|
50
|
+
|
|
51
|
+
@get:DoNotStrip
|
|
52
|
+
@get:Keep
|
|
53
|
+
@set:DoNotStrip
|
|
54
|
+
@set:Keep
|
|
55
|
+
abstract var editMenuDefaultActions: Array<String>?
|
|
56
|
+
|
|
57
|
+
@get:DoNotStrip
|
|
58
|
+
@get:Keep
|
|
59
|
+
@set:DoNotStrip
|
|
60
|
+
@set:Keep
|
|
61
|
+
abstract var maxLines: Double?
|
|
62
|
+
|
|
63
|
+
@get:DoNotStrip
|
|
64
|
+
@get:Keep
|
|
65
|
+
@set:DoNotStrip
|
|
66
|
+
@set:Keep
|
|
67
|
+
abstract var maxChars: Double?
|
|
68
|
+
|
|
69
|
+
abstract var onPaste: ((events: Array<AixInputWrapperOnPasteEvent>) -> Unit)?
|
|
70
|
+
|
|
71
|
+
private var onPaste_cxx: Func_void_std__vector_AixInputWrapperOnPasteEvent_?
|
|
72
|
+
@Keep
|
|
73
|
+
@DoNotStrip
|
|
74
|
+
get() {
|
|
75
|
+
return onPaste?.let { Func_void_std__vector_AixInputWrapperOnPasteEvent__java(it) }
|
|
76
|
+
}
|
|
77
|
+
@Keep
|
|
78
|
+
@DoNotStrip
|
|
79
|
+
set(value) {
|
|
80
|
+
onPaste = value?.let { it }
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Methods
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
private external fun initHybrid(): HybridData
|
|
87
|
+
|
|
88
|
+
companion object {
|
|
89
|
+
protected const val TAG = "HybridAixInputWrapperSpec"
|
|
90
|
+
}
|
|
91
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixDropzoneManager.kt
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAixDropzoneManager.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.aix.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.aix.*
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Represents the React Native `ViewManager` for the "AixDropzone" Nitro HybridView.
|
|
19
|
+
*/
|
|
20
|
+
open class HybridAixDropzoneManager: SimpleViewManager<View>() {
|
|
21
|
+
private val views = hashMapOf<View, HybridAixDropzone>()
|
|
22
|
+
|
|
23
|
+
override fun getName(): String {
|
|
24
|
+
return "AixDropzone"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
override fun createViewInstance(reactContext: ThemedReactContext): View {
|
|
28
|
+
val hybridView = HybridAixDropzone(reactContext)
|
|
29
|
+
val view = hybridView.view
|
|
30
|
+
views[view] = hybridView
|
|
31
|
+
return view
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
override fun onDropViewInstance(view: View) {
|
|
35
|
+
super.onDropViewInstance(view)
|
|
36
|
+
views.remove(view)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
override fun updateState(view: View, props: ReactStylesDiffMap, stateWrapper: StateWrapper): Any? {
|
|
40
|
+
val hybridView = views[view] ?: throw Error("Couldn't find view $view in local views table!")
|
|
41
|
+
|
|
42
|
+
// 1. Update each prop individually
|
|
43
|
+
hybridView.beforeUpdate()
|
|
44
|
+
HybridAixDropzoneStateUpdater.updateViewProps(hybridView, stateWrapper)
|
|
45
|
+
hybridView.afterUpdate()
|
|
46
|
+
|
|
47
|
+
// 2. Continue in base View props
|
|
48
|
+
return super.updateState(view, props, stateWrapper)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAixDropzoneStateUpdater.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.aix.views
|
|
9
|
+
|
|
10
|
+
import com.facebook.react.uimanager.StateWrapper
|
|
11
|
+
import com.margelo.nitro.aix.*
|
|
12
|
+
|
|
13
|
+
internal class HybridAixDropzoneStateUpdater {
|
|
14
|
+
companion object {
|
|
15
|
+
/**
|
|
16
|
+
* Updates the props for [view] through C++.
|
|
17
|
+
* The [state] prop is expected to contain [view]'s props as wrapped Fabric state.
|
|
18
|
+
*/
|
|
19
|
+
@Suppress("KotlinJniMissingFunction")
|
|
20
|
+
@JvmStatic
|
|
21
|
+
external fun updateViewProps(view: HybridAixDropzoneSpec, state: StateWrapper)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAixInputWrapperManager.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.aix.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.aix.*
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Represents the React Native `ViewManager` for the "AixInputWrapper" Nitro HybridView.
|
|
19
|
+
*/
|
|
20
|
+
open class HybridAixInputWrapperManager: SimpleViewManager<View>() {
|
|
21
|
+
private val views = hashMapOf<View, HybridAixInputWrapper>()
|
|
22
|
+
|
|
23
|
+
override fun getName(): String {
|
|
24
|
+
return "AixInputWrapper"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
override fun createViewInstance(reactContext: ThemedReactContext): View {
|
|
28
|
+
val hybridView = HybridAixInputWrapper(reactContext)
|
|
29
|
+
val view = hybridView.view
|
|
30
|
+
views[view] = hybridView
|
|
31
|
+
return view
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
override fun onDropViewInstance(view: View) {
|
|
35
|
+
super.onDropViewInstance(view)
|
|
36
|
+
views.remove(view)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
override fun updateState(view: View, props: ReactStylesDiffMap, stateWrapper: StateWrapper): Any? {
|
|
40
|
+
val hybridView = views[view] ?: throw Error("Couldn't find view $view in local views table!")
|
|
41
|
+
|
|
42
|
+
// 1. Update each prop individually
|
|
43
|
+
hybridView.beforeUpdate()
|
|
44
|
+
HybridAixInputWrapperStateUpdater.updateViewProps(hybridView, stateWrapper)
|
|
45
|
+
hybridView.afterUpdate()
|
|
46
|
+
|
|
47
|
+
// 2. Continue in base View props
|
|
48
|
+
return super.updateState(view, props, stateWrapper)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAixInputWrapperStateUpdater.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.aix.views
|
|
9
|
+
|
|
10
|
+
import com.facebook.react.uimanager.StateWrapper
|
|
11
|
+
import com.margelo.nitro.aix.*
|
|
12
|
+
|
|
13
|
+
internal class HybridAixInputWrapperStateUpdater {
|
|
14
|
+
companion object {
|
|
15
|
+
/**
|
|
16
|
+
* Updates the props for [view] through C++.
|
|
17
|
+
* The [state] prop is expected to contain [view]'s props as wrapped Fabric state.
|
|
18
|
+
*/
|
|
19
|
+
@Suppress("KotlinJniMissingFunction")
|
|
20
|
+
@JvmStatic
|
|
21
|
+
external fun updateViewProps(view: HybridAixInputWrapperSpec, state: StateWrapper)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
#include "Aix-Swift-Cxx-Umbrella.hpp"
|
|
12
12
|
#include "HybridAixCellViewSpecSwift.hpp"
|
|
13
13
|
#include "HybridAixComposerSpecSwift.hpp"
|
|
14
|
+
#include "HybridAixDropzoneSpecSwift.hpp"
|
|
15
|
+
#include "HybridAixInputWrapperSpecSwift.hpp"
|
|
14
16
|
#include "HybridAixSpecSwift.hpp"
|
|
15
17
|
#include <NitroModules/NitroDefines.hpp>
|
|
16
18
|
|
|
@@ -79,5 +81,45 @@ namespace margelo::nitro::aix::bridge::swift {
|
|
|
79
81
|
Aix::HybridAixComposerSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
80
82
|
return swiftPart.toUnsafe();
|
|
81
83
|
}
|
|
84
|
+
|
|
85
|
+
// pragma MARK: std::function<void(const std::vector<AixInputWrapperOnPasteEvent>& /* events */)>
|
|
86
|
+
Func_void_std__vector_AixInputWrapperOnPasteEvent_ create_Func_void_std__vector_AixInputWrapperOnPasteEvent_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
87
|
+
auto swiftClosure = Aix::Func_void_std__vector_AixInputWrapperOnPasteEvent_::fromUnsafe(swiftClosureWrapper);
|
|
88
|
+
return [swiftClosure = std::move(swiftClosure)](const std::vector<AixInputWrapperOnPasteEvent>& events) mutable -> void {
|
|
89
|
+
swiftClosure.call(events);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// pragma MARK: std::shared_ptr<HybridAixInputWrapperSpec>
|
|
94
|
+
std::shared_ptr<HybridAixInputWrapperSpec> create_std__shared_ptr_HybridAixInputWrapperSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
95
|
+
Aix::HybridAixInputWrapperSpec_cxx swiftPart = Aix::HybridAixInputWrapperSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
96
|
+
return std::make_shared<margelo::nitro::aix::HybridAixInputWrapperSpecSwift>(swiftPart);
|
|
97
|
+
}
|
|
98
|
+
void* NON_NULL get_std__shared_ptr_HybridAixInputWrapperSpec_(std__shared_ptr_HybridAixInputWrapperSpec_ cppType) {
|
|
99
|
+
std::shared_ptr<margelo::nitro::aix::HybridAixInputWrapperSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::aix::HybridAixInputWrapperSpecSwift>(cppType);
|
|
100
|
+
#ifdef NITRO_DEBUG
|
|
101
|
+
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
102
|
+
throw std::runtime_error("Class \"HybridAixInputWrapperSpec\" is not implemented in Swift!");
|
|
103
|
+
}
|
|
104
|
+
#endif
|
|
105
|
+
Aix::HybridAixInputWrapperSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
106
|
+
return swiftPart.toUnsafe();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// pragma MARK: std::shared_ptr<HybridAixDropzoneSpec>
|
|
110
|
+
std::shared_ptr<HybridAixDropzoneSpec> create_std__shared_ptr_HybridAixDropzoneSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
111
|
+
Aix::HybridAixDropzoneSpec_cxx swiftPart = Aix::HybridAixDropzoneSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
112
|
+
return std::make_shared<margelo::nitro::aix::HybridAixDropzoneSpecSwift>(swiftPart);
|
|
113
|
+
}
|
|
114
|
+
void* NON_NULL get_std__shared_ptr_HybridAixDropzoneSpec_(std__shared_ptr_HybridAixDropzoneSpec_ cppType) {
|
|
115
|
+
std::shared_ptr<margelo::nitro::aix::HybridAixDropzoneSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::aix::HybridAixDropzoneSpecSwift>(cppType);
|
|
116
|
+
#ifdef NITRO_DEBUG
|
|
117
|
+
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
118
|
+
throw std::runtime_error("Class \"HybridAixDropzoneSpec\" is not implemented in Swift!");
|
|
119
|
+
}
|
|
120
|
+
#endif
|
|
121
|
+
Aix::HybridAixDropzoneSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
122
|
+
return swiftPart.toUnsafe();
|
|
123
|
+
}
|
|
82
124
|
|
|
83
125
|
} // namespace margelo::nitro::aix::bridge::swift
|