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 +11 -10
- package/README.md +3 -3
- package/dist/core/types.d.ts +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1 -1
- package/dist/internals.d.ts +1 -1
- package/dist/internals.js +1 -1
- package/dist/plugins/groups/sticky.d.ts +1 -1
- package/dist/plugins/tree/index.d.ts +3 -0
- package/dist/plugins/tree/layout.d.ts +28 -0
- package/dist/plugins/tree/plugin.d.ts +18 -0
- package/dist/plugins/tree/types.d.ts +38 -0
- package/dist/size.json +1 -1
- package/dist/types.d.ts +34 -0
- package/dist/vlist-table.css +1 -1
- package/dist/vlist-tree.css +1 -0
- package/package.json +3 -2
- /package/dist/plugins/{async → data}/index.d.ts +0 -0
- /package/dist/plugins/{async → data}/manager.d.ts +0 -0
- /package/dist/plugins/{async → data}/placeholder.d.ts +0 -0
- /package/dist/plugins/{async → data}/plugin.d.ts +0 -0
- /package/dist/plugins/{async → data}/sparse.d.ts +0 -0
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
|
|
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.
|
|
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
|
[](https://www.npmjs.com/package/vlist)
|
|
8
8
|
[](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
|
-
- **
|
|
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
|
+
- **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** |
|
|
98
|
-
| `data()` | +4.
|
|
99
|
-
| `selection()` | +2.
|
|
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()` | +
|
|
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.
|
|
105
|
-
| `masonry()` | +3.
|
|
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
|
|
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
|
+
**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
|
[](https://www.npmjs.com/package/vlist)
|
|
8
8
|
[](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
|
-
- **
|
|
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
|
|
package/dist/core/types.d.ts
CHANGED
|
@@ -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/
|
|
31
|
-
export type { DataPluginConfig } from "./plugins/
|
|
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
|