react-native-nitro-list 0.1.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 (312) hide show
  1. package/ios/HybridNitroList.swift +10 -14
  2. package/lib/commonjs/cell/CellKeyGenerator.js +21 -0
  3. package/lib/commonjs/cell/CellKeyGenerator.js.map +1 -0
  4. package/lib/commonjs/cell/CellRecycler.js +48 -40
  5. package/lib/commonjs/cell/CellRecycler.js.map +1 -1
  6. package/lib/commonjs/cell/createCell.js +21 -0
  7. package/lib/commonjs/cell/createCell.js.map +1 -0
  8. package/lib/commonjs/cell/index.js +20 -0
  9. package/lib/commonjs/cell/index.js.map +1 -0
  10. package/lib/commonjs/getVisibleIndices.js.map +1 -1
  11. package/lib/commonjs/hooks/usePersistentCallback.js +36 -0
  12. package/lib/commonjs/hooks/usePersistentCallback.js.map +1 -0
  13. package/lib/commonjs/index.js +1 -1
  14. package/lib/commonjs/layout/MutableLinearLayout.js +78 -39
  15. package/lib/commonjs/layout/MutableLinearLayout.js.map +1 -1
  16. package/lib/commonjs/layout/constants/layoutDefaults.js +19 -0
  17. package/lib/commonjs/layout/constants/layoutDefaults.js.map +1 -0
  18. package/lib/commonjs/layout/index.js +0 -18
  19. package/lib/commonjs/layout/index.js.map +1 -1
  20. package/lib/commonjs/recycler/CellPool.js +46 -0
  21. package/lib/commonjs/recycler/CellPool.js.map +1 -0
  22. package/lib/commonjs/recycler/RecyclerList.js +224 -0
  23. package/lib/commonjs/recycler/RecyclerList.js.map +1 -0
  24. package/lib/commonjs/types/Axis.js +2 -0
  25. package/lib/commonjs/{layout/LayoutProvider.js.map → types/Axis.js.map} +1 -1
  26. package/lib/commonjs/types/CellKey.js +2 -0
  27. package/lib/{module/layout/LayoutProvider.js.map → commonjs/types/CellKey.js.map} +1 -1
  28. package/lib/commonjs/types/CellType.js +2 -0
  29. package/lib/commonjs/{layout/LayoutRectangle.js.map → types/CellType.js.map} +1 -1
  30. package/lib/commonjs/types/VisibleRange.js +2 -0
  31. package/lib/{module/layout/LayoutRectangle.js.map → commonjs/types/VisibleRange.js.map} +1 -1
  32. package/lib/commonjs/{RecyclerList.types.js → types/VisibleRangeInput.js} +1 -1
  33. package/lib/commonjs/types/VisibleRangeInput.js.map +1 -0
  34. package/lib/commonjs/types/index.js +13 -0
  35. package/lib/commonjs/types/index.js.map +1 -0
  36. package/lib/commonjs/types/layout/LayoutRect.js +2 -0
  37. package/lib/commonjs/types/layout/LayoutRect.js.map +1 -0
  38. package/lib/commonjs/types/layout/LinearLayoutInput.js +6 -0
  39. package/lib/commonjs/types/layout/LinearLayoutInput.js.map +1 -0
  40. package/lib/commonjs/types/layout/MainAxisPadding.js +26 -0
  41. package/lib/commonjs/types/layout/MainAxisPadding.js.map +1 -0
  42. package/lib/commonjs/types/layout/index.js +2 -0
  43. package/lib/commonjs/types/layout/index.js.map +1 -0
  44. package/lib/commonjs/types/recycler/RecyclerCellInstance.js +6 -0
  45. package/lib/commonjs/types/recycler/RecyclerCellInstance.js.map +1 -0
  46. package/lib/commonjs/types/recycler/RecyclerItemRenderer.js +6 -0
  47. package/lib/commonjs/types/recycler/RecyclerItemRenderer.js.map +1 -0
  48. package/lib/commonjs/types/recycler/RecyclerListProps.js +6 -0
  49. package/lib/commonjs/types/recycler/RecyclerListProps.js.map +1 -0
  50. package/lib/commonjs/types/recycler/index.js +2 -0
  51. package/lib/commonjs/types/recycler/index.js.map +1 -0
  52. package/lib/commonjs/{layout/LayoutProvider.js → types/scroll/ScrollMetrics.js} +1 -1
  53. package/lib/commonjs/types/scroll/ScrollMetrics.js.map +1 -0
  54. package/lib/commonjs/types/scroll/index.js +2 -0
  55. package/lib/commonjs/types/scroll/index.js.map +1 -0
  56. package/lib/commonjs/windowing/computeVisibleItemRange.js +71 -0
  57. package/lib/commonjs/windowing/computeVisibleItemRange.js.map +1 -0
  58. package/lib/commonjs/windowing/index.js +3 -3
  59. package/lib/commonjs/windowing/index.js.map +1 -1
  60. package/lib/module/cell/CellKeyGenerator.js +16 -0
  61. package/lib/module/cell/CellKeyGenerator.js.map +1 -0
  62. package/lib/module/cell/CellRecycler.js +48 -39
  63. package/lib/module/cell/CellRecycler.js.map +1 -1
  64. package/lib/module/cell/createCell.js +17 -0
  65. package/lib/module/cell/createCell.js.map +1 -0
  66. package/lib/module/cell/index.js +7 -0
  67. package/lib/module/cell/index.js.map +1 -0
  68. package/lib/module/getVisibleIndices.js.map +1 -1
  69. package/lib/module/hooks/usePersistentCallback.js +33 -0
  70. package/lib/module/hooks/usePersistentCallback.js.map +1 -0
  71. package/lib/module/index.js +1 -1
  72. package/lib/module/index.js.map +1 -1
  73. package/lib/module/layout/MutableLinearLayout.js +78 -38
  74. package/lib/module/layout/MutableLinearLayout.js.map +1 -1
  75. package/lib/module/layout/constants/layoutDefaults.js +15 -0
  76. package/lib/module/layout/constants/layoutDefaults.js.map +1 -0
  77. package/lib/module/layout/index.js +0 -3
  78. package/lib/module/layout/index.js.map +1 -1
  79. package/lib/module/recycler/CellPool.js +41 -0
  80. package/lib/module/recycler/CellPool.js.map +1 -0
  81. package/lib/module/recycler/RecyclerList.js +221 -0
  82. package/lib/module/recycler/RecyclerList.js.map +1 -0
  83. package/lib/module/types/Axis.js +2 -0
  84. package/lib/module/types/Axis.js.map +1 -0
  85. package/lib/module/types/CellKey.js +2 -0
  86. package/lib/module/types/CellKey.js.map +1 -0
  87. package/lib/module/types/CellType.js +2 -0
  88. package/lib/module/types/CellType.js.map +1 -0
  89. package/lib/module/types/VisibleRange.js +2 -0
  90. package/lib/module/types/VisibleRange.js.map +1 -0
  91. package/lib/module/types/VisibleRangeInput.js +4 -0
  92. package/lib/module/types/VisibleRangeInput.js.map +1 -0
  93. package/lib/module/types/index.js +4 -0
  94. package/lib/module/types/index.js.map +1 -0
  95. package/lib/module/types/layout/LayoutRect.js +2 -0
  96. package/lib/module/types/layout/LayoutRect.js.map +1 -0
  97. package/lib/module/types/layout/LinearLayoutInput.js +4 -0
  98. package/lib/module/types/layout/LinearLayoutInput.js.map +1 -0
  99. package/lib/module/types/layout/MainAxisPadding.js +22 -0
  100. package/lib/module/types/layout/MainAxisPadding.js.map +1 -0
  101. package/lib/module/types/layout/index.js +2 -0
  102. package/lib/module/types/layout/index.js.map +1 -0
  103. package/lib/module/types/recycler/RecyclerCellInstance.js +4 -0
  104. package/lib/module/types/recycler/RecyclerCellInstance.js.map +1 -0
  105. package/lib/module/types/recycler/RecyclerItemRenderer.js +4 -0
  106. package/lib/module/types/recycler/RecyclerItemRenderer.js.map +1 -0
  107. package/lib/module/types/recycler/RecyclerListProps.js +4 -0
  108. package/lib/module/types/recycler/RecyclerListProps.js.map +1 -0
  109. package/lib/module/types/recycler/index.js +2 -0
  110. package/lib/module/types/recycler/index.js.map +1 -0
  111. package/lib/module/types/scroll/ScrollMetrics.js +4 -0
  112. package/lib/module/types/scroll/ScrollMetrics.js.map +1 -0
  113. package/lib/module/types/scroll/index.js +2 -0
  114. package/lib/module/types/scroll/index.js.map +1 -0
  115. package/lib/module/windowing/computeVisibleItemRange.js +67 -0
  116. package/lib/module/windowing/computeVisibleItemRange.js.map +1 -0
  117. package/lib/module/windowing/index.js +1 -1
  118. package/lib/module/windowing/index.js.map +1 -1
  119. package/lib/typescript/src/cell/Cell.d.ts +13 -4
  120. package/lib/typescript/src/cell/Cell.d.ts.map +1 -1
  121. package/lib/typescript/src/cell/CellKeyGenerator.d.ts +11 -0
  122. package/lib/typescript/src/cell/CellKeyGenerator.d.ts.map +1 -0
  123. package/lib/typescript/src/cell/CellRecycler.d.ts +19 -11
  124. package/lib/typescript/src/cell/CellRecycler.d.ts.map +1 -1
  125. package/lib/typescript/src/cell/createCell.d.ts +7 -0
  126. package/lib/typescript/src/cell/createCell.d.ts.map +1 -0
  127. package/lib/typescript/src/cell/index.d.ts +4 -0
  128. package/lib/typescript/src/cell/index.d.ts.map +1 -0
  129. package/lib/typescript/src/getVisibleIndices.d.ts +2 -2
  130. package/lib/typescript/src/getVisibleIndices.d.ts.map +1 -1
  131. package/lib/typescript/src/hooks/usePersistentCallback.d.ts +16 -0
  132. package/lib/typescript/src/hooks/usePersistentCallback.d.ts.map +1 -0
  133. package/lib/typescript/src/index.d.ts +1 -2
  134. package/lib/typescript/src/index.d.ts.map +1 -1
  135. package/lib/typescript/src/layout/MutableLinearLayout.d.ts +45 -13
  136. package/lib/typescript/src/layout/MutableLinearLayout.d.ts.map +1 -1
  137. package/lib/typescript/src/layout/constants/layoutDefaults.d.ts +13 -0
  138. package/lib/typescript/src/layout/constants/layoutDefaults.d.ts.map +1 -0
  139. package/lib/typescript/src/layout/index.d.ts +1 -4
  140. package/lib/typescript/src/layout/index.d.ts.map +1 -1
  141. package/lib/typescript/src/native/NitroList.types.d.ts +2 -2
  142. package/lib/typescript/src/native/NitroList.types.d.ts.map +1 -1
  143. package/lib/typescript/src/recycler/CellPool.d.ts +14 -0
  144. package/lib/typescript/src/recycler/CellPool.d.ts.map +1 -0
  145. package/lib/typescript/src/recycler/RecyclerList.d.ts +4 -0
  146. package/lib/typescript/src/recycler/RecyclerList.d.ts.map +1 -0
  147. package/lib/typescript/src/specs/nitro-layout-engine.nitro.d.ts +2 -2
  148. package/lib/typescript/src/specs/nitro-layout-engine.nitro.d.ts.map +1 -1
  149. package/lib/typescript/src/types/Axis.d.ts +11 -0
  150. package/lib/typescript/src/types/Axis.d.ts.map +1 -0
  151. package/lib/typescript/src/types/CellKey.d.ts +10 -0
  152. package/lib/typescript/src/types/CellKey.d.ts.map +1 -0
  153. package/lib/typescript/src/types/CellType.d.ts +11 -0
  154. package/lib/typescript/src/types/CellType.d.ts.map +1 -0
  155. package/lib/typescript/src/types/VisibleRange.d.ts +10 -0
  156. package/lib/typescript/src/types/VisibleRange.d.ts.map +1 -0
  157. package/lib/typescript/src/types/VisibleRangeInput.d.ts +35 -0
  158. package/lib/typescript/src/types/VisibleRangeInput.d.ts.map +1 -0
  159. package/lib/typescript/src/types/index.d.ts +8 -0
  160. package/lib/typescript/src/types/index.d.ts.map +1 -0
  161. package/lib/typescript/src/types/layout/LayoutRect.d.ts +15 -0
  162. package/lib/typescript/src/types/layout/LayoutRect.d.ts.map +1 -0
  163. package/lib/typescript/src/types/layout/LinearLayoutInput.d.ts +10 -0
  164. package/lib/typescript/src/types/layout/LinearLayoutInput.d.ts.map +1 -0
  165. package/lib/typescript/src/types/layout/MainAxisPadding.d.ts +20 -0
  166. package/lib/typescript/src/types/layout/MainAxisPadding.d.ts.map +1 -0
  167. package/lib/typescript/src/types/layout/index.d.ts +4 -0
  168. package/lib/typescript/src/types/layout/index.d.ts.map +1 -0
  169. package/lib/typescript/src/types/recycler/RecyclerCellInstance.d.ts +37 -0
  170. package/lib/typescript/src/types/recycler/RecyclerCellInstance.d.ts.map +1 -0
  171. package/lib/typescript/src/types/recycler/RecyclerItemRenderer.d.ts +8 -0
  172. package/lib/typescript/src/types/recycler/RecyclerItemRenderer.d.ts.map +1 -0
  173. package/lib/typescript/src/types/recycler/RecyclerListProps.d.ts +66 -0
  174. package/lib/typescript/src/types/recycler/RecyclerListProps.d.ts.map +1 -0
  175. package/lib/typescript/src/types/recycler/index.d.ts +4 -0
  176. package/lib/typescript/src/types/recycler/index.d.ts.map +1 -0
  177. package/lib/typescript/src/types/scroll/ScrollMetrics.d.ts +15 -0
  178. package/lib/typescript/src/types/scroll/ScrollMetrics.d.ts.map +1 -0
  179. package/lib/typescript/src/types/scroll/index.d.ts +2 -0
  180. package/lib/typescript/src/types/scroll/index.d.ts.map +1 -0
  181. package/lib/typescript/src/windowing/computeVisibleItemRange.d.ts +15 -0
  182. package/lib/typescript/src/windowing/computeVisibleItemRange.d.ts.map +1 -0
  183. package/lib/typescript/src/windowing/index.d.ts +1 -1
  184. package/lib/typescript/src/windowing/index.d.ts.map +1 -1
  185. package/nitrogen/generated/android/c++/JHybridNitroLayoutEngineSpec.cpp +7 -7
  186. package/nitrogen/generated/android/c++/JHybridNitroLayoutEngineSpec.hpp +1 -1
  187. package/nitrogen/generated/android/c++/{JLayoutRectangle.hpp → JLayoutRect.hpp} +10 -10
  188. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/HybridNitroLayoutEngineSpec.kt +1 -1
  189. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrolist/{LayoutRectangle.kt → LayoutRect.kt} +5 -5
  190. package/nitrogen/generated/ios/NitroList-Swift-Cxx-Bridge.hpp +14 -14
  191. package/nitrogen/generated/ios/NitroList-Swift-Cxx-Umbrella.hpp +3 -3
  192. package/nitrogen/generated/ios/c++/HybridNitroLayoutEngineSpecSwift.hpp +4 -4
  193. package/nitrogen/generated/ios/swift/HybridNitroLayoutEngineSpec.swift +1 -1
  194. package/nitrogen/generated/ios/swift/HybridNitroLayoutEngineSpec_cxx.swift +5 -5
  195. package/nitrogen/generated/ios/swift/{LayoutRectangle.swift → LayoutRect.swift} +5 -5
  196. package/nitrogen/generated/shared/c++/HybridNitroLayoutEngineSpec.hpp +4 -4
  197. package/nitrogen/generated/shared/c++/{LayoutRectangle.hpp → LayoutRect.hpp} +11 -11
  198. package/package.json +1 -1
  199. package/src/cell/Cell.ts +13 -4
  200. package/src/cell/CellKeyGenerator.ts +17 -0
  201. package/src/cell/CellRecycler.ts +53 -43
  202. package/src/cell/createCell.ts +15 -0
  203. package/src/cell/index.ts +5 -0
  204. package/src/getVisibleIndices.ts +4 -2
  205. package/src/hooks/usePersistentCallback.ts +37 -0
  206. package/src/index.ts +1 -2
  207. package/src/layout/MutableLinearLayout.ts +91 -58
  208. package/src/layout/constants/layoutDefaults.ts +12 -0
  209. package/src/layout/index.ts +1 -4
  210. package/src/native/NitroList.types.ts +3 -2
  211. package/src/recycler/CellPool.ts +47 -0
  212. package/src/recycler/RecyclerList.tsx +304 -0
  213. package/src/specs/nitro-layout-engine.nitro.ts +2 -2
  214. package/src/types/Axis.ts +10 -0
  215. package/src/types/CellKey.ts +9 -0
  216. package/src/types/CellType.ts +10 -0
  217. package/src/types/VisibleRange.ts +9 -0
  218. package/src/types/VisibleRangeInput.ts +39 -0
  219. package/src/types/index.ts +15 -0
  220. package/src/types/layout/LayoutRect.ts +14 -0
  221. package/src/types/layout/LinearLayoutInput.ts +12 -0
  222. package/src/types/layout/MainAxisPadding.ts +23 -0
  223. package/src/types/layout/index.ts +3 -0
  224. package/src/types/recycler/RecyclerCellInstance.ts +40 -0
  225. package/src/types/recycler/RecyclerItemRenderer.ts +8 -0
  226. package/src/types/recycler/RecyclerListProps.ts +74 -0
  227. package/src/types/recycler/index.ts +3 -0
  228. package/src/types/scroll/ScrollMetrics.ts +18 -0
  229. package/src/types/scroll/index.ts +1 -0
  230. package/src/windowing/computeVisibleItemRange.ts +78 -0
  231. package/src/windowing/index.ts +1 -1
  232. package/lib/commonjs/RecyclerList.internal.js +0 -25
  233. package/lib/commonjs/RecyclerList.internal.js.map +0 -1
  234. package/lib/commonjs/RecyclerList.js +0 -171
  235. package/lib/commonjs/RecyclerList.js.map +0 -1
  236. package/lib/commonjs/RecyclerList.types.js.map +0 -1
  237. package/lib/commonjs/cell/StableKey.js +0 -10
  238. package/lib/commonjs/cell/StableKey.js.map +0 -1
  239. package/lib/commonjs/hooks/useCellRenderer.js +0 -62
  240. package/lib/commonjs/hooks/useCellRenderer.js.map +0 -1
  241. package/lib/commonjs/hooks/useStableCallback.js +0 -13
  242. package/lib/commonjs/hooks/useStableCallback.js.map +0 -1
  243. package/lib/commonjs/layout/EstimatedLayoutProvider.js +0 -30
  244. package/lib/commonjs/layout/EstimatedLayoutProvider.js.map +0 -1
  245. package/lib/commonjs/layout/LayoutEngine.js +0 -21
  246. package/lib/commonjs/layout/LayoutEngine.js.map +0 -1
  247. package/lib/commonjs/layout/LayoutRectangle.js +0 -2
  248. package/lib/commonjs/viewability/ViewabilityHelper.js +0 -121
  249. package/lib/commonjs/viewability/ViewabilityHelper.js.map +0 -1
  250. package/lib/commonjs/windowing/findVisibleIndexRange.js +0 -48
  251. package/lib/commonjs/windowing/findVisibleIndexRange.js.map +0 -1
  252. package/lib/module/RecyclerList.internal.js +0 -22
  253. package/lib/module/RecyclerList.internal.js.map +0 -1
  254. package/lib/module/RecyclerList.js +0 -166
  255. package/lib/module/RecyclerList.js.map +0 -1
  256. package/lib/module/RecyclerList.types.js +0 -4
  257. package/lib/module/RecyclerList.types.js.map +0 -1
  258. package/lib/module/cell/StableKey.js +0 -6
  259. package/lib/module/cell/StableKey.js.map +0 -1
  260. package/lib/module/hooks/useCellRenderer.js +0 -58
  261. package/lib/module/hooks/useCellRenderer.js.map +0 -1
  262. package/lib/module/hooks/useStableCallback.js +0 -9
  263. package/lib/module/hooks/useStableCallback.js.map +0 -1
  264. package/lib/module/layout/EstimatedLayoutProvider.js +0 -25
  265. package/lib/module/layout/EstimatedLayoutProvider.js.map +0 -1
  266. package/lib/module/layout/LayoutEngine.js +0 -17
  267. package/lib/module/layout/LayoutEngine.js.map +0 -1
  268. package/lib/module/layout/LayoutProvider.js +0 -4
  269. package/lib/module/layout/LayoutRectangle.js +0 -2
  270. package/lib/module/viewability/ViewabilityHelper.js +0 -116
  271. package/lib/module/viewability/ViewabilityHelper.js.map +0 -1
  272. package/lib/module/windowing/findVisibleIndexRange.js +0 -44
  273. package/lib/module/windowing/findVisibleIndexRange.js.map +0 -1
  274. package/lib/typescript/src/RecyclerList.d.ts +0 -26
  275. package/lib/typescript/src/RecyclerList.d.ts.map +0 -1
  276. package/lib/typescript/src/RecyclerList.internal.d.ts +0 -9
  277. package/lib/typescript/src/RecyclerList.internal.d.ts.map +0 -1
  278. package/lib/typescript/src/RecyclerList.types.d.ts +0 -18
  279. package/lib/typescript/src/RecyclerList.types.d.ts.map +0 -1
  280. package/lib/typescript/src/__tests__/windowing/findVisibleIndexRange.test.d.ts +0 -2
  281. package/lib/typescript/src/__tests__/windowing/findVisibleIndexRange.test.d.ts.map +0 -1
  282. package/lib/typescript/src/cell/StableKey.d.ts +0 -2
  283. package/lib/typescript/src/cell/StableKey.d.ts.map +0 -1
  284. package/lib/typescript/src/hooks/useCellRenderer.d.ts +0 -19
  285. package/lib/typescript/src/hooks/useCellRenderer.d.ts.map +0 -1
  286. package/lib/typescript/src/hooks/useStableCallback.d.ts +0 -2
  287. package/lib/typescript/src/hooks/useStableCallback.d.ts.map +0 -1
  288. package/lib/typescript/src/layout/EstimatedLayoutProvider.d.ts +0 -15
  289. package/lib/typescript/src/layout/EstimatedLayoutProvider.d.ts.map +0 -1
  290. package/lib/typescript/src/layout/LayoutEngine.d.ts +0 -10
  291. package/lib/typescript/src/layout/LayoutEngine.d.ts.map +0 -1
  292. package/lib/typescript/src/layout/LayoutProvider.d.ts +0 -16
  293. package/lib/typescript/src/layout/LayoutProvider.d.ts.map +0 -1
  294. package/lib/typescript/src/layout/LayoutRectangle.d.ts +0 -11
  295. package/lib/typescript/src/layout/LayoutRectangle.d.ts.map +0 -1
  296. package/lib/typescript/src/viewability/ViewabilityHelper.d.ts +0 -50
  297. package/lib/typescript/src/viewability/ViewabilityHelper.d.ts.map +0 -1
  298. package/lib/typescript/src/windowing/findVisibleIndexRange.d.ts +0 -11
  299. package/lib/typescript/src/windowing/findVisibleIndexRange.d.ts.map +0 -1
  300. package/src/RecyclerList.internal.ts +0 -38
  301. package/src/RecyclerList.tsx +0 -252
  302. package/src/RecyclerList.types.ts +0 -24
  303. package/src/__tests__/windowing/findVisibleIndexRange.test.ts +0 -55
  304. package/src/cell/StableKey.ts +0 -6
  305. package/src/hooks/useCellRenderer.ts +0 -86
  306. package/src/hooks/useStableCallback.ts +0 -13
  307. package/src/layout/EstimatedLayoutProvider.ts +0 -35
  308. package/src/layout/LayoutEngine.ts +0 -21
  309. package/src/layout/LayoutProvider.ts +0 -17
  310. package/src/layout/LayoutRectangle.ts +0 -10
  311. package/src/viewability/ViewabilityHelper.ts +0 -130
  312. package/src/windowing/findVisibleIndexRange.ts +0 -60
