virtua 0.52.5 → 0.52.7
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/lib/angular/VGrid.d.ts +3 -0
- package/lib/angular/index.js +279 -249
- package/lib/angular/index.js.map +1 -1
- package/lib/core/index.cjs +422 -397
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.js +405 -380
- package/lib/core/index.js.map +1 -1
- package/lib/index.cjs +438 -412
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +447 -422
- package/lib/index.js.map +1 -1
- package/lib/solid/index.cjs +546 -519
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.js +533 -508
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +179 -112
- package/lib/solid/index.jsx.map +1 -1
- package/lib/svelte/VGrid.svelte +7 -20
- package/lib/vue/index.cjs +453 -426
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.js +494 -469
- package/lib/vue/index.js.map +1 -1
- package/package.json +1 -1
package/lib/svelte/VGrid.svelte
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
createContainerGridDriver,
|
|
9
9
|
createGridLayout,
|
|
10
10
|
createGridPlan,
|
|
11
|
+
createGridSpanIndex,
|
|
11
12
|
createVirtualStore,
|
|
12
13
|
getAxisItem,
|
|
13
14
|
getAxisLength,
|
|
@@ -48,6 +49,9 @@
|
|
|
48
49
|
|
|
49
50
|
const rowLayout = createGridLayout(rows, rowHeight, gap);
|
|
50
51
|
const colLayout = createGridLayout(cols, colWidth, gap);
|
|
52
|
+
let rowSizes = $derived(rowLayout.$getSizes(rows, rowHeight));
|
|
53
|
+
let colSizes = $derived(colLayout.$getSizes(cols, colWidth));
|
|
54
|
+
let spanIndex = $derived(createGridSpanIndex(spans));
|
|
51
55
|
const rowStore = createVirtualStore(rowLayout);
|
|
52
56
|
const colStore = createVirtualStore(colLayout);
|
|
53
57
|
const driver = createContainerGridDriver(rowStore, colStore);
|
|
@@ -82,28 +86,11 @@
|
|
|
82
86
|
rowStore.$subscribe(UPDATE_SCROLL_END_EVENT, notifyScrollEnd);
|
|
83
87
|
colStore.$subscribe(UPDATE_SCROLL_END_EVENT, notifyScrollEnd);
|
|
84
88
|
|
|
85
|
-
// The sizes read from the items are tracked, so the items mutated in place are followed.
|
|
86
89
|
$effect.pre(() => {
|
|
87
|
-
updateGridAxis(
|
|
88
|
-
rowStore,
|
|
89
|
-
rowLayout,
|
|
90
|
-
rows,
|
|
91
|
-
rowHeight,
|
|
92
|
-
headerRows,
|
|
93
|
-
footerRows,
|
|
94
|
-
true,
|
|
95
|
-
);
|
|
90
|
+
updateGridAxis(rowStore, rowLayout, rows, rowSizes, headerRows, footerRows);
|
|
96
91
|
});
|
|
97
92
|
$effect.pre(() => {
|
|
98
|
-
updateGridAxis(
|
|
99
|
-
colStore,
|
|
100
|
-
colLayout,
|
|
101
|
-
cols,
|
|
102
|
-
colWidth,
|
|
103
|
-
headerCols,
|
|
104
|
-
footerCols,
|
|
105
|
-
true,
|
|
106
|
-
);
|
|
93
|
+
updateGridAxis(colStore, colLayout, cols, colSizes, headerCols, footerCols);
|
|
107
94
|
});
|
|
108
95
|
let rowCount = $derived(stateVersion && rowStore.$getItemsLength());
|
|
109
96
|
let colCount = $derived(stateVersion && colStore.$getItemsLength());
|
|
@@ -114,8 +101,8 @@
|
|
|
114
101
|
colLayout,
|
|
115
102
|
rowStore.$getRange(bufferSize),
|
|
116
103
|
colStore.$getRange(bufferSize),
|
|
104
|
+
spanIndex,
|
|
117
105
|
sectionRows,
|
|
118
|
-
spans,
|
|
119
106
|
keepMounted,
|
|
120
107
|
ariaSort,
|
|
121
108
|
);
|