@shopify/flash-list 2.0.0-rc.9 → 2.0.0

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 (304) hide show
  1. package/README.md +27 -97
  2. package/dist/AnimatedFlashList.js +2 -2
  3. package/dist/AnimatedFlashList.js.map +1 -1
  4. package/dist/FlashList.d.ts +1 -167
  5. package/dist/FlashList.d.ts.map +1 -1
  6. package/dist/FlashList.js +3 -595
  7. package/dist/FlashList.js.map +1 -1
  8. package/dist/FlashListProps.d.ts +7 -63
  9. package/dist/FlashListProps.d.ts.map +1 -1
  10. package/dist/FlashListProps.js.map +1 -1
  11. package/dist/__tests__/LayoutCommitObserver.test.d.ts +2 -0
  12. package/dist/__tests__/LayoutCommitObserver.test.d.ts.map +1 -0
  13. package/dist/__tests__/LayoutCommitObserver.test.js +35 -0
  14. package/dist/__tests__/LayoutCommitObserver.test.js.map +1 -0
  15. package/dist/__tests__/ViewabilityHelper.test.js +3 -4
  16. package/dist/__tests__/ViewabilityHelper.test.js.map +1 -1
  17. package/dist/benchmark/JSFPSMonitor.d.ts.map +1 -1
  18. package/dist/benchmark/JSFPSMonitor.js +2 -1
  19. package/dist/benchmark/JSFPSMonitor.js.map +1 -1
  20. package/dist/benchmark/useBenchmark.d.ts +2 -4
  21. package/dist/benchmark/useBenchmark.d.ts.map +1 -1
  22. package/dist/benchmark/useBenchmark.js +12 -49
  23. package/dist/benchmark/useBenchmark.js.map +1 -1
  24. package/dist/benchmark/useFlatListBenchmark.d.ts.map +1 -1
  25. package/dist/benchmark/useFlatListBenchmark.js +2 -1
  26. package/dist/benchmark/useFlatListBenchmark.js.map +1 -1
  27. package/dist/errors/ErrorMessages.d.ts +16 -0
  28. package/dist/errors/ErrorMessages.d.ts.map +1 -0
  29. package/dist/errors/ErrorMessages.js +19 -0
  30. package/dist/errors/ErrorMessages.js.map +1 -0
  31. package/dist/errors/WarningMessages.d.ts +4 -0
  32. package/dist/errors/WarningMessages.d.ts.map +1 -0
  33. package/dist/errors/WarningMessages.js +7 -0
  34. package/dist/errors/WarningMessages.js.map +1 -0
  35. package/dist/index.d.ts +4 -9
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +9 -29
  38. package/dist/index.js.map +1 -1
  39. package/dist/isNewArch.d.ts +2 -0
  40. package/dist/isNewArch.d.ts.map +1 -0
  41. package/dist/isNewArch.js +25 -0
  42. package/dist/isNewArch.js.map +1 -0
  43. package/dist/native/config/PlatformHelper.android.d.ts +1 -22
  44. package/dist/native/config/PlatformHelper.android.d.ts.map +1 -1
  45. package/dist/native/config/PlatformHelper.android.js +1 -16
  46. package/dist/native/config/PlatformHelper.android.js.map +1 -1
  47. package/dist/native/config/PlatformHelper.d.ts +1 -22
  48. package/dist/native/config/PlatformHelper.d.ts.map +1 -1
  49. package/dist/native/config/PlatformHelper.ios.d.ts +1 -22
  50. package/dist/native/config/PlatformHelper.ios.d.ts.map +1 -1
  51. package/dist/native/config/PlatformHelper.ios.js +1 -15
  52. package/dist/native/config/PlatformHelper.ios.js.map +1 -1
  53. package/dist/native/config/PlatformHelper.js +1 -16
  54. package/dist/native/config/PlatformHelper.js.map +1 -1
  55. package/dist/native/config/PlatformHelper.web.d.ts +1 -23
  56. package/dist/native/config/PlatformHelper.web.d.ts.map +1 -1
  57. package/dist/native/config/PlatformHelper.web.js +1 -18
  58. package/dist/native/config/PlatformHelper.web.js.map +1 -1
  59. package/dist/recyclerview/LayoutCommitObserver.d.ts +12 -0
  60. package/dist/recyclerview/LayoutCommitObserver.d.ts.map +1 -0
  61. package/dist/recyclerview/LayoutCommitObserver.js +62 -0
  62. package/dist/recyclerview/LayoutCommitObserver.js.map +1 -0
  63. package/dist/recyclerview/RecyclerView.d.ts.map +1 -1
  64. package/dist/recyclerview/RecyclerView.js +20 -9
  65. package/dist/recyclerview/RecyclerView.js.map +1 -1
  66. package/dist/recyclerview/RecyclerViewManager.d.ts +4 -1
  67. package/dist/recyclerview/RecyclerViewManager.d.ts.map +1 -1
  68. package/dist/recyclerview/RecyclerViewManager.js +43 -34
  69. package/dist/recyclerview/RecyclerViewManager.js.map +1 -1
  70. package/dist/recyclerview/RecyclerViewProps.d.ts +1 -8
  71. package/dist/recyclerview/RecyclerViewProps.d.ts.map +1 -1
  72. package/dist/recyclerview/ViewHolderCollection.d.ts +6 -2
  73. package/dist/recyclerview/ViewHolderCollection.d.ts.map +1 -1
  74. package/dist/recyclerview/ViewHolderCollection.js +3 -1
  75. package/dist/recyclerview/ViewHolderCollection.js.map +1 -1
  76. package/dist/recyclerview/hooks/useBoundDetection.d.ts.map +1 -1
  77. package/dist/recyclerview/hooks/useBoundDetection.js +38 -7
  78. package/dist/recyclerview/hooks/useBoundDetection.js.map +1 -1
  79. package/dist/recyclerview/hooks/useRecyclerViewController.d.ts.map +1 -1
  80. package/dist/recyclerview/hooks/useRecyclerViewController.js +16 -9
  81. package/dist/recyclerview/hooks/useRecyclerViewController.js.map +1 -1
  82. package/dist/recyclerview/layout-managers/LayoutManager.d.ts.map +1 -1
  83. package/dist/recyclerview/layout-managers/LayoutManager.js +2 -1
  84. package/dist/recyclerview/layout-managers/LayoutManager.js.map +1 -1
  85. package/dist/recyclerview/viewability/ViewToken.d.ts.map +1 -0
  86. package/dist/recyclerview/viewability/ViewToken.js.map +1 -0
  87. package/dist/{viewability → recyclerview/viewability}/ViewabilityHelper.d.ts +2 -2
  88. package/dist/recyclerview/viewability/ViewabilityHelper.d.ts.map +1 -0
  89. package/dist/{viewability → recyclerview/viewability}/ViewabilityHelper.js +2 -4
  90. package/dist/{viewability → recyclerview/viewability}/ViewabilityHelper.js.map +1 -1
  91. package/dist/{viewability → recyclerview/viewability}/ViewabilityManager.d.ts +3 -3
  92. package/dist/recyclerview/viewability/ViewabilityManager.d.ts.map +1 -0
  93. package/dist/{viewability → recyclerview/viewability}/ViewabilityManager.js +16 -16
  94. package/dist/recyclerview/viewability/ViewabilityManager.js.map +1 -0
  95. package/dist/tsconfig.tsbuildinfo +1 -1
  96. package/package.json +3 -14
  97. package/src/AnimatedFlashList.ts +2 -2
  98. package/src/FlashList.ts +1 -0
  99. package/src/FlashListProps.ts +8 -79
  100. package/src/__tests__/LayoutCommitObserver.test.tsx +60 -0
  101. package/src/__tests__/ViewabilityHelper.test.ts +13 -14
  102. package/src/benchmark/JSFPSMonitor.ts +3 -3
  103. package/src/benchmark/useBenchmark.ts +12 -77
  104. package/src/benchmark/useFlatListBenchmark.ts +3 -1
  105. package/src/errors/ErrorMessages.ts +26 -0
  106. package/src/errors/WarningMessages.ts +4 -0
  107. package/src/index.ts +11 -43
  108. package/src/isNewArch.ts +25 -0
  109. package/src/native/config/PlatformHelper.android.ts +1 -25
  110. package/src/native/config/PlatformHelper.ios.ts +1 -24
  111. package/src/native/config/PlatformHelper.ts +1 -25
  112. package/src/native/config/PlatformHelper.web.ts +1 -30
  113. package/src/recyclerview/LayoutCommitObserver.tsx +74 -0
  114. package/src/recyclerview/RecyclerView.tsx +25 -12
  115. package/src/recyclerview/RecyclerViewManager.ts +40 -40
  116. package/src/recyclerview/RecyclerViewProps.ts +1 -11
  117. package/src/recyclerview/ViewHolderCollection.tsx +9 -2
  118. package/src/recyclerview/hooks/useBoundDetection.ts +48 -6
  119. package/src/recyclerview/hooks/useRecyclerViewController.tsx +19 -14
  120. package/src/recyclerview/layout-managers/LayoutManager.ts +2 -1
  121. package/src/{viewability → recyclerview/viewability}/ViewabilityHelper.ts +8 -9
  122. package/src/{viewability → recyclerview/viewability}/ViewabilityManager.ts +18 -20
  123. package/RNFlashList.podspec +0 -37
  124. package/android/build.gradle +0 -89
  125. package/android/src/main/AndroidManifest.xml +0 -3
  126. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutShadow.kt +0 -105
  127. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt +0 -158
  128. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutViewManager.kt +0 -70
  129. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/BlankAreaEvent.kt +0 -29
  130. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainer.java +0 -16
  131. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerImpl.kt +0 -16
  132. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerManager.kt +0 -34
  133. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/FlashListPackage.kt +0 -19
  134. package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerDelegate.java +0 -47
  135. package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerInterface.java +0 -21
  136. package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerDelegate.java +0 -32
  137. package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerInterface.java +0 -16
  138. package/android/src/test/java/com/shopify/reactnative/flash_list/AutoLayoutShadowTest.kt +0 -147
  139. package/android/src/test/java/com/shopify/reactnative/flash_list/models/Rect.kt +0 -61
  140. package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestCollection.kt +0 -6
  141. package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestDataModel.kt +0 -8
  142. package/android/src/test/resources/LayoutTestData.json +0 -788
  143. package/dist/GridLayoutProviderWithProps.d.ts +0 -42
  144. package/dist/GridLayoutProviderWithProps.d.ts.map +0 -1
  145. package/dist/GridLayoutProviderWithProps.js +0 -114
  146. package/dist/GridLayoutProviderWithProps.js.map +0 -1
  147. package/dist/MasonryFlashList.d.ts +0 -51
  148. package/dist/MasonryFlashList.d.ts.map +0 -1
  149. package/dist/MasonryFlashList.js +0 -252
  150. package/dist/MasonryFlashList.js.map +0 -1
  151. package/dist/PureComponentWrapper.d.ts +0 -22
  152. package/dist/PureComponentWrapper.d.ts.map +0 -1
  153. package/dist/PureComponentWrapper.js +0 -37
  154. package/dist/PureComponentWrapper.js.map +0 -1
  155. package/dist/__tests__/ContentContainerUtils.test.d.ts +0 -2
  156. package/dist/__tests__/ContentContainerUtils.test.d.ts.map +0 -1
  157. package/dist/__tests__/ContentContainerUtils.test.js +0 -85
  158. package/dist/__tests__/ContentContainerUtils.test.js.map +0 -1
  159. package/dist/__tests__/FlashList.test.d.ts +0 -2
  160. package/dist/__tests__/FlashList.test.d.ts.map +0 -1
  161. package/dist/__tests__/FlashList.test.js +0 -902
  162. package/dist/__tests__/FlashList.test.js.map +0 -1
  163. package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts +0 -2
  164. package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts.map +0 -1
  165. package/dist/__tests__/GridLayoutProviderWithProps.test.js +0 -143
  166. package/dist/__tests__/GridLayoutProviderWithProps.test.js.map +0 -1
  167. package/dist/__tests__/MasonryFlashList.test.d.ts +0 -2
  168. package/dist/__tests__/MasonryFlashList.test.d.ts.map +0 -1
  169. package/dist/__tests__/MasonryFlashList.test.js +0 -254
  170. package/dist/__tests__/MasonryFlashList.test.js.map +0 -1
  171. package/dist/__tests__/PlatformHelper.web.test.d.ts +0 -2
  172. package/dist/__tests__/PlatformHelper.web.test.d.ts.map +0 -1
  173. package/dist/__tests__/PlatformHelper.web.test.js +0 -33
  174. package/dist/__tests__/PlatformHelper.web.test.js.map +0 -1
  175. package/dist/__tests__/helpers/mountFlashList.d.ts +0 -19
  176. package/dist/__tests__/helpers/mountFlashList.d.ts.map +0 -1
  177. package/dist/__tests__/helpers/mountFlashList.js +0 -44
  178. package/dist/__tests__/helpers/mountFlashList.js.map +0 -1
  179. package/dist/__tests__/helpers/mountMasonryFlashList.d.ts +0 -18
  180. package/dist/__tests__/helpers/mountMasonryFlashList.d.ts.map +0 -1
  181. package/dist/__tests__/helpers/mountMasonryFlashList.js +0 -49
  182. package/dist/__tests__/helpers/mountMasonryFlashList.js.map +0 -1
  183. package/dist/__tests__/useBlankAreaTracker.test.d.ts +0 -2
  184. package/dist/__tests__/useBlankAreaTracker.test.d.ts.map +0 -1
  185. package/dist/__tests__/useBlankAreaTracker.test.js +0 -179
  186. package/dist/__tests__/useBlankAreaTracker.test.js.map +0 -1
  187. package/dist/benchmark/useBlankAreaTracker.d.ts +0 -34
  188. package/dist/benchmark/useBlankAreaTracker.d.ts.map +0 -1
  189. package/dist/benchmark/useBlankAreaTracker.js +0 -66
  190. package/dist/benchmark/useBlankAreaTracker.js.map +0 -1
  191. package/dist/enableNewCore.d.ts +0 -3
  192. package/dist/enableNewCore.d.ts.map +0 -1
  193. package/dist/enableNewCore.js +0 -25
  194. package/dist/enableNewCore.js.map +0 -1
  195. package/dist/errors/CustomError.d.ts +0 -8
  196. package/dist/errors/CustomError.d.ts.map +0 -1
  197. package/dist/errors/CustomError.js +0 -14
  198. package/dist/errors/CustomError.js.map +0 -1
  199. package/dist/errors/ExceptionList.d.ts +0 -24
  200. package/dist/errors/ExceptionList.d.ts.map +0 -1
  201. package/dist/errors/ExceptionList.js +0 -26
  202. package/dist/errors/ExceptionList.js.map +0 -1
  203. package/dist/errors/Warnings.d.ts +0 -9
  204. package/dist/errors/Warnings.d.ts.map +0 -1
  205. package/dist/errors/Warnings.js +0 -13
  206. package/dist/errors/Warnings.js.map +0 -1
  207. package/dist/native/auto-layout/AutoLayoutView.d.ts +0 -22
  208. package/dist/native/auto-layout/AutoLayoutView.d.ts.map +0 -1
  209. package/dist/native/auto-layout/AutoLayoutView.js +0 -48
  210. package/dist/native/auto-layout/AutoLayoutView.js.map +0 -1
  211. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.d.ts +0 -4
  212. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.d.ts.map +0 -1
  213. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.js +0 -6
  214. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.js.map +0 -1
  215. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts +0 -5
  216. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts.map +0 -1
  217. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.d.ts +0 -4
  218. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.d.ts.map +0 -1
  219. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.js +0 -6
  220. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.js.map +0 -1
  221. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js +0 -6
  222. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js.map +0 -1
  223. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts +0 -16
  224. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts.map +0 -1
  225. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js +0 -3
  226. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js.map +0 -1
  227. package/dist/native/cell-container/CellContainer.android.d.ts +0 -6
  228. package/dist/native/cell-container/CellContainer.android.d.ts.map +0 -1
  229. package/dist/native/cell-container/CellContainer.android.js +0 -9
  230. package/dist/native/cell-container/CellContainer.android.js.map +0 -1
  231. package/dist/native/cell-container/CellContainer.d.ts +0 -8
  232. package/dist/native/cell-container/CellContainer.d.ts.map +0 -1
  233. package/dist/native/cell-container/CellContainer.ios.d.ts +0 -6
  234. package/dist/native/cell-container/CellContainer.ios.d.ts.map +0 -1
  235. package/dist/native/cell-container/CellContainer.ios.js +0 -9
  236. package/dist/native/cell-container/CellContainer.ios.js.map +0 -1
  237. package/dist/native/cell-container/CellContainer.js +0 -11
  238. package/dist/native/cell-container/CellContainer.js.map +0 -1
  239. package/dist/native/cell-container/CellContainer.web.d.ts +0 -7
  240. package/dist/native/cell-container/CellContainer.web.d.ts.map +0 -1
  241. package/dist/native/cell-container/CellContainer.web.js +0 -13
  242. package/dist/native/cell-container/CellContainer.web.js.map +0 -1
  243. package/dist/specs/AutoLayoutNativeComponent.d.ts +0 -18
  244. package/dist/specs/AutoLayoutNativeComponent.d.ts.map +0 -1
  245. package/dist/specs/AutoLayoutNativeComponent.js +0 -6
  246. package/dist/specs/AutoLayoutNativeComponent.js.map +0 -1
  247. package/dist/specs/CellContainerNativeComponent.d.ts +0 -8
  248. package/dist/specs/CellContainerNativeComponent.d.ts.map +0 -1
  249. package/dist/specs/CellContainerNativeComponent.js +0 -6
  250. package/dist/specs/CellContainerNativeComponent.js.map +0 -1
  251. package/dist/utils/ContentContainerUtils.d.ts +0 -27
  252. package/dist/utils/ContentContainerUtils.d.ts.map +0 -1
  253. package/dist/utils/ContentContainerUtils.js +0 -48
  254. package/dist/utils/ContentContainerUtils.js.map +0 -1
  255. package/dist/viewability/ViewToken.d.ts.map +0 -1
  256. package/dist/viewability/ViewToken.js.map +0 -1
  257. package/dist/viewability/ViewabilityHelper.d.ts.map +0 -1
  258. package/dist/viewability/ViewabilityManager.d.ts.map +0 -1
  259. package/dist/viewability/ViewabilityManager.js.map +0 -1
  260. package/ios/RNFlashList.xcodeproj/project.pbxproj +0 -3
  261. package/ios/RNFlashList.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
  262. package/ios/Sources/AutoLayoutView.swift +0 -294
  263. package/ios/Sources/AutoLayoutViewComponentView.h +0 -16
  264. package/ios/Sources/AutoLayoutViewComponentView.mm +0 -90
  265. package/ios/Sources/AutoLayoutViewManager.mm +0 -14
  266. package/ios/Sources/AutoLayoutViewManager.swift +0 -12
  267. package/ios/Sources/CellContainerComponentView.h +0 -18
  268. package/ios/Sources/CellContainerComponentView.mm +0 -62
  269. package/ios/Sources/CellContainerManager.mm +0 -8
  270. package/ios/Sources/CellContainerManager.swift +0 -12
  271. package/ios/Sources/FlatListPro-Bridging-Header.h +0 -11
  272. package/ios/Tests/AutoLayoutViewTests.swift +0 -113
  273. package/src/FlashList.tsx +0 -953
  274. package/src/GridLayoutProviderWithProps.ts +0 -180
  275. package/src/MasonryFlashList.tsx +0 -476
  276. package/src/PureComponentWrapper.tsx +0 -42
  277. package/src/__tests__/ContentContainerUtils.test.ts +0 -130
  278. package/src/__tests__/FlashList.test.tsx +0 -1001
  279. package/src/__tests__/GridLayoutProviderWithProps.test.ts +0 -179
  280. package/src/__tests__/MasonryFlashList.test.ts +0 -292
  281. package/src/__tests__/PlatformHelper.web.test.ts +0 -45
  282. package/src/__tests__/helpers/mountFlashList.tsx +0 -62
  283. package/src/__tests__/helpers/mountMasonryFlashList.tsx +0 -70
  284. package/src/__tests__/useBlankAreaTracker.test.tsx +0 -206
  285. package/src/benchmark/useBlankAreaTracker.ts +0 -117
  286. package/src/enableNewCore.ts +0 -24
  287. package/src/errors/CustomError.ts +0 -10
  288. package/src/errors/ExceptionList.ts +0 -28
  289. package/src/errors/Warnings.ts +0 -15
  290. package/src/native/auto-layout/AutoLayoutView.tsx +0 -73
  291. package/src/native/auto-layout/AutoLayoutViewNativeComponent.android.ts +0 -7
  292. package/src/native/auto-layout/AutoLayoutViewNativeComponent.ios.ts +0 -7
  293. package/src/native/auto-layout/AutoLayoutViewNativeComponent.ts +0 -7
  294. package/src/native/auto-layout/AutoLayoutViewNativeComponentProps.ts +0 -17
  295. package/src/native/cell-container/CellContainer.android.ts +0 -7
  296. package/src/native/cell-container/CellContainer.ios.ts +0 -7
  297. package/src/native/cell-container/CellContainer.tsx +0 -14
  298. package/src/native/cell-container/CellContainer.web.tsx +0 -9
  299. package/src/specs/AutoLayoutNativeComponent.ts +0 -24
  300. package/src/specs/CellContainerNativeComponent.ts +0 -9
  301. package/src/utils/ContentContainerUtils.ts +0 -92
  302. /package/dist/{viewability → recyclerview/viewability}/ViewToken.d.ts +0 -0
  303. /package/dist/{viewability → recyclerview/viewability}/ViewToken.js +0 -0
  304. /package/src/{viewability → recyclerview/viewability}/ViewToken.ts +0 -0
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WarningMessages = void 0;
4
+ exports.WarningMessages = {
5
+ keyExtractorNotDefinedForAnimation: "keyExtractor is not defined. This might cause the animations to not work as expected.",
6
+ };
7
+ //# sourceMappingURL=WarningMessages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WarningMessages.js","sourceRoot":"","sources":["../../src/errors/WarningMessages.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;IAC7B,kCAAkC,EAChC,uFAAuF;CAC1F,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,21 +1,16 @@
1
- export { default as FlashList } from "./FlashList";
1
+ export { FlashList } from "./FlashList";
2
2
  export { FlashListRef } from "./FlashListRef";
