vlist 3.1.8 → 3.2.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.
- package/README.github.md +9 -3
- package/README.md +3 -3
- package/dist/config.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/carousel/plugin.d.ts +3 -0
- package/dist/plugins/masonry/plugin.d.ts +1 -1
- package/dist/plugins/table/plugin.d.ts +1 -1
- package/dist/plugins/table/types.d.ts +10 -0
- package/dist/size.json +1 -1
- package/dist/version.json +1 -1
- package/package.json +1 -1
package/README.github.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The virtual list library for every framework. Ultra efficient, batteries-included, and accessible with composable plugins.
|
|
4
4
|
|
|
5
|
-
**v3.
|
|
5
|
+
**v3.2.0** — `scroll.mode` on the one `vlist` entry: the default, `"auto"`, scrolls natively and hands a list past the browser's size limit to synthetic input, which draws its own scrollbar. Vue, Svelte, Solid and React entries in the package itself (`vlist/vue`, `vlist/svelte`, `vlist/solid`, `vlist/react`), feature-first and tree-shaken like the vanilla builder; the separate adapter packages are deprecated. See the [changelog](https://github.com/floor/vlist/blob/main/CHANGELOG.md).
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/vlist)
|
|
8
8
|
[](https://bundlephobia.com/package/vlist)
|
|
@@ -277,12 +277,12 @@ The touch-only `.vlist-item--touch-sort` class suppresses selection and callouts
|
|
|
277
277
|
| `snapshots()` | 30.6 KB | 11.4 KB |
|
|
278
278
|
| `transition()` | 34.1 KB | 12.3 KB |
|
|
279
279
|
| `autosize()` | 31.7 KB | 11.9 KB |
|
|
280
|
-
| `grid()` | 34.
|
|
280
|
+
| `grid()` | 34.8 KB | 12.9 KB |
|
|
281
281
|
| `table()` | 46.4 KB | 16.4 KB |
|
|
282
282
|
| `masonry()` | 39.4 KB | 14.7 KB |
|
|
283
283
|
| `tree()` | 43.1 KB | 15.6 KB |
|
|
284
284
|
| `search()` | 36.9 KB | 13.6 KB |
|
|
285
|
-
| `carousel()` | 43.
|
|
285
|
+
| `carousel()` | 43.3 KB | 15.8 KB |
|
|
286
286
|
| `vlist/synthetic` + `carousel()` | 49.3 KB | 18.1 KB |
|
|
287
287
|
| `vlist/synthetic` + `sortable()` | 46.1 KB | 16.5 KB |
|
|
288
288
|
| `vlist/vue` `useVList` | 27.7 KB | 10.5 KB |
|
|
@@ -336,6 +336,10 @@ cell, which sorts the column when it is sortable: give the control `tabindex`, o
|
|
|
336
336
|
Enter and Space emit `column:sort` on a sortable header and never `column:click`, so an action a
|
|
337
337
|
keyboard user must reach should be a `button` supplied in the header label.
|
|
338
338
|
|
|
339
|
+
A table's rows have a fixed height, so `autosize()` cannot be combined with `table()`;
|
|
340
|
+
the `vlist/config` route wires `autosize()` when only an estimate is given (`item.estimatedHeight`)
|
|
341
|
+
and throws at creation. Give the table a fixed `rowHeight` and the config a fixed `item.height` instead.
|
|
342
|
+
|
|
339
343
|
### Grid Layout
|
|
340
344
|
|
|
341
345
|
```typescript
|
|
@@ -608,6 +612,8 @@ list.remeasure(12); // Re-measure one item after its content changes.
|
|
|
608
612
|
list.remeasure(); // Invalidate all sizes and measure items as they render.
|
|
609
613
|
```
|
|
610
614
|
|
|
615
|
+
A measured item size cannot be combined with `masonry()`: masonry places items from the size cache it is handed at layout time, so an `autosize()` measurement never reaches the placements. The `vlist/config` route wires `autosize()` when only an estimate is given (`item.estimatedHeight`) and throws at creation; give the items a fixed `item.height` instead. The same holds for `carousel()`, whose slide steps are built from the size read at setup.
|
|
616
|
+
|
|
611
617
|
Full configuration reference → **[vlist.io](https://vlist.io)**
|
|
612
618
|
|
|
613
619
|
## Base Configuration
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The virtual list library for every framework. Ultra efficient, batteries-included, and accessible with composable plugins.
|
|
4
4
|
|
|
5
|
-
**v3.
|
|
5
|
+
**v3.2.0** — `scroll.mode` on the one `vlist` entry: the default, `"auto"`, scrolls natively and hands a list past the browser's size limit to synthetic input, which draws its own scrollbar. Vue, Svelte, Solid and React entries in the package itself (`vlist/vue`, `vlist/svelte`, `vlist/solid`, `vlist/react`), feature-first and tree-shaken like the vanilla builder; the separate adapter packages are deprecated. See the [changelog](https://github.com/floor/vlist/blob/main/CHANGELOG.md).
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/vlist)
|
|
8
8
|
[](https://bundlephobia.com/package/vlist)
|
|
@@ -144,12 +144,12 @@ The touch-only `.vlist-item--touch-sort` class suppresses selection and callouts
|
|
|
144
144
|
| `snapshots()` | 30.6 KB | 11.4 KB |
|
|
145
145
|
| `transition()` | 34.1 KB | 12.3 KB |
|
|
146
146
|
| `autosize()` | 31.7 KB | 11.9 KB |
|
|
147
|
-
| `grid()` | 34.
|
|
147
|
+
| `grid()` | 34.8 KB | 12.9 KB |
|
|
148
148
|
| `table()` | 46.4 KB | 16.4 KB |
|
|
149
149
|
| `masonry()` | 39.4 KB | 14.7 KB |
|
|
150
150
|
| `tree()` | 43.1 KB | 15.6 KB |
|
|
151
151
|
| `search()` | 36.9 KB | 13.6 KB |
|
|
152
|
-
| `carousel()` | 43.
|
|
152
|
+
| `carousel()` | 43.3 KB | 15.8 KB |
|
|
153
153
|
| `vlist/synthetic` + `carousel()` | 49.3 KB | 18.1 KB |
|
|
154
154
|
| `vlist/synthetic` + `sortable()` | 46.1 KB | 16.5 KB |
|
|
155
155
|
| `vlist/vue` `useVList` | 27.7 KB | 10.5 KB |
|
package/dist/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVList as
|
|
1
|
+
import{createVList as C,page as c,autosize as T,data as L,grid as V,masonry as x,groups as b,selection as w,a11y as p,scrollbar as u,snapshots as M}from"./index.js";function z(e){let t=[];if(typeof window<"u"&&e.scroll?.element===window)t.push(c());let s=e.item,o=e.orientation==="horizontal",g=o?s.width!=null:s.height!=null,f=o?s.estimatedWidth!=null:s.estimatedHeight!=null;if(!g&&f){if(e.layout==="grid")throw Error('[vlist] config: layout: "grid" needs a fixed item size. An estimate wires autosize(), which grid() cannot combine with: grid indexes its size cache by row, autosize measures items. Use item.height (item.width when horizontal).');let n=e.plugins??[];if(!n.some((i)=>i.name==="autosize")){let i=n.find((a)=>a.name!=="autosize"&&a.conflicts?.includes("autosize"))?.name,y=e.layout==="masonry"&&!n.some((a)=>a.name==="masonry"),l=i??(y?"masonry":void 0),d=o?"item.estimatedWidth":"item.estimatedHeight",m=o?"item.width":"item.height";if(l==="table"){if(o)throw Error("[vlist] table: cannot be used with horizontal orientation");throw Error("[vlist] config: item.estimatedHeight cannot be combined with table(): an estimated item size asks for measured rows, and table() gives every row a fixed height. Give the table a fixed rowHeight and drop the estimate. Use item.height.")}if(l==="masonry")throw Error(`[vlist] config: ${d} cannot be combined with `+(i==="masonry"?"masonry()":'layout: "masonry"')+`: an estimated item size asks for measured items, and masonry() lays every item out from the size cache it is handed. Give the items a fixed ${m} and drop the estimate.`);if(l==="carousel")throw Error(`[vlist] config: ${d} cannot be combined with carousel(): an estimated item size asks for measured slides, and carousel() builds its slide steps from the item size it is given. Give the slides a fixed ${m} and drop the estimate.`)}t.push(T())}if(e.adapter)t.push(L({adapter:e.adapter,...e.loading&&{loading:e.loading}}));if(e.layout==="grid"){if(!e.grid)throw Error('[vlist] config: layout: "grid" requires a `grid` option, e.g. { columns: 3 }');t.push(V(e.grid))}if(e.layout==="masonry"){if(!e.masonry)throw Error('[vlist] config: layout: "masonry" requires a `masonry` option, e.g. { columns: 3 }');t.push(x(e.masonry))}if(e.groups)t.push(b(e.groups));if(e.selection)t.push(w(e.selection));if(e.a11y)t.push(e.a11y===!0?p():p(e.a11y));let r=e.scroll?.scrollbar??e.scrollbar;if(r===!0)t.push(u({}));else if(r&&typeof r==="object")t.push(u(r));if(e.snapshots)t.push(M());if(e.plugins&&e.plugins.length>0){let n=new Set(e.plugins.map((i)=>i.name));return[...t.filter((i)=>!n.has(i.name)),...e.plugins]}return t}function I(e){let{factory:t,...s}=e;return(t??C)(s,z(e))}export{I as createVListFromConfig,z as resolvePlugins};
|