react-native-nitro-list 0.1.1 → 0.1.3

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 (376) hide show
  1. package/README.md +16 -44
  2. package/ios/HybridNitroList.swift +12 -14
  3. package/lib/commonjs/cell/CellKeyGenerator.js +21 -0
  4. package/lib/commonjs/cell/CellKeyGenerator.js.map +1 -0
  5. package/lib/commonjs/cell/CellRecycler.js +48 -40
  6. package/lib/commonjs/cell/CellRecycler.js.map +1 -1
  7. package/lib/commonjs/cell/createCell.js +21 -0
  8. package/lib/commonjs/cell/createCell.js.map +1 -0
  9. package/lib/commonjs/cell/index.js +20 -0
  10. package/lib/commonjs/cell/index.js.map +1 -0
  11. package/lib/commonjs/getVisibleIndices.js.map +1 -1
  12. package/lib/commonjs/hooks/usePersistentCallback.js +36 -0
  13. package/lib/commonjs/hooks/usePersistentCallback.js.map +1 -0
  14. package/lib/commonjs/index.js +31 -3
  15. package/lib/commonjs/index.js.map +1 -1
  16. package/lib/commonjs/layout/MutableLinearLayout.js +78 -39
  17. package/lib/commonjs/layout/MutableLinearLayout.js.map +1 -1
  18. package/lib/commonjs/layout/constants/layoutDefaults.js +19 -0
  19. package/lib/commonjs/layout/constants/layoutDefaults.js.map +1 -0
  20. package/lib/commonjs/layout/index.js +0 -18
  21. package/lib/commonjs/layout/index.js.map +1 -1
  22. package/lib/commonjs/native/NitroListView.js +20 -0
  23. package/lib/commonjs/native/NitroListView.js.map +1 -0
  24. package/lib/commonjs/recycler/CellPool.js +33 -0
  25. package/lib/commonjs/recycler/CellPool.js.map +1 -0
  26. package/lib/commonjs/recycler/NitroList.js +223 -0
  27. package/lib/commonjs/recycler/NitroList.js.map +1 -0
  28. package/lib/commonjs/scroll/useScrollVelocity.js +20 -0
  29. package/lib/commonjs/scroll/useScrollVelocity.js.map +1 -0
  30. package/lib/commonjs/{native/NitroList.types.js → specs/NitroList.nitro.js} +1 -1
  31. package/lib/commonjs/{layout/LayoutProvider.js.map → specs/NitroList.nitro.js.map} +1 -1
  32. package/lib/commonjs/types/Axis.js +2 -0
  33. package/lib/{module/layout/LayoutProvider.js.map → commonjs/types/Axis.js.map} +1 -1
  34. package/lib/commonjs/types/CellKey.js +2 -0
  35. package/lib/commonjs/{layout/LayoutRectangle.js.map → types/CellKey.js.map} +1 -1
  36. package/lib/commonjs/types/CellType.js +27 -0
  37. package/lib/commonjs/types/CellType.js.map +1 -0
  38. package/lib/commonjs/types/VisibleRange.js +2 -0
  39. package/lib/commonjs/{native/NitroList.types.js.map → types/VisibleRange.js.map} +1 -1
  40. package/lib/commonjs/{RecyclerList.types.js → types/VisibleRangeInput.js} +1 -1
  41. package/lib/commonjs/types/VisibleRangeInput.js.map +1 -0
  42. package/lib/commonjs/types/index.js +13 -0
  43. package/lib/commonjs/types/index.js.map +1 -0
  44. package/lib/commonjs/types/layout/LayoutRect.js +2 -0
  45. package/lib/commonjs/types/layout/LayoutRect.js.map +1 -0
  46. package/lib/commonjs/{specs/nitro-layout-engine.nitro.js → types/layout/LinearLayoutInput.js} +1 -1
  47. package/lib/commonjs/types/layout/LinearLayoutInput.js.map +1 -0
  48. package/lib/commonjs/types/layout/MainAxisPadding.js +26 -0
  49. package/lib/commonjs/types/layout/MainAxisPadding.js.map +1 -0
  50. package/lib/commonjs/types/layout/index.js +2 -0
  51. package/lib/commonjs/types/layout/index.js.map +1 -0
  52. package/lib/commonjs/types/recycler/CellPool.js +42 -0
  53. package/lib/commonjs/types/recycler/CellPool.js.map +1 -0
  54. package/lib/commonjs/{layout/LayoutProvider.js → types/recycler/NitroListProps.js} +1 -1
  55. package/lib/commonjs/types/recycler/NitroListProps.js.map +1 -0
  56. package/lib/commonjs/types/recycler/RecyclerCell.js +6 -0
  57. package/lib/commonjs/types/recycler/RecyclerCell.js.map +1 -0
  58. package/lib/commonjs/types/recycler/RecyclerItemRenderer.js +6 -0
  59. package/lib/commonjs/types/recycler/RecyclerItemRenderer.js.map +1 -0
  60. package/lib/commonjs/types/recycler/index.js +2 -0
  61. package/lib/commonjs/types/recycler/index.js.map +1 -0
  62. package/lib/commonjs/types/scroll/ScrollMetrics.js +6 -0
  63. package/lib/commonjs/types/scroll/ScrollMetrics.js.map +1 -0
  64. package/lib/commonjs/types/scroll/index.js +2 -0
  65. package/lib/commonjs/types/scroll/index.js.map +1 -0
  66. package/lib/commonjs/windowing/computeVisibleItemRange.js +61 -0
  67. package/lib/commonjs/windowing/computeVisibleItemRange.js.map +1 -0
  68. package/lib/commonjs/windowing/index.js +3 -3
  69. package/lib/commonjs/windowing/index.js.map +1 -1
  70. package/lib/module/cell/CellKeyGenerator.js +16 -0
  71. package/lib/module/cell/CellKeyGenerator.js.map +1 -0
  72. package/lib/module/cell/CellRecycler.js +48 -39
  73. package/lib/module/cell/CellRecycler.js.map +1 -1
  74. package/lib/module/cell/createCell.js +17 -0
  75. package/lib/module/cell/createCell.js.map +1 -0
  76. package/lib/module/cell/index.js +7 -0
  77. package/lib/module/cell/index.js.map +1 -0
  78. package/lib/module/getVisibleIndices.js.map +1 -1
  79. package/lib/module/hooks/usePersistentCallback.js +33 -0
  80. package/lib/module/hooks/usePersistentCallback.js.map +1 -0
  81. package/lib/module/index.js +5 -1
  82. package/lib/module/index.js.map +1 -1
  83. package/lib/module/layout/MutableLinearLayout.js +78 -38
  84. package/lib/module/layout/MutableLinearLayout.js.map +1 -1
  85. package/lib/module/layout/constants/layoutDefaults.js +15 -0
  86. package/lib/module/layout/constants/layoutDefaults.js.map +1 -0
  87. package/lib/module/layout/index.js +0 -3
  88. package/lib/module/layout/index.js.map +1 -1
  89. package/lib/module/native/NitroListView.js +17 -0
  90. package/lib/module/native/NitroListView.js.map +1 -0
  91. package/lib/module/recycler/CellPool.js +28 -0
  92. package/lib/module/recycler/CellPool.js.map +1 -0
  93. package/lib/module/recycler/NitroList.js +220 -0
  94. package/lib/module/recycler/NitroList.js.map +1 -0
  95. package/lib/module/scroll/useScrollVelocity.js +16 -0
  96. package/lib/module/scroll/useScrollVelocity.js.map +1 -0
  97. package/lib/module/specs/NitroList.nitro.js +4 -0
  98. package/lib/module/specs/NitroList.nitro.js.map +1 -0
  99. package/lib/module/types/Axis.js +2 -0
  100. package/lib/module/types/Axis.js.map +1 -0
  101. package/lib/module/types/CellKey.js +2 -0
  102. package/lib/module/types/CellKey.js.map +1 -0
  103. package/lib/module/types/CellType.js +22 -0
  104. package/lib/module/types/CellType.js.map +1 -0
  105. package/lib/module/types/VisibleRange.js +2 -0
  106. package/lib/module/types/VisibleRange.js.map +1 -0
  107. package/lib/module/types/VisibleRangeInput.js +4 -0
  108. package/lib/module/types/VisibleRangeInput.js.map +1 -0
  109. package/lib/module/types/index.js +4 -0
  110. package/lib/module/types/index.js.map +1 -0
  111. package/lib/module/types/layout/LayoutRect.js +2 -0
  112. package/lib/module/types/layout/LayoutRect.js.map +1 -0
  113. package/lib/module/types/layout/LinearLayoutInput.js +4 -0
  114. package/lib/module/types/layout/LinearLayoutInput.js.map +1 -0
  115. package/lib/module/types/layout/MainAxisPadding.js +22 -0
  116. package/lib/module/types/layout/MainAxisPadding.js.map +1 -0
  117. package/lib/module/types/layout/index.js +2 -0
  118. package/lib/module/types/layout/index.js.map +1 -0
  119. package/lib/module/types/recycler/CellPool.js +37 -0
  120. package/lib/module/types/recycler/CellPool.js.map +1 -0
  121. package/lib/module/types/recycler/NitroListProps.js +4 -0
  122. package/lib/module/types/recycler/NitroListProps.js.map +1 -0
  123. package/lib/module/types/recycler/RecyclerCell.js +4 -0
  124. package/lib/module/types/recycler/RecyclerCell.js.map +1 -0
  125. package/lib/module/types/recycler/RecyclerItemRenderer.js +4 -0
  126. package/lib/module/types/recycler/RecyclerItemRenderer.js.map +1 -0
  127. package/lib/module/types/recycler/index.js +2 -0
  128. package/lib/module/types/recycler/index.js.map +1 -0
  129. package/lib/module/types/scroll/ScrollMetrics.js +4 -0
  130. package/lib/module/types/scroll/ScrollMetrics.js.map +1 -0
  131. package/lib/module/types/scroll/index.js +2 -0
  132. package/lib/module/types/scroll/index.js.map +1 -0
  133. package/lib/module/windowing/computeVisibleItemRange.js +57 -0
  134. package/lib/module/windowing/computeVisibleItemRange.js.map +1 -0
  135. package/lib/module/windowing/index.js +1 -1
  136. package/lib/module/windowing/index.js.map +1 -1
  137. package/lib/typescript/src/cell/Cell.d.ts +13 -4
  138. package/lib/typescript/src/cell/Cell.d.ts.map +1 -1
  139. package/lib/typescript/src/cell/CellKeyGenerator.d.ts +11 -0
  140. package/lib/typescript/src/cell/CellKeyGenerator.d.ts.map +1 -0
  141. package/lib/typescript/src/cell/CellRecycler.d.ts +19 -11
  142. package/lib/typescript/src/cell/CellRecycler.d.ts.map +1 -1
  143. package/lib/typescript/src/cell/createCell.d.ts +7 -0
  144. package/lib/typescript/src/cell/createCell.d.ts.map +1 -0
  145. package/lib/typescript/src/cell/index.d.ts +4 -0
  146. package/lib/typescript/src/cell/index.d.ts.map +1 -0
  147. package/lib/typescript/src/getVisibleIndices.d.ts +2 -2
  148. package/lib/typescript/src/getVisibleIndices.d.ts.map +1 -1
  149. package/lib/typescript/src/hooks/usePersistentCallback.d.ts +16 -0
  150. package/lib/typescript/src/hooks/usePersistentCallback.d.ts.map +1 -0
  151. package/lib/typescript/src/index.d.ts +3 -2
  152. package/lib/typescript/src/index.d.ts.map +1 -1
  153. package/lib/typescript/src/layout/MutableLinearLayout.d.ts +45 -13
  154. package/lib/typescript/src/layout/MutableLinearLayout.d.ts.map +1 -1
  155. package/lib/typescript/src/layout/constants/layoutDefaults.d.ts +13 -0
  156. package/lib/typescript/src/layout/constants/layoutDefaults.d.ts.map +1 -0
  157. package/lib/typescript/src/layout/index.d.ts +1 -4
  158. package/lib/typescript/src/layout/index.d.ts.map +1 -1
  159. package/lib/typescript/src/native/NitroListView.d.ts +20 -0
  160. package/lib/typescript/src/native/NitroListView.d.ts.map +1 -0
  161. package/lib/typescript/src/recycler/CellPool.d.ts +11 -0
  162. package/lib/typescript/src/recycler/CellPool.d.ts.map +1 -0
  163. package/lib/typescript/src/recycler/NitroList.d.ts +4 -0
  164. package/lib/typescript/src/recycler/NitroList.d.ts.map +1 -0
  165. package/lib/typescript/src/scroll/useScrollVelocity.d.ts +2 -0
  166. package/lib/typescript/src/scroll/useScrollVelocity.d.ts.map +1 -0
  167. package/lib/typescript/src/specs/NitroList.nitro.d.ts +26 -0
  168. package/lib/typescript/src/specs/NitroList.nitro.d.ts.map +1 -0
  169. package/lib/typescript/src/types/Axis.d.ts +11 -0
  170. package/lib/typescript/src/types/Axis.d.ts.map +1 -0
  171. package/lib/typescript/src/types/CellKey.d.ts +2 -0
  172. package/lib/typescript/src/types/CellKey.d.ts.map +1 -0
  173. package/lib/typescript/src/types/CellType.d.ts +22 -0
  174. package/lib/typescript/src/types/CellType.d.ts.map +1 -0
  175. package/lib/typescript/src/types/VisibleRange.d.ts +10 -0
  176. package/lib/typescript/src/types/VisibleRange.d.ts.map +1 -0
  177. package/lib/typescript/src/types/VisibleRangeInput.d.ts +35 -0
  178. package/lib/typescript/src/types/VisibleRangeInput.d.ts.map +1 -0
  179. package/lib/typescript/src/types/index.d.ts +8 -0
  180. package/lib/typescript/src/types/index.d.ts.map +1 -0
  181. package/lib/typescript/src/types/layout/LayoutRect.d.ts +15 -0
  182. package/lib/typescript/src/types/layout/LayoutRect.d.ts.map +1 -0
  183. package/lib/typescript/src/types/layout/LinearLayoutInput.d.ts +10 -0
  184. package/lib/typescript/src/types/layout/LinearLayoutInput.d.ts.map +1 -0
  185. package/lib/typescript/src/types/layout/MainAxisPadding.d.ts +20 -0
  186. package/lib/typescript/src/types/layout/MainAxisPadding.d.ts.map +1 -0
  187. package/lib/typescript/src/types/layout/index.d.ts +4 -0
  188. package/lib/typescript/src/types/layout/index.d.ts.map +1 -0
  189. package/lib/typescript/src/types/recycler/CellPool.d.ts +16 -0
  190. package/lib/typescript/src/types/recycler/CellPool.d.ts.map +1 -0
  191. package/lib/typescript/src/types/recycler/NitroListProps.d.ts +66 -0
  192. package/lib/typescript/src/types/recycler/NitroListProps.d.ts.map +1 -0
  193. package/lib/typescript/src/types/recycler/RecyclerCell.d.ts +12 -0
  194. package/lib/typescript/src/types/recycler/RecyclerCell.d.ts.map +1 -0
  195. package/lib/typescript/src/types/recycler/RecyclerItemRenderer.d.ts +12 -0
  196. package/lib/typescript/src/types/recycler/RecyclerItemRenderer.d.ts.map +1 -0
  197. package/lib/typescript/src/types/recycler/index.d.ts +4 -0
  198. package/lib/typescript/src/types/recycler/index.d.ts.map +1 -0
  199. package/lib/typescript/src/types/scroll/ScrollMetrics.d.ts +15 -0
  200. package/lib/typescript/src/types/scroll/ScrollMetrics.d.ts.map +1 -0
  201. package/lib/typescript/src/types/scroll/index.d.ts +2 -0
  202. package/lib/typescript/src/types/scroll/index.d.ts.map +1 -0
  203. package/lib/typescript/src/windowing/computeVisibleItemRange.d.ts +19 -0
  204. package/lib/typescript/src/windowing/computeVisibleItemRange.d.ts.map +1 -0
  205. package/lib/typescript/src/windowing/index.d.ts +1 -1
  206. package/lib/typescript/src/windowing/index.d.ts.map +1 -1
  207. package/nitro.json +5 -5
  208. package/nitrogen/generated/android/NitroList+autolinking.cmake +2 -2
  209. package/nitrogen/generated/android/NitroListOnLoad.cpp +2 -2
  210. package/nitrogen/generated/android/c++/{JHybridNitroLayoutEngineSpec.cpp → JHybridNitroListSpec.cpp} +15 -15
  211. package/nitrogen/generated/android/c++/{JHybridNitroLayoutEngineSpec.hpp → JHybridNitroListSpec.hpp} +11 -11
  212. package/nitrogen/generated/android/c++/{JLayoutRectangle.hpp → JItemLayout.hpp} +10 -10
  213. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/{HybridNitroLayoutEngineSpec.kt → HybridNitroListSpec.kt} +7 -7
  214. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/{LayoutRectangle.kt → ItemLayout.kt} +5 -5
  215. package/nitrogen/generated/ios/NitroList-Swift-Cxx-Bridge.cpp +9 -9
  216. package/nitrogen/generated/ios/NitroList-Swift-Cxx-Bridge.hpp +27 -27
  217. package/nitrogen/generated/ios/NitroList-Swift-Cxx-Umbrella.hpp +8 -8
  218. package/nitrogen/generated/ios/c++/{HybridNitroLayoutEngineSpecSwift.cpp → HybridNitroListSpecSwift.cpp} +2 -2
  219. package/nitrogen/generated/ios/c++/{HybridNitroLayoutEngineSpecSwift.hpp → HybridNitroListSpecSwift.hpp} +16 -16
  220. package/nitrogen/generated/ios/swift/HybridNitroListSpec.swift +56 -0
  221. package/nitrogen/generated/ios/swift/{HybridNitroLayoutEngineSpec_cxx.swift → HybridNitroListSpec_cxx.swift} +23 -23
  222. package/nitrogen/generated/ios/swift/{LayoutRectangle.swift → ItemLayout.swift} +5 -5
  223. package/nitrogen/generated/shared/c++/{HybridNitroLayoutEngineSpec.cpp → HybridNitroListSpec.cpp} +4 -4
  224. package/nitrogen/generated/shared/c++/{HybridNitroLayoutEngineSpec.hpp → HybridNitroListSpec.hpp} +13 -13
  225. package/nitrogen/generated/shared/c++/{LayoutRectangle.hpp → ItemLayout.hpp} +11 -11
  226. package/package.json +5 -5
  227. package/src/cell/Cell.ts +13 -4
  228. package/src/cell/CellKeyGenerator.ts +17 -0
  229. package/src/cell/CellRecycler.ts +53 -43
  230. package/src/cell/createCell.ts +15 -0
  231. package/src/cell/index.ts +5 -0
  232. package/src/getVisibleIndices.ts +4 -2
  233. package/src/hooks/usePersistentCallback.ts +37 -0
  234. package/src/index.ts +7 -2
  235. package/src/layout/MutableLinearLayout.ts +91 -58
  236. package/src/layout/constants/layoutDefaults.ts +12 -0
  237. package/src/layout/index.ts +1 -4
  238. package/src/native/NitroListView.ts +22 -0
  239. package/src/recycler/CellPool.ts +33 -0
  240. package/src/recycler/NitroList.tsx +317 -0
  241. package/src/scroll/useScrollVelocity.ts +16 -0
  242. package/src/specs/NitroList.nitro.ts +29 -0
  243. package/src/types/Axis.ts +10 -0
  244. package/src/types/CellKey.ts +2 -0
  245. package/src/types/CellType.ts +9 -0
  246. package/src/types/VisibleRange.ts +9 -0
  247. package/src/types/VisibleRangeInput.ts +39 -0
  248. package/src/types/index.ts +15 -0
  249. package/src/types/layout/LayoutRect.ts +14 -0
  250. package/src/types/layout/LinearLayoutInput.ts +12 -0
  251. package/src/types/layout/MainAxisPadding.ts +23 -0
  252. package/src/types/layout/index.ts +3 -0
  253. package/src/types/recycler/CellPool.ts +45 -0
  254. package/src/types/recycler/NitroListProps.ts +74 -0
  255. package/src/types/recycler/RecyclerCell.ts +12 -0
  256. package/src/types/recycler/RecyclerItemRenderer.ts +12 -0
  257. package/src/types/recycler/index.ts +3 -0
  258. package/src/types/scroll/ScrollMetrics.ts +18 -0
  259. package/src/types/scroll/index.ts +1 -0
  260. package/src/windowing/computeVisibleItemRange.ts +82 -0
  261. package/src/windowing/index.ts +1 -1
  262. package/lib/commonjs/NitroList.js +0 -9
  263. package/lib/commonjs/NitroList.js.map +0 -1
  264. package/lib/commonjs/RecyclerList.internal.js +0 -25
  265. package/lib/commonjs/RecyclerList.internal.js.map +0 -1
  266. package/lib/commonjs/RecyclerList.js +0 -171
  267. package/lib/commonjs/RecyclerList.js.map +0 -1
  268. package/lib/commonjs/RecyclerList.types.js.map +0 -1
  269. package/lib/commonjs/cell/StableKey.js +0 -10
  270. package/lib/commonjs/cell/StableKey.js.map +0 -1
  271. package/lib/commonjs/hooks/useCellRenderer.js +0 -62
  272. package/lib/commonjs/hooks/useCellRenderer.js.map +0 -1
  273. package/lib/commonjs/hooks/useStableCallback.js +0 -13
  274. package/lib/commonjs/hooks/useStableCallback.js.map +0 -1
  275. package/lib/commonjs/layout/EstimatedLayoutProvider.js +0 -30
  276. package/lib/commonjs/layout/EstimatedLayoutProvider.js.map +0 -1
  277. package/lib/commonjs/layout/LayoutEngine.js +0 -21
  278. package/lib/commonjs/layout/LayoutEngine.js.map +0 -1
  279. package/lib/commonjs/layout/LayoutRectangle.js +0 -2
  280. package/lib/commonjs/native/NitroLayoutEngine.js +0 -9
  281. package/lib/commonjs/native/NitroLayoutEngine.js.map +0 -1
  282. package/lib/commonjs/native/NitroRecyclerView.js +0 -9
  283. package/lib/commonjs/native/NitroRecyclerView.js.map +0 -1
  284. package/lib/commonjs/specs/nitro-layout-engine.nitro.js.map +0 -1
  285. package/lib/commonjs/viewability/ViewabilityHelper.js +0 -121
  286. package/lib/commonjs/viewability/ViewabilityHelper.js.map +0 -1
  287. package/lib/commonjs/windowing/findVisibleIndexRange.js +0 -48
  288. package/lib/commonjs/windowing/findVisibleIndexRange.js.map +0 -1
  289. package/lib/module/NitroList.js +0 -5
  290. package/lib/module/NitroList.js.map +0 -1
  291. package/lib/module/RecyclerList.internal.js +0 -22
  292. package/lib/module/RecyclerList.internal.js.map +0 -1
  293. package/lib/module/RecyclerList.js +0 -166
  294. package/lib/module/RecyclerList.js.map +0 -1
  295. package/lib/module/RecyclerList.types.js +0 -4
  296. package/lib/module/RecyclerList.types.js.map +0 -1
  297. package/lib/module/cell/StableKey.js +0 -6
  298. package/lib/module/cell/StableKey.js.map +0 -1
  299. package/lib/module/hooks/useCellRenderer.js +0 -58
  300. package/lib/module/hooks/useCellRenderer.js.map +0 -1
  301. package/lib/module/hooks/useStableCallback.js +0 -9
  302. package/lib/module/hooks/useStableCallback.js.map +0 -1
  303. package/lib/module/layout/EstimatedLayoutProvider.js +0 -25
  304. package/lib/module/layout/EstimatedLayoutProvider.js.map +0 -1
  305. package/lib/module/layout/LayoutEngine.js +0 -17
  306. package/lib/module/layout/LayoutEngine.js.map +0 -1
  307. package/lib/module/layout/LayoutProvider.js +0 -4
  308. package/lib/module/layout/LayoutRectangle.js +0 -2
  309. package/lib/module/layout/LayoutRectangle.js.map +0 -1
  310. package/lib/module/native/NitroLayoutEngine.js +0 -5
  311. package/lib/module/native/NitroLayoutEngine.js.map +0 -1
  312. package/lib/module/native/NitroList.types.js +0 -4
  313. package/lib/module/native/NitroList.types.js.map +0 -1
  314. package/lib/module/native/NitroRecyclerView.js +0 -5
  315. package/lib/module/native/NitroRecyclerView.js.map +0 -1
  316. package/lib/module/specs/nitro-layout-engine.nitro.js +0 -4
  317. package/lib/module/specs/nitro-layout-engine.nitro.js.map +0 -1
  318. package/lib/module/viewability/ViewabilityHelper.js +0 -116
  319. package/lib/module/viewability/ViewabilityHelper.js.map +0 -1
  320. package/lib/module/windowing/findVisibleIndexRange.js +0 -44
  321. package/lib/module/windowing/findVisibleIndexRange.js.map +0 -1
  322. package/lib/typescript/src/NitroList.d.ts +0 -5
  323. package/lib/typescript/src/NitroList.d.ts.map +0 -1
  324. package/lib/typescript/src/RecyclerList.d.ts +0 -26
  325. package/lib/typescript/src/RecyclerList.d.ts.map +0 -1
  326. package/lib/typescript/src/RecyclerList.internal.d.ts +0 -9
  327. package/lib/typescript/src/RecyclerList.internal.d.ts.map +0 -1
  328. package/lib/typescript/src/RecyclerList.types.d.ts +0 -18
  329. package/lib/typescript/src/RecyclerList.types.d.ts.map +0 -1
  330. package/lib/typescript/src/__tests__/windowing/findVisibleIndexRange.test.d.ts +0 -2
  331. package/lib/typescript/src/__tests__/windowing/findVisibleIndexRange.test.d.ts.map +0 -1
  332. package/lib/typescript/src/cell/StableKey.d.ts +0 -2
  333. package/lib/typescript/src/cell/StableKey.d.ts.map +0 -1
  334. package/lib/typescript/src/hooks/useCellRenderer.d.ts +0 -19
  335. package/lib/typescript/src/hooks/useCellRenderer.d.ts.map +0 -1
  336. package/lib/typescript/src/hooks/useStableCallback.d.ts +0 -2
  337. package/lib/typescript/src/hooks/useStableCallback.d.ts.map +0 -1
  338. package/lib/typescript/src/layout/EstimatedLayoutProvider.d.ts +0 -15
  339. package/lib/typescript/src/layout/EstimatedLayoutProvider.d.ts.map +0 -1
  340. package/lib/typescript/src/layout/LayoutEngine.d.ts +0 -10
  341. package/lib/typescript/src/layout/LayoutEngine.d.ts.map +0 -1
  342. package/lib/typescript/src/layout/LayoutProvider.d.ts +0 -16
  343. package/lib/typescript/src/layout/LayoutProvider.d.ts.map +0 -1
  344. package/lib/typescript/src/layout/LayoutRectangle.d.ts +0 -11
  345. package/lib/typescript/src/layout/LayoutRectangle.d.ts.map +0 -1
  346. package/lib/typescript/src/native/NitroLayoutEngine.d.ts +0 -3
  347. package/lib/typescript/src/native/NitroLayoutEngine.d.ts.map +0 -1
  348. package/lib/typescript/src/native/NitroList.types.d.ts +0 -9
  349. package/lib/typescript/src/native/NitroList.types.d.ts.map +0 -1
  350. package/lib/typescript/src/native/NitroRecyclerView.d.ts +0 -5
  351. package/lib/typescript/src/native/NitroRecyclerView.d.ts.map +0 -1
  352. package/lib/typescript/src/specs/nitro-layout-engine.nitro.d.ts +0 -14
  353. package/lib/typescript/src/specs/nitro-layout-engine.nitro.d.ts.map +0 -1
  354. package/lib/typescript/src/viewability/ViewabilityHelper.d.ts +0 -50
  355. package/lib/typescript/src/viewability/ViewabilityHelper.d.ts.map +0 -1
  356. package/lib/typescript/src/windowing/findVisibleIndexRange.d.ts +0 -11
  357. package/lib/typescript/src/windowing/findVisibleIndexRange.d.ts.map +0 -1
  358. package/nitrogen/generated/ios/swift/HybridNitroLayoutEngineSpec.swift +0 -56
  359. package/src/NitroList.ts +0 -8
  360. package/src/RecyclerList.internal.ts +0 -38
  361. package/src/RecyclerList.tsx +0 -252
  362. package/src/RecyclerList.types.ts +0 -24
  363. package/src/__tests__/windowing/findVisibleIndexRange.test.ts +0 -55
  364. package/src/cell/StableKey.ts +0 -6
  365. package/src/hooks/useCellRenderer.ts +0 -86
  366. package/src/hooks/useStableCallback.ts +0 -13
  367. package/src/layout/EstimatedLayoutProvider.ts +0 -35
  368. package/src/layout/LayoutEngine.ts +0 -21
  369. package/src/layout/LayoutProvider.ts +0 -17
  370. package/src/layout/LayoutRectangle.ts +0 -10
  371. package/src/native/NitroLayoutEngine.ts +0 -7
  372. package/src/native/NitroList.types.ts +0 -12
  373. package/src/native/NitroRecyclerView.ts +0 -8
  374. package/src/specs/nitro-layout-engine.nitro.ts +0 -17
  375. package/src/viewability/ViewabilityHelper.ts +0 -130
  376. package/src/windowing/findVisibleIndexRange.ts +0 -60
