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.
Files changed (77) hide show
  1. package/ios/EditMenuDefaultActions.swift +70 -0
  2. package/ios/HybridAix.swift +28 -3
  3. package/ios/HybridAixCellView.swift +0 -1
  4. package/ios/HybridAixComposer.swift +82 -0
  5. package/ios/HybridAixDropzone.swift +104 -0
  6. package/ios/HybridAixInputWrapper.swift +447 -0
  7. package/ios/InputType.swift +40 -0
  8. package/ios/PasteFileManager.swift +92 -0
  9. package/nitro.json +8 -0
  10. package/nitrogen/generated/android/Aix+autolinking.cmake +8 -0
  11. package/nitrogen/generated/android/AixOnLoad.cpp +26 -0
  12. package/nitrogen/generated/android/c++/JAixInputWrapperOnPasteEvent.hpp +70 -0
  13. package/nitrogen/generated/android/c++/JFunc_void_std__vector_AixInputWrapperOnPasteEvent_.hpp +98 -0
  14. package/nitrogen/generated/android/c++/JHybridAixComposerSpec.cpp +9 -0
  15. package/nitrogen/generated/android/c++/JHybridAixComposerSpec.hpp +2 -0
  16. package/nitrogen/generated/android/c++/JHybridAixDropzoneSpec.cpp +72 -0
  17. package/nitrogen/generated/android/c++/JHybridAixDropzoneSpec.hpp +66 -0
  18. package/nitrogen/generated/android/c++/JHybridAixInputWrapperSpec.cpp +144 -0
  19. package/nitrogen/generated/android/c++/JHybridAixInputWrapperSpec.hpp +74 -0
  20. package/nitrogen/generated/android/c++/views/JHybridAixComposerStateUpdater.cpp +4 -0
  21. package/nitrogen/generated/android/c++/views/JHybridAixDropzoneStateUpdater.cpp +56 -0
  22. package/nitrogen/generated/android/c++/views/JHybridAixDropzoneStateUpdater.hpp +49 -0
  23. package/nitrogen/generated/android/c++/views/JHybridAixInputWrapperStateUpdater.cpp +72 -0
  24. package/nitrogen/generated/android/c++/views/JHybridAixInputWrapperStateUpdater.hpp +49 -0
  25. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixInputWrapperOnPasteEvent.kt +47 -0
  26. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/Func_void_std__vector_AixInputWrapperOnPasteEvent_.kt +80 -0
  27. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixComposerSpec.kt +6 -0
  28. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixDropzoneSpec.kt +67 -0
  29. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixInputWrapperSpec.kt +91 -0
  30. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixDropzoneManager.kt +50 -0
  31. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixDropzoneStateUpdater.kt +23 -0
  32. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixInputWrapperManager.kt +50 -0
  33. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixInputWrapperStateUpdater.kt +23 -0
  34. package/nitrogen/generated/ios/Aix-Swift-Cxx-Bridge.cpp +42 -0
  35. package/nitrogen/generated/ios/Aix-Swift-Cxx-Bridge.hpp +112 -0
  36. package/nitrogen/generated/ios/Aix-Swift-Cxx-Umbrella.hpp +14 -0
  37. package/nitrogen/generated/ios/AixAutolinking.mm +16 -0
  38. package/nitrogen/generated/ios/AixAutolinking.swift +30 -0
  39. package/nitrogen/generated/ios/c++/HybridAixComposerSpecSwift.hpp +7 -0
  40. package/nitrogen/generated/ios/c++/HybridAixDropzoneSpecSwift.cpp +11 -0
  41. package/nitrogen/generated/ios/c++/HybridAixDropzoneSpecSwift.hpp +80 -0
  42. package/nitrogen/generated/ios/c++/HybridAixInputWrapperSpecSwift.cpp +11 -0
  43. package/nitrogen/generated/ios/c++/HybridAixInputWrapperSpecSwift.hpp +108 -0
  44. package/nitrogen/generated/ios/c++/views/HybridAixComposerComponent.mm +5 -0
  45. package/nitrogen/generated/ios/c++/views/HybridAixDropzoneComponent.mm +96 -0
  46. package/nitrogen/generated/ios/c++/views/HybridAixInputWrapperComponent.mm +116 -0
  47. package/nitrogen/generated/ios/swift/AixInputWrapperOnPasteEvent.swift +107 -0
  48. package/nitrogen/generated/ios/swift/Func_void_std__vector_AixInputWrapperOnPasteEvent_.swift +47 -0
  49. package/nitrogen/generated/ios/swift/HybridAixComposerSpec.swift +1 -0
  50. package/nitrogen/generated/ios/swift/HybridAixComposerSpec_cxx.swift +24 -0
  51. package/nitrogen/generated/ios/swift/HybridAixDropzoneSpec.swift +56 -0
  52. package/nitrogen/generated/ios/swift/HybridAixDropzoneSpec_cxx.swift +167 -0
  53. package/nitrogen/generated/ios/swift/HybridAixInputWrapperSpec.swift +60 -0
  54. package/nitrogen/generated/ios/swift/HybridAixInputWrapperSpec_cxx.swift +261 -0
  55. package/nitrogen/generated/shared/c++/AixInputWrapperOnPasteEvent.hpp +88 -0
  56. package/nitrogen/generated/shared/c++/HybridAixComposerSpec.cpp +2 -0
  57. package/nitrogen/generated/shared/c++/HybridAixComposerSpec.hpp +2 -0
  58. package/nitrogen/generated/shared/c++/HybridAixDropzoneSpec.cpp +22 -0
  59. package/nitrogen/generated/shared/c++/HybridAixDropzoneSpec.hpp +67 -0
  60. package/nitrogen/generated/shared/c++/HybridAixInputWrapperSpec.cpp +30 -0
  61. package/nitrogen/generated/shared/c++/HybridAixInputWrapperSpec.hpp +76 -0
  62. package/nitrogen/generated/shared/c++/views/HybridAixComposerComponent.cpp +12 -0
  63. package/nitrogen/generated/shared/c++/views/HybridAixComposerComponent.hpp +1 -0
  64. package/nitrogen/generated/shared/c++/views/HybridAixDropzoneComponent.cpp +87 -0
  65. package/nitrogen/generated/shared/c++/views/HybridAixDropzoneComponent.hpp +109 -0
  66. package/nitrogen/generated/shared/c++/views/HybridAixInputWrapperComponent.cpp +135 -0
  67. package/nitrogen/generated/shared/c++/views/HybridAixInputWrapperComponent.hpp +114 -0
  68. package/nitrogen/generated/shared/json/AixComposerConfig.json +1 -0
  69. package/nitrogen/generated/shared/json/AixDropzoneConfig.json +10 -0
  70. package/nitrogen/generated/shared/json/AixInputWrapperConfig.json +14 -0
  71. package/package.json +1 -1
  72. package/src/dropzone.ios.tsx +27 -0
  73. package/src/dropzone.tsx +10 -0
  74. package/src/index.ts +3 -0
  75. package/src/input-wrapper.ios.tsx +30 -0
  76. package/src/input-wrapper.tsx +17 -0
  77. package/src/views/aix.nitro.ts +33 -19
