vlist 3.0.0 → 3.0.1-next.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 +25 -25
- package/README.md +25 -25
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/constants.d.ts +0 -16
- package/dist/core/adapter.d.ts +3 -3
- package/dist/core/create.d.ts +10 -5
- package/dist/core/fold.d.ts +3 -3
- package/dist/core/logical.d.ts +93 -0
- package/dist/core/runway.d.ts +20 -106
- package/dist/core/state.d.ts +2 -2
- package/dist/core/types.d.ts +4 -2
- package/dist/index.js +1 -1
- package/dist/internals.js +1 -1
- package/dist/plugins/carousel/plugin.d.ts +2 -3
- package/dist/size.json +1 -1
- package/dist/synthetic/driver.d.ts +26 -0
- package/dist/synthetic/handler.d.ts +4 -4
- package/dist/synthetic-driver.js +1 -0
- package/dist/synthetic.d.ts +7 -0
- package/dist/synthetic.js +1 -1
- package/dist/types.d.ts +22 -3
- package/dist/version.json +1 -0
- package/package.json +3 -2
package/README.github.md
CHANGED
|
@@ -11,7 +11,7 @@ The virtual list library for every framework. Ultra efficient, batteries-include
|
|
|
11
11
|
|
|
12
12
|
- **Accessible** — `a11y()` or a selection mode adds 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
|
-
- **10.
|
|
14
|
+
- **10.3 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, carousel, table, groups, data, selection, search, sortable, transition** — all opt-in
|
|
17
17
|
- **Axis-neutral** — vertical and horizontal scrolling through a single code path, all plugins work in both orientations
|
|
@@ -172,35 +172,35 @@ The touch-only `.vlist-item--touch-sort` class suppresses selection and callouts
|
|
|
172
172
|
| Flat `PluginContext` members (`registerMethod`, `forceRender`, `sizeCache`, `scrollTo`, …) | Grouped by capability: `ctx.hooks.method`, `ctx.render.force`, `ctx.sizes.cache`, `ctx.scroll.to`, `ctx.items.all`. `pool`, `config`, `emitter`, `template` and `getState()` stay at the top level. |
|
|
173
173
|
| `scale()` and `ScalePluginConfig` | Remove them; use `vlist/synthetic` for the full logical range. Config no longer installs a scale stub. |
|
|
174
174
|
|
|
175
|
-
Removed mode/runway options throw a migration error before creating DOM. `vlist/config` wires only what the config asks for: `selection`, the custom scrollbar, `snapshots` and `a11y` are each opt-in, so an adapter list matches a core list built from the same options. It keeps the scrollbar options convenience and its top-level `scrollbar: "none"`; pass `scrollbar: true` for the overlay scrollbar earlier versions added to every list. `baseOffset` stays private engine state; plugins use `ctx.scroll.getRenderOrigin()`. Custom wrap providers
|
|
175
|
+
Removed mode/runway options throw a migration error before creating DOM. `vlist/config` wires only what the config asks for: `selection`, the custom scrollbar, `snapshots` and `a11y` are each opt-in, so an adapter list matches a core list built from the same options. It keeps the scrollbar options convenience and its top-level `scrollbar: "none"`; pass `scrollbar: true` for the overlay scrollbar earlier versions added to every list. `baseOffset` stays private engine state; plugins use `ctx.scroll.getRenderOrigin()`. Custom wrap providers supply their handler factory as the second argument of `ctx.scroll.setWrap` (named `setBoundedWrap` in 3.0.0, still accepted).
|
|
176
176
|
|
|
177
177
|
## Plugins
|
|
178
178
|
|
|
179
179
|
| Entry / export | Minified | Gzipped |
|
|
180
180
|
|---|---:|---:|
|
|
181
|
-
| **Base (`vlist`)** | 27.
|
|
182
|
-
| `vlist/synthetic` |
|
|
183
|
-
| `vlist/native` (alias) | 27.
|
|
184
|
-
| `a11y()` |
|
|
185
|
-
| `selection()` | 36.
|
|
186
|
-
| `data()` | 40.
|
|
187
|
-
| `scrollbar()` | 35.
|
|
188
|
-
| `sortable()` |
|
|
189
|
-
| `groups()` | 43.
|
|
190
|
-
| `page()` | 29.
|
|
191
|
-
| `snapshots()` | 30.
|
|
192
|
-
| `transition()` |
|
|
193
|
-
| `autosize()` | 30.
|
|
194
|
-
| `grid()` | 34.
|
|
195
|
-
| `table()` | 45.
|
|
196
|
-
| `masonry()` | 39.
|
|
197
|
-
| `tree()` | 43.
|
|
198
|
-
| `search()` | 36.
|
|
199
|
-
| `carousel()` |
|
|
200
|
-
| `vlist/synthetic` + `carousel()` |
|
|
201
|
-
| `vlist/synthetic` + `sortable()` |
|
|
202
|
-
|
|
203
|
-
Sizes are tree-shaken totals from `bun run size`, not additive plugin costs. Plugin rows include the native default factory plus that plugin. The base is **10,
|
|
181
|
+
| **Base (`vlist`)** | 27.3 KB | 10.3 KB |
|
|
182
|
+
| `vlist/synthetic` | 34.2 KB | 12.9 KB |
|
|
183
|
+
| `vlist/native` (alias) | 27.3 KB | 10.3 KB |
|
|
184
|
+
| `a11y()` | 31.2 KB | 11.7 KB |
|
|
185
|
+
| `selection()` | 36.9 KB | 13.2 KB |
|
|
186
|
+
| `data()` | 40.9 KB | 15.1 KB |
|
|
187
|
+
| `scrollbar()` | 35.5 KB | 13.2 KB |
|
|
188
|
+
| `sortable()` | 39.2 KB | 13.9 KB |
|
|
189
|
+
| `groups()` | 43.4 KB | 15.7 KB |
|
|
190
|
+
| `page()` | 29.8 KB | 11.2 KB |
|
|
191
|
+
| `snapshots()` | 30.6 KB | 11.4 KB |
|
|
192
|
+
| `transition()` | 34.0 KB | 12.3 KB |
|
|
193
|
+
| `autosize()` | 30.6 KB | 11.4 KB |
|
|
194
|
+
| `grid()` | 34.7 KB | 12.9 KB |
|
|
195
|
+
| `table()` | 45.8 KB | 16.2 KB |
|
|
196
|
+
| `masonry()` | 39.4 KB | 14.7 KB |
|
|
197
|
+
| `tree()` | 43.5 KB | 15.7 KB |
|
|
198
|
+
| `search()` | 36.8 KB | 13.6 KB |
|
|
199
|
+
| `carousel()` | 42.2 KB | 15.4 KB |
|
|
200
|
+
| `vlist/synthetic` + `carousel()` | 48.3 KB | 17.7 KB |
|
|
201
|
+
| `vlist/synthetic` + `sortable()` | 46.1 KB | 16.5 KB |
|
|
202
|
+
|
|
203
|
+
Sizes are tree-shaken totals from `bun run size`, not additive plugin costs. Plugin rows include the native default factory plus that plugin. The base is **10,531 bytes gzipped**, within the 10.3 KB budget (10,547 bytes). `bun run size` fails if a scenario fails to build, an unused plugin leaks into a bundle, or any published size exceeds its gzip budget. Synthetic input is **13,172 bytes** before plugins; with `scroll.mode`, a `vlist` list downloads the driver and its scrollbar as `synthetic-driver.js` (6.2 KB gzipped) only when it goes synthetic. The alias row measures the same source factory; the distributed alias re-exports it without duplicating the implementation.
|
|
204
204
|
|
|
205
205
|
## Examples
|
|
206
206
|
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ The virtual list library for every framework. Ultra efficient, batteries-include
|
|
|
11
11
|
|
|
12
12
|
- **Accessible** — `a11y()` or a selection mode adds 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
|
-
- **10.
|
|
14
|
+
- **10.3 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
|
|
|
@@ -118,35 +118,35 @@ The touch-only `.vlist-item--touch-sort` class suppresses selection and callouts
|
|
|
118
118
|
| `PluginContext.setScrollFns`, `disableDefaultScroll` | Use `setScrollSource` to supply an external position source and commit callback. |
|
|
119
119
|
| `scale()` and `ScalePluginConfig` | Remove them; use `vlist/synthetic` for the full logical range. Config no longer installs a scale stub. |
|
|
120
120
|
|
|
121
|
-
Removed mode/runway options throw a migration error before creating DOM. `vlist/config` wires only what the config asks for: `selection`, the custom scrollbar, `snapshots` and `a11y` are each opt-in, so an adapter list matches a core list built from the same options. It keeps the scrollbar options convenience and its top-level `scrollbar: "none"`; pass `scrollbar: true` for the overlay scrollbar earlier versions added to every list. `baseOffset` stays private engine state; plugins use `ctx.scroll.getRenderOrigin()`. Custom wrap providers
|
|
121
|
+
Removed mode/runway options throw a migration error before creating DOM. `vlist/config` wires only what the config asks for: `selection`, the custom scrollbar, `snapshots` and `a11y` are each opt-in, so an adapter list matches a core list built from the same options. It keeps the scrollbar options convenience and its top-level `scrollbar: "none"`; pass `scrollbar: true` for the overlay scrollbar earlier versions added to every list. `baseOffset` stays private engine state; plugins use `ctx.scroll.getRenderOrigin()`. Custom wrap providers supply their handler factory as the second argument of `ctx.scroll.setWrap` (named `setBoundedWrap` in 3.0.0, still accepted).
|
|
122
122
|
|
|
123
123
|
## Plugins
|
|
124
124
|
|
|
125
125
|
| Entry / export | Minified | Gzipped |
|
|
126
126
|
|---|---:|---:|
|
|
127
|
-
| **Base (`vlist`)** | 27.
|
|
128
|
-
| `vlist/synthetic` |
|
|
129
|
-
| `vlist/native` (alias) | 27.
|
|
130
|
-
| `a11y()` |
|
|
131
|
-
| `selection()` | 36.
|
|
132
|
-
| `data()` | 40.
|
|
133
|
-
| `scrollbar()` | 35.
|
|
134
|
-
| `sortable()` |
|
|
135
|
-
| `groups()` | 43.
|
|
136
|
-
| `page()` | 29.
|
|
137
|
-
| `snapshots()` | 30.
|
|
138
|
-
| `transition()` |
|
|
139
|
-
| `autosize()` | 30.
|
|
140
|
-
| `grid()` | 34.
|
|
141
|
-
| `table()` | 45.
|
|
142
|
-
| `masonry()` | 39.
|
|
143
|
-
| `tree()` | 43.
|
|
144
|
-
| `search()` | 36.
|
|
145
|
-
| `carousel()` |
|
|
146
|
-
| `vlist/synthetic` + `carousel()` |
|
|
147
|
-
| `vlist/synthetic` + `sortable()` |
|
|
148
|
-
|
|
149
|
-
Sizes are tree-shaken totals from `bun run size`, not additive plugin costs. Plugin rows include the native default factory plus that plugin. The base is **10,
|
|
127
|
+
| **Base (`vlist`)** | 27.3 KB | 10.3 KB |
|
|
128
|
+
| `vlist/synthetic` | 34.2 KB | 12.9 KB |
|
|
129
|
+
| `vlist/native` (alias) | 27.3 KB | 10.3 KB |
|
|
130
|
+
| `a11y()` | 31.2 KB | 11.7 KB |
|
|
131
|
+
| `selection()` | 36.9 KB | 13.2 KB |
|
|
132
|
+
| `data()` | 40.9 KB | 15.1 KB |
|
|
133
|
+
| `scrollbar()` | 35.5 KB | 13.2 KB |
|
|
134
|
+
| `sortable()` | 39.2 KB | 13.9 KB |
|
|
135
|
+
| `groups()` | 43.4 KB | 15.7 KB |
|
|
136
|
+
| `page()` | 29.8 KB | 11.2 KB |
|
|
137
|
+
| `snapshots()` | 30.6 KB | 11.4 KB |
|
|
138
|
+
| `transition()` | 34.0 KB | 12.3 KB |
|
|
139
|
+
| `autosize()` | 30.6 KB | 11.4 KB |
|
|
140
|
+
| `grid()` | 34.7 KB | 12.9 KB |
|
|
141
|
+
| `table()` | 45.8 KB | 16.2 KB |
|
|
142
|
+
| `masonry()` | 39.4 KB | 14.7 KB |
|
|
143
|
+
| `tree()` | 43.5 KB | 15.7 KB |
|
|
144
|
+
| `search()` | 36.8 KB | 13.6 KB |
|
|
145
|
+
| `carousel()` | 42.2 KB | 15.4 KB |
|
|
146
|
+
| `vlist/synthetic` + `carousel()` | 48.3 KB | 17.7 KB |
|
|
147
|
+
| `vlist/synthetic` + `sortable()` | 46.1 KB | 16.5 KB |
|
|
148
|
+
|
|
149
|
+
Sizes are tree-shaken totals from `bun run size`, not additive plugin costs. Plugin rows include the native default factory plus that plugin. The base is **10,531 bytes gzipped**, within the 10.3 KB budget (10,547 bytes). `bun run size` fails if a scenario fails to build, an unused plugin leaks into a bundle, or any published size exceeds its gzip budget. Synthetic input is **13,172 bytes** before plugins; with `scroll.mode`, a `vlist` list downloads the driver and its scrollbar as `synthetic-driver.js` (6.2 KB gzipped) only when it goes synthetic. The alias row measures the same source factory; the distributed alias re-exports it without duplicating the implementation.
|
|
150
150
|
|
|
151
151
|
## Framework Adapters
|
|
152
152
|
|
package/dist/config.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export type VListFactory<T extends VListItem = VListItem> = typeof createVList<T
|
|
|
41
41
|
* translated into plugins by {@link resolvePlugins}.
|
|
42
42
|
*/
|
|
43
43
|
export interface VListConfig<T extends VListItem = VListItem> extends Omit<CreateVListConfig<T>, "container" | "scroll"> {
|
|
44
|
-
/** Scroll options;
|
|
44
|
+
/** Scroll options; `scroll.mode` chooses native, synthetic or auto input. */
|
|
45
45
|
scroll?: ScrollConfig;
|
|
46
46
|
/** List factory; defaults to core createVList. Fixed for this instance. */
|
|
47
47
|
factory?: VListFactory<T>;
|