3
- export { FlashListProps, ContentStyle, ListRenderItem, ListRenderItemInfo, RenderTarget, RenderTargetOptions, } from "./FlashListProps";
3
+ export { FlashListProps, ListRenderItem, ListRenderItemInfo, RenderTarget, RenderTargetOptions, } from "./FlashListProps";
4
4
  export { default as AnimatedFlashList } from "./AnimatedFlashList";
5
- export { useOnNativeBlankAreaEvents, BlankAreaEventHandler, BlankAreaEvent, } from "./native/auto-layout/AutoLayoutView";
6
5
  export { useBenchmark, BenchmarkParams, BenchmarkResult, } from "./benchmark/useBenchmark";
7
6
  export { useDataMultiplier } from "./benchmark/useDataMultiplier";
8
7
  export { useFlatListBenchmark, FlatListBenchmarkParams, } from "./benchmark/useFlatListBenchmark";
9
- export { useBlankAreaTracker, BlankAreaTrackerResult, BlankAreaTrackerConfig, } from "./benchmark/useBlankAreaTracker";
10
- export { MasonryFlashList, MasonryFlashListProps, MasonryFlashListScrollEvent, MasonryFlashListRef, MasonryListItem, MasonryListRenderItem, MasonryListRenderItemInfo, } from "./MasonryFlashList";
11
8
  export { useLayoutState } from "./recyclerview/hooks/useLayoutState";
