vlist 2.5.1 → 2.6.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/dist/size.json CHANGED
@@ -1 +1 @@
1
- {"base":{"minified":"27.4","gzipped":"9.9","minBytes":28063,"gzBytes":10126},"a11y":{"minified":"30.5","gzipped":"11.0","minBytes":31210,"gzBytes":11273},"selection":{"minified":"36.6","gzipped":"12.6","minBytes":37451,"gzBytes":12911},"data":{"minified":"41.1","gzipped":"14.7","minBytes":42081,"gzBytes":15067},"scrollbar":{"minified":"34.5","gzipped":"11.9","minBytes":35325,"gzBytes":12177},"sortable":{"minified":"36.8","gzipped":"12.9","minBytes":37696,"gzBytes":13195},"groups":{"minified":"43.3","gzipped":"15.2","minBytes":44380,"gzBytes":15586},"page":{"minified":"29.8","gzipped":"10.7","minBytes":30549,"gzBytes":10910},"snapshots":{"minified":"30.7","gzipped":"11.0","minBytes":31417,"gzBytes":11310},"transition":{"minified":"34.2","gzipped":"11.7","minBytes":34987,"gzBytes":11998},"autosize":{"minified":"29.8","gzipped":"10.7","minBytes":30539,"gzBytes":10996},"grid":{"minified":"34.4","gzipped":"12.3","minBytes":35246,"gzBytes":12622},"table":{"minified":"45.7","gzipped":"15.7","minBytes":46799,"gzBytes":16096},"masonry":{"minified":"38.5","gzipped":"13.9","minBytes":39384,"gzBytes":14234},"tree":{"minified":"42.5","gzipped":"14.9","minBytes":43550,"gzBytes":15271},"search":{"minified":"36.5","gzipped":"13.1","minBytes":37376,"gzBytes":13371},"carousel":{"minified":"36.9","gzipped":"13.3","minBytes":37777,"gzBytes":13656}}
1
+ {"base":{"minified":"27.4","gzipped":"9.9","minBytes":28063,"gzBytes":10126},"a11y":{"minified":"30.7","gzipped":"11.1","minBytes":31393,"gzBytes":11359},"selection":{"minified":"36.8","gzipped":"12.7","minBytes":37682,"gzBytes":13000},"data":{"minified":"41.1","gzipped":"14.7","minBytes":42081,"gzBytes":15067},"scrollbar":{"minified":"34.5","gzipped":"11.9","minBytes":35325,"gzBytes":12177},"sortable":{"minified":"36.8","gzipped":"12.9","minBytes":37696,"gzBytes":13195},"groups":{"minified":"43.3","gzipped":"15.2","minBytes":44380,"gzBytes":15586},"page":{"minified":"29.8","gzipped":"10.7","minBytes":30549,"gzBytes":10910},"snapshots":{"minified":"30.7","gzipped":"11.0","minBytes":31417,"gzBytes":11310},"transition":{"minified":"34.2","gzipped":"11.7","minBytes":34987,"gzBytes":11998},"autosize":{"minified":"29.8","gzipped":"10.7","minBytes":30539,"gzBytes":10996},"grid":{"minified":"34.4","gzipped":"12.3","minBytes":35246,"gzBytes":12622},"table":{"minified":"45.7","gzipped":"15.7","minBytes":46799,"gzBytes":16096},"masonry":{"minified":"38.5","gzipped":"13.9","minBytes":39384,"gzBytes":14234},"tree":{"minified":"42.5","gzipped":"14.9","minBytes":43550,"gzBytes":15271},"search":{"minified":"36.5","gzipped":"13.1","minBytes":37376,"gzBytes":13371},"carousel":{"minified":"36.9","gzipped":"13.3","minBytes":37777,"gzBytes":13656}}
package/dist/types.d.ts CHANGED
@@ -304,6 +304,23 @@ export interface ScrollConfig {
304
304
  element?: Window;
305
305
  /** Scroll idle detection timeout in ms (default: 150) */
306
306
  idleTimeout?: number;
307
+ /**
308
+ * Scroll model (RFC-012). `"native"` (default) sizes the content element to
309
+ * the full virtual size — simple, but hits the browser's ~16.7M px limit.
310
+ * `"bounded"` sizes the content to a viewport-multiple runway and rebases a
311
+ * logical origin near the edges, supporting unbounded item counts without
312
+ * compressing the scroll space.
313
+ */
314
+ mode?: "native" | "bounded";
315
+ /**
316
+ * Runway size as a multiple of the viewport, used only with
317
+ * `mode: "bounded"` (default 2). The bounded content element is sized to
318
+ * `viewport × runway` (capped at the real virtual size). Larger values mean
319
+ * more native-scroll headroom and less frequent rebasing, at the cost of a
320
+ * bigger content element. Clamped up to a minimum of 1.5 so native scroll and
321
+ * touch momentum always have some room.
322
+ */
323
+ runway?: number;
307
324
  }
308
325
  /** Custom scrollbar fine-tuning options */
309
326
  export interface ScrollbarOptions {
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Clamp a PageUp/PageDown target index so it preserves the column in grid mode.
3
+ *
4
+ * For a linear list (`columns <= 1`) this is a plain `[0, total-1]` clamp. In a
5
+ * grid, overshooting the top/bottom should land on the **same column** of the
6
+ * first/last row — not the absolute first/last item, which would duplicate the
7
+ * Home/End behavior (and, on a boundary row, wrongly jump to the corner instead
8
+ * of staying put). See floor/vlist#60.
9
+ *
10
+ * @param target The raw target index (`current ± pageSize`), may be out of range.
11
+ * @param current The current focused index.
12
+ * @param columns Grid column count (`nav.ud`); 1 for a linear list.
13
+ * @param total Total item count.
14
+ */
15
+ export declare function clampPageTarget(target: number, current: number, columns: number, total: number): number;
16
+ //# sourceMappingURL=grid-nav.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vlist",
3
- "version": "2.5.1",
3
+ "version": "2.6.1",
4
4
  "description": "Lightweight, high-performance virtual list with zero dependencies",
5
5
  "author": {
6
6
  "name": "Floor IO",
@@ -34,6 +34,11 @@
34
34
  "import": "./dist/index.js",
35
35
  "default": "./dist/index.js"
36
36
  },
37
+ "./config": {
38
+ "types": "./dist/config.d.ts",
39
+ "import": "./dist/config.js",
40
+ "default": "./dist/config.js"
41
+ },
37
42
  "./internals": {
38
43
  "types": "./dist/internals.d.ts",
39
44
  "import": "./dist/internals.js",