aix 0.0.15 → 0.1.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.
Files changed (241) hide show
  1. package/Aix.podspec +32 -0
  2. package/LICENSE +2 -2
  3. package/README.md +165 -33
  4. package/android/CMakeLists.txt +32 -0
  5. package/android/build.gradle +148 -0
  6. package/android/fix-prefab.gradle +51 -0
  7. package/android/gradle.properties +5 -0
  8. package/android/src/main/AndroidManifest.xml +2 -0
  9. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  10. package/android/src/main/java/com/aix/AixPackage.kt +29 -0
  11. package/android/src/main/java/com/aix/HybridAix.kt +27 -0
  12. package/ios/Bridge.h +8 -0
  13. package/ios/HybridAix.swift +1072 -0
  14. package/ios/HybridAixCellView.swift +174 -0
  15. package/ios/HybridAixComposer.swift +119 -0
  16. package/lib/commonjs/aix.js +25 -0
  17. package/lib/commonjs/aix.js.map +1 -0
  18. package/lib/commonjs/fade-in/createUsePool.js +50 -0
  19. package/lib/commonjs/fade-in/createUsePool.js.map +1 -0
  20. package/lib/commonjs/fade-in/createUseStaggered.js +82 -0
  21. package/lib/commonjs/fade-in/createUseStaggered.js.map +1 -0
  22. package/lib/commonjs/fade-in/index.js +78 -0
  23. package/lib/commonjs/fade-in/index.js.map +1 -0
  24. package/lib/commonjs/footer.js +28 -0
  25. package/lib/commonjs/footer.js.map +1 -0
  26. package/lib/commonjs/index.js +48 -0
  27. package/lib/commonjs/index.js.map +1 -0
  28. package/lib/commonjs/package.json +1 -0
  29. package/lib/commonjs/views/aix.nitro.js +6 -0
  30. package/lib/commonjs/views/aix.nitro.js.map +1 -0
  31. package/lib/module/aix.js +20 -0
  32. package/lib/module/aix.js.map +1 -0
  33. package/lib/module/fade-in/createUsePool.js +46 -0
  34. package/lib/module/fade-in/createUsePool.js.map +1 -0
  35. package/lib/module/fade-in/createUseStaggered.js +79 -0
  36. package/lib/module/fade-in/createUseStaggered.js.map +1 -0
  37. package/lib/module/fade-in/index.js +74 -0
  38. package/lib/module/fade-in/index.js.map +1 -0
  39. package/lib/module/footer.js +23 -0
  40. package/lib/module/footer.js.map +1 -0
  41. package/lib/module/index.js +13 -0
  42. package/lib/module/index.js.map +1 -0
  43. package/lib/module/package.json +1 -0
  44. package/lib/module/views/aix.nitro.js +4 -0
  45. package/lib/module/views/aix.nitro.js.map +1 -0
  46. package/lib/typescript/src/aix.d.ts +14 -0
  47. package/lib/typescript/src/aix.d.ts.map +1 -0
  48. package/lib/typescript/src/fade-in/createUsePool.d.ts +5 -0
  49. package/lib/typescript/src/fade-in/createUsePool.d.ts.map +1 -0
  50. package/lib/typescript/src/fade-in/createUseStaggered.d.ts +2 -0
  51. package/lib/typescript/src/fade-in/createUseStaggered.d.ts.map +1 -0
  52. package/lib/typescript/src/fade-in/index.d.ts +5 -0
  53. package/lib/typescript/src/fade-in/index.d.ts.map +1 -0
  54. package/lib/typescript/src/footer.d.ts +5 -0
  55. package/lib/typescript/src/footer.d.ts.map +1 -0
  56. package/lib/typescript/src/index.d.ts +10 -0
  57. package/lib/typescript/src/index.d.ts.map +1 -0
  58. package/lib/typescript/src/views/aix.nitro.d.ts +101 -0
  59. package/lib/typescript/src/views/aix.nitro.d.ts.map +1 -0
  60. package/nitro.json +26 -0
  61. package/nitrogen/generated/.gitattributes +1 -0
  62. package/nitrogen/generated/android/Aix+autolinking.cmake +91 -0
  63. package/nitrogen/generated/android/Aix+autolinking.gradle +27 -0
  64. package/nitrogen/generated/android/AixOnLoad.cpp +70 -0
  65. package/nitrogen/generated/android/AixOnLoad.hpp +25 -0
  66. package/nitrogen/generated/android/c++/JAixAdditionalContentInsets.hpp +61 -0
  67. package/nitrogen/generated/android/c++/JAixAdditionalContentInsetsProp.hpp +63 -0
  68. package/nitrogen/generated/android/c++/JAixScrollIndicatorInsetValue.hpp +61 -0
  69. package/nitrogen/generated/android/c++/JAixScrollIndicatorInsets.hpp +63 -0
  70. package/nitrogen/generated/android/c++/JAixScrollOnFooterSizeUpdate.hpp +65 -0
  71. package/nitrogen/generated/android/c++/JHybridAixCellViewSpec.cpp +65 -0
  72. package/nitrogen/generated/android/c++/JHybridAixCellViewSpec.hpp +68 -0
  73. package/nitrogen/generated/android/c++/JHybridAixComposerSpec.cpp +48 -0
  74. package/nitrogen/generated/android/c++/JHybridAixComposerSpec.hpp +65 -0
  75. package/nitrogen/generated/android/c++/JHybridAixSpec.cpp +137 -0
  76. package/nitrogen/generated/android/c++/JHybridAixSpec.hpp +79 -0
  77. package/nitrogen/generated/android/c++/views/JHybridAixCellViewStateUpdater.cpp +60 -0
  78. package/nitrogen/generated/android/c++/views/JHybridAixCellViewStateUpdater.hpp +49 -0
  79. package/nitrogen/generated/android/c++/views/JHybridAixComposerStateUpdater.cpp +53 -0
  80. package/nitrogen/generated/android/c++/views/JHybridAixComposerStateUpdater.hpp +49 -0
  81. package/nitrogen/generated/android/c++/views/JHybridAixStateUpdater.cpp +80 -0
  82. package/nitrogen/generated/android/c++/views/JHybridAixStateUpdater.hpp +49 -0
  83. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixAdditionalContentInsets.kt +41 -0
  84. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixAdditionalContentInsetsProp.kt +41 -0
  85. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixOnLoad.kt +35 -0
  86. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixScrollIndicatorInsetValue.kt +41 -0
  87. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixScrollIndicatorInsets.kt +41 -0
  88. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixScrollOnFooterSizeUpdate.kt +44 -0
  89. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixCellViewSpec.kt +65 -0
  90. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixComposerSpec.kt +55 -0
  91. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixSpec.kt +101 -0
  92. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixCellViewManager.kt +50 -0
  93. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixCellViewStateUpdater.kt +23 -0
  94. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixComposerManager.kt +50 -0
  95. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixComposerStateUpdater.kt +23 -0
  96. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixManager.kt +50 -0
  97. package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixStateUpdater.kt +23 -0
  98. package/nitrogen/generated/ios/Aix+autolinking.rb +60 -0
  99. package/nitrogen/generated/ios/Aix-Swift-Cxx-Bridge.cpp +67 -0
  100. package/nitrogen/generated/ios/Aix-Swift-Cxx-Bridge.hpp +222 -0
  101. package/nitrogen/generated/ios/Aix-Swift-Cxx-Umbrella.hpp +70 -0
  102. package/nitrogen/generated/ios/AixAutolinking.mm +49 -0
  103. package/nitrogen/generated/ios/AixAutolinking.swift +55 -0
  104. package/nitrogen/generated/ios/c++/HybridAixCellViewSpecSwift.cpp +11 -0
  105. package/nitrogen/generated/ios/c++/HybridAixCellViewSpecSwift.hpp +80 -0
  106. package/nitrogen/generated/ios/c++/HybridAixComposerSpecSwift.cpp +11 -0
  107. package/nitrogen/generated/ios/c++/HybridAixComposerSpecSwift.hpp +69 -0
  108. package/nitrogen/generated/ios/c++/HybridAixSpecSwift.cpp +11 -0
  109. package/nitrogen/generated/ios/c++/HybridAixSpecSwift.hpp +142 -0
  110. package/nitrogen/generated/ios/c++/views/HybridAixCellViewComponent.mm +101 -0
  111. package/nitrogen/generated/ios/c++/views/HybridAixComponent.mm +126 -0
  112. package/nitrogen/generated/ios/c++/views/HybridAixComposerComponent.mm +92 -0
  113. package/nitrogen/generated/ios/swift/AixAdditionalContentInsets.swift +47 -0
  114. package/nitrogen/generated/ios/swift/AixAdditionalContentInsetsProp.swift +71 -0
  115. package/nitrogen/generated/ios/swift/AixScrollIndicatorInsetValue.swift +47 -0
  116. package/nitrogen/generated/ios/swift/AixScrollIndicatorInsets.swift +71 -0
  117. package/nitrogen/generated/ios/swift/AixScrollOnFooterSizeUpdate.swift +89 -0
  118. package/nitrogen/generated/ios/swift/HybridAixCellViewSpec.swift +57 -0
  119. package/nitrogen/generated/ios/swift/HybridAixCellViewSpec_cxx.swift +151 -0
  120. package/nitrogen/generated/ios/swift/HybridAixComposerSpec.swift +56 -0
  121. package/nitrogen/generated/ios/swift/HybridAixComposerSpec_cxx.swift +131 -0
  122. package/nitrogen/generated/ios/swift/HybridAixSpec.swift +63 -0
  123. package/nitrogen/generated/ios/swift/HybridAixSpec_cxx.swift +292 -0
  124. package/nitrogen/generated/shared/c++/AixAdditionalContentInsets.hpp +79 -0
  125. package/nitrogen/generated/shared/c++/AixAdditionalContentInsetsProp.hpp +81 -0
  126. package/nitrogen/generated/shared/c++/AixScrollIndicatorInsetValue.hpp +79 -0
  127. package/nitrogen/generated/shared/c++/AixScrollIndicatorInsets.hpp +81 -0
  128. package/nitrogen/generated/shared/c++/AixScrollOnFooterSizeUpdate.hpp +83 -0
  129. package/nitrogen/generated/shared/c++/HybridAixCellViewSpec.cpp +24 -0
  130. package/nitrogen/generated/shared/c++/HybridAixCellViewSpec.hpp +65 -0
  131. package/nitrogen/generated/shared/c++/HybridAixComposerSpec.cpp +21 -0
  132. package/nitrogen/generated/shared/c++/HybridAixComposerSpec.hpp +62 -0
  133. package/nitrogen/generated/shared/c++/HybridAixSpec.cpp +36 -0
  134. package/nitrogen/generated/shared/c++/HybridAixSpec.hpp +85 -0
  135. package/nitrogen/generated/shared/c++/views/HybridAixCellViewComponent.cpp +99 -0
  136. package/nitrogen/generated/shared/c++/views/HybridAixCellViewComponent.hpp +108 -0
  137. package/nitrogen/generated/shared/c++/views/HybridAixComponent.cpp +159 -0
  138. package/nitrogen/generated/shared/c++/views/HybridAixComponent.hpp +117 -0
  139. package/nitrogen/generated/shared/c++/views/HybridAixComposerComponent.cpp +75 -0
  140. package/nitrogen/generated/shared/c++/views/HybridAixComposerComponent.hpp +106 -0
  141. package/nitrogen/generated/shared/json/AixCellViewConfig.json +11 -0
  142. package/nitrogen/generated/shared/json/AixComposerConfig.json +9 -0
  143. package/nitrogen/generated/shared/json/AixConfig.json +16 -0
  144. package/package.json +113 -14
  145. package/src/aix.tsx +43 -0
  146. package/src/fade-in/createUsePool.ts +46 -0
  147. package/src/fade-in/createUseStaggered.ts +82 -0
  148. package/src/fade-in/index.tsx +97 -0
  149. package/src/footer.tsx +30 -0
  150. package/src/index.ts +20 -16
  151. package/src/views/aix.nitro.ts +148 -0
  152. package/docs/API.md +0 -288
  153. package/jest.config.js +0 -17
  154. package/lib/__tests__/deferredIterable.test.d.ts +0 -1
  155. package/lib/__tests__/deferredIterable.test.js +0 -108
  156. package/lib/__tests__/filter.test.d.ts +0 -1
  157. package/lib/__tests__/filter.test.js +0 -53
  158. package/lib/__tests__/flatMap.test.d.ts +0 -1
  159. package/lib/__tests__/flatMap.test.js +0 -77
  160. package/lib/__tests__/lookahead.test.d.ts +0 -1
  161. package/lib/__tests__/lookahead.test.js +0 -57
  162. package/lib/__tests__/map.test.d.ts +0 -1
  163. package/lib/__tests__/map.test.js +0 -53
  164. package/lib/__tests__/merge.test.d.ts +0 -1
  165. package/lib/__tests__/merge.test.js +0 -55
  166. package/lib/__tests__/reduce.test.d.ts +0 -1
  167. package/lib/__tests__/reduce.test.js +0 -52
  168. package/lib/__tests__/spanAll.test.d.ts +0 -1
  169. package/lib/__tests__/spanAll.test.js +0 -120
  170. package/lib/concat.d.ts +0 -4
  171. package/lib/concat.js +0 -126
  172. package/lib/deferred.d.ts +0 -9
  173. package/lib/deferred.js +0 -18
  174. package/lib/deferredIterable.d.ts +0 -22
  175. package/lib/deferredIterable.js +0 -111
  176. package/lib/filter.d.ts +0 -7
  177. package/lib/filter.js +0 -99
  178. package/lib/flatMap.d.ts +0 -1
  179. package/lib/flatMap.js +0 -119
  180. package/lib/fromEvent.d.ts +0 -5
  181. package/lib/fromEvent.js +0 -13
  182. package/lib/index.d.ts +0 -16
  183. package/lib/index.js +0 -34
  184. package/lib/insert.d.ts +0 -4
  185. package/lib/insert.js +0 -113
  186. package/lib/interval.d.ts +0 -4
  187. package/lib/interval.js +0 -64
  188. package/lib/iterableToArray.d.ts +0 -1
  189. package/lib/iterableToArray.js +0 -87
  190. package/lib/iteratorToIterable.d.ts +0 -6
  191. package/lib/iteratorToIterable.js +0 -70
  192. package/lib/lookahead.d.ts +0 -10
  193. package/lib/lookahead.js +0 -78
  194. package/lib/map.d.ts +0 -4
  195. package/lib/map.js +0 -98
  196. package/lib/merge.d.ts +0 -6
  197. package/lib/merge.js +0 -21
  198. package/lib/of.d.ts +0 -3
  199. package/lib/of.js +0 -5
  200. package/lib/reduce.d.ts +0 -4
  201. package/lib/reduce.js +0 -92
  202. package/lib/restToIterable.d.ts +0 -4
  203. package/lib/restToIterable.js +0 -73
  204. package/lib/spanAll.d.ts +0 -1
  205. package/lib/spanAll.js +0 -29
  206. package/lib/tap.d.ts +0 -4
  207. package/lib/tap.js +0 -96
  208. package/lib/toCallbacks.d.ts +0 -11
  209. package/lib/toCallbacks.js +0 -97
  210. package/lib/zip.d.ts +0 -4
  211. package/lib/zip.js +0 -75
  212. package/src/__tests__/deferredIterable.test.ts +0 -22
  213. package/src/__tests__/filter.test.ts +0 -10
  214. package/src/__tests__/flatMap.test.ts +0 -12
  215. package/src/__tests__/lookahead.test.ts +0 -9
  216. package/src/__tests__/map.test.ts +0 -10
  217. package/src/__tests__/merge.test.ts +0 -9
  218. package/src/__tests__/reduce.test.ts +0 -10
  219. package/src/__tests__/spanAll.test.ts +0 -17
  220. package/src/concat.ts +0 -13
  221. package/src/deferred.ts +0 -16
  222. package/src/deferredIterable.ts +0 -111
  223. package/src/filter.ts +0 -16
  224. package/src/flatMap.ts +0 -9
  225. package/src/fromEvent.ts +0 -16
  226. package/src/insert.ts +0 -13
  227. package/src/interval.ts +0 -20
  228. package/src/iterableToArray.ts +0 -7
  229. package/src/iteratorToIterable.ts +0 -12
  230. package/src/lookahead.ts +0 -27
  231. package/src/map.ts +0 -11
  232. package/src/merge.ts +0 -18
  233. package/src/of.ts +0 -4
  234. package/src/reduce.ts +0 -12
  235. package/src/restToIterable.ts +0 -8
  236. package/src/spanAll.ts +0 -26
  237. package/src/tap.ts +0 -11
  238. package/src/toCallbacks.ts +0 -27
  239. package/src/zip.ts +0 -19
  240. package/tsconfig.json +0 -63
  241. package/yarn.lock +0 -3514
