vlist 2.0.5 → 2.1.1

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.github.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # vlist
2
2
 
3
- The virtual list library for every framework. Ultra efficient, batteries-included, and accessible with composable plugins — in 7.9 KB.
3
+ The virtual list library for every framework. Ultra efficient, batteries-included, and accessible with composable plugins — in 8.0 KB.
4
4
 
5
- **v2.0.5** — [Changelog](./CHANGELOG.md) · **v2 is a ground-up rewrite** with a new plugin API. Coming from v1? See [Migration Guide](https://vlist.io/docs/migration).
5
+ **v2.1.1** — [Changelog](./CHANGELOG.md) · Native groups + table + data + grid cross-plugin integration, pixel-perfect snapshot restore, keyboard nav fixes.
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/vlist.svg)](https://www.npmjs.com/package/vlist)
8
8
  [![bundle size](https://img.shields.io/bundlephobia/minzip/vlist)](https://bundlephobia.com/package/vlist)
@@ -11,9 +11,9 @@ The virtual list library for every framework. Ultra efficient, batteries-include
11
11
 
12
12
  - **Accessible** — WAI-ARIA, 2D keyboard navigation, focus recovery, screen-reader DOM ordering
13
13
  - **Zero dependencies** — framework-agnostic core with tiny adapters for Vue, Svelte, Solid, React
14
- - **7.9 KB gzipped** — composable plugins with perfect tree-shaking
14
+ - **8.0 KB gzipped** — composable plugins with perfect tree-shaking
15
15
  - **Constant memory** — ~0.1 MB overhead at any scale, from 10K to 1M+ items
16
- - **Grid, masonry, table, groups, data, selection, sortable, transition, scale** — all opt-in
16
+ - **Tree, grid, masonry, table, groups, data, selection, sortable, transition, scale** — all opt-in
17
17
  - **Axis-neutral** — vertical and horizontal scrolling through a single code path, all plugins work in both orientations
18
18
 
19
19
  **18 interactive examples, docs & benchmarks → [vlist.io](https://vlist.io)**
@@ -94,16 +94,17 @@ const list = createVList({
94
94
 
95
95
  | Plugin | Size | Description |
96
96
  |--------|------|-------------|
97
- | **Base** | 7.9 KB | Virtualization, ARIA, keyboard nav, gap, padding |
98
- | `data()` | +4.6 KB | Lazy loading with velocity-aware fetching |
99
- | `selection()` | +2.4 KB | Single/multiple selection with 2D keyboard nav |
97
+ | **Base** | 8.0 KB | Virtualization, ARIA, keyboard nav, gap, padding |
98
+ | `data()` | +4.7 KB | Lazy loading with velocity-aware fetching |
99
+ | `selection()` | +2.5 KB | Single/multiple selection with 2D keyboard nav |
100
100
  | `scale()` | +3.9 KB | 1M+ items via scroll compression |
101
- | `groups()` | +3.7 KB | Sticky/inline headers with async group discovery |
101
+ | `groups()` | +4.8 KB | Sticky/inline headers with grid + table + data integration |
102
102
  | `autosize()` | +0.8 KB | Auto-measure items via ResizeObserver |
103
103
  | `scrollbar()` | +2.0 KB | Custom scrollbar UI |
104
- | `grid()` | +2.7 KB | 2D grid layout |
105
- | `masonry()` | +3.6 KB | Pinterest-style masonry with lane-aware keyboard nav |
104
+ | `grid()` | +2.8 KB | 2D grid layout |
105
+ | `masonry()` | +3.7 KB | Pinterest-style masonry with lane-aware keyboard nav |
106
106
  | `table()` | +6.1 KB | Data table with columns, resize, sort |
107
+ | `tree()` | +5.3 KB | Collapsible tree with async loading and indent guides |
107
108
  | `page()` | +0.8 KB | Window-level scrolling |
108
109
  | `sortable()` | +2.9 KB | Drag-and-drop reordering with auto-scroll |
109
110
  | `snapshots()` | +1.3 KB | Scroll position save/restore |
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # vlist
2
2
 
3
- The virtual list library for every framework. Ultra efficient, batteries-included, and accessible with composable plugins — in 7.9 KB.
3
+ The virtual list library for every framework. Ultra efficient, batteries-included, and accessible with composable plugins — in 8.0 KB.
4
4
 
5
- **v2.0.5** — [Changelog](https://github.com/floor/vlist/blob/main/CHANGELOG.md) · **v2 is a ground-up rewrite** with a new plugin API. Coming from v1? See [Migration Guide](https://vlist.io/docs/migration).
5
+ **v2.1.0** — [Changelog](https://github.com/floor/vlist/blob/main/CHANGELOG.md) · **New:** [`tree()`](https://vlist.io/docs/plugins/tree) plugin virtualized collapsible trees with async loading, indent guides, and WAI-ARIA treeview keyboard nav.
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/vlist.svg)](https://www.npmjs.com/package/vlist)
8
8
  [![bundle size](https://img.shields.io/bundlephobia/minzip/vlist)](https://bundlephobia.com/package/vlist)
@@ -11,7 +11,7 @@ The virtual list library for every framework. Ultra efficient, batteries-include
11
11
 
12
12
  - **Accessible** — WAI-ARIA, 2D keyboard navigation, focus recovery, screen-reader DOM ordering
13
13
  - **Zero dependencies** — framework-agnostic core, tiny adapters for Vue, Svelte, Solid, React
14
- - **7.9 KB gzipped** — composable plugins with perfect tree-shaking
14
+ - **8.0 KB gzipped** — composable plugins with perfect tree-shaking
15
15
  - **Constant memory** — ~0.1 MB overhead at any scale, from 10K to 1M+ items
16
16
  - **Axis-neutral** — vertical and horizontal scrolling through a single code path, all plugins work in both orientations
17
17
 
@@ -99,6 +99,7 @@ export interface PluginContext<T extends VListItem = VListItem> {
99
99
  setRemoveItemFn(fn: (id: string | number) => number): void;
100
100
  setInsertItemFn(fn: (item: T, index: number) => void): void;
101
101
  setUpdateItemFn(fn: (id: string | number, updates: Partial<T>) => boolean): void;
102
+ setGetIndexByIdFn(fn: (id: string | number) => number): void;
102
103
  getRenderedElement(index: number): HTMLElement | null;
103
104
  setNavConfig(config: {
104
105
  total?: () => number;
package/dist/index.d.ts CHANGED
@@ -27,18 +27,20 @@ export { autosize } from "./plugins/autosize";
27
27
  export type { AutosizePluginConfig } from "./plugins/autosize";
28
28
  export { masonry } from "./plugins/masonry";
29
29
  export type { MasonryPluginConfig } from "./plugins/masonry";
30
- export { data } from "./plugins/async";
31
- export type { DataPluginConfig } from "./plugins/async";
30
+ export { data } from "./plugins/data";
31
+ export type { DataPluginConfig } from "./plugins/data";
32
32
  export { groups } from "./plugins/groups";
33
33
  export type { GroupsPluginConfig } from "./plugins/groups";
34
34
  export { table } from "./plugins/table";
35
35
  export type { TablePluginConfig } from "./plugins/table";
36
36
  export { sortable } from "./plugins/sortable";
37
37
  export type { SortablePluginConfig } from "./plugins/sortable";
38
+ export { tree } from "./plugins/tree";
39
+ export type { TreePluginConfig, FlatNode } from "./plugins/tree";
38
40
  export { createStats } from "./utils/stats";
39
41
  export type { Stats, StatsConfig, StatsState } from "./utils/stats";
40
42
  export { rebuild } from "./utils/rebuild";
41
43
  export type { RebuildOptions } from "./utils/rebuild";
42
- export type { VListItem, VListEvents, ItemConfig, ItemTemplate, ItemState, SelectionMode, SelectionConfig, SelectionState, ScrollbarConfig, ScrollbarPadding, ScrollbarOptions, ScrollConfig, ScrollToOptions, ScrollSnapshot, VListAdapter, AdapterParams, AdapterResponse, Range, ViewportState, EventHandler, Unsubscribe, GridConfig, MasonryConfig, GroupsConfig, GroupHeaderConfig, GridSizeContext, GridHeightContext, } from "./types";
44
+ export type { VListItem, VListEvents, ItemConfig, ItemTemplate, ItemState, SelectionMode, SelectionConfig, SelectionState, ScrollbarConfig, ScrollbarPadding, ScrollbarOptions, ScrollConfig, ScrollToOptions, ScrollSnapshot, VListAdapter, AdapterParams, AdapterResponse, Range, ViewportState, EventHandler, Unsubscribe, GridConfig, MasonryConfig, GroupsConfig, GroupHeaderConfig, GridSizeContext, GridHeightContext, TreeState, } from "./types";
43
45
  export type { Axis, AxisConfig, VList, VListPlugin, PluginContext, CreateVListConfig, CompiledHooks, ResolvedConfig, DOMStructure, ElementPool, } from "./core/types";
44
46
  //# sourceMappingURL=index.d.ts.map