@shopify/flash-list 2.0.0 → 2.0.2-rc.1

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 (289) hide show
  1. package/README.md +97 -27
  2. package/RNFlashList.podspec +37 -0
  3. package/android/build.gradle +89 -0
  4. package/android/src/main/AndroidManifest.xml +3 -0
  5. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutShadow.kt +105 -0
  6. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt +158 -0
  7. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutViewManager.kt +70 -0
  8. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/BlankAreaEvent.kt +29 -0
  9. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainer.java +16 -0
  10. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerImpl.kt +16 -0
  11. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerManager.kt +34 -0
  12. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/FlashListPackage.kt +19 -0
  13. package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerDelegate.java +47 -0
  14. package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerInterface.java +21 -0
  15. package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerDelegate.java +32 -0
  16. package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerInterface.java +16 -0
  17. package/android/src/test/java/com/shopify/reactnative/flash_list/AutoLayoutShadowTest.kt +147 -0
  18. package/android/src/test/java/com/shopify/reactnative/flash_list/models/Rect.kt +61 -0
  19. package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestCollection.kt +6 -0
  20. package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestDataModel.kt +8 -0
  21. package/android/src/test/resources/LayoutTestData.json +788 -0
  22. package/dist/AnimatedFlashList.js +2 -2
  23. package/dist/AnimatedFlashList.js.map +1 -1
  24. package/dist/FlashList.d.ts +167 -1
  25. package/dist/FlashList.d.ts.map +1 -1
  26. package/dist/FlashList.js +595 -3
  27. package/dist/FlashList.js.map +1 -1
  28. package/dist/FlashListProps.d.ts +63 -2
  29. package/dist/FlashListProps.d.ts.map +1 -1
  30. package/dist/FlashListProps.js.map +1 -1
  31. package/dist/GridLayoutProviderWithProps.d.ts +42 -0
  32. package/dist/GridLayoutProviderWithProps.d.ts.map +1 -0
  33. package/dist/GridLayoutProviderWithProps.js +114 -0
  34. package/dist/GridLayoutProviderWithProps.js.map +1 -0
  35. package/dist/MasonryFlashList.d.ts +51 -0
  36. package/dist/MasonryFlashList.d.ts.map +1 -0
  37. package/dist/MasonryFlashList.js +252 -0
  38. package/dist/MasonryFlashList.js.map +1 -0
  39. package/dist/PureComponentWrapper.d.ts +22 -0
  40. package/dist/PureComponentWrapper.d.ts.map +1 -0
  41. package/dist/PureComponentWrapper.js +37 -0
  42. package/dist/PureComponentWrapper.js.map +1 -0
  43. package/dist/__tests__/ContentContainerUtils.test.d.ts +2 -0
  44. package/dist/__tests__/ContentContainerUtils.test.d.ts.map +1 -0
  45. package/dist/__tests__/ContentContainerUtils.test.js +85 -0
  46. package/dist/__tests__/ContentContainerUtils.test.js.map +1 -0
  47. package/dist/__tests__/FlashList.test.d.ts +2 -0
  48. package/dist/__tests__/FlashList.test.d.ts.map +1 -0
  49. package/dist/__tests__/FlashList.test.js +902 -0
  50. package/dist/__tests__/FlashList.test.js.map +1 -0
  51. package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts +2 -0
  52. package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts.map +1 -0
  53. package/dist/__tests__/GridLayoutProviderWithProps.test.js +143 -0
  54. package/dist/__tests__/GridLayoutProviderWithProps.test.js.map +1 -0
  55. package/dist/__tests__/MasonryFlashList.test.d.ts +2 -0
  56. package/dist/__tests__/MasonryFlashList.test.d.ts.map +1 -0
  57. package/dist/__tests__/MasonryFlashList.test.js +254 -0
  58. package/dist/__tests__/MasonryFlashList.test.js.map +1 -0
  59. package/dist/__tests__/PlatformHelper.web.test.d.ts +2 -0
  60. package/dist/__tests__/PlatformHelper.web.test.d.ts.map +1 -0
  61. package/dist/__tests__/PlatformHelper.web.test.js +33 -0
  62. package/dist/__tests__/PlatformHelper.web.test.js.map +1 -0
  63. package/dist/__tests__/ViewabilityHelper.test.js +4 -3
  64. package/dist/__tests__/ViewabilityHelper.test.js.map +1 -1
  65. package/dist/__tests__/helpers/mountFlashList.d.ts +19 -0
  66. package/dist/__tests__/helpers/mountFlashList.d.ts.map +1 -0
  67. package/dist/__tests__/helpers/mountFlashList.js +44 -0
  68. package/dist/__tests__/helpers/mountFlashList.js.map +1 -0
  69. package/dist/__tests__/helpers/mountMasonryFlashList.d.ts +18 -0
  70. package/dist/__tests__/helpers/mountMasonryFlashList.d.ts.map +1 -0
  71. package/dist/__tests__/helpers/mountMasonryFlashList.js +49 -0
  72. package/dist/__tests__/helpers/mountMasonryFlashList.js.map +1 -0
  73. package/dist/__tests__/useBlankAreaTracker.test.d.ts +2 -0
  74. package/dist/__tests__/useBlankAreaTracker.test.d.ts.map +1 -0
  75. package/dist/__tests__/useBlankAreaTracker.test.js +179 -0
  76. package/dist/__tests__/useBlankAreaTracker.test.js.map +1 -0
  77. package/dist/benchmark/JSFPSMonitor.d.ts.map +1 -1
  78. package/dist/benchmark/JSFPSMonitor.js +1 -2
  79. package/dist/benchmark/JSFPSMonitor.js.map +1 -1
  80. package/dist/benchmark/useBenchmark.d.ts +4 -2
  81. package/dist/benchmark/useBenchmark.d.ts.map +1 -1
  82. package/dist/benchmark/useBenchmark.js +24 -12
  83. package/dist/benchmark/useBenchmark.js.map +1 -1
  84. package/dist/benchmark/useBlankAreaTracker.d.ts +34 -0
  85. package/dist/benchmark/useBlankAreaTracker.d.ts.map +1 -0
  86. package/dist/benchmark/useBlankAreaTracker.js +66 -0
  87. package/dist/benchmark/useBlankAreaTracker.js.map +1 -0
  88. package/dist/benchmark/useFlatListBenchmark.d.ts.map +1 -1
  89. package/dist/benchmark/useFlatListBenchmark.js +1 -2
  90. package/dist/benchmark/useFlatListBenchmark.js.map +1 -1
  91. package/dist/enableNewCore.d.ts +3 -0
  92. package/dist/enableNewCore.d.ts.map +1 -0
  93. package/dist/enableNewCore.js +25 -0
  94. package/dist/enableNewCore.js.map +1 -0
  95. package/dist/errors/CustomError.d.ts +8 -0
  96. package/dist/errors/CustomError.d.ts.map +1 -0
  97. package/dist/errors/CustomError.js +14 -0
  98. package/dist/errors/CustomError.js.map +1 -0
  99. package/dist/errors/ExceptionList.d.ts +24 -0
  100. package/dist/errors/ExceptionList.d.ts.map +1 -0
  101. package/dist/errors/ExceptionList.js +26 -0
  102. package/dist/errors/ExceptionList.js.map +1 -0
  103. package/dist/errors/Warnings.d.ts +9 -0
  104. package/dist/errors/Warnings.d.ts.map +1 -0
  105. package/dist/errors/Warnings.js +13 -0
  106. package/dist/errors/Warnings.js.map +1 -0
  107. package/dist/index.d.ts +9 -3
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +29 -7
  110. package/dist/index.js.map +1 -1
  111. package/dist/native/auto-layout/AutoLayoutView.d.ts +22 -0
  112. package/dist/native/auto-layout/AutoLayoutView.d.ts.map +1 -0
  113. package/dist/native/auto-layout/AutoLayoutView.js +48 -0
  114. package/dist/native/auto-layout/AutoLayoutView.js.map +1 -0
  115. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.d.ts +4 -0
  116. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.d.ts.map +1 -0
  117. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.js +6 -0
  118. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.js.map +1 -0
  119. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts +5 -0
  120. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts.map +1 -0
  121. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.d.ts +4 -0
  122. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.d.ts.map +1 -0
  123. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.js +6 -0
  124. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.js.map +1 -0
  125. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js +6 -0
  126. package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js.map +1 -0
  127. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts +16 -0
  128. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts.map +1 -0
  129. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js +3 -0
  130. package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js.map +1 -0
  131. package/dist/native/cell-container/CellContainer.android.d.ts +6 -0
  132. package/dist/native/cell-container/CellContainer.android.d.ts.map +1 -0
  133. package/dist/native/cell-container/CellContainer.android.js +9 -0
  134. package/dist/native/cell-container/CellContainer.android.js.map +1 -0
  135. package/dist/native/cell-container/CellContainer.d.ts +8 -0
  136. package/dist/native/cell-container/CellContainer.d.ts.map +1 -0
  137. package/dist/native/cell-container/CellContainer.ios.d.ts +6 -0
  138. package/dist/native/cell-container/CellContainer.ios.d.ts.map +1 -0
  139. package/dist/native/cell-container/CellContainer.ios.js +9 -0
  140. package/dist/native/cell-container/CellContainer.ios.js.map +1 -0
  141. package/dist/native/cell-container/CellContainer.js +11 -0
  142. package/dist/native/cell-container/CellContainer.js.map +1 -0
  143. package/dist/native/cell-container/CellContainer.web.d.ts +7 -0
  144. package/dist/native/cell-container/CellContainer.web.d.ts.map +1 -0
  145. package/dist/native/cell-container/CellContainer.web.js +13 -0
  146. package/dist/native/cell-container/CellContainer.web.js.map +1 -0
  147. package/dist/native/config/PlatformHelper.android.d.ts +22 -1
  148. package/dist/native/config/PlatformHelper.android.d.ts.map +1 -1
  149. package/dist/native/config/PlatformHelper.android.js +16 -1
  150. package/dist/native/config/PlatformHelper.android.js.map +1 -1
  151. package/dist/native/config/PlatformHelper.d.ts +22 -1
  152. package/dist/native/config/PlatformHelper.d.ts.map +1 -1
  153. package/dist/native/config/PlatformHelper.ios.d.ts +22 -1
  154. package/dist/native/config/PlatformHelper.ios.d.ts.map +1 -1
  155. package/dist/native/config/PlatformHelper.ios.js +15 -1
  156. package/dist/native/config/PlatformHelper.ios.js.map +1 -1
  157. package/dist/native/config/PlatformHelper.js +16 -1
  158. package/dist/native/config/PlatformHelper.js.map +1 -1
  159. package/dist/native/config/PlatformHelper.web.d.ts +23 -1
  160. package/dist/native/config/PlatformHelper.web.d.ts.map +1 -1
  161. package/dist/native/config/PlatformHelper.web.js +18 -1
  162. package/dist/native/config/PlatformHelper.web.js.map +1 -1
  163. package/dist/recyclerview/RecyclerView.d.ts.map +1 -1
  164. package/dist/recyclerview/RecyclerView.js +6 -6
  165. package/dist/recyclerview/RecyclerView.js.map +1 -1
  166. package/dist/recyclerview/RecyclerViewManager.d.ts.map +1 -1
  167. package/dist/recyclerview/RecyclerViewManager.js +8 -9
  168. package/dist/recyclerview/RecyclerViewManager.js.map +1 -1
  169. package/dist/recyclerview/RecyclerViewProps.d.ts +8 -1
  170. package/dist/recyclerview/RecyclerViewProps.d.ts.map +1 -1
  171. package/dist/recyclerview/helpers/RenderTimeTracker.d.ts +3 -0
  172. package/dist/recyclerview/helpers/RenderTimeTracker.d.ts.map +1 -1
  173. package/dist/recyclerview/helpers/RenderTimeTracker.js +7 -0
  174. package/dist/recyclerview/helpers/RenderTimeTracker.js.map +1 -1
  175. package/dist/recyclerview/hooks/useRecyclerViewController.d.ts.map +1 -1
  176. package/dist/recyclerview/hooks/useRecyclerViewController.js +0 -4
  177. package/dist/recyclerview/hooks/useRecyclerViewController.js.map +1 -1
  178. package/dist/recyclerview/layout-managers/LayoutManager.d.ts.map +1 -1
  179. package/dist/recyclerview/layout-managers/LayoutManager.js +1 -2
  180. package/dist/recyclerview/layout-managers/LayoutManager.js.map +1 -1
  181. package/dist/specs/AutoLayoutNativeComponent.d.ts +18 -0
  182. package/dist/specs/AutoLayoutNativeComponent.d.ts.map +1 -0
  183. package/dist/specs/AutoLayoutNativeComponent.js +6 -0
  184. package/dist/specs/AutoLayoutNativeComponent.js.map +1 -0
  185. package/dist/specs/CellContainerNativeComponent.d.ts +8 -0
  186. package/dist/specs/CellContainerNativeComponent.d.ts.map +1 -0
  187. package/dist/specs/CellContainerNativeComponent.js +6 -0
  188. package/dist/specs/CellContainerNativeComponent.js.map +1 -0
  189. package/dist/tsconfig.tsbuildinfo +1 -1
  190. package/dist/utils/ContentContainerUtils.d.ts +27 -0
  191. package/dist/utils/ContentContainerUtils.d.ts.map +1 -0
  192. package/dist/utils/ContentContainerUtils.js +48 -0
  193. package/dist/utils/ContentContainerUtils.js.map +1 -0
  194. package/dist/viewability/ViewToken.d.ts.map +1 -0
  195. package/dist/viewability/ViewToken.js.map +1 -0
  196. package/dist/{recyclerview/viewability → viewability}/ViewabilityHelper.d.ts +2 -2
  197. package/dist/viewability/ViewabilityHelper.d.ts.map +1 -0
  198. package/dist/{recyclerview/viewability → viewability}/ViewabilityHelper.js +4 -2
  199. package/dist/{recyclerview/viewability → viewability}/ViewabilityHelper.js.map +1 -1
  200. package/dist/{recyclerview/viewability → viewability}/ViewabilityManager.d.ts +3 -3
  201. package/dist/viewability/ViewabilityManager.d.ts.map +1 -0
  202. package/dist/{recyclerview/viewability → viewability}/ViewabilityManager.js +16 -16
  203. package/dist/viewability/ViewabilityManager.js.map +1 -0
  204. package/ios/RNFlashList.xcodeproj/project.pbxproj +3 -0
  205. package/ios/RNFlashList.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  206. package/ios/Sources/AutoLayoutView.swift +294 -0
  207. package/ios/Sources/AutoLayoutViewComponentView.h +16 -0
  208. package/ios/Sources/AutoLayoutViewComponentView.mm +90 -0
  209. package/ios/Sources/AutoLayoutViewManager.mm +14 -0
  210. package/ios/Sources/AutoLayoutViewManager.swift +12 -0
  211. package/ios/Sources/CellContainerComponentView.h +18 -0
  212. package/ios/Sources/CellContainerComponentView.mm +62 -0
  213. package/ios/Sources/CellContainerManager.mm +8 -0
  214. package/ios/Sources/CellContainerManager.swift +12 -0
  215. package/ios/Sources/FlatListPro-Bridging-Header.h +11 -0
  216. package/ios/Tests/AutoLayoutViewTests.swift +113 -0
  217. package/package.json +14 -3
  218. package/src/AnimatedFlashList.ts +2 -2
  219. package/src/FlashList.tsx +953 -0
  220. package/src/FlashListProps.ts +79 -3
  221. package/src/GridLayoutProviderWithProps.ts +180 -0
  222. package/src/MasonryFlashList.tsx +476 -0
  223. package/src/PureComponentWrapper.tsx +42 -0
  224. package/src/__tests__/ContentContainerUtils.test.ts +130 -0
  225. package/src/__tests__/FlashList.test.tsx +1001 -0
  226. package/src/__tests__/GridLayoutProviderWithProps.test.ts +179 -0
  227. package/src/__tests__/MasonryFlashList.test.ts +292 -0
  228. package/src/__tests__/PlatformHelper.web.test.ts +45 -0
  229. package/src/__tests__/ViewabilityHelper.test.ts +14 -13
  230. package/src/__tests__/helpers/mountFlashList.tsx +62 -0
  231. package/src/__tests__/helpers/mountMasonryFlashList.tsx +70 -0
  232. package/src/__tests__/useBlankAreaTracker.test.tsx +206 -0
  233. package/src/benchmark/JSFPSMonitor.ts +3 -3
  234. package/src/benchmark/useBenchmark.ts +40 -12
  235. package/src/benchmark/useBlankAreaTracker.ts +117 -0
  236. package/src/benchmark/useFlatListBenchmark.ts +1 -3
  237. package/src/enableNewCore.ts +24 -0
  238. package/src/errors/CustomError.ts +10 -0
  239. package/src/errors/ExceptionList.ts +28 -0
  240. package/src/errors/Warnings.ts +15 -0
  241. package/src/index.ts +43 -7
  242. package/src/native/auto-layout/AutoLayoutView.tsx +73 -0
  243. package/src/native/auto-layout/AutoLayoutViewNativeComponent.android.ts +7 -0
  244. package/src/native/auto-layout/AutoLayoutViewNativeComponent.ios.ts +7 -0
  245. package/src/native/auto-layout/AutoLayoutViewNativeComponent.ts +7 -0
  246. package/src/native/auto-layout/AutoLayoutViewNativeComponentProps.ts +17 -0
  247. package/src/native/cell-container/CellContainer.android.ts +7 -0
  248. package/src/native/cell-container/CellContainer.ios.ts +7 -0
  249. package/src/native/cell-container/CellContainer.tsx +14 -0
  250. package/src/native/cell-container/CellContainer.web.tsx +9 -0
  251. package/src/native/config/PlatformHelper.android.ts +25 -1
  252. package/src/native/config/PlatformHelper.ios.ts +24 -1
  253. package/src/native/config/PlatformHelper.ts +25 -1
  254. package/src/native/config/PlatformHelper.web.ts +30 -1
  255. package/src/recyclerview/RecyclerView.tsx +11 -6
  256. package/src/recyclerview/RecyclerViewManager.ts +18 -9
  257. package/src/recyclerview/RecyclerViewProps.ts +11 -1
  258. package/src/recyclerview/helpers/RenderTimeTracker.ts +8 -0
  259. package/src/recyclerview/hooks/useRecyclerViewController.tsx +0 -4
  260. package/src/recyclerview/layout-managers/LayoutManager.ts +1 -2
  261. package/src/specs/AutoLayoutNativeComponent.ts +24 -0
  262. package/src/specs/CellContainerNativeComponent.ts +9 -0
  263. package/src/utils/ContentContainerUtils.ts +92 -0
  264. package/src/{recyclerview/viewability → viewability}/ViewabilityHelper.ts +9 -8
  265. package/src/{recyclerview/viewability → viewability}/ViewabilityManager.ts +20 -18
  266. package/dist/errors/ErrorMessages.d.ts +0 -16
  267. package/dist/errors/ErrorMessages.d.ts.map +0 -1
  268. package/dist/errors/ErrorMessages.js +0 -19
  269. package/dist/errors/ErrorMessages.js.map +0 -1
  270. package/dist/errors/WarningMessages.d.ts +0 -4
  271. package/dist/errors/WarningMessages.d.ts.map +0 -1
  272. package/dist/errors/WarningMessages.js +0 -7
  273. package/dist/errors/WarningMessages.js.map +0 -1
  274. package/dist/isNewArch.d.ts +0 -2
  275. package/dist/isNewArch.d.ts.map +0 -1
  276. package/dist/isNewArch.js +0 -25
  277. package/dist/isNewArch.js.map +0 -1
  278. package/dist/recyclerview/viewability/ViewToken.d.ts.map +0 -1
  279. package/dist/recyclerview/viewability/ViewToken.js.map +0 -1
  280. package/dist/recyclerview/viewability/ViewabilityHelper.d.ts.map +0 -1
  281. package/dist/recyclerview/viewability/ViewabilityManager.d.ts.map +0 -1
  282. package/dist/recyclerview/viewability/ViewabilityManager.js.map +0 -1
  283. package/src/FlashList.ts +0 -1
  284. package/src/errors/ErrorMessages.ts +0 -26
  285. package/src/errors/WarningMessages.ts +0 -4
  286. package/src/isNewArch.ts +0 -25
  287. /package/dist/{recyclerview/viewability → viewability}/ViewToken.d.ts +0 -0
  288. /package/dist/{recyclerview/viewability → viewability}/ViewToken.js +0 -0
  289. /package/src/{recyclerview/viewability → viewability}/ViewToken.ts +0 -0
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useBlankAreaTracker = useBlankAreaTracker;
4
+ var react_1 = require("react");
5
+ /**
6
+ * Can be used to track visible blank area in production
7
+ * @param flashListRef Ref to the FlashList component
8
+ * @param onBlankAreaChange This event handler will be called when the blank area changes
9
+ * @param config additional configuration for the blank area tracker
10
+ * @returns blankAreaTrackerResult - maxBlankArea, cumulativeBlankArea this object is mutated and kept up to date. Also returns a callback that needs to be forwarded to FlashList.
11
+ */
12
+ function useBlankAreaTracker(flashListRef, onBlankAreaChange, config) {
13
+ var _a;
14
+ var startDelay = (_a = config === null || config === void 0 ? void 0 : config.startDelayInMs) !== null && _a !== void 0 ? _a : 1000;
15
+ var blankAreaResult = (0, react_1.useRef)({
16
+ maxBlankArea: 0,
17
+ cumulativeBlankArea: 0,
18
+ }).current;
19
+ var waitOperations = (0, react_1.useRef)({ inProgress: false, complete: false }).current;
20
+ var onBlankAreaChangeRef = (0, react_1.useRef)(onBlankAreaChange);
21
+ onBlankAreaChangeRef.current = onBlankAreaChange;
22
+ var blankAreaTracker = (0, react_1.useCallback)(function (event) {
23
+ var _a, _b;
24
+ // we're ignoring some of the events that will be fired on list load
25
+ // initial events are fired on mount and thus, this won't lead to missing events during scroll
26
+ if (!waitOperations.complete && startDelay > 0) {
27
+ if (!waitOperations.inProgress) {
28
+ waitOperations.inProgress = true;
29
+ setTimeout(function () {
30
+ waitOperations.complete = true;
31
+ }, startDelay);
32
+ }
33
+ return;
34
+ }
35
+ var rlv = (_a = flashListRef.current) === null || _a === void 0 ? void 0 : _a.recyclerlistview_unsafe;
36
+ var horizontal = Boolean((_b = flashListRef.current) === null || _b === void 0 ? void 0 : _b.props.horizontal);
37
+ if (rlv) {
38
+ processBlankAreaChange(rlv, horizontal, blankAreaResult, event, onBlankAreaChangeRef.current, config);
39
+ }
40
+ },
41
+ // eslint-disable-next-line react-hooks/exhaustive-deps
42
+ [flashListRef]);
43
+ return [blankAreaResult, blankAreaTracker];
44
+ }
45
+ function processBlankAreaChange(rlv, horizontal, blankAreaResult, event, onBlankAreaChange, config) {
46
+ var listSize = horizontal
47
+ ? rlv.getRenderedSize().width
48
+ : rlv.getRenderedSize().height;
49
+ var contentSize = horizontal
50
+ ? rlv.getContentDimension().width
51
+ : rlv.getContentDimension().height;
52
+ // ignores blank events when there isn't enough content to fill the list
53
+ if (contentSize > listSize) {
54
+ var lastMaxBlankArea = blankAreaResult.maxBlankArea;
55
+ var lastCumulativeBlankArea = blankAreaResult.cumulativeBlankArea;
56
+ blankAreaResult.maxBlankArea = Math.max(blankAreaResult.maxBlankArea, event.blankArea, 0);
57
+ blankAreaResult.cumulativeBlankArea += (config === null || config === void 0 ? void 0 : config.sumNegativeValues)
58
+ ? event.blankArea
59
+ : Math.max(event.blankArea, 0);
60
+ if (lastCumulativeBlankArea !== blankAreaResult.cumulativeBlankArea ||
61
+ lastMaxBlankArea !== blankAreaResult.maxBlankArea) {
62
+ onBlankAreaChange === null || onBlankAreaChange === void 0 ? void 0 : onBlankAreaChange(blankAreaResult);
63
+ }
64
+ }
65
+ }
66
+ //# sourceMappingURL=useBlankAreaTracker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBlankAreaTracker.js","sourceRoot":"","sources":["../../src/benchmark/useBlankAreaTracker.ts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AC;QACvC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFlatListBenchmark.d.ts","sourceRoot":"","sources":["../../src/benchmark/useFlatListBenchmark.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAMxC,OAAO,EACL,eAAe,EACf,eAAe,EAEhB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAC3C,QAAQ,EAAE,CAAC,eAAe,EAAE,eAAe,KAAK,IAAI,EACpD,MAAM,EAAE,uBAAuB,WAsChC"}
1
+ {"version":3,"file":"useFlatListBenchmark.d.ts","sourceRoot":"","sources":["../../src/benchmark/useFlatListBenchmark.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAIxC,OAAO,EACL,eAAe,EACf,eAAe,EAEhB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAC3C,QAAQ,EAAE,CAAC,eAAe,EAAE,eAAe,KAAK,IAAI,EACpD,MAAM,EAAE,uBAAuB,WAsChC"}
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useFlatListBenchmark = useFlatListBenchmark;
4
4
  var tslib_1 = require("tslib");
5
5
  var react_1 = require("react");
6
- var ErrorMessages_1 = require("../errors/ErrorMessages");
7
6
  var AutoScrollHelper_1 = require("./AutoScrollHelper");
8
7
  var JSFPSMonitor_1 = require("./JSFPSMonitor");
9
8
  var useBenchmark_1 = require("./useBenchmark");
@@ -19,7 +18,7 @@ function useFlatListBenchmark(flatListRef, callback, params) {
19
18
  var cancellable = new AutoScrollHelper_1.Cancellable();
20
19
  if (flatListRef.current && flatListRef.current.props) {
21
20
  if (!(Number((_a = flatListRef.current.props.data) === null || _a === void 0 ? void 0 : _a.length) > 0)) {
22
- throw new Error(ErrorMessages_1.ErrorMessages.dataEmptyCannotRunBenchmark);
21
+ throw new Error("Data is empty, cannot run benchmark");
23
22
  }
24
23
  }
25
24
  var cancelTimeout = setTimeout(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
@@ -1 +1 @@
1
- {"version":3,"file":"useFlatListBenchmark.js","sourceRoot":"","sources":["../../src/benchmark/useFlatListBenchmark.ts"],"names":[],"mappings":";;AAsBA,oDAyCC;;AA/DD,+BAAkC;AAGlC,yDAAwD;AAExD,uDAA6D;AAC7D,+CAA8C;AAC9C,+CAIwB;AAMxB;;;;GAIG;AACH,SAAgB,oBAAoB,CAClC,WAA2C,EAC3C,QAAoD,EACpD,MAA+B;IAHjC,iBAyCC;IApCC,IAAA,iBAAS,EAAC;;QACR,IAAM,WAAW,GAAG,IAAI,8BAAW,EAAE,CAAC;QACtC,IAAI,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACrD,IAAI,CAAC,CAAC,MAAM,CAAC,MAAA,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,0CAAE,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBAC1D,MAAM,IAAI,KAAK,CAAC,6BAAa,CAAC,2BAA2B,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC;QACD,IAAM,aAAa,GAAG,UAAU,CAAC;;;;;wBACzB,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC;wBACxC,YAAY,CAAC,aAAa,EAAE,CAAC;wBACpB,CAAC,GAAG,CAAC;;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AAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;oBAEpC,SAAS,GAAG,UAAC,CAAS,EAAE,CAAS;;wBACrC,MAAA,WAAW,CAAC,OAAO,0CAAE,cAAc,CAAC;4BAClC,MAAM,EAAE,YAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC1B,QAAQ,EAAE,KAAK;yBAChB,CAAC,CAAC;oBACL,CAAC,CAAC;oBAEF,qBAAM,IAAA,6BAAU,EACd,SAAS,EACT,KAAK,EACL,KAAK,EACL,GAAG,EACH,GAAG,EACH,qBAAqB,EACrB,WAAW,CACZ,EAAA;;oBARD,SAQC,CAAC;oBACF,qBAAM,IAAA,6BAAU,EACd,SAAS,EACT,GAAG,EACH,GAAG,EACH,KAAK,EACL,KAAK,EACL,qBAAqB,EACrB,WAAW,CACZ,EAAA;;oBARD,SAQC,CAAC;;;;;;CAEL"}
1
+ {"version":3,"file":"useFlatListBenchmark.js","sourceRoot":"","sources":["../../src/benchmark/useFlatListBenchmark.ts"],"names":[],"mappings":";;AAoBA,oDAyCC;;AA7DD,+BAAkC;AAGlC,uDAA6D;AAC7D,+CAA8C;AAC9C,+CAIwB;AAMxB;;;;GAIG;AACH,SAAgB,oBAAoB,CAClC,WAA2C,EAC3C,QAAoD,EACpD,MAA+B;IAHjC,iBAyCC;IApCC,IAAA,iBAAS,EAAC;;QACR,IAAM,WAAW,GAAG,IAAI,8BAAW,EAAE,CAAC;QACtC,IAAI,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACrD,IAAI,CAAC,CAAC,MAAM,CAAC,MAAA,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,0CAAE,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBAC1D,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;QACD,IAAM,aAAa,GAAG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ACV,KAAK,GAAG,CAAC,CAAC;oBACV,GAAG,GAAG,YAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;oBACpC,GAAG,GAAG,YAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;oBAEpC,SAAS,GAAG,UAAC,CAAS,EAAE,CAAS;;wBACrC,MAAA,WAAW,CAAC,OAAO,0CAAE,cAAc,CAAC;4BAClC,MAAM,EAAE,YAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC1B,QAAQ,EAAE,KAAK;yBAChB,CAAC,CAAC;oBACL,CAAC,CAAC;oBAEF,qBAAM,IAAA,6BAAU,EACd,SAAS,EACT,KAAK,EACL,KAAK,EACL,GAAG,EACH,GAAG,EACH,qBAAqB,EACrB,WAAW,CACZ,EAAA;;oBARD,SAQC,CAAC;oBACF,qBAAM,IAAA,6BAAU,EACd,SAAS,EACT,GAAG,EACH,GAAG,EACH,KAAK,EACL,KAAK,EACL,qBAAqB,EACrB,WAAW,CACZ,EAAA;;oBARD,SAQC,CAAC;;;;;;CAEL"}
@@ -0,0 +1,3 @@
1
+ export declare function enableNewCore(enable: boolean): void;
2
+ export declare function isNewCoreEnabled(): boolean;
3
+ //# sourceMappingURL=enableNewCore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enableNewCore.d.ts","sourceRoot":"","sources":["../src/enableNewCore.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,QAE5C;AAED,wBAAgB,gBAAgB,YAE/B"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enableNewCore = enableNewCore;
4
+ exports.isNewCoreEnabled = isNewCoreEnabled;
5
+ var react_native_1 = require("react-native");
6
+ var useNewCore;
7
+ function enableNewCore(enable) {
8
+ useNewCore = enable;
9
+ }
10
+ function isNewCoreEnabled() {
11
+ return useNewCore !== null && useNewCore !== void 0 ? useNewCore : isReactNativeNewArchitecture();
12
+ }
13
+ function isReactNativeNewArchitecture() {
14
+ try {
15
+ // Check for Fabric UI Manager
16
+ var hasFabricUIManager = Boolean(global === null || global === void 0 ? void 0 : global.nativeFabricUIManager);
17
+ // Check for TurboModule system
18
+ var hasTurboModule = Boolean(global === null || global === void 0 ? void 0 : global.__turboModuleProxy);
19
+ return hasFabricUIManager || hasTurboModule || react_native_1.Platform.OS === "web";
20
+ }
21
+ catch (_a) {
22
+ return false;
23
+ }
24
+ }
25
+ //# sourceMappingURL=enableNewCore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enableNewCore.js","sourceRoot":"","sources":["../src/enableNewCore.ts"],"names":[],"mappings":";;AAGA,sCAEC;AAED,4CAEC;AATD,6CAAwC;AAExC,IAAI,UAA+B,CAAC;AACpC,SAAgB,aAAa,CAAC,MAAe;IAC3C,UAAU,GAAG,MAAM,CAAC;AACtB,CAAC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,4BAA4B,EAAE,CAAC;AACtD,CAAC;AAED,SAAS,4BAA4B;IACnC,IAAI,CAAC;QACH,8BAA8B;QAC9B,IAAM,kBAAkB,GAAG,OAAO,CAAE,MAAc,aAAd,MAAM,uBAAN,MAAM,CAAU,qBAAqB,CAAC,CAAC;QAE3E,+BAA+B;QAC/B,IAAM,cAAc,GAAG,OAAO,CAAE,MAAc,aAAd,MAAM,uBAAN,MAAM,CAAU,kBAAkB,CAAC,CAAC;QAEpE,OAAO,kBAAkB,IAAI,cAAc,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;IACvE,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ export default class CustomError extends Error {
2
+ constructor(exception: Exception);
3
+ }
4
+ export interface Exception {
5
+ type: string;
6
+ message: string;
7
+ }
8
+ //# sourceMappingURL=CustomError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomError.d.ts","sourceRoot":"","sources":["../../src/errors/CustomError.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,KAAK;gBAChC,SAAS,EAAE,SAAS;CAIjC;AACD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var CustomError = /** @class */ (function (_super) {
5
+ tslib_1.__extends(CustomError, _super);
6
+ function CustomError(exception) {
7
+ var _this = _super.call(this, "".concat(exception.type, ": ").concat(exception.message)) || this;
8
+ _this.name = exception.type;
9
+ return _this;
10
+ }
11
+ return CustomError;
12
+ }(Error));
13
+ exports.default = CustomError;
14
+ //# sourceMappingURL=CustomError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomError.js","sourceRoot":"","sources":["../../src/errors/CustomError.ts"],"names":[],"mappings":";;;AAAA;IAAyC,uCAAK;IAC5C,qBAAY,SAAoB;QAC9B,YAAA,MAAK,YAAC,UAAG,SAAS,CAAC,IAAI,eAAK,SAAS,CAAC,OAAO,CAAE,CAAC,SAAC;QACjD,KAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;;IAC7B,CAAC;IACH,kBAAC;AAAD,CAAC,AALD,CAAyC,KAAK,GAK7C"}
@@ -0,0 +1,24 @@
1
+ declare const ExceptionList: {
2
+ refreshBooleanMissing: {
3
+ message: string;
4
+ type: string;
5
+ };
6
+ stickyWhileHorizontalNotSupported: {
7
+ message: string;
8
+ type: string;
9
+ };
10
+ columnsWhileHorizontalNotSupported: {
11
+ message: string;
12
+ type: string;
13
+ };
14
+ multipleViewabilityThresholdTypesNotSupported: {
15
+ message: string;
16
+ type: string;
17
+ };
18
+ overrideItemLayoutRequiredForMasonryOptimization: {
19
+ message: string;
20
+ type: string;
21
+ };
22
+ };
23
+ export default ExceptionList;
24
+ //# sourceMappingURL=ExceptionList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExceptionList.d.ts","sourceRoot":"","sources":["../../src/errors/ExceptionList.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;CA0BlB,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var ExceptionList = {
4
+ refreshBooleanMissing: {
5
+ message: "`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `undefined`.",
6
+ type: "InvariantViolation",
7
+ },
8
+ stickyWhileHorizontalNotSupported: {
9
+ message: "sticky headers are not supported when list is in horizontal mode. Remove `stickyHeaderIndices` prop.",
10
+ type: "NotSupportedException",
11
+ },
12
+ columnsWhileHorizontalNotSupported: {
13
+ message: "numColumns is not supported when list is in horizontal mode. Please remove or set numColumns to 1.",
14
+ type: "NotSupportedException",
15
+ },
16
+ multipleViewabilityThresholdTypesNotSupported: {
17
+ message: "You can set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold. Specifying both is not supported.",
18
+ type: "MultipleViewabilityThresholdTypesException",
19
+ },
20
+ overrideItemLayoutRequiredForMasonryOptimization: {
21
+ message: "optimizeItemArrangement has been enabled on `MasonryFlashList` but overrideItemLayout is not set.",
22
+ type: "InvariantViolation",
23
+ },
24
+ };
25
+ exports.default = ExceptionList;
26
+ //# sourceMappingURL=ExceptionList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExceptionList.js","sourceRoot":"","sources":["../../src/errors/ExceptionList.ts"],"names":[],"mappings":";;AAAA,IAAM,aAAa,GAAG;IACpB,qBAAqB,EAAE;QACrB,OAAO,EACL,8FAA8F;QAChG,IAAI,EAAE,oBAAoB;KAC3B;IACD,iCAAiC,EAAE;QACjC,OAAO,EACL,sGAAsG;QACxG,IAAI,EAAE,uBAAuB;KAC9B;IACD,kCAAkC,EAAE;QAClC,OAAO,EACL,oGAAoG;QACtG,IAAI,EAAE,uBAAuB;KAC9B;IACD,6CAA6C,EAAE;QAC7C,OAAO,EACL,+HAA+H;QACjI,IAAI,EAAE,4CAA4C;KACnD;IACD,gDAAgD,EAAE;QAChD,OAAO,EACL,mGAAmG;QACrG,IAAI,EAAE,oBAAoB;KAC3B;CACF,CAAC;AACF,kBAAe,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ declare const WarningList: {
2
+ styleUnsupported: string;
3
+ styleContentContainerUnsupported: string;
4
+ unusableRenderedSize: string;
5
+ missingKeyExtractor: string;
6
+ estimatedItemSizeMissingWarning: string;
7
+ };
8
+ export default WarningList;
9
+ //# sourceMappingURL=Warnings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Warnings.d.ts","sourceRoot":"","sources":["../../src/errors/Warnings.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;CAahB,CAAC;AACF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var WarningList = {
4
+ styleUnsupported: "You have passed a style to FlashList. This list doesn't support styling, use contentContainerStyle or wrap the list in a parent and apply style to it instead.",
5
+ styleContentContainerUnsupported: "FlashList only supports padding related props and backgroundColor in contentContainerStyle. Please remove other values as they're not used.",
6
+ unusableRenderedSize: "FlashList's rendered size is not usable. Either the height or width is too small (<2px). " +
7
+ "Please make sure that the parent view of the list has a valid size. FlashList will match the size of the parent.",
8
+ missingKeyExtractor: "FlashList requires a keyExtractor prop to be defined when animating elements. Without it, the animations will not run as expected.",
9
+ estimatedItemSizeMissingWarning: "estimatedItemSize FlashList prop is not defined - based on current configuration you can set it to @size to optimize list performance. " +
10
+ "Refer to FlashList documentation for more details.",
11
+ };
12
+ exports.default = WarningList;
13
+ //# sourceMappingURL=Warnings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Warnings.js","sourceRoot":"","sources":["../../src/errors/Warnings.ts"],"names":[],"mappings":";;AAAA,IAAM,WAAW,GAAG;IAClB,gBAAgB,EACd,gKAAgK;IAClK,gCAAgC,EAC9B,6IAA6I;IAC/I,oBAAoB,EAClB,2FAA2F;QAC3F,kHAAkH;IACpH,mBAAmB,EACjB,oIAAoI;IACtI,+BAA+B,EAC7B,yIAAyI;QACzI,oDAAoD;CACvD,CAAC;AACF,kBAAe,WAAW,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,16 +1,22 @@
1
- export { FlashList } from "./FlashList";
1
+ export { default as FlashList } from "./FlashList";
2
2
  export { FlashListRef } from "./FlashListRef";