@@ -0,0 +1,261 @@
1
+ ///
2
+ /// HybridAixInputWrapperSpec_cxx.swift
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
+ import Foundation
9
+ import NitroModules
10
+
11
+ /**
12
+ * A class implementation that bridges HybridAixInputWrapperSpec over to C++.
13
+ * In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
14
+ *
15
+ * Also, some Swift types need to be bridged with special handling:
16
+ * - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
17
+ * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
18
+ * - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
19
+ */
20
+ open class HybridAixInputWrapperSpec_cxx {
21
+ /**
22
+ * The Swift <> C++ bridge's namespace (`margelo::nitro::aix::bridge::swift`)
23
+ * from `Aix-Swift-Cxx-Bridge.hpp`.
24
+ * This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
25
+ */
26
+ public typealias bridge = margelo.nitro.aix.bridge.swift
27
+
28
+ /**
29
+ * Holds an instance of the `HybridAixInputWrapperSpec` Swift protocol.
30
+ */
31
+ private var __implementation: any HybridAixInputWrapperSpec
32
+
33
+ /**
34
+ * Holds a weak pointer to the C++ class that wraps the Swift class.
35
+ */
36
+ private var __cxxPart: bridge.std__weak_ptr_HybridAixInputWrapperSpec_
37
+
38
+ /**
39
+ * Create a new `HybridAixInputWrapperSpec_cxx` that wraps the given `HybridAixInputWrapperSpec`.
40
+ * All properties and methods bridge to C++ types.
41
+ */
42
+ public init(_ implementation: any HybridAixInputWrapperSpec) {
43
+ self.__implementation = implementation
44
+ self.__cxxPart = .init()
45
+ /* no base class */
46
+ }
47
+
48
+ /**
49
+ * Get the actual `HybridAixInputWrapperSpec` instance this class wraps.
50
+ */
51
+ @inline(__always)
52
+ public func getHybridAixInputWrapperSpec() -> any HybridAixInputWrapperSpec {
53
+ return __implementation
54
+ }
55
+
56
+ /**
57
+ * Casts this instance to a retained unsafe raw pointer.
58
+ * This acquires one additional strong reference on the object!
59
+ */
60
+ public func toUnsafe() -> UnsafeMutableRawPointer {
61
+ return Unmanaged.passRetained(self).toOpaque()
62
+ }
63
+
64
+ /**
65
+ * Casts an unsafe pointer to a `HybridAixInputWrapperSpec_cxx`.
66
+ * The pointer has to be a retained opaque `Unmanaged<HybridAixInputWrapperSpec_cxx>`.
67
+ * This removes one strong reference from the object!
68
+ */
69
+ public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridAixInputWrapperSpec_cxx {
70
+ return Unmanaged<HybridAixInputWrapperSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
71
+ }
72
+
73
+ /**
74
+ * Gets (or creates) the C++ part of this Hybrid Object.
75
+ * The C++ part is a `std::shared_ptr<HybridAixInputWrapperSpec>`.
76
+ */
77
+ public func getCxxPart() -> bridge.std__shared_ptr_HybridAixInputWrapperSpec_ {
78
+ let cachedCxxPart = self.__cxxPart.lock()
79
+ if Bool(fromCxx: cachedCxxPart) {
80
+ return cachedCxxPart
81
+ } else {
82
+ let newCxxPart = bridge.create_std__shared_ptr_HybridAixInputWrapperSpec_(self.toUnsafe())
83
+ __cxxPart = bridge.weakify_std__shared_ptr_HybridAixInputWrapperSpec_(newCxxPart)
84
+ return newCxxPart
85
+ }
86
+ }
87
+
88
+
89
+
90
+ /**
91
+ * Get the memory size of the Swift class (plus size of any other allocations)
92
+ * so the JS VM can properly track it and garbage-collect the JS object if needed.
93
+ */
94
+ @inline(__always)
95
+ public var memorySize: Int {
96
+ return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
97
+ }
98
+
99
+ /**
100
+ * Call dispose() on the Swift class.
101
+ * This _may_ be called manually from JS.
102
+ */
103
+ @inline(__always)
104
+ public func dispose() {
105
+ self.__implementation.dispose()
106
+ }
107
+
108
+ /**
109
+ * Call toString() on the Swift class.
110
+ */
111
+ @inline(__always)
112
+ public func toString() -> String {
113
+ return self.__implementation.toString()
114
+ }
115
+
116
+ // Properties
117
+ public final var pasteConfiguration: bridge.std__optional_std__vector_std__string__ {
118
+ @inline(__always)
119
+ get {
120
+ return { () -> bridge.std__optional_std__vector_std__string__ in
121
+ if let __unwrappedValue = self.__implementation.pasteConfiguration {
122
+ return bridge.create_std__optional_std__vector_std__string__({ () -> bridge.std__vector_std__string_ in
123
+ var __vector = bridge.create_std__vector_std__string_(__unwrappedValue.count)
124
+ for __item in __unwrappedValue {
125
+ __vector.push_back(std.string(__item))
126
+ }
127
+ return __vector
128
+ }())
129
+ } else {
130
+ return .init()
131
+ }
132
+ }()
133
+ }
134
+ @inline(__always)
135
+ set {
136
+ self.__implementation.pasteConfiguration = { () -> [String]? in
137
+ if bridge.has_value_std__optional_std__vector_std__string__(newValue) {
138
+ let __unwrapped = bridge.get_std__optional_std__vector_std__string__(newValue)
139
+ return __unwrapped.map({ __item in String(__item) })
140
+ } else {
141
+ return nil
142
+ }
143
+ }()
144
+ }
145
+ }
146
+
147
+ public final var editMenuDefaultActions: bridge.std__optional_std__vector_std__string__ {
148
+ @inline(__always)
149
+ get {
150
+ return { () -> bridge.std__optional_std__vector_std__string__ in
151
+ if let __unwrappedValue = self.__implementation.editMenuDefaultActions {
152
+ return bridge.create_std__optional_std__vector_std__string__({ () -> bridge.std__vector_std__string_ in
153
+ var __vector = bridge.create_std__vector_std__string_(__unwrappedValue.count)
154
+ for __item in __unwrappedValue {
155
+ __vector.push_back(std.string(__item))
156
+ }
157
+ return __vector
158
+ }())
159
+ } else {
160
+ return .init()
161
+ }
162
+ }()
163
+ }
164
+ @inline(__always)
165
+ set {
166
+ self.__implementation.editMenuDefaultActions = { () -> [String]? in
167
+ if bridge.has_value_std__optional_std__vector_std__string__(newValue) {
168
+ let __unwrapped = bridge.get_std__optional_std__vector_std__string__(newValue)
169
+ return __unwrapped.map({ __item in String(__item) })
170
+ } else {
171
+ return nil
172
+ }
173
+ }()
174
+ }
175
+ }
176
+
177
+ public final var maxLines: bridge.std__optional_double_ {
178
+ @inline(__always)
179
+ get {
180
+ return { () -> bridge.std__optional_double_ in
181
+ if let __unwrappedValue = self.__implementation.maxLines {
182
+ return bridge.create_std__optional_double_(__unwrappedValue)
183
+ } else {
184
+ return .init()
185
+ }
186
+ }()
187
+ }
188
+ @inline(__always)
189
+ set {
190
+ self.__implementation.maxLines = newValue.value
191
+ }
192
+ }
193
+
194
+ public final var maxChars: bridge.std__optional_double_ {
195
+ @inline(__always)
196
+ get {
197
+ return { () -> bridge.std__optional_double_ in
198
+ if let __unwrappedValue = self.__implementation.maxChars {
199
+ return bridge.create_std__optional_double_(__unwrappedValue)
200
+ } else {
201
+ return .init()
202
+ }
203
+ }()
204
+ }
205
+ @inline(__always)
206
+ set {
207
+ self.__implementation.maxChars = newValue.value
208
+ }
209
+ }
210
+
211
+ public final var onPaste: bridge.std__optional_std__function_void_const_std__vector_AixInputWrapperOnPasteEvent______events______ {
212
+ @inline(__always)
213
+ get {
214
+ return { () -> bridge.std__optional_std__function_void_const_std__vector_AixInputWrapperOnPasteEvent______events______ in
215
+ if let __unwrappedValue = self.__implementation.onPaste {
216
+ return bridge.create_std__optional_std__function_void_const_std__vector_AixInputWrapperOnPasteEvent______events______({ () -> bridge.Func_void_std__vector_AixInputWrapperOnPasteEvent_ in
217
+ let __closureWrapper = Func_void_std__vector_AixInputWrapperOnPasteEvent_(__unwrappedValue)
218
+ return bridge.create_Func_void_std__vector_AixInputWrapperOnPasteEvent_(__closureWrapper.toUnsafe())
219
+ }())
220
+ } else {
221
+ return .init()
222
+ }
223
+ }()
224
+ }
225
+ @inline(__always)
226
+ set {
227
+ self.__implementation.onPaste = { () -> ((_ events: [AixInputWrapperOnPasteEvent]) -> Void)? in
228
+ if bridge.has_value_std__optional_std__function_void_const_std__vector_AixInputWrapperOnPasteEvent______events______(newValue) {
229
+ let __unwrapped = bridge.get_std__optional_std__function_void_const_std__vector_AixInputWrapperOnPasteEvent______events______(newValue)
230
+ return { () -> ([AixInputWrapperOnPasteEvent]) -> Void in
231
+ let __wrappedFunction = bridge.wrap_Func_void_std__vector_AixInputWrapperOnPasteEvent_(__unwrapped)
232
+ return { (__events: [AixInputWrapperOnPasteEvent]) -> Void in
233
+ __wrappedFunction.call({ () -> bridge.std__vector_AixInputWrapperOnPasteEvent_ in
234
+ var __vector = bridge.create_std__vector_AixInputWrapperOnPasteEvent_(__events.count)
235
+ for __item in __events {
236
+ __vector.push_back(__item)
237
+ }
238
+ return __vector
239
+ }())
240
+ }
241
+ }()
242
+ } else {
243
+ return nil
244
+ }
245
+ }()
246
+ }
247
+ }
248
+
249
+ // Methods
250
+ public final func getView() -> UnsafeMutableRawPointer {
251
+ return Unmanaged.passRetained(__implementation.view).toOpaque()
252
+ }
253
+
254
+ public final func beforeUpdate() {
255
+ __implementation.beforeUpdate()
256
+ }
257
+
258
+ public final func afterUpdate() {
259
+ __implementation.afterUpdate()
260
+ }
261
+ }
@@ -0,0 +1,88 @@
1
+ ///
2
+ /// AixInputWrapperOnPasteEvent.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
+ #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
+
27
+
28
+ #include <string>
29
+ #include <optional>
30
+
31
+ namespace margelo::nitro::aix {
32
+
33
+ /**
34
+ * A struct which can be represented as a JavaScript object (AixInputWrapperOnPasteEvent).
35
+ */
36
+ struct AixInputWrapperOnPasteEvent {
37
+ public:
38
+ std::string type SWIFT_PRIVATE;
39
+ std::string filePath SWIFT_PRIVATE;
40
+ std::optional<std::string> fileExtension SWIFT_PRIVATE;
41
+ std::optional<std::string> fileName SWIFT_PRIVATE;
42
+
43
+ public:
44
+ AixInputWrapperOnPasteEvent() = default;
45
+ explicit AixInputWrapperOnPasteEvent(std::string type, std::string filePath, std::optional<std::string> fileExtension, std::optional<std::string> fileName): type(type), filePath(filePath), fileExtension(fileExtension), fileName(fileName) {}
46
+ };
47
+
48
+ } // namespace margelo::nitro::aix
49
+
50
+ namespace margelo::nitro {
51
+
52
+ // C++ AixInputWrapperOnPasteEvent <> JS AixInputWrapperOnPasteEvent (object)
53
+ template <>
54
+ struct JSIConverter<margelo::nitro::aix::AixInputWrapperOnPasteEvent> final {
55
+ static inline margelo::nitro::aix::AixInputWrapperOnPasteEvent fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
56
+ jsi::Object obj = arg.asObject(runtime);
57
+ return margelo::nitro::aix::AixInputWrapperOnPasteEvent(
58
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "type")),
59
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "filePath")),
60
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "fileExtension")),
61
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "fileName"))
62
+ );
63
+ }
64
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::aix::AixInputWrapperOnPasteEvent& arg) {
65
+ jsi::Object obj(runtime);
66
+ obj.setProperty(runtime, "type", JSIConverter<std::string>::toJSI(runtime, arg.type));
67
+ obj.setProperty(runtime, "filePath", JSIConverter<std::string>::toJSI(runtime, arg.filePath));
68
+ obj.setProperty(runtime, "fileExtension", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.fileExtension));
69
+ obj.setProperty(runtime, "fileName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.fileName));
70
+ return obj;
71
+ }
72
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
73
+ if (!value.isObject()) {
74
+ return false;
75
+ }
76
+ jsi::Object obj = value.getObject(runtime);
77
+ if (!nitro::isPlainObject(runtime, obj)) {
78
+ return false;
79
+ }
80
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "type"))) return false;
81
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "filePath"))) return false;
82
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "fileExtension"))) return false;
83
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "fileName"))) return false;
84
+ return true;
85
+ }
86
+ };
87
+
88
+ } // namespace margelo::nitro
@@ -16,6 +16,8 @@ namespace margelo::nitro::aix {
16
16
  registerHybrids(this, [](Prototype& prototype) {
17
17
  prototype.registerHybridGetter("stickToKeyboard", &HybridAixComposerSpec::getStickToKeyboard);
18
18
  prototype.registerHybridSetter("stickToKeyboard", &HybridAixComposerSpec::setStickToKeyboard);
19
+ prototype.registerHybridGetter("fixInput", &HybridAixComposerSpec::getFixInput);
20
+ prototype.registerHybridSetter("fixInput", &HybridAixComposerSpec::setFixInput);
19
21
  });
20
22
  }
