@tarojs/components-advanced 3.6.0-beta.2 → 3.6.0-beta.4

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.
Files changed (58) hide show
  1. package/dist/components/index.d.ts +1 -1
  2. package/dist/components/index.js +2 -1
  3. package/dist/components/index.js.map +1 -0
  4. package/dist/components/virtual-list/constants.d.ts +2 -1
  5. package/dist/components/virtual-list/constants.js +4 -1
  6. package/dist/components/virtual-list/constants.js.map +1 -0
  7. package/dist/components/virtual-list/dom-helpers.d.ts +2 -1
  8. package/dist/components/virtual-list/dom-helpers.js +33 -30
  9. package/dist/components/virtual-list/dom-helpers.js.map +1 -0
  10. package/dist/components/virtual-list/index.d.ts +3 -4
  11. package/dist/components/virtual-list/index.js +5 -102
  12. package/dist/components/virtual-list/index.js.map +1 -0
  13. package/dist/components/virtual-list/list-set.d.ts +4 -4
  14. package/dist/components/virtual-list/list-set.js +178 -222
  15. package/dist/components/virtual-list/list-set.js.map +1 -0
  16. package/dist/components/virtual-list/preset.d.ts +6 -6
  17. package/dist/components/virtual-list/preset.js +117 -148
  18. package/dist/components/virtual-list/preset.js.map +1 -0
  19. package/dist/components/virtual-list/react/index.d.ts +2 -2
  20. package/dist/components/virtual-list/react/index.js +31 -63
  21. package/dist/components/virtual-list/react/index.js.map +1 -0
  22. package/dist/components/virtual-list/react/list.d.ts +10 -5
  23. package/dist/components/virtual-list/react/list.js +347 -450
  24. package/dist/components/virtual-list/react/list.js.map +1 -0
  25. package/dist/components/virtual-list/react/validate.d.ts +4 -3
  26. package/dist/components/virtual-list/react/validate.js +59 -64
  27. package/dist/components/virtual-list/react/validate.js.map +1 -0
  28. package/dist/components/virtual-list/utils.d.ts +5 -5
  29. package/dist/components/virtual-list/utils.js +27 -28
  30. package/dist/components/virtual-list/utils.js.map +1 -0
  31. package/dist/components/virtual-list/vue/index.d.ts +6 -6
  32. package/dist/components/virtual-list/vue/index.js +10 -6
  33. package/dist/components/virtual-list/vue/index.js.map +1 -0
  34. package/dist/components/virtual-list/vue/list.d.ts +2 -2
  35. package/dist/components/virtual-list/vue/list.js +435 -474
  36. package/dist/components/virtual-list/vue/list.js.map +1 -0
  37. package/dist/components/virtual-list/vue/render.d.ts +2 -1
  38. package/dist/components/virtual-list/vue/render.js +17 -23
  39. package/dist/components/virtual-list/vue/render.js.map +1 -0
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.js +8 -2
  42. package/dist/index.js.map +1 -0
  43. package/dist/utils/convert.d.ts +3 -2
  44. package/dist/utils/convert.js +15 -11
  45. package/dist/utils/convert.js.map +1 -0
  46. package/dist/utils/index.d.ts +4 -4
  47. package/dist/utils/index.js +5 -4
  48. package/dist/utils/index.js.map +1 -0
  49. package/dist/utils/lodash.d.ts +2 -1
  50. package/dist/utils/lodash.js +10 -10
  51. package/dist/utils/lodash.js.map +1 -0
  52. package/dist/utils/math.d.ts +3 -2
  53. package/dist/utils/math.js +13 -16
  54. package/dist/utils/math.js.map +1 -0
  55. package/dist/utils/timer.d.ts +3 -3
  56. package/dist/utils/timer.js +21 -17
  57. package/dist/utils/timer.js.map +1 -0
  58. package/package.json +16 -8
@@ -1 +1 @@
1
- export * from './virtual-list';
1
+ export * from "./virtual-list/index";
@@ -1 +1,2 @@
1
- export * from './virtual-list';
1
+ export { VirtualList } from './virtual-list/index.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
- export declare const IS_SCROLLING_DEBOUNCE_INTERVAL = 200;
1
+ declare const IS_SCROLLING_DEBOUNCE_INTERVAL = 200;
2
+ export { IS_SCROLLING_DEBOUNCE_INTERVAL };
@@ -1 +1,4 @@
1
- export var IS_SCROLLING_DEBOUNCE_INTERVAL = 200;
1
+ const IS_SCROLLING_DEBOUNCE_INTERVAL = 200;
2
+
3
+ export { IS_SCROLLING_DEBOUNCE_INTERVAL };
4
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../src/components/virtual-list/constants.ts"],"sourcesContent":["export const IS_SCROLLING_DEBOUNCE_INTERVAL = 200\n"],"names":[],"mappings":"AAAO,MAAM,8BAA8B,GAAG;;;;"}
@@ -1 +1,2 @@
1
- export declare function getRTLOffsetType(recalculate?: boolean): any;
1
+ declare function getRTLOffsetType(recalculate?: boolean): any;
2
+ export { getRTLOffsetType };
@@ -4,35 +4,38 @@
4
4
  // The safest way to check this is to intentionally set a negative offset,
