virtua 0.49.3 → 0.50.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/README.md +39 -5
- package/lib/angular/ListItem.d.ts +1 -0
- package/lib/angular/VList.d.ts +85 -0
- package/lib/angular/Virtualizer.d.ts +141 -0
- package/lib/angular/WindowVirtualizer.d.ts +103 -0
- package/lib/angular/index.d.ts +6 -0
- package/lib/angular/index.js +1148 -0
- package/lib/angular/index.js.map +1 -0
- package/lib/angular/utils.d.ts +19 -0
- package/lib/core/index.cjs +237 -233
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.d.ts +6 -6
- package/lib/core/index.js +272 -272
- package/lib/core/index.js.map +1 -1
- package/lib/index.cjs +529 -499
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +321 -315
- package/lib/index.js.map +1 -1
- package/lib/react/VGrid.d.ts +2 -2
- package/lib/react/VList.d.ts +3 -3
- package/lib/react/Virtualizer.d.ts +3 -3
- package/lib/react/WindowVirtualizer.d.ts +3 -3
- package/lib/react/index.d.ts +9 -9
- package/lib/react/types.d.ts +1 -1
- package/lib/solid/VList.d.ts +3 -6
- package/lib/solid/Virtualizer.d.ts +2 -5
- package/lib/solid/WindowVirtualizer.d.ts +2 -5
- package/lib/solid/index.cjs +331 -323
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.d.ts +7 -7
- package/lib/solid/index.js +249 -257
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +1224 -1566
- package/lib/solid/index.jsx.map +1 -1
- package/lib/solid/types.d.ts +1 -1
- package/lib/svelte/VList.type.d.ts +2 -2
- package/lib/svelte/Virtualizer.type.d.ts +4 -4
- package/lib/svelte/WindowVirtualizer.type.d.ts +2 -2
- package/lib/svelte/index.d.ts +6 -6
- package/lib/svelte/index.js +4 -4
- package/lib/svelte/types.d.ts +1 -1
- package/lib/svelte/utils.js +11 -11
- package/lib/svelte/utils.js.map +1 -1
- package/lib/vue/VList.d.ts +2 -3
- package/lib/vue/Virtualizer.d.ts +3 -4
- package/lib/vue/WindowVirtualizer.d.ts +2 -3
- package/lib/vue/index.cjs +327 -317
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.d.ts +6 -6
- package/lib/vue/index.js +284 -284
- package/lib/vue/index.js.map +1 -1
- package/lib/vue/utils.d.ts +1 -1
- package/package.json +39 -16
- package/lib/svelte/index.js.map +0 -1
package/lib/svelte/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module svelte
|
|
3
3
|
*/
|
|
4
|
-
export { default as VList } from
|
|
5
|
-
export type { VListProps, VListHandle } from
|
|
6
|
-
export { default as Virtualizer } from
|
|
7
|
-
export type { VirtualizerProps, VirtualizerHandle, } from
|
|
8
|
-
export { default as WindowVirtualizer } from
|
|
9
|
-
export type { WindowVirtualizerProps } from
|
|
4
|
+
export { default as VList } from './VList.svelte';
|
|
5
|
+
export type { VListProps, VListHandle } from './VList.type.js';
|
|
6
|
+
export { default as Virtualizer } from './Virtualizer.svelte';
|
|
7
|
+
export type { VirtualizerProps, VirtualizerHandle, } from './Virtualizer.type.js';
|
|
8
|
+
export { default as WindowVirtualizer } from './WindowVirtualizer.svelte';
|
|
9
|
+
export type { WindowVirtualizerProps } from './WindowVirtualizer.type.js';
|
package/lib/svelte/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import VList from "./VList.svelte";
|
|
2
|
+
import Virtualizer from "./Virtualizer.svelte";
|
|
3
|
+
import WindowVirtualizer from "./WindowVirtualizer.svelte";
|
|
4
|
+
export { VList, Virtualizer, WindowVirtualizer };
|
package/lib/svelte/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HTMLAttributes, AriaAttributes } from 'svelte/elements';
|
|
2
2
|
export type ViewportComponentAttributes = Pick<HTMLAttributes<HTMLElement>, "class" | "style" | "id" | "role" | "tabindex"> & AriaAttributes;
|
package/lib/svelte/utils.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}, "");
|
|
1
|
+
//#region src/svelte/utils.ts
|
|
2
|
+
var styleToString = (obj) => {
|
|
3
|
+
return Object.keys(obj).reduce((acc, k) => {
|
|
4
|
+
const value = obj[k];
|
|
5
|
+
if (value == null) return acc;
|
|
6
|
+
return acc + `${k}:${value};`;
|
|
7
|
+
}, "");
|
|
9
8
|
};
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
var defaultGetKey = (_data, i) => "_" + i;
|
|
10
|
+
//#endregion
|
|
12
11
|
export { defaultGetKey, styleToString };
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=utils.js.map
|
package/lib/svelte/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/svelte/utils.ts"],"sourcesContent":["export 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 defaultGetKey = (_data: unknown, i: number) => \"_\" + i;\n\n/**\n * @internal\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":";AAAA,IAAa,iBACX,QACW;CACX,OAAO,OAAO,KAAK,GAAG,EAAE,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,iBAAiB,OAAgB,MAAc,MAAM"}
|
package/lib/vue/VList.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { VirtualizerProps, type VirtualizerHandle } from "./Virtualizer.js";
|
|
1
|
+
import { VNode, PublicProps } from 'vue';
|
|
2
|
+
import { VirtualizerProps, VirtualizerHandle } from './Virtualizer.js';
|
|
4
3
|
/**
|
|
5
4
|
* Methods of {@link VList}.
|
|
6
5
|
*/
|
package/lib/vue/Virtualizer.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { type ItemProps } from "./utils.js";
|
|
1
|
+
import { VNode, PublicProps, NativeElements } from 'vue';
|
|
2
|
+
import { ScrollToIndexOpts, CacheSnapshot } from '../core/index.js';
|
|
3
|
+
import { ItemProps } from './utils.js';
|
|
5
4
|
/**
|
|
6
5
|
* Props of {@link Virtualizer}.
|
|
7
6
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { type ScrollToIndexOpts, type CacheSnapshot } from "../core/index.js";
|
|
1
|
+
import { VNode, NativeElements, PublicProps } from 'vue';
|
|
2
|
+
import { ScrollToIndexOpts, CacheSnapshot } from '../core/index.js';
|
|
4
3
|
/**
|
|
5
4
|
* Props of {@link WindowVirtualizer}.
|
|
6
5
|
*/
|