@legendapp/list 3.0.0-beta.37 → 3.0.0-beta.39

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.
@@ -1,48 +0,0 @@
1
- import * as React from 'react';
2
- import { useState, forwardRef } from 'react';
3
- import { StyleSheet } from 'react-native';
4
- import { useKeyboardHandler } from 'react-native-keyboard-controller';
5
- import { runOnJS } from 'react-native-reanimated';
6
- import { LegendList as LegendList$1 } from '@legendapp/list/react-native';
7
-
8
- // src/integrations/keyboard-controller.tsx
9
- var typedForwardRef = forwardRef;
10
- var LegendList = typedForwardRef(function LegendList2(props, forwardedRef) {
11
- const {
12
- LegendList: LegendListProp,
13
- contentContainerStyle: contentContainerStyleProp,
14
- scrollIndicatorInsets: scrollIndicatorInsetsProp,
15
- ...rest
16
- } = props;
17
- const [padding, setPadding] = useState(0);
18
- const updatePadding = (height) => {
19
- setPadding(height);
20
- };
21
- useKeyboardHandler({
22
- onEnd: (e) => {
23
- "worklet";
24
- runOnJS(updatePadding)(e.height);
25
- }
26
- });
27
- const LegendListComponent = LegendListProp != null ? LegendListProp : LegendList$1;
28
- const contentContainerStyleFlattened = StyleSheet.flatten(contentContainerStyleProp) || {};
29
- const contentContainerStyle = { ...contentContainerStyleFlattened, paddingTop: padding };
30
- const scrollIndicatorInsets = scrollIndicatorInsetsProp ? { ...scrollIndicatorInsetsProp } : {};
31
- if (!props.horizontal) {
32
- scrollIndicatorInsets.top = ((scrollIndicatorInsets == null ? void 0 : scrollIndicatorInsets.top) || 0) + padding;
33
- }
34
- return (
35
- // @ts-expect-error TODO: Fix this type
36
- /* @__PURE__ */ React.createElement(
37
- LegendListComponent,
38
- {
39
- ...rest,
40
- contentContainerStyle,
41
- ref: forwardedRef,
42
- scrollIndicatorInsets
43
- }
44
- )
45
- );
46
- });
47
-
48
- export { LegendList };