12
9
  export { useRecyclingState } from "./recyclerview/hooks/useRecyclingState";
13
10
  export { useMappingHelper } from "./recyclerview/hooks/useMappingHelper";
14
11
  export { JSFPSMonitor, JSFPSResult } from "./benchmark/JSFPSMonitor";
15
12
  export { autoScroll, Cancellable } from "./benchmark/AutoScrollHelper";
16
- export { default as ViewToken } from "./viewability/ViewToken";
17
- export { default as CellContainer } from "./native/cell-container/CellContainer";
18
- export { RecyclerView } from "./recyclerview/RecyclerView";
19
- export { RecyclerViewProps } from "./recyclerview/RecyclerViewProps";
13
+ export { default as ViewToken } from "./recyclerview/viewability/ViewToken";
20
14
  export { useFlashListContext } from "./recyclerview/RecyclerViewContextProvider";
15
+ export { LayoutCommitObserver, LayoutCommitObserverProps, } from "./recyclerview/LayoutCommitObserver";
21
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,cAAc,GACf,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,2BAA2B,EAC3B,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,qCAAqC,CAAC"}
package/dist/index.js CHANGED
@@ -1,31 +1,22 @@
1
1
  "use strict";
2
- var _a;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useFlashListContext = exports.RecyclerView = exports.CellContainer = exports.Cancellable = exports.autoScroll = exports.JSFPSMonitor = exports.useMappingHelper = exports.useRecyclingState = exports.useLayoutState = exports.MasonryFlashList = exports.useBlankAreaTracker = exports.useFlatListBenchmark = exports.useDataMultiplier = exports.useBenchmark = exports.useOnNativeBlankAreaEvents = exports.AnimatedFlashList = exports.RenderTargetOptions = exports.FlashList = void 0;
3
+ exports.LayoutCommitObserver = exports.useFlashListContext = exports.Cancellable = exports.autoScroll = exports.JSFPSMonitor = exports.useMappingHelper = exports.useRecyclingState = exports.useLayoutState = exports.useFlatListBenchmark = exports.useDataMultiplier = exports.useBenchmark = exports.AnimatedFlashList = exports.RenderTargetOptions = exports.FlashList = void 0;
5
4
  var tslib_1 = require("tslib");
