@legendapp/list 3.0.0-beta.1 → 3.0.0-beta.10

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/keyboard.d.mts ADDED
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { Insets } from 'react-native';
3
+ import { ReanimatedScrollEvent } from 'react-native-reanimated/lib/typescript/hook/commonTypes';
4
+ import { LegendListRef } from '@legendapp/list';
5
+ import { AnimatedLegendListProps } from '@legendapp/list/reanimated';
6
+
7
+ declare const KeyboardAvoidingLegendList: <ItemT>(props: Omit<AnimatedLegendListProps<ItemT>, "onScroll" | "contentInset"> & {
8
+ onScroll?: (event: ReanimatedScrollEvent) => void;
9
+ contentInset?: Insets | undefined;
10
+ safeAreaInsetBottom?: number;
11
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode;
12
+
13
+ export { KeyboardAvoidingLegendList, KeyboardAvoidingLegendList as LegendList };
package/keyboard.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { Insets } from 'react-native';
3
+ import { ReanimatedScrollEvent } from 'react-native-reanimated/lib/typescript/hook/commonTypes';
4
+ import { LegendListRef } from '@legendapp/list';
5
+ import { AnimatedLegendListProps } from '@legendapp/list/reanimated';
6
+
7
+ declare const KeyboardAvoidingLegendList: <ItemT>(props: Omit<AnimatedLegendListProps<ItemT>, "onScroll" | "contentInset"> & {
8
+ onScroll?: (event: ReanimatedScrollEvent) => void;
9
+ contentInset?: Insets | undefined;
10
+ safeAreaInsetBottom?: number;
11
+ } & React.RefAttributes<LegendListRef>) => React.ReactNode;
12
+
13
+ export { KeyboardAvoidingLegendList, KeyboardAvoidingLegendList as LegendList };
package/keyboard.js ADDED
@@ -0,0 +1,222 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var reactNative = require('react-native');
5
+ var reactNativeKeyboardController = require('react-native-keyboard-controller');
6
+ var reactNativeReanimated = require('react-native-reanimated');
7
+ var reanimated = require('@legendapp/list/reanimated');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n.default = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
+
29
+ // src/integrations/keyboard.tsx
30
+
31
+ // src/utils/helpers.ts
32
+ function isFunction(obj) {
33
+ return typeof obj === "function";
34
+ }
35
+
36
+ // src/hooks/useCombinedRef.ts
37
+ var useCombinedRef = (...refs) => {
38
+ const callback = React.useCallback((element) => {
39
+ for (const ref of refs) {
40
+ if (!ref) {
41
+ continue;
42
+ }
43
+ if (isFunction(ref)) {
44
+ ref(element);
45
+ } else {
46
+ ref.current = element;
47
+ }
48
+ }
49
+ }, refs);
50
+ return callback;
51
+ };
52
+
53
+ // src/integrations/keyboard.tsx
54
+ var KeyboardAvoidingLegendList = React.forwardRef(function KeyboardAvoidingLegendList2(props, forwardedRef) {
55
+ const {
56
+ contentInset: contentInsetProp,
57
+ horizontal,
58
+ onScroll: onScrollProp,
59
+ safeAreaInsetBottom = 0,
60
+ style: styleProp,
61
+ ...rest
62
+ } = props;
63
+ const styleFlattened = reactNative.StyleSheet.flatten(styleProp);
64
+ const refLegendList = React.useRef(null);
65
+ const combinedRef = useCombinedRef(forwardedRef, refLegendList);
66
+ const isIos = reactNative.Platform.OS === "ios";
67
+ const isAndroid = reactNative.Platform.OS === "android";
68
+ const scrollViewRef = reactNativeReanimated.useAnimatedRef();
69
+ const scrollOffsetY = reactNativeReanimated.useSharedValue(0);
70
+ const animatedOffsetY = reactNativeReanimated.useSharedValue(null);
71
+ const scrollOffsetAtKeyboardStart = reactNativeReanimated.useSharedValue(0);
72
+ const mode = reactNativeReanimated.useSharedValue("idle");
73
+ const keyboardInset = reactNativeReanimated.useSharedValue(0);
74
+ const keyboardHeight = reactNativeReanimated.useSharedValue(0);
75
+ const isOpening = reactNativeReanimated.useSharedValue(false);
76
+ const didInteractive = reactNativeReanimated.useSharedValue(false);
77
+ const isKeyboardOpen = reactNativeReanimated.useSharedValue(false);
78
+ const scrollHandler = reactNativeReanimated.useAnimatedScrollHandler(
79
+ (event) => {
80
+ scrollOffsetY.set(event.contentOffset[horizontal ? "x" : "y"]);
81
+ if (onScrollProp) {
82
+ reactNativeReanimated.runOnJS(onScrollProp)(event);
83
+ }
84
+ },
85
+ [onScrollProp, horizontal]
86
+ );
87
+ const setScrollProcessingEnabled = React.useCallback(
88
+ (enabled) => {
89
+ var _a;
90
+ console.log("setScrollProcessingEnabled", enabled);
91
+ (_a = refLegendList.current) == null ? void 0 : _a.setScrollProcessingEnabled(enabled);
92
+ },
93
+ [refLegendList]
94
+ );
95
+ reactNativeKeyboardController.useKeyboardHandler(
96
+ // biome-ignore assist/source/useSortedKeys: prefer start/move/end
97
+ {
98
+ onStart: (event) => {
99
+ "worklet";
100
+ mode.set("running");
101
+ if (isKeyboardOpen.get() && event.progress === 1 && event.height > 0) {
102
+ return;
103
+ }
104
+ if (!didInteractive.get()) {
105
+ if (event.height > 0) {
106
+ keyboardHeight.set(event.height - safeAreaInsetBottom);
107
+ }
108
+ isOpening.set(event.progress > 0);
109
+ scrollOffsetAtKeyboardStart.set(scrollOffsetY.get());
110
+ animatedOffsetY.set(scrollOffsetY.get());
111
+ reactNativeReanimated.runOnJS(setScrollProcessingEnabled)(false);
112
+ }
113
+ },
114
+ onInteractive: (event) => {
115
+ "worklet";
116
+ if (mode.get() !== "running") {
117
+ reactNativeReanimated.runOnJS(setScrollProcessingEnabled)(false);
118
+ }
119
+ mode.set("running");
120
+ if (!didInteractive.get()) {
121
+ didInteractive.set(true);
122
+ }
123
+ if (isAndroid && !horizontal) {
124
+ keyboardInset.set(Math.max(0, event.height - safeAreaInsetBottom));
125
+ }
126
+ },
127
+ onMove: (event) => {
128
+ "worklet";
129
+ if (!didInteractive.get()) {
130
+ const vIsOpening = isOpening.get();
131
+ const vKeyboardHeight = keyboardHeight.get();
132
+ const vProgress = vIsOpening ? event.progress : 1 - event.progress;
133
+ const targetOffset = Math.max(
134
+ 0,
135
+ scrollOffsetAtKeyboardStart.get() + (vIsOpening ? vKeyboardHeight : -vKeyboardHeight) * vProgress
136
+ );
137
+ scrollOffsetY.set(targetOffset);
138
+ animatedOffsetY.set(targetOffset);
139
+ if (!horizontal) {
140
+ keyboardInset.set(Math.max(0, event.height - safeAreaInsetBottom));
141
+ }
142
+ }
143
+ },
144
+ onEnd: (event) => {
145
+ "worklet";
146
+ const wasInteractive = didInteractive.get();
147
+ const vMode = mode.get();
148
+ mode.set("idle");
149
+ if (vMode === "running") {
150
+ if (!wasInteractive) {
151
+ const vIsOpening = isOpening.get();
152
+ const vKeyboardHeight = keyboardHeight.get();
153
+ const targetOffset = Math.max(
154
+ 0,
155
+ scrollOffsetAtKeyboardStart.get() + (vIsOpening ? vKeyboardHeight : -vKeyboardHeight) * (vIsOpening ? event.progress : 1 - event.progress)
156
+ );
157
+ scrollOffsetY.set(targetOffset);
158
+ animatedOffsetY.set(targetOffset);
159
+ }
160
+ reactNativeReanimated.runOnJS(setScrollProcessingEnabled)(true);
161
+ didInteractive.set(false);
162
+ isKeyboardOpen.set(event.height > 0);
163
+ if (!horizontal) {
164
+ const newInset = Math.max(0, event.height - safeAreaInsetBottom);
165
+ if (newInset > 0) {
166
+ keyboardInset.set(newInset);
167
+ } else {
168
+ keyboardInset.set(newInset);
169
+ animatedOffsetY.set(scrollOffsetY.get());
170
+ }
171
+ }
172
+ }
173
+ }
174
+ },
175
+ [scrollViewRef, safeAreaInsetBottom]
176
+ );
177
+ const animatedProps = reactNativeReanimated.useAnimatedProps(() => {
178
+ "worklet";
179
+ var _a, _b, _c, _d;
180
+ const vAnimatedOffsetY = animatedOffsetY.get();
181
+ const baseProps = {
182
+ contentOffset: vAnimatedOffsetY === null ? void 0 : {
183
+ x: 0,
184
+ y: vAnimatedOffsetY
185
+ }
186
+ };
187
+ return isIos ? Object.assign(baseProps, {
188
+ contentInset: {
189
+ bottom: ((_a = contentInsetProp == null ? void 0 : contentInsetProp.bottom) != null ? _a : 0) + (horizontal ? 0 : keyboardInset.get()),
190
+ left: (_b = contentInsetProp == null ? void 0 : contentInsetProp.left) != null ? _b : 0,
191
+ right: (_c = contentInsetProp == null ? void 0 : contentInsetProp.right) != null ? _c : 0,
192
+ top: (_d = contentInsetProp == null ? void 0 : contentInsetProp.top) != null ? _d : 0
193
+ }
194
+ }) : baseProps;
195
+ });
196
+ const style = isAndroid ? reactNativeReanimated.useAnimatedStyle(
197
+ () => {
198
+ var _a;
199
+ return {
200
+ ...styleFlattened || {},
201
+ marginBottom: (_a = keyboardInset.get()) != null ? _a : 0
202
+ };
203
+ },
204
+ [styleProp, keyboardInset]
205
+ ) : void 0;
206
+ return /* @__PURE__ */ React__namespace.createElement(
207
+ reanimated.AnimatedLegendList,
208
+ {
209
+ ...rest,
210
+ animatedProps,
211
+ keyboardDismissMode: "interactive",
212
+ onScroll: scrollHandler,
213
+ ref: combinedRef,
214
+ refScrollView: scrollViewRef,
215
+ scrollIndicatorInsets: { bottom: 0, top: 0 },
216
+ style
217
+ }
218
+ );
219
+ });
220
+
221
+ exports.KeyboardAvoidingLegendList = KeyboardAvoidingLegendList;
222
+ exports.LegendList = KeyboardAvoidingLegendList;
package/keyboard.mjs ADDED
@@ -0,0 +1,200 @@
1
+ import * as React from 'react';
2
+ import { forwardRef, useRef, useCallback } from 'react';
3
+ import { StyleSheet, Platform } from 'react-native';
4
+ import { useKeyboardHandler } from 'react-native-keyboard-controller';
5
+ import { useAnimatedRef, useSharedValue, useAnimatedScrollHandler, runOnJS, useAnimatedProps, useAnimatedStyle } from 'react-native-reanimated';
6
+ import { AnimatedLegendList } from '@legendapp/list/reanimated';
7
+
8
+ // src/integrations/keyboard.tsx
9
+
10
+ // src/utils/helpers.ts
11
+ function isFunction(obj) {
12
+ return typeof obj === "function";
13
+ }
14
+
15
+ // src/hooks/useCombinedRef.ts
16
+ var useCombinedRef = (...refs) => {
17
+ const callback = useCallback((element) => {
18
+ for (const ref of refs) {
19
+ if (!ref) {
20
+ continue;
21
+ }
22
+ if (isFunction(ref)) {
23
+ ref(element);
24
+ } else {
25
+ ref.current = element;
26
+ }
27
+ }
28
+ }, refs);
29
+ return callback;
30
+ };
31
+
32
+ // src/integrations/keyboard.tsx
33
+ var KeyboardAvoidingLegendList = forwardRef(function KeyboardAvoidingLegendList2(props, forwardedRef) {
34
+ const {
35
+ contentInset: contentInsetProp,
36
+ horizontal,
37
+ onScroll: onScrollProp,
38
+ safeAreaInsetBottom = 0,
39
+ style: styleProp,
40
+ ...rest
41
+ } = props;
42
+ const styleFlattened = StyleSheet.flatten(styleProp);
43
+ const refLegendList = useRef(null);
44
+ const combinedRef = useCombinedRef(forwardedRef, refLegendList);
45
+ const isIos = Platform.OS === "ios";
46
+ const isAndroid = Platform.OS === "android";
47
+ const scrollViewRef = useAnimatedRef();
48
+ const scrollOffsetY = useSharedValue(0);
49
+ const animatedOffsetY = useSharedValue(null);
50
+ const scrollOffsetAtKeyboardStart = useSharedValue(0);
51
+ const mode = useSharedValue("idle");
52
+ const keyboardInset = useSharedValue(0);
53
+ const keyboardHeight = useSharedValue(0);
54
+ const isOpening = useSharedValue(false);
55
+ const didInteractive = useSharedValue(false);
56
+ const isKeyboardOpen = useSharedValue(false);
57
+ const scrollHandler = useAnimatedScrollHandler(
58
+ (event) => {
59
+ scrollOffsetY.set(event.contentOffset[horizontal ? "x" : "y"]);
60
+ if (onScrollProp) {
61
+ runOnJS(onScrollProp)(event);
62
+ }
63
+ },
64
+ [onScrollProp, horizontal]
65
+ );
66
+ const setScrollProcessingEnabled = useCallback(
67
+ (enabled) => {
68
+ var _a;
69
+ console.log("setScrollProcessingEnabled", enabled);
70
+ (_a = refLegendList.current) == null ? void 0 : _a.setScrollProcessingEnabled(enabled);
71
+ },
72
+ [refLegendList]
73
+ );
74
+ useKeyboardHandler(
75
+ // biome-ignore assist/source/useSortedKeys: prefer start/move/end
76
+ {
77
+ onStart: (event) => {
78
+ "worklet";
79
+ mode.set("running");
80
+ if (isKeyboardOpen.get() && event.progress === 1 && event.height > 0) {
81
+ return;
82
+ }
83
+ if (!didInteractive.get()) {
84
+ if (event.height > 0) {
85
+ keyboardHeight.set(event.height - safeAreaInsetBottom);
86
+ }
87
+ isOpening.set(event.progress > 0);
88
+ scrollOffsetAtKeyboardStart.set(scrollOffsetY.get());
89
+ animatedOffsetY.set(scrollOffsetY.get());
90
+ runOnJS(setScrollProcessingEnabled)(false);
91
+ }
92
+ },
93
+ onInteractive: (event) => {
94
+ "worklet";
95
+ if (mode.get() !== "running") {
96
+ runOnJS(setScrollProcessingEnabled)(false);
97
+ }
98
+ mode.set("running");
99
+ if (!didInteractive.get()) {
100
+ didInteractive.set(true);
101
+ }
102
+ if (isAndroid && !horizontal) {
103
+ keyboardInset.set(Math.max(0, event.height - safeAreaInsetBottom));
104
+ }
105
+ },
106
+ onMove: (event) => {
107
+ "worklet";
108
+ if (!didInteractive.get()) {
109
+ const vIsOpening = isOpening.get();
110
+ const vKeyboardHeight = keyboardHeight.get();
111
+ const vProgress = vIsOpening ? event.progress : 1 - event.progress;
112
+ const targetOffset = Math.max(
113
+ 0,
114
+ scrollOffsetAtKeyboardStart.get() + (vIsOpening ? vKeyboardHeight : -vKeyboardHeight) * vProgress
115
+ );
116
+ scrollOffsetY.set(targetOffset);
117
+ animatedOffsetY.set(targetOffset);
118
+ if (!horizontal) {
119
+ keyboardInset.set(Math.max(0, event.height - safeAreaInsetBottom));
120
+ }
121
+ }
122
+ },
123
+ onEnd: (event) => {
124
+ "worklet";
125
+ const wasInteractive = didInteractive.get();
126
+ const vMode = mode.get();
127
+ mode.set("idle");
128
+ if (vMode === "running") {
129
+ if (!wasInteractive) {
130
+ const vIsOpening = isOpening.get();
131
+ const vKeyboardHeight = keyboardHeight.get();
132
+ const targetOffset = Math.max(
133
+ 0,
134
+ scrollOffsetAtKeyboardStart.get() + (vIsOpening ? vKeyboardHeight : -vKeyboardHeight) * (vIsOpening ? event.progress : 1 - event.progress)
135
+ );
136
+ scrollOffsetY.set(targetOffset);
137
+ animatedOffsetY.set(targetOffset);
138
+ }
139
+ runOnJS(setScrollProcessingEnabled)(true);
140
+ didInteractive.set(false);
141
+ isKeyboardOpen.set(event.height > 0);
142
+ if (!horizontal) {
143
+ const newInset = Math.max(0, event.height - safeAreaInsetBottom);
144
+ if (newInset > 0) {
145
+ keyboardInset.set(newInset);
146
+ } else {
147
+ keyboardInset.set(newInset);
148
+ animatedOffsetY.set(scrollOffsetY.get());
149
+ }
150
+ }
151
+ }
152
+ }
153
+ },
154
+ [scrollViewRef, safeAreaInsetBottom]
155
+ );
156
+ const animatedProps = useAnimatedProps(() => {
157
+ "worklet";
158
+ var _a, _b, _c, _d;
159
+ const vAnimatedOffsetY = animatedOffsetY.get();
160
+ const baseProps = {
161
+ contentOffset: vAnimatedOffsetY === null ? void 0 : {
162
+ x: 0,
163
+ y: vAnimatedOffsetY
164
+ }
165
+ };
166
+ return isIos ? Object.assign(baseProps, {
167
+ contentInset: {
168
+ bottom: ((_a = contentInsetProp == null ? void 0 : contentInsetProp.bottom) != null ? _a : 0) + (horizontal ? 0 : keyboardInset.get()),
169
+ left: (_b = contentInsetProp == null ? void 0 : contentInsetProp.left) != null ? _b : 0,
170
+ right: (_c = contentInsetProp == null ? void 0 : contentInsetProp.right) != null ? _c : 0,
171
+ top: (_d = contentInsetProp == null ? void 0 : contentInsetProp.top) != null ? _d : 0
172
+ }
173
+ }) : baseProps;
174
+ });
175
+ const style = isAndroid ? useAnimatedStyle(
176
+ () => {
177
+ var _a;
178
+ return {
179
+ ...styleFlattened || {},
180
+ marginBottom: (_a = keyboardInset.get()) != null ? _a : 0
181
+ };
182
+ },
183
+ [styleProp, keyboardInset]
184
+ ) : void 0;
185
+ return /* @__PURE__ */ React.createElement(
186
+ AnimatedLegendList,
187
+ {
188
+ ...rest,
189
+ animatedProps,
190
+ keyboardDismissMode: "interactive",
191
+ onScroll: scrollHandler,
192
+ ref: combinedRef,
193
+ refScrollView: scrollViewRef,
194
+ scrollIndicatorInsets: { bottom: 0, top: 0 },
195
+ style
196
+ }
197
+ );
198
+ });
199
+
200
+ export { KeyboardAvoidingLegendList, KeyboardAvoidingLegendList as LegendList };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/list",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.10",
4
4
  "description": "Legend List is a drop-in replacement for FlatList with much better performance and supporting dynamically sized items.",
5
5
  "sideEffects": false,
6
6
  "private": false,
package/reanimated.d.mts CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentProps } from 'react';
3
- import Animated from 'react-native-reanimated';
3
+ import Reanimated from 'react-native-reanimated';
4
4
  import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
5
5
 
6
6
  type KeysToOmit = "getEstimatedItemSize" | "getFixedItemSize" | "getItemType" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "itemsAreEqual" | "ItemSeparatorComponent";
7
- type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
7
+ type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Reanimated.ScrollView>>;
8
8
  interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
9
- refScrollView?: React.Ref<Animated.ScrollView>;
9
+ refScrollView?: React.Ref<Reanimated.ScrollView>;
10
10
  }
