@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.
- package/README.md +27 -97
- package/dist/AnimatedFlashList.js +2 -2
- package/dist/AnimatedFlashList.js.map +1 -1
- package/dist/FlashList.d.ts +1 -167
- package/dist/FlashList.d.ts.map +1 -1
- package/dist/FlashList.js +3 -595
- package/dist/FlashList.js.map +1 -1
- package/dist/FlashListProps.d.ts +7 -63
- package/dist/FlashListProps.d.ts.map +1 -1
- package/dist/FlashListProps.js.map +1 -1
- package/dist/__tests__/LayoutCommitObserver.test.d.ts +2 -0
- package/dist/__tests__/LayoutCommitObserver.test.d.ts.map +1 -0
- package/dist/__tests__/LayoutCommitObserver.test.js +35 -0
- package/dist/__tests__/LayoutCommitObserver.test.js.map +1 -0
- package/dist/__tests__/ViewabilityHelper.test.js +3 -4
- package/dist/__tests__/ViewabilityHelper.test.js.map +1 -1
- package/dist/benchmark/JSFPSMonitor.d.ts.map +1 -1
- package/dist/benchmark/JSFPSMonitor.js +2 -1
- package/dist/benchmark/JSFPSMonitor.js.map +1 -1
- package/dist/benchmark/useBenchmark.d.ts +2 -4
- package/dist/benchmark/useBenchmark.d.ts.map +1 -1
- package/dist/benchmark/useBenchmark.js +12 -49
- package/dist/benchmark/useBenchmark.js.map +1 -1
- package/dist/benchmark/useFlatListBenchmark.d.ts.map +1 -1
- package/dist/benchmark/useFlatListBenchmark.js +2 -1
- package/dist/benchmark/useFlatListBenchmark.js.map +1 -1
- package/dist/errors/ErrorMessages.d.ts +16 -0
- package/dist/errors/ErrorMessages.d.ts.map +1 -0
- package/dist/errors/ErrorMessages.js +19 -0
- package/dist/errors/ErrorMessages.js.map +1 -0
- package/dist/errors/WarningMessages.d.ts +4 -0
- package/dist/errors/WarningMessages.d.ts.map +1 -0
- package/dist/errors/WarningMessages.js +7 -0
- package/dist/errors/WarningMessages.js.map +1 -0
- package/dist/index.d.ts +4 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -29
- package/dist/index.js.map +1 -1
- package/dist/isNewArch.d.ts +2 -0
- package/dist/isNewArch.d.ts.map +1 -0
- package/dist/isNewArch.js +25 -0
- package/dist/isNewArch.js.map +1 -0
- package/dist/native/config/PlatformHelper.android.d.ts +1 -22
- package/dist/native/config/PlatformHelper.android.d.ts.map +1 -1
- package/dist/native/config/PlatformHelper.android.js +1 -16
- package/dist/native/config/PlatformHelper.android.js.map +1 -1
- package/dist/native/config/PlatformHelper.d.ts +1 -22
- package/dist/native/config/PlatformHelper.d.ts.map +1 -1
- package/dist/native/config/PlatformHelper.ios.d.ts +1 -22
- package/dist/native/config/PlatformHelper.ios.d.ts.map +1 -1
- package/dist/native/config/PlatformHelper.ios.js +1 -15
- package/dist/native/config/PlatformHelper.ios.js.map +1 -1
- package/dist/native/config/PlatformHelper.js +1 -16
- package/dist/native/config/PlatformHelper.js.map +1 -1
- package/dist/native/config/PlatformHelper.web.d.ts +1 -23
- package/dist/native/config/PlatformHelper.web.d.ts.map +1 -1
- package/dist/native/config/PlatformHelper.web.js +1 -18
- package/dist/native/config/PlatformHelper.web.js.map +1 -1
- package/dist/recyclerview/LayoutCommitObserver.d.ts +12 -0
- package/dist/recyclerview/LayoutCommitObserver.d.ts.map +1 -0
- package/dist/recyclerview/LayoutCommitObserver.js +62 -0
- package/dist/recyclerview/LayoutCommitObserver.js.map +1 -0
- package/dist/recyclerview/RecyclerView.d.ts.map +1 -1
- package/dist/recyclerview/RecyclerView.js +20 -9
- package/dist/recyclerview/RecyclerView.js.map +1 -1
- package/dist/recyclerview/RecyclerViewManager.d.ts +4 -1
- package/dist/recyclerview/RecyclerViewManager.d.ts.map +1 -1
- package/dist/recyclerview/RecyclerViewManager.js +43 -34
- package/dist/recyclerview/RecyclerViewManager.js.map +1 -1
- package/dist/recyclerview/RecyclerViewProps.d.ts +1 -8
- package/dist/recyclerview/RecyclerViewProps.d.ts.map +1 -1
- package/dist/recyclerview/ViewHolderCollection.d.ts +6 -2
- package/dist/recyclerview/ViewHolderCollection.d.ts.map +1 -1
- package/dist/recyclerview/ViewHolderCollection.js +3 -1
- package/dist/recyclerview/ViewHolderCollection.js.map +1 -1
- package/dist/recyclerview/hooks/useBoundDetection.d.ts.map +1 -1
- package/dist/recyclerview/hooks/useBoundDetection.js +38 -7
- package/dist/recyclerview/hooks/useBoundDetection.js.map +1 -1
- package/dist/recyclerview/hooks/useRecyclerViewController.d.ts.map +1 -1
- package/dist/recyclerview/hooks/useRecyclerViewController.js +16 -9
- package/dist/recyclerview/hooks/useRecyclerViewController.js.map +1 -1
- package/dist/recyclerview/layout-managers/LayoutManager.d.ts.map +1 -1
- package/dist/recyclerview/layout-managers/LayoutManager.js +2 -1
- package/dist/recyclerview/layout-managers/LayoutManager.js.map +1 -1
- package/dist/recyclerview/viewability/ViewToken.d.ts.map +1 -0
- package/dist/recyclerview/viewability/ViewToken.js.map +1 -0
- package/dist/{viewability → recyclerview/viewability}/ViewabilityHelper.d.ts +2 -2
- package/dist/recyclerview/viewability/ViewabilityHelper.d.ts.map +1 -0
- package/dist/{viewability → recyclerview/viewability}/ViewabilityHelper.js +2 -4
- package/dist/{viewability → recyclerview/viewability}/ViewabilityHelper.js.map +1 -1
- package/dist/{viewability → recyclerview/viewability}/ViewabilityManager.d.ts +3 -3
- package/dist/recyclerview/viewability/ViewabilityManager.d.ts.map +1 -0
- package/dist/{viewability → recyclerview/viewability}/ViewabilityManager.js +16 -16
- package/dist/recyclerview/viewability/ViewabilityManager.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -14
- package/src/AnimatedFlashList.ts +2 -2
- package/src/FlashList.ts +1 -0
- package/src/FlashListProps.ts +8 -79
- package/src/__tests__/LayoutCommitObserver.test.tsx +60 -0
- package/src/__tests__/ViewabilityHelper.test.ts +13 -14
- package/src/benchmark/JSFPSMonitor.ts +3 -3
- package/src/benchmark/useBenchmark.ts +12 -77
- package/src/benchmark/useFlatListBenchmark.ts +3 -1
- package/src/errors/ErrorMessages.ts +26 -0
- package/src/errors/WarningMessages.ts +4 -0
- package/src/index.ts +11 -43
- package/src/isNewArch.ts +25 -0
- package/src/native/config/PlatformHelper.android.ts +1 -25
- package/src/native/config/PlatformHelper.ios.ts +1 -24
- package/src/native/config/PlatformHelper.ts +1 -25
- package/src/native/config/PlatformHelper.web.ts +1 -30
- package/src/recyclerview/LayoutCommitObserver.tsx +74 -0
- package/src/recyclerview/RecyclerView.tsx +25 -12
- package/src/recyclerview/RecyclerViewManager.ts +40 -40
- package/src/recyclerview/RecyclerViewProps.ts +1 -11
- package/src/recyclerview/ViewHolderCollection.tsx +9 -2
- package/src/recyclerview/hooks/useBoundDetection.ts +48 -6
- package/src/recyclerview/hooks/useRecyclerViewController.tsx +19 -14
- package/src/recyclerview/layout-managers/LayoutManager.ts +2 -1
- package/src/{viewability → recyclerview/viewability}/ViewabilityHelper.ts +8 -9
- package/src/{viewability → recyclerview/viewability}/ViewabilityManager.ts +18 -20
- package/RNFlashList.podspec +0 -37
- package/android/build.gradle +0 -89
- package/android/src/main/AndroidManifest.xml +0 -3
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutShadow.kt +0 -105
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt +0 -158
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutViewManager.kt +0 -70
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/BlankAreaEvent.kt +0 -29
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainer.java +0 -16
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerImpl.kt +0 -16
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerManager.kt +0 -34
- package/android/src/main/kotlin/com/shopify/reactnative/flash_list/FlashListPackage.kt +0 -19
- package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerDelegate.java +0 -47
- package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerInterface.java +0 -21
- package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerDelegate.java +0 -32
- package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerInterface.java +0 -16
- package/android/src/test/java/com/shopify/reactnative/flash_list/AutoLayoutShadowTest.kt +0 -147
- package/android/src/test/java/com/shopify/reactnative/flash_list/models/Rect.kt +0 -61
- package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestCollection.kt +0 -6
- package/android/src/test/java/com/shopify/reactnative/flash_list/models/TestDataModel.kt +0 -8
- package/android/src/test/resources/LayoutTestData.json +0 -788
- package/dist/GridLayoutProviderWithProps.d.ts +0 -42
- package/dist/GridLayoutProviderWithProps.d.ts.map +0 -1
- package/dist/GridLayoutProviderWithProps.js +0 -114
- package/dist/GridLayoutProviderWithProps.js.map +0 -1
- package/dist/MasonryFlashList.d.ts +0 -51
- package/dist/MasonryFlashList.d.ts.map +0 -1
- package/dist/MasonryFlashList.js +0 -252
- package/dist/MasonryFlashList.js.map +0 -1
- package/dist/PureComponentWrapper.d.ts +0 -22
- package/dist/PureComponentWrapper.d.ts.map +0 -1
- package/dist/PureComponentWrapper.js +0 -37
- package/dist/PureComponentWrapper.js.map +0 -1
- package/dist/__tests__/ContentContainerUtils.test.d.ts +0 -2
- package/dist/__tests__/ContentContainerUtils.test.d.ts.map +0 -1
- package/dist/__tests__/ContentContainerUtils.test.js +0 -85
- package/dist/__tests__/ContentContainerUtils.test.js.map +0 -1
- package/dist/__tests__/FlashList.test.d.ts +0 -2
- package/dist/__tests__/FlashList.test.d.ts.map +0 -1
- package/dist/__tests__/FlashList.test.js +0 -902
- package/dist/__tests__/FlashList.test.js.map +0 -1
- package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts +0 -2
- package/dist/__tests__/GridLayoutProviderWithProps.test.d.ts.map +0 -1
- package/dist/__tests__/GridLayoutProviderWithProps.test.js +0 -143
- package/dist/__tests__/GridLayoutProviderWithProps.test.js.map +0 -1
- package/dist/__tests__/MasonryFlashList.test.d.ts +0 -2
- package/dist/__tests__/MasonryFlashList.test.d.ts.map +0 -1
- package/dist/__tests__/MasonryFlashList.test.js +0 -254
- package/dist/__tests__/MasonryFlashList.test.js.map +0 -1
- package/dist/__tests__/PlatformHelper.web.test.d.ts +0 -2
- package/dist/__tests__/PlatformHelper.web.test.d.ts.map +0 -1
- package/dist/__tests__/PlatformHelper.web.test.js +0 -33
- package/dist/__tests__/PlatformHelper.web.test.js.map +0 -1
- package/dist/__tests__/helpers/mountFlashList.d.ts +0 -19
- package/dist/__tests__/helpers/mountFlashList.d.ts.map +0 -1
- package/dist/__tests__/helpers/mountFlashList.js +0 -44
- package/dist/__tests__/helpers/mountFlashList.js.map +0 -1
- package/dist/__tests__/helpers/mountMasonryFlashList.d.ts +0 -18
- package/dist/__tests__/helpers/mountMasonryFlashList.d.ts.map +0 -1
- package/dist/__tests__/helpers/mountMasonryFlashList.js +0 -49
- package/dist/__tests__/helpers/mountMasonryFlashList.js.map +0 -1
- package/dist/__tests__/useBlankAreaTracker.test.d.ts +0 -2
- package/dist/__tests__/useBlankAreaTracker.test.d.ts.map +0 -1
- package/dist/__tests__/useBlankAreaTracker.test.js +0 -179
- package/dist/__tests__/useBlankAreaTracker.test.js.map +0 -1
- package/dist/benchmark/useBlankAreaTracker.d.ts +0 -34
- package/dist/benchmark/useBlankAreaTracker.d.ts.map +0 -1
- package/dist/benchmark/useBlankAreaTracker.js +0 -66
- package/dist/benchmark/useBlankAreaTracker.js.map +0 -1
- package/dist/enableNewCore.d.ts +0 -3
- package/dist/enableNewCore.d.ts.map +0 -1
- package/dist/enableNewCore.js +0 -25
- package/dist/enableNewCore.js.map +0 -1
- package/dist/errors/CustomError.d.ts +0 -8
- package/dist/errors/CustomError.d.ts.map +0 -1
- package/dist/errors/CustomError.js +0 -14
- package/dist/errors/CustomError.js.map +0 -1
- package/dist/errors/ExceptionList.d.ts +0 -24
- package/dist/errors/ExceptionList.d.ts.map +0 -1
- package/dist/errors/ExceptionList.js +0 -26
- package/dist/errors/ExceptionList.js.map +0 -1
- package/dist/errors/Warnings.d.ts +0 -9
- package/dist/errors/Warnings.d.ts.map +0 -1
- package/dist/errors/Warnings.js +0 -13
- package/dist/errors/Warnings.js.map +0 -1
- package/dist/native/auto-layout/AutoLayoutView.d.ts +0 -22
- package/dist/native/auto-layout/AutoLayoutView.d.ts.map +0 -1
- package/dist/native/auto-layout/AutoLayoutView.js +0 -48
- package/dist/native/auto-layout/AutoLayoutView.js.map +0 -1
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.d.ts +0 -4
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.d.ts.map +0 -1
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.js +0 -6
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.android.js.map +0 -1
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts +0 -5
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.d.ts.map +0 -1
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.d.ts +0 -4
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.d.ts.map +0 -1
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.js +0 -6
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.ios.js.map +0 -1
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js +0 -6
- package/dist/native/auto-layout/AutoLayoutViewNativeComponent.js.map +0 -1
- package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts +0 -16
- package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.d.ts.map +0 -1
- package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js +0 -3
- package/dist/native/auto-layout/AutoLayoutViewNativeComponentProps.js.map +0 -1
- package/dist/native/cell-container/CellContainer.android.d.ts +0 -6
- package/dist/native/cell-container/CellContainer.android.d.ts.map +0 -1
- package/dist/native/cell-container/CellContainer.android.js +0 -9
- package/dist/native/cell-container/CellContainer.android.js.map +0 -1
- package/dist/native/cell-container/CellContainer.d.ts +0 -8
- package/dist/native/cell-container/CellContainer.d.ts.map +0 -1
- package/dist/native/cell-container/CellContainer.ios.d.ts +0 -6
- package/dist/native/cell-container/CellContainer.ios.d.ts.map +0 -1
- package/dist/native/cell-container/CellContainer.ios.js +0 -9
- package/dist/native/cell-container/CellContainer.ios.js.map +0 -1
- package/dist/native/cell-container/CellContainer.js +0 -11
- package/dist/native/cell-container/CellContainer.js.map +0 -1
- package/dist/native/cell-container/CellContainer.web.d.ts +0 -7
- package/dist/native/cell-container/CellContainer.web.d.ts.map +0 -1
- package/dist/native/cell-container/CellContainer.web.js +0 -13
- package/dist/native/cell-container/CellContainer.web.js.map +0 -1
- package/dist/specs/AutoLayoutNativeComponent.d.ts +0 -18
- package/dist/specs/AutoLayoutNativeComponent.d.ts.map +0 -1
- package/dist/specs/AutoLayoutNativeComponent.js +0 -6
- package/dist/specs/AutoLayoutNativeComponent.js.map +0 -1
- package/dist/specs/CellContainerNativeComponent.d.ts +0 -8
- package/dist/specs/CellContainerNativeComponent.d.ts.map +0 -1
- package/dist/specs/CellContainerNativeComponent.js +0 -6
- package/dist/specs/CellContainerNativeComponent.js.map +0 -1
- package/dist/utils/ContentContainerUtils.d.ts +0 -27
- package/dist/utils/ContentContainerUtils.d.ts.map +0 -1
- package/dist/utils/ContentContainerUtils.js +0 -48
- package/dist/utils/ContentContainerUtils.js.map +0 -1
- package/dist/viewability/ViewToken.d.ts.map +0 -1
- package/dist/viewability/ViewToken.js.map +0 -1
- package/dist/viewability/ViewabilityHelper.d.ts.map +0 -1
- package/dist/viewability/ViewabilityManager.d.ts.map +0 -1
- package/dist/viewability/ViewabilityManager.js.map +0 -1
- package/ios/RNFlashList.xcodeproj/project.pbxproj +0 -3
- package/ios/RNFlashList.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
- package/ios/Sources/AutoLayoutView.swift +0 -294
- package/ios/Sources/AutoLayoutViewComponentView.h +0 -16
- package/ios/Sources/AutoLayoutViewComponentView.mm +0 -90
- package/ios/Sources/AutoLayoutViewManager.mm +0 -14
- package/ios/Sources/AutoLayoutViewManager.swift +0 -12
- package/ios/Sources/CellContainerComponentView.h +0 -18
- package/ios/Sources/CellContainerComponentView.mm +0 -62
- package/ios/Sources/CellContainerManager.mm +0 -8
- package/ios/Sources/CellContainerManager.swift +0 -12
- package/ios/Sources/FlatListPro-Bridging-Header.h +0 -11
- package/ios/Tests/AutoLayoutViewTests.swift +0 -113
- package/src/FlashList.tsx +0 -953
- package/src/GridLayoutProviderWithProps.ts +0 -180
- package/src/MasonryFlashList.tsx +0 -476
- package/src/PureComponentWrapper.tsx +0 -42
- package/src/__tests__/ContentContainerUtils.test.ts +0 -130
- package/src/__tests__/FlashList.test.tsx +0 -1001
- package/src/__tests__/GridLayoutProviderWithProps.test.ts +0 -179
- package/src/__tests__/MasonryFlashList.test.ts +0 -292
- package/src/__tests__/PlatformHelper.web.test.ts +0 -45
- package/src/__tests__/helpers/mountFlashList.tsx +0 -62
- package/src/__tests__/helpers/mountMasonryFlashList.tsx +0 -70
- package/src/__tests__/useBlankAreaTracker.test.tsx +0 -206
- package/src/benchmark/useBlankAreaTracker.ts +0 -117
- package/src/enableNewCore.ts +0 -24
- package/src/errors/CustomError.ts +0 -10
- package/src/errors/ExceptionList.ts +0 -28
- package/src/errors/Warnings.ts +0 -15
- package/src/native/auto-layout/AutoLayoutView.tsx +0 -73
- package/src/native/auto-layout/AutoLayoutViewNativeComponent.android.ts +0 -7
- package/src/native/auto-layout/AutoLayoutViewNativeComponent.ios.ts +0 -7
- package/src/native/auto-layout/AutoLayoutViewNativeComponent.ts +0 -7
- package/src/native/auto-layout/AutoLayoutViewNativeComponentProps.ts +0 -17
- package/src/native/cell-container/CellContainer.android.ts +0 -7
- package/src/native/cell-container/CellContainer.ios.ts +0 -7
- package/src/native/cell-container/CellContainer.tsx +0 -14
- package/src/native/cell-container/CellContainer.web.tsx +0 -9
- package/src/specs/AutoLayoutNativeComponent.ts +0 -24
- package/src/specs/CellContainerNativeComponent.ts +0 -9
- package/src/utils/ContentContainerUtils.ts +0 -92
- /package/dist/{viewability → recyclerview/viewability}/ViewToken.d.ts +0 -0
- /package/dist/{viewability → recyclerview/viewability}/ViewToken.js +0 -0
- /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 {
|
|
1
|
+
export { FlashList } from "./FlashList";
|
|
2
2
|
export { FlashListRef } from "./FlashListRef";
|
|
3
|
-
export { 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
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
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.
|
|
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
|
|
12
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
if (
|
|
49
|
-
|
|
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":"
|
|
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 @@
|
|
|
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
|
-
|
|
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,
|
|
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.
|
|
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":";;;
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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.
|
|
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":";;;
|
|
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.
|
|
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":";;;
|
|
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
|
-
|
|
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,
|
|
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.
|
|
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":";;;
|
|
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;
|
|
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
|
|
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); },
|
|
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();
|