@legendapp/list 2.0.0-next.2 → 2.0.0-next.20
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/{dist/animated.d.mts → animated.d.mts} +7 -2
- package/{dist/animated.d.ts → animated.d.ts} +7 -2
- package/{dist/animated.js → animated.js} +2 -2
- package/{dist/animated.mjs → animated.mjs} +2 -2
- package/{dist/index.d.mts → index.d.mts} +106 -56
- package/{dist/index.d.ts → index.d.ts} +106 -56
- package/{dist/index.js → index.js} +1589 -1095
- package/{dist/index.mjs → index.mjs} +1591 -1097
- package/{dist/keyboard-controller.d.mts → keyboard-controller.d.mts} +28 -8
- package/{dist/keyboard-controller.d.ts → keyboard-controller.d.ts} +28 -8
- package/{dist/keyboard-controller.js → keyboard-controller.js} +4 -4
- package/{dist/keyboard-controller.mjs → keyboard-controller.mjs} +4 -4
- package/package.json +34 -88
- package/{dist/reanimated.d.mts → reanimated.d.mts} +2 -2
- package/{dist/reanimated.d.ts → reanimated.d.ts} +2 -2
- package/{dist/reanimated.js → reanimated.js} +7 -7
- package/{dist/reanimated.mjs → reanimated.mjs} +7 -7
- package/.claude/settings.local.json +0 -8
- package/.cursor/rules/changelog.mdc +0 -60
- package/.github/FUNDING.yml +0 -15
- package/.gitignore +0 -5
- package/.prettierrc.json +0 -5
- package/.vscode/settings.json +0 -14
- package/CLAUDE.md +0 -126
- package/biome.json +0 -46
- package/bun.lock +0 -1289
- package/bunfig.toml +0 -2
- package/dist/CHANGELOG.md +0 -119
- package/dist/LICENSE +0 -21
- package/dist/README.md +0 -139
- package/dist/package.json +0 -35
- package/example/README.md +0 -40
- package/example/api/data/genres.json +0 -23
- package/example/api/data/playlist/10402-10749.json +0 -1
- package/example/api/data/playlist/10402-10770.json +0 -1
- package/example/api/data/playlist/10402-37.json +0 -1
- package/example/api/data/playlist/10749-10752.json +0 -1
- package/example/api/data/playlist/10749-10770.json +0 -1
- package/example/api/data/playlist/10749-37.json +0 -1
- package/example/api/data/playlist/10749-878.json +0 -1
- package/example/api/data/playlist/10751-10402.json +0 -1
- package/example/api/data/playlist/10751-10752.json +0 -1
- package/example/api/data/playlist/10751-37.json +0 -1
- package/example/api/data/playlist/10751-53.json +0 -1
- package/example/api/data/playlist/10751-878.json +0 -1
- package/example/api/data/playlist/10751-9648.json +0 -1
- package/example/api/data/playlist/10752-37.json +0 -1
- package/example/api/data/playlist/12-10402.json +0 -1
- package/example/api/data/playlist/12-10749.json +0 -1
- package/example/api/data/playlist/12-18.json +0 -1
- package/example/api/data/playlist/12-27.json +0 -1
- package/example/api/data/playlist/12-35.json +0 -1
- package/example/api/data/playlist/14-36.json +0 -1
- package/example/api/data/playlist/14-878.json +0 -1
- package/example/api/data/playlist/16-10751.json +0 -1
- package/example/api/data/playlist/16-10770.json +0 -1
- package/example/api/data/playlist/16-35.json +0 -1
- package/example/api/data/playlist/16-36.json +0 -1
- package/example/api/data/playlist/16-53.json +0 -1
- package/example/api/data/playlist/18-10751.json +0 -1
- package/example/api/data/playlist/18-10752.json +0 -1
- package/example/api/data/playlist/18-37.json +0 -1
- package/example/api/data/playlist/18-53.json +0 -1
- package/example/api/data/playlist/18-878.json +0 -1
- package/example/api/data/playlist/27-10749.json +0 -1
- package/example/api/data/playlist/27-10770.json +0 -1
- package/example/api/data/playlist/28-10749.json +0 -1
- package/example/api/data/playlist/28-10751.json +0 -1
- package/example/api/data/playlist/28-10770.json +0 -1
- package/example/api/data/playlist/28-16.json +0 -1
- package/example/api/data/playlist/28-18.json +0 -1
- package/example/api/data/playlist/28-36.json +0 -1
- package/example/api/data/playlist/28-37.json +0 -1
- package/example/api/data/playlist/28-53.json +0 -1
- package/example/api/data/playlist/28-80.json +0 -1
- package/example/api/data/playlist/28-99.json +0 -1
- package/example/api/data/playlist/35-10749.json +0 -1
- package/example/api/data/playlist/35-10751.json +0 -1
- package/example/api/data/playlist/35-10752.json +0 -1
- package/example/api/data/playlist/35-27.json +0 -1
- package/example/api/data/playlist/35-36.json +0 -1
- package/example/api/data/playlist/35-53.json +0 -1
- package/example/api/data/playlist/35-80.json +0 -1
- package/example/api/data/playlist/36-37.json +0 -1
- package/example/api/data/playlist/36-878.json +0 -1
- package/example/api/data/playlist/36-9648.json +0 -1
- package/example/api/data/playlist/53-10752.json +0 -1
- package/example/api/data/playlist/80-10770.json +0 -1
- package/example/api/data/playlist/80-14.json +0 -1
- package/example/api/data/playlist/80-18.json +0 -1
- package/example/api/data/playlist/80-37.json +0 -1
- package/example/api/data/playlist/878-37.json +0 -1
- package/example/api/data/playlist/9648-10770.json +0 -1
- package/example/api/data/playlist/9648-37.json +0 -1
- package/example/api/data/playlist/9648-53.json +0 -1
- package/example/api/data/playlist/9648-878.json +0 -1
- package/example/api/data/playlist/99-10749.json +0 -1
- package/example/api/data/playlist/99-14.json +0 -1
- package/example/api/data/playlist/99-18.json +0 -1
- package/example/api/data/playlist/99-27.json +0 -1
- package/example/api/data/playlist/99-53.json +0 -1
- package/example/api/data/playlist/99-9648.json +0 -1
- package/example/api/data/playlist/index.ts +0 -73
- package/example/api/data/rows.json +0 -1
- package/example/api/index.ts +0 -36
- package/example/app/(tabs)/_layout.tsx +0 -60
- package/example/app/(tabs)/cards.tsx +0 -81
- package/example/app/(tabs)/index.tsx +0 -205
- package/example/app/(tabs)/moviesL.tsx +0 -7
- package/example/app/(tabs)/moviesLR.tsx +0 -7
- package/example/app/+not-found.tsx +0 -32
- package/example/app/_layout.tsx +0 -34
- package/example/app/accurate-scrollto/index.tsx +0 -125
- package/example/app/accurate-scrollto-2/index.tsx +0 -52
- package/example/app/accurate-scrollto-huge/index.tsx +0 -128
- package/example/app/add-to-end/index.tsx +0 -82
- package/example/app/ai-chat/index.tsx +0 -236
- package/example/app/bidirectional-infinite-list/index.tsx +0 -133
- package/example/app/cards-columns/index.tsx +0 -37
- package/example/app/cards-flashlist/index.tsx +0 -122
- package/example/app/cards-flatlist/index.tsx +0 -94
- package/example/app/cards-no-recycle/index.tsx +0 -110
- package/example/app/cards-renderItem.tsx +0 -354
- package/example/app/chat-example/index.tsx +0 -167
- package/example/app/chat-infinite/index.tsx +0 -239
- package/example/app/chat-keyboard/index.tsx +0 -248
- package/example/app/chat-resize-outer/index.tsx +0 -247
- package/example/app/columns/index.tsx +0 -78
- package/example/app/countries/index.tsx +0 -182
- package/example/app/countries-flashlist/index.tsx +0 -163
- package/example/app/countries-reorder/index.tsx +0 -187
- package/example/app/extra-data/index.tsx +0 -86
- package/example/app/filter-elements/filter-data-provider.tsx +0 -55
- package/example/app/filter-elements/index.tsx +0 -118
- package/example/app/initial-scroll-index/index.tsx +0 -106
- package/example/app/initial-scroll-index/renderFixedItem.tsx +0 -215
- package/example/app/initial-scroll-index-free-height/index.tsx +0 -70
- package/example/app/initial-scroll-index-keyed/index.tsx +0 -62
- package/example/app/lazy-list/index.tsx +0 -123
- package/example/app/movies-flashlist/index.tsx +0 -7
- package/example/app/mutable-cells/index.tsx +0 -104
- package/example/app/video-feed/index.tsx +0 -119
- package/example/app.config.js +0 -22
- package/example/app.json +0 -45
- package/example/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/example/assets/images/adaptive-icon.png +0 -0
- package/example/assets/images/favicon.png +0 -0
- package/example/assets/images/icon.png +0 -0
- package/example/assets/images/partial-react-logo.png +0 -0
- package/example/assets/images/react-logo.png +0 -0
- package/example/assets/images/react-logo@2x.png +0 -0
- package/example/assets/images/react-logo@3x.png +0 -0
- package/example/assets/images/splash-icon.png +0 -0
- package/example/autoscroll.sh +0 -101
- package/example/bun.lock +0 -2266
- package/example/bunfig.toml +0 -2
- package/example/components/Breathe.tsx +0 -54
- package/example/components/Circle.tsx +0 -69
- package/example/components/Collapsible.tsx +0 -44
- package/example/components/ExternalLink.tsx +0 -24
- package/example/components/HapticTab.tsx +0 -18
- package/example/components/HelloWave.tsx +0 -37
- package/example/components/Movies.tsx +0 -179
- package/example/components/ParallaxScrollView.tsx +0 -81
- package/example/components/ThemedText.tsx +0 -60
- package/example/components/ThemedView.tsx +0 -14
- package/example/components/__tests__/ThemedText-test.tsx +0 -10
- package/example/components/__tests__/__snapshots__/ThemedText-test.tsx.snap +0 -24
- package/example/components/ui/IconSymbol.ios.tsx +0 -32
- package/example/components/ui/IconSymbol.tsx +0 -43
- package/example/components/ui/TabBarBackground.ios.tsx +0 -22
- package/example/components/ui/TabBarBackground.tsx +0 -6
- package/example/constants/Colors.ts +0 -26
- package/example/constants/constants.ts +0 -5
- package/example/constants/useScrollTest.ts +0 -19
- package/example/hooks/useColorScheme.ts +0 -1
- package/example/hooks/useColorScheme.web.ts +0 -8
- package/example/hooks/useThemeColor.ts +0 -22
- package/example/ios/.xcode.env +0 -11
- package/example/ios/Podfile +0 -64
- package/example/ios/Podfile.lock +0 -2767
- package/example/ios/Podfile.properties.json +0 -5
- package/example/ios/listtest/AppDelegate.swift +0 -70
- package/example/ios/listtest/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png +0 -0
- package/example/ios/listtest/Images.xcassets/AppIcon.appiconset/Contents.json +0 -14
- package/example/ios/listtest/Images.xcassets/Contents.json +0 -6
- package/example/ios/listtest/Images.xcassets/SplashScreenBackground.colorset/Contents.json +0 -20
- package/example/ios/listtest/Images.xcassets/SplashScreenLogo.imageset/Contents.json +0 -23
- package/example/ios/listtest/Images.xcassets/SplashScreenLogo.imageset/image.png +0 -0
- package/example/ios/listtest/Images.xcassets/SplashScreenLogo.imageset/image@2x.png +0 -0
- package/example/ios/listtest/Images.xcassets/SplashScreenLogo.imageset/image@3x.png +0 -0
- package/example/ios/listtest/Info.plist +0 -85
- package/example/ios/listtest/PrivacyInfo.xcprivacy +0 -48
- package/example/ios/listtest/SplashScreen.storyboard +0 -42
- package/example/ios/listtest/Supporting/Expo.plist +0 -12
- package/example/ios/listtest/listtest-Bridging-Header.h +0 -3
- package/example/ios/listtest/listtest.entitlements +0 -5
- package/example/ios/listtest.xcodeproj/project.pbxproj +0 -547
- package/example/ios/listtest.xcodeproj/xcshareddata/xcschemes/listtest.xcscheme +0 -88
- package/example/ios/listtest.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/metro.config.js +0 -16
- package/example/package.json +0 -73
- package/example/scripts/reset-project.js +0 -84
- package/example/tsconfig.json +0 -26
- package/posttsup.ts +0 -24
- package/src/Container.tsx +0 -176
- package/src/Containers.tsx +0 -85
- package/src/ContextContainer.ts +0 -145
- package/src/DebugView.tsx +0 -83
- package/src/LazyLegendList.tsx +0 -41
- package/src/LeanView.tsx +0 -18
- package/src/LegendList.tsx +0 -558
- package/src/ListComponent.tsx +0 -191
- package/src/ScrollAdjust.tsx +0 -24
- package/src/ScrollAdjustHandler.ts +0 -26
- package/src/Separator.tsx +0 -14
- package/src/animated.tsx +0 -6
- package/src/calculateItemsInView.ts +0 -363
- package/src/calculateOffsetForIndex.ts +0 -23
- package/src/calculateOffsetWithOffsetPosition.ts +0 -26
- package/src/checkAllSizesKnown.ts +0 -17
- package/src/checkAtBottom.ts +0 -36
- package/src/checkAtTop.ts +0 -27
- package/src/checkThreshold.ts +0 -30
- package/src/constants.ts +0 -11
- package/src/createColumnWrapperStyle.ts +0 -16
- package/src/doInitialAllocateContainers.ts +0 -40
- package/src/doMaintainScrollAtEnd.ts +0 -34
- package/src/findAvailableContainers.ts +0 -98
- package/src/finishScrollTo.ts +0 -8
- package/src/getId.ts +0 -21
- package/src/getItemSize.ts +0 -52
- package/src/getRenderedItem.ts +0 -34
- package/src/getScrollVelocity.ts +0 -47
- package/src/handleLayout.ts +0 -70
- package/src/helpers.ts +0 -39
- package/src/index.ts +0 -11
- package/src/keyboard-controller.tsx +0 -63
- package/src/onScroll.ts +0 -66
- package/src/prepareMVCP.ts +0 -50
- package/src/reanimated.tsx +0 -63
- package/src/requestAdjust.ts +0 -41
- package/src/scrollTo.ts +0 -40
- package/src/scrollToIndex.ts +0 -34
- package/src/setDidLayout.ts +0 -25
- package/src/setPaddingTop.ts +0 -28
- package/src/state.tsx +0 -304
- package/src/types.ts +0 -610
- package/src/updateAlignItemsPaddingTop.ts +0 -18
- package/src/updateAllPositions.ts +0 -130
- package/src/updateItemSize.ts +0 -203
- package/src/updateTotalSize.ts +0 -44
- package/src/useAnimatedValue.ts +0 -6
- package/src/useCombinedRef.ts +0 -22
- package/src/useInit.ts +0 -17
- package/src/useSyncLayout.tsx +0 -68
- package/src/useValue$.ts +0 -53
- package/src/viewability.ts +0 -279
- package/tsconfig.json +0 -59
- package/tsup.config.ts +0 -21
|
@@ -15,7 +15,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
15
15
|
width: number;
|
|
16
16
|
};
|
|
17
17
|
extraData?: any;
|
|
18
|
-
getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
|
|
18
|
+
getEstimatedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
19
19
|
initialContainerPoolRatio?: number | undefined;
|
|
20
20
|
initialScrollOffset?: number;
|
|
21
21
|
initialScrollIndex?: number | {
|
|
@@ -57,7 +57,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
57
57
|
recycleItems?: boolean;
|
|
58
58
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
59
59
|
refreshing?: boolean;
|
|
60
|
-
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T>> | undefined;
|
|
60
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T, string | undefined>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T, string | undefined>> | undefined;
|
|
61
61
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
62
62
|
suggestEstimatedItemSize?: boolean;
|
|
63
63
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -66,6 +66,11 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
66
66
|
onLoad?: (info: {
|
|
67
67
|
elapsedTimeInMs: number;
|
|
68
68
|
}) => void;
|
|
69
|
+
snapToIndices?: number[];
|
|
70
|
+
stickyIndices?: number[];
|
|
71
|
+
getItemType?: ((item: T, index: number) => string | undefined) | undefined;
|
|
72
|
+
getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
73
|
+
itemsAreEqual?: ((itemPrevious: T, item: T, index: number, data: readonly T[]) => boolean) | undefined;
|
|
69
74
|
} & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
70
75
|
alignItemsAtEnd?: boolean;
|
|
71
76
|
columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
|
|
@@ -77,7 +82,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
77
82
|
width: number;
|
|
78
83
|
};
|
|
79
84
|
extraData?: any;
|
|
80
|
-
getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
|
|
85
|
+
getEstimatedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
81
86
|
initialContainerPoolRatio?: number | undefined;
|
|
82
87
|
initialScrollOffset?: number;
|
|
83
88
|
initialScrollIndex?: number | {
|
|
@@ -119,7 +124,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
119
124
|
recycleItems?: boolean;
|
|
120
125
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
121
126
|
refreshing?: boolean;
|
|
122
|
-
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T>> | undefined;
|
|
127
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T, string | undefined>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T, string | undefined>> | undefined;
|
|
123
128
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
124
129
|
suggestEstimatedItemSize?: boolean;
|
|
125
130
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -128,6 +133,11 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
128
133
|
onLoad?: (info: {
|
|
129
134
|
elapsedTimeInMs: number;
|
|
130
135
|
}) => void;
|
|
136
|
+
snapToIndices?: number[];
|
|
137
|
+
stickyIndices?: number[];
|
|
138
|
+
getItemType?: ((item: T, index: number) => string | undefined) | undefined;
|
|
139
|
+
getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
140
|
+
itemsAreEqual?: ((itemPrevious: T, item: T, index: number, data: readonly T[]) => boolean) | undefined;
|
|
131
141
|
} & React.RefAttributes<LegendListRef>) => React.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
|
|
132
142
|
ref?: React.Ref<LegendListRef>;
|
|
133
143
|
}) => React.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
@@ -141,7 +151,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
141
151
|
width: number;
|
|
142
152
|
};
|
|
143
153
|
extraData?: any;
|
|
144
|
-
getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
|
|
154
|
+
getEstimatedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
145
155
|
initialContainerPoolRatio?: number | undefined;
|
|
146
156
|
initialScrollOffset?: number;
|
|
147
157
|
initialScrollIndex?: number | {
|
|
@@ -183,7 +193,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
183
193
|
recycleItems?: boolean;
|
|
184
194
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
185
195
|
refreshing?: boolean;
|
|
186
|
-
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T>> | undefined;
|
|
196
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T, string | undefined>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T, string | undefined>> | undefined;
|
|
187
197
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
188
198
|
suggestEstimatedItemSize?: boolean;
|
|
189
199
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -192,6 +202,11 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
192
202
|
onLoad?: (info: {
|
|
193
203
|
elapsedTimeInMs: number;
|
|
194
204
|
}) => void;
|
|
205
|
+
snapToIndices?: number[];
|
|
206
|
+
stickyIndices?: number[];
|
|
207
|
+
getItemType?: ((item: T, index: number) => string | undefined) | undefined;
|
|
208
|
+
getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
209
|
+
itemsAreEqual?: ((itemPrevious: T, item: T, index: number, data: readonly T[]) => boolean) | undefined;
|
|
195
210
|
} & React.RefAttributes<LegendListRef>) => React.ReactNode>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
196
211
|
alignItemsAtEnd?: boolean;
|
|
197
212
|
columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
|
|
@@ -203,7 +218,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
203
218
|
width: number;
|
|
204
219
|
};
|
|
205
220
|
extraData?: any;
|
|
206
|
-
getEstimatedItemSize?: ((index: number, item: ItemT) => number) | undefined;
|
|
221
|
+
getEstimatedItemSize?: ((index: number, item: ItemT, type: string | undefined) => number) | undefined;
|
|
207
222
|
initialContainerPoolRatio?: number | undefined;
|
|
208
223
|
initialScrollOffset?: number;
|
|
209
224
|
initialScrollIndex?: number | {
|
|
@@ -245,7 +260,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
245
260
|
recycleItems?: boolean;
|
|
246
261
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
247
262
|
refreshing?: boolean;
|
|
248
|
-
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<ItemT>> | undefined;
|
|
263
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT, string | undefined>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<ItemT, string | undefined>> | undefined;
|
|
249
264
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
250
265
|
suggestEstimatedItemSize?: boolean;
|
|
251
266
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -254,6 +269,11 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
254
269
|
onLoad?: (info: {
|
|
255
270
|
elapsedTimeInMs: number;
|
|
256
271
|
}) => void;
|
|
272
|
+
snapToIndices?: number[];
|
|
273
|
+
stickyIndices?: number[];
|
|
274
|
+
getItemType?: ((item: ItemT, index: number) => string | undefined) | undefined;
|
|
275
|
+
getFixedItemSize?: ((index: number, item: ItemT, type: string | undefined) => number) | undefined;
|
|
276
|
+
itemsAreEqual?: ((itemPrevious: ItemT, item: ItemT, index: number, data: readonly ItemT[]) => boolean) | undefined;
|
|
257
277
|
} & {
|
|
258
278
|
LegendList?: ListT;
|
|
259
279
|
} & React.RefAttributes<LegendListRef>) => React.ReactNode;
|
|
@@ -15,7 +15,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
15
15
|
width: number;
|
|
16
16
|
};
|
|
17
17
|
extraData?: any;
|
|
18
|
-
getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
|
|
18
|
+
getEstimatedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
19
19
|
initialContainerPoolRatio?: number | undefined;
|
|
20
20
|
initialScrollOffset?: number;
|
|
21
21
|
initialScrollIndex?: number | {
|
|
@@ -57,7 +57,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
57
57
|
recycleItems?: boolean;
|
|
58
58
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
59
59
|
refreshing?: boolean;
|
|
60
|
-
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T>> | undefined;
|
|
60
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T, string | undefined>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T, string | undefined>> | undefined;
|
|
61
61
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
62
62
|
suggestEstimatedItemSize?: boolean;
|
|
63
63
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -66,6 +66,11 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
66
66
|
onLoad?: (info: {
|
|
67
67
|
elapsedTimeInMs: number;
|
|
68
68
|
}) => void;
|
|
69
|
+
snapToIndices?: number[];
|
|
70
|
+
stickyIndices?: number[];
|
|
71
|
+
getItemType?: ((item: T, index: number) => string | undefined) | undefined;
|
|
72
|
+
getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
73
|
+
itemsAreEqual?: ((itemPrevious: T, item: T, index: number, data: readonly T[]) => boolean) | undefined;
|
|
69
74
|
} & React.RefAttributes<LegendListRef>) => React.ReactNode) | react_native.Animated.AnimatedComponent<(<T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
70
75
|
alignItemsAtEnd?: boolean;
|
|
71
76
|
columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
|
|
@@ -77,7 +82,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
77
82
|
width: number;
|
|
78
83
|
};
|
|
79
84
|
extraData?: any;
|
|
80
|
-
getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
|
|
85
|
+
getEstimatedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
81
86
|
initialContainerPoolRatio?: number | undefined;
|
|
82
87
|
initialScrollOffset?: number;
|
|
83
88
|
initialScrollIndex?: number | {
|
|
@@ -119,7 +124,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
119
124
|
recycleItems?: boolean;
|
|
120
125
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
121
126
|
refreshing?: boolean;
|
|
122
|
-
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T>> | undefined;
|
|
127
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T, string | undefined>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T, string | undefined>> | undefined;
|
|
123
128
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
124
129
|
suggestEstimatedItemSize?: boolean;
|
|
125
130
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -128,6 +133,11 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
128
133
|
onLoad?: (info: {
|
|
129
134
|
elapsedTimeInMs: number;
|
|
130
135
|
}) => void;
|
|
136
|
+
snapToIndices?: number[];
|
|
137
|
+
stickyIndices?: number[];
|
|
138
|
+
getItemType?: ((item: T, index: number) => string | undefined) | undefined;
|
|
139
|
+
getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
140
|
+
itemsAreEqual?: ((itemPrevious: T, item: T, index: number, data: readonly T[]) => boolean) | undefined;
|
|
131
141
|
} & React.RefAttributes<LegendListRef>) => React.ReactNode)> | (<ItemT_1>(props: _legendapp_list_reanimated.AnimatedLegendListProps<ItemT_1> & {
|
|
132
142
|
ref?: React.Ref<LegendListRef>;
|
|
133
143
|
}) => React.ReactElement | null) = <T>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
@@ -141,7 +151,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
141
151
|
width: number;
|
|
142
152
|
};
|
|
143
153
|
extraData?: any;
|
|
144
|
-
getEstimatedItemSize?: ((index: number, item: T) => number) | undefined;
|
|
154
|
+
getEstimatedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
145
155
|
initialContainerPoolRatio?: number | undefined;
|
|
146
156
|
initialScrollOffset?: number;
|
|
147
157
|
initialScrollIndex?: number | {
|
|
@@ -183,7 +193,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
183
193
|
recycleItems?: boolean;
|
|
184
194
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
185
195
|
refreshing?: boolean;
|
|
186
|
-
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T>> | undefined;
|
|
196
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<T, string | undefined>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<T, string | undefined>> | undefined;
|
|
187
197
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
188
198
|
suggestEstimatedItemSize?: boolean;
|
|
189
199
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -192,6 +202,11 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
192
202
|
onLoad?: (info: {
|
|
193
203
|
elapsedTimeInMs: number;
|
|
194
204
|
}) => void;
|
|
205
|
+
snapToIndices?: number[];
|
|
206
|
+
stickyIndices?: number[];
|
|
207
|
+
getItemType?: ((item: T, index: number) => string | undefined) | undefined;
|
|
208
|
+
getFixedItemSize?: ((index: number, item: T, type: string | undefined) => number) | undefined;
|
|
209
|
+
itemsAreEqual?: ((itemPrevious: T, item: T, index: number, data: readonly T[]) => boolean) | undefined;
|
|
195
210
|
} & React.RefAttributes<LegendListRef>) => React.ReactNode>(props: Omit<Omit<react_native.ScrollViewProps, "scrollEventThrottle">, "contentOffset" | "contentInset" | "maintainVisibleContentPosition" | "stickyHeaderIndices" | "removeClippedSubviews" | "children"> & {
|
|
196
211
|
alignItemsAtEnd?: boolean;
|
|
197
212
|
columnWrapperStyle?: _legendapp_list.ColumnWrapperStyle;
|
|
@@ -203,7 +218,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
203
218
|
width: number;
|
|
204
219
|
};
|
|
205
220
|
extraData?: any;
|
|
206
|
-
getEstimatedItemSize?: ((index: number, item: ItemT) => number) | undefined;
|
|
221
|
+
getEstimatedItemSize?: ((index: number, item: ItemT, type: string | undefined) => number) | undefined;
|
|
207
222
|
initialContainerPoolRatio?: number | undefined;
|
|
208
223
|
initialScrollOffset?: number;
|
|
209
224
|
initialScrollIndex?: number | {
|
|
@@ -245,7 +260,7 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
245
260
|
recycleItems?: boolean;
|
|
246
261
|
refScrollView?: React.Ref<react_native.ScrollView>;
|
|
247
262
|
refreshing?: boolean;
|
|
248
|
-
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<ItemT>> | undefined;
|
|
263
|
+
renderItem?: ((props: _legendapp_list.LegendListRenderItemProps<ItemT, string | undefined>) => React.ReactNode) | React.ComponentType<_legendapp_list.LegendListRenderItemProps<ItemT, string | undefined>> | undefined;
|
|
249
264
|
renderScrollComponent?: (props: react_native.ScrollViewProps) => React.ReactElement<react_native.ScrollViewProps>;
|
|
250
265
|
suggestEstimatedItemSize?: boolean;
|
|
251
266
|
viewabilityConfig?: _legendapp_list.ViewabilityConfig;
|
|
@@ -254,6 +269,11 @@ declare const LegendList: <ItemT, ListT extends (<T>(props: Omit<Omit<react_nati
|
|
|
254
269
|
onLoad?: (info: {
|
|
255
270
|
elapsedTimeInMs: number;
|
|
256
271
|
}) => void;
|
|
272
|
+
snapToIndices?: number[];
|
|
273
|
+
stickyIndices?: number[];
|
|
274
|
+
getItemType?: ((item: ItemT, index: number) => string | undefined) | undefined;
|
|
275
|
+
getFixedItemSize?: ((index: number, item: ItemT, type: string | undefined) => number) | undefined;
|
|
276
|
+
itemsAreEqual?: ((itemPrevious: ItemT, item: ItemT, index: number, data: readonly ItemT[]) => boolean) | undefined;
|
|
257
277
|
} & {
|
|
258
278
|
LegendList?: ListT;
|
|
259
279
|
} & React.RefAttributes<LegendListRef>) => React.ReactNode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var list = require('@legendapp/list');
|
|
4
3
|
var React = require('react');
|
|
5
4
|
var reactNative = require('react-native');
|
|
6
5
|
var reactNativeKeyboardController = require('react-native-keyboard-controller');
|
|
7
6
|
var reactNativeReanimated = require('react-native-reanimated');
|
|
7
|
+
var list = require('@legendapp/list');
|
|
8
8
|
|
|
9
9
|
function _interopNamespace(e) {
|
|
10
10
|
if (e && e.__esModule) return e;
|
|
@@ -26,7 +26,7 @@ function _interopNamespace(e) {
|
|
|
26
26
|
|
|
27
27
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
28
|
|
|
29
|
-
// src/keyboard-controller.tsx
|
|
29
|
+
// src/integrations/keyboard-controller.tsx
|
|
30
30
|
var typedForwardRef = React.forwardRef;
|
|
31
31
|
var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
|
|
32
32
|
const {
|
|
@@ -59,8 +59,8 @@ var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
|
|
|
59
59
|
{
|
|
60
60
|
...rest,
|
|
61
61
|
contentContainerStyle,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
ref: forwardedRef,
|
|
63
|
+
scrollIndicatorInsets
|
|
64
64
|
}
|
|
65
65
|
)
|
|
66
66
|
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LegendList as LegendList$1 } from '@legendapp/list';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { useState, forwardRef } from 'react';
|
|
4
3
|
import { StyleSheet } from 'react-native';
|
|
5
4
|
import { useKeyboardHandler } from 'react-native-keyboard-controller';
|
|
6
5
|
import { runOnJS } from 'react-native-reanimated';
|
|
6
|
+
import { LegendList as LegendList$1 } from '@legendapp/list';
|
|
7
7
|
|
|
8
|
-
// src/keyboard-controller.tsx
|
|
8
|
+
// src/integrations/keyboard-controller.tsx
|
|
9
9
|
var typedForwardRef = forwardRef;
|
|
10
10
|
var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
|
|
11
11
|
const {
|
|
@@ -38,8 +38,8 @@ var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
|
|
|
38
38
|
{
|
|
39
39
|
...rest,
|
|
40
40
|
contentContainerStyle,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
ref: forwardedRef,
|
|
42
|
+
scrollIndicatorInsets
|
|
43
43
|
}
|
|
44
44
|
)
|
|
45
45
|
);
|
package/package.json
CHANGED
|
@@ -1,89 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=16.6.0",
|
|
38
|
-
"npm": ">=8.11.0"
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"build": "tsup && bun run posttsup.ts",
|
|
42
|
-
"publish": "bun run build && cd dist && npm publish",
|
|
43
|
-
"publish:next": "bun run build && cd dist && npm publish --tag next",
|
|
44
|
-
"publish:beta": "bun run build && cd dist && npm publish --tag beta",
|
|
45
|
-
"lint": "bunx biome check ./src && bunx biome format ./src && bun run lint:example",
|
|
46
|
-
"lint:example": "bunx biome check ./example/app && bunx biome format ./example/app",
|
|
47
|
-
"lint:fix": "bunx biome lint --write ./src && bunx biome format --write ./src && bunx biome check --write ./src && bun run lint:fix:example",
|
|
48
|
-
"lint:fix:example": "bunx biome lint --write ./example/app && bunx biome format --write ./example/app && bunx biome check --write ./example/app"
|
|
49
|
-
},
|
|
50
|
-
"peerDependencies": {
|
|
51
|
-
"react": "*",
|
|
52
|
-
"react-native": "*"
|
|
53
|
-
},
|
|
54
|
-
"devDependencies": {
|
|
55
|
-
"@biomejs/biome": "^1.9.4",
|
|
56
|
-
"@types/bun": "^1.1.13",
|
|
57
|
-
"@types/react": "^18.3.12",
|
|
58
|
-
"@types/use-sync-external-store": "^1.5.0",
|
|
59
|
-
"react": "^18.3.1",
|
|
60
|
-
"react-native": "^0.76.2",
|
|
61
|
-
"react-native-keyboard-controller": "^1.17.0",
|
|
62
|
-
"react-native-reanimated": "^3.16.6",
|
|
63
|
-
"tsup": "^8.3.5",
|
|
64
|
-
"typescript": "^5.8.3"
|
|
65
|
-
},
|
|
66
|
-
"author": "Legend <contact@legendapp.com> (https://github.com/LegendApp)",
|
|
67
|
-
"keywords": [
|
|
68
|
-
"react",
|
|
69
|
-
"react-native",
|
|
70
|
-
"list"
|
|
71
|
-
],
|
|
72
|
-
"repository": "github:LegendApp/legend-list",
|
|
73
|
-
"license": "MIT",
|
|
74
|
-
"bugs": {
|
|
75
|
-
"url": "https://github.com/LegendApp/legend-list/issues"
|
|
76
|
-
},
|
|
77
|
-
"homepage": "https://github.com/LegendApp/legend-list#readme",
|
|
78
|
-
"publishConfig": {
|
|
79
|
-
"registry": "https://registry.npmjs.org/"
|
|
80
|
-
},
|
|
81
|
-
"commitlint": {
|
|
82
|
-
"extends": [
|
|
83
|
-
"@commitlint/config-conventional"
|
|
84
|
-
]
|
|
85
|
-
},
|
|
86
|
-
"dependencies": {
|
|
87
|
-
"use-sync-external-store": "^1.5.0"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
2
|
+
"name": "@legendapp/list",
|
|
3
|
+
"version": "2.0.0-next.20",
|
|
4
|
+
"description": "Legend List is a drop-in replacement for FlatList with much better performance and supporting dynamically sized items.",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"private": false,
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"module": "./index.mjs",
|
|
9
|
+
"types": "./index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"**"
|
|
12
|
+
],
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"react": "*",
|
|
15
|
+
"react-native": "*"
|
|
16
|
+
},
|
|
17
|
+
"author": "Legend <contact@legendapp.com> (https://github.com/LegendApp)",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"react",
|
|
20
|
+
"react-native",
|
|
21
|
+
"list"
|
|
22
|
+
],
|
|
23
|
+
"repository": "github:LegendApp/legend-list",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/LegendApp/legend-list/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/LegendApp/legend-list#readme",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"registry": "https://registry.npmjs.org/"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"use-sync-external-store": "^1.5.0"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
|
|
2
1
|
import React__default, { ComponentProps } from 'react';
|
|
3
2
|
import Animated from 'react-native-reanimated';
|
|
3
|
+
import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
|
|
4
4
|
|
|
5
|
-
type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
|
|
5
|
+
type KeysToOmit = "getEstimatedItemSize" | "getFixedItemSize" | "getItemType" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "itemsAreEqual" | "ItemSeparatorComponent";
|
|
6
6
|
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
|
7
7
|
interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
|
|
8
8
|
refScrollView?: React__default.Ref<Animated.ScrollView>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
|
|
2
1
|
import React__default, { ComponentProps } from 'react';
|
|
3
2
|
import Animated from 'react-native-reanimated';
|
|
3
|
+
import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
|
|
4
4
|
|
|
5
|
-
type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
|
|
5
|
+
type KeysToOmit = "getEstimatedItemSize" | "getFixedItemSize" | "getItemType" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "itemsAreEqual" | "ItemSeparatorComponent";
|
|
6
6
|
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
|
7
7
|
interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
|
|
8
8
|
refScrollView?: React__default.Ref<Animated.ScrollView>;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var list = require('@legendapp/list');
|
|
4
3
|
var React = require('react');
|
|
5
4
|
var Animated = require('react-native-reanimated');
|
|
5
|
+
var list = require('@legendapp/list');
|
|
6
6
|
|
|
7
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
10
10
|
var Animated__default = /*#__PURE__*/_interopDefault(Animated);
|
|
11
11
|
|
|
12
|
-
// src/reanimated.tsx
|
|
12
|
+
// src/integrations/reanimated.tsx
|
|
13
13
|
|
|
14
|
-
// src/helpers.ts
|
|
14
|
+
// src/utils/helpers.ts
|
|
15
15
|
function isFunction(obj) {
|
|
16
16
|
return typeof obj === "function";
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
// src/useCombinedRef.ts
|
|
19
|
+
// src/hooks/useCombinedRef.ts
|
|
20
20
|
var useCombinedRef = (...refs) => {
|
|
21
21
|
const callback = React.useCallback((element) => {
|
|
22
22
|
for (const ref of refs) {
|
|
@@ -33,16 +33,16 @@ var useCombinedRef = (...refs) => {
|
|
|
33
33
|
return callback;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
// src/reanimated.tsx
|
|
36
|
+
// src/integrations/reanimated.tsx
|
|
37
37
|
var LegendListForwardedRef = React__default.default.forwardRef(function LegendListForwardedRef2(props, ref) {
|
|
38
38
|
const { refLegendList, ...rest } = props;
|
|
39
39
|
return /* @__PURE__ */ React__default.default.createElement(
|
|
40
40
|
list.LegendList,
|
|
41
41
|
{
|
|
42
|
-
refScrollView: ref,
|
|
43
42
|
ref: (r) => {
|
|
44
43
|
refLegendList(r);
|
|
45
44
|
},
|
|
45
|
+
refScrollView: ref,
|
|
46
46
|
...rest
|
|
47
47
|
}
|
|
48
48
|
);
|
|
@@ -52,7 +52,7 @@ var AnimatedLegendList = React__default.default.forwardRef(function AnimatedLege
|
|
|
52
52
|
const { refScrollView, ...rest } = props;
|
|
53
53
|
const refLegendList = React__default.default.useRef(null);
|
|
54
54
|
const combinedRef = useCombinedRef(refLegendList, ref);
|
|
55
|
-
return /* @__PURE__ */ React__default.default.createElement(AnimatedLegendListComponent, {
|
|
55
|
+
return /* @__PURE__ */ React__default.default.createElement(AnimatedLegendListComponent, { ref: refScrollView, refLegendList: combinedRef, ...rest });
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
exports.AnimatedLegendList = AnimatedLegendList;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { LegendList } from '@legendapp/list';
|
|
2
1
|
import React, { useCallback } from 'react';
|
|
3
2
|
import Animated from 'react-native-reanimated';
|
|
3
|
+
import { LegendList } from '@legendapp/list';
|
|
4
4
|
|
|
5
|
-
// src/reanimated.tsx
|
|
5
|
+
// src/integrations/reanimated.tsx
|
|
6
6
|
|
|
7
|
-
// src/helpers.ts
|
|
7
|
+
// src/utils/helpers.ts
|
|
8
8
|
function isFunction(obj) {
|
|
9
9
|
return typeof obj === "function";
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
// src/useCombinedRef.ts
|
|
12
|
+
// src/hooks/useCombinedRef.ts
|
|
13
13
|
var useCombinedRef = (...refs) => {
|
|
14
14
|
const callback = useCallback((element) => {
|
|
15
15
|
for (const ref of refs) {
|
|
@@ -26,16 +26,16 @@ var useCombinedRef = (...refs) => {
|
|
|
26
26
|
return callback;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
// src/reanimated.tsx
|
|
29
|
+
// src/integrations/reanimated.tsx
|
|
30
30
|
var LegendListForwardedRef = React.forwardRef(function LegendListForwardedRef2(props, ref) {
|
|
31
31
|
const { refLegendList, ...rest } = props;
|
|
32
32
|
return /* @__PURE__ */ React.createElement(
|
|
33
33
|
LegendList,
|
|
34
34
|
{
|
|
35
|
-
refScrollView: ref,
|
|
36
35
|
ref: (r) => {
|
|
37
36
|
refLegendList(r);
|
|
38
37
|
},
|
|
38
|
+
refScrollView: ref,
|
|
39
39
|
...rest
|
|
40
40
|
}
|
|
41
41
|
);
|
|
@@ -45,7 +45,7 @@ var AnimatedLegendList = React.forwardRef(function AnimatedLegendList2(props, re
|
|
|
45
45
|
const { refScrollView, ...rest } = props;
|
|
46
46
|
const refLegendList = React.useRef(null);
|
|
47
47
|
const combinedRef = useCombinedRef(refLegendList, ref);
|
|
48
|
-
return /* @__PURE__ */ React.createElement(AnimatedLegendListComponent, {
|
|
48
|
+
return /* @__PURE__ */ React.createElement(AnimatedLegendListComponent, { ref: refScrollView, refLegendList: combinedRef, ...rest });
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
export { AnimatedLegendList };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
globs: CHANGELOG.md
|
|
4
|
-
alwaysApply: false
|
|
5
|
-
---
|
|
6
|
-
# Changelog Update Rules
|
|
7
|
-
|
|
8
|
-
## Process for Adding Git Changes to Changelog
|
|
9
|
-
|
|
10
|
-
When updating the changelog with recent git commits, follow these guidelines:
|
|
11
|
-
|
|
12
|
-
### 1. Identify Relevant Commits
|
|
13
|
-
- Get all commits since the last version using: `git log --oneline --since="$(git log --grep="X.X.X" --format="%cd" --date=iso | head -1)" --reverse`
|
|
14
|
-
- Exclude non-user-facing commits like:
|
|
15
|
-
- "Update changelog"
|
|
16
|
-
- "chore:" commits
|
|
17
|
-
- Internal refactoring that doesn't affect API
|
|
18
|
-
- "Refactor*" commits
|
|
19
|
-
|
|
20
|
-
### 2. Categorize Changes
|
|
21
|
-
Organize changes by type with these prefixes, in this order:
|
|
22
|
-
- **Feat:** New features and capabilities
|
|
23
|
-
- **Fix:** Bug fixes and corrections
|
|
24
|
-
- **Perf:** Performance improvements
|
|
25
|
-
- **Improvement:** Enhancements to existing functionality
|
|
26
|
-
|
|
27
|
-
Skip **Refactor:**, they don't need to be in the changelog
|
|
28
|
-
|
|
29
|
-
### 3. Format Guidelines
|
|
30
|
-
- Write user-friendly descriptions, not raw commit messages
|
|
31
|
-
- Focus on the impact/benefit to users
|
|
32
|
-
- Be concise but descriptive
|
|
33
|
-
- Use present tense ("Fix X" not "Fixed X")
|
|
34
|
-
- Group similar changes together when possible
|
|
35
|
-
|
|
36
|
-
### 4. Version Organization
|
|
37
|
-
- Add changes to the current version in package.json
|
|
38
|
-
- If significant changes warrant a new version, bump version first
|
|
39
|
-
- List most important changes (breaking changes, major features) first
|
|
40
|
-
- Group fixes and minor improvements at the end
|
|
41
|
-
|
|
42
|
-
### 5. Example Format
|
|
43
|
-
```markdown
|
|
44
|
-
## X.X.X
|
|
45
|
-
- Fix: [Issue description and impact]
|
|
46
|
-
- Fix: [Another bug fix]
|
|
47
|
-
- Feat: [New feature description]
|
|
48
|
-
- Refactor: [API change description]
|
|
49
|
-
- Perf: [Performance improvement description]
|
|
50
|
-
- Improvement: [Enhancement description]
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 6. Quality Check
|
|
54
|
-
- Ensure all user-facing changes are documented
|
|
55
|
-
- Verify technical accuracy of descriptions
|
|
56
|
-
- Check that breaking changes are clearly marked
|
|
57
|
-
- Review for consistency in tone and format
|
|
58
|
-
|
|
59
|
-
### 7. Update package version
|
|
60
|
-
If a specific version number is requested and it is newer than the version in package.json, update package.json
|
package/.github/FUNDING.yml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: [jmeistrich]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
12
|
-
polar: # Replace with a single Polar username
|
|
13
|
-
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
|
14
|
-
thanks_dev: # Replace with a single thanks.dev username
|
|
15
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
package/.gitignore
DELETED