6
- // eslint-disable-next-line import/no-named-default
7
- var FlashList_1 = tslib_1.__importDefault(require("./FlashList"));
8
- var enableNewCore_1 = require("./enableNewCore");
9
- var RecyclerView_1 = require("./recyclerview/RecyclerView");
10
5
  // Keep this unmodified for TS type checking
11
- var FlashList_2 = require("./FlashList");
12
- Object.defineProperty(exports, "FlashList", { enumerable: true, get: function () { return tslib_1.__importDefault(FlashList_2).default; } });
6
+ var isNewArch_1 = require("./isNewArch");
7
+ var ErrorMessages_1 = require("./errors/ErrorMessages");
8
+ var FlashList_1 = require("./FlashList");
9
+ Object.defineProperty(exports, "FlashList", { enumerable: true, get: function () { return FlashList_1.FlashList; } });
13
10
  var FlashListProps_1 = require("./FlashListProps");
14
11
  Object.defineProperty(exports, "RenderTargetOptions", { enumerable: true, get: function () { return FlashListProps_1.RenderTargetOptions; } });
15
12
  var AnimatedFlashList_1 = require("./AnimatedFlashList");
16
13
  Object.defineProperty(exports, "AnimatedFlashList", { enumerable: true, get: function () { return tslib_1.__importDefault(AnimatedFlashList_1).default; } });
17
- var AutoLayoutView_1 = require("./native/auto-layout/AutoLayoutView");
18
- Object.defineProperty(exports, "useOnNativeBlankAreaEvents", { enumerable: true, get: function () { return AutoLayoutView_1.useOnNativeBlankAreaEvents; } });
19
14
  var useBenchmark_1 = require("./benchmark/useBenchmark");
20
15
  Object.defineProperty(exports, "useBenchmark", { enumerable: true, get: function () { return useBenchmark_1.useBenchmark; } });
21
16
  var useDataMultiplier_1 = require("./benchmark/useDataMultiplier");
22
17
  Object.defineProperty(exports, "useDataMultiplier", { enumerable: true, get: function () { return useDataMultiplier_1.useDataMultiplier; } });
23
18
  var useFlatListBenchmark_1 = require("./benchmark/useFlatListBenchmark");
24
19
  Object.defineProperty(exports, "useFlatListBenchmark", { enumerable: true, get: function () { return useFlatListBenchmark_1.useFlatListBenchmark; } });
25
- var useBlankAreaTracker_1 = require("./benchmark/useBlankAreaTracker");
26
- Object.defineProperty(exports, "useBlankAreaTracker", { enumerable: true, get: function () { return useBlankAreaTracker_1.useBlankAreaTracker; } });
27
- var MasonryFlashList_1 = require("./MasonryFlashList");
28
- Object.defineProperty(exports, "MasonryFlashList", { enumerable: true, get: function () { return MasonryFlashList_1.MasonryFlashList; } });
29
20
  var useLayoutState_1 = require("./recyclerview/hooks/useLayoutState");
30
21
  Object.defineProperty(exports, "useLayoutState", { enumerable: true, get: function () { return useLayoutState_1.useLayoutState; } });
31
22
  var useRecyclingState_1 = require("./recyclerview/hooks/useRecyclingState");