@@ -1,3 +1,2 @@
1
- export { RecyclerList } from './RecyclerList';
2
- export type { RecyclerListProps } from './RecyclerList.types';
1
+ export { RecyclerList } from './recycler/RecyclerList';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,22 +1,54 @@
1
- import type { LayoutRectangle } from './LayoutRectangle';
1
+ import type { Axis } from '../types/Axis';
2
+ import type { LinearLayoutInput } from '../types/layout';
3
+ import type { LayoutRect } from '../types/layout/LayoutRect';
2
4
  /**
3
- * Mutable linear layout store.
4
- * FlashList-style incremental relayout.
5
+ * Mutable, deterministic linear layout engine.
6
+ *
7
+ * Responsibilities:
8
+ * - Compute absolute item geometry
9
+ * - Own layout truth (no React, no scroll state)
10
+ * - Guarantee monotonic ordering along the main axis
11
+ *
12
+ * Cross-platform equivalents:
13
+ * - Flutter: RenderSliver / SliverList
14
+ * - Android: LinearLayoutManager
15
+ * - iOS: UICollectionViewFlowLayout (linear)
5
16
  */
6
17
  export declare class MutableLinearLayout {
7
- private readonly layouts;
8
- private totalHeight;
9
- constructor(initialHeights: readonly number[], width: number);
18
+ private readonly isVertical;
19
+ /** Absolute item layouts in index order */
20
+ private layouts;
21
+ /** Total scrollable size along main axis */
22
+ private contentSize;
23
+ constructor(axis: Axis);
10
24
  /**
11
- * Read-only snapshot for consumers.
12
- * Returned type is immutable.
25
+ * Computes layout synchronously from input.
26
+ *
27
+ * This method is intentionally parameter-object based
28
+ * to allow future extension without breaking API.
29
+ *
30
+ * Invariants:
31
+ * - Layouts are monotonic along main axis
32
+ * - No gaps except explicit spacing
33
+ * - Deterministic for identical inputs
13
34
  */
14
- getLayouts(): readonly LayoutRectangle[];
15
- getContentHeight(): number;
35
+ compute(input: LinearLayoutInput): void;
16
36
  /**
17
- * Update height of one item and shift following items.
18
- * Returns true if layout changed.
37
+ * Returns computed item layouts.
38
+ *
39
+ * Order is guaranteed monotonic along the main axis,
40
+ * which is required for binary-search-based windowing.
19
41
  */
20
- updateItemHeight(index: number, newHeight: number): boolean;
42
+ getLayouts(): readonly LayoutRect[];
43
+ /**
44
+ * Returns total scrollable size along the main axis,
45
+ * including padding and inter-item spacing.
46
+ */
47
+ getContentSize(): number;
48
+ /**
49
+ * Clears internal layout state.
50
+ * Call on severe invalidation or teardown.
51
+ */
52
+ reset(): void;
21
53
  }