package/README.md CHANGED
@@ -150,51 +150,23 @@ npm install react-native-nitro-list
150
150
 
151
151
  ```tsx
152
152
  import { RecyclerList } from 'react-native-nitro-list'
153
+ import { NitroList } from 'react-native-nitro-list'
154
+
155
+ export default function App() {
156
+ const data = useMemo(() => generateData(10000), []);
157
+ const heights = useMemo(() => data.map(() => 80), [data]);
158
+
159
+ return (
160
+ <NitroList
161
+ data={data}
162
+ containerCrossAxisSize={width}
163
+ itemMainAxisSizes={heights}
164
+ getCellType={() => 'row'}
165
+ renderItem={({ item }) => <YourComponent data={item} />}
166
+ />
167
+ );
168
+ }
153
169
 
154
- <RecyclerList
155
- containerWidth={width}
156
- itemCount={10000}
157
- estimatedItemHeight={80}
158
- renderItem={(index) => <Row index={index} />}
159
- />
160
- ```
161
-
162
- ### Fixed Heights
163
-
164
- ```tsx
165
- <RecyclerList
166
- containerWidth={width}
167
- itemHeights={heights}
168
- renderItem={renderItem}
169
- />
170
- ```
171
-
172
- ---
173
-
174
- ## 👀 Viewability
175
-
176
- ```tsx
177
- <RecyclerList
178
- onViewableItemsChanged={({ viewableItems, changed }) => {
179
- console.log(viewableItems, changed)
180
- }}
181
- />
182
- ```
183
-
184
- - Percentage-based visibility
185
- - Deterministic enter / exit events
186
- - Zero layout mutation
187
-
188
- ---
189
-
190
- ## ⚡ Prefetching
191
-
192
- ```tsx
193
- <RecyclerList
194
- onPrefetch={(indices) => {
195
- preloadData(indices)
196
- }}
197
- />
198
170
  ```