21
23
 
@@ -48,6 +48,8 @@ namespace margelo::nitro::aix {
48
48
  // Properties
49
49
  virtual std::optional<AixStickToKeyboard> getStickToKeyboard() = 0;
50
50
  virtual void setStickToKeyboard(const std::optional<AixStickToKeyboard>& stickToKeyboard) = 0;
51
+ virtual std::optional<bool> getFixInput() = 0;
52
+ virtual void setFixInput(std::optional<bool> fixInput) = 0;
51
53
 
52
54
  public:
53
55
  // Methods
@@ -0,0 +1,22 @@
1
+ ///
2
+ /// HybridAixDropzoneSpec.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 "HybridAixDropzoneSpec.hpp"
9
+
10
+ namespace margelo::nitro::aix {
11
+
12
+ void HybridAixDropzoneSpec::loadHybridMethods() {
13
+ // load base methods/properties
14
+ HybridObject::loadHybridMethods();
15
+ // load custom methods/properties
16
+ registerHybrids(this, [](Prototype& prototype) {
17
+ prototype.registerHybridGetter("onDrop", &HybridAixDropzoneSpec::getOnDrop);
18
+ prototype.registerHybridSetter("onDrop", &HybridAixDropzoneSpec::setOnDrop);
19
+ });
20
+ }
21
+
22
+ } // namespace margelo::nitro::aix
@@ -0,0 +1,67 @@
1
+ ///
2
+ /// HybridAixDropzoneSpec.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
+ #if __has_include(<NitroModules/HybridObject.hpp>)
11
+ #include <NitroModules/HybridObject.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+
16
+ // Forward declaration of `AixInputWrapperOnPasteEvent` to properly resolve imports.
17
+ namespace margelo::nitro::aix { struct AixInputWrapperOnPasteEvent; }
18
+
19
+ #include "AixInputWrapperOnPasteEvent.hpp"
20
+ #include <vector>
21
+ #include <functional>
22
+ #include <optional>
23
+
24
+ namespace margelo::nitro::aix {
25
+
26
+ using namespace margelo::nitro;
27
+
28
+ /**
29
+ * An abstract base class for `AixDropzone`
30
+ * Inherit this class to create instances of `HybridAixDropzoneSpec` in C++.
31
+ * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
32
+ * @example
33
+ * ```cpp
34
+ * class HybridAixDropzone: public HybridAixDropzoneSpec {
35
+ * public:
36
+ * HybridAixDropzone(...): HybridObject(TAG) { ... }
37
+ * // ...
38
+ * };
39
+ * ```
40
+ */
41
+ class HybridAixDropzoneSpec: public virtual HybridObject {
42
+ public:
43
+ // Constructor
44
+ explicit HybridAixDropzoneSpec(): HybridObject(TAG) { }
45
+
46
+ // Destructor
47
+ ~HybridAixDropzoneSpec() override = default;
48
+
49
+ public:
50
+ // Properties
51
+ virtual std::optional<std::function<void(const std::vector<AixInputWrapperOnPasteEvent>& /* events */)>> getOnDrop() = 0;
52
+ virtual void setOnDrop(const std::optional<std::function<void(const std::vector<AixInputWrapperOnPasteEvent>& /* events */)>>& onDrop) = 0;
53
+
54
+ public:
55
+ // Methods
56
+
57
+
58
+ protected:
59
+ // Hybrid Setup
60
+ void loadHybridMethods() override;
61
+
62
+ protected:
63
+ // Tag for logging
64
+ static constexpr auto TAG = "AixDropzone";
65
+ };
66
+
67
+ } // namespace margelo::nitro::aix
@@ -0,0 +1,30 @@
1
+ ///
2
+ /// HybridAixInputWrapperSpec.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 "HybridAixInputWrapperSpec.hpp"
9
+
10
+ namespace margelo::nitro::aix {
11
+
12
+ void HybridAixInputWrapperSpec::loadHybridMethods() {
13
+ // load base methods/properties
14
+ HybridObject::loadHybridMethods();
15
+ // load custom methods/properties
16
+ registerHybrids(this, [](Prototype& prototype) {
17
+ prototype.registerHybridGetter("pasteConfiguration", &HybridAixInputWrapperSpec::getPasteConfiguration);
18
+ prototype.registerHybridSetter("pasteConfiguration", &HybridAixInputWrapperSpec::setPasteConfiguration);
19
+ prototype.registerHybridGetter("editMenuDefaultActions", &HybridAixInputWrapperSpec::getEditMenuDefaultActions);
20
+ prototype.registerHybridSetter("editMenuDefaultActions", &HybridAixInputWrapperSpec::setEditMenuDefaultActions);
21
+ prototype.registerHybridGetter("maxLines", &HybridAixInputWrapperSpec::getMaxLines);
22
+ prototype.registerHybridSetter("maxLines", &HybridAixInputWrapperSpec::setMaxLines);
23
+ prototype.registerHybridGetter("maxChars", &HybridAixInputWrapperSpec::getMaxChars);
24
+ prototype.registerHybridSetter("maxChars", &HybridAixInputWrapperSpec::setMaxChars);
25
+ prototype.registerHybridGetter("onPaste", &HybridAixInputWrapperSpec::getOnPaste);
26
+ prototype.registerHybridSetter("onPaste", &HybridAixInputWrapperSpec::setOnPaste);
27
+ });
28
+ }
29
+
30
+ } // namespace margelo::nitro::aix
@@ -0,0 +1,76 @@
1
+ ///
2
+ /// HybridAixInputWrapperSpec.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
+ #if __has_include(<NitroModules/HybridObject.hpp>)
11
+ #include <NitroModules/HybridObject.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+
16
+ // Forward declaration of `AixInputWrapperOnPasteEvent` to properly resolve imports.
17
+ namespace margelo::nitro::aix { struct AixInputWrapperOnPasteEvent; }
18
+
19
+ #include <string>
20
+ #include <vector>
21
+ #include <optional>
22
+ #include "AixInputWrapperOnPasteEvent.hpp"
23
+ #include <functional>
24
+
25
+ namespace margelo::nitro::aix {
26
+
27
+ using namespace margelo::nitro;
28
+
29
+ /**
30
+ * An abstract base class for `AixInputWrapper`
31
+ * Inherit this class to create instances of `HybridAixInputWrapperSpec` in C++.
32
+ * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
33
+ * @example
34
+ * ```cpp
35
+ * class HybridAixInputWrapper: public HybridAixInputWrapperSpec {
36
+ * public:
37
+ * HybridAixInputWrapper(...): HybridObject(TAG) { ... }
38
+ * // ...
39
+ * };
40
+ * ```
41
+ */
42
+ class HybridAixInputWrapperSpec: public virtual HybridObject {
43
+ public:
44
+ // Constructor
45
+ explicit HybridAixInputWrapperSpec(): HybridObject(TAG) { }
46
+
47
+ // Destructor
48
+ ~HybridAixInputWrapperSpec() override = default;
49
+
50
+ public:
51
+ // Properties
52
+ virtual std::optional<std::vector<std::string>> getPasteConfiguration() = 0;
53
+ virtual void setPasteConfiguration(const std::optional<std::vector<std::string>>& pasteConfiguration) = 0;
54
+ virtual std::optional<std::vector<std::string>> getEditMenuDefaultActions() = 0;
55
+ virtual void setEditMenuDefaultActions(const std::optional<std::vector<std::string>>& editMenuDefaultActions) = 0;
56
+ virtual std::optional<double> getMaxLines() = 0;
57
+ virtual void setMaxLines(std::optional<double> maxLines) = 0;
58
+ virtual std::optional<double> getMaxChars() = 0;
59
+ virtual void setMaxChars(std::optional<double> maxChars) = 0;
60
+ virtual std::optional<std::function<void(const std::vector<AixInputWrapperOnPasteEvent>& /* events */)>> getOnPaste() = 0;
61
+ virtual void setOnPaste(const std::optional<std::function<void(const std::vector<AixInputWrapperOnPasteEvent>& /* events */)>>& onPaste) = 0;
62
+
63
+ public:
64
+ // Methods
65
+
66
+
67
+ protected:
68
+ // Hybrid Setup
69
+ void loadHybridMethods() override;
70
+
71
+ protected:
72
+ // Tag for logging
73
+ static constexpr auto TAG = "AixInputWrapper";
74
+ };
75
+
76
+ } // namespace margelo::nitro::aix
@@ -35,6 +35,16 @@ namespace margelo::nitro::aix::views {
35
35
  throw std::runtime_error(std::string("AixComposer.stickToKeyboard: ") + exc.what());
36
36
  }
37
37
  }()),