@@ -0,0 +1,89 @@
1
+ ///
2
+ /// AixScrollOnFooterSizeUpdate.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
+ * Represents an instance of `AixScrollOnFooterSizeUpdate`, backed by a C++ struct.
13
+ */
14
+ public typealias AixScrollOnFooterSizeUpdate = margelo.nitro.aix.AixScrollOnFooterSizeUpdate
15
+
16
+ public extension AixScrollOnFooterSizeUpdate {
17
+ private typealias bridge = margelo.nitro.aix.bridge.swift
18
+
19
+ /**
20
+ * Create a new instance of `AixScrollOnFooterSizeUpdate`.
21
+ */
22
+ init(enabled: Bool, scrolledToEndThreshold: Double?, animated: Bool?) {
23
+ self.init(enabled, { () -> bridge.std__optional_double_ in
24
+ if let __unwrappedValue = scrolledToEndThreshold {
25
+ return bridge.create_std__optional_double_(__unwrappedValue)
26
+ } else {
27
+ return .init()
28
+ }
29
+ }(), { () -> bridge.std__optional_bool_ in
30
+ if let __unwrappedValue = animated {
31
+ return bridge.create_std__optional_bool_(__unwrappedValue)
32
+ } else {
33
+ return .init()
34
+ }
35
+ }())
36
+ }
37
+
38
+ var enabled: Bool {
39
+ @inline(__always)
40
+ get {
41
+ return self.__enabled
42
+ }
43
+ @inline(__always)
44
+ set {
45
+ self.__enabled = newValue
46
+ }
47
+ }
48
+
49
+ var scrolledToEndThreshold: Double? {
50
+ @inline(__always)
51
+ get {
52
+ return self.__scrolledToEndThreshold.value
53
+ }
54
+ @inline(__always)
55
+ set {
56
+ self.__scrolledToEndThreshold = { () -> bridge.std__optional_double_ in
57
+ if let __unwrappedValue = newValue {
58
+ return bridge.create_std__optional_double_(__unwrappedValue)
59
+ } else {
60
+ return .init()
61
+ }
62
+ }()
63
+ }
64
+ }
65
+
66
+ var animated: Bool? {
67
+ @inline(__always)
68
+ get {
69
+ return { () -> Bool? in
70
+ if bridge.has_value_std__optional_bool_(self.__animated) {
71
+ let __unwrapped = bridge.get_std__optional_bool_(self.__animated)
72
+ return __unwrapped
73
+ } else {
74
+ return nil
75
+ }
76
+ }()
77
+ }
78
+ @inline(__always)
79
+ set {
80
+ self.__animated = { () -> bridge.std__optional_bool_ in
81
+ if let __unwrappedValue = newValue {
82
+ return bridge.create_std__optional_bool_(__unwrappedValue)
83
+ } else {
84
+ return .init()
85
+ }
86
+ }()
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,57 @@
1
+ ///
2
+ /// HybridAixCellViewSpec.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
+ /// See ``HybridAixCellViewSpec``
12
+ public protocol HybridAixCellViewSpec_protocol: HybridObject, HybridView {
13
+ // Properties
14
+ var isLast: Bool { get set }
15
+ var index: Double { get set }
16
+
17
+ // Methods
18
+
19
+ }
20
+
21
+ public extension HybridAixCellViewSpec_protocol {
22
+ /// Default implementation of ``HybridObject.toString``
23
+ func toString() -> String {
24
+ return "[HybridObject AixCellView]"
25
+ }
26
+ }
27
+
28
+ /// See ``HybridAixCellViewSpec``
29
+ open class HybridAixCellViewSpec_base {
30
+ private weak var cxxWrapper: HybridAixCellViewSpec_cxx? = nil
31
+ public init() { }
32
+ public func getCxxWrapper() -> HybridAixCellViewSpec_cxx {
33
+ #if DEBUG
34
+ guard self is HybridAixCellViewSpec else {
35
+ fatalError("`self` is not a `HybridAixCellViewSpec`! Did you accidentally inherit from `HybridAixCellViewSpec_base` instead of `HybridAixCellViewSpec`?")
36
+ }
37
+ #endif
38
+ if let cxxWrapper = self.cxxWrapper {
39
+ return cxxWrapper
40
+ } else {
41
+ let cxxWrapper = HybridAixCellViewSpec_cxx(self as! HybridAixCellViewSpec)
42
+ self.cxxWrapper = cxxWrapper
43
+ return cxxWrapper
44
+ }
45
+ }
46
+ }
47
+
48
+ /**
49
+ * A Swift base-protocol representing the AixCellView HybridObject.
50
+ * Implement this protocol to create Swift-based instances of AixCellView.
51
+ * ```swift
52
+ * class HybridAixCellView : HybridAixCellViewSpec {
53
+ * // ...
54
+ * }
55
+ * ```
56
+ */
57
+ public typealias HybridAixCellViewSpec = HybridAixCellViewSpec_protocol & HybridAixCellViewSpec_base
@@ -0,0 +1,151 @@
1
+ ///
2
+ /// HybridAixCellViewSpec_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 HybridAixCellViewSpec 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 HybridAixCellViewSpec_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 `HybridAixCellViewSpec` Swift protocol.
30
+ */
31
+ private var __implementation: any HybridAixCellViewSpec
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_HybridAixCellViewSpec_
37
+
38
+ /**
39
+ * Create a new `HybridAixCellViewSpec_cxx` that wraps the given `HybridAixCellViewSpec`.
40
+ * All properties and methods bridge to C++ types.
41
+ */
42
+ public init(_ implementation: any HybridAixCellViewSpec) {
43
+ self.__implementation = implementation
44
+ self.__cxxPart = .init()
45
+ /* no base class */
46
+ }
47
+
48
+ /**
49
+ * Get the actual `HybridAixCellViewSpec` instance this class wraps.
50
+ */
51
+ @inline(__always)
52
+ public func getHybridAixCellViewSpec() -> any HybridAixCellViewSpec {
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 `HybridAixCellViewSpec_cxx`.
66
+ * The pointer has to be a retained opaque `Unmanaged<HybridAixCellViewSpec_cxx>`.
67
+ * This removes one strong reference from the object!
68
+ */
69
+ public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridAixCellViewSpec_cxx {
70
+ return Unmanaged<HybridAixCellViewSpec_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<HybridAixCellViewSpec>`.
76
+ */
77
+ public func getCxxPart() -> bridge.std__shared_ptr_HybridAixCellViewSpec_ {
78
+ let cachedCxxPart = self.__cxxPart.lock()
79
+ if Bool(fromCxx: cachedCxxPart) {
80
+ return cachedCxxPart
81
+ } else {
82
+ let newCxxPart = bridge.create_std__shared_ptr_HybridAixCellViewSpec_(self.toUnsafe())
83
+ __cxxPart = bridge.weakify_std__shared_ptr_HybridAixCellViewSpec_(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 isLast: Bool {
118
+ @inline(__always)
119
+ get {
120
+ return self.__implementation.isLast
121
+ }
122
+ @inline(__always)
123
+ set {
124
+ self.__implementation.isLast = newValue
125
+ }
126
+ }
127
+
128
+ public final var index: Double {
129
+ @inline(__always)
130
+ get {
131
+ return self.__implementation.index
132
+ }
133
+ @inline(__always)
134
+ set {
135
+ self.__implementation.index = newValue
136
+ }
137
+ }
138
+
139
+ // Methods
140
+ public final func getView() -> UnsafeMutableRawPointer {
141
+ return Unmanaged.passRetained(__implementation.view).toOpaque()
142
+ }
143
+
144
+ public final func beforeUpdate() {
145
+ __implementation.beforeUpdate()
146
+ }
147
+
148
+ public final func afterUpdate() {
149
+ __implementation.afterUpdate()
150
+ }
151
+ }
@@ -0,0 +1,56 @@
1
+ ///
2
+ /// HybridAixComposerSpec.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
+ /// See ``HybridAixComposerSpec``
12
+ public protocol HybridAixComposerSpec_protocol: HybridObject, HybridView {
13
+ // Properties
14
+
15
+
16
+ // Methods
17
+
18
+ }
19
+
20
+ public extension HybridAixComposerSpec_protocol {
21
+ /// Default implementation of ``HybridObject.toString``
22
+ func toString() -> String {
23
+ return "[HybridObject AixComposer]"
24
+ }
25
+ }
26
+
27
+ /// See ``HybridAixComposerSpec``
28
+ open class HybridAixComposerSpec_base {
29
+ private weak var cxxWrapper: HybridAixComposerSpec_cxx? = nil
30
+ public init() { }
31
+ public func getCxxWrapper() -> HybridAixComposerSpec_cxx {
32
+ #if DEBUG
33
+ guard self is HybridAixComposerSpec else {
34
+ fatalError("`self` is not a `HybridAixComposerSpec`! Did you accidentally inherit from `HybridAixComposerSpec_base` instead of `HybridAixComposerSpec`?")
35
+ }
36
+ #endif
37
+ if let cxxWrapper = self.cxxWrapper {
38
+ return cxxWrapper
39
+ } else {
40
+ let cxxWrapper = HybridAixComposerSpec_cxx(self as! HybridAixComposerSpec)
41
+ self.cxxWrapper = cxxWrapper
42
+ return cxxWrapper
43
+ }
44
+ }
45
+ }
46
+
47
+ /**
48
+ * A Swift base-protocol representing the AixComposer HybridObject.
49
+ * Implement this protocol to create Swift-based instances of AixComposer.
50
+ * ```swift
51
+ * class HybridAixComposer : HybridAixComposerSpec {
52
+ * // ...
53
+ * }
54
+ * ```
55
+ */
56
+ public typealias HybridAixComposerSpec = HybridAixComposerSpec_protocol & HybridAixComposerSpec_base
@@ -0,0 +1,131 @@
1
+ ///
2
+ /// HybridAixComposerSpec_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 HybridAixComposerSpec 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 HybridAixComposerSpec_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 `HybridAixComposerSpec` Swift protocol.
30
+ */
31
+ private var __implementation: any HybridAixComposerSpec
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_HybridAixComposerSpec_
37
+
38
+ /**
39
+ * Create a new `HybridAixComposerSpec_cxx` that wraps the given `HybridAixComposerSpec`.
40
+ * All properties and methods bridge to C++ types.
41
+ */
42
+ public init(_ implementation: any HybridAixComposerSpec) {
43
+ self.__implementation = implementation
44
+ self.__cxxPart = .init()
45
+ /* no base class */
46
+ }
47
+
48
+ /**
49
+ * Get the actual `HybridAixComposerSpec` instance this class wraps.
50
+ */
51
+ @inline(__always)
52
+ public func getHybridAixComposerSpec() -> any HybridAixComposerSpec {
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 `HybridAixComposerSpec_cxx`.
66
+ * The pointer has to be a retained opaque `Unmanaged<HybridAixComposerSpec_cxx>`.
67
+ * This removes one strong reference from the object!
68
+ */
69
+ public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridAixComposerSpec_cxx {
70
+ return Unmanaged<HybridAixComposerSpec_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<HybridAixComposerSpec>`.
76
+ */
77
+ public func getCxxPart() -> bridge.std__shared_ptr_HybridAixComposerSpec_ {
78
+ let cachedCxxPart = self.__cxxPart.lock()
79
+ if Bool(fromCxx: cachedCxxPart) {
80
+ return cachedCxxPart
81
+ } else {
82
+ let newCxxPart = bridge.create_std__shared_ptr_HybridAixComposerSpec_(self.toUnsafe())
83
+ __cxxPart = bridge.weakify_std__shared_ptr_HybridAixComposerSpec_(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
+
118
+
119
+ // Methods
120
+ public final func getView() -> UnsafeMutableRawPointer {
121
+ return Unmanaged.passRetained(__implementation.view).toOpaque()
122
+ }
123
+
124
+ public final func beforeUpdate() {
125
+ __implementation.beforeUpdate()
126
+ }
127
+
128
+ public final func afterUpdate() {
129
+ __implementation.afterUpdate()
130
+ }
131
+ }
@@ -0,0 +1,63 @@
1
+ ///
2
+ /// HybridAixSpec.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
+ /// See ``HybridAixSpec``
12
+ public protocol HybridAixSpec_protocol: HybridObject, HybridView {
13
+ // Properties
14
+ var shouldStartAtEnd: Bool { get set }
15
+ var scrollOnFooterSizeUpdate: AixScrollOnFooterSizeUpdate? { get set }
16
+ var scrollEndReachedThreshold: Double? { get set }
17
+ var additionalContentInsets: AixAdditionalContentInsetsProp? { get set }
18
+ var additionalScrollIndicatorInsets: AixScrollIndicatorInsets? { get set }
19
+ var mainScrollViewID: String? { get set }
20
+ var penultimateCellIndex: Double? { get set }
21
+
22
+ // Methods
23
+ func scrollToEnd(animated: Bool?) throws -> Void
24
+ func scrollToIndexWhenBlankSizeReady(index: Double, animated: Bool?, waitForKeyboardToEnd: Bool?) throws -> Void
25
+ }
26
+
27
+ public extension HybridAixSpec_protocol {
28
+ /// Default implementation of ``HybridObject.toString``
29
+ func toString() -> String {
30
+ return "[HybridObject Aix]"
31
+ }
32
+ }
33
+
34
+ /// See ``HybridAixSpec``
35
+ open class HybridAixSpec_base {
36
+ private weak var cxxWrapper: HybridAixSpec_cxx? = nil
37
+ public init() { }
38
+ public func getCxxWrapper() -> HybridAixSpec_cxx {
39
+ #if DEBUG
40
+ guard self is HybridAixSpec else {
41
+ fatalError("`self` is not a `HybridAixSpec`! Did you accidentally inherit from `HybridAixSpec_base` instead of `HybridAixSpec`?")
42
+ }
43
+ #endif
44
+ if let cxxWrapper = self.cxxWrapper {
45
+ return cxxWrapper
46
+ } else {
47
+ let cxxWrapper = HybridAixSpec_cxx(self as! HybridAixSpec)
48
+ self.cxxWrapper = cxxWrapper
49
+ return cxxWrapper
50
+ }
51
+ }
52
+ }
53
+
54
+ /**
55
+ * A Swift base-protocol representing the Aix HybridObject.
56
+ * Implement this protocol to create Swift-based instances of Aix.
57
+ * ```swift
58
+ * class HybridAix : HybridAixSpec {
59
+ * // ...
60
+ * }
61
+ * ```
62
+ */
63
+ public typealias HybridAixSpec = HybridAixSpec_protocol & HybridAixSpec_base