199
171
 
200
172
  - Runs ahead of the visible window
@@ -7,32 +7,30 @@ import NitroModules
7
7
  */
8
8
  final class HybridNitroList: HybridNitroListSpec {
9
9
 
10
- /**
11
- * Computes absolute layout rectangles for all items.
12
- * Called synchronously via JSI.
13
- */
14
10
  func computeLayout(
15
11
  containerWidth: Double,
16
12
  itemHeights: [Double]
17
- ) -> [LayoutRectangle] {
13
+ ) -> [ItemLayout] { // Changed from LayoutRect to ItemLayout
18
14
 
19
- var layouts: [LayoutRectangle] = []
15
+ var layouts: [ItemLayout] = [] // Changed from LayoutRect to ItemLayout
20
16
  layouts.reserveCapacity(itemHeights.count)
21
17
 
22
18
  var currentY: Double = 0
23
19
 
24
20
  for height in itemHeights {
25
- let rect = LayoutRectangle(
26
- x: 0,
27
- y: currentY,
28
- width: containerWidth,
29
- height: height
21
+ layouts.append(
22
+ ItemLayout( // This now matches the generated struct name
23
+ x: 0,
24
+ y: currentY,
25
+ width: containerWidth,
26
+ height: height
27
+ )
30
28
  )
31
-
32
- layouts.append(rect)
33
29
  currentY += height
34
30
  }
35
31
 
36
32
  return layouts
37
33
  }
38
- }
34
+
35
+ // Don't forget to update getVisibleRange to use ItemLayout if it references it!
36
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CellKeyGenerator = void 0;
7
+ /**
8
+ * Monotonic key generator for physical cell instances.
9
+ * Guarantees stable keys across the lifetime of the list.
10
+ */
11
+ class CellKeyGenerator {
12
+ nextId = 0;
13
+ next() {
14
+ return this.nextId++;
15
+ }
16
+ reset() {
17
+ this.nextId = 0;
18
+ }
19
+ }
20
+ exports.CellKeyGenerator = CellKeyGenerator;
21
+ //# sourceMappingURL=CellKeyGenerator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CellKeyGenerator","nextId","next","reset","exports"],"sourceRoot":"../../../src","sources":["cell/CellKeyGenerator.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACO,MAAMA,gBAAgB,CAAC;EACpBC,MAAM,GAAG,CAAC;EAElBC,IAAIA,CAAA,EAAY;IACd,OAAO,IAAI,CAACD,MAAM,EAAE;EACtB;EAEAE,KAAKA,CAAA,EAAS;IACZ,IAAI,CAACF,MAAM,GAAG,CAAC;EACjB;AACF;AAACG,OAAA,CAAAJ,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -4,58 +4,66 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.CellRecycler = void 0;
7
- const MAX_CELLS = 40;
8
-
7
+ var _createCell = require("./createCell");
9
8
  /**
10
- * Owns physical cell reuse.
11
- * Stateful, imperative, React-agnostic.
12
- *
13
- * FlashList equivalent: CellRecycler
9
+ * Manages physical cell reuse.
10
+ * Imperative and stateful by design.
11
+ * This is NOT React code.
14
12
  */
15
13
  class CellRecycler {
16
- activeCells = new Map();
17
- reusableCellsByType = new Map();
18
- orderedCells = [];
19
- nextCellId = 0;
14
+ /**
15
+ * Active cells mapped by logical index.
16
+ */
17
+ indexToCell = new Map();
20
18
 
21
19
  /**
22
- * Reconcile visible indices against existing cells.
23
- * Returns a stable ordered snapshot.
20
+ * Pool of detached reusable cells.
24
21
  */
25
- reconcile(visibleIndices, getCellType) {
26
- const visibleSet = new Set(visibleIndices);
22
+ recycledCells = [];
27
23
 
28
- // 1️⃣ Release cells no longer visible
29
- for (const [index, cell] of this.activeCells) {
30
- if (visibleSet.has(index)) continue;
31
- this.activeCells.delete(index);
32
- const orderedIndex = this.orderedCells.indexOf(cell);
33
- if (orderedIndex !== -1) {
34
- this.orderedCells.splice(orderedIndex, 1);
24
+ /**
25
+ * Reconcile a contiguous visible index range
26
+ * into a stable list of physical cells.
27
+ *
28
+ * HOT PATH:
29
+ * - No index arrays
30
+ * - Minimal allocations
31
+ * - Deterministic
32
+ */
33
+ reconcileRange(startIndex, endIndex, resolveCellType) {
34
+ const nextActive = [];
35
+
36
+ // Track which current indices are no longer visible
37
+ const unusedIndices = new Set(this.indexToCell.keys());
38
+ for (let index = startIndex; index <= endIndex; index++) {
39
+ unusedIndices.delete(index);
40
+ let cell = this.indexToCell.get(index);
41
+ if (cell) {
42
+ // Existing assignment — reuse
43
+ nextActive.push(cell);
44
+ continue;
35
45
  }
36
- const pool = this.reusableCellsByType.get(cell.type) ?? [];
37
- if (pool.length < MAX_CELLS) pool.push(cell);
38
- this.reusableCellsByType.set(cell.type, pool);
39
- }
46
+ const type = resolveCellType(index);
40
47
 
41
- // 2️⃣ Acquire cells for newly visible indices
42
- for (const index of visibleIndices) {
43
- if (this.activeCells.has(index)) continue;
44
- const type = getCellType(index);
45
- const pool = this.reusableCellsByType.get(type);
46
- let cell = pool?.pop();
47
- if (!cell) {
48
- cell = {
49
- key: `cell-${this.nextCellId++}`,
50
- type,
51
- index
52
- };
48
+ // Try to reuse a recycled cell of same type
49
+ const recycledIdx = this.recycledCells.findIndex(c => c.type === type);
50
+ if (recycledIdx !== -1) {
51
+ cell = this.recycledCells.splice(recycledIdx, 1)[0];
52
+ } else {
53
+ cell = (0, _createCell.createCell)(type);
53
54
  }
54
55
  cell.index = index;
55
- this.activeCells.set(index, cell);
56
- this.orderedCells.push(cell);
56
+ this.indexToCell.set(index, cell);
57
+ nextActive.push(cell);
58
+ }
59
+
60
+ // Recycle cells that left the visible window
61
+ for (const index of unusedIndices) {
62
+ const cell = this.indexToCell.get(index);
63
+ this.indexToCell.delete(index);
64
+ this.recycledCells.push(cell);
57
65
  }
58
- return this.orderedCells;
66
+ return nextActive;
59
67
  }
60
68
  }
61
69
  exports.CellRecycler = CellRecycler;
@@ -1 +1 @@
1
- {"version":3,"names":["MAX_CELLS","CellRecycler","activeCells","Map","reusableCellsByType","orderedCells","nextCellId","reconcile","visibleIndices","getCellType","visibleSet","Set","index","cell","has","delete","orderedIndex","indexOf","splice","pool","get","type","length","push","set","pop","key","exports"],"sourceRoot":"../../../src","sources":["cell/CellRecycler.ts"],"mappings":";;;;;;AAEA,MAAMA,SAAS,GAAG,EAAE;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,CAAC;EACPC,WAAW,GAAG,IAAIC,GAAG,CAAe,CAAC;EACrCC,mBAAmB,GAAG,IAAID,GAAG,CAAiB,CAAC;EAC/CE,YAAY,GAAW,EAAE;EAClCC,UAAU,GAAG,CAAC;;EAEtB;AACF;AACA;AACA;EACEC,SAASA,CACPC,cAAiC,EACjCC,WAAsC,EACrB;IACjB,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAACH,cAAc,CAAC;;IAE1C;IACA,KAAK,MAAM,CAACI,KAAK,EAAEC,IAAI,CAAC,IAAI,IAAI,CAACX,WAAW,EAAE;MAC5C,IAAIQ,UAAU,CAACI,GAAG,CAACF,KAAK,CAAC,EAAE;MAE3B,IAAI,CAACV,WAAW,CAACa,MAAM,CAACH,KAAK,CAAC;MAE9B,MAAMI,YAAY,GAAG,IAAI,CAACX,YAAY,CAACY,OAAO,CAACJ,IAAI,CAAC;MACpD,IAAIG,YAAY,KAAK,CAAC,CAAC,EAAE;QACvB,IAAI,CAACX,YAAY,CAACa,MAAM,CAACF,YAAY,EAAE,CAAC,CAAC;MAC3C;MAEA,MAAMG,IAAI,GAAG,IAAI,CAACf,mBAAmB,CAACgB,GAAG,CAACP,IAAI,CAACQ,IAAI,CAAC,IAAI,EAAE;MAC1D,IAAIF,IAAI,CAACG,MAAM,GAAGtB,SAAS,EAAEmB,IAAI,CAACI,IAAI,CAACV,IAAI,CAAC;MAC5C,IAAI,CAACT,mBAAmB,CAACoB,GAAG,CAACX,IAAI,CAACQ,IAAI,EAAEF,IAAI,CAAC;IAC/C;;IAEA;IACA,KAAK,MAAMP,KAAK,IAAIJ,cAAc,EAAE;MAClC,IAAI,IAAI,CAACN,WAAW,CAACY,GAAG,CAACF,KAAK,CAAC,EAAE;MAEjC,MAAMS,IAAI,GAAGZ,WAAW,CAACG,KAAK,CAAC;MAC/B,MAAMO,IAAI,GAAG,IAAI,CAACf,mBAAmB,CAACgB,GAAG,CAACC,IAAI,CAAC;MAC/C,IAAIR,IAAI,GAAGM,IAAI,EAAEM,GAAG,CAAC,CAAC;MAEtB,IAAI,CAACZ,IAAI,EAAE;QACTA,IAAI,GAAG;UACLa,GAAG,EAAE,QAAQ,IAAI,CAACpB,UAAU,EAAE,EAAE;UAChCe,IAAI;UACJT;QACF,CAAC;MACH;MAEAC,IAAI,CAACD,KAAK,GAAGA,KAAK;MAClB,IAAI,CAACV,WAAW,CAACsB,GAAG,CAACZ,KAAK,EAAEC,IAAI,CAAC;MACjC,IAAI,CAACR,YAAY,CAACkB,IAAI,CAACV,IAAI,CAAC;IAC9B;IAEA,OAAO,IAAI,CAACR,YAAY;EAC1B;AACF;AAACsB,OAAA,CAAA1B,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["_createCell","require","CellRecycler","indexToCell","Map","recycledCells","reconcileRange","startIndex","endIndex","resolveCellType","nextActive","unusedIndices","Set","keys","index","delete","cell","get","push","type","recycledIdx","findIndex","c","splice","createCell","set","exports"],"sourceRoot":"../../../src","sources":["cell/CellRecycler.ts"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,CAAC;EACxB;AACF;AACA;EACmBC,WAAW,GAAG,IAAIC,GAAG,CAAe,CAAC;;EAEtD;AACF;AACA;EACmBC,aAAa,GAAW,EAAE;;EAE3C;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,cAAcA,CACZC,UAAkB,EAClBC,QAAgB,EAChBC,eAA0C,EACzB;IACjB,MAAMC,UAAkB,GAAG,EAAE;;IAE7B;IACA,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAAC,IAAI,CAACT,WAAW,CAACU,IAAI,CAAC,CAAC,CAAC;IAEtD,KAAK,IAAIC,KAAK,GAAGP,UAAU,EAAEO,KAAK,IAAIN,QAAQ,EAAEM,KAAK,EAAE,EAAE;MACvDH,aAAa,CAACI,MAAM,CAACD,KAAK,CAAC;MAE3B,IAAIE,IAAI,GAAG,IAAI,CAACb,WAAW,CAACc,GAAG,CAACH,KAAK,CAAC;MACtC,IAAIE,IAAI,EAAE;QACR;QACAN,UAAU,CAACQ,IAAI,CAACF,IAAI,CAAC;QACrB;MACF;MAEA,MAAMG,IAAI,GAAGV,eAAe,CAACK,KAAK,CAAC;;MAEnC;MACA,MAAMM,WAAW,GAAG,IAAI,CAACf,aAAa,CAACgB,SAAS,CAC9CC,CAAC,IAAIA,CAAC,CAACH,IAAI,KAAKA,IAClB,CAAC;MAED,IAAIC,WAAW,KAAK,CAAC,CAAC,EAAE;QACtBJ,IAAI,GAAG,IAAI,CAACX,aAAa,CAACkB,MAAM,CAACH,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAE;MACtD,CAAC,MAAM;QACLJ,IAAI,GAAG,IAAAQ,sBAAU,EAACL,IAAI,CAAC;MACzB;MAEAH,IAAI,CAACF,KAAK,GAAGA,KAAK;MAClB,IAAI,CAACX,WAAW,CAACsB,GAAG,CAACX,KAAK,EAAEE,IAAI,CAAC;MACjCN,UAAU,CAACQ,IAAI,CAACF,IAAI,CAAC;IACvB;;IAEA;IACA,KAAK,MAAMF,KAAK,IAAIH,aAAa,EAAE;MACjC,MAAMK,IAAI,GAAG,IAAI,CAACb,WAAW,CAACc,GAAG,CAACH,KAAK,CAAE;MACzC,IAAI,CAACX,WAAW,CAACY,MAAM,CAACD,KAAK,CAAC;MAC9B,IAAI,CAACT,aAAa,CAACa,IAAI,CAACF,IAAI,CAAC;IAC/B;IAEA,OAAON,UAAU;EACnB;AACF;AAACgB,OAAA,CAAAxB,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createCell = createCell;
7
+ let nextCellId = 0;
8
+
9
+ /**
10
+ * Creates a new physical cell with a stable identity.
11
+ * The key is generated ONCE and never changes.
12
+ */
13
+ function createCell(type) {
14
+ return {
15
+ key: `cell-${nextCellId++}`,
16
+ // stable physical identity
17
+ type,
18
+ index: -1 // assigned by recycler
19
+ };
20
+ }
21
+ //# sourceMappingURL=createCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["nextCellId","createCell","type","key","index"],"sourceRoot":"../../../src","sources":["cell/createCell.ts"],"mappings":";;;;;;AAEA,IAAIA,UAAU,GAAG,CAAC;;AAElB;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAACC,IAAY,EAAQ;EAC7C,OAAO;IACLC,GAAG,EAAE,QAAQH,UAAU,EAAE,EAAE;IAAE;IAC7BE,IAAI;IACJE,KAAK,EAAE,CAAC,CAAC,CAAmB;EAC9B,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "CellRecycler", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _CellRecycler.CellRecycler;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "createCell", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _createCell.createCell;
16
+ }
17
+ });
18
+ var _CellRecycler = require("./CellRecycler");
19
+ var _createCell = require("./createCell");
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_CellRecycler","require","_createCell"],"sourceRoot":"../../../src","sources":["cell/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAGA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getVisibleRange","layouts","metrics","bufferPx","length","height","startY","Math","max","offsetY","endY","low","high","first","mid","rect","y","visible","i","push"],"sourceRoot":"../../src","sources":["getVisibleIndices.ts"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;AACO,SAASA,eAAeA,CAC7BC,OAAmC,EACnCC,OAAsB,EACtBC,QAAgB,EACG;EACnB,IACEF,OAAO,CAACG,MAAM,KAAK,CAAC,IACpBF,OAAO,CAACG,MAAM,IAAI,CAAC,EACnB;IACA,OAAO,EAAE;EACX;EAEA,MAAMC,MAAM,GAAGC,IAAI,CAACC,GAAG,CACrB,CAAC,EACDN,OAAO,CAACO,OAAO,GAAGN,QACpB,CAAC;EAED,MAAMO,IAAI,GACRR,OAAO,CAACO,OAAO,GAAGP,OAAO,CAACG,MAAM,GAAGF,QAAQ;EAE7C,IAAIQ,GAAG,GAAG,CAAC;EACX,IAAIC,IAAI,GAAGX,OAAO,CAACG,MAAM,GAAG,CAAC;EAC7B,IAAIS,KAAK,GAAGZ,OAAO,CAACG,MAAM;EAE1B,OAAOO,GAAG,IAAIC,IAAI,EAAE;IAClB,MAAME,GAAG,GAAIH,GAAG,GAAGC,IAAI,IAAK,CAAC;IAC7B,MAAMG,IAAI,GAAGd,OAAO,CAACa,GAAG,CAAE;IAE1B,IAAIC,IAAI,CAACC,CAAC,GAAGD,IAAI,CAACV,MAAM,IAAIC,MAAM,EAAE;MAClCO,KAAK,GAAGC,GAAG;MACXF,IAAI,GAAGE,GAAG,GAAG,CAAC;IAChB,CAAC,MAAM;MACLH,GAAG,GAAGG,GAAG,GAAG,CAAC;IACf;EACF;EAEA,MAAMG,OAAiB,GAAG,EAAE;EAE5B,KAAK,IAAIC,CAAC,GAAGL,KAAK,EAAEK,CAAC,GAAGjB,OAAO,CAACG,MAAM,EAAEc,CAAC,EAAE,EAAE;IAC3C,MAAMH,IAAI,GAAGd,OAAO,CAACiB,CAAC,CAAE;IACxB,IAAIH,IAAI,CAACC,CAAC,GAAGN,IAAI,EAAE;IACnBO,OAAO,CAACE,IAAI,CAACD,CAAC,CAAC;EACjB;EAEA,OAAOD,OAAO;AAChB","ignoreList":[]}
1
+ {"version":3,"names":["getVisibleRange","layouts","metrics","bufferPx","length","height","startY","Math","max","offsetY","endY","low","high","first","mid","rect","y","visible","i","push"],"sourceRoot":"../../src","sources":["getVisibleIndices.ts"],"mappings":";;;;;;AAKA;AACA;AACA;AACA;AACO,SAASA,eAAeA,CAC7BC,OAA8B,EAC9BC,OAAsB,EACtBC,QAAgB,EACG;EACnB,IACEF,OAAO,CAACG,MAAM,KAAK,CAAC,IACpBF,OAAO,CAACG,MAAM,IAAI,CAAC,EACnB;IACA,OAAO,EAAE;EACX;EAEA,MAAMC,MAAM,GAAGC,IAAI,CAACC,GAAG,CACrB,CAAC,EACDN,OAAO,CAACO,OAAO,GAAGN,QACpB,CAAC;EAED,MAAMO,IAAI,GACRR,OAAO,CAACO,OAAO,GAAGP,OAAO,CAACG,MAAM,GAAGF,QAAQ;EAE7C,IAAIQ,GAAG,GAAG,CAAC;EACX,IAAIC,IAAI,GAAGX,OAAO,CAACG,MAAM,GAAG,CAAC;EAC7B,IAAIS,KAAK,GAAGZ,OAAO,CAACG,MAAM;EAE1B,OAAOO,GAAG,IAAIC,IAAI,EAAE;IAClB,MAAME,GAAG,GAAIH,GAAG,GAAGC,IAAI,IAAK,CAAC;IAC7B,MAAMG,IAAI,GAAGd,OAAO,CAACa,GAAG,CAAE;IAE1B,IAAIC,IAAI,CAACC,CAAC,GAAGD,IAAI,CAACV,MAAM,IAAIC,MAAM,EAAE;MAClCO,KAAK,GAAGC,GAAG;MACXF,IAAI,GAAGE,GAAG,GAAG,CAAC;IAChB,CAAC,MAAM;MACLH,GAAG,GAAGG,GAAG,GAAG,CAAC;IACf;EACF;EAEA,MAAMG,OAAiB,GAAG,EAAE;EAE5B,KAAK,IAAIC,CAAC,GAAGL,KAAK,EAAEK,CAAC,GAAGjB,OAAO,CAACG,MAAM,EAAEc,CAAC,EAAE,EAAE;IAC3C,MAAMH,IAAI,GAAGd,OAAO,CAACiB,CAAC,CAAE;IACxB,IAAIH,IAAI,CAACC,CAAC,GAAGN,IAAI,EAAE;IACnBO,OAAO,CAACE,IAAI,CAACD,CAAC,CAAC;EACjB;EAEA,OAAOD,OAAO;AAChB","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.usePersistentCallback = usePersistentCallback;
7
+ var _react = require("react");
8
+ /**
9
+ * Returns a function whose identity is stable across renders,
10
+ * but always invokes the latest provided implementation.
11
+ *
12
+ * Invariants:
13
+ * - Function reference NEVER changes
14
+ * - Logic is ALWAYS up to date
15
+ *
16
+ * This is critical for long-lived systems such as:
17
+ * - Recyclers
18
+ * - Effects
19
+ * - Native bridges
20
+ * - Event pipelines
21
+ */
22
+ function usePersistentCallback(fn) {
23
+ /**
24
+ * Holds the latest implementation.
25
+ * Updating this does NOT trigger re-renders.
26
+ */
27
+ const fnRef = (0, _react.useRef)(fn);
28
+ fnRef.current = fn;
29
+
30
+ /**
31
+ * Stable wrapper that forwards calls
32
+ * to the latest implementation.
33
+ */
34
+ return (0, _react.useCallback)((...args) => fnRef.current(...args), []);
35
+ }
36
+ //# sourceMappingURL=usePersistentCallback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","usePersistentCallback","fn","fnRef","useRef","current","useCallback","args"],"sourceRoot":"../../../src","sources":["hooks/usePersistentCallback.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,qBAAqBA,CAEnCC,EAAK,EAAK;EAEV;AACF;AACA;AACA;EACE,MAAMC,KAAK,GAAG,IAAAC,aAAM,EAACF,EAAE,CAAC;EACxBC,KAAK,CAACE,OAAO,GAAGH,EAAE;;EAElB;AACF;AACA;AACA;EACE,OAAO,IAAAI,kBAAW,EACf,CAAC,GAAGC,IAAa,KAChBJ,KAAK,CAACE,OAAO,CAAC,GAAGE,IAAI,CAAC,EACxB,EACF,CAAC;AACH","ignoreList":[]}
@@ -3,11 +3,39 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "RecyclerList", {
6
+ var _exportNames = {
7
+ NitroList: true
8
+ };
9
+ Object.defineProperty(exports, "NitroList", {
7
10
  enumerable: true,
8
11
  get: function () {
9
- return _RecyclerList.RecyclerList;
12
+ return _NitroList2.default;
10
13
  }
11
14
  });
12
- var _RecyclerList = require("./RecyclerList");
15
+ var _NitroListView = require("./native/NitroListView");
16
+ Object.keys(_NitroListView).forEach(function (key) {
17
+ if (key === "default" || key === "__esModule") return;
18
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
19
+ if (key in exports && exports[key] === _NitroListView[key]) return;
20
+ Object.defineProperty(exports, key, {
21
+ enumerable: true,
22
+ get: function () {
23
+ return _NitroListView[key];
24
+ }
25
+ });
26
+ });
27
+ var _NitroList = require("./specs/NitroList.nitro");
28
+ Object.keys(_NitroList).forEach(function (key) {
29
+ if (key === "default" || key === "__esModule") return;
30
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
31
+ if (key in exports && exports[key] === _NitroList[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _NitroList[key];
36
+ }
37
+ });
38
+ });
39
+ var _NitroList2 = _interopRequireDefault(require("./recycler/NitroList"));
40
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_RecyclerList","require"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_NitroListView","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_NitroList","_NitroList2","_interopRequireDefault","e","__esModule","default"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,cAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,cAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,cAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAS,UAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,UAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,UAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,UAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAU,WAAA,GAAAC,sBAAA,CAAAf,OAAA;AAA4D,SAAAe,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -4,61 +4,100 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.MutableLinearLayout = void 0;
7
+ var _layoutDefaults = require("./constants/layoutDefaults");
7
8
  /**
8
- * INTERNAL mutable layout record.
9
- * This is intentionally mutable and never exposed publicly.
10
- */
11
-
12
- /**
13
- * Mutable linear layout store.
14
- * FlashList-style incremental relayout.
9
+ * Mutable, deterministic linear layout engine.
10
+ *
11
+ * Responsibilities:
12
+ * - Compute absolute item geometry
13
+ * - Own layout truth (no React, no scroll state)
14
+ * - Guarantee monotonic ordering along the main axis
15
+ *
16
+ * Cross-platform equivalents:
17
+ * - Flutter: RenderSliver / SliverList
18
+ * - Android: LinearLayoutManager
19
+ * - iOS: UICollectionViewFlowLayout (linear)
15
20
  */
16
21
  class MutableLinearLayout {
17
- constructor(initialHeights, width) {
18
- this.layouts = [];
19
- let y = 0;
20
- for (const height of initialHeights) {
21
- this.layouts.push({
22
+ /** Absolute item layouts in index order */
23
+ layouts = [];
24
+
25
+ /** Total scrollable size along main axis */
26
+ contentSize = 0;
27
+ constructor(axis) {
28
+ this.isVertical = axis === 'vertical';
29
+ }
30
+
31
+ /**
32
+ * Computes layout synchronously from input.
33
+ *
34
+ * This method is intentionally parameter-object based
35
+ * to allow future extension without breaking API.
36
+ *
37
+ * Invariants:
38
+ * - Layouts are monotonic along main axis
39
+ * - No gaps except explicit spacing
40
+ * - Deterministic for identical inputs
41
+ */
42
+ compute(input) {
43
+ const {
44
+ crossAxisSize,
45
+ itemMainAxisSizes,
46
+ padding,
47
+ itemSpacing = _layoutDefaults.DEFAULT_ITEM_SPACING
48
+ } = input;
49
+ const itemCount = itemMainAxisSizes.length;
50
+ const layouts = new Array(itemCount);
51
+ let cursor = padding.start;
52
+ for (let i = 0; i < itemCount; i++) {
53
+ const mainAxisSize = itemMainAxisSizes[i];
54
+ layouts[i] = this.isVertical ? {
22
55
  x: 0,
23
- y,
24
- width,
25
- height
26
- });
27
- y += height;
56
+ y: cursor,
57
+ width: crossAxisSize,
58
+ height: mainAxisSize
59
+ } : {
60
+ x: cursor,
61
+ y: 0,
62
+ width: mainAxisSize,
63
+ height: crossAxisSize
64
+ };
65
+ cursor += mainAxisSize;
66
+
67
+ // Space BETWEEN items, not after the last
68
+ if (i < itemCount - 1) {
69
+ cursor += itemSpacing;
70
+ }
28
71
  }
29
- this.totalHeight = y;
72
+ this.layouts = layouts;
73
+ this.contentSize = cursor + padding.end;
30
74
  }
31
75
 
32
76
  /**
33
- * Read-only snapshot for consumers.
34
- * Returned type is immutable.
77
+ * Returns computed item layouts.
78
+ *
79
+ * Order is guaranteed monotonic along the main axis,
80
+ * which is required for binary-search-based windowing.
35
81
  */
36
82
  getLayouts() {
37
83
  return this.layouts;
38
84
  }
39
- getContentHeight() {
40
- return this.totalHeight;
41
- }
42
85
 
43
86
  /**
44
- * Update height of one item and shift following items.
45
- * Returns true if layout changed.
87
+ * Returns total scrollable size along the main axis,
88
+ * including padding and inter-item spacing.
46
89
  */
47
- updateItemHeight(index, newHeight) {
48
- const layout = this.layouts[index];
49
- if (!layout) return false;
50
- const delta = newHeight - layout.height;
51
- if (delta === 0) return false;
52
-
53
- // Update this item
54
- layout.height = newHeight;
90
+ getContentSize() {
91
+ return this.contentSize;
92
+ }
55
93
 
56
- // Shift all items after this index
57
- for (let i = index + 1; i < this.layouts.length; i++) {
58
- this.layouts[i].y += delta;
59
- }
60
- this.totalHeight += delta;
61
- return true;
94
+ /**
95
+ * Clears internal layout state.
96
+ * Call on severe invalidation or teardown.
97
+ */
98
+ reset() {
99
+ this.layouts = [];
100
+ this.contentSize = 0;
62
101
  }
63
102
  }
64
103
  exports.MutableLinearLayout = MutableLinearLayout;
@@ -1 +1 @@
1
- {"version":3,"names":["MutableLinearLayout","constructor","initialHeights","width","layouts","y","height","push","x","totalHeight","getLayouts","getContentHeight","updateItemHeight","index","newHeight","layout","delta","i","length","exports"],"sourceRoot":"../../../src","sources":["layout/MutableLinearLayout.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACO,MAAMA,mBAAmB,CAAC;EAI/BC,WAAWA,CACTC,cAAiC,EACjCC,KAAa,EACb;IACA,IAAI,CAACC,OAAO,GAAG,EAAE;IACjB,IAAIC,CAAC,GAAG,CAAC;IAET,KAAK,MAAMC,MAAM,IAAIJ,cAAc,EAAE;MACnC,IAAI,CAACE,OAAO,CAACG,IAAI,CAAC;QAChBC,CAAC,EAAE,CAAC;QACJH,CAAC;QACDF,KAAK;QACLG;MACF,CAAC,CAAC;MACFD,CAAC,IAAIC,MAAM;IACb;IAEA,IAAI,CAACG,WAAW,GAAGJ,CAAC;EACtB;;EAEA;AACF;AACA;AACA;EACEK,UAAUA,CAAA,EAA+B;IACvC,OAAO,IAAI,CAACN,OAAO;EACrB;EAEAO,gBAAgBA,CAAA,EAAW;IACzB,OAAO,IAAI,CAACF,WAAW;EACzB;;EAEA;AACF;AACA;AACA;EACEG,gBAAgBA,CACdC,KAAa,EACbC,SAAiB,EACR;IACT,MAAMC,MAAM,GAAG,IAAI,CAACX,OAAO,CAACS,KAAK,CAAC;IAClC,IAAI,CAACE,MAAM,EAAE,OAAO,KAAK;IAEzB,MAAMC,KAAK,GAAGF,SAAS,GAAGC,MAAM,CAACT,MAAM;IACvC,IAAIU,KAAK,KAAK,CAAC,EAAE,OAAO,KAAK;;IAE7B;IACAD,MAAM,CAACT,MAAM,GAAGQ,SAAS;;IAEzB;IACA,KAAK,IAAIG,CAAC,GAAGJ,KAAK,GAAG,CAAC,EAAEI,CAAC,GAAG,IAAI,CAACb,OAAO,CAACc,MAAM,EAAED,CAAC,EAAE,EAAE;MACpD,IAAI,CAACb,OAAO,CAACa,CAAC,CAAC,CAAEZ,CAAC,IAAIW,KAAK;IAC7B;IAEA,IAAI,CAACP,WAAW,IAAIO,KAAK;IACzB,OAAO,IAAI;EACb;AACF;AAACG,OAAA,CAAAnB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_layoutDefaults","require","MutableLinearLayout","layouts","contentSize","constructor","axis","isVertical","compute","input","crossAxisSize","itemMainAxisSizes","padding","itemSpacing","DEFAULT_ITEM_SPACING","itemCount","length","Array","cursor","start","i","mainAxisSize","x","y","width","height","end","getLayouts","getContentSize","reset","exports"],"sourceRoot":"../../../src","sources":["layout/MutableLinearLayout.ts"],"mappings":";;;;;;AAGA,IAAAA,eAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,mBAAmB,CAAC;EAG/B;EACQC,OAAO,GAAiB,EAAE;;EAElC;EACQC,WAAW,GAAG,CAAC;EAEvBC,WAAWA,CAACC,IAAU,EAAE;IACtB,IAAI,CAACC,UAAU,GAAGD,IAAI,KAAK,UAAU;EACvC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEE,OAAOA,CAACC,KAAwB,EAAQ;IACtC,MAAM;MACJC,aAAa;MACbC,iBAAiB;MACjBC,OAAO;MACPC,WAAW,GAAGC;IAChB,CAAC,GAAGL,KAAK;IAET,MAAMM,SAAS,GAAGJ,iBAAiB,CAACK,MAAM;IAC1C,MAAMb,OAAqB,GAAG,IAAIc,KAAK,CAACF,SAAS,CAAC;IAElD,IAAIG,MAAM,GAAGN,OAAO,CAACO,KAAK;IAE1B,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,SAAS,EAAEK,CAAC,EAAE,EAAE;MAClC,MAAMC,YAAY,GAAGV,iBAAiB,CAACS,CAAC,CAAE;MAE1CjB,OAAO,CAACiB,CAAC,CAAC,GAAG,IAAI,CAACb,UAAU,GACxB;QACEe,CAAC,EAAE,CAAC;QACJC,CAAC,EAAEL,MAAM;QACTM,KAAK,EAAEd,aAAa;QACpBe,MAAM,EAAEJ;MACV,CAAC,GACD;QACEC,CAAC,EAAEJ,MAAM;QACTK,CAAC,EAAE,CAAC;QACJC,KAAK,EAAEH,YAAY;QACnBI,MAAM,EAAEf;MACV,CAAC;MAELQ,MAAM,IAAIG,YAAY;;MAEtB;MACA,IAAID,CAAC,GAAGL,SAAS,GAAG,CAAC,EAAE;QACrBG,MAAM,IAAIL,WAAW;MACvB;IACF;IAEA,IAAI,CAACV,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,WAAW,GAAGc,MAAM,GAAGN,OAAO,CAACc,GAAG;EACzC;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,UAAUA,CAAA,EAA0B;IAClC,OAAO,IAAI,CAACxB,OAAO;EACrB;;EAEA;AACF;AACA;AACA;EACEyB,cAAcA,CAAA,EAAW;IACvB,OAAO,IAAI,CAACxB,WAAW;EACzB;;EAEA;AACF;AACA;AACA;EACEyB,KAAKA,CAAA,EAAS;IACZ,IAAI,CAAC1B,OAAO,GAAG,EAAE;IACjB,IAAI,CAACC,WAAW,GAAG,CAAC;EACtB;AACF;AAAC0B,OAAA,CAAA5B,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DEFAULT_ITEM_SPACING = void 0;
7
+ /**
8
+ * Default spacing between items along the main axis.
9
+ *
10
+ * This value is used by layout engines when no explicit
11
+ * itemSpacing is provided.
12
+ *
13
+ * Mirrors:
14
+ * - Android RecyclerView ItemDecoration (typical 8–16dp)
15
+ * - iOS UICollectionViewFlowLayout minimumLineSpacing
16
+ * - Flutter SliverList spacing conventions
17
+ */
18
+ const DEFAULT_ITEM_SPACING = exports.DEFAULT_ITEM_SPACING = 12;
19
+ //# sourceMappingURL=layoutDefaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEFAULT_ITEM_SPACING","exports"],"sourceRoot":"../../../../src","sources":["layout/constants/layoutDefaults.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,EAAE","ignoreList":[]}
@@ -1,20 +1,2 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "EstimatedLayoutProvider", {
7
- enumerable: true,
8
- get: function () {
9
- return _EstimatedLayoutProvider.EstimatedLayoutProvider;
10
- }
11
- });
12
- Object.defineProperty(exports, "computeLayouts", {
13
- enumerable: true,
14
- get: function () {
15
- return _LayoutEngine.computeLayouts;
16
- }
17
- });
18
- var _EstimatedLayoutProvider = require("./EstimatedLayoutProvider");
19
- var _LayoutEngine = require("./LayoutEngine");
20
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_EstimatedLayoutProvider","require","_LayoutEngine"],"sourceRoot":"../../../src","sources":["layout/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAEA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["layout/index.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.NitroListView = void 0;
7
+ var _reactNative = require("react-native");
8
+ /**
9
+ * Props for the NitroListView.
10
+ * * We extend ViewProps so that developers can use standard styles
11
+ * like 'flex: 1' or 'backgroundColor' on the list.
12
+ */
13
+
14
+ /**
15
+ * The Native Component that maps to the physical view in Swift/Kotlin.
16
+ * * 'NitroListView' is the "Secret Handshake" name. It must match
17
+ * the name exported by your Native ViewManagers.
18
+ */
19
+ const NitroListView = exports.NitroListView = (0, _reactNative.requireNativeComponent)('NitroListView');
20
+ //# sourceMappingURL=NitroListView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","NitroListView","exports","requireNativeComponent"],"sourceRoot":"../../../src","sources":["native/NitroListView.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACO,MAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GACxB,IAAAE,mCAAsB,EAAqB,eAAe,CAAC","ignoreList":[]}