38
+ fixInput([&]() -> CachedProp<std::optional<bool>> {
39
+ try {
40
+ const react::RawValue* rawValue = rawProps.at("fixInput", nullptr, nullptr);
41
+ if (rawValue == nullptr) return sourceProps.fixInput;
42
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
43
+ return CachedProp<std::optional<bool>>::fromRawValue(*runtime, value, sourceProps.fixInput);
44
+ } catch (const std::exception& exc) {
45
+ throw std::runtime_error(std::string("AixComposer.fixInput: ") + exc.what());
46
+ }
47
+ }()),
38
48
  hybridRef([&]() -> CachedProp<std::optional<std::function<void(const std::shared_ptr<HybridAixComposerSpec>& /* ref */)>>> {
39
49
  try {
40
50
  const react::RawValue* rawValue = rawProps.at("hybridRef", nullptr, nullptr);
@@ -49,11 +59,13 @@ namespace margelo::nitro::aix::views {
49
59
  HybridAixComposerProps::HybridAixComposerProps(const HybridAixComposerProps& other):
50
60
  react::ViewProps(),
51
61
  stickToKeyboard(other.stickToKeyboard),
62
+ fixInput(other.fixInput),
52
63
  hybridRef(other.hybridRef) { }
53
64
 
54
65
  bool HybridAixComposerProps::filterObjectKeys(const std::string& propName) {
55
66
  switch (hashString(propName)) {
56
67
  case hashString("stickToKeyboard"): return true;
68
+ case hashString("fixInput"): return true;
57
69
  case hashString("hybridRef"): return true;
58
70
  default: return false;
59
71
  }
@@ -44,6 +44,7 @@ namespace margelo::nitro::aix::views {
44
44
 
45
45
  public:
46
46
  CachedProp<std::optional<AixStickToKeyboard>> stickToKeyboard;
47
+ CachedProp<std::optional<bool>> fixInput;
47
48
  CachedProp<std::optional<std::function<void(const std::shared_ptr<HybridAixComposerSpec>& /* ref */)>>> hybridRef;
48
49
 
49
50
  private: