vlist 2.0.3 → 2.0.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.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.7 KB.
3
+ The virtual list library for every framework. Ultra efficient, batteries-included, and accessible with composable plugins — in 7.9 KB.
4
4
 
5
- **v2.0.3** — [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.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).
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 with tiny adapters for Vue, Svelte, Solid, React
14
- - **7.7 KB gzipped** — composable plugins with perfect tree-shaking
14
+ - **7.9 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
  - **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
@@ -94,16 +94,16 @@ const list = createVList({
94
94
 
95
95
  | Plugin | Size | Description |
96
96
  |--------|------|-------------|
97
- | **Base** | 7.7 KB | Virtualization, ARIA, keyboard nav, gap, padding |
98
- | `data()` | +4.7 KB | Lazy loading with velocity-aware fetching |
97
+ | **Base** | 7.9 KB | Virtualization, ARIA, keyboard nav, gap, padding |
98
+ | `data()` | +4.6 KB | Lazy loading with velocity-aware fetching |
99
99
  | `selection()` | +2.4 KB | Single/multiple selection with 2D keyboard nav |
100
100
  | `scale()` | +3.9 KB | 1M+ items via scroll compression |
101
101
  | `groups()` | +3.7 KB | Sticky/inline headers with async group discovery |
102
- | `autosize()` | +0.9 KB | Auto-measure items via ResizeObserver |
102
+ | `autosize()` | +0.8 KB | Auto-measure items via ResizeObserver |
103
103
  | `scrollbar()` | +2.0 KB | Custom scrollbar UI |
104
- | `grid()` | +2.1 KB | 2D grid layout |
105
- | `masonry()` | +3.5 KB | Pinterest-style masonry with lane-aware keyboard nav |
106
- | `table()` | +5.8 KB | Data table with columns, resize, sort |
104
+ | `grid()` | +2.7 KB | 2D grid layout |
105
+ | `masonry()` | +3.6 KB | Pinterest-style masonry with lane-aware keyboard nav |
106
+ | `table()` | +6.1 KB | Data table with columns, resize, sort |
107
107
  | `page()` | +0.8 KB | Window-level scrolling |
108
108
  | `sortable()` | +2.9 KB | Drag-and-drop reordering with auto-scroll |
109
109
  | `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.7 KB.
3
+ The virtual list library for every framework. Ultra efficient, batteries-included, and accessible with composable plugins — in 7.9 KB.
4
4
 
5
- **v2.0.3** — [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.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).
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.7 KB gzipped** — composable plugins with perfect tree-shaking
14
+ - **7.9 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
 
@@ -56,17 +56,17 @@ const list = createVList({ container: '#app', items, item: { height: 200, templa
56
56
 
57
57
  | Plugin | Size | Description |
58
58
  |--------|------|-------------|
59
- | **Base** | 7.7 KB | Virtualization, ARIA, keyboard nav, gap, padding |
60
- | `data()` | +4.7 KB | Lazy loading with velocity-aware fetching |
59
+ | **Base** | 7.9 KB | Virtualization, ARIA, keyboard nav, gap, padding |
60
+ | `data()` | +4.6 KB | Lazy loading with velocity-aware fetching |
61
61
  | `selection()` | +2.4 KB | Single/multiple selection with 2D keyboard nav |
62
62
  | `scale()` | +3.9 KB | 1M+ items via scroll compression |
63
63
  | `groups()` | +3.7 KB | Sticky/inline headers with async group discovery |
64
- | `autosize()` | +0.7 KB | Auto-measure items via ResizeObserver |
64
+ | `autosize()` | +0.8 KB | Auto-measure items via ResizeObserver |
65
65
  | `scrollbar()` | +2.0 KB | Custom scrollbar UI |
66
- | `grid()` | +2.1 KB | 2D grid layout |
67
- | `masonry()` | +3.5 KB | Pinterest-style masonry with lane-aware keyboard nav |
68
- | `table()` | +5.8 KB | Data table with columns, resize, sort |
69
- | `page()` | +0.7 KB | Window-level scrolling |
66
+ | `grid()` | +2.7 KB | 2D grid layout |
67
+ | `masonry()` | +3.6 KB | Pinterest-style masonry with lane-aware keyboard nav |
68
+ | `table()` | +6.1 KB | Data table with columns, resize, sort |
69
+ | `page()` | +0.8 KB | Window-level scrolling |
70
70
  | `sortable()` | +2.9 KB | Drag-and-drop reordering with auto-scroll |
71
71
  | `snapshots()` | +1.3 KB | Scroll position save/restore |
72
72
  | `transition()` | +1.8 KB | FLIP-based enter/exit animations for insert & remove |
@@ -3,6 +3,7 @@
3
3
  * Container resolution and DOM scaffold creation.
4
4
  */
5
5
  import type { DOMStructure } from "./types";
6
+ export declare function neutralizeFocusable(el: HTMLElement): void;
6
7
  export declare function resolveContainer(container: HTMLElement | string): HTMLElement;
7
- export declare function createDOMStructure(container: HTMLElement, classPrefix: string, isX: boolean, interactive: boolean, ariaLabel?: string): DOMStructure;
8
+ export declare function createDOMStructure(container: HTMLElement, classPrefix: string, isX: boolean, ariaLabel?: string): DOMStructure;
8
9
  //# sourceMappingURL=dom.d.ts.map
@@ -22,8 +22,8 @@ export interface RenderConfig {
22
22
  readonly replacedClass: string;
23
23
  readonly translateProp: "translateX(" | "translateY(";
24
24
  readonly sizeProp: "width" | "height";
25
- readonly itemRole: "option" | "listitem";
26
- readonly interactive: boolean;
25
+ itemRole: "option" | "listitem";
26
+ interactive: boolean;
27
27
  readonly startPadding: number;
28
28
  readonly gap: number;
29
29
  readonly hasCrossPad: boolean;
@@ -34,7 +34,7 @@ export interface RenderConfig {
34
34
  readonly oddClass: string;
35
35
  readonly emitter: Emitter<VListEvents> | null;
36
36
  }
37
- export declare function createRenderConfig(classPrefix: string, isX: boolean, interactive: boolean, startPadding: number, crossPadStart: number, crossPadEnd: number, oddClass: string, gap: number, emitter?: Emitter<VListEvents> | null): RenderConfig;
37
+ export declare function createRenderConfig(classPrefix: string, isX: boolean, startPadding: number, crossPadStart: number, crossPadEnd: number, oddClass: string, gap: number, emitter?: Emitter<VListEvents> | null): RenderConfig;
38
38
  /**
39
39
  * Calculate visible range and fill EngineState buffers.
40
40
  * Zero allocation — all writes go into pre-allocated TypedArrays.
@@ -36,7 +36,6 @@ export interface ResolvedConfig {
36
36
  readonly overscan: number;
37
37
  readonly reverse: boolean;
38
38
  readonly classPrefix: string;
39
- readonly interactive: boolean;
40
39
  readonly mainAxisPadding: number;
41
40
  readonly crossAxisPadding: number;
42
41
  readonly startPadding: number;
@@ -70,6 +69,7 @@ export interface PluginContext<T extends VListItem = VListItem> {
70
69
  registerClickHandler(handler: (event: MouseEvent) => void): void;
71
70
  registerKeydownHandler(handler: (event: KeyboardEvent) => void): void;
72
71
  registerDestroyHandler(handler: () => void): void;
72
+ enableListboxRole(): void;
73
73
  setSizeConfig(config: number | ((index: number) => number)): void;
74
74
  setScrollFns(get: () => number, set: (pos: number) => void): void;
75
75
  setVirtualTotalFn(fn: () => number): void;
@@ -172,7 +172,6 @@ export interface CreateVListConfig<T extends VListItem = VListItem> {
172
172
  classPrefix?: string;
173
173
  orientation?: "vertical" | "horizontal";
174
174
  padding?: number | [number, number] | [number, number, number, number];
175
- interactive?: boolean;
176
175
  reverse?: boolean;
177
176
  ariaLabel?: string;
178
177
  scroll?: {
package/dist/index.d.ts CHANGED
@@ -37,6 +37,8 @@ export { sortable } from "./plugins/sortable";
37
37
  export type { SortablePluginConfig } from "./plugins/sortable";
38
38
  export { createStats } from "./utils/stats";
39
39
  export type { Stats, StatsConfig, StatsState } from "./utils/stats";
40
+ export { rebuild } from "./utils/rebuild";
41
+ export type { RebuildOptions } from "./utils/rebuild";
40
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";
41
43
  export type { Axis, AxisConfig, VList, VListPlugin, PluginContext, CreateVListConfig, CompiledHooks, ResolvedConfig, DOMStructure, ElementPool, } from "./core/types";
42
44
  //# sourceMappingURL=index.d.ts.map