react-native-nitro-list 0.0.1 → 0.1.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 (417) hide show
  1. package/README.md +250 -16
  2. package/android/build.gradle +5 -4
  3. package/android/src/main/java/com/nitrolist/HybridNitroRecyclerView.kt +26 -0
  4. package/android/src/main/java/com/nitrolist/HybridNitroRecyclerViewManager.kt +29 -0
  5. package/android/src/main/java/com/nitrolist/NitroListPackage.kt +13 -24
  6. package/android/src/main/java/com/nitrolist/NitroRecyclerAdapter.kt +32 -0
  7. package/android/src/main/java/com/nitrolist/NitroRecyclerViewHolder.kt +8 -0
  8. package/ios/HybridNitroList.swift +28 -15
  9. package/lib/commonjs/NitroList.js +9 -0
  10. package/lib/commonjs/NitroList.js.map +1 -0
  11. package/lib/commonjs/ReusableView.js +2 -0
  12. package/lib/commonjs/ReusableView.js.map +1 -0
  13. package/lib/commonjs/cell/Cell.js +2 -0
  14. package/lib/{module/specs/nitro-list.nitro.js.map → commonjs/cell/Cell.js.map} +1 -1
  15. package/lib/commonjs/cell/CellKeyGenerator.js +21 -0
  16. package/lib/commonjs/cell/CellKeyGenerator.js.map +1 -0
  17. package/lib/commonjs/cell/CellRecycler.js +70 -0
  18. package/lib/commonjs/cell/CellRecycler.js.map +1 -0
  19. package/lib/commonjs/cell/createCell.js +21 -0
  20. package/lib/commonjs/cell/createCell.js.map +1 -0
  21. package/lib/commonjs/cell/index.js +20 -0
  22. package/lib/commonjs/cell/index.js.map +1 -0
  23. package/lib/commonjs/debug/useDebugOverlay.js +15 -0
  24. package/lib/commonjs/debug/useDebugOverlay.js.map +1 -0
  25. package/lib/commonjs/getVisibleIndices.js +38 -0
  26. package/lib/commonjs/getVisibleIndices.js.map +1 -0
  27. package/lib/commonjs/hooks/usePersistentCallback.js +36 -0
  28. package/lib/commonjs/hooks/usePersistentCallback.js.map +1 -0
  29. package/lib/commonjs/index.js +7 -5
  30. package/lib/commonjs/index.js.map +1 -1
  31. package/lib/commonjs/layout/MutableLinearLayout.js +104 -0
  32. package/lib/commonjs/layout/MutableLinearLayout.js.map +1 -0
  33. package/lib/commonjs/layout/constants/layoutDefaults.js +19 -0
  34. package/lib/commonjs/layout/constants/layoutDefaults.js.map +1 -0
  35. package/lib/commonjs/layout/index.js +2 -0
  36. package/lib/commonjs/{specs/nitro-list.nitro.js.map → layout/index.js.map} +1 -1
  37. package/lib/commonjs/measurement/MeasureLayout.js +20 -0
  38. package/lib/commonjs/measurement/MeasureLayout.js.map +1 -0
  39. package/lib/commonjs/measurement/useItemMeasurement.js +28 -0
  40. package/lib/commonjs/measurement/useItemMeasurement.js.map +1 -0
  41. package/lib/commonjs/native/NitroLayoutEngine.js +9 -0
  42. package/lib/commonjs/native/NitroLayoutEngine.js.map +1 -0
  43. package/lib/commonjs/{specs/nitro-list.nitro.js → native/NitroList.types.js} +1 -1
  44. package/lib/commonjs/native/NitroList.types.js.map +1 -0
  45. package/lib/commonjs/native/NitroRecyclerView.js +9 -0
  46. package/lib/commonjs/native/NitroRecyclerView.js.map +1 -0
  47. package/lib/commonjs/prefetch/PrefetchHelper.js +39 -0
  48. package/lib/commonjs/prefetch/PrefetchHelper.js.map +1 -0
  49. package/lib/commonjs/recycler/CellPool.js +46 -0
  50. package/lib/commonjs/recycler/CellPool.js.map +1 -0
  51. package/lib/commonjs/recycler/RecyclerList.js +224 -0
  52. package/lib/commonjs/recycler/RecyclerList.js.map +1 -0
  53. package/lib/commonjs/specs/nitro-layout-engine.nitro.js +6 -0
  54. package/lib/commonjs/specs/nitro-layout-engine.nitro.js.map +1 -0
  55. package/lib/commonjs/types/Axis.js +2 -0
  56. package/lib/commonjs/types/Axis.js.map +1 -0
  57. package/lib/commonjs/types/CellKey.js +2 -0
  58. package/lib/commonjs/types/CellKey.js.map +1 -0
  59. package/lib/commonjs/types/CellType.js +2 -0
  60. package/lib/commonjs/types/CellType.js.map +1 -0
  61. package/lib/commonjs/types/VisibleRange.js +2 -0
  62. package/lib/commonjs/types/VisibleRange.js.map +1 -0
  63. package/lib/commonjs/types/VisibleRangeInput.js +6 -0
  64. package/lib/commonjs/types/VisibleRangeInput.js.map +1 -0
  65. package/lib/commonjs/types/index.js +13 -0
  66. package/lib/commonjs/types/index.js.map +1 -0
  67. package/lib/commonjs/types/layout/LayoutRect.js +2 -0
  68. package/lib/commonjs/types/layout/LayoutRect.js.map +1 -0
  69. package/lib/commonjs/types/layout/LinearLayoutInput.js +6 -0
  70. package/lib/commonjs/types/layout/LinearLayoutInput.js.map +1 -0
  71. package/lib/commonjs/types/layout/MainAxisPadding.js +26 -0
  72. package/lib/commonjs/types/layout/MainAxisPadding.js.map +1 -0
  73. package/lib/commonjs/types/layout/index.js +2 -0
  74. package/lib/commonjs/types/layout/index.js.map +1 -0
  75. package/lib/commonjs/types/recycler/RecyclerCellInstance.js +6 -0
  76. package/lib/commonjs/types/recycler/RecyclerCellInstance.js.map +1 -0
  77. package/lib/commonjs/types/recycler/RecyclerItemRenderer.js +6 -0
  78. package/lib/commonjs/types/recycler/RecyclerItemRenderer.js.map +1 -0
  79. package/lib/commonjs/types/recycler/RecyclerListProps.js +6 -0
  80. package/lib/commonjs/types/recycler/RecyclerListProps.js.map +1 -0
  81. package/lib/commonjs/types/recycler/index.js +2 -0
  82. package/lib/commonjs/types/recycler/index.js.map +1 -0
  83. package/lib/commonjs/types/scroll/ScrollMetrics.js +6 -0
  84. package/lib/commonjs/types/scroll/ScrollMetrics.js.map +1 -0
  85. package/lib/commonjs/types/scroll/index.js +2 -0
  86. package/lib/commonjs/types/scroll/index.js.map +1 -0
  87. package/lib/commonjs/utils/arrayEqual.js +15 -0
  88. package/lib/commonjs/utils/arrayEqual.js.map +1 -0
  89. package/lib/commonjs/utils/assertNever.js +10 -0
  90. package/lib/commonjs/utils/assertNever.js.map +1 -0
  91. package/lib/commonjs/utils/clamp.js +10 -0
  92. package/lib/commonjs/utils/clamp.js.map +1 -0
  93. package/lib/commonjs/utils/devAssert.js +12 -0
  94. package/lib/commonjs/utils/devAssert.js.map +1 -0
  95. package/lib/commonjs/utils/invariant.js +12 -0
  96. package/lib/commonjs/utils/invariant.js.map +1 -0
  97. package/lib/commonjs/utils/isDefined.js +10 -0
  98. package/lib/commonjs/utils/isDefined.js.map +1 -0
  99. package/lib/commonjs/utils/isNumber.js +10 -0
  100. package/lib/commonjs/utils/isNumber.js.map +1 -0
  101. package/lib/commonjs/utils/noop.js +10 -0
  102. package/lib/commonjs/utils/noop.js.map +1 -0
  103. package/lib/commonjs/utils/shallowEqual.js +22 -0
  104. package/lib/commonjs/utils/shallowEqual.js.map +1 -0
  105. package/lib/commonjs/utils/throttle.js +17 -0
  106. package/lib/commonjs/utils/throttle.js.map +1 -0
  107. package/lib/commonjs/windowing/ScrollMetrics.js +2 -0
  108. package/lib/commonjs/windowing/ScrollMetrics.js.map +1 -0
  109. package/lib/commonjs/windowing/computeVisibleItemRange.js +71 -0
  110. package/lib/commonjs/windowing/computeVisibleItemRange.js.map +1 -0
  111. package/lib/commonjs/windowing/index.js +20 -0
  112. package/lib/commonjs/windowing/index.js.map +1 -0
  113. package/lib/commonjs/windowing/useScrollMetrics.js +39 -0
  114. package/lib/commonjs/windowing/useScrollMetrics.js.map +1 -0
  115. package/lib/module/NitroList.js +5 -0
  116. package/lib/module/NitroList.js.map +1 -0
  117. package/lib/module/ReusableView.js +2 -0
  118. package/lib/module/ReusableView.js.map +1 -0
  119. package/lib/module/cell/Cell.js +2 -0
  120. package/lib/module/cell/Cell.js.map +1 -0
  121. package/lib/module/cell/CellKeyGenerator.js +16 -0
  122. package/lib/module/cell/CellKeyGenerator.js.map +1 -0
  123. package/lib/module/cell/CellRecycler.js +66 -0
  124. package/lib/module/cell/CellRecycler.js.map +1 -0
  125. package/lib/module/cell/createCell.js +17 -0
  126. package/lib/module/cell/createCell.js.map +1 -0
  127. package/lib/module/cell/index.js +7 -0
  128. package/lib/module/cell/index.js.map +1 -0
  129. package/lib/module/debug/useDebugOverlay.js +11 -0
  130. package/lib/module/debug/useDebugOverlay.js.map +1 -0
  131. package/lib/module/getVisibleIndices.js +34 -0
  132. package/lib/module/getVisibleIndices.js.map +1 -0
  133. package/lib/module/hooks/usePersistentCallback.js +33 -0
  134. package/lib/module/hooks/usePersistentCallback.js.map +1 -0
  135. package/lib/module/index.js +1 -3
  136. package/lib/module/index.js.map +1 -1
  137. package/lib/module/layout/MutableLinearLayout.js +100 -0
  138. package/lib/module/layout/MutableLinearLayout.js.map +1 -0
  139. package/lib/module/layout/constants/layoutDefaults.js +15 -0
  140. package/lib/module/layout/constants/layoutDefaults.js.map +1 -0
  141. package/lib/module/layout/index.js +2 -0
  142. package/lib/module/layout/index.js.map +1 -0
  143. package/lib/module/measurement/MeasureLayout.js +16 -0
  144. package/lib/module/measurement/MeasureLayout.js.map +1 -0
  145. package/lib/module/measurement/useItemMeasurement.js +24 -0
  146. package/lib/module/measurement/useItemMeasurement.js.map +1 -0
  147. package/lib/module/native/NitroLayoutEngine.js +5 -0
  148. package/lib/module/native/NitroLayoutEngine.js.map +1 -0
  149. package/lib/module/native/NitroList.types.js +4 -0
  150. package/lib/module/native/NitroList.types.js.map +1 -0
  151. package/lib/module/native/NitroRecyclerView.js +5 -0
  152. package/lib/module/native/NitroRecyclerView.js.map +1 -0
  153. package/lib/module/prefetch/PrefetchHelper.js +34 -0
  154. package/lib/module/prefetch/PrefetchHelper.js.map +1 -0
  155. package/lib/module/recycler/CellPool.js +41 -0
  156. package/lib/module/recycler/CellPool.js.map +1 -0
  157. package/lib/module/recycler/RecyclerList.js +221 -0
  158. package/lib/module/recycler/RecyclerList.js.map +1 -0
  159. package/lib/module/specs/nitro-layout-engine.nitro.js +4 -0
  160. package/lib/module/specs/nitro-layout-engine.nitro.js.map +1 -0
  161. package/lib/module/types/Axis.js +2 -0
  162. package/lib/module/types/Axis.js.map +1 -0
  163. package/lib/module/types/CellKey.js +2 -0
  164. package/lib/module/types/CellKey.js.map +1 -0
  165. package/lib/module/types/CellType.js +2 -0
  166. package/lib/module/types/CellType.js.map +1 -0
  167. package/lib/module/types/VisibleRange.js +2 -0
  168. package/lib/module/types/VisibleRange.js.map +1 -0
  169. package/lib/module/types/VisibleRangeInput.js +4 -0
  170. package/lib/module/types/VisibleRangeInput.js.map +1 -0
  171. package/lib/module/types/index.js +4 -0
  172. package/lib/module/types/index.js.map +1 -0
  173. package/lib/module/types/layout/LayoutRect.js +2 -0
  174. package/lib/module/types/layout/LayoutRect.js.map +1 -0
  175. package/lib/module/types/layout/LinearLayoutInput.js +4 -0
  176. package/lib/module/types/layout/LinearLayoutInput.js.map +1 -0
  177. package/lib/module/types/layout/MainAxisPadding.js +22 -0
  178. package/lib/module/types/layout/MainAxisPadding.js.map +1 -0
  179. package/lib/module/types/layout/index.js +2 -0
  180. package/lib/module/types/layout/index.js.map +1 -0
  181. package/lib/module/types/recycler/RecyclerCellInstance.js +4 -0
  182. package/lib/module/types/recycler/RecyclerCellInstance.js.map +1 -0
  183. package/lib/module/types/recycler/RecyclerItemRenderer.js +4 -0
  184. package/lib/module/types/recycler/RecyclerItemRenderer.js.map +1 -0
  185. package/lib/module/types/recycler/RecyclerListProps.js +4 -0
  186. package/lib/module/types/recycler/RecyclerListProps.js.map +1 -0
  187. package/lib/module/types/recycler/index.js +2 -0
  188. package/lib/module/types/recycler/index.js.map +1 -0
  189. package/lib/module/types/scroll/ScrollMetrics.js +4 -0
  190. package/lib/module/types/scroll/ScrollMetrics.js.map +1 -0
  191. package/lib/module/types/scroll/index.js +2 -0
  192. package/lib/module/types/scroll/index.js.map +1 -0
  193. package/lib/module/utils/arrayEqual.js +11 -0
  194. package/lib/module/utils/arrayEqual.js.map +1 -0
  195. package/lib/module/utils/assertNever.js +6 -0
  196. package/lib/module/utils/assertNever.js.map +1 -0
  197. package/lib/module/utils/clamp.js +6 -0
  198. package/lib/module/utils/clamp.js.map +1 -0
  199. package/lib/module/utils/devAssert.js +8 -0
  200. package/lib/module/utils/devAssert.js.map +1 -0
  201. package/lib/module/utils/invariant.js +8 -0
  202. package/lib/module/utils/invariant.js.map +1 -0
  203. package/lib/module/utils/isDefined.js +6 -0
  204. package/lib/module/utils/isDefined.js.map +1 -0
  205. package/lib/module/utils/isNumber.js +6 -0
  206. package/lib/module/utils/isNumber.js.map +1 -0
  207. package/lib/module/utils/noop.js +6 -0
  208. package/lib/module/utils/noop.js.map +1 -0
  209. package/lib/module/utils/shallowEqual.js +18 -0
  210. package/lib/module/utils/shallowEqual.js.map +1 -0
  211. package/lib/module/utils/throttle.js +13 -0
  212. package/lib/module/utils/throttle.js.map +1 -0
  213. package/lib/module/windowing/ScrollMetrics.js +2 -0
  214. package/lib/module/windowing/ScrollMetrics.js.map +1 -0
  215. package/lib/module/windowing/computeVisibleItemRange.js +67 -0
  216. package/lib/module/windowing/computeVisibleItemRange.js.map +1 -0
  217. package/lib/module/windowing/index.js +5 -0
  218. package/lib/module/windowing/index.js.map +1 -0
  219. package/lib/module/windowing/useScrollMetrics.js +35 -0
  220. package/lib/module/windowing/useScrollMetrics.js.map +1 -0
  221. package/lib/typescript/src/NitroList.d.ts +5 -0
  222. package/lib/typescript/src/NitroList.d.ts.map +1 -0
  223. package/lib/typescript/src/ReusableView.d.ts +9 -0
  224. package/lib/typescript/src/ReusableView.d.ts.map +1 -0
  225. package/lib/typescript/src/cell/Cell.d.ts +22 -0
  226. package/lib/typescript/src/cell/Cell.d.ts.map +1 -0
  227. package/lib/typescript/src/cell/CellKeyGenerator.d.ts +11 -0
  228. package/lib/typescript/src/cell/CellKeyGenerator.d.ts.map +1 -0
  229. package/lib/typescript/src/cell/CellRecycler.d.ts +27 -0
  230. package/lib/typescript/src/cell/CellRecycler.d.ts.map +1 -0
  231. package/lib/typescript/src/cell/createCell.d.ts +7 -0
  232. package/lib/typescript/src/cell/createCell.d.ts.map +1 -0
  233. package/lib/typescript/src/cell/index.d.ts +4 -0
  234. package/lib/typescript/src/cell/index.d.ts.map +1 -0
  235. package/lib/typescript/src/debug/useDebugOverlay.d.ts +2 -0
  236. package/lib/typescript/src/debug/useDebugOverlay.d.ts.map +1 -0
  237. package/lib/typescript/src/getVisibleIndices.d.ts +8 -0
  238. package/lib/typescript/src/getVisibleIndices.d.ts.map +1 -0
  239. package/lib/typescript/src/hooks/usePersistentCallback.d.ts +16 -0
  240. package/lib/typescript/src/hooks/usePersistentCallback.d.ts.map +1 -0
  241. package/lib/typescript/src/index.d.ts +1 -4
  242. package/lib/typescript/src/index.d.ts.map +1 -1
  243. package/lib/typescript/src/layout/MutableLinearLayout.d.ts +54 -0
  244. package/lib/typescript/src/layout/MutableLinearLayout.d.ts.map +1 -0
  245. package/lib/typescript/src/layout/constants/layoutDefaults.d.ts +13 -0
  246. package/lib/typescript/src/layout/constants/layoutDefaults.d.ts.map +1 -0
  247. package/lib/typescript/src/layout/index.d.ts +2 -0
  248. package/lib/typescript/src/layout/index.d.ts.map +1 -0
  249. package/lib/typescript/src/measurement/MeasureLayout.d.ts +10 -0
  250. package/lib/typescript/src/measurement/MeasureLayout.d.ts.map +1 -0
  251. package/lib/typescript/src/measurement/useItemMeasurement.d.ts +11 -0
  252. package/lib/typescript/src/measurement/useItemMeasurement.d.ts.map +1 -0
  253. package/lib/typescript/src/native/NitroLayoutEngine.d.ts +3 -0
  254. package/lib/typescript/src/native/NitroLayoutEngine.d.ts.map +1 -0
  255. package/lib/typescript/src/native/NitroList.types.d.ts +9 -0
  256. package/lib/typescript/src/native/NitroList.types.d.ts.map +1 -0
  257. package/lib/typescript/src/native/NitroRecyclerView.d.ts +5 -0
  258. package/lib/typescript/src/native/NitroRecyclerView.d.ts.map +1 -0
  259. package/lib/typescript/src/prefetch/PrefetchHelper.d.ts +17 -0
  260. package/lib/typescript/src/prefetch/PrefetchHelper.d.ts.map +1 -0
  261. package/lib/typescript/src/recycler/CellPool.d.ts +14 -0
  262. package/lib/typescript/src/recycler/CellPool.d.ts.map +1 -0
  263. package/lib/typescript/src/recycler/RecyclerList.d.ts +4 -0
  264. package/lib/typescript/src/recycler/RecyclerList.d.ts.map +1 -0
  265. package/lib/typescript/src/specs/nitro-layout-engine.nitro.d.ts +14 -0
  266. package/lib/typescript/src/specs/nitro-layout-engine.nitro.d.ts.map +1 -0
  267. package/lib/typescript/src/types/Axis.d.ts +11 -0
  268. package/lib/typescript/src/types/Axis.d.ts.map +1 -0
  269. package/lib/typescript/src/types/CellKey.d.ts +10 -0
  270. package/lib/typescript/src/types/CellKey.d.ts.map +1 -0
  271. package/lib/typescript/src/types/CellType.d.ts +11 -0
  272. package/lib/typescript/src/types/CellType.d.ts.map +1 -0
  273. package/lib/typescript/src/types/VisibleRange.d.ts +10 -0
  274. package/lib/typescript/src/types/VisibleRange.d.ts.map +1 -0
  275. package/lib/typescript/src/types/VisibleRangeInput.d.ts +35 -0
  276. package/lib/typescript/src/types/VisibleRangeInput.d.ts.map +1 -0
  277. package/lib/typescript/src/types/index.d.ts +8 -0
  278. package/lib/typescript/src/types/index.d.ts.map +1 -0
  279. package/lib/typescript/src/types/layout/LayoutRect.d.ts +15 -0
  280. package/lib/typescript/src/types/layout/LayoutRect.d.ts.map +1 -0
  281. package/lib/typescript/src/types/layout/LinearLayoutInput.d.ts +10 -0
  282. package/lib/typescript/src/types/layout/LinearLayoutInput.d.ts.map +1 -0
  283. package/lib/typescript/src/types/layout/MainAxisPadding.d.ts +20 -0
  284. package/lib/typescript/src/types/layout/MainAxisPadding.d.ts.map +1 -0
  285. package/lib/typescript/src/types/layout/index.d.ts +4 -0
  286. package/lib/typescript/src/types/layout/index.d.ts.map +1 -0
  287. package/lib/typescript/src/types/recycler/RecyclerCellInstance.d.ts +37 -0
  288. package/lib/typescript/src/types/recycler/RecyclerCellInstance.d.ts.map +1 -0
  289. package/lib/typescript/src/types/recycler/RecyclerItemRenderer.d.ts +8 -0
  290. package/lib/typescript/src/types/recycler/RecyclerItemRenderer.d.ts.map +1 -0
  291. package/lib/typescript/src/types/recycler/RecyclerListProps.d.ts +66 -0
  292. package/lib/typescript/src/types/recycler/RecyclerListProps.d.ts.map +1 -0
  293. package/lib/typescript/src/types/recycler/index.d.ts +4 -0
  294. package/lib/typescript/src/types/recycler/index.d.ts.map +1 -0
  295. package/lib/typescript/src/types/scroll/ScrollMetrics.d.ts +15 -0
  296. package/lib/typescript/src/types/scroll/ScrollMetrics.d.ts.map +1 -0
  297. package/lib/typescript/src/types/scroll/index.d.ts +2 -0
  298. package/lib/typescript/src/types/scroll/index.d.ts.map +1 -0
  299. package/lib/typescript/src/utils/arrayEqual.d.ts +2 -0
  300. package/lib/typescript/src/utils/arrayEqual.d.ts.map +1 -0
  301. package/lib/typescript/src/utils/assertNever.d.ts +2 -0
  302. package/lib/typescript/src/utils/assertNever.d.ts.map +1 -0
  303. package/lib/typescript/src/utils/clamp.d.ts +2 -0
  304. package/lib/typescript/src/utils/clamp.d.ts.map +1 -0
  305. package/lib/typescript/src/utils/devAssert.d.ts +2 -0
  306. package/lib/typescript/src/utils/devAssert.d.ts.map +1 -0
  307. package/lib/typescript/src/utils/invariant.d.ts +2 -0
  308. package/lib/typescript/src/utils/invariant.d.ts.map +1 -0
  309. package/lib/typescript/src/utils/isDefined.d.ts +2 -0
  310. package/lib/typescript/src/utils/isDefined.d.ts.map +1 -0
  311. package/lib/typescript/src/utils/isNumber.d.ts +2 -0
  312. package/lib/typescript/src/utils/isNumber.d.ts.map +1 -0
  313. package/lib/typescript/src/utils/noop.d.ts +2 -0
  314. package/lib/typescript/src/utils/noop.d.ts.map +1 -0
  315. package/lib/typescript/src/utils/shallowEqual.d.ts +2 -0
  316. package/lib/typescript/src/utils/shallowEqual.d.ts.map +1 -0
  317. package/lib/typescript/src/utils/throttle.d.ts +2 -0
  318. package/lib/typescript/src/utils/throttle.d.ts.map +1 -0
  319. package/lib/typescript/src/windowing/ScrollMetrics.d.ts +11 -0
  320. package/lib/typescript/src/windowing/ScrollMetrics.d.ts.map +1 -0
  321. package/lib/typescript/src/windowing/computeVisibleItemRange.d.ts +15 -0
  322. package/lib/typescript/src/windowing/computeVisibleItemRange.d.ts.map +1 -0
  323. package/lib/typescript/src/windowing/index.d.ts +4 -0
  324. package/lib/typescript/src/windowing/index.d.ts.map +1 -0
  325. package/lib/typescript/src/windowing/useScrollMetrics.d.ts +14 -0
  326. package/lib/typescript/src/windowing/useScrollMetrics.d.ts.map +1 -0
  327. package/nitro.json +20 -13
  328. package/nitrogen/generated/android/NitroList+autolinking.cmake +2 -4
  329. package/nitrogen/generated/android/NitroListOnLoad.cpp +3 -13
  330. package/nitrogen/generated/android/c++/JHybridNitroLayoutEngineSpec.cpp +69 -0
  331. package/nitrogen/generated/android/c++/{JHybridNitroListSpec.hpp → JHybridNitroLayoutEngineSpec.hpp} +12 -13
  332. package/nitrogen/generated/android/c++/JLayoutRect.hpp +69 -0
  333. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/{HybridNitroListSpec.kt → HybridNitroLayoutEngineSpec.kt} +11 -13
  334. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/LayoutRect.kt +47 -0
  335. package/nitrogen/generated/ios/NitroList-Swift-Cxx-Bridge.cpp +9 -9
  336. package/nitrogen/generated/ios/NitroList-Swift-Cxx-Bridge.hpp +50 -13
  337. package/nitrogen/generated/ios/NitroList-Swift-Cxx-Umbrella.hpp +11 -5
  338. package/nitrogen/generated/ios/c++/{HybridNitroListSpecSwift.cpp → HybridNitroLayoutEngineSpecSwift.cpp} +2 -2
  339. package/nitrogen/generated/ios/c++/HybridNitroLayoutEngineSpecSwift.hpp +78 -0
  340. package/nitrogen/generated/ios/swift/HybridNitroLayoutEngineSpec.swift +56 -0
  341. package/nitrogen/generated/ios/swift/{HybridNitroListSpec_cxx.swift → HybridNitroLayoutEngineSpec_cxx.swift} +35 -38
  342. package/nitrogen/generated/ios/swift/LayoutRect.swift +45 -0
  343. package/nitrogen/generated/shared/c++/{HybridNitroListSpec.cpp → HybridNitroLayoutEngineSpec.cpp} +4 -5
  344. package/nitrogen/generated/shared/c++/{HybridNitroListSpec.hpp → HybridNitroLayoutEngineSpec.hpp} +15 -14
  345. package/nitrogen/generated/shared/c++/LayoutRect.hpp +95 -0
  346. package/package.json +12 -4
  347. package/src/NitroList.ts +8 -0
  348. package/src/ReusableView.ts +12 -0
  349. package/src/cell/Cell.ts +23 -0
  350. package/src/cell/CellKeyGenerator.ts +17 -0
  351. package/src/cell/CellRecycler.ts +76 -0
  352. package/src/cell/createCell.ts +15 -0
  353. package/src/cell/index.ts +5 -0
  354. package/src/debug/useDebugOverlay.ts +14 -0
  355. package/src/getVisibleIndices.ts +55 -0
  356. package/src/hooks/usePersistentCallback.ts +37 -0
  357. package/src/index.ts +1 -14
  358. package/src/layout/MutableLinearLayout.ts +112 -0
  359. package/src/layout/constants/layoutDefaults.ts +12 -0
  360. package/src/layout/index.ts +1 -0
  361. package/src/measurement/MeasureLayout.ts +20 -0
  362. package/src/measurement/useItemMeasurement.ts +32 -0
  363. package/src/native/NitroLayoutEngine.ts +7 -0
  364. package/src/native/NitroList.types.ts +13 -0
  365. package/src/native/NitroRecyclerView.ts +8 -0
  366. package/src/prefetch/PrefetchHelper.ts +47 -0
  367. package/src/recycler/CellPool.ts +47 -0
  368. package/src/recycler/RecyclerList.tsx +304 -0
  369. package/src/specs/nitro-layout-engine.nitro.ts +17 -0
  370. package/src/types/Axis.ts +10 -0
  371. package/src/types/CellKey.ts +9 -0
  372. package/src/types/CellType.ts +10 -0
  373. package/src/types/VisibleRange.ts +9 -0
  374. package/src/types/VisibleRangeInput.ts +39 -0
  375. package/src/types/index.ts +15 -0
  376. package/src/types/layout/LayoutRect.ts +14 -0
  377. package/src/types/layout/LinearLayoutInput.ts +12 -0
  378. package/src/types/layout/MainAxisPadding.ts +23 -0
  379. package/src/types/layout/index.ts +3 -0
  380. package/src/types/recycler/RecyclerCellInstance.ts +40 -0
  381. package/src/types/recycler/RecyclerItemRenderer.ts +8 -0
  382. package/src/types/recycler/RecyclerListProps.ts +74 -0
  383. package/src/types/recycler/index.ts +3 -0
  384. package/src/types/scroll/ScrollMetrics.ts +18 -0
  385. package/src/types/scroll/index.ts +1 -0
  386. package/src/utils/arrayEqual.ts +13 -0
  387. package/src/utils/assertNever.ts +3 -0
  388. package/src/utils/clamp.ts +7 -0
  389. package/src/utils/devAssert.ts +8 -0
  390. package/src/utils/invariant.ts +8 -0
  391. package/src/utils/isDefined.ts +5 -0
  392. package/src/utils/isNumber.ts +3 -0
  393. package/src/utils/noop.ts +3 -0
  394. package/src/utils/shallowEqual.ts +34 -0
  395. package/src/utils/throttle.ts +13 -0
  396. package/src/windowing/ScrollMetrics.ts +11 -0
  397. package/src/windowing/computeVisibleItemRange.ts +78 -0
  398. package/src/windowing/index.ts +3 -0
  399. package/src/windowing/useScrollMetrics.ts +56 -0
  400. package/android/src/main/java/com/nitrolist/HybridNitroList.kt +0 -27
  401. package/lib/module/specs/nitro-list.nitro.js +0 -4
  402. package/lib/typescript/src/specs/nitro-list.nitro.d.ts +0 -11
  403. package/lib/typescript/src/specs/nitro-list.nitro.d.ts.map +0 -1
  404. package/nitrogen/generated/android/c++/JHybridNitroListSpec.cpp +0 -56
  405. package/nitrogen/generated/android/c++/views/JHybridNitroListStateUpdater.cpp +0 -56
  406. package/nitrogen/generated/android/c++/views/JHybridNitroListStateUpdater.hpp +0 -49
  407. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/views/HybridNitroListManager.kt +0 -50
  408. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/views/HybridNitroListStateUpdater.kt +0 -23
  409. package/nitrogen/generated/ios/NitroListAutolinking.mm +0 -33
  410. package/nitrogen/generated/ios/NitroListAutolinking.swift +0 -25
  411. package/nitrogen/generated/ios/c++/HybridNitroListSpecSwift.hpp +0 -74
  412. package/nitrogen/generated/ios/c++/views/HybridNitroListComponent.mm +0 -96
  413. package/nitrogen/generated/ios/swift/HybridNitroListSpec.swift +0 -56
  414. package/nitrogen/generated/shared/c++/views/HybridNitroListComponent.cpp +0 -88
  415. package/nitrogen/generated/shared/c++/views/HybridNitroListComponent.hpp +0 -107
  416. package/nitrogen/generated/shared/json/NitroListConfig.json +0 -10
  417. package/src/specs/nitro-list.nitro.ts +0 -13
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Callback invoked when new items should be prefetched.
5
+ */
6
+
7
+ /**
8
+ * PrefetchHelper
9
+ *
10
+ * Stateless with respect to layout.
11
+ * Only tracks what has already been prefetched to avoid duplication.
12
+ *
13
+ * Designed to be driven by *visible window*, not scroll events.
14
+ */
15
+ export class PrefetchHelper {
16
+ lastPrefetched = new Set();
17
+ runPrefetch(visibleIndices, itemCount, aheadCount, onPrefetch) {
18
+ if (visibleIndices.length === 0) return;
19
+ const lastVisible = visibleIndices[visibleIndices.length - 1];
20
+ const start = lastVisible + 1;
21
+ const end = Math.min(itemCount - 1, start + aheadCount);
22
+ const toPrefetch = [];
23
+ for (let i = start; i <= end; i++) {
24
+ if (!this.lastPrefetched.has(i)) {
25
+ this.lastPrefetched.add(i);
26
+ toPrefetch.push(i);
27
+ }
28
+ }
29
+ if (toPrefetch.length > 0) {
30
+ onPrefetch(toPrefetch);
31
+ }
32
+ }
33
+ }
34
+ //# sourceMappingURL=PrefetchHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PrefetchHelper","lastPrefetched","Set","runPrefetch","visibleIndices","itemCount","aheadCount","onPrefetch","length","lastVisible","start","end","Math","min","toPrefetch","i","has","add","push"],"sourceRoot":"../../../src","sources":["prefetch/PrefetchHelper.ts"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,CAAC;EAClBC,cAAc,GAAG,IAAIC,GAAG,CAAS,CAAC;EAE1CC,WAAWA,CACTC,cAAiC,EACjCC,SAAiB,EACjBC,UAAkB,EAClBC,UAA4B,EAC5B;IACA,IAAIH,cAAc,CAACI,MAAM,KAAK,CAAC,EAAE;IAEjC,MAAMC,WAAW,GACfL,cAAc,CAACA,cAAc,CAACI,MAAM,GAAG,CAAC,CAAE;IAE5C,MAAME,KAAK,GAAGD,WAAW,GAAG,CAAC;IAC7B,MAAME,GAAG,GAAGC,IAAI,CAACC,GAAG,CAClBR,SAAS,GAAG,CAAC,EACbK,KAAK,GAAGJ,UACV,CAAC;IAED,MAAMQ,UAAoB,GAAG,EAAE;IAE/B,KAAK,IAAIC,CAAC,GAAGL,KAAK,EAAEK,CAAC,IAAIJ,GAAG,EAAEI,CAAC,EAAE,EAAE;MACjC,IAAI,CAAC,IAAI,CAACd,cAAc,CAACe,GAAG,CAACD,CAAC,CAAC,EAAE;QAC/B,IAAI,CAACd,cAAc,CAACgB,GAAG,CAACF,CAAC,CAAC;QAC1BD,UAAU,CAACI,IAAI,CAACH,CAAC,CAAC;MACpB;IACF;IAEA,IAAID,UAAU,CAACN,MAAM,GAAG,CAAC,EAAE;MACzBD,UAAU,CAACO,UAAU,CAAC;IACxB;EACF;AACF","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ export class CellPool {
4
+ pools = new Map();
5
+ maxPerType = new Map();
6
+
7
+ /** ✅ NEW: check if a type is registered */
8
+ hasType(type) {
9
+ return this.pools.has(type);
10
+ }
11
+ registerType(type, maxCount) {
12
+ if (this.maxPerType.has(type)) return;
13
+ this.maxPerType.set(type, maxCount);
14
+ this.pools.set(type, []);
15
+ }
16
+ acquire(type) {
17
+ const bucket = this.pools.get(type);
18
+ if (!bucket || bucket.length === 0) return null;
19
+ return bucket.pop();
20
+ }
21
+ release(cell) {
22
+ const {
23
+ type
24
+ } = cell;
25
+ const bucket = this.pools.get(type);
26
+ const max = this.maxPerType.get(type);
27
+ if (!bucket || max === undefined) return;
28
+ cell.index = -1;
29
+ if (bucket.length >= max) return;
30
+ bucket.push(cell);
31
+ }
32
+ clear() {
33
+ for (const bucket of this.pools.values()) {
34
+ bucket.length = 0;
35
+ }
36
+ }
37
+ getPoolSize(type) {
38
+ return this.pools.get(type)?.length ?? 0;
39
+ }
40
+ }
41
+ //# sourceMappingURL=CellPool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CellPool","pools","Map","maxPerType","hasType","type","has","registerType","maxCount","set","acquire","bucket","get","length","pop","release","cell","max","undefined","index","push","clear","values","getPoolSize"],"sourceRoot":"../../../src","sources":["recycler/CellPool.ts"],"mappings":";;AAGA,OAAO,MAAMA,QAAQ,CAAC;EACHC,KAAK,GAAG,IAAIC,GAAG,CAAmC,CAAC;EACnDC,UAAU,GAAG,IAAID,GAAG,CAAmB,CAAC;;EAEzD;EACAE,OAAOA,CAACC,IAAc,EAAW;IAC/B,OAAO,IAAI,CAACJ,KAAK,CAACK,GAAG,CAACD,IAAI,CAAC;EAC7B;EAEAE,YAAYA,CAACF,IAAc,EAAEG,QAAgB,EAAQ;IACnD,IAAI,IAAI,CAACL,UAAU,CAACG,GAAG,CAACD,IAAI,CAAC,EAAE;IAC/B,IAAI,CAACF,UAAU,CAACM,GAAG,CAACJ,IAAI,EAAEG,QAAQ,CAAC;IACnC,IAAI,CAACP,KAAK,CAACQ,GAAG,CAACJ,IAAI,EAAE,EAAE,CAAC;EAC1B;EAEAK,OAAOA,CAACL,IAAc,EAA+B;IACnD,MAAMM,MAAM,GAAG,IAAI,CAACV,KAAK,CAACW,GAAG,CAACP,IAAI,CAAC;IACnC,IAAI,CAACM,MAAM,IAAIA,MAAM,CAACE,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;IAC/C,OAAOF,MAAM,CAACG,GAAG,CAAC,CAAC;EACrB;EAEAC,OAAOA,CAACC,IAA0B,EAAQ;IACxC,MAAM;MAAEX;IAAK,CAAC,GAAGW,IAAI;IACrB,MAAML,MAAM,GAAG,IAAI,CAACV,KAAK,CAACW,GAAG,CAACP,IAAI,CAAC;IACnC,MAAMY,GAAG,GAAG,IAAI,CAACd,UAAU,CAACS,GAAG,CAACP,IAAI,CAAC;IAErC,IAAI,CAACM,MAAM,IAAIM,GAAG,KAAKC,SAAS,EAAE;IAElCF,IAAI,CAACG,KAAK,GAAG,CAAC,CAAC;IAEf,IAAIR,MAAM,CAACE,MAAM,IAAII,GAAG,EAAE;IAC1BN,MAAM,CAACS,IAAI,CAACJ,IAAI,CAAC;EACnB;EAEAK,KAAKA,CAAA,EAAS;IACZ,KAAK,MAAMV,MAAM,IAAI,IAAI,CAACV,KAAK,CAACqB,MAAM,CAAC,CAAC,EAAE;MACxCX,MAAM,CAACE,MAAM,GAAG,CAAC;IACnB;EACF;EAEAU,WAAWA,CAAClB,IAAc,EAAU;IAClC,OAAO,IAAI,CAACJ,KAAK,CAACW,GAAG,CAACP,IAAI,CAAC,EAAEQ,MAAM,IAAI,CAAC;EAC1C;AACF","ignoreList":[]}
@@ -0,0 +1,221 @@
1
+ "use strict";
2
+
3
+ import React, { useRef, useEffect, useState } from 'react';
4
+ import { ScrollView, View, StyleSheet } from 'react-native';
5
+ import { MutableLinearLayout } from '../layout/MutableLinearLayout';
6
+ import { computeVisibleItemRange } from '../windowing';
7
+ import { CellPool } from './CellPool';
8
+
9
+ /* =========================================================
10
+ * Constants
11
+ * =======================================================*/
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ const DEFAULT_VIEWPORT_SIZE = 800;
14
+ const DEFAULT_ITEM_SIZE = 60;
15
+ const SCROLL_EVENT_THROTTLE = 16;
16
+
17
+ /* =========================================================
18
+ * RecyclerList
19
+ * =======================================================*/
20
+
21
+ export function RecyclerList(props) {
22
+ const {
23
+ scrollDirection = 'vertical',
24
+ containerCrossAxisSize,
25
+ data,
26
+ itemMainAxisSizes,
27
+ padding = {
28
+ start: 0,
29
+ end: 0
30
+ },
31
+ itemSpacing,
32
+ bufferRatio = 1.3,
33
+ getCellType,
34
+ renderItem
35
+ } = props;
36
+ const isVertical = scrollDirection === 'vertical';
37
+ const itemCount = data.length;
38
+
39
+ /* -------------------------------------------------------
40
+ * Controlled render
41
+ * -----------------------------------------------------*/
42
+
43
+ const [, forceRender] = useState(0);
44
+
45
+ /* -------------------------------------------------------
46
+ * Layout engine
47
+ * -----------------------------------------------------*/
48
+
49
+ const layoutEngineRef = useRef(null);
50
+ const layoutSignatureRef = useRef('');
51
+ const layoutSignature = [scrollDirection, containerCrossAxisSize, itemCount, itemMainAxisSizes, padding.start, padding.end, itemSpacing ?? 'default'].join('|');
52
+ if (!layoutEngineRef.current || layoutSignatureRef.current !== layoutSignature) {
53
+ const engine = new MutableLinearLayout(scrollDirection);
54
+ engine.compute({
55
+ crossAxisSize: containerCrossAxisSize,
56
+ itemMainAxisSizes,
57
+ padding,
58
+ itemSpacing
59
+ });
60
+ layoutEngineRef.current = engine;
61
+ layoutSignatureRef.current = layoutSignature;
62
+ }
63
+ const layouts = layoutEngineRef.current.getLayouts();
64
+ const contentSize = layoutEngineRef.current.getContentSize();
65
+
66
+ /* -------------------------------------------------------
67
+ * Scroll metrics
68
+ * -----------------------------------------------------*/
69
+
70
+ const scrollOffsetRef = useRef(0);
71
+ const viewportSizeRef = useRef(DEFAULT_VIEWPORT_SIZE);
72
+
73
+ /* -------------------------------------------------------
74
+ * Cell pool + physical cells
75
+ * -----------------------------------------------------*/
76
+
77
+ const cellPoolRef = useRef(new CellPool());
78
+ const activeCellsRef = useRef([]);
79
+ const nextCellKeyRef = useRef(0);
80
+ const createCell = type => ({
81
+ key: nextCellKeyRef.current++,
82
+ index: -1,
83
+ type
84
+ });
85
+ const MAX_CELLS = Math.ceil(viewportSizeRef.current / DEFAULT_ITEM_SIZE * bufferRatio) + 2;
86
+
87
+ /* -------------------------------------------------------
88
+ * Visible cell coordinator
89
+ * -----------------------------------------------------*/
90
+
91
+ const updateVisibleCells = () => {
92
+ const offset = scrollOffsetRef.current;
93
+ const viewportSize = viewportSizeRef.current;
94
+ const buffer = viewportSize * bufferRatio;
95
+ const range = computeVisibleItemRange({
96
+ layouts,
97
+ offset,
98
+ viewportSize,
99
+ buffer,
100
+ isVertical
101
+ });
102
+ if (!range) return;
103
+ const nextCells = [];
104
+ const used = new Set();
105
+ for (let index = range.startIndex; index <= range.endIndex; index++) {
106
+ const item = data[index];
107
+ if (item === undefined) continue;
108
+ const type = getCellType(item, index);
109
+
110
+ // Register type once, with hard cap
111
+ if (!cellPoolRef.current.hasType(type)) {
112
+ cellPoolRef.current.registerType(type, MAX_CELLS);
113
+ for (let i = 0; i < MAX_CELLS; i++) {
114
+ cellPoolRef.current.release(createCell(type));
115
+ }
116
+ }
117
+ let cell = cellPoolRef.current.acquire(type);
118
+ if (!cell) {
119
+ const reuseIndex = activeCellsRef.current.findIndex(c => c.type === type);
120
+ if (reuseIndex === -1) continue;
121
+ cell = activeCellsRef.current.splice(reuseIndex, 1)[0];
122
+ }
123
+ cell.index = index;
124
+ nextCells.push(cell);
125
+ used.add(cell);
126
+ }
127
+ for (const cell of activeCellsRef.current) {
128
+ if (!used.has(cell)) {
129
+ cellPoolRef.current.release(cell);
130
+ }
131
+ }
132
+ let changed = nextCells.length !== activeCellsRef.current.length;
133
+ if (!changed) {
134
+ for (let i = 0; i < nextCells.length; i++) {
135
+ if (nextCells[i] !== activeCellsRef.current[i]) {
136
+ changed = true;
137
+ break;
138
+ }
139
+ }
140
+ }
141
+ if (changed) {
142
+ activeCellsRef.current = nextCells;
143
+ forceRender(v => v + 1);
144
+ }
145
+ };
146
+
147
+ /* -------------------------------------------------------
148
+ * Scroll handlers
149
+ * -----------------------------------------------------*/
150
+
151
+ const frameScheduledRef = useRef(false);
152
+ const onScroll = e => {
153
+ scrollOffsetRef.current = isVertical ? e.nativeEvent.contentOffset.y : e.nativeEvent.contentOffset.x;
154
+ if (frameScheduledRef.current) return;
155
+ frameScheduledRef.current = true;
156
+ requestAnimationFrame(() => {
157
+ frameScheduledRef.current = false;
158
+ updateVisibleCells();
159
+ });
160
+ };
161
+ const onLayout = e => {
162
+ viewportSizeRef.current = isVertical ? e.nativeEvent.layout.height : e.nativeEvent.layout.width;
163
+ updateVisibleCells();
164
+ };
165
+ useEffect(() => {
166
+ updateVisibleCells();
167
+ // eslint-disable-next-line react-hooks/exhaustive-deps
168
+ }, []);
169
+
170
+ /* -------------------------------------------------------
171
+ * Render
172
+ * -----------------------------------------------------*/
173
+
174
+ return /*#__PURE__*/_jsx(ScrollView, {
175
+ onScroll: onScroll,
176
+ onLayout: onLayout,
177
+ horizontal: !isVertical,
178
+ scrollEventThrottle: SCROLL_EVENT_THROTTLE,
179
+ removeClippedSubviews: true,
180
+ children: /*#__PURE__*/_jsx(View, {
181
+ style: isVertical ? {
182
+ height: contentSize
183
+ } : {
184
+ width: contentSize
185
+ },
186
+ children: activeCellsRef.current.map(cell => {
187
+ const index = cell.index;
188
+ const layout = layouts[index];
189
+ const item = data[index];
190
+ if (!layout || item === undefined) return null;
191
+ return /*#__PURE__*/_jsx(View, {
192
+ style: [styles.cell, isVertical ? {
193
+ top: layout.y,
194
+ height: layout.height,
195
+ width: layout.width
196
+ } : {
197
+ left: layout.x,
198
+ width: layout.width,
199
+ height: layout.height
200
+ }],
201
+ children: renderItem({
202
+ item,
203
+ index,
204
+ cell
205
+ })
206
+ }, cell.key);
207
+ })
208
+ })
209
+ });
210
+ }
211
+
212
+ /* =========================================================
213
+ * Styles
214
+ * =======================================================*/
215
+
216
+ const styles = StyleSheet.create({
217
+ cell: {
218
+ position: 'absolute'
219
+ }
220
+ });
221
+ //# sourceMappingURL=RecyclerList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useRef","useEffect","useState","ScrollView","View","StyleSheet","MutableLinearLayout","computeVisibleItemRange","CellPool","jsx","_jsx","DEFAULT_VIEWPORT_SIZE","DEFAULT_ITEM_SIZE","SCROLL_EVENT_THROTTLE","RecyclerList","props","scrollDirection","containerCrossAxisSize","data","itemMainAxisSizes","padding","start","end","itemSpacing","bufferRatio","getCellType","renderItem","isVertical","itemCount","length","forceRender","layoutEngineRef","layoutSignatureRef","layoutSignature","join","current","engine","compute","crossAxisSize","layouts","getLayouts","contentSize","getContentSize","scrollOffsetRef","viewportSizeRef","cellPoolRef","activeCellsRef","nextCellKeyRef","createCell","type","key","index","MAX_CELLS","Math","ceil","updateVisibleCells","offset","viewportSize","buffer","range","nextCells","used","Set","startIndex","endIndex","item","undefined","hasType","registerType","i","release","cell","acquire","reuseIndex","findIndex","c","splice","push","add","has","changed","v","frameScheduledRef","onScroll","e","nativeEvent","contentOffset","y","x","requestAnimationFrame","onLayout","layout","height","width","horizontal","scrollEventThrottle","removeClippedSubviews","children","style","map","styles","top","left","create","position"],"sourceRoot":"../../../src","sources":["recycler/RecyclerList.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SACEC,UAAU,EACVC,IAAI,EACJC,UAAU,QAGL,cAAc;AASrB,SAASC,mBAAmB,QAAQ,+BAA+B;AACnE,SAASC,uBAAuB,QAAQ,cAAc;AACtD,SAASC,QAAQ,QAAQ,YAAY;;AAErC;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAIA,MAAMC,qBAAqB,GAAG,GAAG;AACjC,MAAMC,iBAAiB,GAAG,EAAE;AAC5B,MAAMC,qBAAqB,GAAG,EAAE;;AAEhC;AACA;AACA;;AAEA,OAAO,SAASC,YAAYA,CAC1BC,KAA2B,EACP;EACpB,MAAM;IACJC,eAAe,GAAG,UAAU;IAC5BC,sBAAsB;IACtBC,IAAI;IACJC,iBAAiB;IACjBC,OAAO,GAAG;MAAEC,KAAK,EAAE,CAAC;MAAEC,GAAG,EAAE;IAAE,CAAC;IAC9BC,WAAW;IACXC,WAAW,GAAG,GAAG;IACjBC,WAAW;IACXC;EACF,CAAC,GAAGX,KAAK;EAET,MAAMY,UAAU,GAAGX,eAAe,KAAK,UAAU;EACjD,MAAMY,SAAS,GAAGV,IAAI,CAACW,MAAM;;EAE7B;AACF;AACA;;EAEE,MAAM,GAAGC,WAAW,CAAC,GAAG5B,QAAQ,CAAC,CAAC,CAAC;;EAEnC;AACF;AACA;;EAEE,MAAM6B,eAAe,GAAG/B,MAAM,CAA6B,IAAI,CAAC;E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B,IAAI,CAACwC,MAAM,IAAI1B,IAAI,KAAKC,SAAS,EAAE,OAAO,IAAI;QAE9C,oBACExD,IAAA,CAACN,IAAI;UAEH8F,KAAK,EAAE,CACLE,MAAM,CAAC7B,IAAI,EACX5C,UAAU,GACN;YACE0E,GAAG,EAAEV,MAAM,CAACJ,CAAC;YACbK,MAAM,EAAED,MAAM,CAACC,MAAM;YACrBC,KAAK,EAAEF,MAAM,CAACE;UAChB,CAAC,GACD;YACES,IAAI,EAAEX,MAAM,CAACH,CAAC;YACdK,KAAK,EAAEF,MAAM,CAACE,KAAK;YACnBD,MAAM,EAAED,MAAM,CAACC;UACjB,CAAC,CACL;UAAAK,QAAA,EAEDvE,UAAU,CAAC;YAAEuC,IAAI;YAAEd,KAAK;YAAEoB;UAAK,CAAC;QAAC,GAhB7BA,IAAI,CAACrB,GAiBN,CAAC;MAEX,CAAC;IAAC,CACE;EAAC,CACG,CAAC;AAEjB;;AAEA;AACA;AACA;;AAEA,MAAMkD,MAAM,GAAG/F,UAAU,CAACkG,MAAM,CAAC;EAC/BhC,IAAI,EAAE;IACJiC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=nitro-layout-engine.nitro.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["specs/nitro-layout-engine.nitro.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=Axis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/Axis.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=CellKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/CellKey.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=CellType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/CellType.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=VisibleRange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/VisibleRange.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=VisibleRangeInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/VisibleRangeInput.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { ZERO_MAIN_AXIS_PADDING } from './layout/MainAxisPadding';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ZERO_MAIN_AXIS_PADDING"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":";;AAKA,SACEA,sBAAsB,QACjB,0BAA0B","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=LayoutRect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["types/layout/LayoutRect.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=LinearLayoutInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["types/layout/LinearLayoutInput.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Padding applied along the main scroll axis.
5
+ *
6
+ * This is a layout-level concept (not visual styling).
7
+ *
8
+ * - vertical → top / bottom
9
+ * - horizontal → left / right
10
+ *
11
+ * Uses start/end to remain RTL-safe and platform-neutral.
12
+ */
13
+
14
+ /**
15
+ * Shared zero-padding constant.
16
+ * Safe to reuse across layouts.
17
+ */
18
+ export const ZERO_MAIN_AXIS_PADDING = {
19
+ start: 0,
20
+ end: 0
21
+ };
22
+ //# sourceMappingURL=MainAxisPadding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ZERO_MAIN_AXIS_PADDING","start","end"],"sourceRoot":"../../../../src","sources":["types/layout/MainAxisPadding.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA,OAAO,MAAMA,sBAAuC,GAAG;EACrDC,KAAK,EAAE,CAAC;EACRC,GAAG,EAAE;AACP,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["types/layout/index.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=RecyclerCellInstance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["types/recycler/RecyclerCellInstance.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=RecyclerItemRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["types/recycler/RecyclerItemRenderer.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=RecyclerListProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["types/recycler/RecyclerListProps.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["types/recycler/index.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=ScrollMetrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["types/scroll/ScrollMetrics.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["types/scroll/index.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ export function arrayEqual(a, b) {
4
+ if (a === b) return true;
5
+ if (a.length !== b.length) return false;
6
+ for (let i = 0; i < a.length; i++) {
7
+ if (!Object.is(a[i], b[i])) return false;
8
+ }
9
+ return true;
10
+ }
11
+ //# sourceMappingURL=arrayEqual.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["arrayEqual","a","b","length","i","Object","is"],"sourceRoot":"../../../src","sources":["utils/arrayEqual.ts"],"mappings":";;AAAA,OAAO,SAASA,UAAUA,CACxBC,CAAe,EACfC,CAAe,EACN;EACT,IAAID,CAAC,KAAKC,CAAC,EAAE,OAAO,IAAI;EACxB,IAAID,CAAC,CAACE,MAAM,KAAKD,CAAC,CAACC,MAAM,EAAE,OAAO,KAAK;EAEvC,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,CAAC,CAACE,MAAM,EAAEC,CAAC,EAAE,EAAE;IACjC,IAAI,CAACC,MAAM,CAACC,EAAE,CAACL,CAAC,CAACG,CAAC,CAAC,EAAEF,CAAC,CAACE,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK;EAC1C;EAEA,OAAO,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export function assertNever(x) {
4
+ throw new Error(`Unexpected value: ${String(x)}`);
5
+ }
6
+ //# sourceMappingURL=assertNever.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["assertNever","x","Error","String"],"sourceRoot":"../../../src","sources":["utils/assertNever.ts"],"mappings":";;AAAA,OAAO,SAASA,WAAWA,CAACC,CAAQ,EAAS;EAC3C,MAAM,IAAIC,KAAK,CAAC,qBAAqBC,MAAM,CAACF,CAAC,CAAC,EAAE,CAAC;AACnD","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export function clamp(value, min, max) {
4
+ return Math.min(Math.max(value, min), max);
5
+ }
6
+ //# sourceMappingURL=clamp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["clamp","value","min","max","Math"],"sourceRoot":"../../../src","sources":["utils/clamp.ts"],"mappings":";;AAAA,OAAO,SAASA,KAAKA,CACnBC,KAAa,EACbC,GAAW,EACXC,GAAW,EACH;EACR,OAAOC,IAAI,CAACF,GAAG,CAACE,IAAI,CAACD,GAAG,CAACF,KAAK,EAAEC,GAAG,CAAC,EAAEC,GAAG,CAAC;AAC5C","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ export function devAssert(condition, message) {
4
+ if (__DEV__ && !condition) {
5
+ throw new Error(`RecyclerList: ${message}`);
6
+ }
7
+ }
8
+ //# sourceMappingURL=devAssert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["devAssert","condition","message","__DEV__","Error"],"sourceRoot":"../../../src","sources":["utils/devAssert.ts"],"mappings":";;AAAA,OAAO,SAASA,SAASA,CACvBC,SAAkB,EAClBC,OAAe,EACT;EACN,IAAIC,OAAO,IAAI,CAACF,SAAS,EAAE;IACzB,MAAM,IAAIG,KAAK,CAAC,iBAAiBF,OAAO,EAAE,CAAC;EAC7C;AACF","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ export function invariant(condition, message) {
4
+ if (!condition) {
5
+ throw new Error(`Invariant failed: ${message}`);
6
+ }
7
+ }
8
+ //# sourceMappingURL=invariant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["invariant","condition","message","Error"],"sourceRoot":"../../../src","sources":["utils/invariant.ts"],"mappings":";;AAAA,OAAO,SAASA,SAASA,CACvBC,SAAkB,EAClBC,OAAe,EACI;EACnB,IAAI,CAACD,SAAS,EAAE;IACd,MAAM,IAAIE,KAAK,CAAC,qBAAqBD,OAAO,EAAE,CAAC;EACjD;AACF","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export function isDefined(value) {
4
+ return value !== undefined && value !== null;
5
+ }
6
+ //# sourceMappingURL=isDefined.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isDefined","value","undefined"],"sourceRoot":"../../../src","sources":["utils/isDefined.ts"],"mappings":";;AAAA,OAAO,SAASA,SAASA,CACvBC,KAA2B,EACf;EACZ,OAAOA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI;AAC9C","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export function isNumber(value) {
4
+ return typeof value === 'number' && !Number.isNaN(value);
5
+ }
6
+ //# sourceMappingURL=isNumber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isNumber","value","Number","isNaN"],"sourceRoot":"../../../src","sources":["utils/isNumber.ts"],"mappings":";;AAAA,OAAO,SAASA,QAAQA,CAACC,KAAc,EAAmB;EACxD,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAI,CAACC,MAAM,CAACC,KAAK,CAACF,KAAK,CAAC;AAC1D","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export function noop() {
4
+ // intentionally empty
5
+ }
6
+ //# sourceMappingURL=noop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["noop"],"sourceRoot":"../../../src","sources":["utils/noop.ts"],"mappings":";;AAAA,OAAO,SAASA,IAAIA,CAAA,EAAS;EAC3B;AAAA","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ export function shallowEqual(a, b) {
4
+ if (Object.is(a, b)) return true;
5
+ if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) {
6
+ return false;
7
+ }
8
+ const aKeys = Object.keys(a);
9
+ const bKeys = Object.keys(b);
10
+ if (aKeys.length !== bKeys.length) return false;
11
+ for (const key of aKeys) {
12
+ if (!(key in b) || !Object.is(a[key], b[key])) {
13
+ return false;
14
+ }
15
+ }
16
+ return true;
17
+ }
18
+ //# sourceMappingURL=shallowEqual.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["shallowEqual","a","b","Object","is","aKeys","keys","bKeys","length","key"],"sourceRoot":"../../../src","sources":["utils/shallowEqual.ts"],"mappings":";;AAAA,OAAO,SAASA,YAAYA,CAC1BC,CAAU,EACVC,CAAU,EACD;EACT,IAAIC,MAAM,CAACC,EAAE,CAACH,CAAC,EAAEC,CAAC,CAAC,EAAE,OAAO,IAAI;EAEhC,IACE,OAAOD,CAAC,KAAK,QAAQ,IACrB,OAAOC,CAAC,KAAK,QAAQ,IACrBD,CAAC,KAAK,IAAI,IACVC,CAAC,KAAK,IAAI,EACV;IACA,OAAO,KAAK;EACd;EAEA,MAAMG,KAAK,GAAGF,MAAM,CAACG,IAAI,CAACL,CAAW,CAAC;EACtC,MAAMM,KAAK,GAAGJ,MAAM,CAACG,IAAI,CAACJ,CAAW,CAAC;EAEtC,IAAIG,KAAK,CAACG,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE,OAAO,KAAK;EAE/C,KAAK,MAAMC,GAAG,IAAIJ,KAAK,EAAE;IACvB,IACE,EAAEI,GAAG,IAAKP,CAAY,CAAC,IACvB,CAACC,MAAM,CAACC,EAAE,CACPH,CAAC,CAA6BQ,GAAG,CAAC,EAClCP,CAAC,CAA6BO,GAAG,CACpC,CAAC,EACD;MACA,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ export function throttle(fn, ms) {
4
+ let last = 0;
5
+ return (...args) => {
6
+ const now = Date.now();
7
+ if (now - last > ms) {
8
+ last = now;
9
+ fn(...args);
10
+ }
11
+ };
12
+ }
13
+ //# sourceMappingURL=throttle.js.map