@legendapp/list 0.5.9 → 0.6.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/README.md +1 -6
- package/animated.d.mts +9 -0
- package/animated.d.ts +9 -0
- package/animated.js +9 -0
- package/animated.mjs +7 -0
- package/index.d.mts +27 -4
- package/index.d.ts +27 -4
- package/index.js +316 -191
- package/index.mjs +299 -174
- package/package.json +1 -1
- package/reanimated.d.mts +13 -0
- package/reanimated.d.ts +13 -0
- package/reanimated.js +47 -0
- package/reanimated.mjs +40 -0
package/package.json
CHANGED
package/reanimated.d.mts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LegendListRef, LegendListPropsBase } from '@legendapp/list';
|
|
2
|
+
import React__default, { ComponentProps } from 'react';
|
|
3
|
+
import Animated from 'react-native-reanimated';
|
|
4
|
+
|
|
5
|
+
type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem";
|
|
6
|
+
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
|
7
|
+
interface AnimatedLegendListProps<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
|
|
8
|
+
refScrollView?: React__default.Ref<Animated.ScrollView>;
|
|
9
|
+
}
|
|
10
|
+
type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
|
|
11
|
+
declare const AnimatedLegendList: React__default.ForwardRefExoticComponent<Omit<Omit<AnimatedLegendListProps<unknown>, "refLegendList"> & OtherAnimatedLegendListProps<unknown>, "ref"> & React__default.RefAttributes<LegendListRef>>;
|
|
12
|
+
|
|
13
|
+
export { AnimatedLegendList };
|
package/reanimated.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LegendListRef, LegendListPropsBase } from '@legendapp/list';
|
|
2
|
+
import React__default, { ComponentProps } from 'react';
|
|
3
|
+
import Animated from 'react-native-reanimated';
|
|
4
|
+
|
|
5
|
+
type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem";
|
|
6
|
+
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
|
7
|
+
interface AnimatedLegendListProps<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
|
|
8
|
+
refScrollView?: React__default.Ref<Animated.ScrollView>;
|
|
9
|
+
}
|
|
10
|
+
type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
|
|
11
|
+
declare const AnimatedLegendList: React__default.ForwardRefExoticComponent<Omit<Omit<AnimatedLegendListProps<unknown>, "refLegendList"> & OtherAnimatedLegendListProps<unknown>, "ref"> & React__default.RefAttributes<LegendListRef>>;
|
|
12
|
+
|
|
13
|
+
export { AnimatedLegendList };
|
package/reanimated.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var list = require('@legendapp/list');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var Animated = require('react-native-reanimated');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
10
|
+
var Animated__default = /*#__PURE__*/_interopDefault(Animated);
|
|
11
|
+
|
|
12
|
+
// src/reanimated.tsx
|
|
13
|
+
var LegendListForwardedRef = React__default.default.forwardRef(function LegendListForwardedRef2(props, ref) {
|
|
14
|
+
const { refLegendList, ...rest } = props;
|
|
15
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
16
|
+
list.LegendList,
|
|
17
|
+
{
|
|
18
|
+
refScrollView: ref,
|
|
19
|
+
ref: (r) => {
|
|
20
|
+
refLegendList(r);
|
|
21
|
+
},
|
|
22
|
+
...rest
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
var AnimatedLegendListComponent = Animated__default.default.createAnimatedComponent(LegendListForwardedRef);
|
|
27
|
+
var AnimatedLegendList = React__default.default.forwardRef(function AnimatedLegendList2(props, ref) {
|
|
28
|
+
const { refScrollView, ...rest } = props;
|
|
29
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
30
|
+
AnimatedLegendListComponent,
|
|
31
|
+
{
|
|
32
|
+
refLegendList: (r) => {
|
|
33
|
+
if (ref) {
|
|
34
|
+
if (typeof ref === "function") {
|
|
35
|
+
ref(r);
|
|
36
|
+
} else {
|
|
37
|
+
ref.current = r;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
ref: refScrollView,
|
|
42
|
+
...rest
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
exports.AnimatedLegendList = AnimatedLegendList;
|
package/reanimated.mjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { LegendList } from '@legendapp/list';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Animated from 'react-native-reanimated';
|
|
4
|
+
|
|
5
|
+
// src/reanimated.tsx
|
|
6
|
+
var LegendListForwardedRef = React.forwardRef(function LegendListForwardedRef2(props, ref) {
|
|
7
|
+
const { refLegendList, ...rest } = props;
|
|
8
|
+
return /* @__PURE__ */ React.createElement(
|
|
9
|
+
LegendList,
|
|
10
|
+
{
|
|
11
|
+
refScrollView: ref,
|
|
12
|
+
ref: (r) => {
|
|
13
|
+
refLegendList(r);
|
|
14
|
+
},
|
|
15
|
+
...rest
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
var AnimatedLegendListComponent = Animated.createAnimatedComponent(LegendListForwardedRef);
|
|
20
|
+
var AnimatedLegendList = React.forwardRef(function AnimatedLegendList2(props, ref) {
|
|
21
|
+
const { refScrollView, ...rest } = props;
|
|
22
|
+
return /* @__PURE__ */ React.createElement(
|
|
23
|
+
AnimatedLegendListComponent,
|
|
24
|
+
{
|
|
25
|
+
refLegendList: (r) => {
|
|
26
|
+
if (ref) {
|
|
27
|
+
if (typeof ref === "function") {
|
|
28
|
+
ref(r);
|
|
29
|
+
} else {
|
|
30
|
+
ref.current = r;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
ref: refScrollView,
|
|
35
|
+
...rest
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export { AnimatedLegendList };
|