react-native-list 1.0.1 → 2.0.0-alpha.2

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 (224) hide show
  1. package/README.md +186 -32
  2. package/ReactNativeList.podspec +39 -0
  3. package/android/CMakeLists.txt +48 -0
  4. package/android/build.gradle +151 -0
  5. package/android/fix-prefab.gradle +51 -0
  6. package/android/gradle.properties +5 -0
  7. package/android/src/main/AndroidManifest.xml +2 -0
  8. package/android/src/main/cpp/JHybridUiListModule.cpp +192 -0
  9. package/android/src/main/cpp/JHybridUiListModule.h +50 -0
  10. package/android/src/main/cpp/cpp-adapter.cpp +12 -0
  11. package/android/src/main/java/com/hannojg/reactnativelist/ReactNativeListPackage.kt +27 -0
  12. package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridNativeListDataSource.kt +146 -0
  13. package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridNativeListLayout.kt +86 -0
  14. package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridUiListModule.kt +116 -0
  15. package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridUiListView.kt +410 -0
  16. package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridViewHolder.kt +9 -0
  17. package/android/src/main/java/com/margelo/nitro/reactnativelist/NativeListAdapter.kt +217 -0
  18. package/ios/DataSource/HybridNativeListDataSource.swift +213 -0
  19. package/ios/HybridObjects/HybridUiListModule.swift +49 -0
  20. package/ios/HybridObjects/HybridViewHolder.swift +16 -0
  21. package/ios/Layout/HybridNativeListLayout.swift +128 -0
  22. package/ios/Utils/ErrorUtils.h +26 -0
  23. package/ios/Utils/HybridIOSWorkletsModuleProxyHolder.swift +10 -0
  24. package/ios/Utils/SurfaceHelper.h +20 -0
  25. package/ios/Utils/SurfaceHelper.mm +144 -0
  26. package/ios/Utils/SurfacePresenterRegistry.h +17 -0
  27. package/ios/Utils/SurfacePresenterRegistry.m +31 -0
  28. package/ios/Utils/TurboModuleInstaller.h +18 -0
  29. package/ios/Utils/TurboModuleInstaller.mm +267 -0
  30. package/ios/Views/HostCell.swift +216 -0
  31. package/ios/Views/HybridUiListView.swift +695 -0
  32. package/lib/ReactFabricMirror.d.ts +4 -0
  33. package/lib/ReactFabricMirror.js +515 -0
  34. package/lib/UiListModule.d.ts +2 -0
  35. package/lib/UiListModule.js +2 -0
  36. package/lib/index.d.ts +8 -0
  37. package/lib/index.js +21 -0
  38. package/lib/privateGlobals.d.ts +14 -0
  39. package/lib/privateGlobals.js +2 -0
  40. package/lib/renderer/RenderHelper.d.ts +2 -0
  41. package/lib/renderer/RenderHelper.js +11 -0
  42. package/lib/renderer/UiManagerHelper.d.ts +2 -0
  43. package/lib/renderer/UiManagerHelper.js +2 -0
  44. package/lib/renderer/fabric/RenderHelper.d.ts +2 -0
  45. package/lib/renderer/fabric/RenderHelper.js +11 -0
  46. package/lib/renderer/fabric/UiManagerHelper.d.ts +2 -0
  47. package/lib/renderer/fabric/UiManagerHelper.js +2 -0
  48. package/lib/renderer/react/ReactFabricMirror.d.ts +4 -0
  49. package/lib/renderer/react/ReactFabricMirror.js +515 -0
  50. package/lib/renderer/react/ReactFabricRenderer.d.ts +3 -0
  51. package/lib/renderer/react/ReactFabricRenderer.js +9 -0
  52. package/lib/specs/IOSWorkletsModuleProxyHolder.nitro.d.ts +6 -0
  53. package/lib/specs/IOSWorkletsModuleProxyHolder.nitro.js +1 -0
  54. package/lib/specs/UIListModule.nitro.d.ts +9 -0
  55. package/lib/specs/UIListModule.nitro.js +1 -0
  56. package/lib/specs/UIManagerHelper.nitro.d.ts +13 -0
  57. package/lib/specs/UIManagerHelper.nitro.js +1 -0
  58. package/lib/specs/UiListView.nitro.d.ts +20 -0
  59. package/lib/specs/UiListView.nitro.js +1 -0
  60. package/lib/specs/ViewHolder.nitro.d.ts +6 -0
  61. package/lib/specs/ViewHolder.nitro.js +1 -0
  62. package/lib/views/List.d.ts +35 -0
  63. package/lib/views/List.js +225 -0
  64. package/lib/views/UiListHostComponent.d.ts +2 -0
  65. package/lib/views/UiListHostComponent.js +3 -0
  66. package/metro/RendererProxyThreadSwitch.js +66 -0
  67. package/metro-config.d.ts +1 -0
  68. package/metro-config.js +124 -0
  69. package/nitro.json +47 -0
  70. package/nitrogen/generated/.gitattributes +1 -0
  71. package/nitrogen/generated/android/ReactNativeList+autolinking.cmake +99 -0
  72. package/nitrogen/generated/android/ReactNativeList+autolinking.gradle +27 -0
  73. package/nitrogen/generated/android/ReactNativeListOnLoad.cpp +156 -0
  74. package/nitrogen/generated/android/ReactNativeListOnLoad.hpp +34 -0
  75. package/nitrogen/generated/android/c++/JFunc_bool_NativeListItem_NativeListItem.hpp +83 -0
  76. package/nitrogen/generated/android/c++/JFunc_bool_double_NativeListItem_double.hpp +83 -0
  77. package/nitrogen/generated/android/c++/JFunc_double_std__string.hpp +78 -0
  78. package/nitrogen/generated/android/c++/JHybridIOSWorkletsModuleProxyHolderSpec.cpp +49 -0
  79. package/nitrogen/generated/android/c++/JHybridIOSWorkletsModuleProxyHolderSpec.hpp +63 -0
  80. package/nitrogen/generated/android/c++/JHybridNativeLinearListLayoutSpec.cpp +63 -0
  81. package/nitrogen/generated/android/c++/JHybridNativeLinearListLayoutSpec.hpp +65 -0
  82. package/nitrogen/generated/android/c++/JHybridNativeListDataSourceSpec.cpp +101 -0
  83. package/nitrogen/generated/android/c++/JHybridNativeListDataSourceSpec.hpp +70 -0
  84. package/nitrogen/generated/android/c++/JHybridNativeListLayoutSpec.cpp +49 -0
  85. package/nitrogen/generated/android/c++/JHybridNativeListLayoutSpec.hpp +63 -0
  86. package/nitrogen/generated/android/c++/JHybridUiListModuleSpec.cpp +65 -0
  87. package/nitrogen/generated/android/c++/JHybridUiListModuleSpec.hpp +64 -0
  88. package/nitrogen/generated/android/c++/JHybridUiListViewSpec.cpp +92 -0
  89. package/nitrogen/generated/android/c++/JHybridUiListViewSpec.hpp +67 -0
  90. package/nitrogen/generated/android/c++/JHybridViewHolderSpec.cpp +49 -0
  91. package/nitrogen/generated/android/c++/JHybridViewHolderSpec.hpp +63 -0
  92. package/nitrogen/generated/android/c++/JNativeItemSizeEstimate.hpp +61 -0
  93. package/nitrogen/generated/android/c++/JNativeLinearListLayoutConfig.hpp +81 -0
  94. package/nitrogen/generated/android/c++/JNativeLinearListLayoutIOSConfig.hpp +59 -0
  95. package/nitrogen/generated/android/c++/JNativeListItem.hpp +76 -0
  96. package/nitrogen/generated/android/c++/JVariant_NullType_HybridIOSWorkletsModuleProxyHolderSpec.cpp +26 -0
  97. package/nitrogen/generated/android/c++/JVariant_NullType_HybridIOSWorkletsModuleProxyHolderSpec.hpp +72 -0
  98. package/nitrogen/generated/android/c++/views/JHybridUiListViewStateUpdater.cpp +53 -0
  99. package/nitrogen/generated/android/c++/views/JHybridUiListViewStateUpdater.hpp +49 -0
  100. package/nitrogen/generated/android/c++/views/JHybridViewHolderStateUpdater.cpp +53 -0
  101. package/nitrogen/generated/android/c++/views/JHybridViewHolderStateUpdater.hpp +49 -0
  102. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/Func_bool_NativeListItem_NativeListItem.kt +80 -0
  103. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/Func_bool_double_NativeListItem_double.kt +80 -0
  104. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/Func_double_std__string.kt +80 -0
  105. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridIOSWorkletsModuleProxyHolderSpec.kt +52 -0
  106. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridNativeLinearListLayoutSpec.kt +54 -0
  107. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridNativeListDataSourceSpec.kt +87 -0
  108. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridNativeListLayoutSpec.kt +52 -0
  109. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridUiListModuleSpec.kt +59 -0
  110. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridUiListViewSpec.kt +76 -0
  111. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridViewHolderSpec.kt +53 -0
  112. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/NativeItemSizeEstimate.kt +56 -0
  113. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/NativeLinearListLayoutConfig.kt +76 -0
  114. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/NativeLinearListLayoutIOSConfig.kt +51 -0
  115. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/NativeListItem.kt +71 -0
  116. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/ReactNativeListOnLoad.kt +35 -0
  117. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/Variant_NullType_HybridIOSWorkletsModuleProxyHolderSpec.kt +62 -0
  118. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/views/HybridUiListViewManager.kt +80 -0
  119. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/views/HybridUiListViewStateUpdater.kt +23 -0
  120. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/views/HybridViewHolderManager.kt +80 -0
  121. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/views/HybridViewHolderStateUpdater.kt +23 -0
  122. package/nitrogen/generated/ios/ReactNativeList+autolinking.rb +62 -0
  123. package/nitrogen/generated/ios/ReactNativeList-Swift-Cxx-Bridge.cpp +162 -0
  124. package/nitrogen/generated/ios/ReactNativeList-Swift-Cxx-Bridge.hpp +368 -0
  125. package/nitrogen/generated/ios/ReactNativeList-Swift-Cxx-Umbrella.hpp +92 -0
  126. package/nitrogen/generated/ios/ReactNativeListAutolinking.mm +83 -0
  127. package/nitrogen/generated/ios/ReactNativeListAutolinking.swift +86 -0
  128. package/nitrogen/generated/ios/c++/HybridIOSWorkletsModuleProxyHolderSpecSwift.cpp +11 -0
  129. package/nitrogen/generated/ios/c++/HybridIOSWorkletsModuleProxyHolderSpecSwift.hpp +75 -0
  130. package/nitrogen/generated/ios/c++/HybridNativeLinearListLayoutSpecSwift.cpp +11 -0
  131. package/nitrogen/generated/ios/c++/HybridNativeLinearListLayoutSpecSwift.hpp +92 -0
  132. package/nitrogen/generated/ios/c++/HybridNativeListDataSourceSpecSwift.cpp +11 -0
  133. package/nitrogen/generated/ios/c++/HybridNativeListDataSourceSpecSwift.hpp +132 -0
  134. package/nitrogen/generated/ios/c++/HybridNativeListLayoutSpecSwift.cpp +11 -0
  135. package/nitrogen/generated/ios/c++/HybridNativeListLayoutSpecSwift.hpp +75 -0
  136. package/nitrogen/generated/ios/c++/HybridUiListModuleSpecSwift.cpp +11 -0
  137. package/nitrogen/generated/ios/c++/HybridUiListModuleSpecSwift.hpp +93 -0
  138. package/nitrogen/generated/ios/c++/HybridUiListViewSpecSwift.cpp +11 -0
  139. package/nitrogen/generated/ios/c++/HybridUiListViewSpecSwift.hpp +121 -0
  140. package/nitrogen/generated/ios/c++/HybridViewHolderSpecSwift.cpp +11 -0
  141. package/nitrogen/generated/ios/c++/HybridViewHolderSpecSwift.hpp +75 -0
  142. package/nitrogen/generated/ios/c++/views/HybridUiListViewComponent.mm +118 -0
  143. package/nitrogen/generated/ios/c++/views/HybridViewHolderComponent.mm +118 -0
  144. package/nitrogen/generated/ios/swift/Func_bool_NativeListItem_NativeListItem.swift +47 -0
  145. package/nitrogen/generated/ios/swift/Func_bool_double_NativeListItem_double.swift +47 -0
  146. package/nitrogen/generated/ios/swift/Func_double_std__string.swift +47 -0
  147. package/nitrogen/generated/ios/swift/HybridIOSWorkletsModuleProxyHolderSpec.swift +55 -0
  148. package/nitrogen/generated/ios/swift/HybridIOSWorkletsModuleProxyHolderSpec_cxx.swift +128 -0
  149. package/nitrogen/generated/ios/swift/HybridNativeLinearListLayoutSpec.swift +55 -0
  150. package/nitrogen/generated/ios/swift/HybridNativeLinearListLayoutSpec_cxx.swift +140 -0
  151. package/nitrogen/generated/ios/swift/HybridNativeListDataSourceSpec.swift +62 -0
  152. package/nitrogen/generated/ios/swift/HybridNativeListDataSourceSpec_cxx.swift +222 -0
  153. package/nitrogen/generated/ios/swift/HybridNativeListLayoutSpec.swift +55 -0
  154. package/nitrogen/generated/ios/swift/HybridNativeListLayoutSpec_cxx.swift +128 -0
  155. package/nitrogen/generated/ios/swift/HybridUiListModuleSpec.swift +56 -0
  156. package/nitrogen/generated/ios/swift/HybridUiListModuleSpec_cxx.swift +175 -0
  157. package/nitrogen/generated/ios/swift/HybridUiListViewSpec.swift +59 -0
  158. package/nitrogen/generated/ios/swift/HybridUiListViewSpec_cxx.swift +227 -0
  159. package/nitrogen/generated/ios/swift/HybridViewHolderSpec.swift +55 -0
  160. package/nitrogen/generated/ios/swift/HybridViewHolderSpec_cxx.swift +147 -0
  161. package/nitrogen/generated/ios/swift/NativeItemSizeEstimate.swift +60 -0
  162. package/nitrogen/generated/ios/swift/NativeLinearListLayoutConfig.swift +60 -0
  163. package/nitrogen/generated/ios/swift/NativeLinearListLayoutIOSConfig.swift +35 -0
  164. package/nitrogen/generated/ios/swift/NativeListItem.swift +75 -0
  165. package/nitrogen/generated/ios/swift/Variant_NullType__any_HybridIOSWorkletsModuleProxyHolderSpec_.swift +30 -0
  166. package/nitrogen/generated/shared/c++/HybridIOSWorkletsModuleProxyHolderSpec.cpp +21 -0
  167. package/nitrogen/generated/shared/c++/HybridIOSWorkletsModuleProxyHolderSpec.hpp +62 -0
  168. package/nitrogen/generated/shared/c++/HybridNativeLinearListLayoutSpec.cpp +22 -0
  169. package/nitrogen/generated/shared/c++/HybridNativeLinearListLayoutSpec.hpp +67 -0
  170. package/nitrogen/generated/shared/c++/HybridNativeListDataSourceSpec.cpp +28 -0
  171. package/nitrogen/generated/shared/c++/HybridNativeListDataSourceSpec.hpp +72 -0
  172. package/nitrogen/generated/shared/c++/HybridNativeListLayoutSpec.cpp +21 -0
  173. package/nitrogen/generated/shared/c++/HybridNativeListLayoutSpec.hpp +62 -0
  174. package/nitrogen/generated/shared/c++/HybridUiListModuleSpec.cpp +22 -0
  175. package/nitrogen/generated/shared/c++/HybridUiListModuleSpec.hpp +68 -0
  176. package/nitrogen/generated/shared/c++/HybridUiListViewSpec.cpp +25 -0
  177. package/nitrogen/generated/shared/c++/HybridUiListViewSpec.hpp +79 -0
  178. package/nitrogen/generated/shared/c++/HybridUiManagerHelperSpec.cpp +23 -0
  179. package/nitrogen/generated/shared/c++/HybridUiManagerHelperSpec.hpp +65 -0
  180. package/nitrogen/generated/shared/c++/HybridViewHolderSpec.cpp +21 -0
  181. package/nitrogen/generated/shared/c++/HybridViewHolderSpec.hpp +62 -0
  182. package/nitrogen/generated/shared/c++/NativeItemSizeEstimate.hpp +87 -0
  183. package/nitrogen/generated/shared/c++/NativeLinearListLayoutConfig.hpp +105 -0
  184. package/nitrogen/generated/shared/c++/NativeLinearListLayoutIOSConfig.hpp +85 -0
  185. package/nitrogen/generated/shared/c++/NativeListItem.hpp +101 -0
  186. package/nitrogen/generated/shared/c++/views/HybridUiListViewComponent.cpp +72 -0
  187. package/nitrogen/generated/shared/c++/views/HybridUiListViewComponent.hpp +109 -0
  188. package/nitrogen/generated/shared/c++/views/HybridViewHolderComponent.cpp +72 -0
  189. package/nitrogen/generated/shared/c++/views/HybridViewHolderComponent.hpp +109 -0
  190. package/nitrogen/generated/shared/json/UiListViewConfig.json +9 -0
  191. package/nitrogen/generated/shared/json/ViewHolderConfig.json +9 -0
  192. package/package.json +152 -5
  193. package/react-native.config.js +16 -0
  194. package/src/ListDataSource.ts +232 -0
  195. package/src/ListLayout.ts +95 -0
  196. package/src/UiListModule.ts +5 -0
  197. package/src/hooks/useChangeEffect.ts +50 -0
  198. package/src/index.tsx +49 -0
  199. package/src/privateGlobals.ts +20 -0
  200. package/src/renderer/fabric/RenderHelper.ts +29 -0
  201. package/src/renderer/fabric/UiManagerHelper.ts +5 -0
  202. package/src/renderer/react/ReactFabricMirror.bundle.js +1984 -0
  203. package/src/renderer/react/ReactFabricMirror.ts +766 -0
  204. package/src/renderer/react/ReactFabricRenderer.ts +11 -0
  205. package/src/specs/IOSWorkletsModuleProxyHolder.nitro.ts +6 -0
  206. package/src/specs/NativeLinearListLayout.nitro.ts +23 -0
  207. package/src/specs/NativeListDataSource.nitro.ts +28 -0
  208. package/src/specs/NativeListLayout.nitro.ts +6 -0
  209. package/src/specs/UIListModule.nitro.ts +13 -0
  210. package/src/specs/UIManagerHelper.nitro.ts +34 -0
  211. package/src/specs/UiListView.nitro.ts +31 -0
  212. package/src/specs/ViewHolder.nitro.ts +11 -0
  213. package/src/views/List.tsx +525 -0
  214. package/src/views/UiListHostComponent.ts +8 -0
  215. package/FillRateHelper.js +0 -179
  216. package/FlatList.js +0 -494
  217. package/LICENSE.md +0 -31
  218. package/MetroListView.js +0 -166
  219. package/SectionList.js +0 -291
  220. package/ViewabilityHelper.js +0 -260
  221. package/VirtualizeUtils.js +0 -163
  222. package/VirtualizedList.js +0 -861
  223. package/VirtualizedSectionList.js +0 -397
  224. package/index.js +0 -5
