aix 0.0.14 → 0.1.0-alpha.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/Aix.podspec +32 -0
- package/LICENSE +2 -2
- package/README.md +165 -33
- package/android/CMakeLists.txt +32 -0
- package/android/build.gradle +148 -0
- package/android/fix-prefab.gradle +51 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/aix/AixPackage.kt +29 -0
- package/android/src/main/java/com/aix/HybridAix.kt +27 -0
- package/ios/Bridge.h +8 -0
- package/ios/HybridAix.swift +1072 -0
- package/ios/HybridAixCellView.swift +174 -0
- package/ios/HybridAixComposer.swift +119 -0
- package/lib/commonjs/aix.js +25 -0
- package/lib/commonjs/aix.js.map +1 -0
- package/lib/commonjs/fade-in/createUsePool.js +50 -0
- package/lib/commonjs/fade-in/createUsePool.js.map +1 -0
- package/lib/commonjs/fade-in/createUseStaggered.js +82 -0
- package/lib/commonjs/fade-in/createUseStaggered.js.map +1 -0
- package/lib/commonjs/fade-in/index.js +78 -0
- package/lib/commonjs/fade-in/index.js.map +1 -0
- package/lib/commonjs/footer.js +28 -0
- package/lib/commonjs/footer.js.map +1 -0
- package/lib/commonjs/index.js +48 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/views/aix.nitro.js +6 -0
- package/lib/commonjs/views/aix.nitro.js.map +1 -0
- package/lib/module/aix.js +20 -0
- package/lib/module/aix.js.map +1 -0
- package/lib/module/fade-in/createUsePool.js +46 -0
- package/lib/module/fade-in/createUsePool.js.map +1 -0
- package/lib/module/fade-in/createUseStaggered.js +79 -0
- package/lib/module/fade-in/createUseStaggered.js.map +1 -0
- package/lib/module/fade-in/index.js +74 -0
- package/lib/module/fade-in/index.js.map +1 -0
- package/lib/module/footer.js +23 -0
- package/lib/module/footer.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/views/aix.nitro.js +4 -0
- package/lib/module/views/aix.nitro.js.map +1 -0
- package/lib/typescript/src/aix.d.ts +14 -0
- package/lib/typescript/src/aix.d.ts.map +1 -0
- package/lib/typescript/src/fade-in/createUsePool.d.ts +5 -0
- package/lib/typescript/src/fade-in/createUsePool.d.ts.map +1 -0
- package/lib/typescript/src/fade-in/createUseStaggered.d.ts +2 -0
- package/lib/typescript/src/fade-in/createUseStaggered.d.ts.map +1 -0
- package/lib/typescript/src/fade-in/index.d.ts +5 -0
- package/lib/typescript/src/fade-in/index.d.ts.map +1 -0
- package/lib/typescript/src/footer.d.ts +5 -0
- package/lib/typescript/src/footer.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +10 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/views/aix.nitro.d.ts +101 -0
- package/lib/typescript/src/views/aix.nitro.d.ts.map +1 -0
- package/nitro.json +26 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/Aix+autolinking.cmake +91 -0
- package/nitrogen/generated/android/Aix+autolinking.gradle +27 -0
- package/nitrogen/generated/android/AixOnLoad.cpp +70 -0
- package/nitrogen/generated/android/AixOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JAixAdditionalContentInsets.hpp +61 -0
- package/nitrogen/generated/android/c++/JAixAdditionalContentInsetsProp.hpp +63 -0
- package/nitrogen/generated/android/c++/JAixScrollIndicatorInsetValue.hpp +61 -0
- package/nitrogen/generated/android/c++/JAixScrollIndicatorInsets.hpp +63 -0
- package/nitrogen/generated/android/c++/JAixScrollOnFooterSizeUpdate.hpp +65 -0
- package/nitrogen/generated/android/c++/JHybridAixCellViewSpec.cpp +65 -0
- package/nitrogen/generated/android/c++/JHybridAixCellViewSpec.hpp +68 -0
- package/nitrogen/generated/android/c++/JHybridAixComposerSpec.cpp +48 -0
- package/nitrogen/generated/android/c++/JHybridAixComposerSpec.hpp +65 -0
- package/nitrogen/generated/android/c++/JHybridAixSpec.cpp +137 -0
- package/nitrogen/generated/android/c++/JHybridAixSpec.hpp +79 -0
- package/nitrogen/generated/android/c++/views/JHybridAixCellViewStateUpdater.cpp +60 -0
- package/nitrogen/generated/android/c++/views/JHybridAixCellViewStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/c++/views/JHybridAixComposerStateUpdater.cpp +53 -0
- package/nitrogen/generated/android/c++/views/JHybridAixComposerStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/c++/views/JHybridAixStateUpdater.cpp +80 -0
- package/nitrogen/generated/android/c++/views/JHybridAixStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixAdditionalContentInsets.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixAdditionalContentInsetsProp.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixScrollIndicatorInsetValue.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixScrollIndicatorInsets.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/AixScrollOnFooterSizeUpdate.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixCellViewSpec.kt +65 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixComposerSpec.kt +55 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/HybridAixSpec.kt +101 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixCellViewManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixCellViewStateUpdater.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixComposerManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixComposerStateUpdater.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/aix/views/HybridAixStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/Aix+autolinking.rb +60 -0
- package/nitrogen/generated/ios/Aix-Swift-Cxx-Bridge.cpp +67 -0
- package/nitrogen/generated/ios/Aix-Swift-Cxx-Bridge.hpp +222 -0
- package/nitrogen/generated/ios/Aix-Swift-Cxx-Umbrella.hpp +70 -0
- package/nitrogen/generated/ios/AixAutolinking.mm +49 -0
- package/nitrogen/generated/ios/AixAutolinking.swift +55 -0
- package/nitrogen/generated/ios/c++/HybridAixCellViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridAixCellViewSpecSwift.hpp +80 -0
- package/nitrogen/generated/ios/c++/HybridAixComposerSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridAixComposerSpecSwift.hpp +69 -0
- package/nitrogen/generated/ios/c++/HybridAixSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridAixSpecSwift.hpp +142 -0
- package/nitrogen/generated/ios/c++/views/HybridAixCellViewComponent.mm +101 -0
- package/nitrogen/generated/ios/c++/views/HybridAixComponent.mm +126 -0
- package/nitrogen/generated/ios/c++/views/HybridAixComposerComponent.mm +92 -0
- package/nitrogen/generated/ios/swift/AixAdditionalContentInsets.swift +47 -0
- package/nitrogen/generated/ios/swift/AixAdditionalContentInsetsProp.swift +71 -0
- package/nitrogen/generated/ios/swift/AixScrollIndicatorInsetValue.swift +47 -0
- package/nitrogen/generated/ios/swift/AixScrollIndicatorInsets.swift +71 -0
- package/nitrogen/generated/ios/swift/AixScrollOnFooterSizeUpdate.swift +89 -0
- package/nitrogen/generated/ios/swift/HybridAixCellViewSpec.swift +57 -0
- package/nitrogen/generated/ios/swift/HybridAixCellViewSpec_cxx.swift +151 -0
- package/nitrogen/generated/ios/swift/HybridAixComposerSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridAixComposerSpec_cxx.swift +131 -0
- package/nitrogen/generated/ios/swift/HybridAixSpec.swift +63 -0
- package/nitrogen/generated/ios/swift/HybridAixSpec_cxx.swift +292 -0
- package/nitrogen/generated/shared/c++/AixAdditionalContentInsets.hpp +79 -0
- package/nitrogen/generated/shared/c++/AixAdditionalContentInsetsProp.hpp +81 -0
- package/nitrogen/generated/shared/c++/AixScrollIndicatorInsetValue.hpp +79 -0
- package/nitrogen/generated/shared/c++/AixScrollIndicatorInsets.hpp +81 -0
- package/nitrogen/generated/shared/c++/AixScrollOnFooterSizeUpdate.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridAixCellViewSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridAixCellViewSpec.hpp +65 -0
- package/nitrogen/generated/shared/c++/HybridAixComposerSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridAixComposerSpec.hpp +62 -0
- package/nitrogen/generated/shared/c++/HybridAixSpec.cpp +36 -0
- package/nitrogen/generated/shared/c++/HybridAixSpec.hpp +85 -0
- package/nitrogen/generated/shared/c++/views/HybridAixCellViewComponent.cpp +99 -0
- package/nitrogen/generated/shared/c++/views/HybridAixCellViewComponent.hpp +108 -0
- package/nitrogen/generated/shared/c++/views/HybridAixComponent.cpp +159 -0
- package/nitrogen/generated/shared/c++/views/HybridAixComponent.hpp +117 -0
- package/nitrogen/generated/shared/c++/views/HybridAixComposerComponent.cpp +75 -0
- package/nitrogen/generated/shared/c++/views/HybridAixComposerComponent.hpp +106 -0
- package/nitrogen/generated/shared/json/AixCellViewConfig.json +11 -0
- package/nitrogen/generated/shared/json/AixComposerConfig.json +9 -0
- package/nitrogen/generated/shared/json/AixConfig.json +16 -0
- package/package.json +115 -12
- package/src/aix.tsx +43 -0
- package/src/fade-in/createUsePool.ts +46 -0
- package/src/fade-in/createUseStaggered.ts +82 -0
- package/src/fade-in/index.tsx +97 -0
- package/src/footer.tsx +30 -0
- package/src/index.ts +20 -16
- package/src/views/aix.nitro.ts +148 -0
- package/docs/API.md +0 -193
- package/jest.config.js +0 -17
- package/lib/__tests__/deferredIterable.test.d.ts +0 -1
- package/lib/__tests__/deferredIterable.test.js +0 -111
- package/lib/__tests__/filter.test.d.ts +0 -1
- package/lib/__tests__/filter.test.js +0 -56
- package/lib/__tests__/flatMap.test.d.ts +0 -1
- package/lib/__tests__/flatMap.test.js +0 -80
- package/lib/__tests__/lookahead.test.d.ts +0 -1
- package/lib/__tests__/lookahead.test.js +0 -60
- package/lib/__tests__/map.test.d.ts +0 -1
- package/lib/__tests__/map.test.js +0 -56
- package/lib/__tests__/merge.test.d.ts +0 -1
- package/lib/__tests__/merge.test.js +0 -58
- package/lib/__tests__/reduce.test.d.ts +0 -1
- package/lib/__tests__/reduce.test.js +0 -55
- package/lib/__tests__/spanAll.test.d.ts +0 -1
- package/lib/__tests__/spanAll.test.js +0 -123
- package/lib/concat.d.ts +0 -5
- package/lib/concat.js +0 -127
- package/lib/deferred.d.ts +0 -10
- package/lib/deferred.js +0 -19
- package/lib/deferredIterable.d.ts +0 -23
- package/lib/deferredIterable.js +0 -112
- package/lib/filter.d.ts +0 -8
- package/lib/filter.js +0 -100
- package/lib/flatMap.d.ts +0 -2
- package/lib/flatMap.js +0 -120
- package/lib/fromEvent.d.ts +0 -6
- package/lib/fromEvent.js +0 -17
- package/lib/index.d.ts +0 -16
- package/lib/index.js +0 -34
- package/lib/insert.d.ts +0 -5
- package/lib/insert.js +0 -114
- package/lib/interval.d.ts +0 -5
- package/lib/interval.js +0 -68
- package/lib/iterableToArray.d.ts +0 -2
- package/lib/iterableToArray.js +0 -88
- package/lib/iteratorToIterable.d.ts +0 -7
- package/lib/iteratorToIterable.js +0 -71
- package/lib/lookahead.d.ts +0 -11
- package/lib/lookahead.js +0 -82
- package/lib/map.d.ts +0 -5
- package/lib/map.js +0 -99
- package/lib/merge.d.ts +0 -7
- package/lib/merge.js +0 -25
- package/lib/reduce.d.ts +0 -5
- package/lib/reduce.js +0 -93
- package/lib/restToIterable.d.ts +0 -5
- package/lib/restToIterable.js +0 -74
- package/lib/spanAll.d.ts +0 -2
- package/lib/spanAll.js +0 -34
- package/lib/tap.d.ts +0 -5
- package/lib/tap.js +0 -97
- package/lib/toCallbacks.d.ts +0 -12
- package/lib/toCallbacks.js +0 -98
- package/lib/zip.d.ts +0 -5
- package/lib/zip.js +0 -76
- package/src/__tests__/deferredIterable.test.ts +0 -22
- package/src/__tests__/filter.test.ts +0 -10
- package/src/__tests__/flatMap.test.ts +0 -12
- package/src/__tests__/lookahead.test.ts +0 -9
- package/src/__tests__/map.test.ts +0 -10
- package/src/__tests__/merge.test.ts +0 -9
- package/src/__tests__/reduce.test.ts +0 -10
- package/src/__tests__/spanAll.test.ts +0 -17
- package/src/concat.ts +0 -13
- package/src/deferred.ts +0 -15
- package/src/deferredIterable.ts +0 -111
- package/src/filter.ts +0 -16
- package/src/flatMap.ts +0 -9
- package/src/fromEvent.ts +0 -16
- package/src/insert.ts +0 -13
- package/src/interval.ts +0 -20
- package/src/iterableToArray.ts +0 -7
- package/src/iteratorToIterable.ts +0 -12
- package/src/lookahead.ts +0 -27
- package/src/map.ts +0 -11
- package/src/merge.ts +0 -16
- package/src/of.ts +0 -4
- package/src/reduce.ts +0 -12
- package/src/restToIterable.ts +0 -8
- package/src/spanAll.ts +0 -26
- package/src/tap.ts +0 -11
- package/src/toCallbacks.ts +0 -27
- package/src/zip.ts +0 -19
- package/tsconfig.json +0 -63
- package/yarn.lock +0 -3514
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAixSpec_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 HybridAixSpec 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 HybridAixSpec_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 `HybridAixSpec` Swift protocol.
|
|
30
|
+
*/
|
|
31
|
+
private var __implementation: any HybridAixSpec
|
|
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_HybridAixSpec_
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create a new `HybridAixSpec_cxx` that wraps the given `HybridAixSpec`.
|
|
40
|
+
* All properties and methods bridge to C++ types.
|
|
41
|
+
*/
|
|
42
|
+
public init(_ implementation: any HybridAixSpec) {
|
|
43
|
+
self.__implementation = implementation
|
|
44
|
+
self.__cxxPart = .init()
|
|
45
|
+
/* no base class */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get the actual `HybridAixSpec` instance this class wraps.
|
|
50
|
+
*/
|
|
51
|
+
@inline(__always)
|
|
52
|
+
public func getHybridAixSpec() -> any HybridAixSpec {
|
|
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 `HybridAixSpec_cxx`.
|
|
66
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridAixSpec_cxx>`.
|
|
67
|
+
* This removes one strong reference from the object!
|
|
68
|
+
*/
|
|
69
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridAixSpec_cxx {
|
|
70
|
+
return Unmanaged<HybridAixSpec_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<HybridAixSpec>`.
|
|
76
|
+
*/
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridAixSpec_ {
|
|
78
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
80
|
+
return cachedCxxPart
|
|
81
|
+
} else {
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridAixSpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridAixSpec_(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 shouldStartAtEnd: Bool {
|
|
118
|
+
@inline(__always)
|
|
119
|
+
get {
|
|
120
|
+
return self.__implementation.shouldStartAtEnd
|
|
121
|
+
}
|
|
122
|
+
@inline(__always)
|
|
123
|
+
set {
|
|
124
|
+
self.__implementation.shouldStartAtEnd = newValue
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
public final var scrollOnFooterSizeUpdate: bridge.std__optional_AixScrollOnFooterSizeUpdate_ {
|
|
129
|
+
@inline(__always)
|
|
130
|
+
get {
|
|
131
|
+
return { () -> bridge.std__optional_AixScrollOnFooterSizeUpdate_ in
|
|
132
|
+
if let __unwrappedValue = self.__implementation.scrollOnFooterSizeUpdate {
|
|
133
|
+
return bridge.create_std__optional_AixScrollOnFooterSizeUpdate_(__unwrappedValue)
|
|
134
|
+
} else {
|
|
135
|
+
return .init()
|
|
136
|
+
}
|
|
137
|
+
}()
|
|
138
|
+
}
|
|
139
|
+
@inline(__always)
|
|
140
|
+
set {
|
|
141
|
+
self.__implementation.scrollOnFooterSizeUpdate = newValue.value
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
public final var scrollEndReachedThreshold: bridge.std__optional_double_ {
|
|
146
|
+
@inline(__always)
|
|
147
|
+
get {
|
|
148
|
+
return { () -> bridge.std__optional_double_ in
|
|
149
|
+
if let __unwrappedValue = self.__implementation.scrollEndReachedThreshold {
|
|
150
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
151
|
+
} else {
|
|
152
|
+
return .init()
|
|
153
|
+
}
|
|
154
|
+
}()
|
|
155
|
+
}
|
|
156
|
+
@inline(__always)
|
|
157
|
+
set {
|
|
158
|
+
self.__implementation.scrollEndReachedThreshold = newValue.value
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
public final var additionalContentInsets: bridge.std__optional_AixAdditionalContentInsetsProp_ {
|
|
163
|
+
@inline(__always)
|
|
164
|
+
get {
|
|
165
|
+
return { () -> bridge.std__optional_AixAdditionalContentInsetsProp_ in
|
|
166
|
+
if let __unwrappedValue = self.__implementation.additionalContentInsets {
|
|
167
|
+
return bridge.create_std__optional_AixAdditionalContentInsetsProp_(__unwrappedValue)
|
|
168
|
+
} else {
|
|
169
|
+
return .init()
|
|
170
|
+
}
|
|
171
|
+
}()
|
|
172
|
+
}
|
|
173
|
+
@inline(__always)
|
|
174
|
+
set {
|
|
175
|
+
self.__implementation.additionalContentInsets = newValue.value
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
public final var additionalScrollIndicatorInsets: bridge.std__optional_AixScrollIndicatorInsets_ {
|
|
180
|
+
@inline(__always)
|
|
181
|
+
get {
|
|
182
|
+
return { () -> bridge.std__optional_AixScrollIndicatorInsets_ in
|
|
183
|
+
if let __unwrappedValue = self.__implementation.additionalScrollIndicatorInsets {
|
|
184
|
+
return bridge.create_std__optional_AixScrollIndicatorInsets_(__unwrappedValue)
|
|
185
|
+
} else {
|
|
186
|
+
return .init()
|
|
187
|
+
}
|
|
188
|
+
}()
|
|
189
|
+
}
|
|
190
|
+
@inline(__always)
|
|
191
|
+
set {
|
|
192
|
+
self.__implementation.additionalScrollIndicatorInsets = newValue.value
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
public final var mainScrollViewID: bridge.std__optional_std__string_ {
|
|
197
|
+
@inline(__always)
|
|
198
|
+
get {
|
|
199
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
200
|
+
if let __unwrappedValue = self.__implementation.mainScrollViewID {
|
|
201
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
202
|
+
} else {
|
|
203
|
+
return .init()
|
|
204
|
+
}
|
|
205
|
+
}()
|
|
206
|
+
}
|
|
207
|
+
@inline(__always)
|
|
208
|
+
set {
|
|
209
|
+
self.__implementation.mainScrollViewID = { () -> String? in
|
|
210
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
211
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
212
|
+
return String(__unwrapped)
|
|
213
|
+
} else {
|
|
214
|
+
return nil
|
|
215
|
+
}
|
|
216
|
+
}()
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
public final var penultimateCellIndex: bridge.std__optional_double_ {
|
|
221
|
+
@inline(__always)
|
|
222
|
+
get {
|
|
223
|
+
return { () -> bridge.std__optional_double_ in
|
|
224
|
+
if let __unwrappedValue = self.__implementation.penultimateCellIndex {
|
|
225
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
226
|
+
} else {
|
|
227
|
+
return .init()
|
|
228
|
+
}
|
|
229
|
+
}()
|
|
230
|
+
}
|
|
231
|
+
@inline(__always)
|
|
232
|
+
set {
|
|
233
|
+
self.__implementation.penultimateCellIndex = newValue.value
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Methods
|
|
238
|
+
@inline(__always)
|
|
239
|
+
public final func scrollToEnd(animated: bridge.std__optional_bool_) -> bridge.Result_void_ {
|
|
240
|
+
do {
|
|
241
|
+
try self.__implementation.scrollToEnd(animated: { () -> Bool? in
|
|
242
|
+
if bridge.has_value_std__optional_bool_(animated) {
|
|
243
|
+
let __unwrapped = bridge.get_std__optional_bool_(animated)
|
|
244
|
+
return __unwrapped
|
|
245
|
+
} else {
|
|
246
|
+
return nil
|
|
247
|
+
}
|
|
248
|
+
}())
|
|
249
|
+
return bridge.create_Result_void_()
|
|
250
|
+
} catch (let __error) {
|
|
251
|
+
let __exceptionPtr = __error.toCpp()
|
|
252
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@inline(__always)
|
|
257
|
+
public final func scrollToIndexWhenBlankSizeReady(index: Double, animated: bridge.std__optional_bool_, waitForKeyboardToEnd: bridge.std__optional_bool_) -> bridge.Result_void_ {
|
|
258
|
+
do {
|
|
259
|
+
try self.__implementation.scrollToIndexWhenBlankSizeReady(index: index, animated: { () -> Bool? in
|
|
260
|
+
if bridge.has_value_std__optional_bool_(animated) {
|
|
261
|
+
let __unwrapped = bridge.get_std__optional_bool_(animated)
|
|
262
|
+
return __unwrapped
|
|
263
|
+
} else {
|
|
264
|
+
return nil
|
|
265
|
+
}
|
|
266
|
+
}(), waitForKeyboardToEnd: { () -> Bool? in
|
|
267
|
+
if bridge.has_value_std__optional_bool_(waitForKeyboardToEnd) {
|
|
268
|
+
let __unwrapped = bridge.get_std__optional_bool_(waitForKeyboardToEnd)
|
|
269
|
+
return __unwrapped
|
|
270
|
+
} else {
|
|
271
|
+
return nil
|
|
272
|
+
}
|
|
273
|
+
}())
|
|
274
|
+
return bridge.create_Result_void_()
|
|
275
|
+
} catch (let __error) {
|
|
276
|
+
let __exceptionPtr = __error.toCpp()
|
|
277
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
public final func getView() -> UnsafeMutableRawPointer {
|
|
282
|
+
return Unmanaged.passRetained(__implementation.view).toOpaque()
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
public final func beforeUpdate() {
|
|
286
|
+
__implementation.beforeUpdate()
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
public final func afterUpdate() {
|
|
290
|
+
__implementation.afterUpdate()
|
|
291
|
+
}
|
|
292
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AixAdditionalContentInsets.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
|
+
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::aix {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (AixAdditionalContentInsets).
|
|
34
|
+
*/
|
|
35
|
+
struct AixAdditionalContentInsets {
|
|
36
|
+
public:
|
|
37
|
+
double whenKeyboardOpen SWIFT_PRIVATE;
|
|
38
|
+
double whenKeyboardClosed SWIFT_PRIVATE;
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
AixAdditionalContentInsets() = default;
|
|
42
|
+
explicit AixAdditionalContentInsets(double whenKeyboardOpen, double whenKeyboardClosed): whenKeyboardOpen(whenKeyboardOpen), whenKeyboardClosed(whenKeyboardClosed) {}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} // namespace margelo::nitro::aix
|
|
46
|
+
|
|
47
|
+
namespace margelo::nitro {
|
|
48
|
+
|
|
49
|
+
// C++ AixAdditionalContentInsets <> JS AixAdditionalContentInsets (object)
|
|
50
|
+
template <>
|
|
51
|
+
struct JSIConverter<margelo::nitro::aix::AixAdditionalContentInsets> final {
|
|
52
|
+
static inline margelo::nitro::aix::AixAdditionalContentInsets fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
+
return margelo::nitro::aix::AixAdditionalContentInsets(
|
|
55
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "whenKeyboardOpen")),
|
|
56
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "whenKeyboardClosed"))
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::aix::AixAdditionalContentInsets& arg) {
|
|
60
|
+
jsi::Object obj(runtime);
|
|
61
|
+
obj.setProperty(runtime, "whenKeyboardOpen", JSIConverter<double>::toJSI(runtime, arg.whenKeyboardOpen));
|
|
62
|
+
obj.setProperty(runtime, "whenKeyboardClosed", JSIConverter<double>::toJSI(runtime, arg.whenKeyboardClosed));
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
66
|
+
if (!value.isObject()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "whenKeyboardOpen"))) return false;
|
|
74
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "whenKeyboardClosed"))) return false;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AixAdditionalContentInsetsProp.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
|
+
// Forward declaration of `AixAdditionalContentInsets` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::aix { struct AixAdditionalContentInsets; }
|
|
28
|
+
|
|
29
|
+
#include "AixAdditionalContentInsets.hpp"
|
|
30
|
+
#include <optional>
|
|
31
|
+
|
|
32
|
+
namespace margelo::nitro::aix {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A struct which can be represented as a JavaScript object (AixAdditionalContentInsetsProp).
|
|
36
|
+
*/
|
|
37
|
+
struct AixAdditionalContentInsetsProp {
|
|
38
|
+
public:
|
|
39
|
+
std::optional<AixAdditionalContentInsets> top SWIFT_PRIVATE;
|
|
40
|
+
std::optional<AixAdditionalContentInsets> bottom SWIFT_PRIVATE;
|
|
41
|
+
|
|
42
|
+
public:
|
|
43
|
+
AixAdditionalContentInsetsProp() = default;
|
|
44
|
+
explicit AixAdditionalContentInsetsProp(std::optional<AixAdditionalContentInsets> top, std::optional<AixAdditionalContentInsets> bottom): top(top), bottom(bottom) {}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
} // namespace margelo::nitro::aix
|
|
48
|
+
|
|
49
|
+
namespace margelo::nitro {
|
|
50
|
+
|
|
51
|
+
// C++ AixAdditionalContentInsetsProp <> JS AixAdditionalContentInsetsProp (object)
|
|
52
|
+
template <>
|
|
53
|
+
struct JSIConverter<margelo::nitro::aix::AixAdditionalContentInsetsProp> final {
|
|
54
|
+
static inline margelo::nitro::aix::AixAdditionalContentInsetsProp fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
56
|
+
return margelo::nitro::aix::AixAdditionalContentInsetsProp(
|
|
57
|
+
JSIConverter<std::optional<margelo::nitro::aix::AixAdditionalContentInsets>>::fromJSI(runtime, obj.getProperty(runtime, "top")),
|
|
58
|
+
JSIConverter<std::optional<margelo::nitro::aix::AixAdditionalContentInsets>>::fromJSI(runtime, obj.getProperty(runtime, "bottom"))
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::aix::AixAdditionalContentInsetsProp& arg) {
|
|
62
|
+
jsi::Object obj(runtime);
|
|
63
|
+
obj.setProperty(runtime, "top", JSIConverter<std::optional<margelo::nitro::aix::AixAdditionalContentInsets>>::toJSI(runtime, arg.top));
|
|
64
|
+
obj.setProperty(runtime, "bottom", JSIConverter<std::optional<margelo::nitro::aix::AixAdditionalContentInsets>>::toJSI(runtime, arg.bottom));
|
|
65
|
+
return obj;
|
|
66
|
+
}
|
|
67
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
68
|
+
if (!value.isObject()) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
jsi::Object obj = value.getObject(runtime);
|
|
72
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (!JSIConverter<std::optional<margelo::nitro::aix::AixAdditionalContentInsets>>::canConvert(runtime, obj.getProperty(runtime, "top"))) return false;
|
|
76
|
+
if (!JSIConverter<std::optional<margelo::nitro::aix::AixAdditionalContentInsets>>::canConvert(runtime, obj.getProperty(runtime, "bottom"))) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AixScrollIndicatorInsetValue.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
|
+
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::aix {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (AixScrollIndicatorInsetValue).
|
|
34
|
+
*/
|
|
35
|
+
struct AixScrollIndicatorInsetValue {
|
|
36
|
+
public:
|
|
37
|
+
double whenKeyboardOpen SWIFT_PRIVATE;
|
|
38
|
+
double whenKeyboardClosed SWIFT_PRIVATE;
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
AixScrollIndicatorInsetValue() = default;
|
|
42
|
+
explicit AixScrollIndicatorInsetValue(double whenKeyboardOpen, double whenKeyboardClosed): whenKeyboardOpen(whenKeyboardOpen), whenKeyboardClosed(whenKeyboardClosed) {}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} // namespace margelo::nitro::aix
|
|
46
|
+
|
|
47
|
+
namespace margelo::nitro {
|
|
48
|
+
|
|
49
|
+
// C++ AixScrollIndicatorInsetValue <> JS AixScrollIndicatorInsetValue (object)
|
|
50
|
+
template <>
|
|
51
|
+
struct JSIConverter<margelo::nitro::aix::AixScrollIndicatorInsetValue> final {
|
|
52
|
+
static inline margelo::nitro::aix::AixScrollIndicatorInsetValue fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
+
return margelo::nitro::aix::AixScrollIndicatorInsetValue(
|
|
55
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "whenKeyboardOpen")),
|
|
56
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "whenKeyboardClosed"))
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::aix::AixScrollIndicatorInsetValue& arg) {
|
|
60
|
+
jsi::Object obj(runtime);
|
|
61
|
+
obj.setProperty(runtime, "whenKeyboardOpen", JSIConverter<double>::toJSI(runtime, arg.whenKeyboardOpen));
|
|
62
|
+
obj.setProperty(runtime, "whenKeyboardClosed", JSIConverter<double>::toJSI(runtime, arg.whenKeyboardClosed));
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
66
|
+
if (!value.isObject()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "whenKeyboardOpen"))) return false;
|
|
74
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "whenKeyboardClosed"))) return false;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AixScrollIndicatorInsets.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
|
+
// Forward declaration of `AixScrollIndicatorInsetValue` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::aix { struct AixScrollIndicatorInsetValue; }
|
|
28
|
+
|
|
29
|
+
#include "AixScrollIndicatorInsetValue.hpp"
|
|
30
|
+
#include <optional>
|
|
31
|
+
|
|
32
|
+
namespace margelo::nitro::aix {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A struct which can be represented as a JavaScript object (AixScrollIndicatorInsets).
|
|
36
|
+
*/
|
|
37
|
+
struct AixScrollIndicatorInsets {
|
|
38
|
+
public:
|
|
39
|
+
std::optional<AixScrollIndicatorInsetValue> top SWIFT_PRIVATE;
|
|
40
|
+
std::optional<AixScrollIndicatorInsetValue> bottom SWIFT_PRIVATE;
|
|
41
|
+
|
|
42
|
+
public:
|
|
43
|
+
AixScrollIndicatorInsets() = default;
|
|
44
|
+
explicit AixScrollIndicatorInsets(std::optional<AixScrollIndicatorInsetValue> top, std::optional<AixScrollIndicatorInsetValue> bottom): top(top), bottom(bottom) {}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
} // namespace margelo::nitro::aix
|
|
48
|
+
|
|
49
|
+
namespace margelo::nitro {
|
|
50
|
+
|
|
51
|
+
// C++ AixScrollIndicatorInsets <> JS AixScrollIndicatorInsets (object)
|
|
52
|
+
template <>
|
|
53
|
+
struct JSIConverter<margelo::nitro::aix::AixScrollIndicatorInsets> final {
|
|
54
|
+
static inline margelo::nitro::aix::AixScrollIndicatorInsets fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
56
|
+
return margelo::nitro::aix::AixScrollIndicatorInsets(
|
|
57
|
+
JSIConverter<std::optional<margelo::nitro::aix::AixScrollIndicatorInsetValue>>::fromJSI(runtime, obj.getProperty(runtime, "top")),
|
|
58
|
+
JSIConverter<std::optional<margelo::nitro::aix::AixScrollIndicatorInsetValue>>::fromJSI(runtime, obj.getProperty(runtime, "bottom"))
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::aix::AixScrollIndicatorInsets& arg) {
|
|
62
|
+
jsi::Object obj(runtime);
|
|
63
|
+
obj.setProperty(runtime, "top", JSIConverter<std::optional<margelo::nitro::aix::AixScrollIndicatorInsetValue>>::toJSI(runtime, arg.top));
|
|
64
|
+
obj.setProperty(runtime, "bottom", JSIConverter<std::optional<margelo::nitro::aix::AixScrollIndicatorInsetValue>>::toJSI(runtime, arg.bottom));
|
|
65
|
+
return obj;
|
|
66
|
+
}
|
|
67
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
68
|
+
if (!value.isObject()) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
jsi::Object obj = value.getObject(runtime);
|
|
72
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (!JSIConverter<std::optional<margelo::nitro::aix::AixScrollIndicatorInsetValue>>::canConvert(runtime, obj.getProperty(runtime, "top"))) return false;
|
|
76
|
+
if (!JSIConverter<std::optional<margelo::nitro::aix::AixScrollIndicatorInsetValue>>::canConvert(runtime, obj.getProperty(runtime, "bottom"))) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AixScrollOnFooterSizeUpdate.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 <optional>
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::aix {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (AixScrollOnFooterSizeUpdate).
|
|
34
|
+
*/
|
|
35
|
+
struct AixScrollOnFooterSizeUpdate {
|
|
36
|
+
public:
|
|
37
|
+
bool enabled SWIFT_PRIVATE;
|
|
38
|
+
std::optional<double> scrolledToEndThreshold SWIFT_PRIVATE;
|
|
39
|
+
std::optional<bool> animated SWIFT_PRIVATE;
|
|
40
|
+
|
|
41
|
+
public:
|
|
42
|
+
AixScrollOnFooterSizeUpdate() = default;
|
|
43
|
+
explicit AixScrollOnFooterSizeUpdate(bool enabled, std::optional<double> scrolledToEndThreshold, std::optional<bool> animated): enabled(enabled), scrolledToEndThreshold(scrolledToEndThreshold), animated(animated) {}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
} // namespace margelo::nitro::aix
|
|
47
|
+
|
|
48
|
+
namespace margelo::nitro {
|
|
49
|
+
|
|
50
|
+
// C++ AixScrollOnFooterSizeUpdate <> JS AixScrollOnFooterSizeUpdate (object)
|
|
51
|
+
template <>
|
|
52
|
+
struct JSIConverter<margelo::nitro::aix::AixScrollOnFooterSizeUpdate> final {
|
|
53
|
+
static inline margelo::nitro::aix::AixScrollOnFooterSizeUpdate fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
55
|
+
return margelo::nitro::aix::AixScrollOnFooterSizeUpdate(
|
|
56
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "enabled")),
|
|
57
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "scrolledToEndThreshold")),
|
|
58
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "animated"))
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::aix::AixScrollOnFooterSizeUpdate& arg) {
|
|
62
|
+
jsi::Object obj(runtime);
|
|
63
|
+
obj.setProperty(runtime, "enabled", JSIConverter<bool>::toJSI(runtime, arg.enabled));
|
|
64
|
+
obj.setProperty(runtime, "scrolledToEndThreshold", JSIConverter<std::optional<double>>::toJSI(runtime, arg.scrolledToEndThreshold));
|
|
65
|
+
obj.setProperty(runtime, "animated", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.animated));
|
|
66
|
+
return obj;
|
|
67
|
+
}
|
|
68
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
69
|
+
if (!value.isObject()) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
jsi::Object obj = value.getObject(runtime);
|
|
73
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "enabled"))) return false;
|
|
77
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "scrolledToEndThreshold"))) return false;
|
|
78
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "animated"))) return false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
} // namespace margelo::nitro
|