3
- export { FlashListProps, ListRenderItem, ListRenderItemInfo, RenderTarget, RenderTargetOptions, } from "./FlashListProps";
3
+ export { FlashListProps, ContentStyle, ListRenderItem, ListRenderItemInfo, RenderTarget, RenderTargetOptions, } from "./FlashListProps";
4
4
  export { default as AnimatedFlashList } from "./AnimatedFlashList";
5
+ export { useOnNativeBlankAreaEvents, BlankAreaEventHandler, BlankAreaEvent, } from "./native/auto-layout/AutoLayoutView";
5
6
  export { useBenchmark, BenchmarkParams, BenchmarkResult, } from "./benchmark/useBenchmark";
6
7
  export { useDataMultiplier } from "./benchmark/useDataMultiplier";
7
8
  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";
8
11
  export { useLayoutState } from "./recyclerview/hooks/useLayoutState";
9
12
  export { useRecyclingState } from "./recyclerview/hooks/useRecyclingState";
10
13
  export { useMappingHelper } from "./recyclerview/hooks/useMappingHelper";
11
14
  export { JSFPSMonitor, JSFPSResult } from "./benchmark/JSFPSMonitor";
12
15
  export { autoScroll, Cancellable } from "./benchmark/AutoScrollHelper";
13
- export { default as ViewToken } from "./recyclerview/viewability/ViewToken";
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";
14
20
  export { useFlashListContext } from "./recyclerview/RecyclerViewContextProvider";