22
54
  //# sourceMappingURL=MutableLinearLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MutableLinearLayout.d.ts","sourceRoot":"","sources":["../../../../src/layout/MutableLinearLayout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAaxD;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,WAAW,CAAQ;gBAGzB,cAAc,EAAE,SAAS,MAAM,EAAE,EACjC,KAAK,EAAE,MAAM;IAkBf;;;OAGG;IACH,UAAU,IAAI,SAAS,eAAe,EAAE;IAIxC,gBAAgB,IAAI,MAAM;IAI1B;;;OAGG;IACH,gBAAgB,CACd,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,OAAO;CAkBX"}
1
+ {"version":3,"file":"MutableLinearLayout.d.ts","sourceRoot":"","sources":["../../../../src/layout/MutableLinearLayout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAI5D;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IAEpC,2CAA2C;IAC3C,OAAO,CAAC,OAAO,CAAmB;IAElC,4CAA4C;IAC5C,OAAO,CAAC,WAAW,CAAI;gBAEX,IAAI,EAAE,IAAI;IAItB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IA0CvC;;;;;OAKG;IACH,UAAU,IAAI,SAAS,UAAU,EAAE;IAInC;;;OAGG;IACH,cAAc,IAAI,MAAM;IAIxB;;;OAGG;IACH,KAAK,IAAI,IAAI;CAId"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Default spacing between items along the main axis.
3
+ *
4
+ * This value is used by layout engines when no explicit
5
+ * itemSpacing is provided.
6
+ *
7
+ * Mirrors:
8
+ * - Android RecyclerView ItemDecoration (typical 8–16dp)
9
+ * - iOS UICollectionViewFlowLayout minimumLineSpacing
10
+ * - Flutter SliverList spacing conventions
11
+ */
12
+ export declare const DEFAULT_ITEM_SPACING = 12;
13
+ //# sourceMappingURL=layoutDefaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layoutDefaults.d.ts","sourceRoot":"","sources":["../../../../../src/layout/constants/layoutDefaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAA"}
@@ -1,5 +1,2 @@
1
- export type { LayoutRectangle } from './LayoutRectangle';
2
- export type { LayoutProvider } from './LayoutProvider';
3
- export { EstimatedLayoutProvider } from './EstimatedLayoutProvider';
4
- export { computeLayouts } from './LayoutEngine';
1
+ export type { MutableLinearLayout } from './MutableLinearLayout';
5
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA"}
@@ -1,9 +1,9 @@
1
- import type { LayoutRectangle } from '../layout/LayoutRectangle';
1
+ import type { LayoutRect } from "../types/layout";
2
2
  /**
3
3
  * JS runtime interface backed by Nitro (JSI).
4
4
  * Must match native HybridNitroList exactly.
5
5
  */
6
6
  export interface NitroList {
7
- computeLayout(containerWidth: number, itemHeights: readonly number[]): readonly LayoutRectangle[];
7
+ computeLayout(containerWidth: number, itemHeights: readonly number[]): readonly LayoutRect[];
8
8
  }
9
9
  //# sourceMappingURL=NitroList.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NitroList.types.d.ts","sourceRoot":"","sources":["../../../../src/native/NitroList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,CACX,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,SAAS,eAAe,EAAE,CAAA;CAC9B"}
1
+ {"version":3,"file":"NitroList.types.d.ts","sourceRoot":"","sources":["../../../../src/native/NitroList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,CACX,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,SAAS,UAAU,EAAE,CAAA;CACzB"}
@@ -0,0 +1,14 @@
1
+ import type { CellType } from '../types/CellType';
2
+ import type { RecyclerCellInstance } from '../types/recycler';
3
+ export declare class CellPool {
4
+ private readonly pools;
5
+ private readonly maxPerType;
6
+ /** ✅ NEW: check if a type is registered */
7
+ hasType(type: CellType): boolean;
8
+ registerType(type: CellType, maxCount: number): void;
9
+ acquire(type: CellType): RecyclerCellInstance | null;
10
+ release(cell: RecyclerCellInstance): void;
11
+ clear(): void;
12
+ getPoolSize(type: CellType): number;
13
+ }
14
+ //# sourceMappingURL=CellPool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellPool.d.ts","sourceRoot":"","sources":["../../../../src/recycler/CellPool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAE7D,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA8C;IACpE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8B;IAEzD,2CAA2C;IAC3C,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO;IAIhC,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMpD,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,oBAAoB,GAAG,IAAI;IAMpD,OAAO,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI;IAazC,KAAK,IAAI,IAAI;IAMb,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM;CAGpC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { RecyclerListProps } from '../types/recycler';
3
+ export declare function RecyclerList<T>(props: RecyclerListProps<T>): React.ReactElement;
4
+ //# sourceMappingURL=RecyclerList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecyclerList.d.ts","sourceRoot":"","sources":["../../../../src/recycler/RecyclerList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAU1D,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,mBAAmB,CAAA;AAmB1B,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC1B,KAAK,CAAC,YAAY,CAmQpB"}
@@ -1,5 +1,5 @@
1
1
  import type { HybridObject } from 'react-native-nitro-modules';
2
- export interface LayoutRectangle {
2
+ export interface LayoutRect {
3
3
  readonly x: number;
4
4
  readonly y: number;
5
5
  readonly width: number;
@@ -9,6 +9,6 @@ export interface NitroLayoutEngine extends HybridObject<{
9
9
  ios: 'swift';
10
10
  android: 'kotlin';
11
11
  }> {
12
- computeLayout(containerWidth: number, itemHeights: readonly number[]): readonly LayoutRectangle[];
12
+ computeLayout(containerWidth: number, itemHeights: readonly number[]): readonly LayoutRect[];
13
13
  }
14
14
  //# sourceMappingURL=nitro-layout-engine.nitro.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nitro-layout-engine.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/nitro-layout-engine.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,iBACf,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IAEzD,aAAa,CACX,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,SAAS,eAAe,EAAE,CAAA;CAC9B"}
1
+ {"version":3,"file":"nitro-layout-engine.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/nitro-layout-engine.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,iBACf,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IAEzD,aAAa,CACX,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,SAAS,UAAU,EAAE,CAAA;CACzB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Axis along which scrolling and layout occur.
3
+ *
4
+ * Matches Flutter's Axis:
5
+ * - vertical → Y axis
6
+ * - horizontal → X axis
7
+ *
8
+ * This is NOT gesture direction.
9
+ */
10
+ export type Axis = 'vertical' | 'horizontal';
11
+ //# sourceMappingURL=Axis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Axis.d.ts","sourceRoot":"","sources":["../../../../src/types/Axis.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG,YAAY,CAAA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Stable identifier for a cell.
3
+ *
4
+ * Cross-platform equivalent:
5
+ * - Flutter: Key
6
+ * - Android: stableId
7
+ * - iOS: reuseIdentifier (logical)
8
+ */
9
+ export type CellKey = string | number;
10
+ //# sourceMappingURL=CellKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellKey.d.ts","sourceRoot":"","sources":["../../../../src/types/CellKey.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Logical cell type.
3
+ *
4
+ * Used to group compatible cells for recycling.
5
+ *
6
+ * Cross-platform equivalent:
7
+ * - Android: viewType
8
+ * - iOS: reuseIdentifier
9
+ */
10
+ export type CellType = string | number;
11
+ //# sourceMappingURL=CellType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellType.d.ts","sourceRoot":"","sources":["../../../../src/types/CellType.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Visible item index range.
3
+ *
4
+ * Indices are inclusive.
5
+ */
6
+ export interface VisibleRange {
7
+ readonly startIndex: number;
8
+ readonly endIndex: number;
9
+ }
10
+ //# sourceMappingURL=VisibleRange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VisibleRange.d.ts","sourceRoot":"","sources":["../../../../src/types/VisibleRange.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B"}
@@ -0,0 +1,35 @@
1
+ import type { LayoutRect } from './layout/LayoutRect';
2
+ /**
3
+ * Input required to compute the visible item range.
4
+ *
5
+ * Pure contract:
6
+ * - No logic
7
+ * - No platform assumptions
8
+ * - Safe to share with native / tests
9
+ */
10
+ export interface VisibleRangeInput {
11
+ /**
12
+ * Ordered, monotonic layouts along the main axis.
13
+ * Required for binary search correctness.
14
+ */
15
+ readonly layouts: readonly LayoutRect[];
16
+ /**
17
+ * Scroll offset along the main axis.
18
+ */
19
+ readonly offset: number;
20
+ /**
21
+ * Viewport size along the main axis.
22
+ */
23
+ readonly viewportSize: number;
24
+ /**
25
+ * Extra buffer before and after the viewport.
26
+ */
27
+ readonly buffer: number;
28
+ /**
29
+ * Axis selector.
30
+ * true → vertical
31
+ * false → horizontal
32
+ */
33
+ readonly isVertical: boolean;
34
+ }
35
+ //# sourceMappingURL=VisibleRangeInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VisibleRangeInput.d.ts","sourceRoot":"","sources":["../../../../src/types/VisibleRangeInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IAEvC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IAEvB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAE7B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;CAC7B"}
@@ -0,0 +1,8 @@
1
+ export type { Axis } from './Axis';
2
+ export type { MainAxisPadding, } from './layout/MainAxisPadding';
3
+ export { ZERO_MAIN_AXIS_PADDING, } from './layout/MainAxisPadding';
4
+ export type { LayoutRect } from './layout/LayoutRect';
5
+ export type { VisibleRange } from './VisibleRange';
6
+ export type { CellKey } from './CellKey';
7
+ export type { CellType } from './CellType';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAElC,YAAY,EACV,eAAe,GAChB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,sBAAsB,GACvB,MAAM,0BAA0B,CAAA;AAEjC,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACxC,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Absolute layout rectangle.
3
+ *
4
+ * Cross-platform equivalent of:
5
+ * - Flutter: Rect
6
+ * - Android: Rect
7
+ * - iOS: CGRect
8
+ */
9
+ export interface LayoutRect {
10
+ readonly x: number;
11
+ readonly y: number;
12
+ readonly width: number;
13
+ readonly height: number;
14
+ }
15
+ //# sourceMappingURL=LayoutRect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutRect.d.ts","sourceRoot":"","sources":["../../../../../src/types/layout/LayoutRect.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB"}
@@ -0,0 +1,10 @@
1
+ import type { MainAxisPadding } from './MainAxisPadding';
2
+ export interface LinearLayoutInput {
3
+ readonly crossAxisSize: number;
4
+ readonly itemMainAxisSizes: readonly number[];
5
+ /** Padding before/after content (main axis) */
6
+ readonly padding: MainAxisPadding;
7
+ /** Space BETWEEN items (main axis) */
8
+ readonly itemSpacing?: number;
9
+ }
10
+ //# sourceMappingURL=LinearLayoutInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinearLayoutInput.d.ts","sourceRoot":"","sources":["../../../../../src/types/layout/LinearLayoutInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAA;IAE7C,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IAEjC,sCAAsC;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Padding applied along the main scroll axis.
3
+ *
4
+ * This is a layout-level concept (not visual styling).
5
+ *
6
+ * - vertical → top / bottom
7
+ * - horizontal → left / right
8
+ *
9
+ * Uses start/end to remain RTL-safe and platform-neutral.
10
+ */
11
+ export interface MainAxisPadding {
12
+ readonly start: number;
13
+ readonly end: number;
14
+ }
15
+ /**
16
+ * Shared zero-padding constant.
17
+ * Safe to reuse across layouts.
18
+ */
19
+ export declare const ZERO_MAIN_AXIS_PADDING: MainAxisPadding;
20
+ //# sourceMappingURL=MainAxisPadding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MainAxisPadding.d.ts","sourceRoot":"","sources":["../../../../../src/types/layout/MainAxisPadding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAGpC,CAAA"}
@@ -0,0 +1,4 @@
1
+ export type { LayoutRect } from './LayoutRect';
2
+ export type { LinearLayoutInput } from './LinearLayoutInput';
3
+ export type { MainAxisPadding } from './MainAxisPadding';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/layout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,37 @@
1
+ import type { CellKey } from "../CellKey";
2
+ import type { CellType } from "../CellType";
3
+ /**
4
+ * Physical reusable cell instance.
5
+ *
6
+ * Represents a single mounted view that can be rebound
7
+ * to different data items as scrolling occurs.
8
+ *
9
+ * Cross-platform equivalent:
10
+ * - Flutter: Element / RenderObject
11
+ * - Android: ViewHolder
12
+ * - iOS: UICollectionViewCell
13
+ */
14
+ export interface RecyclerCellInstance {
15
+ /**
16
+ * Stable physical identity.
17
+ *
18
+ * Used as React key.
19
+ * MUST remain constant for the lifetime of the instance.
20
+ */
21
+ readonly key: CellKey;
22
+ /**
23
+ * Logical data index currently bound to this instance.
24
+ *
25
+ * This value changes as the cell is recycled.
26
+ * - -1 may be used to indicate "unbound".
27
+ */
28
+ index: number;
29
+ /**
30
+ * Logical compatibility type.
31
+ *
32
+ * Determines which instances can be reused together.
33
+ * Instances with different types MUST NOT be reused.
34
+ */
35
+ readonly type: CellType;
36
+ }
37
+ //# sourceMappingURL=RecyclerCellInstance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecyclerCellInstance.d.ts","sourceRoot":"","sources":["../../../../../src/types/recycler/RecyclerCellInstance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG3C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IAErB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CACxB"}
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { RecyclerCellInstance } from './RecyclerCellInstance';
3
+ export type RecyclerItemRenderer<T> = (params: {
4
+ item: T;
5
+ index: number;
6
+ cell: RecyclerCellInstance;
7
+ }) => ReactNode;
8
+ //# sourceMappingURL=RecyclerItemRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecyclerItemRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/types/recycler/RecyclerItemRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAElE,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE;IAC7C,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,oBAAoB,CAAA;CAC3B,KAAK,SAAS,CAAA"}
@@ -0,0 +1,66 @@
1
+ import type { Axis } from '../Axis';
2
+ import type { CellType } from '../CellType';
3
+ import type { MainAxisPadding } from '../layout';
4
+ import type { RecyclerItemRenderer } from './RecyclerItemRenderer';
5
+ /**
6
+ * Public props for RecyclerList.
7
+ *
8
+ * Generic, data-driven, layout-deterministic API.
9
+ * This surface is intentionally minimal and stable.
10
+ */
11
+ export interface RecyclerListProps<T> {
12
+ /**
13
+ * Scroll direction.
14
+ * Defaults to 'vertical'.
15
+ */
16
+ readonly scrollDirection?: Axis;
17
+ /**
18
+ * Cross-axis size.
19
+ * - vertical → width
20
+ * - horizontal → height
21
+ *
22
+ * Required for deterministic layout.
23
+ */
24
+ readonly containerCrossAxisSize: number;
25
+ /**
26
+ * Data source.
27
+ * Length is the single source of truth for item count.
28
+ */
29
+ readonly data: readonly T[];
30
+ /**
31
+ * Item sizes along the main axis.
32
+ * Must match data length.
33
+ *
34
+ * - vertical → heights
35
+ * - horizontal → widths
36
+ */
37
+ readonly itemMainAxisSizes: readonly number[];
38
+ /**
39
+ * Padding before and after content along the main axis.
40
+ *
41
+ * Defaults are applied internally by the layout engine.
42
+ */
43
+ readonly padding?: MainAxisPadding;
44
+ /**
45
+ * Space BETWEEN items along the main axis.
46
+ *
47
+ * Defaults are applied internally by the layout engine.
48
+ */
49
+ readonly itemSpacing?: number;
50
+ /**
51
+ * Extra render buffer as a ratio of viewport size.
52
+ * Used for overscan / pre-rendering.
53
+ */
54
+ readonly bufferRatio?: number;
55
+ /**
56
+ * Logical cell type resolver.
57
+ * Determines recycling compatibility.
58
+ */
59
+ readonly getCellType: (item: T, index: number) => CellType;
60
+ /**
61
+ * Item renderer.
62
+ * Receives stable cell identity and data.
63
+ */
64
+ readonly renderItem: RecyclerItemRenderer<T>;
65
+ }
66
+ //# sourceMappingURL=RecyclerListProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecyclerListProps.d.ts","sourceRoot":"","sources":["../../../../../src/types/recycler/RecyclerListProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAElE;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,IAAI,CAAA;IAE/B;;;;;;OAMG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAA;IAEvC;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAA;IAE3B;;;;;;OAMG;IACH,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAA;IAE7C;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAA;IAElC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAE7B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAE7B;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,QAAQ,CAAA;IAE1D;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAA;CAC7C"}
@@ -0,0 +1,4 @@
1
+ export type { RecyclerListProps } from './RecyclerListProps';
2
+ export type { RecyclerItemRenderer } from './RecyclerItemRenderer';
3
+ export type { RecyclerCellInstance } from './RecyclerCellInstance';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/recycler/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAClE,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { Axis } from "../Axis";
2
+ /**
3
+ * Scroll state snapshot.
4
+ *
5
+ * Pure data — no platform or React coupling.
6
+ */
7
+ export interface ScrollMetrics {
8
+ /** Scroll axis */
9
+ readonly axis: Axis;
10
+ /** Offset along the main axis */
11
+ readonly offset: number;
12
+ /** Viewport size along the main axis */
13
+ readonly viewportSize: number;
14
+ }
15
+ //# sourceMappingURL=ScrollMetrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/types/scroll/ScrollMetrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAGnC;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,kBAAkB;IAClB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;IAEnB,iCAAiC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IAEvB,wCAAwC;IACxC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export type { ScrollMetrics } from './ScrollMetrics';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/scroll/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { VisibleRange } from '../types/VisibleRange';
2
+ import type { VisibleRangeInput } from '../types/VisibleRangeInput';
3
+ /**
4
+ * Computes the visible item index range using binary search.
5
+ *
6
+ * Responsibilities:
7
+ * - Determine which items intersect the visible window
8
+ * - Stay independent of rendering and recycling
9
+ *
10
+ * Performance:
11
+ * - O(log n) to locate the first visible item
12
+ * - O(k) to expand to the last visible item (k = visible count)
13
+ */
14
+ export declare function computeVisibleItemRange(input: VisibleRangeInput): VisibleRange | null;
15
+ //# sourceMappingURL=computeVisibleItemRange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeVisibleItemRange.d.ts","sourceRoot":"","sources":["../../../../src/windowing/computeVisibleItemRange.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,GACvB,YAAY,GAAG,IAAI,CA6DrB"}
@@ -1,4 +1,4 @@
1
1
  export type { ScrollMetrics } from './ScrollMetrics';
2
- export { findVisibleIndexRange } from './findVisibleIndexRange';
3
2
  export { useScrollMetrics } from './useScrollMetrics';
3
+ export { computeVisibleItemRange } from './computeVisibleItemRange';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/windowing/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/windowing/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -7,12 +7,12 @@
7
7
 
8
8
  #include "JHybridNitroLayoutEngineSpec.hpp"
9
9
 
10
- // Forward declaration of `LayoutRectangle` to properly resolve imports.
11
- namespace margelo::nitro::nitrolist { struct LayoutRectangle; }
10
+ // Forward declaration of `LayoutRect` to properly resolve imports.
11
+ namespace margelo::nitro::nitrolist { struct LayoutRect; }
12
12
 
13
- #include "LayoutRectangle.hpp"
13
+ #include "LayoutRect.hpp"
14
14
  #include <vector>
15
- #include "JLayoutRectangle.hpp"
15
+ #include "JLayoutRect.hpp"
16
16
 
17
17
  namespace margelo::nitro::nitrolist {
18
18
 
@@ -46,8 +46,8 @@ namespace margelo::nitro::nitrolist {
46
46
 
47
47
 
48
48
  // Methods
49
- std::vector<LayoutRectangle> JHybridNitroLayoutEngineSpec::computeLayout(double containerWidth, const std::vector<double>& itemHeights) {
50
- static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<JLayoutRectangle>>(double /* containerWidth */, jni::alias_ref<jni::JArrayDouble> /* itemHeights */)>("computeLayout");
49
+ std::vector<LayoutRect> JHybridNitroLayoutEngineSpec::computeLayout(double containerWidth, const std::vector<double>& itemHeights) {
50
+ static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<JLayoutRect>>(double /* containerWidth */, jni::alias_ref<jni::JArrayDouble> /* itemHeights */)>("computeLayout");
51
51
  auto __result = method(_javaPart, containerWidth, [&]() {
52
52
  size_t __size = itemHeights.size();
53
53
  jni::local_ref<jni::JArrayDouble> __array = jni::JArrayDouble::newArray(__size);
@@ -56,7 +56,7 @@ namespace margelo::nitro::nitrolist {
56
56
  }());
57
57
  return [&]() {
58
58
  size_t __size = __result->size();
59
- std::vector<LayoutRectangle> __vector;
59
+ std::vector<LayoutRect> __vector;
60
60
  __vector.reserve(__size);
61
61
  for (size_t __i = 0; __i < __size; __i++) {
62
62
  auto __element = __result->getElement(__i);
@@ -54,7 +54,7 @@ namespace margelo::nitro::nitrolist {
54
54
 
55
55
  public:
56
56
  // Methods
57
- std::vector<LayoutRectangle> computeLayout(double containerWidth, const std::vector<double>& itemHeights) override;
57
+ std::vector<LayoutRect> computeLayout(double containerWidth, const std::vector<double>& itemHeights) override;
58
58
 
59
59
  private:
60
60
  friend HybridBase;