@@ -0,0 +1,227 @@
1
+ ///
2
+ /// HybridUiListViewSpec_cxx.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * A class implementation that bridges HybridUiListViewSpec over to C++.
12
+ * In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
13
+ *
14
+ * Also, some Swift types need to be bridged with special handling:
15
+ * - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
16
+ * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
17
+ * - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
18
+ */
19
+ open class HybridUiListViewSpec_cxx {
20
+ /**
21
+ * The Swift <> C++ bridge's namespace (`margelo::nitro::reactnativelist::bridge::swift`)
22
+ * from `ReactNativeList-Swift-Cxx-Bridge.hpp`.
23
+ * This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
24
+ */
25
+ public typealias bridge = margelo.nitro.reactnativelist.bridge.swift
26
+
27
+ /**
28
+ * Holds an instance of the `HybridUiListViewSpec` Swift protocol.
29
+ */
30
+ private var __implementation: any HybridUiListViewSpec
31
+
32
+ /**
33
+ * Holds a weak pointer to the C++ class that wraps the Swift class.
34
+ */
35
+ private var __cxxPart: bridge.std__weak_ptr_HybridUiListViewSpec_
36
+
37
+ /**
38
+ * Create a new `HybridUiListViewSpec_cxx` that wraps the given `HybridUiListViewSpec`.
39
+ * All properties and methods bridge to C++ types.
40
+ */
41
+ public init(_ implementation: any HybridUiListViewSpec) {
42
+ self.__implementation = implementation
43
+ self.__cxxPart = .init()
44
+ /* no base class */
45
+ }
46
+
47
+ /**
48
+ * Get the actual `HybridUiListViewSpec` instance this class wraps.
49
+ */
50
+ @inline(__always)
51
+ public func getHybridUiListViewSpec() -> any HybridUiListViewSpec {
52
+ return __implementation
53
+ }
54
+
55
+ /**
56
+ * Casts this instance to a retained unsafe raw pointer.
57
+ * This acquires one additional strong reference on the object!
58
+ */
59
+ public func toUnsafe() -> UnsafeMutableRawPointer {
60
+ return Unmanaged.passRetained(self).toOpaque()
61
+ }
62
+
63
+ /**
64
+ * Casts an unsafe pointer to a `HybridUiListViewSpec_cxx`.
65
+ * The pointer has to be a retained opaque `Unmanaged<HybridUiListViewSpec_cxx>`.
66
+ * This removes one strong reference from the object!
67
+ */
68
+ public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridUiListViewSpec_cxx {
69
+ return Unmanaged<HybridUiListViewSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
70
+ }
71
+
72
+ /**
73
+ * Gets (or creates) the C++ part of this Hybrid Object.
74
+ * The C++ part is a `std::shared_ptr<HybridUiListViewSpec>`.
75
+ */
76
+ public func getCxxPart() -> bridge.std__shared_ptr_HybridUiListViewSpec_ {
77
+ let cachedCxxPart = self.__cxxPart.lock()
78
+ if Bool(fromCxx: cachedCxxPart) {
79
+ return cachedCxxPart
80
+ } else {
81
+ let newCxxPart = bridge.create_std__shared_ptr_HybridUiListViewSpec_(self.toUnsafe())
82
+ __cxxPart = bridge.weakify_std__shared_ptr_HybridUiListViewSpec_(newCxxPart)
83
+ return newCxxPart
84
+ }
85
+ }
86
+
87
+
88
+
89
+ /**
90
+ * Get the memory size of the Swift class (plus size of any other allocations)
91
+ * so the JS VM can properly track it and garbage-collect the JS object if needed.
92
+ */
93
+ @inline(__always)
94
+ public var memorySize: Int {
95
+ return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
96
+ }
97
+
98
+ /**
99
+ * Compares this object with the given [other] object for reference equality.
100
+ */
101
+ @inline(__always)
102
+ public func equals(other: HybridUiListViewSpec_cxx) -> Bool {
103
+ return self.__implementation === other.__implementation
104
+ }
105
+
106
+ /**
107
+ * Call dispose() on the Swift class.
108
+ * This _may_ be called manually from JS.
109
+ */
110
+ @inline(__always)
111
+ public func dispose() {
112
+ self.__implementation.dispose()
113
+ }
114
+
115
+ /**
116
+ * Call toString() on the Swift class.
117
+ */
118
+ @inline(__always)
119
+ public func toString() -> String {
120
+ return self.__implementation.toString()
121
+ }
122
+
123
+ // Properties
124
+
125
+
126
+ // Methods
127
+ @inline(__always)
128
+ public final func setListCallbacks(uiListModule: bridge.std__shared_ptr_HybridUiListModuleSpec_, createView: bridge.Func_double_std__string, updateView: bridge.Func_bool_double_NativeListItem_double) -> bridge.Result_void_ {
129
+ do {
130
+ try self.__implementation.setListCallbacks(uiListModule: { () -> any HybridUiListModuleSpec in
131
+ let __unsafePointer = bridge.get_std__shared_ptr_HybridUiListModuleSpec_(uiListModule)
132
+ let __instance = HybridUiListModuleSpec_cxx.fromUnsafe(__unsafePointer)
133
+ return __instance.getHybridUiListModuleSpec()
134
+ }(), createView: { () -> (String) -> Double in
135
+ let __wrappedFunction = bridge.wrap_Func_double_std__string(createView)
136
+ return { (__type: String) -> Double in
137
+ let __result = __wrappedFunction.call(std.string(__type))
138
+ return __result
139
+ }
140
+ }(), updateView: { () -> (Double, NativeListItem, Double) -> Bool in
141
+ let __wrappedFunction = bridge.wrap_Func_bool_double_NativeListItem_double(updateView)
142
+ return { (__reactTag: Double, __item: NativeListItem, __index: Double) -> Bool in
143
+ let __result = __wrappedFunction.call(__reactTag, __item, __index)
144
+ return __result
145
+ }
146
+ }())
147
+ return bridge.create_Result_void_()
148
+ } catch (let __error) {
149
+ let __exceptionPtr = __error.toCpp()
150
+ return bridge.create_Result_void_(__exceptionPtr)
151
+ }
152
+ }
153
+
154
+ @inline(__always)
155
+ public final func setDataSource(dataSource: bridge.std__shared_ptr_HybridNativeListDataSourceSpec_) -> bridge.Result_void_ {
156
+ do {
157
+ try self.__implementation.setDataSource(dataSource: { () -> any HybridNativeListDataSourceSpec in
158
+ let __unsafePointer = bridge.get_std__shared_ptr_HybridNativeListDataSourceSpec_(dataSource)
159
+ let __instance = HybridNativeListDataSourceSpec_cxx.fromUnsafe(__unsafePointer)
160
+ return __instance.getHybridNativeListDataSourceSpec()
161
+ }())
162
+ return bridge.create_Result_void_()
163
+ } catch (let __error) {
164
+ let __exceptionPtr = __error.toCpp()
165
+ return bridge.create_Result_void_(__exceptionPtr)
166
+ }
167
+ }
168
+
169
+ @inline(__always)
170
+ public final func setLayout(layout: bridge.std__shared_ptr_HybridNativeListLayoutSpec_) -> bridge.Result_void_ {
171
+ do {
172
+ try self.__implementation.setLayout(layout: { () -> any HybridNativeListLayoutSpec in
173
+ let __unsafePointer = bridge.get_std__shared_ptr_HybridNativeListLayoutSpec_(layout)
174
+ let __instance = HybridNativeListLayoutSpec_cxx.fromUnsafe(__unsafePointer)
175
+ return __instance.getHybridNativeListLayoutSpec()
176
+ }())
177
+ return bridge.create_Result_void_()
178
+ } catch (let __error) {
179
+ let __exceptionPtr = __error.toCpp()
180
+ return bridge.create_Result_void_(__exceptionPtr)
181
+ }
182
+ }
183
+
184
+ @inline(__always)
185
+ public final func getSurfaceId() -> bridge.Result_double_ {
186
+ do {
187
+ let __result = try self.__implementation.getSurfaceId()
188
+ let __resultCpp = __result
189
+ return bridge.create_Result_double_(__resultCpp)
190
+ } catch (let __error) {
191
+ let __exceptionPtr = __error.toCpp()
192
+ return bridge.create_Result_double_(__exceptionPtr)
193
+ }
194
+ }
195
+
196
+ @inline(__always)
197
+ public final func disposeRendererSurface() -> bridge.Result_void_ {
198
+ do {
199
+ try self.__implementation.disposeRendererSurface()
200
+ return bridge.create_Result_void_()
201
+ } catch (let __error) {
202
+ let __exceptionPtr = __error.toCpp()
203
+ return bridge.create_Result_void_(__exceptionPtr)
204
+ }
205
+ }
206
+
207
+ public final func getView() -> UnsafeMutableRawPointer {
208
+ return Unmanaged.passRetained(__implementation.view).toOpaque()
209
+ }
210
+
211
+ public final func beforeUpdate() {
212
+ __implementation.beforeUpdate()
213
+ }
214
+
215
+ public final func afterUpdate() {
216
+ __implementation.afterUpdate()
217
+ }
218
+
219
+ public final func maybePrepareForRecycle() {
220
+ guard let recyclable = __implementation as? any RecyclableView else { return }
221
+ recyclable.prepareForRecycle()
222
+ }
223
+
224
+ public final func onDropView() {
225
+ __implementation.onDropView()
226
+ }
227
+ }
@@ -0,0 +1,55 @@
1
+ ///
2
+ /// HybridViewHolderSpec.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /// See ``HybridViewHolderSpec``
11
+ public protocol HybridViewHolderSpec_protocol: HybridObject, HybridView {
12
+ // Properties
13
+
14
+
15
+ // Methods
16
+
17
+ }
18
+
19
+ public extension HybridViewHolderSpec_protocol {
20
+ /// Default implementation of ``HybridObject.toString``
21
+ func toString() -> String {
22
+ return "[HybridObject ViewHolder]"
23
+ }
24
+ }
25
+
26
+ /// See ``HybridViewHolderSpec``
27
+ open class HybridViewHolderSpec_base {
28
+ private weak var cxxWrapper: HybridViewHolderSpec_cxx? = nil
29
+ public init() { }
30
+ public func getCxxWrapper() -> HybridViewHolderSpec_cxx {
31
+ #if DEBUG
32
+ guard self is any HybridViewHolderSpec else {
33
+ fatalError("`self` is not a `HybridViewHolderSpec`! Did you accidentally inherit from `HybridViewHolderSpec_base` instead of `HybridViewHolderSpec`?")
34
+ }
35
+ #endif
36
+ if let cxxWrapper = self.cxxWrapper {
37
+ return cxxWrapper
38
+ } else {
39
+ let cxxWrapper = HybridViewHolderSpec_cxx(self as! any HybridViewHolderSpec)
40
+ self.cxxWrapper = cxxWrapper
41
+ return cxxWrapper
42
+ }
43
+ }
44
+ }
45
+
46
+ /**
47
+ * A Swift base-protocol representing the ViewHolder HybridObject.
48
+ * Implement this protocol to create Swift-based instances of ViewHolder.
49
+ * ```swift
50
+ * class HybridViewHolder : HybridViewHolderSpec {
51
+ * // ...
52
+ * }
53
+ * ```
54
+ */
55
+ public typealias HybridViewHolderSpec = HybridViewHolderSpec_protocol & HybridViewHolderSpec_base
@@ -0,0 +1,147 @@
1
+ ///
2
+ /// HybridViewHolderSpec_cxx.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * A class implementation that bridges HybridViewHolderSpec over to C++.
12
+ * In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
13
+ *
14
+ * Also, some Swift types need to be bridged with special handling:
15
+ * - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
16
+ * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
17
+ * - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
18
+ */
19
+ open class HybridViewHolderSpec_cxx {
20
+ /**
21
+ * The Swift <> C++ bridge's namespace (`margelo::nitro::reactnativelist::bridge::swift`)
22
+ * from `ReactNativeList-Swift-Cxx-Bridge.hpp`.
23
+ * This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
24
+ */
25
+ public typealias bridge = margelo.nitro.reactnativelist.bridge.swift
26
+
27
+ /**
28
+ * Holds an instance of the `HybridViewHolderSpec` Swift protocol.
29
+ */
30
+ private var __implementation: any HybridViewHolderSpec
31
+
32
+ /**
33
+ * Holds a weak pointer to the C++ class that wraps the Swift class.
34
+ */
35
+ private var __cxxPart: bridge.std__weak_ptr_HybridViewHolderSpec_
36
+
37
+ /**
38
+ * Create a new `HybridViewHolderSpec_cxx` that wraps the given `HybridViewHolderSpec`.
39
+ * All properties and methods bridge to C++ types.
40
+ */
41
+ public init(_ implementation: any HybridViewHolderSpec) {
42
+ self.__implementation = implementation
43
+ self.__cxxPart = .init()
44
+ /* no base class */
45
+ }
46
+
47
+ /**
48
+ * Get the actual `HybridViewHolderSpec` instance this class wraps.
49
+ */
50
+ @inline(__always)
51
+ public func getHybridViewHolderSpec() -> any HybridViewHolderSpec {
52
+ return __implementation
53
+ }
54
+
55
+ /**
56
+ * Casts this instance to a retained unsafe raw pointer.
57
+ * This acquires one additional strong reference on the object!
58
+ */
59
+ public func toUnsafe() -> UnsafeMutableRawPointer {
60
+ return Unmanaged.passRetained(self).toOpaque()
61
+ }
62
+
63
+ /**
64
+ * Casts an unsafe pointer to a `HybridViewHolderSpec_cxx`.
65
+ * The pointer has to be a retained opaque `Unmanaged<HybridViewHolderSpec_cxx>`.
66
+ * This removes one strong reference from the object!
67
+ */
68
+ public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridViewHolderSpec_cxx {
69
+ return Unmanaged<HybridViewHolderSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
70
+ }
71
+
72
+ /**
73
+ * Gets (or creates) the C++ part of this Hybrid Object.
74
+ * The C++ part is a `std::shared_ptr<HybridViewHolderSpec>`.
75
+ */
76
+ public func getCxxPart() -> bridge.std__shared_ptr_HybridViewHolderSpec_ {
77
+ let cachedCxxPart = self.__cxxPart.lock()
78
+ if Bool(fromCxx: cachedCxxPart) {
79
+ return cachedCxxPart
80
+ } else {
81
+ let newCxxPart = bridge.create_std__shared_ptr_HybridViewHolderSpec_(self.toUnsafe())
82
+ __cxxPart = bridge.weakify_std__shared_ptr_HybridViewHolderSpec_(newCxxPart)
83
+ return newCxxPart
84
+ }
85
+ }
86
+
87
+
88
+
89
+ /**
90
+ * Get the memory size of the Swift class (plus size of any other allocations)
91
+ * so the JS VM can properly track it and garbage-collect the JS object if needed.
92
+ */
93
+ @inline(__always)
94
+ public var memorySize: Int {
95
+ return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
96
+ }
97
+
98
+ /**
99
+ * Compares this object with the given [other] object for reference equality.
100
+ */
101
+ @inline(__always)
102
+ public func equals(other: HybridViewHolderSpec_cxx) -> Bool {
103
+ return self.__implementation === other.__implementation
104
+ }
105
+
106
+ /**
107
+ * Call dispose() on the Swift class.
108
+ * This _may_ be called manually from JS.
109
+ */
110
+ @inline(__always)
111
+ public func dispose() {
112
+ self.__implementation.dispose()
113
+ }
114
+
115
+ /**
116
+ * Call toString() on the Swift class.
117
+ */
118
+ @inline(__always)
119
+ public func toString() -> String {
120
+ return self.__implementation.toString()
121
+ }
122
+
123
+ // Properties
124
+
125
+
126
+ // Methods
127
+ public final func getView() -> UnsafeMutableRawPointer {
128
+ return Unmanaged.passRetained(__implementation.view).toOpaque()
129
+ }
130
+
131
+ public final func beforeUpdate() {
132
+ __implementation.beforeUpdate()
133
+ }
134
+
135
+ public final func afterUpdate() {
136
+ __implementation.afterUpdate()
137
+ }
138
+
139
+ public final func maybePrepareForRecycle() {
140
+ guard let recyclable = __implementation as? any RecyclableView else { return }
141
+ recyclable.prepareForRecycle()
142
+ }
143
+
144
+ public final func onDropView() {
145
+ __implementation.onDropView()
146
+ }
147
+ }
@@ -0,0 +1,60 @@
1
+ ///
2
+ /// NativeItemSizeEstimate.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `NativeItemSizeEstimate`, backed by a C++ struct.
12
+ */
13
+ public typealias NativeItemSizeEstimate = margelo.nitro.reactnativelist.NativeItemSizeEstimate
14
+
15
+ public extension NativeItemSizeEstimate {
16
+ private typealias bridge = margelo.nitro.reactnativelist.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `NativeItemSizeEstimate`.
20
+ */
21
+ init(width: Double?, height: Double?) {
22
+ self.init({ () -> bridge.std__optional_double_ in
23
+ if let __unwrappedValue = width {
24
+ return bridge.create_std__optional_double_(__unwrappedValue)
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), { () -> bridge.std__optional_double_ in
29
+ if let __unwrappedValue = height {
30
+ return bridge.create_std__optional_double_(__unwrappedValue)
31
+ } else {
32
+ return .init()
33
+ }
34
+ }())
35
+ }
36
+
37
+ @inline(__always)
38
+ var width: Double? {
39
+ return { () -> Double? in
40
+ if bridge.has_value_std__optional_double_(self.__width) {
41
+ let __unwrapped = bridge.get_std__optional_double_(self.__width)
42
+ return __unwrapped
43
+ } else {
44
+ return nil
45
+ }
46
+ }()
47
+ }
48
+
49
+ @inline(__always)
50
+ var height: Double? {
51
+ return { () -> Double? in
52
+ if bridge.has_value_std__optional_double_(self.__height) {
53
+ let __unwrapped = bridge.get_std__optional_double_(self.__height)
54
+ return __unwrapped
55
+ } else {
56
+ return nil
57
+ }
58
+ }()
59
+ }
60
+ }
@@ -0,0 +1,60 @@
1
+ ///
2
+ /// NativeLinearListLayoutConfig.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `NativeLinearListLayoutConfig`, backed by a C++ struct.
12
+ */
13
+ public typealias NativeLinearListLayoutConfig = margelo.nitro.reactnativelist.NativeLinearListLayoutConfig
14
+
15
+ public extension NativeLinearListLayoutConfig {
16
+ private typealias bridge = margelo.nitro.reactnativelist.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `NativeLinearListLayoutConfig`.
20
+ */
21
+ init(topInset: Double, bottomInset: Double, itemSpacing: Double, itemHorizontalInset: Double, itemVerticalInset: Double, iosConfig: NativeLinearListLayoutIOSConfig?) {
22
+ self.init(topInset, bottomInset, itemSpacing, itemHorizontalInset, itemVerticalInset, { () -> bridge.std__optional_NativeLinearListLayoutIOSConfig_ in
23
+ if let __unwrappedValue = iosConfig {
24
+ return bridge.create_std__optional_NativeLinearListLayoutIOSConfig_(__unwrappedValue)
25
+ } else {
26
+ return .init()
27
+ }
28
+ }())
29
+ }
30
+
31
+ @inline(__always)
32
+ var topInset: Double {
33
+ return self.__topInset
34
+ }
35
+
36
+ @inline(__always)
37
+ var bottomInset: Double {
38
+ return self.__bottomInset
39
+ }
40
+
41
+ @inline(__always)
42
+ var itemSpacing: Double {
43
+ return self.__itemSpacing
44
+ }
45
+
46
+ @inline(__always)
47
+ var itemHorizontalInset: Double {
48
+ return self.__itemHorizontalInset
49
+ }
50
+
51
+ @inline(__always)
52
+ var itemVerticalInset: Double {
53
+ return self.__itemVerticalInset
54
+ }
55
+
56
+ @inline(__always)
57
+ var iosConfig: NativeLinearListLayoutIOSConfig? {
58
+ return self.__iosConfig.value
59
+ }
60
+ }
@@ -0,0 +1,35 @@
1
+ ///
2
+ /// NativeLinearListLayoutIOSConfig.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `NativeLinearListLayoutIOSConfig`, backed by a C++ struct.
12
+ */
13
+ public typealias NativeLinearListLayoutIOSConfig = margelo.nitro.reactnativelist.NativeLinearListLayoutIOSConfig
14
+
15
+ public extension NativeLinearListLayoutIOSConfig {
16
+ private typealias bridge = margelo.nitro.reactnativelist.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `NativeLinearListLayoutIOSConfig`.
20
+ */
21
+ init(estimatedItemSize: NativeItemSizeEstimate?) {
22
+ self.init({ () -> bridge.std__optional_NativeItemSizeEstimate_ in
23
+ if let __unwrappedValue = estimatedItemSize {
24
+ return bridge.create_std__optional_NativeItemSizeEstimate_(__unwrappedValue)
25
+ } else {
26
+ return .init()
27
+ }
28
+ }())
29
+ }
30
+
31
+ @inline(__always)
32
+ var estimatedItemSize: NativeItemSizeEstimate? {
33
+ return self.__estimatedItemSize.value
34
+ }
35
+ }
@@ -0,0 +1,75 @@
1
+ ///
2
+ /// NativeListItem.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `NativeListItem`, backed by a C++ struct.
12
+ */
13
+ public typealias NativeListItem = margelo.nitro.reactnativelist.NativeListItem
14
+
15
+ public extension NativeListItem {
16
+ private typealias bridge = margelo.nitro.reactnativelist.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `NativeListItem`.
20
+ */
21
+ init(key: String, type: String, width: Double?, height: Double?, data: AnyMap) {
22
+ self.init(std.string(key), std.string(type), { () -> bridge.std__optional_double_ in
23
+ if let __unwrappedValue = width {
24
+ return bridge.create_std__optional_double_(__unwrappedValue)
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), { () -> bridge.std__optional_double_ in
29
+ if let __unwrappedValue = height {
30
+ return bridge.create_std__optional_double_(__unwrappedValue)
31
+ } else {
32
+ return .init()
33
+ }
34
+ }(), data.cppPart)
35
+ }
36
+
37
+ @inline(__always)
38
+ var key: String {
39
+ return String(self.__key)
40
+ }
41
+
42
+ @inline(__always)
43
+ var type: String {
44
+ return String(self.__type)
45
+ }
46
+
47
+ @inline(__always)
48
+ var width: Double? {
49
+ return { () -> Double? in
50
+ if bridge.has_value_std__optional_double_(self.__width) {
51
+ let __unwrapped = bridge.get_std__optional_double_(self.__width)
52
+ return __unwrapped
53
+ } else {
54
+ return nil
55
+ }
56
+ }()
57
+ }
58
+
59
+ @inline(__always)
60
+ var height: Double? {
61
+ return { () -> Double? in
62
+ if bridge.has_value_std__optional_double_(self.__height) {
63
+ let __unwrapped = bridge.get_std__optional_double_(self.__height)
64
+ return __unwrapped
65
+ } else {
66
+ return nil
67
+ }
68
+ }()
69
+ }
70
+
71
+ @inline(__always)
72
+ var data: AnyMap {
73
+ return AnyMap(withCppPart: self.__data)
74
+ }
75
+ }
@@ -0,0 +1,30 @@
1
+ ///
2
+ /// Variant_NullType__any_HybridIOSWorkletsModuleProxyHolderSpec_.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * An Swift enum with associated values representing a Variant/Union type.
12
+ * JS type: `null | hybrid-object`
13
+ */
14
+ @frozen
15
+ public indirect enum Variant_NullType__any_HybridIOSWorkletsModuleProxyHolderSpec_ {
16
+ case first(NullType)
17
+ case second((any HybridIOSWorkletsModuleProxyHolderSpec))
18
+ }
19
+
20
+ public extension Variant_NullType__any_HybridIOSWorkletsModuleProxyHolderSpec_ {
21
+ func asType<T>(_ type: T.Type = T.self) -> T? {
22
+ switch self {
23
+ case .first(let value): return value as? T
24
+ case .second(let value): return value as? T
25
+ }
26
+ }
27
+ func isType<T>(_ type: T.Type = T.self) -> Bool {
28
+ return self.asType(type) != nil
29
+ }
30
+ }