@react-aria/virtualizer 3.10.2-nightly.4674 → 3.10.2-nightly.4683
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/dist/ScrollView.main.js +45 -19
- package/dist/ScrollView.main.js.map +1 -1
- package/dist/ScrollView.mjs +46 -21
- package/dist/ScrollView.module.js +46 -21
- package/dist/ScrollView.module.js.map +1 -1
- package/dist/Virtualizer.main.js +2 -2
- package/dist/Virtualizer.main.js.map +1 -1
- package/dist/Virtualizer.mjs +2 -2
- package/dist/Virtualizer.module.js +2 -2
- package/dist/Virtualizer.module.js.map +1 -1
- package/dist/VirtualizerItem.main.js +4 -2
- package/dist/VirtualizerItem.main.js.map +1 -1
- package/dist/VirtualizerItem.mjs +4 -2
- package/dist/VirtualizerItem.module.js +4 -2
- package/dist/VirtualizerItem.module.js.map +1 -1
- package/dist/import.mjs +2 -2
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -2
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +289 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/useVirtualizerItem.main.js.map +1 -1
- package/dist/useVirtualizerItem.module.js.map +1 -1
- package/package.json +9 -9
- package/src/ScrollView.tsx +50 -21
- package/src/Virtualizer.tsx +5 -5
- package/src/VirtualizerItem.tsx +5 -3
- package/src/index.ts +1 -1
- package/src/useVirtualizerItem.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAcM,SAAS,0CAAgB,KAA2B;IACzD,IAAI,aAAC,SAAS,cAAE,UAAU,eAAE,WAAW,UAAE,MAAM,YAAE,QAAQ,EAAC,GAAG;IAC7D,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,MAAM,CAAA,GAAA,mBAAK;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAcM,SAAS,0CAAgB,KAA2B;IACzD,IAAI,aAAC,SAAS,cAAE,UAAU,eAAE,WAAW,UAAE,MAAM,YAAE,QAAQ,EAAC,GAAG;IAC7D,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE;IACjB,CAAA,GAAA,4CAAiB,EAAE;oBACjB;qBACA;aACA;IACF;IAEA,qBACE,0DAAC;QAAI,MAAK;QAAe,KAAK;QAAK,WAAW;QAAW,OAAO,0CAAkB,YAAY,WAAW;OACtG;AAGP;AAEA,IAAI,8BAAQ,IAAI;AACT,SAAS,0CAAkB,UAAsB,EAAE,GAAc,EAAE,MAA0B;IAClG,IAAI,YAAY,QAAQ,QAAQ,UAAU;IAC1C,IAAI,SAAS,4BAAM,GAAG,CAAC;IACvB,IAAI,UAAU,MAAM,CAAC,UAAU,IAAI,MAAM;QACvC,IAAI,CAAC,QACH,OAAO;QAGT,6CAA6C;QAC7C,IAAI,MAAM,WAAW,IAAI,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;QAC3C,IAAI,IAAI,WAAW,IAAI,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;QACzC,IAAI,OAAO,GAAG,KAAK,OAAO,MAAM,CAAC,UAAU,KAAK,GAC9C,OAAO;IAEX;IAEA,IAAI,aAAa;QACf,KAAK,WAAW,IAAI,CAAC,CAAC,GAAI,CAAA,SAAS,OAAO,IAAI,CAAC,CAAC,GAAG,CAAA;QACnD,CAAC,UAAU,EAAE,WAAW,IAAI,CAAC,CAAC,GAAI,CAAA,SAAS,OAAO,IAAI,CAAC,CAAC,GAAG,CAAA;QAC3D,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;IAEA,IAAI,QAAuB;QACzB,UAAU,WAAW,QAAQ,GAAG,WAAW;QAC3C,qJAAqJ;QACrJ,SAAS,WAAW,QAAQ,GAAG,iBAAiB;QAChD,mHAAmH;QACnH,oEAAoE;QACpE,UAAU,WAAW,aAAa,GAAG,YAAY;QACjD,SAAS,WAAW,OAAO;QAC3B,QAAQ,WAAW,MAAM;QACzB,WAAW,WAAW,SAAS;QAC/B,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 parent?: LayoutInfo | null,\n className?: string,\n children: ReactNode\n}\n\nexport function VirtualizerItem(props: VirtualizerItemProps) {\n let {className, layoutInfo, virtualizer, parent, children} = props;\n let {direction} = useLocale();\n let ref = useRef(undefined);\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)}>\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 = {\n top: layoutInfo.rect.y - (parent ? parent.rect.y : 0),\n [xProperty]: layoutInfo.rect.x - (parent ? 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 // Use clip instead of hidden to avoid creating an implicit generic container in the accessibility tree in Firefox.\n // Hidden still allows programmatic scrolling whereas clip does not.\n overflow: layoutInfo.allowOverflow ? 'visible' : 'clip',\n opacity: layoutInfo.opacity,\n zIndex: layoutInfo.zIndex,\n transform: layoutInfo.transform,\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 { 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)(undefined);
|
|
22
22
|
(0, $47736c1e63ba1c6d$export$1da781778207e0a2)({
|
|
23
23
|
layoutInfo: layoutInfo,
|
|
24
24
|
virtualizer: virtualizer,
|
|
@@ -56,7 +56,9 @@ function $ccf8a0a04e4175ae$export$1481e64fbe01b8b3(layoutInfo, dir, parent) {
|
|
|
56
56
|
position: layoutInfo.isSticky ? 'sticky' : 'absolute',
|
|
57
57
|
// Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.
|
|
58
58
|
display: layoutInfo.isSticky ? 'inline-block' : undefined,
|
|
59
|
-
|
|
59
|
+
// Use clip instead of hidden to avoid creating an implicit generic container in the accessibility tree in Firefox.
|
|
60
|
+
// Hidden still allows programmatic scrolling whereas clip does not.
|
|
61
|
+
overflow: layoutInfo.allowOverflow ? 'visible' : 'clip',
|
|
60
62
|
opacity: layoutInfo.opacity,
|
|
61
63
|
zIndex: layoutInfo.zIndex,
|
|
62
64
|
transform: layoutInfo.transform,
|
|
@@ -18,7 +18,7 @@ import {useLocale as $ivH3G$useLocale} from "@react-aria/i18n";
|
|
|
18
18
|
function $ccf8a0a04e4175ae$export$6796df8ba7398521(props) {
|
|
19
19
|
let { 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)(undefined);
|
|
22
22
|
(0, $47736c1e63ba1c6d$export$1da781778207e0a2)({
|
|
23
23
|
layoutInfo: layoutInfo,
|
|
24
24
|
virtualizer: virtualizer,
|
|
@@ -56,7 +56,9 @@ function $ccf8a0a04e4175ae$export$1481e64fbe01b8b3(layoutInfo, dir, parent) {
|
|
|
56
56
|
position: layoutInfo.isSticky ? 'sticky' : 'absolute',
|
|
57
57
|
// Sticky elements are positioned in normal document flow. Display inline-block so that they don't push other sticky columns onto the following rows.
|
|
58
58
|
display: layoutInfo.isSticky ? 'inline-block' : undefined,
|
|
59
|
-
|
|
59
|
+
// Use clip instead of hidden to avoid creating an implicit generic container in the accessibility tree in Firefox.
|
|
60
|
+
// Hidden still allows programmatic scrolling whereas clip does not.
|
|
61
|
+
overflow: layoutInfo.allowOverflow ? 'visible' : 'clip',
|
|
60
62
|
opacity: layoutInfo.opacity,
|
|
61
63
|
zIndex: layoutInfo.zIndex,
|
|
62
64
|
transform: layoutInfo.transform,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAcM,SAAS,0CAAgB,KAA2B;IACzD,IAAI,aAAC,SAAS,cAAE,UAAU,eAAE,WAAW,UAAE,MAAM,YAAE,QAAQ,EAAC,GAAG;IAC7D,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,MAAM,CAAA,GAAA,aAAK;
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAcM,SAAS,0CAAgB,KAA2B;IACzD,IAAI,aAAC,SAAS,cAAE,UAAU,eAAE,WAAW,UAAE,MAAM,YAAE,QAAQ,EAAC,GAAG;IAC7D,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,MAAM,CAAA,GAAA,aAAK,EAAE;IACjB,CAAA,GAAA,yCAAiB,EAAE;oBACjB;qBACA;aACA;IACF;IAEA,qBACE,gCAAC;QAAI,MAAK;QAAe,KAAK;QAAK,WAAW;QAAW,OAAO,0CAAkB,YAAY,WAAW;OACtG;AAGP;AAEA,IAAI,8BAAQ,IAAI;AACT,SAAS,0CAAkB,UAAsB,EAAE,GAAc,EAAE,MAA0B;IAClG,IAAI,YAAY,QAAQ,QAAQ,UAAU;IAC1C,IAAI,SAAS,4BAAM,GAAG,CAAC;IACvB,IAAI,UAAU,MAAM,CAAC,UAAU,IAAI,MAAM;QACvC,IAAI,CAAC,QACH,OAAO;QAGT,6CAA6C;QAC7C,IAAI,MAAM,WAAW,IAAI,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;QAC3C,IAAI,IAAI,WAAW,IAAI,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;QACzC,IAAI,OAAO,GAAG,KAAK,OAAO,MAAM,CAAC,UAAU,KAAK,GAC9C,OAAO;IAEX;IAEA,IAAI,aAAa;QACf,KAAK,WAAW,IAAI,CAAC,CAAC,GAAI,CAAA,SAAS,OAAO,IAAI,CAAC,CAAC,GAAG,CAAA;QACnD,CAAC,UAAU,EAAE,WAAW,IAAI,CAAC,CAAC,GAAI,CAAA,SAAS,OAAO,IAAI,CAAC,CAAC,GAAG,CAAA;QAC3D,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;IAEA,IAAI,QAAuB;QACzB,UAAU,WAAW,QAAQ,GAAG,WAAW;QAC3C,qJAAqJ;QACrJ,SAAS,WAAW,QAAQ,GAAG,iBAAiB;QAChD,mHAAmH;QACnH,oEAAoE;QACpE,UAAU,WAAW,aAAa,GAAG,YAAY;QACjD,SAAS,WAAW,OAAO;QAC3B,QAAQ,WAAW,MAAM;QACzB,WAAW,WAAW,SAAS;QAC/B,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 parent?: LayoutInfo | null,\n className?: string,\n children: ReactNode\n}\n\nexport function VirtualizerItem(props: VirtualizerItemProps) {\n let {className, layoutInfo, virtualizer, parent, children} = props;\n let {direction} = useLocale();\n let ref = useRef(undefined);\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)}>\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 = {\n top: layoutInfo.rect.y - (parent ? parent.rect.y : 0),\n [xProperty]: layoutInfo.rect.x - (parent ? 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 // Use clip instead of hidden to avoid creating an implicit generic container in the accessibility tree in Firefox.\n // Hidden still allows programmatic scrolling whereas clip does not.\n overflow: layoutInfo.allowOverflow ? 'visible' : 'clip',\n opacity: layoutInfo.opacity,\n zIndex: layoutInfo.zIndex,\n transform: layoutInfo.transform,\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/import.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {useVirtualizer as $6d0a5c394373ae64$export$dd6d526d88b5a137, Virtualizer as $6d0a5c394373ae64$export$89be5a243e59c4b2, VirtualizerContext as $6d0a5c394373ae64$export$d288a7dd40372bc} from "./Virtualizer.mjs";
|
|
2
2
|
import {useVirtualizerItem as $47736c1e63ba1c6d$export$1da781778207e0a2} from "./useVirtualizerItem.mjs";
|
|
3
3
|
import {layoutInfoToStyle as $ccf8a0a04e4175ae$export$1481e64fbe01b8b3, VirtualizerItem as $ccf8a0a04e4175ae$export$6796df8ba7398521} from "./VirtualizerItem.mjs";
|
|
4
|
-
import {ScrollView as $44a6ee657928b002$export$5665e3d6be6adea} from "./ScrollView.mjs";
|
|
4
|
+
import {ScrollView as $44a6ee657928b002$export$5665e3d6be6adea, useScrollView as $44a6ee657928b002$export$2ea0c4974da4731b} from "./ScrollView.mjs";
|
|
5
5
|
import {getRTLOffsetType as $ce415dc67314b753$export$faf7630257ad4304, getScrollLeft as $ce415dc67314b753$export$1389d168952b34b5, setScrollLeft as $ce415dc67314b753$export$ed5fd5ffe5ab0ac} from "./utils.mjs";
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -21,5 +21,5 @@ import {getRTLOffsetType as $ce415dc67314b753$export$faf7630257ad4304, getScroll
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
export {$6d0a5c394373ae64$export$dd6d526d88b5a137 as useVirtualizer, $6d0a5c394373ae64$export$89be5a243e59c4b2 as Virtualizer, $6d0a5c394373ae64$export$d288a7dd40372bc as VirtualizerContext, $47736c1e63ba1c6d$export$1da781778207e0a2 as useVirtualizerItem, $ccf8a0a04e4175ae$export$6796df8ba7398521 as VirtualizerItem, $ccf8a0a04e4175ae$export$1481e64fbe01b8b3 as layoutInfoToStyle, $44a6ee657928b002$export$5665e3d6be6adea as ScrollView, $ce415dc67314b753$export$faf7630257ad4304 as getRTLOffsetType, $ce415dc67314b753$export$1389d168952b34b5 as getScrollLeft, $ce415dc67314b753$export$ed5fd5ffe5ab0ac as setScrollLeft};
|
|
24
|
+
export {$6d0a5c394373ae64$export$dd6d526d88b5a137 as useVirtualizer, $6d0a5c394373ae64$export$89be5a243e59c4b2 as Virtualizer, $6d0a5c394373ae64$export$d288a7dd40372bc as VirtualizerContext, $47736c1e63ba1c6d$export$1da781778207e0a2 as useVirtualizerItem, $ccf8a0a04e4175ae$export$6796df8ba7398521 as VirtualizerItem, $ccf8a0a04e4175ae$export$1481e64fbe01b8b3 as layoutInfoToStyle, $44a6ee657928b002$export$5665e3d6be6adea as ScrollView, $44a6ee657928b002$export$2ea0c4974da4731b as useScrollView, $ce415dc67314b753$export$faf7630257ad4304 as getRTLOffsetType, $ce415dc67314b753$export$1389d168952b34b5 as getScrollLeft, $ce415dc67314b753$export$ed5fd5ffe5ab0ac as setScrollLeft};
|
|
25
25
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -16,6 +16,7 @@ $parcel$export(module.exports, "useVirtualizerItem", () => $7d70e069fceb2deb$exp
|
|
|
16
16
|
$parcel$export(module.exports, "VirtualizerItem", () => $d6a26279cc31826b$exports.VirtualizerItem);
|
|
17
17
|
$parcel$export(module.exports, "layoutInfoToStyle", () => $d6a26279cc31826b$exports.layoutInfoToStyle);
|
|
18
18
|
$parcel$export(module.exports, "ScrollView", () => $00ca8c0b29e3e07c$exports.ScrollView);
|
|
19
|
+
$parcel$export(module.exports, "useScrollView", () => $00ca8c0b29e3e07c$exports.useScrollView);
|
|
19
20
|
$parcel$export(module.exports, "getRTLOffsetType", () => $efdd61e59e023a1d$exports.getRTLOffsetType);
|
|
20
21
|
$parcel$export(module.exports, "getScrollLeft", () => $efdd61e59e023a1d$exports.getScrollLeft);
|
|
21
22
|
$parcel$export(module.exports, "setScrollLeft", () => $efdd61e59e023a1d$exports.setScrollLeft);
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/virtualizer/src/index.ts"],"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\nexport type {RTLOffsetType} from './utils';\nexport type {VirtualizerItemOptions} from './useVirtualizerItem';\nexport {useVirtualizer, Virtualizer, VirtualizerContext} 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":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {useVirtualizer as $6d0a5c394373ae64$export$dd6d526d88b5a137, Virtualizer as $6d0a5c394373ae64$export$89be5a243e59c4b2, VirtualizerContext as $6d0a5c394373ae64$export$d288a7dd40372bc} from "./Virtualizer.module.js";
|
|
2
2
|
import {useVirtualizerItem as $47736c1e63ba1c6d$export$1da781778207e0a2} from "./useVirtualizerItem.module.js";
|
|
3
3
|
import {layoutInfoToStyle as $ccf8a0a04e4175ae$export$1481e64fbe01b8b3, VirtualizerItem as $ccf8a0a04e4175ae$export$6796df8ba7398521} from "./VirtualizerItem.module.js";
|
|
4
|
-
import {ScrollView as $44a6ee657928b002$export$5665e3d6be6adea} from "./ScrollView.module.js";
|
|
4
|
+
import {ScrollView as $44a6ee657928b002$export$5665e3d6be6adea, useScrollView as $44a6ee657928b002$export$2ea0c4974da4731b} from "./ScrollView.module.js";
|
|
5
5
|
import {getRTLOffsetType as $ce415dc67314b753$export$faf7630257ad4304, getScrollLeft as $ce415dc67314b753$export$1389d168952b34b5, setScrollLeft as $ce415dc67314b753$export$ed5fd5ffe5ab0ac} from "./utils.module.js";
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -21,5 +21,5 @@ import {getRTLOffsetType as $ce415dc67314b753$export$faf7630257ad4304, getScroll
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
export {$6d0a5c394373ae64$export$dd6d526d88b5a137 as useVirtualizer, $6d0a5c394373ae64$export$89be5a243e59c4b2 as Virtualizer, $6d0a5c394373ae64$export$d288a7dd40372bc as VirtualizerContext, $47736c1e63ba1c6d$export$1da781778207e0a2 as useVirtualizerItem, $ccf8a0a04e4175ae$export$6796df8ba7398521 as VirtualizerItem, $ccf8a0a04e4175ae$export$1481e64fbe01b8b3 as layoutInfoToStyle, $44a6ee657928b002$export$5665e3d6be6adea as ScrollView, $ce415dc67314b753$export$faf7630257ad4304 as getRTLOffsetType, $ce415dc67314b753$export$1389d168952b34b5 as getScrollLeft, $ce415dc67314b753$export$ed5fd5ffe5ab0ac as setScrollLeft};
|
|
24
|
+
export {$6d0a5c394373ae64$export$dd6d526d88b5a137 as useVirtualizer, $6d0a5c394373ae64$export$89be5a243e59c4b2 as Virtualizer, $6d0a5c394373ae64$export$d288a7dd40372bc as VirtualizerContext, $47736c1e63ba1c6d$export$1da781778207e0a2 as useVirtualizerItem, $ccf8a0a04e4175ae$export$6796df8ba7398521 as VirtualizerItem, $ccf8a0a04e4175ae$export$1481e64fbe01b8b3 as layoutInfoToStyle, $44a6ee657928b002$export$5665e3d6be6adea as ScrollView, $44a6ee657928b002$export$2ea0c4974da4731b as useScrollView, $ce415dc67314b753$export$faf7630257ad4304 as getRTLOffsetType, $ce415dc67314b753$export$1389d168952b34b5 as getScrollLeft, $ce415dc67314b753$export$ed5fd5ffe5ab0ac as setScrollLeft};
|
|
25
25
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/virtualizer/src/index.ts"],"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\nexport type {RTLOffsetType} from './utils';\nexport type {VirtualizerItemOptions} from './useVirtualizerItem';\nexport {useVirtualizer, Virtualizer, VirtualizerContext} from './Virtualizer';\nexport {useVirtualizerItem} from './useVirtualizerItem';\nexport {VirtualizerItem, layoutInfoToStyle} from './VirtualizerItem';\nexport {ScrollView} from './ScrollView';\nexport {getRTLOffsetType, getScrollLeft, setScrollLeft} from './utils';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/virtualizer/src/index.ts"],"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\nexport type {RTLOffsetType} from './utils';\nexport type {VirtualizerItemOptions} from './useVirtualizerItem';\nexport {useVirtualizer, Virtualizer, VirtualizerContext} 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":"module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface IVirtualizer {
|
|
|
11
11
|
export interface VirtualizerItemOptions {
|
|
12
12
|
layoutInfo: LayoutInfo;
|
|
13
13
|
virtualizer: IVirtualizer;
|
|
14
|
-
ref: RefObject<HTMLElement>;
|
|
14
|
+
ref: RefObject<HTMLElement | null>;
|
|
15
15
|
}
|
|
16
16
|
export function useVirtualizerItem(options: VirtualizerItemOptions): {
|
|
17
17
|
updateSize: () => void;
|
|
@@ -19,7 +19,7 @@ export function useVirtualizerItem(options: VirtualizerItemOptions): {
|
|
|
19
19
|
interface ScrollViewProps extends HTMLAttributes<HTMLElement> {
|
|
20
20
|
contentSize: Size;
|
|
21
21
|
onVisibleRectChange: (rect: Rect) => void;
|
|
22
|
-
children
|
|
22
|
+
children?: ReactNode;
|
|
23
23
|
innerStyle?: CSSProperties;
|
|
24
24
|
sizeToFit?: 'width' | 'height';
|
|
25
25
|
onScrollStart?: () => void;
|
|
@@ -27,8 +27,292 @@ interface ScrollViewProps extends HTMLAttributes<HTMLElement> {
|
|
|
27
27
|
scrollDirection?: 'horizontal' | 'vertical' | 'both';
|
|
28
28
|
}
|
|
29
29
|
export const ScrollView: React.ForwardRefExoticComponent<ScrollViewProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
export function useScrollView(props: ScrollViewProps, ref: RefObject<HTMLElement | null>): {
|
|
31
|
+
scrollViewProps: {
|
|
32
|
+
style: React.CSSProperties;
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
defaultChecked?: boolean;
|
|
35
|
+
defaultValue?: string | number | readonly string[];
|
|
36
|
+
suppressContentEditableWarning?: boolean;
|
|
37
|
+
suppressHydrationWarning?: boolean;
|
|
38
|
+
accessKey?: string;
|
|
39
|
+
autoFocus?: boolean;
|
|
40
|
+
className?: string;
|
|
41
|
+
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only";
|
|
42
|
+
contextMenu?: string;
|
|
43
|
+
dir?: string;
|
|
44
|
+
draggable?: boolean | "false" | "true";
|
|
45
|
+
hidden?: boolean;
|
|
46
|
+
id?: string;
|
|
47
|
+
lang?: string;
|
|
48
|
+
nonce?: string;
|
|
49
|
+
slot?: string;
|
|
50
|
+
spellCheck?: boolean | "false" | "true";
|
|
51
|
+
tabIndex?: number;
|
|
52
|
+
title?: string;
|
|
53
|
+
translate?: "yes" | "no";
|
|
54
|
+
radioGroup?: string;
|
|
55
|
+
role?: React.AriaRole;
|
|
56
|
+
about?: string;
|
|
57
|
+
content?: string;
|
|
58
|
+
datatype?: string;
|
|
59
|
+
inlist?: any;
|
|
60
|
+
prefix?: string;
|
|
61
|
+
property?: string;
|
|
62
|
+
rel?: string;
|
|
63
|
+
resource?: string;
|
|
64
|
+
rev?: string;
|
|
65
|
+
typeof?: string;
|
|
66
|
+
vocab?: string;
|
|
67
|
+
autoCapitalize?: string;
|
|
68
|
+
autoCorrect?: string;
|
|
69
|
+
autoSave?: string;
|
|
70
|
+
color?: string;
|
|
71
|
+
itemProp?: string;
|
|
72
|
+
itemScope?: boolean;
|
|
73
|
+
itemType?: string;
|
|
74
|
+
itemID?: string;
|
|
75
|
+
itemRef?: string;
|
|
76
|
+
results?: number;
|
|
77
|
+
security?: string;
|
|
78
|
+
unselectable?: "off" | "on";
|
|
79
|
+
popover?: "" | "auto" | "manual";
|
|
80
|
+
popoverTargetAction?: "hide" | "show" | "toggle";
|
|
81
|
+
popoverTarget?: string;
|
|
82
|
+
inert?: boolean;
|
|
83
|
+
inputMode?: "search" | "numeric" | "none" | "url" | "text" | "email" | "tel" | "decimal";
|
|
84
|
+
is?: string;
|
|
85
|
+
"aria-activedescendant"?: string;
|
|
86
|
+
"aria-atomic"?: boolean | "false" | "true";
|
|
87
|
+
"aria-autocomplete"?: "inline" | "both" | "none" | "list";
|
|
88
|
+
"aria-braillelabel"?: string;
|
|
89
|
+
"aria-brailleroledescription"?: string;
|
|
90
|
+
"aria-busy"?: boolean | "false" | "true";
|
|
91
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true";
|
|
92
|
+
"aria-colcount"?: number;
|
|
93
|
+
"aria-colindex"?: number;
|
|
94
|
+
"aria-colindextext"?: string;
|
|
95
|
+
"aria-colspan"?: number;
|
|
96
|
+
"aria-controls"?: string;
|
|
97
|
+
"aria-current"?: boolean | "false" | "time" | "location" | "page" | "true" | "step" | "date";
|
|
98
|
+
"aria-describedby"?: string;
|
|
99
|
+
"aria-description"?: string;
|
|
100
|
+
"aria-details"?: string;
|
|
101
|
+
"aria-disabled"?: boolean | "false" | "true";
|
|
102
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
103
|
+
"aria-errormessage"?: string;
|
|
104
|
+
"aria-expanded"?: boolean | "false" | "true";
|
|
105
|
+
"aria-flowto"?: string;
|
|
106
|
+
"aria-grabbed"?: boolean | "false" | "true";
|
|
107
|
+
"aria-haspopup"?: boolean | "false" | "grid" | "dialog" | "menu" | "listbox" | "true" | "tree";
|
|
108
|
+
"aria-hidden"?: boolean | "false" | "true";
|
|
109
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling";
|
|
110
|
+
"aria-keyshortcuts"?: string;
|
|
111
|
+
"aria-label"?: string;
|
|
112
|
+
"aria-labelledby"?: string;
|
|
113
|
+
"aria-level"?: number;
|
|
114
|
+
"aria-live"?: "off" | "assertive" | "polite";
|
|
115
|
+
"aria-modal"?: boolean | "false" | "true";
|
|
116
|
+
"aria-multiline"?: boolean | "false" | "true";
|
|
117
|
+
"aria-multiselectable"?: boolean | "false" | "true";
|
|
118
|
+
"aria-orientation"?: "horizontal" | "vertical";
|
|
119
|
+
"aria-owns"?: string;
|
|
120
|
+
"aria-placeholder"?: string;
|
|
121
|
+
"aria-posinset"?: number;
|
|
122
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true";
|
|
123
|
+
"aria-readonly"?: boolean | "false" | "true";
|
|
124
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
125
|
+
"aria-required"?: boolean | "false" | "true";
|
|
126
|
+
"aria-roledescription"?: string;
|
|
127
|
+
"aria-rowcount"?: number;
|
|
128
|
+
"aria-rowindex"?: number;
|
|
129
|
+
"aria-rowindextext"?: string;
|
|
130
|
+
"aria-rowspan"?: number;
|
|
131
|
+
"aria-selected"?: boolean | "false" | "true";
|
|
132
|
+
"aria-setsize"?: number;
|
|
133
|
+
"aria-sort"?: "none" | "other" | "ascending" | "descending";
|
|
134
|
+
"aria-valuemax"?: number;
|
|
135
|
+
"aria-valuemin"?: number;
|
|
136
|
+
"aria-valuenow"?: number;
|
|
137
|
+
"aria-valuetext"?: string;
|
|
138
|
+
dangerouslySetInnerHTML?: {
|
|
139
|
+
__html: string | TrustedHTML;
|
|
140
|
+
};
|
|
141
|
+
onCopy?: React.ClipboardEventHandler<HTMLElement>;
|
|
142
|
+
onCopyCapture?: React.ClipboardEventHandler<HTMLElement>;
|
|
143
|
+
onCut?: React.ClipboardEventHandler<HTMLElement>;
|
|
144
|
+
onCutCapture?: React.ClipboardEventHandler<HTMLElement>;
|
|
145
|
+
onPaste?: React.ClipboardEventHandler<HTMLElement>;
|
|
146
|
+
onPasteCapture?: React.ClipboardEventHandler<HTMLElement>;
|
|
147
|
+
onCompositionEnd?: React.CompositionEventHandler<HTMLElement>;
|
|
148
|
+
onCompositionEndCapture?: React.CompositionEventHandler<HTMLElement>;
|
|
149
|
+
onCompositionStart?: React.CompositionEventHandler<HTMLElement>;
|
|
150
|
+
onCompositionStartCapture?: React.CompositionEventHandler<HTMLElement>;
|
|
151
|
+
onCompositionUpdate?: React.CompositionEventHandler<HTMLElement>;
|
|
152
|
+
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLElement>;
|
|
153
|
+
onFocus?: React.FocusEventHandler<HTMLElement>;
|
|
154
|
+
onFocusCapture?: React.FocusEventHandler<HTMLElement>;
|
|
155
|
+
onBlur?: React.FocusEventHandler<HTMLElement>;
|
|
156
|
+
onBlurCapture?: React.FocusEventHandler<HTMLElement>;
|
|
157
|
+
onChange?: React.FormEventHandler<HTMLElement>;
|
|
158
|
+
onChangeCapture?: React.FormEventHandler<HTMLElement>;
|
|
159
|
+
onBeforeInput?: React.FormEventHandler<HTMLElement>;
|
|
160
|
+
onBeforeInputCapture?: React.FormEventHandler<HTMLElement>;
|
|
161
|
+
onInput?: React.FormEventHandler<HTMLElement>;
|
|
162
|
+
onInputCapture?: React.FormEventHandler<HTMLElement>;
|
|
163
|
+
onReset?: React.FormEventHandler<HTMLElement>;
|
|
164
|
+
onResetCapture?: React.FormEventHandler<HTMLElement>;
|
|
165
|
+
onSubmit?: React.FormEventHandler<HTMLElement>;
|
|
166
|
+
onSubmitCapture?: React.FormEventHandler<HTMLElement>;
|
|
167
|
+
onInvalid?: React.FormEventHandler<HTMLElement>;
|
|
168
|
+
onInvalidCapture?: React.FormEventHandler<HTMLElement>;
|
|
169
|
+
onLoad?: React.ReactEventHandler<HTMLElement>;
|
|
170
|
+
onLoadCapture?: React.ReactEventHandler<HTMLElement>;
|
|
171
|
+
onError?: React.ReactEventHandler<HTMLElement>;
|
|
172
|
+
onErrorCapture?: React.ReactEventHandler<HTMLElement>;
|
|
173
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
|
174
|
+
onKeyDownCapture?: React.KeyboardEventHandler<HTMLElement>;
|
|
175
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLElement>;
|
|
176
|
+
onKeyPressCapture?: React.KeyboardEventHandler<HTMLElement>;
|
|
177
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLElement>;
|
|
178
|
+
onKeyUpCapture?: React.KeyboardEventHandler<HTMLElement>;
|
|
179
|
+
onAbort?: React.ReactEventHandler<HTMLElement>;
|
|
180
|
+
onAbortCapture?: React.ReactEventHandler<HTMLElement>;
|
|
181
|
+
onCanPlay?: React.ReactEventHandler<HTMLElement>;
|
|
182
|
+
onCanPlayCapture?: React.ReactEventHandler<HTMLElement>;
|
|
183
|
+
onCanPlayThrough?: React.ReactEventHandler<HTMLElement>;
|
|
184
|
+
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLElement>;
|
|
185
|
+
onDurationChange?: React.ReactEventHandler<HTMLElement>;
|
|
186
|
+
onDurationChangeCapture?: React.ReactEventHandler<HTMLElement>;
|
|
187
|
+
onEmptied?: React.ReactEventHandler<HTMLElement>;
|
|
188
|
+
onEmptiedCapture?: React.ReactEventHandler<HTMLElement>;
|
|
189
|
+
onEncrypted?: React.ReactEventHandler<HTMLElement>;
|
|
190
|
+
onEncryptedCapture?: React.ReactEventHandler<HTMLElement>;
|
|
191
|
+
onEnded?: React.ReactEventHandler<HTMLElement>;
|
|
192
|
+
onEndedCapture?: React.ReactEventHandler<HTMLElement>;
|
|
193
|
+
onLoadedData?: React.ReactEventHandler<HTMLElement>;
|
|
194
|
+
onLoadedDataCapture?: React.ReactEventHandler<HTMLElement>;
|
|
195
|
+
onLoadedMetadata?: React.ReactEventHandler<HTMLElement>;
|
|
196
|
+
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLElement>;
|
|
197
|
+
onLoadStart?: React.ReactEventHandler<HTMLElement>;
|
|
198
|
+
onLoadStartCapture?: React.ReactEventHandler<HTMLElement>;
|
|
199
|
+
onPause?: React.ReactEventHandler<HTMLElement>;
|
|
200
|
+
onPauseCapture?: React.ReactEventHandler<HTMLElement>;
|
|
201
|
+
onPlay?: React.ReactEventHandler<HTMLElement>;
|
|
202
|
+
onPlayCapture?: React.ReactEventHandler<HTMLElement>;
|
|
203
|
+
onPlaying?: React.ReactEventHandler<HTMLElement>;
|
|
204
|
+
onPlayingCapture?: React.ReactEventHandler<HTMLElement>;
|
|
205
|
+
onProgress?: React.ReactEventHandler<HTMLElement>;
|
|
206
|
+
onProgressCapture?: React.ReactEventHandler<HTMLElement>;
|
|
207
|
+
onRateChange?: React.ReactEventHandler<HTMLElement>;
|
|
208
|
+
onRateChangeCapture?: React.ReactEventHandler<HTMLElement>;
|
|
209
|
+
onResize?: React.ReactEventHandler<HTMLElement>;
|
|
210
|
+
onResizeCapture?: React.ReactEventHandler<HTMLElement>;
|
|
211
|
+
onSeeked?: React.ReactEventHandler<HTMLElement>;
|
|
212
|
+
onSeekedCapture?: React.ReactEventHandler<HTMLElement>;
|
|
213
|
+
onSeeking?: React.ReactEventHandler<HTMLElement>;
|
|
214
|
+
onSeekingCapture?: React.ReactEventHandler<HTMLElement>;
|
|
215
|
+
onStalled?: React.ReactEventHandler<HTMLElement>;
|
|
216
|
+
onStalledCapture?: React.ReactEventHandler<HTMLElement>;
|
|
217
|
+
onSuspend?: React.ReactEventHandler<HTMLElement>;
|
|
218
|
+
onSuspendCapture?: React.ReactEventHandler<HTMLElement>;
|
|
219
|
+
onTimeUpdate?: React.ReactEventHandler<HTMLElement>;
|
|
220
|
+
onTimeUpdateCapture?: React.ReactEventHandler<HTMLElement>;
|
|
221
|
+
onVolumeChange?: React.ReactEventHandler<HTMLElement>;
|
|
222
|
+
onVolumeChangeCapture?: React.ReactEventHandler<HTMLElement>;
|
|
223
|
+
onWaiting?: React.ReactEventHandler<HTMLElement>;
|
|
224
|
+
onWaitingCapture?: React.ReactEventHandler<HTMLElement>;
|
|
225
|
+
onAuxClick?: React.MouseEventHandler<HTMLElement>;
|
|
226
|
+
onAuxClickCapture?: React.MouseEventHandler<HTMLElement>;
|
|
227
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
228
|
+
onClickCapture?: React.MouseEventHandler<HTMLElement>;
|
|
229
|
+
onContextMenu?: React.MouseEventHandler<HTMLElement>;
|
|
230
|
+
onContextMenuCapture?: React.MouseEventHandler<HTMLElement>;
|
|
231
|
+
onDoubleClick?: React.MouseEventHandler<HTMLElement>;
|
|
232
|
+
onDoubleClickCapture?: React.MouseEventHandler<HTMLElement>;
|
|
233
|
+
onDrag?: React.DragEventHandler<HTMLElement>;
|
|
234
|
+
onDragCapture?: React.DragEventHandler<HTMLElement>;
|
|
235
|
+
onDragEnd?: React.DragEventHandler<HTMLElement>;
|
|
236
|
+
onDragEndCapture?: React.DragEventHandler<HTMLElement>;
|
|
237
|
+
onDragEnter?: React.DragEventHandler<HTMLElement>;
|
|
238
|
+
onDragEnterCapture?: React.DragEventHandler<HTMLElement>;
|
|
239
|
+
onDragExit?: React.DragEventHandler<HTMLElement>;
|
|
240
|
+
onDragExitCapture?: React.DragEventHandler<HTMLElement>;
|
|
241
|
+
onDragLeave?: React.DragEventHandler<HTMLElement>;
|
|
242
|
+
onDragLeaveCapture?: React.DragEventHandler<HTMLElement>;
|
|
243
|
+
onDragOver?: React.DragEventHandler<HTMLElement>;
|
|
244
|
+
onDragOverCapture?: React.DragEventHandler<HTMLElement>;
|
|
245
|
+
onDragStart?: React.DragEventHandler<HTMLElement>;
|
|
246
|
+
onDragStartCapture?: React.DragEventHandler<HTMLElement>;
|
|
247
|
+
onDrop?: React.DragEventHandler<HTMLElement>;
|
|
248
|
+
onDropCapture?: React.DragEventHandler<HTMLElement>;
|
|
249
|
+
onMouseDown?: React.MouseEventHandler<HTMLElement>;
|
|
250
|
+
onMouseDownCapture?: React.MouseEventHandler<HTMLElement>;
|
|
251
|
+
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
252
|
+
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
253
|
+
onMouseMove?: React.MouseEventHandler<HTMLElement>;
|
|
254
|
+
onMouseMoveCapture?: React.MouseEventHandler<HTMLElement>;
|
|
255
|
+
onMouseOut?: React.MouseEventHandler<HTMLElement>;
|
|
256
|
+
onMouseOutCapture?: React.MouseEventHandler<HTMLElement>;
|
|
257
|
+
onMouseOver?: React.MouseEventHandler<HTMLElement>;
|
|
258
|
+
onMouseOverCapture?: React.MouseEventHandler<HTMLElement>;
|
|
259
|
+
onMouseUp?: React.MouseEventHandler<HTMLElement>;
|
|
260
|
+
onMouseUpCapture?: React.MouseEventHandler<HTMLElement>;
|
|
261
|
+
onSelect?: React.ReactEventHandler<HTMLElement>;
|
|
262
|
+
onSelectCapture?: React.ReactEventHandler<HTMLElement>;
|
|
263
|
+
onTouchCancel?: React.TouchEventHandler<HTMLElement>;
|
|
264
|
+
onTouchCancelCapture?: React.TouchEventHandler<HTMLElement>;
|
|
265
|
+
onTouchEnd?: React.TouchEventHandler<HTMLElement>;
|
|
266
|
+
onTouchEndCapture?: React.TouchEventHandler<HTMLElement>;
|
|
267
|
+
onTouchMove?: React.TouchEventHandler<HTMLElement>;
|
|
268
|
+
onTouchMoveCapture?: React.TouchEventHandler<HTMLElement>;
|
|
269
|
+
onTouchStart?: React.TouchEventHandler<HTMLElement>;
|
|
270
|
+
onTouchStartCapture?: React.TouchEventHandler<HTMLElement>;
|
|
271
|
+
onPointerDown?: React.PointerEventHandler<HTMLElement>;
|
|
272
|
+
onPointerDownCapture?: React.PointerEventHandler<HTMLElement>;
|
|
273
|
+
onPointerMove?: React.PointerEventHandler<HTMLElement>;
|
|
274
|
+
onPointerMoveCapture?: React.PointerEventHandler<HTMLElement>;
|
|
275
|
+
onPointerUp?: React.PointerEventHandler<HTMLElement>;
|
|
276
|
+
onPointerUpCapture?: React.PointerEventHandler<HTMLElement>;
|
|
277
|
+
onPointerCancel?: React.PointerEventHandler<HTMLElement>;
|
|
278
|
+
onPointerCancelCapture?: React.PointerEventHandler<HTMLElement>;
|
|
279
|
+
onPointerEnter?: React.PointerEventHandler<HTMLElement>;
|
|
280
|
+
onPointerLeave?: React.PointerEventHandler<HTMLElement>;
|
|
281
|
+
onPointerOver?: React.PointerEventHandler<HTMLElement>;
|
|
282
|
+
onPointerOverCapture?: React.PointerEventHandler<HTMLElement>;
|
|
283
|
+
onPointerOut?: React.PointerEventHandler<HTMLElement>;
|
|
284
|
+
onPointerOutCapture?: React.PointerEventHandler<HTMLElement>;
|
|
285
|
+
onGotPointerCapture?: React.PointerEventHandler<HTMLElement>;
|
|
286
|
+
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLElement>;
|
|
287
|
+
onLostPointerCapture?: React.PointerEventHandler<HTMLElement>;
|
|
288
|
+
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLElement>;
|
|
289
|
+
onScroll?: React.UIEventHandler<HTMLElement>;
|
|
290
|
+
onScrollCapture?: React.UIEventHandler<HTMLElement>;
|
|
291
|
+
onWheel?: React.WheelEventHandler<HTMLElement>;
|
|
292
|
+
onWheelCapture?: React.WheelEventHandler<HTMLElement>;
|
|
293
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLElement>;
|
|
294
|
+
onAnimationStartCapture?: React.AnimationEventHandler<HTMLElement>;
|
|
295
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLElement>;
|
|
296
|
+
onAnimationEndCapture?: React.AnimationEventHandler<HTMLElement>;
|
|
297
|
+
onAnimationIteration?: React.AnimationEventHandler<HTMLElement>;
|
|
298
|
+
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLElement>;
|
|
299
|
+
onToggle?: React.ToggleEventHandler<HTMLElement>;
|
|
300
|
+
onBeforeToggle?: React.ToggleEventHandler<HTMLElement>;
|
|
301
|
+
onTransitionCancel?: React.TransitionEventHandler<HTMLElement>;
|
|
302
|
+
onTransitionCancelCapture?: React.TransitionEventHandler<HTMLElement>;
|
|
303
|
+
onTransitionEnd?: React.TransitionEventHandler<HTMLElement>;
|
|
304
|
+
onTransitionEndCapture?: React.TransitionEventHandler<HTMLElement>;
|
|
305
|
+
onTransitionRun?: React.TransitionEventHandler<HTMLElement>;
|
|
306
|
+
onTransitionRunCapture?: React.TransitionEventHandler<HTMLElement>;
|
|
307
|
+
onTransitionStart?: React.TransitionEventHandler<HTMLElement>;
|
|
308
|
+
onTransitionStartCapture?: React.TransitionEventHandler<HTMLElement>;
|
|
309
|
+
};
|
|
310
|
+
contentProps: {
|
|
311
|
+
style: React.CSSProperties;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
30
314
|
interface VirtualizerItemProps extends Omit<VirtualizerItemOptions, 'ref'> {
|
|
31
|
-
parent?: LayoutInfo;
|
|
315
|
+
parent?: LayoutInfo | null;
|
|
32
316
|
className?: string;
|
|
33
317
|
children: ReactNode;
|
|
34
318
|
}
|
|
@@ -53,14 +337,14 @@ interface VirtualizerOptions {
|
|
|
53
337
|
isLoading?: boolean;
|
|
54
338
|
onLoadMore?: () => void;
|
|
55
339
|
}
|
|
56
|
-
export function useVirtualizer<T extends object, V extends ReactNode, W>(props: VirtualizerOptions, state: VirtualizerState<T, V, W>, ref: RefObject<HTMLElement>): {
|
|
340
|
+
export function useVirtualizer<T extends object, V extends ReactNode, W>(props: VirtualizerOptions, state: VirtualizerState<T, V, W>, ref: RefObject<HTMLElement | null>): {
|
|
57
341
|
virtualizerProps: {};
|
|
58
342
|
scrollViewProps: {
|
|
59
343
|
onVisibleRectChange: (rect: Rect) => void;
|
|
60
344
|
};
|
|
61
345
|
};
|
|
62
346
|
export const Virtualizer: <T extends object, V, O>(props: VirtualizerProps<T, V, O> & {
|
|
63
|
-
ref?: RefObject<HTMLDivElement>;
|
|
347
|
+
ref?: RefObject<HTMLDivElement | null>;
|
|
64
348
|
}) => ReactElement;
|
|
65
349
|
|
|
66
350
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAcA,4BACI,UAAU,GACV,qBAAqB,GACrB,oBAAoB,CAAC;AAezB,iCAAiC,WAAW,GAAE,OAAe,GAAG,aAAa,CAmC5E;AAED,8BAA8B,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAkBzE;AAED,8BAA8B,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,QAiBpF;ACzFD;IACE,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;CAC3C;AAED;IACE,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,YAAY,CAAC;IAC1B,GAAG,EAAE,UAAU,WAAW,CAAC,CAAA;
|
|
1
|
+
{"mappings":"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","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 {useVirtualizer, Virtualizer, VirtualizerContext} 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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAiBM,SAAS,0CAAmB,OAA+B;IAChE,IAAI,cAAC,UAAU,eAAE,WAAW,OAAE,GAAG,EAAC,GAAG;IAErC,IAAI,aAAa,CAAA,GAAA,wBAAU,EAAE;QAC3B,IAAI,YAAY;YACd,IAAI,OAAO,8BAAQ,IAAI,OAAO;YAC9B,YAAY,cAAc,CAAC,WAAW,GAAG,EAAE;QAC7C;IACF,GAAG;QAAC;QAAa,uBAAA,iCAAA,WAAY,GAAG;QAAE;KAAI;IAEtC,CAAA,GAAA,qCAAc,EAAE;QACd,IAAI,uBAAA,iCAAA,WAAY,aAAa,EAC3B;IAEJ;IAEA,OAAO;oBAAC;IAAU;AACpB;AAEA,SAAS,8BAAQ,IAAiB;IAChC,6DAA6D;IAC7D,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM;IAC9B,KAAK,KAAK,CAAC,MAAM,GAAG;IACpB,IAAI,OAAO,IAAI,CAAA,GAAA,mCAAG,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY;IACvD,KAAK,KAAK,CAAC,MAAM,GAAG;IACpB,OAAO;AACT","sources":["packages/@react-aria/virtualizer/src/useVirtualizerItem.ts"],"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 {Key} from '@react-types/shared';\nimport {LayoutInfo, Size} from '@react-stately/virtualizer';\nimport {RefObject, useCallback} from 'react';\nimport {useLayoutEffect} from '@react-aria/utils';\n\ninterface IVirtualizer {\n updateItemSize(key: Key, size: Size): void\n}\n\nexport interface VirtualizerItemOptions {\n layoutInfo: LayoutInfo,\n virtualizer: IVirtualizer,\n ref: RefObject<HTMLElement>\n}\n\nexport function useVirtualizerItem(options: VirtualizerItemOptions) {\n let {layoutInfo, virtualizer, ref} = options;\n\n let updateSize = useCallback(() => {\n if (layoutInfo) {\n let size = getSize(ref.current);\n virtualizer.updateItemSize(layoutInfo.key, size);\n }\n }, [virtualizer, layoutInfo?.key, ref]);\n\n useLayoutEffect(() => {\n if (layoutInfo?.estimatedSize) {\n updateSize();\n }\n });\n\n return {updateSize};\n}\n\nfunction getSize(node: HTMLElement) {\n // Reset height before measuring so we get the intrinsic size\n let height = node.style.height;\n node.style.height = '';\n let size = new Size(node.scrollWidth, node.scrollHeight);\n node.style.height = height;\n return size;\n}\n"],"names":[],"version":3,"file":"useVirtualizerItem.main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAiBM,SAAS,0CAAmB,OAA+B;IAChE,IAAI,cAAC,UAAU,eAAE,WAAW,OAAE,GAAG,EAAC,GAAG;IAErC,IAAI,aAAa,CAAA,GAAA,wBAAU,EAAE;QAC3B,IAAI,YAAY;YACd,IAAI,OAAO,8BAAQ,IAAI,OAAO;YAC9B,YAAY,cAAc,CAAC,WAAW,GAAG,EAAE;QAC7C;IACF,GAAG;QAAC;QAAa,uBAAA,iCAAA,WAAY,GAAG;QAAE;KAAI;IAEtC,CAAA,GAAA,qCAAc,EAAE;QACd,IAAI,uBAAA,iCAAA,WAAY,aAAa,EAC3B;IAEJ;IAEA,OAAO;oBAAC;IAAU;AACpB;AAEA,SAAS,8BAAQ,IAAiB;IAChC,6DAA6D;IAC7D,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM;IAC9B,KAAK,KAAK,CAAC,MAAM,GAAG;IACpB,IAAI,OAAO,IAAI,CAAA,GAAA,mCAAG,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY;IACvD,KAAK,KAAK,CAAC,MAAM,GAAG;IACpB,OAAO;AACT","sources":["packages/@react-aria/virtualizer/src/useVirtualizerItem.ts"],"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 {Key} from '@react-types/shared';\nimport {LayoutInfo, Size} from '@react-stately/virtualizer';\nimport {RefObject, useCallback} from 'react';\nimport {useLayoutEffect} from '@react-aria/utils';\n\ninterface IVirtualizer {\n updateItemSize(key: Key, size: Size): void\n}\n\nexport interface VirtualizerItemOptions {\n layoutInfo: LayoutInfo,\n virtualizer: IVirtualizer,\n ref: RefObject<HTMLElement | null>\n}\n\nexport function useVirtualizerItem(options: VirtualizerItemOptions) {\n let {layoutInfo, virtualizer, ref} = options;\n\n let updateSize = useCallback(() => {\n if (layoutInfo) {\n let size = getSize(ref.current);\n virtualizer.updateItemSize(layoutInfo.key, size);\n }\n }, [virtualizer, layoutInfo?.key, ref]);\n\n useLayoutEffect(() => {\n if (layoutInfo?.estimatedSize) {\n updateSize();\n }\n });\n\n return {updateSize};\n}\n\nfunction getSize(node: HTMLElement) {\n // Reset height before measuring so we get the intrinsic size\n let height = node.style.height;\n node.style.height = '';\n let size = new Size(node.scrollWidth, node.scrollHeight);\n node.style.height = height;\n return size;\n}\n"],"names":[],"version":3,"file":"useVirtualizerItem.main.js.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAiBM,SAAS,0CAAmB,OAA+B;IAChE,IAAI,cAAC,UAAU,eAAE,WAAW,OAAE,GAAG,EAAC,GAAG;IAErC,IAAI,aAAa,CAAA,GAAA,kBAAU,EAAE;QAC3B,IAAI,YAAY;YACd,IAAI,OAAO,8BAAQ,IAAI,OAAO;YAC9B,YAAY,cAAc,CAAC,WAAW,GAAG,EAAE;QAC7C;IACF,GAAG;QAAC;QAAa,uBAAA,iCAAA,WAAY,GAAG;QAAE;KAAI;IAEtC,CAAA,GAAA,sBAAc,EAAE;QACd,IAAI,uBAAA,iCAAA,WAAY,aAAa,EAC3B;IAEJ;IAEA,OAAO;oBAAC;IAAU;AACpB;AAEA,SAAS,8BAAQ,IAAiB;IAChC,6DAA6D;IAC7D,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM;IAC9B,KAAK,KAAK,CAAC,MAAM,GAAG;IACpB,IAAI,OAAO,IAAI,CAAA,GAAA,WAAG,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY;IACvD,KAAK,KAAK,CAAC,MAAM,GAAG;IACpB,OAAO;AACT","sources":["packages/@react-aria/virtualizer/src/useVirtualizerItem.ts"],"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 {Key} from '@react-types/shared';\nimport {LayoutInfo, Size} from '@react-stately/virtualizer';\nimport {RefObject, useCallback} from 'react';\nimport {useLayoutEffect} from '@react-aria/utils';\n\ninterface IVirtualizer {\n updateItemSize(key: Key, size: Size): void\n}\n\nexport interface VirtualizerItemOptions {\n layoutInfo: LayoutInfo,\n virtualizer: IVirtualizer,\n ref: RefObject<HTMLElement>\n}\n\nexport function useVirtualizerItem(options: VirtualizerItemOptions) {\n let {layoutInfo, virtualizer, ref} = options;\n\n let updateSize = useCallback(() => {\n if (layoutInfo) {\n let size = getSize(ref.current);\n virtualizer.updateItemSize(layoutInfo.key, size);\n }\n }, [virtualizer, layoutInfo?.key, ref]);\n\n useLayoutEffect(() => {\n if (layoutInfo?.estimatedSize) {\n updateSize();\n }\n });\n\n return {updateSize};\n}\n\nfunction getSize(node: HTMLElement) {\n // Reset height before measuring so we get the intrinsic size\n let height = node.style.height;\n node.style.height = '';\n let size = new Size(node.scrollWidth, node.scrollHeight);\n node.style.height = height;\n return size;\n}\n"],"names":[],"version":3,"file":"useVirtualizerItem.module.js.map"}
|
|
1
|
+
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAiBM,SAAS,0CAAmB,OAA+B;IAChE,IAAI,cAAC,UAAU,eAAE,WAAW,OAAE,GAAG,EAAC,GAAG;IAErC,IAAI,aAAa,CAAA,GAAA,kBAAU,EAAE;QAC3B,IAAI,YAAY;YACd,IAAI,OAAO,8BAAQ,IAAI,OAAO;YAC9B,YAAY,cAAc,CAAC,WAAW,GAAG,EAAE;QAC7C;IACF,GAAG;QAAC;QAAa,uBAAA,iCAAA,WAAY,GAAG;QAAE;KAAI;IAEtC,CAAA,GAAA,sBAAc,EAAE;QACd,IAAI,uBAAA,iCAAA,WAAY,aAAa,EAC3B;IAEJ;IAEA,OAAO;oBAAC;IAAU;AACpB;AAEA,SAAS,8BAAQ,IAAiB;IAChC,6DAA6D;IAC7D,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM;IAC9B,KAAK,KAAK,CAAC,MAAM,GAAG;IACpB,IAAI,OAAO,IAAI,CAAA,GAAA,WAAG,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY;IACvD,KAAK,KAAK,CAAC,MAAM,GAAG;IACpB,OAAO;AACT","sources":["packages/@react-aria/virtualizer/src/useVirtualizerItem.ts"],"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 {Key} from '@react-types/shared';\nimport {LayoutInfo, Size} from '@react-stately/virtualizer';\nimport {RefObject, useCallback} from 'react';\nimport {useLayoutEffect} from '@react-aria/utils';\n\ninterface IVirtualizer {\n updateItemSize(key: Key, size: Size): void\n}\n\nexport interface VirtualizerItemOptions {\n layoutInfo: LayoutInfo,\n virtualizer: IVirtualizer,\n ref: RefObject<HTMLElement | null>\n}\n\nexport function useVirtualizerItem(options: VirtualizerItemOptions) {\n let {layoutInfo, virtualizer, ref} = options;\n\n let updateSize = useCallback(() => {\n if (layoutInfo) {\n let size = getSize(ref.current);\n virtualizer.updateItemSize(layoutInfo.key, size);\n }\n }, [virtualizer, layoutInfo?.key, ref]);\n\n useLayoutEffect(() => {\n if (layoutInfo?.estimatedSize) {\n updateSize();\n }\n });\n\n return {updateSize};\n}\n\nfunction getSize(node: HTMLElement) {\n // Reset height before measuring so we get the intrinsic size\n let height = node.style.height;\n node.style.height = '';\n let size = new Size(node.scrollWidth, node.scrollHeight);\n node.style.height = height;\n return size;\n}\n"],"names":[],"version":3,"file":"useVirtualizerItem.module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/virtualizer",
|
|
3
|
-
"version": "3.10.2-nightly.
|
|
3
|
+
"version": "3.10.2-nightly.4683+4e3af379e",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-aria/i18n": "3.0.0-nightly.
|
|
26
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
|
27
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
28
|
-
"@react-stately/virtualizer": "3.7.2-nightly.
|
|
29
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
25
|
+
"@react-aria/i18n": "3.0.0-nightly.2971+4e3af379e",
|
|
26
|
+
"@react-aria/interactions": "3.0.0-nightly.2971+4e3af379e",
|
|
27
|
+
"@react-aria/utils": "3.0.0-nightly.2971+4e3af379e",
|
|
28
|
+
"@react-stately/virtualizer": "3.7.2-nightly.4683+4e3af379e",
|
|
29
|
+
"@react-types/shared": "3.0.0-nightly.2971+4e3af379e",
|
|
30
30
|
"@swc/helpers": "^0.5.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0",
|
|
34
|
-
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
33
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0",
|
|
34
|
+
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "4e3af379e569faac3b374e0ed5a98b2a19cd92c3"
|
|
40
40
|
}
|