vlist-solidjs 1.2.0 → 1.5.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.md +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ function UserList() {
|
|
|
37
37
|
- **`createVList(config)`** — Creates a virtual list. Config is an accessor returning the vlist config. Returns `{ setRef, instance }`.
|
|
38
38
|
- **`createVListEvent(instance, event, handler)`** — Subscribe to vlist events with automatic cleanup.
|
|
39
39
|
|
|
40
|
-
Config accepts all [@floor/vlist options](https://vlist.dev/docs/api/reference) minus `container` (handled by the ref). Feature fields like `adapter`, `grid`, `groups`, `selection`, and `
|
|
40
|
+
Config accepts all [@floor/vlist options](https://vlist.dev/docs/api/reference) minus `container` (handled by the ref). Feature fields like `adapter`, `grid`, `groups`, `selection`, `scrollbar`, and `estimatedHeight` are translated into `.use(withX())` calls automatically.
|
|
41
41
|
|
|
42
42
|
## Documentation
|
|
43
43
|
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{onMount as
|
|
1
|
+
import{onMount as V,onCleanup as X,createEffect as $,on as j}from"solid-js";import{vlist as B}from"@floor/vlist";import{withAsync as O,withAutoSize as P,withGrid as W,withMasonry as x,withGroups as y,withSelection as U,withScrollbar as G,withScale as A,withSnapshots as z,withPage as H}from"@floor/vlist";function R(J){let I=null,D=null,K=(k)=>{I=k},N=()=>D;return V(()=>{if(!I)return;let k=J(),q=B({...k,container:I});if(k.scroll?.element===window)q=q.use(H());let L=k.item,T=k.orientation==="horizontal",Y=T?L.width!=null:L.height!=null,Z=T?L.estimatedWidth!=null:L.estimatedHeight!=null;if(!Y&&Z)q=q.use(P());if(k.adapter)q=q.use(O({adapter:k.adapter,...k.loading&&{loading:k.loading}}));if(k.layout==="grid"&&k.grid)q=q.use(W(k.grid));if(k.layout==="masonry"&&k.masonry)q=q.use(x(k.masonry));if(k.groups){let F=k.groups,_=typeof F.headerHeight==="function"?F.headerHeight("",0):F.headerHeight;q=q.use(y({getGroupForIndex:F.getGroupForIndex,headerHeight:_,headerTemplate:F.headerTemplate,...F.sticky!==void 0&&{sticky:F.sticky}}))}if((k.selection?.mode||"none")!=="none")q=q.use(U(k.selection));else q=q.use(U({mode:"none"}));q=q.use(A());let Q=k.scroll?.scrollbar||k.scrollbar;if(Q!=="none"){let F=typeof Q==="object"?Q:{};q=q.use(G(F))}q=q.use(z()),D=q.build()}),$(j(()=>J().items,(k)=>{if(D&&k)D.setItems(k)})),X(()=>{if(D)D.destroy(),D=null}),{setRef:K,instance:N}}function m(J,I,D){V(()=>{let K=J();if(!K)return;let N=K.on(I,D);X(()=>{N()})})}export{m as createVListEvent,R as createVList};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vlist-solidjs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "SolidJS primitives for vlist - lightweight virtual scrolling",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Floor IO",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"./package.json": "./package.json"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@floor/vlist": "^1.
|
|
36
|
+
"@floor/vlist": "^1.5.0",
|
|
37
37
|
"solid-js": ">=1.0.0"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|