@toclocoinc/lattice-grid 1.4.2 → 1.5.4

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/LICENSE CHANGED
@@ -76,10 +76,7 @@ You may not:
76
76
  application under section 4 is permitted; distribution of Lattice Grid
77
77
  itself is not;
78
78
 
79
- (d) remove or alter any copyright, trademark or attribution notice; or
80
-
81
- (e) use TOCLOCO trademarks other than to state factually that your product
82
- incorporates Lattice Grid.
79
+ (d) remove or alter any copyright or attribution notice.
83
80
 
84
81
  --------------------------------------------------------------------------
85
82
  6. DEPENDENCIES
@@ -112,5 +109,3 @@ SOFTWARE.
112
109
 
113
110
  For licence terms, pricing and key issuance, contact TOCLOCO Inc or visit
114
111
  https://www.latticegrid.dev.
115
-
116
- Lattice Grid and the Lattice Grid logo are trademarks of TOCLOCO Inc.
package/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # Lattice Grid
2
2
 
3
3
  **A high-performance data grid for the browser.** Vanilla JavaScript, no runtime
4
- dependencies, no framework wrapper, no build step required.
4
+ dependencies, no build step required. Optional adapters for React, Vue, Svelte
5
+ and Web Components ship alongside it.
5
6
 
6
- Version 1.4.0 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
7
+ Version 1.5.4 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
7
8
 
8
9
  ---
9
10
 
@@ -15,11 +16,12 @@ runtime, not a CDN, not a font, not an icon sprite.
15
16
 
16
17
  | File | What it is |
17
18
  |---|---|
18
- | `lattice-grid.min.js` | The library, minified. UMD — works with a `<script>` tag. |
19
+ | `lattice-grid.min.js` | The library. UMD — works with a `<script>` tag. |
19
20
  | `lattice-grid.esm.min.js` | The same, as an ES module. |
20
21
  | `lattice-grid.min.css` | The theme. Required. |
21
22
  | `lattice-grid.d.ts` | TypeScript declarations. |
22
- | `lattice-grid.umd.js`, `lattice-grid.esm.js` | Unminified, for debugging. |
23
+ | `modules/react.esm.min.js` | React adapter. Vue, Svelte and Web Component builds sit beside it. |
24
+ | `modules/devtools.esm.min.js` | The devtools panel, including the accessibility checks. |
23
25
  | `docs/API.html` | The complete API reference. |
24
26
  | `docs/api-detail.html` | The developer guide — what each part does, and why. |
25
27
 
@@ -52,13 +54,42 @@ The script-tag path is a first-class target, not an afterthought. Two files:
52
54
 
53
55
  ### With a bundler
54
56
 
57
+ ```sh
58
+ npm install @toclocoinc/lattice-grid
59
+ ```
60
+
55
61
  ```js
56
- import { createGrid } from 'lattice-grid';
57
- import 'lattice-grid/css';
62
+ import { createGrid } from '@toclocoinc/lattice-grid';
63
+ import '@toclocoinc/lattice-grid/css';
58
64
 
59
65
  const grid = createGrid(element, { columns, rows, rowKey: 'id' });
60
66
  ```
61
67
 
68
+ ### React, Vue, Svelte and Web Components
69
+
70
+ Optional adapters, thin by design: the grid is created once
71
+ against a host element, prop changes are pushed through the same public API you
72
+ would call by hand, and it is destroyed on unmount.
73
+
74
+ You pass the framework in. Each adapter is a factory taking the framework and
75
+ `createGrid` rather than importing either, so the package keeps its promise of
76
+ no runtime dependencies, and an adapter can never disagree with the version of
77
+ the grid you already loaded.
78
+
79
+ ```js
80
+ import React from 'react';
81
+ import { createGrid } from '@toclocoinc/lattice-grid';
82
+ import { createLatticeGrid } from '@toclocoinc/lattice-grid/modules/react';
83
+
84
+ const LatticeGrid = createLatticeGrid({ React, createGrid });
85
+ ```
86
+
87
+ The web component is the exception: it carries the grid inside it, so use it *or*
88
+ `createGrid` in a page, not both — two copies keep separate registries, and a
89
+ renderer registered through one will not appear in the other.
90
+
91
+ The full setup for each framework is in the developer guide.
92
+
62
93
  ### TypeScript
63
94
 
64
95
  Declarations ship in the box and are wired up in `package.json`, so editors find
@@ -66,7 +97,7 @@ them without configuration — autocomplete, inline documentation and type
66
97
  checking against the real API.
67
98
 
68
99
  ```ts
69
- import type { Grid, GridConfig, ColumnDef } from 'lattice-grid';
100
+ import type { Grid, GridConfig, ColumnDef } from '@toclocoinc/lattice-grid';
70
101
  ```
71
102
 
72
103
  The declarations are checked against the running product on every build, so what
package/lattice-grid.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.4.0 — type declarations
2
+ * Lattice Grid 1.5.4 — type declarations
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -741,6 +741,12 @@ export interface GridConfig {
741
741
  dataTypes?: Record<string, DataType>;
742
742
  /** Values sampled per undeclared column when inferring its type. Default 100. */
743
743
  sampleSize?: number;
744
+ /**
745
+ * Raise every interactive target to a comfortable size for touch, without
746
+ * changing the type. `'large'` asks for it; `'default'` opts out of the
747
+ * coarse-pointer rule that would otherwise apply it.
748
+ */
749
+ targetSize?: 'default' | 'large';
744
750
  components?: Record<string, RendererCtor | EditorCtor | FilterCtor>;
745
751
  pipes?: Record<string, (value: unknown, ...args: string[]) => string>;
746
752
  totalFns?: Record<string, TotalFn>;
@@ -1203,6 +1209,8 @@ export interface RowsApi {
1203
1209
  matchCount(): number;
1204
1210
  data(): unknown[];
1205
1211
  forEach(fn: (row: Row, index: number) => void): void;
1212
+ /** Every row in the data, before any filter. Leaf rows, in physical order. */
1213
+ forEachAll(fn: (row: Row, index: number) => void): void;
1206
1214
  value(key: string, colId: string): unknown;
1207
1215
  text(key: string, colId: string): string;
1208
1216
  values(key: string): Record<string, unknown>;