5
5
  // and then verify that the subsequent "scroll" event matches the negative offset.
6
6
  // If it does not match, then we can assume a non-standard RTL scroll implementation.
7
-
8
- var cachedRTLResult = null;
9
- export function getRTLOffsetType() {
10
- var recalculate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11
- if (cachedRTLResult === null || recalculate) {
12
- var outerDiv = document.createElement('div');
13
- var outerStyle = outerDiv.style;
14
- outerStyle.width = '50px';
15
- outerStyle.height = '50px';
16
- outerStyle.overflow = 'scroll';
17
- outerStyle.direction = 'rtl';
18
- var innerDiv = document.createElement('div');
19
- var innerStyle = innerDiv.style;
20
- innerStyle.width = '100px';
21
- innerStyle.height = '100px';
22
- outerDiv.appendChild(innerDiv);
23
- document.body.appendChild(outerDiv);
24
- if (outerDiv.scrollLeft > 0) {
25
- cachedRTLResult = 'positive-descending';
26
- } else {
27
- outerDiv.scrollLeft = 1;
28
- if (outerDiv.scrollLeft === 0) {
29
- cachedRTLResult = 'negative';
30
- } else {
31
- cachedRTLResult = 'positive-ascending';
32
- }
7
+ let cachedRTLResult = null;
8
+ function getRTLOffsetType(recalculate = false) {
9
+ if (cachedRTLResult === null || recalculate) {
10
+ const outerDiv = document.createElement('div');
11
+ const outerStyle = outerDiv.style;
12
+ outerStyle.width = '50px';
13
+ outerStyle.height = '50px';
14
+ outerStyle.overflow = 'scroll';
15
+ outerStyle.direction = 'rtl';
16
+ const innerDiv = document.createElement('div');
17
+ const innerStyle = innerDiv.style;
18
+ innerStyle.width = '100px';
19
+ innerStyle.height = '100px';
20
+ outerDiv.appendChild(innerDiv);
21
+ document.body.appendChild(outerDiv);
22
+ if (outerDiv.scrollLeft > 0) {
23
+ cachedRTLResult = 'positive-descending';
24
+ }
25
+ else {
26
+ outerDiv.scrollLeft = 1;
27
+ if (outerDiv.scrollLeft === 0) {
28
+ cachedRTLResult = 'negative';
29
+ }
30
+ else {
31
+ cachedRTLResult = 'positive-ascending';
32
+ }
33
+ }
34
+ document.body.removeChild(outerDiv);
35
+ return cachedRTLResult;
33
36
  }
34
- document.body.removeChild(outerDiv);
35
37
  return cachedRTLResult;
36
- }
37
- return cachedRTLResult;
38
- }
38
+ }
39
+
40
+ export { getRTLOffsetType };
41
+ //# sourceMappingURL=dom-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-helpers.js","sources":["../../../src/components/virtual-list/dom-helpers.ts"],"sourcesContent":["// TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\n\nlet cachedRTLResult = null\n\nexport function getRTLOffsetType (recalculate = false) {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n outerDiv.appendChild(innerDiv)\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending'\n } else {\n outerDiv.scrollLeft = 1\n\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative'\n } else {\n cachedRTLResult = 'positive-ascending'\n }\n }\n\n document.body.removeChild(outerDiv)\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAI,eAAe,GAAG,IAAI,CAAA;AAEV,SAAA,gBAAgB,CAAE,WAAW,GAAG,KAAK,EAAA;AACnD,IAAA,IAAI,eAAe,KAAK,IAAI,IAAI,WAAW,EAAE;QAC3C,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;AAC9C,QAAA,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAA;AACjC,QAAA,UAAU,CAAC,KAAK,GAAG,MAAM,CAAA;AACzB,QAAA,UAAU,CAAC,MAAM,GAAG,MAAM,CAAA;AAC1B,QAAA,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAA;AAC9B,QAAA,UAAU,CAAC,SAAS,GAAG,KAAK,CAAA;QAC5B,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;AAC9C,QAAA,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAA;AACjC,QAAA,UAAU,CAAC,KAAK,GAAG,OAAO,CAAA;AAC1B,QAAA,UAAU,CAAC,MAAM,GAAG,OAAO,CAAA;AAC3B,QAAA,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;AAC9B,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;AAEnC,QAAA,IAAI,QAAQ,CAAC,UAAU,GAAG,CAAC,EAAE;YAC3B,eAAe,GAAG,qBAAqB,CAAA;AACxC,SAAA;AAAM,aAAA;AACL,YAAA,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAA;AAEvB,YAAA,IAAI,QAAQ,CAAC,UAAU,KAAK,CAAC,EAAE;gBAC7B,eAAe,GAAG,UAAU,CAAA;AAC7B,aAAA;AAAM,iBAAA;gBACL,eAAe,GAAG,oBAAoB,CAAA;AACvC,aAAA;AACF,SAAA;AAED,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;AACnC,QAAA,OAAO,eAAe,CAAA;AACvB,KAAA;AAED,IAAA,OAAO,eAAe,CAAA;AACxB;;;;"}
@@ -1,5 +1,5 @@
1
- import type { BaseEventOrig, BaseEventOrigFunction, ScrollViewProps, StandardProps } from '@tarojs/components';
2
- import type { Component, ComponentType, CSSProperties, ReactNode } from 'react';
1
+ import { BaseEventOrig, BaseEventOrigFunction, ScrollViewProps, StandardProps } from '@tarojs/components';
2
+ import { Component, ComponentType, CSSProperties, ReactNode } from 'react';
3
3
  interface VirtualListProps extends Omit<StandardProps, 'children'> {
4
4
  /** 列表的高度。 */
5
5
  height: string | number;
@@ -185,5 +185,4 @@ declare namespace VirtualListProps {
185
185
  declare class VirtualListComponent extends Component<VirtualListProps> {
186
186
  }
187
187
  declare const VirtualList: typeof VirtualListComponent;
188
- export { VirtualList, VirtualListProps };
189
- export default VirtualList;
188
+ export { VirtualList as default, VirtualList, VirtualListProps };
@@ -1,103 +1,6 @@
1
- /** 虚拟列表
2
- * @classification viewContainer
3
- * @supported weapp, swan, alipay, tt, qq, jd, h5
4
- * @example_react
5
- * ```tsx
6
- * import VirtualList from `@tarojs/components/virtual-list`
7
- *
8
- * function buildData (offset = 0) {
9
- * return Array(100).fill(0).map((_, i) => i + offset);
10
- * }
11
- *
12
- * const Row = React.memo(({ id, index, style, data }) => {
13
- * return (
14
- * <View id={id} className={index % 2 ? 'ListItemOdd' : 'ListItemEven'} style={style}>
15
- * Row {index}
16
- * </View>
17
- * );
18
- * })
19
- *
20
- * export default class Index extends Component {
21
- * state = {
22
- * data: buildData(0),
23
- * }
24
- *
25
- * render() {
26
- * const { data } = this.state
27
- * const dataLen = data.length
28
- * return (
29
- * <VirtualList
30
- * height={500} // 列表的高度
31
- * width='100%' // 列表的宽度
32
- * item={Row} // 列表单项组件,这里只能传入一个组件
33
- * itemData={data} // 渲染列表的数据
34
- * itemCount={dataLen} // 渲染列表的长度
35
- * itemSize={100} // 列表单项的高度
36
- * />
37
- * );
38
- * }
39
- * }
40
- * ```
41
- * @example_vue
42
- * ```js
43
- * // app.js 入口文件
44
- * import Vue from 'vue'
45
- * import VirtualList from '@tarojs/components/virtual-list'
46
- *
47
- * Vue.use(VirtualList)
48
- * ```
49
- * ```js
50
- * <! –– row.vue 单项组件 ––>
51
- * <template>
52
- * <view
53
- * :class="index % 2 ? 'ListItemOdd' : 'ListItemEven'"
54
- * :style="css"
55
- * >
56
- * Row {{ index }} : {{ data[index] }}
57
- * </view>
58
- * </template>
59
- *
60
- * <script>
61
- * export default {
62
- * props: ['index', 'data', 'css']
63
- * }
64
- * </script>
65
- * ```
66
- * ```js
67
- * <! –– page.vue 页面组件 ––>
68
- * <template>
69
- * <virtual-list
70
- * wclass="List"
71
- * :height="500"
72
- * :item-data="list"
73
- * :item-count="list.length"
74
- * :item-size="100"
75
- * :item="Row"
76
- * width="100%"
77
- * />
78
- * </template>
79
- *
80
- * <script>
81
- * import Row from './row.vue'
82
- * import { markRaw } from 'vue'
83
- *
84
- * function buildData (offset = 0) {
85
- * return Array(100).fill(0).map((_, i) => i + offset)
86
- * }
87
- *
88
- * export default {
89
- * data() {
90
- * return {
91
- * Row: markRaw(Row),
92
- * list: buildData(0)
93
- * }
94
- * },
95
- * }
96
- * </script>
97
- * ```
98
- * @see https://taro-docs.jd.com/docs/virtual-list
99
- */
1
+ const VirtualList = (process.env.FRAMEWORK === 'vue' || process.env.FRAMEWORK === 'vue3')
2
+ ? require('./vue').default
3
+ : require('./react').default;
100
4
 
101
- var VirtualList = process.env.FRAMEWORK === 'vue' || process.env.FRAMEWORK === 'vue3' ? require('./vue').default : require('./react').default;
102
- export { VirtualList };
103
- export default VirtualList;
5
+ export { VirtualList, VirtualList as default };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/virtual-list/index.ts"],"sourcesContent":["import type { BaseEventOrig, BaseEventOrigFunction, ScrollViewProps, StandardProps } from '@tarojs/components'\nimport type { Component, ComponentType, CSSProperties, ReactNode } from 'react'\n\ninterface VirtualListProps extends Omit<StandardProps, 'children'> {\n /** 列表的高度。 */\n height: string | number\n /** 列表的宽度。 */\n width: string | number\n /** 子组件 */\n item: ComponentType<{\n /** 组件 ID */\n id: string\n /** 单项的样式,样式必须传入组件的 style 中 */\n style?: CSSProperties\n /** 组件渲染的数据 */\n data: any\n /** 组件渲染数据的索引 */\n index: number\n /** 组件是否正在滚动,当 useIsScrolling 值为 true 时返回布尔值,否则返回 undefined */\n isScrolling?: boolean\n }>\n /** 列表的长度 */\n itemCount: number\n /** 渲染数据 */\n itemData: any[]\n /** 列表单项的大小,垂直滚动时为高度,水平滚动时为宽度。\n *\n * > Note:\n * > - unlimitedSize 模式下如果传入函数,只会调用一次用于设置初始值\n * > - 非 unlimitedSize 模式下如果传入函数,为避免性能问题,每个节点只会调用一次用于设置初始值\n */\n itemSize: number | ((index?: number, itemData?: any[]) => number)\n /** 解开高度列表单项大小限制,默认值使用: itemSize (请注意,初始高度与实际高度差异过大会导致隐患)。\n *\n * > Note: 通过 itemSize 设置的初始高度与子节点实际高度差异过大会导致隐患\n * @default false\n */\n unlimitedSize?: boolean\n /** 布局方式\n * @default \"absolute\"\n */\n position?: 'absolute' | 'relative'\n /** 初始滚动偏移值,水平滚动影响 scrollLeft,垂直滚动影响 scrollTop。 */\n initialScrollOffset?: number\n /** 列表内部容器组件类型。\n * @default View\n */\n innerElementType?: ComponentType\n /** 顶部区域 */\n renderTop?: ReactNode\n /** 底部区域 */\n renderBottom?: ReactNode\n /** 滚动方向。vertical 为垂直滚动,horizontal 为平行滚动。\n * @default \"vertical\"\n */\n layout?: 'vertical' | 'horizontal'\n /** 列表滚动时调用函数 */\n onScroll?: (event: VirtualListProps.IVirtualListEvent<VirtualListProps.IVirtualListEventDetail>) => void\n /** 调用平台原生的滚动监听函数。 */\n onScrollNative?: BaseEventOrigFunction<ScrollViewProps.onScrollDetail>\n /** 在可视区域之外渲染的列表单项数量,值设置得越高,快速滚动时出现白屏的概率就越小,相应地,每次滚动的性能会变得越差。 */\n overscanCount?: number\n /** 上下滚动预占位节点 */\n placeholderCount?: number\n /** 是否注入 isScrolling 属性到 item 组件。这个参数一般用于实现滚动骨架屏(或其它 placeholder) 时比较有用。 */\n useIsScrolling?: boolean\n style?: CSSProperties\n}\n\ndeclare namespace VirtualListProps {\n interface IVirtualListEventDetail extends ScrollViewProps.onScrollDetail {\n scrollLeft: number\n scrollTop: number\n scrollHeight: number\n scrollWidth: number\n }\n\n interface IVirtualListEvent<T extends ScrollViewProps.onScrollDetail = ScrollViewProps.onScrollDetail> extends BaseEventOrig {\n /** 滚动方向,可能值为 forward 往前, backward 往后。 */\n scrollDirection: 'forward' | 'backward'\n /** 滚动距离 */\n scrollOffset: number\n /** 当滚动是由 scrollTo() 或 scrollToItem() 调用时返回 true,否则返回 false */\n scrollUpdateWasRequested: boolean\n /** 当前只有 React 支持 */\n detail: T\n }\n}\n\n/** 虚拟列表\n * @classification viewContainer\n * @supported weapp, swan, alipay, tt, qq, jd, h5\n * @example_react\n * ```tsx\n * import VirtualList from `@tarojs/components/virtual-list`\n *\n * function buildData (offset = 0) {\n * return Array(100).fill(0).map((_, i) => i + offset);\n * }\n *\n * const Row = React.memo(({ id, index, style, data }) => {\n * return (\n * <View id={id} className={index % 2 ? 'ListItemOdd' : 'ListItemEven'} style={style}>\n * Row {index}\n * </View>\n * );\n * })\n *\n * export default class Index extends Component {\n * state = {\n * data: buildData(0),\n * }\n *\n * render() {\n * const { data } = this.state\n * const dataLen = data.length\n * return (\n * <VirtualList\n * height={500} // 列表的高度\n * width='100%' // 列表的宽度\n * item={Row} // 列表单项组件,这里只能传入一个组件\n * itemData={data} // 渲染列表的数据\n * itemCount={dataLen} // 渲染列表的长度\n * itemSize={100} // 列表单项的高度\n * />\n * );\n * }\n * }\n * ```\n * @example_vue\n * ```js\n * // app.js 入口文件\n * import Vue from 'vue'\n * import VirtualList from '@tarojs/components/virtual-list'\n *\n * Vue.use(VirtualList)\n * ```\n * ```js\n * <! –– row.vue 单项组件 ––>\n * <template>\n * <view\n * :class=\"index % 2 ? 'ListItemOdd' : 'ListItemEven'\"\n * :style=\"css\"\n * >\n * Row {{ index }} : {{ data[index] }}\n * </view>\n * </template>\n *\n * <script>\n * export default {\n * props: ['index', 'data', 'css']\n * }\n * </script>\n * ```\n * ```js\n * <! –– page.vue 页面组件 ––>\n * <template>\n * <virtual-list\n * wclass=\"List\"\n * :height=\"500\"\n * :item-data=\"list\"\n * :item-count=\"list.length\"\n * :item-size=\"100\"\n * :item=\"Row\"\n * width=\"100%\"\n * />\n * </template>\n *\n * <script>\n * import Row from './row.vue'\n * import { markRaw } from 'vue'\n *\n * function buildData (offset = 0) {\n * return Array(100).fill(0).map((_, i) => i + offset)\n * }\n *\n * export default {\n * data() {\n * return {\n * Row: markRaw(Row),\n * list: buildData(0)\n * }\n * },\n * }\n * </script>\n * ```\n * @see https://taro-docs.jd.com/docs/virtual-list\n */\ndeclare class VirtualListComponent extends Component<VirtualListProps> {}\n\nconst VirtualList: typeof VirtualListComponent = (process.env.FRAMEWORK === 'vue' || process.env.FRAMEWORK === 'vue3')\n ? require('./vue').default\n : require('./react').default\n\nexport { VirtualList, VirtualListProps }\nexport default VirtualList\n"],"names":[],"mappings":"AA8LA,MAAM,WAAW,GAAgC,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,MAAM;AACnH,MAAE,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO;AAC1B,MAAE,OAAO,CAAC,SAAS,CAAC,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
- import type { IProps } from './preset';
2
- declare type TProps = Pick<IProps, 'width' | 'height' | 'unlimitedSize' | 'itemCount' | 'itemData' | 'itemSize' | 'overscanCount' | 'direction' | 'layout'>;
3
- export default class ListSet {
1
+ import { IProps } from "./preset";
2
+ type TProps = Pick<IProps, 'width' | 'height' | 'unlimitedSize' | 'itemCount' | 'itemData' | 'itemSize' | 'overscanCount' | 'direction' | 'layout'>;
3
+ declare class ListSet {
4
4
  protected props: TProps;
5
5
  protected refresh?: TFunc;
6
6
  list: number[];
@@ -24,4 +24,4 @@ export default class ListSet {
24
24
  getOffsetForIndexAndAlignment(index: number, align: string, scrollOffset: number): number;
25
25
  compareSize(i?: number, size?: number): boolean;
26
26
  }
27
- export {};
27
+ export { ListSet as default };