15
21
  export { LayoutCommitObserver, LayoutCommitObserverProps, } from "./recyclerview/LayoutCommitObserver";
16
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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,W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,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;AACjF,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,qCAAqC,CAAC"}
package/dist/index.js CHANGED
@@ -1,22 +1,31 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
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;
4
+ exports.LayoutCommitObserver = 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;
4
5
  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");
5
10
  // Keep this unmodified for TS type checking
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; } });
11
+ var FlashList_2 = require("./FlashList");
12
+ Object.defineProperty(exports, "FlashList", { enumerable: true, get: function () { return tslib_1.__importDefault(FlashList_2).default; } });
10
13
  var FlashListProps_1 = require("./FlashListProps");
11
14
  Object.defineProperty(exports, "RenderTargetOptions", { enumerable: true, get: function () { return FlashListProps_1.RenderTargetOptions; } });
12
15
  var AnimatedFlashList_1 = require("./AnimatedFlashList");
13
16
  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; } });
14
19
  var useBenchmark_1 = require("./benchmark/useBenchmark");
15
20
  Object.defineProperty(exports, "useBenchmark", { enumerable: true, get: function () { return useBenchmark_1.useBenchmark; } });
16
21
  var useDataMultiplier_1 = require("./benchmark/useDataMultiplier");