11
11
  type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
12
12
  type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList" | "ref"> & OtherAnimatedLegendListProps<ItemT>;
package/reanimated.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentProps } from 'react';
3
- import Animated from 'react-native-reanimated';
3
+ import Reanimated from 'react-native-reanimated';
4
4
  import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
5
5
 
6
6
  type KeysToOmit = "getEstimatedItemSize" | "getFixedItemSize" | "getItemType" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "itemsAreEqual" | "ItemSeparatorComponent";
7
- type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
7
+ type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Reanimated.ScrollView>>;
8
8
  interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
9
- refScrollView?: React.Ref<Animated.ScrollView>;
9
+ refScrollView?: React.Ref<Reanimated.ScrollView>;
10
10
  }
11
11
  type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
12
12
  type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList" | "ref"> & OtherAnimatedLegendListProps<ItemT>;
package/reanimated.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var Animated = require('react-native-reanimated');
4
+ var Reanimated = require('react-native-reanimated');
5
5
  var list = require('@legendapp/list');
6
6
 
7
7
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -25,7 +25,7 @@ function _interopNamespace(e) {
25
25
  }
26
26
 
27
27
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
- var Animated__default = /*#__PURE__*/_interopDefault(Animated);
28
+ var Reanimated__default = /*#__PURE__*/_interopDefault(Reanimated);
29
29
 
