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.
Files changed (55) hide show
  1. package/README.md +39 -5
  2. package/lib/angular/ListItem.d.ts +1 -0
  3. package/lib/angular/VList.d.ts +85 -0
  4. package/lib/angular/Virtualizer.d.ts +141 -0
  5. package/lib/angular/WindowVirtualizer.d.ts +103 -0
  6. package/lib/angular/index.d.ts +6 -0
  7. package/lib/angular/index.js +1148 -0
  8. package/lib/angular/index.js.map +1 -0
  9. package/lib/angular/utils.d.ts +19 -0
  10. package/lib/core/index.cjs +237 -233
  11. package/lib/core/index.cjs.map +1 -1
  12. package/lib/core/index.d.ts +6 -6
  13. package/lib/core/index.js +272 -272
  14. package/lib/core/index.js.map +1 -1
  15. package/lib/index.cjs +529 -499
  16. package/lib/index.cjs.map +1 -1
  17. package/lib/index.d.ts +2 -2
  18. package/lib/index.js +321 -315
  19. package/lib/index.js.map +1 -1
  20. package/lib/react/VGrid.d.ts +2 -2
  21. package/lib/react/VList.d.ts +3 -3
  22. package/lib/react/Virtualizer.d.ts +3 -3
  23. package/lib/react/WindowVirtualizer.d.ts +3 -3
  24. package/lib/react/index.d.ts +9 -9
  25. package/lib/react/types.d.ts +1 -1
  26. package/lib/solid/VList.d.ts +3 -6
  27. package/lib/solid/Virtualizer.d.ts +2 -5
  28. package/lib/solid/WindowVirtualizer.d.ts +2 -5
  29. package/lib/solid/index.cjs +331 -323
  30. package/lib/solid/index.cjs.map +1 -1
  31. package/lib/solid/index.d.ts +7 -7
  32. package/lib/solid/index.js +249 -257
  33. package/lib/solid/index.js.map +1 -1
  34. package/lib/solid/index.jsx +1224 -1566
  35. package/lib/solid/index.jsx.map +1 -1
  36. package/lib/solid/types.d.ts +1 -1
  37. package/lib/svelte/VList.type.d.ts +2 -2
  38. package/lib/svelte/Virtualizer.type.d.ts +4 -4
  39. package/lib/svelte/WindowVirtualizer.type.d.ts +2 -2
  40. package/lib/svelte/index.d.ts +6 -6
  41. package/lib/svelte/index.js +4 -4
  42. package/lib/svelte/types.d.ts +1 -1
  43. package/lib/svelte/utils.js +11 -11
  44. package/lib/svelte/utils.js.map +1 -1
  45. package/lib/vue/VList.d.ts +2 -3
  46. package/lib/vue/Virtualizer.d.ts +3 -4
  47. package/lib/vue/WindowVirtualizer.d.ts +2 -3
  48. package/lib/vue/index.cjs +327 -317
  49. package/lib/vue/index.cjs.map +1 -1
  50. package/lib/vue/index.d.ts +6 -6
  51. package/lib/vue/index.js +284 -284
  52. package/lib/vue/index.js.map +1 -1
  53. package/lib/vue/utils.d.ts +1 -1
  54. package/package.json +39 -16
  55. package/lib/svelte/index.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * @module svelte
3
3
  */
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";
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';
@@ -1,4 +1,4 @@
1
- export { default as VList } from './VList.svelte';
2
- export { default as Virtualizer } from './Virtualizer.svelte';
3
- export { default as WindowVirtualizer } from './WindowVirtualizer.svelte';
4
- //# sourceMappingURL=index.js.map
1
+ import VList from "./VList.svelte";
2
+ import Virtualizer from "./Virtualizer.svelte";
3
+ import WindowVirtualizer from "./WindowVirtualizer.svelte";
4
+ export { VList, Virtualizer, WindowVirtualizer };
@@ -1,2 +1,2 @@
1
- import type { HTMLAttributes, AriaAttributes } from "svelte/elements";
1
+ import { HTMLAttributes, AriaAttributes } from 'svelte/elements';
2
2
  export type ViewportComponentAttributes = Pick<HTMLAttributes<HTMLElement>, "class" | "style" | "id" | "role" | "tabindex"> & AriaAttributes;
@@ -1,13 +1,13 @@
1
- const styleToString = (obj) => {
2
- return Object.keys(obj).reduce((acc, k) => {
3
- const value = obj[k];
4
- if (value == null) {
5
- return acc;
6
- }
7
- return acc + `${k}:${value};`;
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
- const defaultGetKey = (_data, i) => "_" + i;
11
-
9
+ var defaultGetKey = (_data, i) => "_" + i;
10
+ //#endregion
12
11
  export { defaultGetKey, styleToString };
13
- //# sourceMappingURL=utils.js.map
12
+
13
+ //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","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"],"names":[],"mappings":"AAAO,MAAM,aAAa,GAAG,CAC3B,GAAuC,KAC7B;AACV,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAI;AACxC,QAAA,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC;AACpB,QAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,YAAA,OAAO,GAAG;QACZ;AACA,QAAA,OAAO,GAAG,GAAG,CAAA,EAAG,CAAC,CAAA,CAAA,EAAI,KAAK,GAAG;IAC/B,CAAC,EAAE,EAAE,CAAC;AACR;AAEO,MAAM,aAAa,GAAG,CAAC,KAAc,EAAE,CAAS,KAAK,GAAG,GAAG;;;;"}
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"}
@@ -1,6 +1,5 @@
1
- /** @jsxImportSource vue */
2
- import { type VNode, type PublicProps } from "vue";
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
  */
@@ -1,7 +1,6 @@
1
- /** @jsxImportSource vue */
2
- import { type VNode, type PublicProps, type NativeElements } from "vue";
3
- import { type ScrollToIndexOpts, type CacheSnapshot } from "../core/index.js";
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
- /** @jsxImportSource vue */
2
- import { type VNode, type NativeElements, type PublicProps } from "vue";
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
  */