17
22
  Object.defineProperty(exports, "useDataMultiplier", { enumerable: true, get: function () { return useDataMultiplier_1.useDataMultiplier; } });
18
23
  var useFlatListBenchmark_1 = require("./benchmark/useFlatListBenchmark");
19
24
  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; } });
20
29
  var useLayoutState_1 = require("./recyclerview/hooks/useLayoutState");
21
30
  Object.defineProperty(exports, "useLayoutState", { enumerable: true, get: function () { return useLayoutState_1.useLayoutState; } });
22
31
  var useRecyclingState_1 = require("./recyclerview/hooks/useRecyclingState");
@@ -28,11 +37,24 @@ Object.defineProperty(exports, "JSFPSMonitor", { enumerable: true, get: function
28
37
  var AutoScrollHelper_1 = require("./benchmark/AutoScrollHelper");
29
38
  Object.defineProperty(exports, "autoScroll", { enumerable: true, get: function () { return AutoScrollHelper_1.autoScroll; } });
30
39
  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; } });
31
44
  var RecyclerViewContextProvider_1 = require("./recyclerview/RecyclerViewContextProvider");
32
45
  Object.defineProperty(exports, "useFlashListContext", { enumerable: true, get: function () { return RecyclerViewContextProvider_1.useFlashListContext; } });