30
30
  // src/integrations/reanimated.tsx
31
31
 
@@ -54,6 +54,7 @@ var useCombinedRef = (...refs) => {
54
54
  // src/integrations/reanimated.tsx
55
55
  var typedMemo = React.memo;
56
56
  var LegendListForwardedRef = typedMemo(
57
+ // biome-ignore lint/nursery/noShadow: const function name shadowing is intentional
57
58
  React__namespace.forwardRef(function LegendListForwardedRef2(props, ref) {
58
59
  const { refLegendList, ...rest } = props;
59
60
  const refFn = React.useCallback(
@@ -65,13 +66,23 @@ var LegendListForwardedRef = typedMemo(
65
66
  return /* @__PURE__ */ React__namespace.createElement(list.LegendList, { ref: refFn, refScrollView: ref, ...rest });
66
67
  })
67
68
  );
68
- var AnimatedLegendListComponent = Animated__default.default.createAnimatedComponent(LegendListForwardedRef);
69
+ var AnimatedLegendListComponent = Reanimated__default.default.createAnimatedComponent(LegendListForwardedRef);
69
70
  var AnimatedLegendList = typedMemo(
71
+ // biome-ignore lint/nursery/noShadow: const function name shadowing is intentional
70
72
  React__namespace.forwardRef(function AnimatedLegendList2(props, ref) {
71
- const { refScrollView, ...rest } = props;
73
+ const { refScrollView, animatedProps, ...rest } = props;
72
74
  const refLegendList = React__namespace.useRef(null);
73
75
  const combinedRef = useCombinedRef(refLegendList, ref);
74
- return /* @__PURE__ */ React__namespace.createElement(AnimatedLegendListComponent, { ref: refScrollView, refLegendList: combinedRef, ...rest });
76
+ return /* @__PURE__ */ React__namespace.createElement(
77
+ AnimatedLegendListComponent,
78
+ {
79
+ animatedProps,
80
+ animatedPropsInternal: animatedProps,
81
+ ref: refScrollView,
82
+ refLegendList: combinedRef,
83
+ ...rest
84
+ }
85
+ );
75
86
  })
76
87
  );
77
88
 
package/reanimated.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useCallback, memo } from 'react';
3
- import Animated from 'react-native-reanimated';
3
+ import Reanimated from 'react-native-reanimated';
4
4
  import { LegendList } from '@legendapp/list';
5
5
 
6
6
  // src/integrations/reanimated.tsx
@@ -30,6 +30,7 @@ var useCombinedRef = (...refs) => {
30
30
  // src/integrations/reanimated.tsx
31
31
  var typedMemo = memo;
32
32
  var LegendListForwardedRef = typedMemo(
33
+ // biome-ignore lint/nursery/noShadow: const function name shadowing is intentional
33
34
  React.forwardRef(function LegendListForwardedRef2(props, ref) {
34
35
  const { refLegendList, ...rest } = props;
35
36
  const refFn = useCallback(
@@ -41,13 +42,23 @@ var LegendListForwardedRef = typedMemo(
41
42
  return /* @__PURE__ */ React.createElement(LegendList, { ref: refFn, refScrollView: ref, ...rest });
42
43
  })
43
44
  );
44
- var AnimatedLegendListComponent = Animated.createAnimatedComponent(LegendListForwardedRef);
45
+ var AnimatedLegendListComponent = Reanimated.createAnimatedComponent(LegendListForwardedRef);
45
46
  var AnimatedLegendList = typedMemo(
47
+ // biome-ignore lint/nursery/noShadow: const function name shadowing is intentional
46
48
  React.forwardRef(function AnimatedLegendList2(props, ref) {
47
- const { refScrollView, ...rest } = props;
49
+ const { refScrollView, animatedProps, ...rest } = props;
48
50
  const refLegendList = React.useRef(null);
49
51
  const combinedRef = useCombinedRef(refLegendList, ref);
50
- return /* @__PURE__ */ React.createElement(AnimatedLegendListComponent, { ref: refScrollView, refLegendList: combinedRef, ...rest });
52
+ return /* @__PURE__ */ React.createElement(
53
+ AnimatedLegendListComponent,
54
+ {
55
+ animatedProps,
56
+ animatedPropsInternal: animatedProps,
57
+ ref: refScrollView,
58
+ refLegendList: combinedRef,
59
+ ...rest
60
+ }
61
+ );
51
62
  })
52
63
  );
53
64
 
@@ -1,7 +1,7 @@
1
1
  import * as react_native from 'react-native';
2
2
  import { SectionListData, SectionBase, SectionListRenderItemInfo, SectionListScrollParams } from 'react-native';
3
3
  import * as React from 'react';
4
- import { a as LegendListRef, L as LegendListProps } from './types-JPHClxiw.mjs';
4
+ import { a as LegendListRef, L as LegendListProps } from './types-1Hgg1rTO.mjs';
5
5
  import 'react-native-reanimated';
6
6
 
7
7
  type SectionListSeparatorProps<ItemT, SectionT> = {
package/section-list.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_native from 'react-native';
2
2
  import { SectionListData, SectionBase, SectionListRenderItemInfo, SectionListScrollParams } from 'react-native';
3
3
  import * as React from 'react';
4
- import { a as LegendListRef, L as LegendListProps } from './types-JPHClxiw.js';
4
+ import { a as LegendListRef, L as LegendListProps } from './types-1Hgg1rTO.js';
5
5
  import 'react-native-reanimated';
6
6
 
7
7
  type SectionListSeparatorProps<ItemT, SectionT> = {