@toclocoinc/lattice-grid 1.1.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/LICENSE ADDED
@@ -0,0 +1,116 @@
1
+ Lattice Grid
2
+ Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
3
+
4
+ Lattice Grid is commercial software. It is not open source, and no part of it
5
+ is placed in the public domain.
6
+
7
+ --------------------------------------------------------------------------
8
+ 1. ONE PRODUCT
9
+ --------------------------------------------------------------------------
10
+
11
+ There is one Lattice Grid and every copy is feature-identical. There is no
12
+ community edition, no professional edition, and no feature that a licence key
13
+ unlocks. Every capability the documentation describes is present and working in
14
+ every copy, licensed or not.
15
+
16
+ A licence key removes the trial watermark. That is the whole of what it does.
17
+
18
+ --------------------------------------------------------------------------
19
+ 2. WHAT YOU MAY DO WITHOUT A KEY
20
+ --------------------------------------------------------------------------
21
+
22
+ You may download, install, evaluate, develop against and test Lattice Grid
23
+ without a licence key and without charge, for as long as you like.
24
+
25
+ On localhost and other loopback hosts -- localhost, *.localhost, 127.0.0.0/8
26
+ and ::1 -- no watermark is shown and no key is required. Development needs no
27
+ paperwork.
28
+
29
+ --------------------------------------------------------------------------
30
+ 3. WHAT REQUIRES A KEY
31
+ --------------------------------------------------------------------------
32
+
33
+ Serving Lattice Grid from any host other than a loopback host requires a valid
34
+ licence key issued by TOCLOCO Inc. This includes production, staging, internal
35
+ tools, intranets and private networks. A corporate intranet is a deployment
36
+ like any other; .local, .internal and private IP ranges are not exempt.
37
+
38
+ Keys are issued per deployment rather than per developer or per seat. A key
39
+ names the domains it covers and one key covers every developer, every build and
40
+ every user on them.
41
+
42
+ Without a valid key, the grid renders in full and displays a trial watermark.
43
+ Nothing is disabled, degraded or withheld. That behaviour exists to protect
44
+ your production screens from a licence lapsing at an inconvenient moment; it is
45
+ a courtesy, not a grant of licence. Deploying to a non-loopback host without a
46
+ valid key is a breach of these terms whether or not the software continues to
47
+ work.
48
+
49
+ --------------------------------------------------------------------------
50
+ 4. GRANT
51
+ --------------------------------------------------------------------------
52
+
53
+ Subject to your compliance with these terms and to payment of the applicable
54
+ fees, TOCLOCO Inc grants you a non-exclusive, non-transferable, non-
55
+ sublicensable licence to use Lattice Grid, and to reproduce and distribute it
56
+ as an incorporated component of your own applications, for the term and on the
57
+ domains stated in your licence key.
58
+
59
+ --------------------------------------------------------------------------
60
+ 5. RESTRICTIONS
61
+ --------------------------------------------------------------------------
62
+
63
+ You may not:
64
+
65
+ (a) remove, disable, obscure or circumvent the licence check, the console
66
+ warning or the trial watermark, or use a key on a deployment it does not
67
+ name;
68
+
69
+ (b) reverse engineer, decompile or disassemble the software, or attempt to
70
+ derive its source code, except to the extent that this restriction is
71
+ expressly prohibited by applicable law;
72
+
73
+ (c) redistribute, resell, sublicense or make the software available as a
74
+ standalone product, a component library, a developer tool or a competing
75
+ grid, whether or not for a fee. Distribution as part of your own
76
+ application under section 4 is permitted; distribution of Lattice Grid
77
+ itself is not;
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.
83
+
84
+ --------------------------------------------------------------------------
85
+ 6. DEPENDENCIES
86
+ --------------------------------------------------------------------------
87
+
88
+ Lattice Grid has no runtime dependencies and incorporates no third-party code.
89
+ Nothing in this distribution is subject to a third-party open source licence,
90
+ and adopting it introduces no transitive licence obligations.
91
+
92
+ --------------------------------------------------------------------------
93
+ 7. WARRANTY
94
+ --------------------------------------------------------------------------
95
+
96
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
97
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
98
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
99
+
100
+ --------------------------------------------------------------------------
101
+ 8. LIABILITY
102
+ --------------------------------------------------------------------------
103
+
104
+ IN NO EVENT SHALL TOCLOCO INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
105
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
106
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
107
+ SOFTWARE.
108
+
109
+ --------------------------------------------------------------------------
110
+ 9. TERMS
111
+ --------------------------------------------------------------------------
112
+
113
+ For licence terms, pricing and key issuance, contact TOCLOCO Inc or visit
114
+ https://www.latticegrid.dev.
115
+
116
+ Lattice Grid and the Lattice Grid logo are trademarks of TOCLOCO Inc.
package/README.md ADDED
@@ -0,0 +1,161 @@
1
+ # Lattice Grid
2
+
3
+ **A high-performance data grid for the browser.** Vanilla JavaScript, no runtime
4
+ dependencies, no framework wrapper, no build step required.
5
+
6
+ Version 1.1.0 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
7
+
8
+ ---
9
+
10
+ ## What's here
11
+
12
+ This repository is the distribution: the built library, its type declarations
13
+ and the documentation. Everything is self-contained — nothing is fetched at
14
+ runtime, not a CDN, not a font, not an icon sprite.
15
+
16
+ | File | What it is |
17
+ |---|---|
18
+ | `lattice-grid.min.js` | The library, minified. UMD — works with a `<script>` tag. |
19
+ | `lattice-grid.esm.min.js` | The same, as an ES module. |
20
+ | `lattice-grid.min.css` | The theme. Required. |
21
+ | `lattice-grid.d.ts` | TypeScript declarations. |
22
+ | `lattice-grid.umd.js`, `lattice-grid.esm.js` | Unminified, for debugging. |
23
+ | `docs/API.html` | The complete API reference. |
24
+ | `docs/api-detail.html` | The developer guide — what each part does, and why. |
25
+
26
+ ---
27
+
28
+ ## Quick start
29
+
30
+ ### No build step
31
+
32
+ The script-tag path is a first-class target, not an afterthought. Two files:
33
+
34
+ ```html
35
+ <link rel="stylesheet" href="lattice-grid.min.css">
36
+ <script src="lattice-grid.min.js"></script>
37
+
38
+ <div id="grid" style="height: 600px"></div>
39
+
40
+ <script>
41
+ const grid = LatticeGrid.createGrid(document.getElementById('grid'), {
42
+ columns: [
43
+ { field: 'circuitId', title: 'Circuit' },
44
+ { field: 'monthlyCharge', type: 'number', format: 'currency:GBP:2', total: 'sum' },
45
+ { field: 'installedOn', type: 'date', format: 'date:dd MMM yyyy' },
46
+ ],
47
+ rows,
48
+ rowKey: 'id',
49
+ });
50
+ </script>
51
+ ```
52
+
53
+ ### With a bundler
54
+
55
+ ```js
56
+ import { createGrid } from 'lattice-grid';
57
+ import 'lattice-grid/css';
58
+
59
+ const grid = createGrid(element, { columns, rows, rowKey: 'id' });
60
+ ```
61
+
62
+ ### TypeScript
63
+
64
+ Declarations ship in the box and are wired up in `package.json`, so editors find
65
+ them without configuration — autocomplete, inline documentation and type
66
+ checking against the real API.
67
+
68
+ ```ts
69
+ import type { Grid, GridConfig, ColumnDef } from 'lattice-grid';
70
+ ```
71
+
72
+ The declarations are checked against the running product on every build, so what
73
+ your editor tells you and what the grid does cannot drift apart.
74
+
75
+ ---
76
+
77
+ ## Full-screen mode
78
+
79
+ A grid usually lives in whatever box the page layout gave it, and that box is
80
+ usually too small for the job. The left rail's last button fills the browser
81
+ window with the grid; clicking it again — or pressing <kbd>Esc</kbd> — puts it
82
+ back exactly where it was.
83
+
84
+ ```js
85
+ grid.maximise.toggle();
86
+ grid.maximise.active(); // true while it fills the window
87
+
88
+ createGrid(el, { maximise: false }); // remove the button entirely
89
+ ```
90
+
91
+ It is a real escape, not a restyle: the element is moved out to `<body>` so no
92
+ ancestor's `transform`, `overflow: hidden` or stacking context can clip or
93
+ shrink it, and a placeholder holds its place so the page behind neither reflows
94
+ nor loses its scroll position. Every displaced style is handed back exactly as
95
+ it was found.
96
+
97
+ ---
98
+
99
+ ## Data types
100
+
101
+ Seven built-in types — `text`, `number`, `boolean`, `date`, `dateString`,
102
+ `object` and `lookup` — cover ordinary business data and are inferred from your
103
+ rows automatically.
104
+
105
+ Beyond those, Lattice Grid ships **20 technical field types** for the data that
106
+ usually ends up in a text column because the grid had nowhere to put it. Each is
107
+ a complete type, not a display format: it brings its own parser, comparator,
108
+ editor, filter, alignment, clipboard behaviour and Excel mapping.
109
+
110
+ | Group | Types | Notes |
111
+ |---|---|---|
112
+ | **Network** | `ipv4`, `ipv6`, `cidr` | Sort in address order, not lexically — `10.0.0.9` before `10.0.0.10`. |
113
+ | **Time** | `time`, `datetime`, `duration` | Three things a single `date` type keeps being asked to be. |
114
+ | **Radix** | `hex`, `hex8`, `hex16`, `hex32`, `binary`, `binary8`, `octal` | The stored value stays a plain number; the base is presentation and input only. |
115
+ | **Units** | `bytes`, `megabytes`, `gigabytes`, `bitrate`, `gigabits` | Shows `10 GB`, accepts `10,000M` typed in, stores `10`. |
116
+ | **Structured** | `json`, `secret` | `secret` is write-only: editable, never displayed, never exported. |
117
+
118
+ Custom types are first-class too — `createRadixType` and `createUnitType` build
119
+ new ones, and any type can `extend` another.
120
+
121
+ ---
122
+
123
+ ## Documentation
124
+
125
+ - **[API reference](docs/API.html)** — every namespace, method, config key and event.
126
+ - **[Developer guide](docs/api-detail.html)** — what each part does and why, with worked examples.
127
+
128
+ ---
129
+
130
+ ## Licensing
131
+
132
+ **There is one Lattice Grid and every copy is feature-identical.** No community
133
+ edition, no pro tier, no feature held back behind a key.
134
+
135
+ - **Free to develop against.** On `localhost` and other loopback hosts, no key
136
+ is needed and no watermark is shown.
137
+ - **Licensed to deploy.** On any other host, an unlicensed grid renders
138
+ everything and carries a small trial watermark.
139
+
140
+ Nothing is ever disabled, degraded or withheld — the failure to avoid is a
141
+ production screen breaking because a licence lapsed over a weekend. A key
142
+ removes the watermark; that is the whole of what it does.
143
+
144
+ Keys are issued per deployment rather than per developer or per seat, cover the
145
+ domains you name including wildcards, and are checked locally with no licence
146
+ server and no call home.
147
+
148
+ Get a key at **[latticegrid.dev](https://www.latticegrid.dev)**. See
149
+ [LICENSE](LICENSE) for terms.
150
+
151
+ ---
152
+
153
+ ## Requirements
154
+
155
+ A current browser. Lattice Grid targets ES2022 and uses `ResizeObserver`; there
156
+ is no IE11 build and no polyfill bundle.
157
+
158
+ ---
159
+
160
+ Copyright © 2026 TOCLOCO Inc. All rights reserved.
161
+ Lattice Grid and the Lattice Grid logo are trademarks of TOCLOCO Inc.