33
46
  var LayoutCommitObserver_1 = require("./recyclerview/LayoutCommitObserver");
34
47
  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);
48
+ // @ts-ignore - This is ignored by TypeScript but will be present in the compiled JS
49
+ // In the compiled JS, this will override the previous FlashList export with a conditional one
50
+ if (typeof module !== "undefined" &&
51
+ module.exports &&
52
+ ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) !== "test") {
53
+ Object.defineProperty(module.exports, "FlashList", {
54
+ get: function () {
55
+ return (0, enableNewCore_1.isNewCoreEnabled)() ? RecyclerView_1.RecyclerView : FlashList_1.default;
56
+ },
57
+ configurable: true,
58
+ });
37
59
  }
38
60
  //# 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,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"}
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;AAC5B,4EAG6C;AAF3C,4HAAA,oBAAoB,OAAA;AAItB,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"}
@@ -0,0 +1,22 @@
1
+ import React, { ReactNode } from "react";
2
+ import { LayoutChangeEvent } from "react-native";
3
+ export type BlankAreaEventHandler = (blankAreaEvent: BlankAreaEvent) => void;
4
+ export declare const useOnNativeBlankAreaEvents: (onBlankAreaEvent: (blankAreaEvent: BlankAreaEvent) => void) => void;
5
+ export interface BlankAreaEvent {
6
+ offsetStart: number;
7
+ offsetEnd: number;
8
+ blankArea: number;
9
+ }
10
+ export interface AutoLayoutViewProps {
11
+ children?: ReactNode;
12
+ onBlankAreaEvent?: BlankAreaEventHandler;
13
+ onLayout?: (event: LayoutChangeEvent) => void;
14
+ disableAutoLayout?: boolean;
15
+ }
16
+ declare class AutoLayoutView extends React.Component<AutoLayoutViewProps> {
17
+ private onBlankAreaEventCallback;
18
+ private broadcastBlankEvent;
19
+ render(): React.JSX.Element;
20
+ }
21
+ export default AutoLayoutView;
22
+ //# sourceMappingURL=AutoLayoutView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutView.d.ts","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKjD,MAAM,MAAM,qBAAqB,GAAG,CAAC,cAAc,EAAE,cAAc,KAAK,IAAI,CAAC;AAG7E,eAAO,MAAM,0BAA0B,GACrC,kBAAkB,CAAC,cAAc,EAAE,cAAc,KAAK,IAAI,SAQ3D,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,cAAM,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC;IAC/D,OAAO,CAAC,wBAAwB,CAa9B;IAEF,OAAO,CAAC,mBAAmB;IAO3B,MAAM;CAcP;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useOnNativeBlankAreaEvents = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
+ var AutoLayoutViewNativeComponent_1 = tslib_1.__importDefault(require("./AutoLayoutViewNativeComponent"));
7
+ var listeners = [];
8
+ var useOnNativeBlankAreaEvents = function (onBlankAreaEvent) {
9
+ (0, react_1.useEffect)(function () {
10
+ listeners.push(onBlankAreaEvent);
11
+ return function () {
12
+ listeners.filter(function (callback) { return callback !== onBlankAreaEvent; });
13
+ };
14
+ }, [onBlankAreaEvent]);
15
+ };
16
+ exports.useOnNativeBlankAreaEvents = useOnNativeBlankAreaEvents;
17
+ var AutoLayoutView = /** @class */ (function (_super) {
18
+ tslib_1.__extends(AutoLayoutView, _super);
19
+ function AutoLayoutView() {
20
+ var _this = _super.apply(this, tslib_1.__spreadArray([], tslib_1.__read(arguments), false)) || this;
21
+ _this.onBlankAreaEventCallback = function (_a) {
22
+ var nativeEvent = _a.nativeEvent;
23
+ var blankArea = Math.max(nativeEvent.offsetStart, nativeEvent.offsetEnd);
24
+ var blankEventValue = {
25
+ blankArea: blankArea,
26
+ offsetStart: nativeEvent.offsetStart,
27
+ offsetEnd: nativeEvent.offsetEnd,
28
+ };
29
+ _this.broadcastBlankEvent(blankEventValue);
30
+ if (_this.props.onBlankAreaEvent) {
31
+ _this.props.onBlankAreaEvent(blankEventValue);
32
+ }
33
+ };
34
+ return _this;
35
+ }
36
+ AutoLayoutView.prototype.broadcastBlankEvent = function (value) {
37
+ var len = listeners.length;
38
+ for (var i = 0; i < len; i++) {
39
+ listeners[i](value);
40
+ }
41
+ };
42
+ AutoLayoutView.prototype.render = function () {
43
+ return (react_1.default.createElement(AutoLayoutViewNativeComponent_1.default, tslib_1.__assign({}, this.props, { onBlankAreaEvent: this.onBlankAreaEventCallback, enableInstrumentation: listeners.length !== 0 || Boolean(this.props.onBlankAreaEvent), disableAutoLayout: this.props.disableAutoLayout }), this.props.children));
44
+ };
45
+ return AutoLayoutView;
46
+ }(react_1.default.Component));
47
+ exports.default = AutoLayoutView;
48
+ //# sourceMappingURL=AutoLayoutView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutView.js","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutView.tsx"],"names":[],"mappings":";;;;AAAA,qDAAoD;AAGpD,0GAA4E;AAI5E,IAAM,SAAS,GAA4B,EAAE,CAAC;AAEvC,IAAM,0BAA0B,GAAG,UACxC,gBAA0D;IAE1D,IAAA,iBAAS,EAAC;QACR,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACjC,OAAO;YACL,SAAS,CAAC,MAAM,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,KAAK,gBAAgB,EAA7B,CAA6B,CAAC,CAAC;QAChE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACzB,CAAC,CAAC;AATW,QAAA,0BAA0B,8BASrC;AAeF;IAA6B,0CAAoC;IAAjE;;QACU,8BAAwB,GAAG,UAAC,EAEjB;gBADjB,WAAW,iBAAA;YAEX,IAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;YAC3E,IAAM,eAAe,GAAG;gBACtB,SAAS,WAAA;gBACT,WAAW,EAAE,WAAW,CAAC,WAAW;gBACpC,SAAS,EAAE,WAAW,CAAC,SAAS;aACjC,CAAC;YACF,KAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;YAC1C,IAAI,KAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;gBAChC,KAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC,CAAC;;IAuBJ,CAAC;IArBS,4CAAmB,GAA3B,UAA4B,KAAqB;QAC/C,IAAM,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7B,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IAED,+BAAM,GAAN;QACE,OAAO,CACL,8BAAC,uCAA6B,uBACxB,IAAI,CAAC,KAAK,IACd,gBAAgB,EAAE,IAAI,CAAC,wBAAwB,EAC/C,qBAAqB,EACnB,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAEhE,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,KAE9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CACU,CACjC,CAAC;IACJ,CAAC;IACH,qBAAC;AAAD,CAAC,AArCD,CAA6B,eAAK,CAAC,SAAS,GAqC3C;AAED,kBAAe,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { AutoLayoutViewNativeComponentProps } from "./AutoLayoutViewNativeComponentProps";
2
+ declare const AutoLayoutViewNativeComponent: import("react-native").HostComponent<AutoLayoutViewNativeComponentProps>;
3
+ export default AutoLayoutViewNativeComponent;
4
+ //# sourceMappingURL=AutoLayoutViewNativeComponent.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutViewNativeComponent.android.d.ts","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutViewNativeComponent.android.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAE1F,QAAA,MAAM,6BAA6B,0EAC2C,CAAC;AAC/E,eAAe,6BAA6B,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var react_native_1 = require("react-native");
4
+ var AutoLayoutViewNativeComponent = (0, react_native_1.requireNativeComponent)("AutoLayoutView");
5
+ exports.default = AutoLayoutViewNativeComponent;
6
+ //# sourceMappingURL=AutoLayoutViewNativeComponent.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutViewNativeComponent.android.js","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutViewNativeComponent.android.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AAItD,IAAM,6BAA6B,GACjC,IAAA,qCAAsB,EAAqC,gBAAgB,CAAC,CAAC;AAC/E,kBAAe,6BAA6B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { HostComponent } from "react-native";
2
+ import { AutoLayoutViewNativeComponentProps } from "./AutoLayoutViewNativeComponentProps";
3
+ declare const AutoLayoutViewNativeComponent: HostComponent<AutoLayoutViewNativeComponentProps>;
4
+ export default AutoLayoutViewNativeComponent;
5
+ //# sourceMappingURL=AutoLayoutViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAQ,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAE1F,QAAA,MAAM,6BAA6B,EAClB,aAAa,CAAC,kCAAkC,CAAC,CAAC;AACnE,eAAe,6BAA6B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { AutoLayoutViewNativeComponentProps } from "./AutoLayoutViewNativeComponentProps";
2
+ declare const AutoLayoutViewNativeComponent: import("react-native").HostComponent<AutoLayoutViewNativeComponentProps>;
3
+ export default AutoLayoutViewNativeComponent;
4
+ //# sourceMappingURL=AutoLayoutViewNativeComponent.ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutViewNativeComponent.ios.d.ts","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutViewNativeComponent.ios.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAE1F,QAAA,MAAM,6BAA6B,0EAC2C,CAAC;AAC/E,eAAe,6BAA6B,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var react_native_1 = require("react-native");
4
+ var AutoLayoutViewNativeComponent = (0, react_native_1.requireNativeComponent)("AutoLayoutView");
5
+ exports.default = AutoLayoutViewNativeComponent;
6
+ //# sourceMappingURL=AutoLayoutViewNativeComponent.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutViewNativeComponent.ios.js","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutViewNativeComponent.ios.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AAItD,IAAM,6BAA6B,GACjC,IAAA,qCAAsB,EAAqC,gBAAgB,CAAC,CAAC;AAC/E,kBAAe,6BAA6B,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var react_native_1 = require("react-native");
4
+ var AutoLayoutViewNativeComponent = react_native_1.View;
5
+ exports.default = AutoLayoutViewNativeComponent;
6
+ //# sourceMappingURL=AutoLayoutViewNativeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutViewNativeComponent.js","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutViewNativeComponent.ts"],"names":[],"mappings":";;AAAA,6CAAmD;AAInD,IAAM,6BAA6B,GACjC,mBAAgE,CAAC;AACnE,kBAAe,6BAA6B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from "react";
2
+ export interface OnBlankAreaEvent {
3
+ nativeEvent: {
4
+ offsetStart: number;
5
+ offsetEnd: number;
6
+ };
7
+ }
8
+ type OnBlankAreaEventHandler = (event: OnBlankAreaEvent) => void;
9
+ export interface AutoLayoutViewNativeComponentProps {
10
+ children?: ReactNode;
11
+ onBlankAreaEvent: OnBlankAreaEventHandler;
12
+ enableInstrumentation: boolean;
13
+ disableAutoLayout?: boolean;
14
+ }
15
+ export {};
16
+ //# sourceMappingURL=AutoLayoutViewNativeComponentProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutViewNativeComponentProps.d.ts","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutViewNativeComponentProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,KAAK,uBAAuB,GAAG,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAEjE,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AutoLayoutViewNativeComponentProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoLayoutViewNativeComponentProps.js","sourceRoot":"","sources":["../../../src/native/auto-layout/AutoLayoutViewNativeComponentProps.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Behaves as a regular `View` with an extra `index` prop that is saved in the native layer.
3
+ */
4
+ declare const CellContainer: import("react-native").HostComponent<unknown>;
5
+ export default CellContainer;
6
+ //# sourceMappingURL=CellContainer.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellContainer.android.d.ts","sourceRoot":"","sources":["../../../src/native/cell-container/CellContainer.android.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,QAAA,MAAM,aAAa,+CAA0C,CAAC;AAC9D,eAAe,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var react_native_1 = require("react-native");
4
+ /**
5
+ * Behaves as a regular `View` with an extra `index` prop that is saved in the native layer.
6
+ */
7
+ var CellContainer = (0, react_native_1.requireNativeComponent)("CellContainer");
8
+ exports.default = CellContainer;
9
+ //# sourceMappingURL=CellContainer.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellContainer.android.js","sourceRoot":"","sources":["../../../src/native/cell-container/CellContainer.android.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AAEtD;;GAEG;AACH,IAAM,aAAa,GAAG,IAAA,qCAAsB,EAAC,eAAe,CAAC,CAAC;AAC9D,kBAAe,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ViewProps } from "react-native";
3
+ export interface CellContainerProps extends ViewProps {
4
+ index: number;
5
+ }
6
+ declare const CellContainer: React.ForwardRefExoticComponent<CellContainerProps & React.RefAttributes<unknown>>;
7
+ export default CellContainer;
8
+ //# sourceMappingURL=CellContainer.d.ts.map