@legendapp/list 2.0.0-next.3 → 2.0.0-next.5
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 +1 -1
- package/animated.d.ts +1 -1
- package/animated.js +2 -2
- package/animated.mjs +2 -2
- package/index.d.mts +20 -20
- package/index.d.ts +20 -20
- package/index.js +779 -777
- package/index.mjs +779 -777
- package/keyboard-controller.js +4 -4
- package/keyboard-controller.mjs +4 -4
- package/package.json +1 -1
- package/reanimated.d.mts +1 -1
- package/reanimated.d.ts +1 -1
- package/reanimated.js +7 -7
- package/reanimated.mjs +7 -7
package/keyboard-controller.js
CHANGED
|
@@ -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
|
);
|
package/keyboard-controller.mjs
CHANGED
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/list",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.5",
|
|
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,6 +1,6 @@
|
|
|
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
5
|
type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
|
|
6
6
|
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
package/reanimated.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
5
|
type KeysToOmit = "getEstimatedItemSize" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "ItemSeparatorComponent";
|
|
6
6
|
type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
|
package/reanimated.js
CHANGED
|
@@ -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;
|
package/reanimated.mjs
CHANGED
|
@@ -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 };
|