@react-aria/virtualizer 4.0.3 → 4.1.0
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/LICENSE +201 -0
- package/dist/ScrollView.main.js +4 -8
- package/dist/ScrollView.main.js.map +1 -1
- package/dist/ScrollView.mjs +4 -8
- package/dist/ScrollView.module.js +4 -8
- package/dist/ScrollView.module.js.map +1 -1
- package/dist/Virtualizer.main.js +7 -8
- package/dist/Virtualizer.main.js.map +1 -1
- package/dist/Virtualizer.mjs +9 -10
- package/dist/Virtualizer.module.js +9 -10
- package/dist/Virtualizer.module.js.map +1 -1
- package/dist/VirtualizerItem.main.js +3 -2
- package/dist/VirtualizerItem.main.js.map +1 -1
- package/dist/VirtualizerItem.mjs +3 -2
- package/dist/VirtualizerItem.module.js +3 -2
- package/dist/VirtualizerItem.module.js.map +1 -1
- package/dist/types.d.ts +172 -171
- package/dist/types.d.ts.map +1 -1
- package/dist/useVirtualizerItem.main.js +4 -3
- package/dist/useVirtualizerItem.main.js.map +1 -1
- package/dist/useVirtualizerItem.mjs +4 -3
- package/dist/useVirtualizerItem.module.js +4 -3
- package/dist/useVirtualizerItem.module.js.map +1 -1
- package/package.json +11 -10
- package/src/ScrollView.tsx +12 -6
- package/src/Virtualizer.tsx +10 -11
- package/src/VirtualizerItem.tsx +4 -3
- package/src/useVirtualizerItem.ts +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA4BD,SAAS,kCAAsD,KAAgC,EAAE,
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA4BD,SAAS,kCAAsD,KAAgC,EAAE,YAAiD;IAChJ,IAAI,EACF,UAAU,UAAU,iBACpB,aAAa,UACb,MAAM,cACN,UAAU,mBACV,eAAe,aACf,SAAS,cACT,UAAU,iBACV,aAAa,iBACb,aAAa,EACb,GAAG,YACJ,GAAG;IAEJ,IAAI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G5B","sources":["packages/@react-aria/virtualizer/src/Virtualizer.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Key, RefObject} from '@react-types/shared';\nimport {Layout, Rect, ReusableView, useVirtualizerState} from '@react-stately/virtualizer';\nimport {mergeProps, useLoadMore, useObjectRef} from '@react-aria/utils';\nimport React, {ForwardedRef, HTMLAttributes, ReactElement, ReactNode, useCallback} from 'react';\nimport {ScrollView} from './ScrollView';\nimport {VirtualizerItem} from './VirtualizerItem';\n\ntype RenderWrapper<T extends object, V> = (\n parent: ReusableView<T, V> | null,\n reusableView: ReusableView<T, V>,\n children: ReusableView<T, V>[],\n renderChildren: (views: ReusableView<T, V>[]) => ReactElement[]\n) => ReactElement | null;\n\ninterface VirtualizerProps<T extends object, V, O> extends Omit<HTMLAttributes<HTMLElement>, 'children'> {\n children: (type: string, content: T) => V,\n renderWrapper?: RenderWrapper<T, V>,\n layout: Layout<T, O>,\n collection: Collection<T>,\n persistedKeys?: Set<Key> | null,\n scrollDirection?: 'horizontal' | 'vertical' | 'both',\n isLoading?: boolean,\n onLoadMore?: () => void,\n layoutOptions?: O\n}\n\nfunction Virtualizer<T extends object, V extends ReactNode, O>(props: VirtualizerProps<T, V, O>, forwardedRef: ForwardedRef<HTMLDivElement | null>) {\n let {\n children: renderView,\n renderWrapper,\n layout,\n collection,\n scrollDirection,\n isLoading,\n onLoadMore,\n persistedKeys,\n layoutOptions,\n ...otherProps\n } = props;\n\n let ref = useObjectRef(forwardedRef);\n\n let state = useVirtualizerState({\n layout,\n collection,\n renderView,\n onVisibleRectChange(rect) {\n if (ref.current) {\n ref.current.scrollLeft = rect.x;\n ref.current.scrollTop = rect.y;\n }\n },\n persistedKeys,\n layoutOptions\n });\n\n useLoadMore({isLoading, onLoadMore, scrollOffset: 1}, ref);\n let onVisibleRectChange = useCallback((rect: Rect) => {\n state.setVisibleRect(rect);\n }, [state]);\n\n return (\n <ScrollView\n {...mergeProps(otherProps, {onVisibleRectChange})}\n ref={ref}\n contentSize={state.contentSize}\n onScrollStart={state.startScrolling}\n onScrollEnd={state.endScrolling}\n scrollDirection={scrollDirection}>\n {renderChildren(null, state.visibleViews, renderWrapper || defaultRenderWrapper)}\n </ScrollView>\n );\n}\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Virtualizer = React.forwardRef(Virtualizer) as <T extends object, V, O>(props: VirtualizerProps<T, V, O> & {ref?: RefObject<HTMLDivElement | null>}) => ReactElement;\nexport {_Virtualizer as Virtualizer};\n\nfunction renderChildren<T extends object, V>(parent: ReusableView<T, V> | null, views: ReusableView<T, V>[], renderWrapper: RenderWrapper<T, V>) {\n return views.map(view => {\n return renderWrapper(\n parent,\n view,\n view.children ? Array.from(view.children) : [],\n childViews => renderChildren(view, childViews, renderWrapper)\n );\n });\n}\n\nfunction defaultRenderWrapper<T extends object, V extends ReactNode>(\n parent: ReusableView<T, V> | null,\n reusableView: ReusableView<T, V>\n) {\n return (\n <VirtualizerItem\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo!}\n virtualizer={reusableView.virtualizer}\n parent={parent?.layoutInfo}>\n {reusableView.rendered}\n </VirtualizerItem>\n );\n}\n"],"names":[],"version":3,"file":"Virtualizer.module.js.map"}
|
|
@@ -29,7 +29,7 @@ $parcel$export(module.exports, "layoutInfoToStyle", () => $d6a26279cc31826b$expo
|
|
|
29
29
|
function $d6a26279cc31826b$export$6796df8ba7398521(props) {
|
|
30
30
|
let { style: style, className: className, layoutInfo: layoutInfo, virtualizer: virtualizer, parent: parent, children: children } = props;
|
|
31
31
|
let { direction: direction } = (0, $eXWCF$reactariai18n.useLocale)();
|
|
32
|
-
let ref = (0, $eXWCF$react.useRef)(
|
|
32
|
+
let ref = (0, $eXWCF$react.useRef)(null);
|
|
33
33
|
(0, $7d70e069fceb2deb$exports.useVirtualizerItem)({
|
|
34
34
|
layoutInfo: layoutInfo,
|
|
35
35
|
virtualizer: virtualizer,
|
|
@@ -70,6 +70,7 @@ function $d6a26279cc31826b$export$1481e64fbe01b8b3(layoutInfo, dir, parent) {
|
|
|
70
70
|
Object.entries(rectStyles).forEach(([key, value])=>{
|
|
71
71
|
if (!Number.isFinite(value)) rectStyles[key] = undefined;
|
|
72
72
|
});
|
|
73
|
+
var _layoutInfo_transform;
|
|
73
74
|
let style = {
|
|
74
75
|
position: layoutInfo.isSticky ? 'sticky' : 'absolute',
|
|
75
76
|
// Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.
|
|
@@ -77,7 +78,7 @@ function $d6a26279cc31826b$export$1481e64fbe01b8b3(layoutInfo, dir, parent) {
|
|
|
77
78
|
overflow: layoutInfo.allowOverflow ? 'visible' : 'hidden',
|
|
78
79
|
opacity: layoutInfo.opacity,
|
|
79
80
|
zIndex: layoutInfo.zIndex,
|
|
80
|
-
transform: layoutInfo.transform,
|
|
81
|
+
transform: (_layoutInfo_transform = layoutInfo.transform) !== null && _layoutInfo_transform !== void 0 ? _layoutInfo_transform : undefined,
|
|
81
82
|
contain: 'size layout style',
|
|
82
83
|
...rectStyles
|
|
83
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAgBM,SAAS,0CAAgB,KAA2B;IACzD,IAAI,SAAC,KAAK,aAAE,SAAS,cAAE,UAAU,eAAE,WAAW,UAAE,M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B,QAAQ,WAAW,IAAI,CAAC,MAAM;IAChC;IAEA,sEAAsE;IACtE,OAAO,OAAO,CAAC,YAAY,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM;QAC9C,IAAI,CAAC,OAAO,QAAQ,CAAC,QACnB,UAAU,CAAC,IAAI,GAAG;IAEtB;QASa;IAPb,IAAI,QAAuB;QACzB,UAAU,WAAW,QAAQ,GAAG,WAAW;QAC3C,qJAAqJ;QACrJ,SAAS,WAAW,QAAQ,GAAG,iBAAiB;QAChD,UAAU,WAAW,aAAa,GAAG,YAAY;QACjD,SAAS,WAAW,OAAO;QAC3B,QAAQ,WAAW,MAAM;QACzB,WAAW,CAAA,wBAAA,WAAW,SAAS,cAApB,mCAAA,wBAAwB;QACnC,SAAS;QACT,GAAG,UAAU;IACf;IAEA,4BAAM,GAAG,CAAC,YAAY;IACtB,OAAO;AACT","sources":["packages/@react-aria/virtualizer/src/VirtualizerItem.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Direction} from '@react-types/shared';\nimport {LayoutInfo} from '@react-stately/virtualizer';\nimport React, {CSSProperties, ReactNode, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useVirtualizerItem, VirtualizerItemOptions} from './useVirtualizerItem';\n\ninterface VirtualizerItemProps extends Omit<VirtualizerItemOptions, 'ref'> {\n layoutInfo: LayoutInfo,\n parent?: LayoutInfo | null,\n style?: CSSProperties,\n className?: string,\n children: ReactNode\n}\n\nexport function VirtualizerItem(props: VirtualizerItemProps) {\n let {style, className, layoutInfo, virtualizer, parent, children} = props;\n let {direction} = useLocale();\n let ref = useRef<HTMLDivElement | null>(null);\n useVirtualizerItem({\n layoutInfo,\n virtualizer,\n ref\n });\n\n return (\n <div role=\"presentation\" ref={ref} className={className} style={{...layoutInfoToStyle(layoutInfo, direction, parent), ...style}}>\n {children}\n </div>\n );\n}\n\nlet cache = new WeakMap();\nexport function layoutInfoToStyle(layoutInfo: LayoutInfo, dir: Direction, parent?: LayoutInfo | null): CSSProperties {\n let xProperty = dir === 'rtl' ? 'right' : 'left';\n let cached = cache.get(layoutInfo);\n if (cached && cached[xProperty] != null) {\n if (!parent) {\n return cached;\n }\n\n // Invalidate if the parent position changed.\n let top = layoutInfo.rect.y - parent.rect.y;\n let x = layoutInfo.rect.x - parent.rect.x;\n if (cached.top === top && cached[xProperty] === x) {\n return cached;\n }\n }\n\n let rectStyles: Record<string, number | undefined> = {\n // TODO: For layoutInfos that are sticky that have parents with overflow visible, their \"top\" will be relative to the to the nearest scrolling container\n // which WON'T be the parent since the parent has overflow visible. This means we shouldn't offset the height by the parent's position\n // Not 100% about this change here since it is quite ambigious what the scrolling container maybe and how its top is positioned with respect to the\n // calculated layoutInfo.y here\n top: layoutInfo.rect.y - (parent && !(parent.allowOverflow && layoutInfo.isSticky) ? parent.rect.y : 0),\n [xProperty]: layoutInfo.rect.x - (parent && !(parent.allowOverflow && layoutInfo.isSticky) ? parent.rect.x : 0),\n width: layoutInfo.rect.width,\n height: layoutInfo.rect.height\n };\n\n // Get rid of any non finite values since they aren't valid css values\n Object.entries(rectStyles).forEach(([key, value]) => {\n if (!Number.isFinite(value)) {\n rectStyles[key] = undefined;\n }\n });\n\n let style: CSSProperties = {\n position: layoutInfo.isSticky ? 'sticky' : 'absolute',\n // Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.\n display: layoutInfo.isSticky ? 'inline-block' : undefined,\n overflow: layoutInfo.allowOverflow ? 'visible' : 'hidden',\n opacity: layoutInfo.opacity,\n zIndex: layoutInfo.zIndex,\n transform: layoutInfo.transform ?? undefined,\n contain: 'size layout style',\n ...rectStyles\n };\n\n cache.set(layoutInfo, style);\n return style;\n}\n"],"names":[],"version":3,"file":"VirtualizerItem.main.js.map"}
|
package/dist/VirtualizerItem.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import {useLocale as $ivH3G$useLocale} from "@react-aria/i18n";
|
|
|
18
18
|
function $ccf8a0a04e4175ae$export$6796df8ba7398521(props) {
|
|
19
19
|
let { style: style, className: className, layoutInfo: layoutInfo, virtualizer: virtualizer, parent: parent, children: children } = props;
|
|
20
20
|
let { direction: direction } = (0, $ivH3G$useLocale)();
|
|
21
|
-
let ref = (0, $ivH3G$useRef)(
|
|
21
|
+
let ref = (0, $ivH3G$useRef)(null);
|
|
22
22
|
(0, $47736c1e63ba1c6d$export$1da781778207e0a2)({
|
|
23
23
|
layoutInfo: layoutInfo,
|
|
24
24
|
virtualizer: virtualizer,
|
|
@@ -59,6 +59,7 @@ function $ccf8a0a04e4175ae$export$1481e64fbe01b8b3(layoutInfo, dir, parent) {
|
|
|
59
59
|
Object.entries(rectStyles).forEach(([key, value])=>{
|
|
60
60
|
if (!Number.isFinite(value)) rectStyles[key] = undefined;
|
|
61
61
|
});
|
|
62
|
+
var _layoutInfo_transform;
|
|
62
63
|
let style = {
|
|
63
64
|
position: layoutInfo.isSticky ? 'sticky' : 'absolute',
|
|
64
65
|
// Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.
|
|
@@ -66,7 +67,7 @@ function $ccf8a0a04e4175ae$export$1481e64fbe01b8b3(layoutInfo, dir, parent) {
|
|
|
66
67
|
overflow: layoutInfo.allowOverflow ? 'visible' : 'hidden',
|
|
67
68
|
opacity: layoutInfo.opacity,
|
|
68
69
|
zIndex: layoutInfo.zIndex,
|
|
69
|
-
transform: layoutInfo.transform,
|
|
70
|
+
transform: (_layoutInfo_transform = layoutInfo.transform) !== null && _layoutInfo_transform !== void 0 ? _layoutInfo_transform : undefined,
|
|
70
71
|
contain: 'size layout style',
|
|
71
72
|
...rectStyles
|
|
72
73
|
};
|
|
@@ -18,7 +18,7 @@ import {useLocale as $ivH3G$useLocale} from "@react-aria/i18n";
|
|
|
18
18
|
function $ccf8a0a04e4175ae$export$6796df8ba7398521(props) {
|
|
19
19
|
let { style: style, className: className, layoutInfo: layoutInfo, virtualizer: virtualizer, parent: parent, children: children } = props;
|
|
20
20
|
let { direction: direction } = (0, $ivH3G$useLocale)();
|
|
21
|
-
let ref = (0, $ivH3G$useRef)(
|
|
21
|
+
let ref = (0, $ivH3G$useRef)(null);
|
|
22
22
|
(0, $47736c1e63ba1c6d$export$1da781778207e0a2)({
|
|
23
23
|
layoutInfo: layoutInfo,
|
|
24
24
|
virtualizer: virtualizer,
|
|
@@ -59,6 +59,7 @@ function $ccf8a0a04e4175ae$export$1481e64fbe01b8b3(layoutInfo, dir, parent) {
|
|
|
59
59
|
Object.entries(rectStyles).forEach(([key, value])=>{
|
|
60
60
|
if (!Number.isFinite(value)) rectStyles[key] = undefined;
|
|
61
61
|
});
|
|
62
|
+
var _layoutInfo_transform;
|
|
62
63
|
let style = {
|
|
63
64
|
position: layoutInfo.isSticky ? 'sticky' : 'absolute',
|
|
64
65
|
// Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.
|
|
@@ -66,7 +67,7 @@ function $ccf8a0a04e4175ae$export$1481e64fbe01b8b3(layoutInfo, dir, parent) {
|
|
|
66
67
|
overflow: layoutInfo.allowOverflow ? 'visible' : 'hidden',
|
|
67
68
|
opacity: layoutInfo.opacity,
|
|
68
69
|
zIndex: layoutInfo.zIndex,
|
|
69
|
-
transform: layoutInfo.transform,
|
|
70
|
+
transform: (_layoutInfo_transform = layoutInfo.transform) !== null && _layoutInfo_transform !== void 0 ? _layoutInfo_transform : undefined,
|
|
70
71
|
contain: 'size layout style',
|
|
71
72
|
...rectStyles
|
|
72
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;A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IAAI,CAAC,CAAC,GAAI,CAAA,UAAU,CAAE,CAAA,OAAO,aAAa,IAAI,WAAW,QAAQ,AAAD,IAAK,OAAO,IAAI,CAAC,CAAC,GAAG,CAAA;QAC7G,OAAO,WAAW,IAAI,CAAC,KAAK;QAC5B,QAAQ,WAAW,IAAI,CAAC,MAAM;IAChC;IAEA,sEAAsE;IACtE,OAAO,OAAO,CAAC,YAAY,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM;QAC9C,IAAI,CAAC,OAAO,QAAQ,CAAC,QACnB,UAAU,CAAC,IAAI,GAAG;IAEtB;QASa;IAPb,IAAI,QAAuB;QACzB,UAAU,WAAW,QAAQ,GAAG,WAAW;QAC3C,qJAAqJ;QACrJ,SAAS,WAAW,QAAQ,GAAG,iBAAiB;QAChD,UAAU,WAAW,aAAa,GAAG,YAAY;QACjD,SAAS,WAAW,OAAO;QAC3B,QAAQ,WAAW,MAAM;QACzB,WAAW,CAAA,wBAAA,WAAW,SAAS,cAApB,mCAAA,wBAAwB;QACnC,SAAS;QACT,GAAG,UAAU;IACf;IAEA,4BAAM,GAAG,CAAC,YAAY;IACtB,OAAO;AACT","sources":["packages/@react-aria/virtualizer/src/VirtualizerItem.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Direction} from '@react-types/shared';\nimport {LayoutInfo} from '@react-stately/virtualizer';\nimport React, {CSSProperties, ReactNode, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useVirtualizerItem, VirtualizerItemOptions} from './useVirtualizerItem';\n\ninterface VirtualizerItemProps extends Omit<VirtualizerItemOptions, 'ref'> {\n layoutInfo: LayoutInfo,\n parent?: LayoutInfo | null,\n style?: CSSProperties,\n className?: string,\n children: ReactNode\n}\n\nexport function VirtualizerItem(props: VirtualizerItemProps) {\n let {style, className, layoutInfo, virtualizer, parent, children} = props;\n let {direction} = useLocale();\n let ref = useRef<HTMLDivElement | null>(null);\n useVirtualizerItem({\n layoutInfo,\n virtualizer,\n ref\n });\n\n return (\n <div role=\"presentation\" ref={ref} className={className} style={{...layoutInfoToStyle(layoutInfo, direction, parent), ...style}}>\n {children}\n </div>\n );\n}\n\nlet cache = new WeakMap();\nexport function layoutInfoToStyle(layoutInfo: LayoutInfo, dir: Direction, parent?: LayoutInfo | null): CSSProperties {\n let xProperty = dir === 'rtl' ? 'right' : 'left';\n let cached = cache.get(layoutInfo);\n if (cached && cached[xProperty] != null) {\n if (!parent) {\n return cached;\n }\n\n // Invalidate if the parent position changed.\n let top = layoutInfo.rect.y - parent.rect.y;\n let x = layoutInfo.rect.x - parent.rect.x;\n if (cached.top === top && cached[xProperty] === x) {\n return cached;\n }\n }\n\n let rectStyles: Record<string, number | undefined> = {\n // TODO: For layoutInfos that are sticky that have parents with overflow visible, their \"top\" will be relative to the to the nearest scrolling container\n // which WON'T be the parent since the parent has overflow visible. This means we shouldn't offset the height by the parent's position\n // Not 100% about this change here since it is quite ambigious what the scrolling container maybe and how its top is positioned with respect to the\n // calculated layoutInfo.y here\n top: layoutInfo.rect.y - (parent && !(parent.allowOverflow && layoutInfo.isSticky) ? parent.rect.y : 0),\n [xProperty]: layoutInfo.rect.x - (parent && !(parent.allowOverflow && layoutInfo.isSticky) ? parent.rect.x : 0),\n width: layoutInfo.rect.width,\n height: layoutInfo.rect.height\n };\n\n // Get rid of any non finite values since they aren't valid css values\n Object.entries(rectStyles).forEach(([key, value]) => {\n if (!Number.isFinite(value)) {\n rectStyles[key] = undefined;\n }\n });\n\n let style: CSSProperties = {\n position: layoutInfo.isSticky ? 'sticky' : 'absolute',\n // Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.\n display: layoutInfo.isSticky ? 'inline-block' : undefined,\n overflow: layoutInfo.allowOverflow ? 'visible' : 'hidden',\n opacity: layoutInfo.opacity,\n zIndex: layoutInfo.zIndex,\n transform: layoutInfo.transform ?? undefined,\n contain: 'size layout style',\n ...rectStyles\n };\n\n cache.set(layoutInfo, style);\n return style;\n}\n"],"names":[],"version":3,"file":"VirtualizerItem.module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ interface IVirtualizer {
|
|
|
9
9
|
updateItemSize(key: Key, size: Size): void;
|
|
10
10
|
}
|
|
11
11
|
export interface VirtualizerItemOptions {
|
|
12
|
-
layoutInfo: LayoutInfo;
|
|
12
|
+
layoutInfo: LayoutInfo | null;
|
|
13
13
|
virtualizer: IVirtualizer;
|
|
14
14
|
ref: RefObject<HTMLElement | null>;
|
|
15
15
|
}
|
|
@@ -25,7 +25,7 @@ interface ScrollViewProps extends HTMLAttributes<HTMLElement> {
|
|
|
25
25
|
onScrollEnd?: () => void;
|
|
26
26
|
scrollDirection?: 'horizontal' | 'vertical' | 'both';
|
|
27
27
|
}
|
|
28
|
-
export const ScrollView: React.ForwardRefExoticComponent<ScrollViewProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export const ScrollView: React.ForwardRefExoticComponent<ScrollViewProps & React.RefAttributes<HTMLDivElement | null>>;
|
|
29
29
|
export function useScrollView(props: ScrollViewProps, ref: _RefObject1<HTMLElement | null>): {
|
|
30
30
|
scrollViewProps: {
|
|
31
31
|
style: React.CSSProperties;
|
|
@@ -137,174 +137,174 @@ export function useScrollView(props: ScrollViewProps, ref: _RefObject1<HTMLEleme
|
|
|
137
137
|
dangerouslySetInnerHTML?: {
|
|
138
138
|
__html: string | TrustedHTML;
|
|
139
139
|
} | undefined;
|
|
140
|
-
onCopy?: React.ClipboardEventHandler<HTMLElement
|
|
141
|
-
onCopyCapture?: React.ClipboardEventHandler<HTMLElement
|
|
142
|
-
onCut?: React.ClipboardEventHandler<HTMLElement
|
|
143
|
-
onCutCapture?: React.ClipboardEventHandler<HTMLElement
|
|
144
|
-
onPaste?: React.ClipboardEventHandler<HTMLElement
|
|
145
|
-
onPasteCapture?: React.ClipboardEventHandler<HTMLElement
|
|
146
|
-
onCompositionEnd?: React.CompositionEventHandler<HTMLElement
|
|
147
|
-
onCompositionEndCapture?: React.CompositionEventHandler<HTMLElement
|
|
148
|
-
onCompositionStart?: React.CompositionEventHandler<HTMLElement
|
|
149
|
-
onCompositionStartCapture?: React.CompositionEventHandler<HTMLElement
|
|
150
|
-
onCompositionUpdate?: React.CompositionEventHandler<HTMLElement
|
|
151
|
-
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLElement
|
|
152
|
-
onFocus?: React.FocusEventHandler<HTMLElement
|
|
153
|
-
onFocusCapture?: React.FocusEventHandler<HTMLElement
|
|
154
|
-
onBlur?: React.FocusEventHandler<HTMLElement
|
|
155
|
-
onBlurCapture?: React.FocusEventHandler<HTMLElement
|
|
156
|
-
onChange?: React.FormEventHandler<HTMLElement
|
|
157
|
-
onChangeCapture?: React.FormEventHandler<HTMLElement
|
|
158
|
-
onBeforeInput?: React.FormEventHandler<HTMLElement
|
|
159
|
-
onBeforeInputCapture?: React.FormEventHandler<HTMLElement
|
|
160
|
-
onInput?: React.FormEventHandler<HTMLElement
|
|
161
|
-
onInputCapture?: React.FormEventHandler<HTMLElement
|
|
162
|
-
onReset?: React.FormEventHandler<HTMLElement
|
|
163
|
-
onResetCapture?: React.FormEventHandler<HTMLElement
|
|
164
|
-
onSubmit?: React.FormEventHandler<HTMLElement
|
|
165
|
-
onSubmitCapture?: React.FormEventHandler<HTMLElement
|
|
166
|
-
onInvalid?: React.FormEventHandler<HTMLElement
|
|
167
|
-
onInvalidCapture?: React.FormEventHandler<HTMLElement
|
|
168
|
-
onLoad?: React.ReactEventHandler<HTMLElement
|
|
169
|
-
onLoadCapture?: React.ReactEventHandler<HTMLElement
|
|
170
|
-
onError?: React.ReactEventHandler<HTMLElement
|
|
171
|
-
onErrorCapture?: React.ReactEventHandler<HTMLElement
|
|
172
|
-
onKeyDown?: React.KeyboardEventHandler<HTMLElement
|
|
173
|
-
onKeyDownCapture?: React.KeyboardEventHandler<HTMLElement
|
|
174
|
-
onKeyPress?: React.KeyboardEventHandler<HTMLElement
|
|
175
|
-
onKeyPressCapture?: React.KeyboardEventHandler<HTMLElement
|
|
176
|
-
onKeyUp?: React.KeyboardEventHandler<HTMLElement
|
|
177
|
-
onKeyUpCapture?: React.KeyboardEventHandler<HTMLElement
|
|
178
|
-
onAbort?: React.ReactEventHandler<HTMLElement
|
|
179
|
-
onAbortCapture?: React.ReactEventHandler<HTMLElement
|
|
180
|
-
onCanPlay?: React.ReactEventHandler<HTMLElement
|
|
181
|
-
onCanPlayCapture?: React.ReactEventHandler<HTMLElement
|
|
182
|
-
onCanPlayThrough?: React.ReactEventHandler<HTMLElement
|
|
183
|
-
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLElement
|
|
184
|
-
onDurationChange?: React.ReactEventHandler<HTMLElement
|
|
185
|
-
onDurationChangeCapture?: React.ReactEventHandler<HTMLElement
|
|
186
|
-
onEmptied?: React.ReactEventHandler<HTMLElement
|
|
187
|
-
onEmptiedCapture?: React.ReactEventHandler<HTMLElement
|
|
188
|
-
onEncrypted?: React.ReactEventHandler<HTMLElement
|
|
189
|
-
onEncryptedCapture?: React.ReactEventHandler<HTMLElement
|
|
190
|
-
onEnded?: React.ReactEventHandler<HTMLElement
|
|
191
|
-
onEndedCapture?: React.ReactEventHandler<HTMLElement
|
|
192
|
-
onLoadedData?: React.ReactEventHandler<HTMLElement
|
|
193
|
-
onLoadedDataCapture?: React.ReactEventHandler<HTMLElement
|
|
194
|
-
onLoadedMetadata?: React.ReactEventHandler<HTMLElement
|
|
195
|
-
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLElement
|
|
196
|
-
onLoadStart?: React.ReactEventHandler<HTMLElement
|
|
197
|
-
onLoadStartCapture?: React.ReactEventHandler<HTMLElement
|
|
198
|
-
onPause?: React.ReactEventHandler<HTMLElement
|
|
199
|
-
onPauseCapture?: React.ReactEventHandler<HTMLElement
|
|
200
|
-
onPlay?: React.ReactEventHandler<HTMLElement
|
|
201
|
-
onPlayCapture?: React.ReactEventHandler<HTMLElement
|
|
202
|
-
onPlaying?: React.ReactEventHandler<HTMLElement
|
|
203
|
-
onPlayingCapture?: React.ReactEventHandler<HTMLElement
|
|
204
|
-
onProgress?: React.ReactEventHandler<HTMLElement
|
|
205
|
-
onProgressCapture?: React.ReactEventHandler<HTMLElement
|
|
206
|
-
onRateChange?: React.ReactEventHandler<HTMLElement
|
|
207
|
-
onRateChangeCapture?: React.ReactEventHandler<HTMLElement
|
|
208
|
-
onResize?: React.ReactEventHandler<HTMLElement
|
|
209
|
-
onResizeCapture?: React.ReactEventHandler<HTMLElement
|
|
210
|
-
onSeeked?: React.ReactEventHandler<HTMLElement
|
|
211
|
-
onSeekedCapture?: React.ReactEventHandler<HTMLElement
|
|
212
|
-
onSeeking?: React.ReactEventHandler<HTMLElement
|
|
213
|
-
onSeekingCapture?: React.ReactEventHandler<HTMLElement
|
|
214
|
-
onStalled?: React.ReactEventHandler<HTMLElement
|
|
215
|
-
onStalledCapture?: React.ReactEventHandler<HTMLElement
|
|
216
|
-
onSuspend?: React.ReactEventHandler<HTMLElement
|
|
217
|
-
onSuspendCapture?: React.ReactEventHandler<HTMLElement
|
|
218
|
-
onTimeUpdate?: React.ReactEventHandler<HTMLElement
|
|
219
|
-
onTimeUpdateCapture?: React.ReactEventHandler<HTMLElement
|
|
220
|
-
onVolumeChange?: React.ReactEventHandler<HTMLElement
|
|
221
|
-
onVolumeChangeCapture?: React.ReactEventHandler<HTMLElement
|
|
222
|
-
onWaiting?: React.ReactEventHandler<HTMLElement
|
|
223
|
-
onWaitingCapture?: React.ReactEventHandler<HTMLElement
|
|
224
|
-
onAuxClick?: React.MouseEventHandler<HTMLElement
|
|
225
|
-
onAuxClickCapture?: React.MouseEventHandler<HTMLElement
|
|
226
|
-
onClick?: React.MouseEventHandler<HTMLElement
|
|
227
|
-
onClickCapture?: React.MouseEventHandler<HTMLElement
|
|
228
|
-
onContextMenu?: React.MouseEventHandler<HTMLElement
|
|
229
|
-
onContextMenuCapture?: React.MouseEventHandler<HTMLElement
|
|
230
|
-
onDoubleClick?: React.MouseEventHandler<HTMLElement
|
|
231
|
-
onDoubleClickCapture?: React.MouseEventHandler<HTMLElement
|
|
232
|
-
onDrag?: React.DragEventHandler<HTMLElement
|
|
233
|
-
onDragCapture?: React.DragEventHandler<HTMLElement
|
|
234
|
-
onDragEnd?: React.DragEventHandler<HTMLElement
|
|
235
|
-
onDragEndCapture?: React.DragEventHandler<HTMLElement
|
|
236
|
-
onDragEnter?: React.DragEventHandler<HTMLElement
|
|
237
|
-
onDragEnterCapture?: React.DragEventHandler<HTMLElement
|
|
238
|
-
onDragExit?: React.DragEventHandler<HTMLElement
|
|
239
|
-
onDragExitCapture?: React.DragEventHandler<HTMLElement
|
|
240
|
-
onDragLeave?: React.DragEventHandler<HTMLElement
|
|
241
|
-
onDragLeaveCapture?: React.DragEventHandler<HTMLElement
|
|
242
|
-
onDragOver?: React.DragEventHandler<HTMLElement
|
|
243
|
-
onDragOverCapture?: React.DragEventHandler<HTMLElement
|
|
244
|
-
onDragStart?: React.DragEventHandler<HTMLElement
|
|
245
|
-
onDragStartCapture?: React.DragEventHandler<HTMLElement
|
|
246
|
-
onDrop?: React.DragEventHandler<HTMLElement
|
|
247
|
-
onDropCapture?: React.DragEventHandler<HTMLElement
|
|
248
|
-
onMouseDown?: React.MouseEventHandler<HTMLElement
|
|
249
|
-
onMouseDownCapture?: React.MouseEventHandler<HTMLElement
|
|
250
|
-
onMouseEnter?: React.MouseEventHandler<HTMLElement
|
|
251
|
-
onMouseLeave?: React.MouseEventHandler<HTMLElement
|
|
252
|
-
onMouseMove?: React.MouseEventHandler<HTMLElement
|
|
253
|
-
onMouseMoveCapture?: React.MouseEventHandler<HTMLElement
|
|
254
|
-
onMouseOut?: React.MouseEventHandler<HTMLElement
|
|
255
|
-
onMouseOutCapture?: React.MouseEventHandler<HTMLElement
|
|
256
|
-
onMouseOver?: React.MouseEventHandler<HTMLElement
|
|
257
|
-
onMouseOverCapture?: React.MouseEventHandler<HTMLElement
|
|
258
|
-
onMouseUp?: React.MouseEventHandler<HTMLElement
|
|
259
|
-
onMouseUpCapture?: React.MouseEventHandler<HTMLElement
|
|
260
|
-
onSelect?: React.ReactEventHandler<HTMLElement
|
|
261
|
-
onSelectCapture?: React.ReactEventHandler<HTMLElement
|
|
262
|
-
onTouchCancel?: React.TouchEventHandler<HTMLElement
|
|
263
|
-
onTouchCancelCapture?: React.TouchEventHandler<HTMLElement
|
|
264
|
-
onTouchEnd?: React.TouchEventHandler<HTMLElement
|
|
265
|
-
onTouchEndCapture?: React.TouchEventHandler<HTMLElement
|
|
266
|
-
onTouchMove?: React.TouchEventHandler<HTMLElement
|
|
267
|
-
onTouchMoveCapture?: React.TouchEventHandler<HTMLElement
|
|
268
|
-
onTouchStart?: React.TouchEventHandler<HTMLElement
|
|
269
|
-
onTouchStartCapture?: React.TouchEventHandler<HTMLElement
|
|
270
|
-
onPointerDown?: React.PointerEventHandler<HTMLElement
|
|
271
|
-
onPointerDownCapture?: React.PointerEventHandler<HTMLElement
|
|
272
|
-
onPointerMove?: React.PointerEventHandler<HTMLElement
|
|
273
|
-
onPointerMoveCapture?: React.PointerEventHandler<HTMLElement
|
|
274
|
-
onPointerUp?: React.PointerEventHandler<HTMLElement
|
|
275
|
-
onPointerUpCapture?: React.PointerEventHandler<HTMLElement
|
|
276
|
-
onPointerCancel?: React.PointerEventHandler<HTMLElement
|
|
277
|
-
onPointerCancelCapture?: React.PointerEventHandler<HTMLElement
|
|
278
|
-
onPointerEnter?: React.PointerEventHandler<HTMLElement
|
|
279
|
-
onPointerLeave?: React.PointerEventHandler<HTMLElement
|
|
280
|
-
onPointerOver?: React.PointerEventHandler<HTMLElement
|
|
281
|
-
onPointerOverCapture?: React.PointerEventHandler<HTMLElement
|
|
282
|
-
onPointerOut?: React.PointerEventHandler<HTMLElement
|
|
283
|
-
onPointerOutCapture?: React.PointerEventHandler<HTMLElement
|
|
284
|
-
onGotPointerCapture?: React.PointerEventHandler<HTMLElement
|
|
285
|
-
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLElement
|
|
286
|
-
onLostPointerCapture?: React.PointerEventHandler<HTMLElement
|
|
287
|
-
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLElement
|
|
288
|
-
onScroll?: React.UIEventHandler<HTMLElement
|
|
289
|
-
onScrollCapture?: React.UIEventHandler<HTMLElement
|
|
290
|
-
onWheel?: React.WheelEventHandler<HTMLElement
|
|
291
|
-
onWheelCapture?: React.WheelEventHandler<HTMLElement
|
|
292
|
-
onAnimationStart?: React.AnimationEventHandler<HTMLElement
|
|
293
|
-
onAnimationStartCapture?: React.AnimationEventHandler<HTMLElement
|
|
294
|
-
onAnimationEnd?: React.AnimationEventHandler<HTMLElement
|
|
295
|
-
onAnimationEndCapture?: React.AnimationEventHandler<HTMLElement
|
|
296
|
-
onAnimationIteration?: React.AnimationEventHandler<HTMLElement
|
|
297
|
-
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLElement
|
|
298
|
-
onToggle?: React.ToggleEventHandler<HTMLElement
|
|
299
|
-
onBeforeToggle?: React.ToggleEventHandler<HTMLElement
|
|
300
|
-
onTransitionCancel?: React.TransitionEventHandler<HTMLElement
|
|
301
|
-
onTransitionCancelCapture?: React.TransitionEventHandler<HTMLElement
|
|
302
|
-
onTransitionEnd?: React.TransitionEventHandler<HTMLElement
|
|
303
|
-
onTransitionEndCapture?: React.TransitionEventHandler<HTMLElement
|
|
304
|
-
onTransitionRun?: React.TransitionEventHandler<HTMLElement
|
|
305
|
-
onTransitionRunCapture?: React.TransitionEventHandler<HTMLElement
|
|
306
|
-
onTransitionStart?: React.TransitionEventHandler<HTMLElement
|
|
307
|
-
onTransitionStartCapture?: React.TransitionEventHandler<HTMLElement
|
|
140
|
+
onCopy?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
141
|
+
onCopyCapture?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
142
|
+
onCut?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
143
|
+
onCutCapture?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
144
|
+
onPaste?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
145
|
+
onPasteCapture?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
146
|
+
onCompositionEnd?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
147
|
+
onCompositionEndCapture?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
148
|
+
onCompositionStart?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
149
|
+
onCompositionStartCapture?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
150
|
+
onCompositionUpdate?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
151
|
+
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
152
|
+
onFocus?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
153
|
+
onFocusCapture?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
154
|
+
onBlur?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
155
|
+
onBlurCapture?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
156
|
+
onChange?: React.FormEventHandler<HTMLElement> | undefined;
|
|
157
|
+
onChangeCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
158
|
+
onBeforeInput?: React.FormEventHandler<HTMLElement> | undefined;
|
|
159
|
+
onBeforeInputCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
160
|
+
onInput?: React.FormEventHandler<HTMLElement> | undefined;
|
|
161
|
+
onInputCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
162
|
+
onReset?: React.FormEventHandler<HTMLElement> | undefined;
|
|
163
|
+
onResetCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
164
|
+
onSubmit?: React.FormEventHandler<HTMLElement> | undefined;
|
|
165
|
+
onSubmitCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
166
|
+
onInvalid?: React.FormEventHandler<HTMLElement> | undefined;
|
|
167
|
+
onInvalidCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
168
|
+
onLoad?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
169
|
+
onLoadCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
170
|
+
onError?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
171
|
+
onErrorCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
172
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
173
|
+
onKeyDownCapture?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
174
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
175
|
+
onKeyPressCapture?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
176
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
177
|
+
onKeyUpCapture?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
178
|
+
onAbort?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
179
|
+
onAbortCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
180
|
+
onCanPlay?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
181
|
+
onCanPlayCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
182
|
+
onCanPlayThrough?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
183
|
+
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
184
|
+
onDurationChange?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
185
|
+
onDurationChangeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
186
|
+
onEmptied?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
187
|
+
onEmptiedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
188
|
+
onEncrypted?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
189
|
+
onEncryptedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
190
|
+
onEnded?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
191
|
+
onEndedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
192
|
+
onLoadedData?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
193
|
+
onLoadedDataCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
194
|
+
onLoadedMetadata?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
195
|
+
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
196
|
+
onLoadStart?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
197
|
+
onLoadStartCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
198
|
+
onPause?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
199
|
+
onPauseCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
200
|
+
onPlay?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
201
|
+
onPlayCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
202
|
+
onPlaying?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
203
|
+
onPlayingCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
204
|
+
onProgress?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
205
|
+
onProgressCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
206
|
+
onRateChange?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
207
|
+
onRateChangeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
208
|
+
onResize?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
209
|
+
onResizeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
210
|
+
onSeeked?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
211
|
+
onSeekedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
212
|
+
onSeeking?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
213
|
+
onSeekingCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
214
|
+
onStalled?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
215
|
+
onStalledCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
216
|
+
onSuspend?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
217
|
+
onSuspendCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
218
|
+
onTimeUpdate?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
219
|
+
onTimeUpdateCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
220
|
+
onVolumeChange?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
221
|
+
onVolumeChangeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
222
|
+
onWaiting?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
223
|
+
onWaitingCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
224
|
+
onAuxClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
225
|
+
onAuxClickCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
226
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
227
|
+
onClickCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
228
|
+
onContextMenu?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
229
|
+
onContextMenuCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
230
|
+
onDoubleClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
231
|
+
onDoubleClickCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
232
|
+
onDrag?: React.DragEventHandler<HTMLElement> | undefined;
|
|
233
|
+
onDragCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
234
|
+
onDragEnd?: React.DragEventHandler<HTMLElement> | undefined;
|
|
235
|
+
onDragEndCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
236
|
+
onDragEnter?: React.DragEventHandler<HTMLElement> | undefined;
|
|
237
|
+
onDragEnterCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
238
|
+
onDragExit?: React.DragEventHandler<HTMLElement> | undefined;
|
|
239
|
+
onDragExitCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
240
|
+
onDragLeave?: React.DragEventHandler<HTMLElement> | undefined;
|
|
241
|
+
onDragLeaveCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
242
|
+
onDragOver?: React.DragEventHandler<HTMLElement> | undefined;
|
|
243
|
+
onDragOverCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
244
|
+
onDragStart?: React.DragEventHandler<HTMLElement> | undefined;
|
|
245
|
+
onDragStartCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
246
|
+
onDrop?: React.DragEventHandler<HTMLElement> | undefined;
|
|
247
|
+
onDropCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
248
|
+
onMouseDown?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
249
|
+
onMouseDownCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
250
|
+
onMouseEnter?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
251
|
+
onMouseLeave?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
252
|
+
onMouseMove?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
253
|
+
onMouseMoveCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
254
|
+
onMouseOut?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
255
|
+
onMouseOutCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
256
|
+
onMouseOver?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
257
|
+
onMouseOverCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
258
|
+
onMouseUp?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
259
|
+
onMouseUpCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
260
|
+
onSelect?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
261
|
+
onSelectCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
262
|
+
onTouchCancel?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
263
|
+
onTouchCancelCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
264
|
+
onTouchEnd?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
265
|
+
onTouchEndCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
266
|
+
onTouchMove?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
267
|
+
onTouchMoveCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
268
|
+
onTouchStart?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
269
|
+
onTouchStartCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
270
|
+
onPointerDown?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
271
|
+
onPointerDownCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
272
|
+
onPointerMove?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
273
|
+
onPointerMoveCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
274
|
+
onPointerUp?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
275
|
+
onPointerUpCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
276
|
+
onPointerCancel?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
277
|
+
onPointerCancelCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
278
|
+
onPointerEnter?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
279
|
+
onPointerLeave?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
280
|
+
onPointerOver?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
281
|
+
onPointerOverCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
282
|
+
onPointerOut?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
283
|
+
onPointerOutCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
284
|
+
onGotPointerCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
285
|
+
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
286
|
+
onLostPointerCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
287
|
+
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
288
|
+
onScroll?: React.UIEventHandler<HTMLElement> | undefined;
|
|
289
|
+
onScrollCapture?: React.UIEventHandler<HTMLElement> | undefined;
|
|
290
|
+
onWheel?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
291
|
+
onWheelCapture?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
292
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
293
|
+
onAnimationStartCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
294
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
295
|
+
onAnimationEndCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
296
|
+
onAnimationIteration?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
297
|
+
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
298
|
+
onToggle?: React.ToggleEventHandler<HTMLElement> | undefined;
|
|
299
|
+
onBeforeToggle?: React.ToggleEventHandler<HTMLElement> | undefined;
|
|
300
|
+
onTransitionCancel?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
301
|
+
onTransitionCancelCapture?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
302
|
+
onTransitionEnd?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
303
|
+
onTransitionEndCapture?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
304
|
+
onTransitionRun?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
305
|
+
onTransitionRunCapture?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
306
|
+
onTransitionStart?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
307
|
+
onTransitionStartCapture?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
308
308
|
};
|
|
309
309
|
contentProps: {
|
|
310
310
|
role: string;
|
|
@@ -312,6 +312,7 @@ export function useScrollView(props: ScrollViewProps, ref: _RefObject1<HTMLEleme
|
|
|
312
312
|
};
|
|
313
313
|
};
|
|
314
314
|
interface VirtualizerItemProps extends Omit<VirtualizerItemOptions, 'ref'> {
|
|
315
|
+
layoutInfo: LayoutInfo;
|
|
315
316
|
parent?: LayoutInfo | null;
|
|
316
317
|
style?: CSSProperties;
|
|
317
318
|
className?: string;
|
|
@@ -319,7 +320,7 @@ interface VirtualizerItemProps extends Omit<VirtualizerItemOptions, 'ref'> {
|
|
|
319
320
|
}
|
|
320
321
|
export function VirtualizerItem(props: VirtualizerItemProps): React.JSX.Element;
|
|
321
322
|
export function layoutInfoToStyle(layoutInfo: LayoutInfo, dir: Direction, parent?: LayoutInfo | null): CSSProperties;
|
|
322
|
-
type RenderWrapper<T extends object, V> = (parent: ReusableView<T, V> | null, reusableView: ReusableView<T, V>, children: ReusableView<T, V>[], renderChildren: (views: ReusableView<T, V>[]) => ReactElement[]) => ReactElement;
|
|
323
|
+
type RenderWrapper<T extends object, V> = (parent: ReusableView<T, V> | null, reusableView: ReusableView<T, V>, children: ReusableView<T, V>[], renderChildren: (views: ReusableView<T, V>[]) => ReactElement[]) => ReactElement | null;
|
|
323
324
|
interface VirtualizerProps<T extends object, V, O> extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
|
|
324
325
|
children: (type: string, content: T) => V;
|
|
325
326
|
renderWrapper?: RenderWrapper<T, V>;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAcA,4BACI,UAAU,GACV,qB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EAAE,KAAK,YAAY,EAAE,KAC5D,YAAY,GAAG,IAAI,CAAC;AAEzB,2BAA2B,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC,CAAE,SAAQ,IAAI,CAAC,eAAe,WAAW,CAAC,EAAE,UAAU,CAAC;IACtG,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;IAC1C,aAAa,CAAC,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IACrB,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;IAC1B,aAAa,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAChC,eAAe,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,CAAA;CAClB;AAoDD,OAAA,MAAM,aAAgD,CAAC,CAAgB,SAAN,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,UAAU,cAAc,GAAG,IAAI,CAAC,CAAA;CAAC,KAAK,YAAY,CAAC","sources":["packages/@react-aria/virtualizer/src/packages/@react-aria/virtualizer/src/utils.ts","packages/@react-aria/virtualizer/src/packages/@react-aria/virtualizer/src/useVirtualizerItem.ts","packages/@react-aria/virtualizer/src/packages/@react-aria/virtualizer/src/ScrollView.tsx","packages/@react-aria/virtualizer/src/packages/@react-aria/virtualizer/src/VirtualizerItem.tsx","packages/@react-aria/virtualizer/src/packages/@react-aria/virtualizer/src/Virtualizer.tsx","packages/@react-aria/virtualizer/src/packages/@react-aria/virtualizer/src/index.ts","packages/@react-aria/virtualizer/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {RTLOffsetType} from './utils';\nexport type {VirtualizerItemOptions} from './useVirtualizerItem';\nexport {Virtualizer} from './Virtualizer';\nexport {useVirtualizerItem} from './useVirtualizerItem';\nexport {VirtualizerItem, layoutInfoToStyle} from './VirtualizerItem';\nexport {ScrollView, useScrollView} from './ScrollView';\nexport {getRTLOffsetType, getScrollLeft, setScrollLeft} from './utils';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
|
@@ -23,14 +23,15 @@ $parcel$export(module.exports, "useVirtualizerItem", () => $7d70e069fceb2deb$exp
|
|
|
23
23
|
|
|
24
24
|
function $7d70e069fceb2deb$export$1da781778207e0a2(options) {
|
|
25
25
|
let { layoutInfo: layoutInfo, virtualizer: virtualizer, ref: ref } = options;
|
|
26
|
+
let key = layoutInfo === null || layoutInfo === void 0 ? void 0 : layoutInfo.key;
|
|
26
27
|
let updateSize = (0, $64doO$react.useCallback)(()=>{
|
|
27
|
-
if (
|
|
28
|
+
if (key != null && ref.current) {
|
|
28
29
|
let size = $7d70e069fceb2deb$var$getSize(ref.current);
|
|
29
|
-
virtualizer.updateItemSize(
|
|
30
|
+
virtualizer.updateItemSize(key, size);
|
|
30
31
|
}
|
|
31
32
|
}, [
|
|
32
33
|
virtualizer,
|
|
33
|
-
|
|
34
|
+
key,
|
|
34
35
|
ref
|
|
35
36
|
]);
|
|
36
37
|
(0, $64doO$reactariautils.useLayoutEffect)(()=>{
|