virtua 0.52.4 → 0.52.5
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/README.md +1 -1
- package/lib/svelte/utils.d.ts +5 -0
- package/lib/svelte/utils.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -433,7 +433,7 @@ This package uses [exports of package.json](https://nodejs.org/api/packages.html
|
|
|
433
433
|
| Horizontal scroll | ✅ | ✅ | ✅ | ✅ | 🟠 (needs customization) |
|
|
434
434
|
| Horizontal scroll in RTL direction | ✅ | ❌ | ✅ | ❌ | 🟠 (isRtl) |
|
|
435
435
|
| Grid (Virtualization for two dimensions) | ✅ (VGrid) | ❌ | ✅ ([Grid](https://react-window.vercel.app/grid/grid)) | ✅ ([Grid](https://github.com/bvaughn/react-virtualized/blob/master/docs/Grid.md)) | 🟠 (needs customization) |
|
|
436
|
-
| Tabular data (Columns with headers) | ✅ (VGrid) | ✅ (TableVirtuoso) |
|
|
436
|
+
| Tabular data (Columns with headers) | ✅ (VGrid) | ✅ (TableVirtuoso) | ✅ ([Supported](https://react-window.vercel.app/list/tabular-data)) | ✅ ([Table](https://github.com/bvaughn/react-virtualized/blob/master/docs/Table.md)) | 🟠 (needs customization) |
|
|
437
437
|
| HTML table element | 🟠 (needs customization) | ✅ (TableVirtuoso) | ❌ | ❌ | 🟠 (needs customization) |
|
|
438
438
|
| Masonry | ❌ | ✅ (VirtuosoMasonry) | ❌ | ✅ ([Masonry](https://github.com/bvaughn/react-virtualized/blob/master/docs/Masonry.md)) | 🟠 (needs customization) |
|
|
439
439
|
| Window scroller | ✅ (WindowVirtualizer) | ✅ | ❌ | ✅ ([WindowScroller](https://github.com/bvaughn/react-virtualized/blob/master/docs/WindowScroller.md)) | ✅ (useWindowVirtualizer) |
|
package/lib/svelte/utils.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import { ItemsRange } from '../core/index.js';
|
|
|
2
2
|
export declare const styleToString: (obj: Record<string, string | undefined>) => string;
|
|
3
3
|
export declare const isSameRange: (prev: ItemsRange, next: ItemsRange) => boolean;
|
|
4
4
|
export declare const defaultGetKey: (_data: unknown, i: number) => string;
|
|
5
|
+
export type ItemAttrs = {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
style?: Record<string, string | undefined>;
|
|
8
|
+
class?: string;
|
|
9
|
+
};
|
|
5
10
|
/**
|
|
6
11
|
* A function that provides properties/attributes for item element
|
|
7
12
|
*/
|
package/lib/svelte/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../src/svelte/utils.ts"],"sourcesContent":["import type { ItemsRange } from \"../core/index.js\";\n\nexport const styleToString = (\n obj: Record<string, string | undefined>,\n): string => {\n return Object.keys(obj).reduce((acc, k) => {\n const value = obj[k];\n if (value == null) {\n return acc;\n }\n return acc + `${k}:${value};`;\n }, \"\");\n};\n\nexport const isSameRange = (prev: ItemsRange, next: ItemsRange): boolean => {\n return prev[0] === next[0] && prev[1] === next[1];\n};\n\nexport const defaultGetKey = (_data: unknown, i: number) => \"_\" + i;\n\
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/svelte/utils.ts"],"sourcesContent":["import type { ItemsRange } from \"../core/index.js\";\n\nexport const styleToString = (\n obj: Record<string, string | undefined>,\n): string => {\n return Object.keys(obj).reduce((acc, k) => {\n const value = obj[k];\n if (value == null) {\n return acc;\n }\n return acc + `${k}:${value};`;\n }, \"\");\n};\n\nexport const isSameRange = (prev: ItemsRange, next: ItemsRange): boolean => {\n return prev[0] === next[0] && prev[1] === next[1];\n};\n\nexport const defaultGetKey = (_data: unknown, i: number) => \"_\" + i;\n\nexport type ItemAttrs = {\n [key: string]: any;\n style?: Record<string, string | undefined>;\n class?: string;\n};\n\n/**\n * A function that provides properties/attributes for item element\n */\nexport type ItemProps<T = unknown> = (payload: {\n item: T;\n index: number;\n}) => ItemAttrs | undefined;\n"],"mappings":";AAEA,IAAa,iBACX,QACW;CACX,OAAO,OAAO,KAAK,GAAG,CAAC,CAAC,QAAQ,KAAK,MAAM;EACzC,MAAM,QAAQ,IAAI;EAClB,IAAI,SAAS,MACX,OAAO;EAET,OAAO,MAAM,GAAG,EAAE,GAAG,MAAM;CAC7B,GAAG,EAAE;AACP;AAEA,IAAa,eAAe,MAAkB,SAA8B;CAC1E,OAAO,KAAK,OAAO,KAAK,MAAM,KAAK,OAAO,KAAK;AACjD;AAEA,IAAa,iBAAiB,OAAgB,MAAc,MAAM"}
|
package/package.json
CHANGED