@legendapp/list 2.0.0-next.9 → 2.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.DS_Store +0 -0
- package/animated.d.mts +3 -65
- package/animated.d.ts +3 -65
- package/index.d.mts +123 -339
- package/index.d.ts +123 -339
- package/index.js +1497 -793
- package/index.mjs +1454 -750
- package/keyboard-controller.d.mts +7 -260
- package/keyboard-controller.d.ts +7 -260
- package/package.json +1 -1
- package/reanimated.d.mts +1 -1
- package/reanimated.d.ts +1 -1
- package/reanimated.js +19 -17
- package/reanimated.mjs +20 -18
package/reanimated.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, memo } from 'react';
|
|
2
2
|
import Animated from 'react-native-reanimated';
|
|
3
3
|
import { LegendList } from '@legendapp/list';
|
|
4
4
|
|
|
@@ -27,25 +27,27 @@ var useCombinedRef = (...refs) => {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// src/integrations/reanimated.tsx
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
var typedMemo = memo;
|
|
31
|
+
var LegendListForwardedRef = typedMemo(
|
|
32
|
+
React.forwardRef(function LegendListForwardedRef2(props, ref) {
|
|
33
|
+
const { refLegendList, ...rest } = props;
|
|
34
|
+
const refFn = useCallback(
|
|
35
|
+
(r) => {
|
|
36
36
|
refLegendList(r);
|
|
37
37
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
|
|
38
|
+
[refLegendList]
|
|
39
|
+
);
|
|
40
|
+
return /* @__PURE__ */ React.createElement(LegendList, { ref: refFn, refScrollView: ref, ...rest });
|
|
41
|
+
})
|
|
42
|
+
);
|
|
43
43
|
var AnimatedLegendListComponent = Animated.createAnimatedComponent(LegendListForwardedRef);
|
|
44
|
-
var AnimatedLegendList =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
44
|
+
var AnimatedLegendList = typedMemo(
|
|
45
|
+
React.forwardRef(function AnimatedLegendList2(props, ref) {
|
|
46
|
+
const { refScrollView, ...rest } = props;
|
|
47
|
+
const refLegendList = React.useRef(null);
|
|
48
|
+
const combinedRef = useCombinedRef(refLegendList, ref);
|
|
49
|
+
return /* @__PURE__ */ React.createElement(AnimatedLegendListComponent, { ref: refScrollView, refLegendList: combinedRef, ...rest });
|
|
50
|
+
})
|
|
51
|
+
);
|
|
50
52
|
|
|
51
53
|
export { AnimatedLegendList };
|