@legendapp/list 2.1.0-beta.0 → 2.1.0-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legendapp/list",
3
- "version": "2.1.0-beta.0",
3
+ "version": "2.1.0-beta.2",
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,
@@ -11,8 +11,11 @@
11
11
  "**"
12
12
  ],
13
13
  "peerDependencies": {
14
- "react": "*",
15
- "react-native": "*"
14
+ "react": "*"
15
+ },
16
+ "optionalDependencies": {
17
+ "react-native": "*",
18
+ "react-dom": "*"
16
19
  },
17
20
  "author": "Legend <contact@legendapp.com> (https://github.com/LegendApp)",
18
21
  "keywords": [
package/reanimated.d.mts CHANGED
@@ -1,17 +1,18 @@
1
- import React__default, { ComponentProps } from 'react';
1
+ import * as React from 'react';
2
+ import { ComponentProps } from 'react';
2
3
  import Animated from 'react-native-reanimated';
3
4
  import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
4
5
 
5
6
  type KeysToOmit = "getEstimatedItemSize" | "getFixedItemSize" | "getItemType" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "itemsAreEqual" | "ItemSeparatorComponent";
6
7
  type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
7
8
  interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
8
- refScrollView?: React__default.Ref<Animated.ScrollView>;
9
+ refScrollView?: React.Ref<Animated.ScrollView>;
9
10
  }
10
11
  type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
11
12
  type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList" | "ref"> & OtherAnimatedLegendListProps<ItemT>;
12
13
  type AnimatedLegendListDefinition = <ItemT>(props: AnimatedLegendListProps<ItemT> & {
13
- ref?: React__default.Ref<LegendListRef>;
14
- }) => React__default.ReactElement | null;
14
+ ref?: React.Ref<LegendListRef>;
15
+ }) => React.ReactElement | null;
15
16
  declare const AnimatedLegendList: AnimatedLegendListDefinition;
16
17
 
17
18
  export { AnimatedLegendList, type AnimatedLegendListProps, type AnimatedLegendListPropsBase };
package/reanimated.d.ts CHANGED
@@ -1,17 +1,18 @@
1
- import React__default, { ComponentProps } from 'react';
1
+ import * as React from 'react';
2
+ import { ComponentProps } from 'react';
2
3
  import Animated from 'react-native-reanimated';
3
4
  import { LegendListPropsBase, LegendListRef } from '@legendapp/list';
4
5
 
5
6
  type KeysToOmit = "getEstimatedItemSize" | "getFixedItemSize" | "getItemType" | "keyExtractor" | "animatedProps" | "renderItem" | "onItemSizeChanged" | "itemsAreEqual" | "ItemSeparatorComponent";
6
7
  type PropsBase<ItemT> = LegendListPropsBase<ItemT, ComponentProps<typeof Animated.ScrollView>>;
7
8
  interface AnimatedLegendListPropsBase<ItemT> extends Omit<PropsBase<ItemT>, KeysToOmit> {
8
- refScrollView?: React__default.Ref<Animated.ScrollView>;
9
+ refScrollView?: React.Ref<Animated.ScrollView>;
9
10
  }
10
11
  type OtherAnimatedLegendListProps<ItemT> = Pick<PropsBase<ItemT>, KeysToOmit>;
11
12
  type AnimatedLegendListProps<ItemT> = Omit<AnimatedLegendListPropsBase<ItemT>, "refLegendList" | "ref"> & OtherAnimatedLegendListProps<ItemT>;
12
13
  type AnimatedLegendListDefinition = <ItemT>(props: AnimatedLegendListProps<ItemT> & {
13
- ref?: React__default.Ref<LegendListRef>;
14
- }) => React__default.ReactElement | null;
14
+ ref?: React.Ref<LegendListRef>;
15
+ }) => React.ReactElement | null;
15
16
  declare const AnimatedLegendList: AnimatedLegendListDefinition;
16
17
 
17
18
  export { AnimatedLegendList, type AnimatedLegendListProps, type AnimatedLegendListPropsBase };
package/reanimated.js CHANGED
@@ -6,7 +6,25 @@ var list = require('@legendapp/list');
6
6
 
7
7
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
 
9
- var React__default = /*#__PURE__*/_interopDefault(React);
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);
10
28
  var Animated__default = /*#__PURE__*/_interopDefault(Animated);
11
29
 
12
30
  // src/integrations/reanimated.tsx
@@ -36,7 +54,7 @@ var useCombinedRef = (...refs) => {
36
54
  // src/integrations/reanimated.tsx
37
55
  var typedMemo = React.memo;
38
56
  var LegendListForwardedRef = typedMemo(
39
- React__default.default.forwardRef(function LegendListForwardedRef2(props, ref) {
57
+ React__namespace.forwardRef(function LegendListForwardedRef2(props, ref) {
40
58
  const { refLegendList, ...rest } = props;
41
59
  const refFn = React.useCallback(
42
60
  (r) => {
@@ -44,16 +62,16 @@ var LegendListForwardedRef = typedMemo(
44
62
  },
45
63
  [refLegendList]
46
64
  );
47
- return /* @__PURE__ */ React__default.default.createElement(list.LegendList, { ref: refFn, refScrollView: ref, ...rest });
65
+ return /* @__PURE__ */ React__namespace.createElement(list.LegendList, { ref: refFn, refScrollView: ref, ...rest });
48
66
  })
49
67
  );
50
68
  var AnimatedLegendListComponent = Animated__default.default.createAnimatedComponent(LegendListForwardedRef);
51
69
  var AnimatedLegendList = typedMemo(
52
- React__default.default.forwardRef(function AnimatedLegendList2(props, ref) {
70
+ React__namespace.forwardRef(function AnimatedLegendList2(props, ref) {
53
71
  const { refScrollView, ...rest } = props;
54
- const refLegendList = React__default.default.useRef(null);
72
+ const refLegendList = React__namespace.useRef(null);
55
73
  const combinedRef = useCombinedRef(refLegendList, ref);
56
- return /* @__PURE__ */ React__default.default.createElement(AnimatedLegendListComponent, { ref: refScrollView, refLegendList: combinedRef, ...rest });
74
+ return /* @__PURE__ */ React__namespace.createElement(AnimatedLegendListComponent, { ref: refScrollView, refLegendList: combinedRef, ...rest });
57
75
  })
58
76
  );
59
77
 
package/reanimated.mjs CHANGED
@@ -1,4 +1,5 @@
1
- import React, { useCallback, memo } from 'react';
1
+ import * as React from 'react';
2
+ import { useCallback, memo } from 'react';
2
3
  import Animated from 'react-native-reanimated';
3
4
  import { LegendList } from '@legendapp/list';
4
5