@@ -37,22 +28,11 @@ Object.defineProperty(exports, "JSFPSMonitor", { enumerable: true, get: function
37
28
  var AutoScrollHelper_1 = require("./benchmark/AutoScrollHelper");
38
29
  Object.defineProperty(exports, "autoScroll", { enumerable: true, get: function () { return AutoScrollHelper_1.autoScroll; } });
39
30
  Object.defineProperty(exports, "Cancellable", { enumerable: true, get: function () { return AutoScrollHelper_1.Cancellable; } });
40
- var CellContainer_1 = require("./native/cell-container/CellContainer");
41
- Object.defineProperty(exports, "CellContainer", { enumerable: true, get: function () { return tslib_1.__importDefault(CellContainer_1).default; } });
42
- var RecyclerView_2 = require("./recyclerview/RecyclerView");
43
- Object.defineProperty(exports, "RecyclerView", { enumerable: true, get: function () { return RecyclerView_2.RecyclerView; } });
44
31
  var RecyclerViewContextProvider_1 = require("./recyclerview/RecyclerViewContextProvider");
45
32
  Object.defineProperty(exports, "useFlashListContext", { enumerable: true, get: function () { return RecyclerViewContextProvider_1.useFlashListContext; } });
46
- // @ts-ignore - This is ignored by TypeScript but will be present in the compiled JS
47
- // In the compiled JS, this will override the previous FlashList export with a conditional one
48
- if (typeof module !== "undefined" &&
49
- module.exports &&
50
- ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) !== "test") {
51
- Object.defineProperty(module.exports, "FlashList", {
52
- get: function () {
53
- return (0, enableNewCore_1.isNewCoreEnabled)() ? RecyclerView_1.RecyclerView : FlashList_1.default;
54
- },
55
- configurable: true,
56
- });
33
+ var LayoutCommitObserver_1 = require("./recyclerview/LayoutCommitObserver");
34
+ Object.defineProperty(exports, "LayoutCommitObserver", { enumerable: true, get: function () { return LayoutCommitObserver_1.LayoutCommitObserver; } });
35
+ if (!(0, isNewArch_1.isNewArch)()) {
36
+ throw new Error(ErrorMessages_1.ErrorMessages.flashListV2OnlySupportsNewArchitecture);
57
37
  }
58
38
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,mDAAmD;AACnD,kEAA2D;AAC3D,iDAAmD;AACnD,4DAA2D;AAE3D,4CAA4C;AAC5C,yCAAmD;AAA1C,+HAAA,OAAO,OAAa;AAE7B,mDAO0B;AADxB,qHAAA,mBAAmB,OAAA;AAErB,yDAAmE;AAA1D,+IAAA,OAAO,OAAqB;AACrC,sEAI6C;AAH3C,4HAAA,0BAA0B,OAAA;AAI5B,yDAIkC;AAHhC,4GAAA,YAAY,OAAA;AAId,mEAAkE;AAAzD,sHAAA,iBAAiB,OAAA;AAC1B,yEAG0C;AAFxC,4HAAA,oBAAoB,OAAA;AAGtB,uEAIyC;AAHvC,0HAAA,mBAAmB,OAAA;AAIrB,uDAQ4B;AAP1B,oHAAA,gBAAgB,OAAA;AAQlB,sEAAqE;AAA5D,gHAAA,cAAc,OAAA;AACvB,4EAA2E;AAAlE,sHAAA,iBAAiB,OAAA;AAC1B,0EAAyE;AAAhE,oHAAA,gBAAgB,OAAA;AACzB,yDAAqE;AAA5D,4GAAA,YAAY,OAAA;AACrB,iEAAuE;AAA9D,8GAAA,UAAU,OAAA;AAAE,+GAAA,WAAW,OAAA;AAEhC,uEAAiF;AAAxE,uIAAA,OAAO,OAAiB;AACjC,4DAA2D;AAAlD,4GAAA,YAAY,OAAA;AAErB,0FAAiF;AAAxE,kIAAA,mBAAmB,OAAA;AAE5B,oFAAoF;AACpF,8FAA8F;AAC9F,IACE,OAAO,MAAM,KAAK,WAAW;IAC7B,MAAM,CAAC,OAAO;IACd,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,0CAAE,QAAQ,MAAK,MAAM,EACjC,CAAC;IACD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE;QACjD,GAAG;YACD,OAAO,IAAA,gCAAgB,GAAE,CAAC,CAAC,CAAC,2BAAY,CAAC,CAAC,CAAC,mBAAiB,CAAC;QAC/D,CAAC;QACD,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,4CAA4C;AAC5C,yCAAwC;AACxC,wDAAuD;AAEvD,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAElB,mDAM0B;AADxB,qHAAA,mBAAmB,OAAA;AAErB,yDAAmE;AAA1D,+IAAA,OAAO,OAAqB;AACrC,yDAIkC;AAHhC,4GAAA,YAAY,OAAA;AAId,mEAAkE;AAAzD,sHAAA,iBAAiB,OAAA;AAC1B,yEAG0C;AAFxC,4HAAA,oBAAoB,OAAA;AAGtB,sEAAqE;AAA5D,gHAAA,cAAc,OAAA;AACvB,4EAA2E;AAAlE,sHAAA,iBAAiB,OAAA;AAC1B,0EAAyE;AAAhE,oHAAA,gBAAgB,OAAA;AACzB,yDAAqE;AAA5D,4GAAA,YAAY,OAAA;AACrB,iEAAuE;AAA9D,8GAAA,UAAU,OAAA;AAAE,+GAAA,WAAW,OAAA;AAEhC,0FAAiF;AAAxE,kIAAA,mBAAmB,OAAA;AAC5B,4EAG6C;AAF3C,4HAAA,oBAAoB,OAAA;AAItB,IAAI,CAAC,IAAA,qBAAS,GAAE,EAAE,CAAC;IACjB,MAAM,IAAI,KAAK,CAAC,6BAAa,CAAC,sCAAsC,CAAC,CAAC;AACxE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function isNewArch(): boolean;
2
+ //# sourceMappingURL=isNewArch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNewArch.d.ts","sourceRoot":"","sources":["../src/isNewArch.ts"],"names":[],"mappings":"AAIA,wBAAgB,SAAS,IAAI,OAAO,CAoBnC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isNewArch = isNewArch;
4
+ var react_native_1 = require("react-native");
5
+ var _isNewArch;
6
+ function isNewArch() {
7
+ if (_isNewArch !== undefined) {
8
+ return _isNewArch;
9
+ }
10
+ else {
11
+ try {
12
+ // Check for Fabric UI Manager
13
+ var hasFabricUIManager = Boolean(global === null || global === void 0 ? void 0 : global.nativeFabricUIManager);
14
+ // Check for TurboModule system
15
+ var hasTurboModule = Boolean(global === null || global === void 0 ? void 0 : global.__turboModuleProxy);
16
+ _isNewArch =
17
+ hasFabricUIManager || hasTurboModule || react_native_1.Platform.OS === "web";
18
+ }
19
+ catch (_a) {
20
+ _isNewArch = true;
21
+ }
22
+ }
23
+ return _isNewArch;
24
+ }
25
+ //# sourceMappingURL=isNewArch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNewArch.js","sourceRoot":"","sources":["../src/isNewArch.ts"],"names":[],"mappings":";;AAIA,8BAoBC;AAxBD,6CAAwC;AAExC,IAAI,UAA+B,CAAC;AAEpC,SAAgB,SAAS;IACvB,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,UAAU,CAAC;IACpB,CAAC;SAAM,CAAC;QACN,IAAI,CAAC;YACH,8BAA8B;YAC9B,IAAM,kBAAkB,GAAG,OAAO,CAC/B,MAAc,aAAd,MAAM,uBAAN,MAAM,CAAU,qBAAqB,CACvC,CAAC;YAEF,+BAA+B;YAC/B,IAAM,cAAc,GAAG,OAAO,CAAE,MAAc,aAAd,MAAM,uBAAN,MAAM,CAAU,kBAAkB,CAAC,CAAC;YAEpE,UAAU;gBACR,kBAAkB,IAAI,cAAc,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;QAClE,CAAC;QAAC,WAAM,CAAC;YACP,UAAU,GAAG,IAAI,CAAC;QACpB,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -1,28 +1,7 @@
1
- import { BaseItemAnimator } from "recyclerlistview";
2
1
  declare const PlatformConfig: {
3
2
  defaultDrawDistance: number;
4
3
  supportsOffsetCorrection: boolean;
5
4
  trackAverageRenderTimeForOffsetProjection: boolean;
6
- invertedTransformStyle: {
7
- transform: {
8
- rotate: string;
9
- }[];
10
- };
11
- invertedTransformStyleHorizontal: {
12
- transform: {
13
- rotate: string;
14
- }[];
15
- };
16
5
  };
17
- declare const getCellContainerPlatformStyles: (inverted: boolean, parentProps: {
18
- x: number;
19
- y: number;
20
- isHorizontal?: boolean;
21
- }) => {
22
- transform: string;
23
- WebkitTransform: string;
24
- } | undefined;
25
- declare const getItemAnimator: () => BaseItemAnimator | undefined;
26
- declare const getFooterContainer: () => React.ComponentClass | undefined;
27
- export { PlatformConfig, getCellContainerPlatformStyles, getItemAnimator, getFooterContainer, };
6
+ export { PlatformConfig };
28
7
  //# sourceMappingURL=PlatformHelper.android.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformHelper.android.d.ts","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;CAOnB,CAAC;AACF,QAAA,MAAM,8BAA8B,GAClC,UAAU,OAAO,EACjB,aAAa;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,KAC5D;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAAG,SAEnD,CAAC;AAEF,QAAA,MAAM,eAAe,QAAO,gBAAgB,GAAG,SAE9C,CAAC;AAEF,QAAA,MAAM,kBAAkB,QAAO,KAAK,CAAC,cAAc,GAAG,SAErD,CAAC;AAEF,OAAO,EACL,cAAc,EACd,8BAA8B,EAC9B,eAAe,EACf,kBAAkB,GACnB,CAAC"}
1
+ {"version":3,"file":"PlatformHelper.android.d.ts","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.android.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc;;;;CAInB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,25 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFooterContainer = exports.getItemAnimator = exports.getCellContainerPlatformStyles = exports.PlatformConfig = void 0;
3
+ exports.PlatformConfig = void 0;
4
4
  var PlatformConfig = {
5
5
  defaultDrawDistance: 250,
6
6
  supportsOffsetCorrection: true,
7
7
  trackAverageRenderTimeForOffsetProjection: true,
8
- // Using rotate instead of scaleY on Android to avoid performance issues. Issue: https://github.com/Shopify/flash-list/issues/751
9
- invertedTransformStyle: { transform: [{ rotate: "180deg" }] },
10
- invertedTransformStyleHorizontal: { transform: [{ rotate: "180deg" }] },
11
8
  };
12
9
  exports.PlatformConfig = PlatformConfig;
13
- var getCellContainerPlatformStyles = function (inverted, parentProps) {
14
- return undefined;
15
- };
16
- exports.getCellContainerPlatformStyles = getCellContainerPlatformStyles;
17
- var getItemAnimator = function () {
18
- return undefined;
19
- };
20
- exports.getItemAnimator = getItemAnimator;
21
- var getFooterContainer = function () {
22
- return undefined;
23
- };
24
- exports.getFooterContainer = getFooterContainer;
25
10
  //# sourceMappingURL=PlatformHelper.android.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformHelper.android.js","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.android.ts"],"names":[],"mappings":";;;AAEA,IAAM,cAAc,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,wBAAwB,EAAE,IAAI;IAC9B,yCAAyC,EAAE,IAAI;IAC/C,iIAAiI;IACjI,sBAAsB,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE;IAC7D,gCAAgC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE;CACxE,CAAC;AAiBA,wCAAc;AAhBhB,IAAM,8BAA8B,GAAG,UACrC,QAAiB,EACjB,WAA6D;IAE7D,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAYA,wEAA8B;AAVhC,IAAM,eAAe,GAAG;IACtB,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AASA,0CAAe;AAPjB,IAAM,kBAAkB,GAAG;IACzB,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAMA,gDAAkB"}
1
+ {"version":3,"file":"PlatformHelper.android.js","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.android.ts"],"names":[],"mappings":";;;AAAA,IAAM,cAAc,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,wBAAwB,EAAE,IAAI;IAC9B,yCAAyC,EAAE,IAAI;CAChD,CAAC;AAEO,wCAAc"}
@@ -1,28 +1,7 @@
1
- import { BaseItemAnimator } from "recyclerlistview";
2
1
  declare const PlatformConfig: {
3
2
  defaultDrawDistance: number;
4
3
  supportsOffsetCorrection: boolean;
5
4
  trackAverageRenderTimeForOffsetProjection: boolean;
6
- invertedTransformStyle: {
7
- transform: {
8
- scaleY: number;
9
- }[];
10
- };
11
- invertedTransformStyleHorizontal: {
12
- transform: {
13
- scaleX: number;
14
- }[];
15
- };
16
5
  };
17
- declare const getCellContainerPlatformStyles: (inverted: boolean, parentProps: {
18
- x: number;
19
- y: number;
20
- isHorizontal?: boolean;
21
- }) => {
22
- transform: string;
23
- WebkitTransform: string;
24
- } | undefined;
25
- declare const getItemAnimator: () => BaseItemAnimator | undefined;
26
- declare const getFooterContainer: () => React.ComponentClass | undefined;
27
- export { PlatformConfig, getCellContainerPlatformStyles, getItemAnimator, getFooterContainer, };
6
+ export { PlatformConfig };
28
7
  //# sourceMappingURL=PlatformHelper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformHelper.d.ts","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;CAMnB,CAAC;AACF,QAAA,MAAM,8BAA8B,GAClC,UAAU,OAAO,EACjB,aAAa;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,KAC5D;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAAG,SAEnD,CAAC;AAEF,QAAA,MAAM,eAAe,QAAO,gBAAgB,GAAG,SAE9C,CAAC;AAEF,QAAA,MAAM,kBAAkB,QAAO,KAAK,CAAC,cAAc,GAAG,SAErD,CAAC;AAEF,OAAO,EACL,cAAc,EACd,8BAA8B,EAC9B,eAAe,EACf,kBAAkB,GACnB,CAAC"}
1
+ {"version":3,"file":"PlatformHelper.d.ts","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc;;;;CAInB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,28 +1,7 @@
1
- import { BaseItemAnimator } from "recyclerlistview";
2
1
  declare const PlatformConfig: {
3
2
  defaultDrawDistance: number;
4
3
  supportsOffsetCorrection: boolean;
5
4
  trackAverageRenderTimeForOffsetProjection: boolean;
6
- invertedTransformStyle: {
7
- transform: {
8
- scaleY: number;
9
- }[];
10
- };
11
- invertedTransformStyleHorizontal: {
12
- transform: {
13
- scaleX: number;
14
- }[];
15
- };
16
5
  };
17
- declare const getCellContainerPlatformStyles: (inverted: boolean, parentProps: {
18
- x: number;
19
- y: number;
20
- isHorizontal?: boolean;
21
- }) => {
22
- transform: string;
23
- WebkitTransform: string;
24
- } | undefined;
25
- declare const getItemAnimator: () => BaseItemAnimator | undefined;
26
- declare const getFooterContainer: () => React.ComponentClass | undefined;
27
- export { PlatformConfig, getCellContainerPlatformStyles, getItemAnimator, getFooterContainer, };
6
+ export { PlatformConfig };
28
7
  //# sourceMappingURL=PlatformHelper.ios.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformHelper.ios.d.ts","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;CAMnB,CAAC;AACF,QAAA,MAAM,8BAA8B,GAClC,UAAU,OAAO,EACjB,aAAa;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,KAC5D;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAAG,SAEnD,CAAC;AAEF,QAAA,MAAM,eAAe,QAAO,gBAAgB,GAAG,SAE9C,CAAC;AAEF,QAAA,MAAM,kBAAkB,QAAO,KAAK,CAAC,cAAc,GAAG,SAErD,CAAC;AAEF,OAAO,EACL,cAAc,EACd,8BAA8B,EAC9B,eAAe,EACf,kBAAkB,GACnB,CAAC"}
1
+ {"version":3,"file":"PlatformHelper.ios.d.ts","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.ios.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc;;;;CAInB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,24 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFooterContainer = exports.getItemAnimator = exports.getCellContainerPlatformStyles = exports.PlatformConfig = void 0;
3
+ exports.PlatformConfig = void 0;
4
4
  var PlatformConfig = {
5
5
  defaultDrawDistance: 250,
6
6
  supportsOffsetCorrection: true,
7
7
  trackAverageRenderTimeForOffsetProjection: false,
8
- invertedTransformStyle: { transform: [{ scaleY: -1 }] },
9
- invertedTransformStyleHorizontal: { transform: [{ scaleX: -1 }] },
10
8
  };
11
9
  exports.PlatformConfig = PlatformConfig;
12
- var getCellContainerPlatformStyles = function (inverted, parentProps) {
13
- return undefined;
14
- };
15
- exports.getCellContainerPlatformStyles = getCellContainerPlatformStyles;
16
- var getItemAnimator = function () {
17
- return undefined;
18
- };
19
- exports.getItemAnimator = getItemAnimator;
20
- var getFooterContainer = function () {
21
- return undefined;
22
- };
23
- exports.getFooterContainer = getFooterContainer;
24
10
  //# sourceMappingURL=PlatformHelper.ios.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformHelper.ios.js","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.ios.ts"],"names":[],"mappings":";;;AAEA,IAAM,cAAc,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,wBAAwB,EAAE,IAAI;IAC9B,yCAAyC,EAAE,KAAK;IAChD,sBAAsB,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IACvD,gCAAgC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;CAClE,CAAC;AAiBA,wCAAc;AAhBhB,IAAM,8BAA8B,GAAG,UACrC,QAAiB,EACjB,WAA6D;IAE7D,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAYA,wEAA8B;AAVhC,IAAM,eAAe,GAAG;IACtB,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AASA,0CAAe;AAPjB,IAAM,kBAAkB,GAAG;IACzB,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAMA,gDAAkB"}
1
+ {"version":3,"file":"PlatformHelper.ios.js","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.ios.ts"],"names":[],"mappings":";;;AAAA,IAAM,cAAc,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,wBAAwB,EAAE,IAAI;IAC9B,yCAAyC,EAAE,KAAK;CACjD,CAAC;AAEO,wCAAc"}
@@ -1,25 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFooterContainer = exports.getItemAnimator = exports.getCellContainerPlatformStyles = exports.PlatformConfig = void 0;
4
- var DefaultJSItemAnimator_1 = require("recyclerlistview/dist/reactnative/platform/reactnative/itemanimators/defaultjsanimator/DefaultJSItemAnimator");
3
+ exports.PlatformConfig = void 0;
5
4
  var PlatformConfig = {
6
5
  defaultDrawDistance: 250,
7
6
  supportsOffsetCorrection: false,
8
7
  trackAverageRenderTimeForOffsetProjection: false,
9
- invertedTransformStyle: { transform: [{ scaleY: -1 }] },
10
- invertedTransformStyleHorizontal: { transform: [{ scaleX: -1 }] },
11
8
  };
12
9
  exports.PlatformConfig = PlatformConfig;
13
- var getCellContainerPlatformStyles = function (inverted, parentProps) {
14
- return undefined;
15
- };
16
- exports.getCellContainerPlatformStyles = getCellContainerPlatformStyles;
17
- var getItemAnimator = function () {
18
- return new DefaultJSItemAnimator_1.DefaultJSItemAnimator();
19
- };
20
- exports.getItemAnimator = getItemAnimator;
21
- var getFooterContainer = function () {
22
- return undefined;
23
- };
24
- exports.getFooterContainer = getFooterContainer;
25
10
  //# sourceMappingURL=PlatformHelper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformHelper.js","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.ts"],"names":[],"mappings":";;;AACA,sJAAqJ;AAErJ,IAAM,cAAc,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,wBAAwB,EAAE,KAAK;IAC/B,yCAAyC,EAAE,KAAK;IAChD,sBAAsB,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IACvD,gCAAgC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;CAClE,CAAC;AAiBA,wCAAc;AAhBhB,IAAM,8BAA8B,GAAG,UACrC,QAAiB,EACjB,WAA6D;IAE7D,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAYA,wEAA8B;AAVhC,IAAM,eAAe,GAAG;IACtB,OAAO,IAAI,6CAAqB,EAAE,CAAC;AACrC,CAAC,CAAC;AASA,0CAAe;AAPjB,IAAM,kBAAkB,GAAG;IACzB,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAMA,gDAAkB"}
1
+ {"version":3,"file":"PlatformHelper.js","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.ts"],"names":[],"mappings":";;;AAAA,IAAM,cAAc,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,wBAAwB,EAAE,KAAK;IAC/B,yCAAyC,EAAE,KAAK;CACjD,CAAC;AAEO,wCAAc"}
@@ -1,29 +1,7 @@
1
- import React from "react";
2
- import { BaseItemAnimator } from "recyclerlistview";
3
1
  declare const PlatformConfig: {
4
2
  defaultDrawDistance: number;
5
3
  supportsOffsetCorrection: boolean;
6
4
  trackAverageRenderTimeForOffsetProjection: boolean;
7
- invertedTransformStyle: {
8
- transform: {
9
- scaleY: number;
10
- }[];
11
- };
12
- invertedTransformStyleHorizontal: {
13
- transform: {
14
- scaleX: number;
15
- }[];
16
- };
17
5
  };
18
- declare const getCellContainerPlatformStyles: (inverted: boolean, parentProps: {
19
- x: number;
20
- y: number;
21
- isHorizontal?: boolean;
22
- }) => {
23
- transform: string;
24
- WebkitTransform: string;
25
- } | undefined;
26
- declare const getItemAnimator: () => BaseItemAnimator | undefined;
27
- declare const getFooterContainer: () => React.ComponentClass | undefined;
28
- export { PlatformConfig, getCellContainerPlatformStyles, getItemAnimator, getFooterContainer, };
6
+ export { PlatformConfig };
29
7
  //# sourceMappingURL=PlatformHelper.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformHelper.web.d.ts","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;CAMnB,CAAC;AACF,QAAA,MAAM,8BAA8B,GAClC,UAAU,OAAO,EACjB,aAAa;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,KAC5D;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAAG,SAKnD,CAAC;AAEF,QAAA,MAAM,eAAe,QAAO,gBAAgB,GAAG,SAE9C,CAAC;AAEF,QAAA,MAAM,kBAAkB,QAAO,KAAK,CAAC,cAAc,GAAG,SAErD,CAAC;AAEF,OAAO,EACL,cAAc,EACd,8BAA8B,EAC9B,eAAe,EACf,kBAAkB,GACnB,CAAC"}
1
+ {"version":3,"file":"PlatformHelper.web.d.ts","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.web.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc;;;;CAInB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,27 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFooterContainer = exports.getItemAnimator = exports.getCellContainerPlatformStyles = exports.PlatformConfig = void 0;
4
- var react_native_1 = require("react-native");
5
- var DefaultJSItemAnimator_1 = require("recyclerlistview/dist/reactnative/platform/reactnative/itemanimators/defaultjsanimator/DefaultJSItemAnimator");
3
+ exports.PlatformConfig = void 0;
6
4
  var PlatformConfig = {
7
5
  defaultDrawDistance: 500,
8
6
  supportsOffsetCorrection: false,
9
7
  trackAverageRenderTimeForOffsetProjection: false,
10
- invertedTransformStyle: { transform: [{ scaleY: -1 }] },
11
- invertedTransformStyleHorizontal: { transform: [{ scaleX: -1 }] },
12
8
  };
13
9
  exports.PlatformConfig = PlatformConfig;
14
- var getCellContainerPlatformStyles = function (inverted, parentProps) {
15
- var transformValue = "translate(".concat(parentProps.x, "px,").concat(parentProps.y, "px)").concat(inverted ? " ".concat(parentProps.isHorizontal ? "scaleX" : "scaleY", "(-1)") : "");
16
- return { transform: transformValue, WebkitTransform: transformValue };
17
- };
18
- exports.getCellContainerPlatformStyles = getCellContainerPlatformStyles;
19
- var getItemAnimator = function () {
20
- return new DefaultJSItemAnimator_1.DefaultJSItemAnimator();
21
- };
22
- exports.getItemAnimator = getItemAnimator;
23
- var getFooterContainer = function () {
24
- return react_native_1.View;
25
- };
26
- exports.getFooterContainer = getFooterContainer;
27
10
  //# sourceMappingURL=PlatformHelper.web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformHelper.web.js","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.web.ts"],"names":[],"mappings":";;;AACA,6CAAoC;AAEpC,sJAAqJ;AAErJ,IAAM,cAAc,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,wBAAwB,EAAE,KAAK;IAC/B,yCAAyC,EAAE,KAAK;IAChD,sBAAsB,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IACvD,gCAAgC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;CAClE,CAAC;AAoBA,wCAAc;AAnBhB,IAAM,8BAA8B,GAAG,UACrC,QAAiB,EACjB,WAA6D;IAE7D,IAAM,cAAc,GAAG,oBAAa,WAAW,CAAC,CAAC,gBAAM,WAAW,CAAC,CAAC,gBAClE,QAAQ,CAAC,CAAC,CAAC,WAAI,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,SAAM,CAAC,CAAC,CAAC,EAAE,CACxE,CAAC;IACH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;AACxE,CAAC,CAAC;AAYA,wEAA8B;AAVhC,IAAM,eAAe,GAAG;IACtB,OAAO,IAAI,6CAAqB,EAAE,CAAC;AACrC,CAAC,CAAC;AASA,0CAAe;AAPjB,IAAM,kBAAkB,GAAG;IACzB,OAAO,mBAAI,CAAC;AACd,CAAC,CAAC;AAMA,gDAAkB"}
1
+ {"version":3,"file":"PlatformHelper.web.js","sourceRoot":"","sources":["../../../src/native/config/PlatformHelper.web.ts"],"names":[],"mappings":";;;AAAA,IAAM,cAAc,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,wBAAwB,EAAE,KAAK;IAC/B,yCAAyC,EAAE,KAAK;CACjD,CAAC;AAEO,wCAAc"}
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ export interface LayoutCommitObserverProps {
3
+ children: React.ReactNode;
4
+ onCommitLayoutEffect?: () => void;
5
+ }
6
+ /**
7
+ * LayoutCommitObserver can be used to observe when FlashList commits a layout.
8
+ * It is useful when your component has one or more FlashLists somewhere down the tree.
9
+ * LayoutCommitObserver will trigger `onCommitLayoutEffect` when all of the FlashLists in the tree have finished their first commit.
10
+ */
11
+ export declare const LayoutCommitObserver: React.MemoExoticComponent<(props: LayoutCommitObserverProps) => React.JSX.Element>;
12
+ //# sourceMappingURL=LayoutCommitObserver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutCommitObserver.d.ts","sourceRoot":"","sources":["../../src/recyclerview/LayoutCommitObserver.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAShE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,oCACvB,yBAAyB,uBAmDlC,CAAC"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LayoutCommitObserver = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
+ var RecyclerViewContextProvider_1 = require("./RecyclerViewContextProvider");
7
+ var useLayoutState_1 = require("./hooks/useLayoutState");
8
+ /**
9
+ * LayoutCommitObserver can be used to observe when FlashList commits a layout.
10
+ * It is useful when your component has one or more FlashLists somewhere down the tree.
11
+ * LayoutCommitObserver will trigger `onCommitLayoutEffect` when all of the FlashLists in the tree have finished their first commit.
12
+ */
13
+ exports.LayoutCommitObserver = react_1.default.memo(function (props) {
14
+ var children = props.children, onCommitLayoutEffect = props.onCommitLayoutEffect;
15
+ var parentRecyclerViewContext = (0, RecyclerViewContextProvider_1.useRecyclerViewContext)();
16
+ var _a = tslib_1.__read((0, useLayoutState_1.useLayoutState)(0), 2), _ = _a[0], setRenderId = _a[1];
17
+ var pendingChildIds = (0, react_1.useRef)(new Set()).current;
18
+ (0, react_1.useLayoutEffect)(function () {
19
+ if (pendingChildIds.size > 0) {
20
+ return;
21
+ }
22
+ onCommitLayoutEffect === null || onCommitLayoutEffect === void 0 ? void 0 : onCommitLayoutEffect();
23
+ });
24
+ // Create context for child components
25
+ var recyclerViewContext = (0, react_1.useMemo)(function () {
26
+ return {
27
+ layout: function () {
28
+ setRenderId(function (prev) { return prev + 1; });
29
+ },
30
+ getRef: function () {
31
+ var _a;
32
+ return (_a = parentRecyclerViewContext === null || parentRecyclerViewContext === void 0 ? void 0 : parentRecyclerViewContext.getRef()) !== null && _a !== void 0 ? _a : null;
33
+ },
34
+ getParentRef: function () {
35
+ var _a;
36
+ return (_a = parentRecyclerViewContext === null || parentRecyclerViewContext === void 0 ? void 0 : parentRecyclerViewContext.getParentRef()) !== null && _a !== void 0 ? _a : null;
37
+ },
38
+ getParentScrollViewRef: function () {
39
+ var _a;
40
+ return (_a = parentRecyclerViewContext === null || parentRecyclerViewContext === void 0 ? void 0 : parentRecyclerViewContext.getParentScrollViewRef()) !== null && _a !== void 0 ? _a : null;
41
+ },
42
+ getScrollViewRef: function () {
43
+ var _a;
44
+ return (_a = parentRecyclerViewContext === null || parentRecyclerViewContext === void 0 ? void 0 : parentRecyclerViewContext.getScrollViewRef()) !== null && _a !== void 0 ? _a : null;
45
+ },
46
+ markChildLayoutAsPending: function (id) {
47
+ parentRecyclerViewContext === null || parentRecyclerViewContext === void 0 ? void 0 : parentRecyclerViewContext.markChildLayoutAsPending(id);
48
+ pendingChildIds.add(id);
49
+ },
50
+ unmarkChildLayoutAsPending: function (id) {
51
+ parentRecyclerViewContext === null || parentRecyclerViewContext === void 0 ? void 0 : parentRecyclerViewContext.unmarkChildLayoutAsPending(id);
52
+ if (pendingChildIds.has(id)) {
53
+ pendingChildIds.delete(id);
54
+ recyclerViewContext.layout();
55
+ }
56
+ },
57
+ };
58
+ }, [parentRecyclerViewContext, pendingChildIds, setRenderId]);
59
+ return (react_1.default.createElement(RecyclerViewContextProvider_1.RecyclerViewContextProvider, { value: recyclerViewContext }, children));
60
+ });
61
+ exports.LayoutCommitObserver.displayName = "LayoutCommitObserver";
62
+ //# sourceMappingURL=LayoutCommitObserver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutCommitObserver.js","sourceRoot":"","sources":["../../src/recyclerview/LayoutCommitObserver.tsx"],"names":[],"mappings":";;;;AAAA,qDAAgE;AAEhE,6EAIuC;AACvC,yDAAwD;AAOxD;;;;GAIG;AACU,QAAA,oBAAoB,GAAG,eAAK,CAAC,IAAI,CAC5C,UAAC,KAAgC;IACvB,IAAA,QAAQ,GAA2B,KAAK,SAAhC,EAAE,oBAAoB,GAAK,KAAK,qBAAV,CAAW;IACjD,IAAM,yBAAyB,GAAG,IAAA,oDAAsB,GAAE,CAAC;IACrD,IAAA,KAAA,eAAmB,IAAA,+BAAc,EAAC,CAAC,CAAC,IAAA,EAAnC,CAAC,QAAA,EAAE,WAAW,QAAqB,CAAC;IAC3C,IAAM,eAAe,GAAG,IAAA,cAAM,EAAc,IAAI,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC;IAE/D,IAAA,uBAAe,EAAC;QACd,IAAI,eAAe,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAC7B,OAAO;QACT,CAAC;QACD,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,EAAI,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,sCAAsC;IACtC,IAAM,mBAAmB,GAAiC,IAAA,eAAO,EAAC;QAChE,OAAO;YACL,MAAM,EAAE;gBACN,WAAW,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,GAAG,CAAC,EAAR,CAAQ,CAAC,CAAC;YAClC,CAAC;YACD,MAAM,EAAE;;gBACN,OAAO,MAAA,yBAAyB,aAAzB,yBAAyB,uBAAzB,yBAAyB,CAAE,MAAM,EAAE,mCAAI,IAAI,CAAC;YACrD,CAAC;YACD,YAAY,EAAE;;gBACZ,OAAO,MAAA,yBAAyB,aAAzB,yBAAyB,uBAAzB,yBAAyB,CAAE,YAAY,EAAE,mCAAI,IAAI,CAAC;YAC3D,CAAC;YACD,sBAAsB,EAAE;;gBACtB,OAAO,MAAA,yBAAyB,aAAzB,yBAAyB,uBAAzB,yBAAyB,CAAE,sBAAsB,EAAE,mCAAI,IAAI,CAAC;YACrE,CAAC;YACD,gBAAgB,EAAE;;gBAChB,OAAO,MAAA,yBAAyB,aAAzB,yBAAyB,uBAAzB,yBAAyB,CAAE,gBAAgB,EAAE,mCAAI,IAAI,CAAC;YAC/D,CAAC;YACD,wBAAwB,EAAE,UAAC,EAAU;gBACnC,yBAAyB,aAAzB,yBAAyB,uBAAzB,yBAAyB,CAAE,wBAAwB,CAAC,EAAE,CAAC,CAAC;gBACxD,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAC1B,CAAC;YACD,0BAA0B,EAAE,UAAC,EAAU;gBACrC,yBAAyB,aAAzB,yBAAyB,uBAAzB,yBAAyB,CAAE,0BAA0B,CAAC,EAAE,CAAC,CAAC;gBAC1D,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;oBAC5B,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;oBAC3B,mBAAmB,CAAC,MAAM,EAAE,CAAC;gBAC/B,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,yBAAyB,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC;IAE9D,OAAO,CACL,8BAAC,yDAA2B,IAAC,KAAK,EAAE,mBAAmB,IACpD,QAAQ,CACmB,CAC/B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,4BAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RecyclerView.d.ts","sourceRoot":"","sources":["../../src/recyclerview/RecyclerView.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KASN,MAAM,OAAO,CAAC;AAQf,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAgB/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAshBxD,KAAK,gBAAgB,GAAG,CAAC,CAAC,EACxB,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,KAC/D,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;AAGvB,QAAA,MAAM,YAAY,EAEb,gBAAgB,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"RecyclerView.d.ts","sourceRoot":"","sources":["../../src/recyclerview/RecyclerView.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KASN,MAAM,OAAO,CAAC;AAQf,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAiB/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAkiBxD,KAAK,gBAAgB,GAAG,CAAC,CAAC,EACxB,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,KAC/D,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;AAGvB,QAAA,MAAM,YAAY,EAEb,gBAAgB,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -8,6 +8,7 @@ var tslib_1 = require("tslib");
8
8
  */
9
9
  var react_1 = tslib_1.__importStar(require("react"));
10
10
  var react_native_1 = require("react-native");
11
+ var ErrorMessages_1 = require("../errors/ErrorMessages");
11
12
  var measureLayout_1 = require("./utils/measureLayout");
12
13
  var RecyclerViewContextProvider_1 = require("./RecyclerViewContextProvider");
13
14
  var useLayoutState_1 = require("./hooks/useLayoutState");
@@ -246,6 +247,9 @@ var RecyclerViewComponent = function (props, ref) {
246
247
  data.length > 0 &&
247
248
  stickyHeaderIndices &&
248
249
  stickyHeaderIndices.length > 0) {
250
+ if (horizontal) {
251
+ throw new Error(ErrorMessages_1.ErrorMessages.stickyHeadersNotSupportedForHorizontal);
252
+ }
249
253
  return (react_1.default.createElement(StickyHeaders_1.StickyHeaders, { stickyHeaderIndices: stickyHeaderIndices, data: data, renderItem: renderItem, scrollY: scrollY, stickyHeaderRef: stickyHeaderRef, recyclerViewManager: recyclerViewManager, extraData: extraData }));
250
254
  }
251
255
  return null;
@@ -254,6 +258,7 @@ var RecyclerViewComponent = function (props, ref) {
254
258
  stickyHeaderIndices,
255
259
  renderItem,
256
260
  scrollY,
261
+ horizontal,
257
262
  recyclerViewManager,
258
263
  extraData,
259
264
  ]);
@@ -273,20 +278,13 @@ var RecyclerViewComponent = function (props, ref) {
273
278
  }, [maintainVisibleContentPosition, shouldMaintainVisibleContentPosition]);
274
279
  var shouldRenderFromBottom = recyclerViewManager.getDataLength() > 0 &&
275
280
  ((_a = maintainVisibleContentPosition === null || maintainVisibleContentPosition === void 0 ? void 0 : maintainVisibleContentPosition.startRenderingFromBottom) !== null && _a !== void 0 ? _a : false);
276
- // Calculate minimum height adjustment for bottom rendering
277
- var adjustmentMinHeight = recyclerViewManager.hasLayout()
278
- ? Math.max(0, recyclerViewManager.getWindowSize().height -
279
- recyclerViewManager.getChildContainerDimensions().height -
280
- recyclerViewManager.firstItemOffset)
281
- : 0;
282
281
  // Create view for measuring bounded size
283
282
  var viewToMeasureBoundedSize = (0, react_1.useMemo)(function () {
284
283
  return (react_1.default.createElement(CompatView_1.CompatView, { style: {
285
284
  height: horizontal ? undefined : 0,
286
285
  width: horizontal ? 0 : undefined,
287
- minHeight: shouldRenderFromBottom ? adjustmentMinHeight : undefined,
288
286
  }, ref: firstChildViewRef }));
289
- }, [horizontal, shouldRenderFromBottom, adjustmentMinHeight]);
287
+ }, [horizontal]);
290
288
  var scrollAnchor = (0, react_1.useMemo)(function () {
291
289
  if (shouldMaintainVisibleContentPosition) {
292
290
  return (react_1.default.createElement(ScrollAnchor_1.ScrollAnchor, { horizontal: Boolean(horizontal), scrollAnchorRef: scrollAnchorRef }));
@@ -313,7 +311,20 @@ var RecyclerViewComponent = function (props, ref) {
313
311
  isHorizontalRTL && viewToMeasureBoundedSize,
314
312
  renderHeader,
315
313
  !isHorizontalRTL && viewToMeasureBoundedSize,
316
- react_1.default.createElement(ViewHolderCollection_1.ViewHolderCollection, { viewHolderCollectionRef: viewHolderCollectionRef, data: data, horizontal: horizontal, renderStack: recyclerViewManager.getRenderStack(), getLayout: function (index) { return recyclerViewManager.getLayout(index); }, refHolder: refHolder, onSizeChanged: validateItemSize, renderItem: renderItem, extraData: extraData, onCommitLayoutEffect: function () {
314
+ react_1.default.createElement(ViewHolderCollection_1.ViewHolderCollection, { viewHolderCollectionRef: viewHolderCollectionRef, data: data, horizontal: horizontal, renderStack: recyclerViewManager.getRenderStack(), getLayout: function (index) { return recyclerViewManager.getLayout(index); }, getAdjustmentMargin: function () {
315
+ if (!shouldRenderFromBottom || !recyclerViewManager.hasLayout()) {
316
+ return 0;
317
+ }
318
+ var windowSize = horizontal
319
+ ? recyclerViewManager.getWindowSize().width
320
+ : recyclerViewManager.getWindowSize().height;
321
+ var childContainerSize = horizontal
322
+ ? recyclerViewManager.getChildContainerDimensions().width
323
+ : recyclerViewManager.getChildContainerDimensions().height;
324
+ return Math.max(0, windowSize -
325
+ childContainerSize -
326
+ recyclerViewManager.firstItemOffset);
327
+ }, refHolder: refHolder, onSizeChanged: validateItemSize, renderItem: renderItem, extraData: extraData, onCommitLayoutEffect: function () {
317
328
  applyInitialScrollIndex();
318
329
  parentRecyclerViewContext === null || parentRecyclerViewContext === void 0 ? void 0 : parentRecyclerViewContext.unmarkChildLayoutAsPending(recyclerViewId);
319
330
  onCommitLayoutEffect === null || onCommitLayoutEffect === void 0 ? void 0 : onCommitLayoutEffect();