@toclocoinc/lattice-grid 1.68.0 → 1.68.2

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.
Files changed (164) hide show
  1. package/README.md +26 -1
  2. package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +1 -0
  3. package/angular/package.json +1 -1
  4. package/docs/API.html +8058 -3962
  5. package/docs/api-detail.html +101 -4
  6. package/lattice-grid.d.ts +5917 -78
  7. package/lattice-grid.esm.min.js +197 -39
  8. package/lattice-grid.min.cjs +197 -39
  9. package/lattice-grid.min.js +197 -39
  10. package/modules/ai.d.ts +172 -11
  11. package/modules/ai.esm.min.js +3 -3
  12. package/modules/ai.min.cjs +3 -3
  13. package/modules/ai.min.js +3 -3
  14. package/modules/angular.d.ts +1 -1
  15. package/modules/angular.esm.min.js +3 -3
  16. package/modules/angular.min.cjs +3 -3
  17. package/modules/angular.min.js +3 -3
  18. package/modules/chart-alluvial.d.ts +1 -1
  19. package/modules/chart-alluvial.esm.min.js +1 -1
  20. package/modules/chart-alluvial.min.cjs +1 -1
  21. package/modules/chart-alluvial.min.js +1 -1
  22. package/modules/chart-arc.d.ts +1 -1
  23. package/modules/chart-arc.esm.min.js +1 -1
  24. package/modules/chart-arc.min.cjs +1 -1
  25. package/modules/chart-arc.min.js +1 -1
  26. package/modules/chart-bubblemap.d.ts +1 -1
  27. package/modules/chart-bubblemap.esm.min.js +1 -1
  28. package/modules/chart-bubblemap.min.cjs +1 -1
  29. package/modules/chart-bubblemap.min.js +1 -1
  30. package/modules/chart-bump.d.ts +1 -1
  31. package/modules/chart-bump.esm.min.js +1 -1
  32. package/modules/chart-bump.min.cjs +1 -1
  33. package/modules/chart-bump.min.js +1 -1
  34. package/modules/chart-calendar.d.ts +1 -1
  35. package/modules/chart-calendar.esm.min.js +1 -1
  36. package/modules/chart-calendar.min.cjs +1 -1
  37. package/modules/chart-calendar.min.js +1 -1
  38. package/modules/chart-decomposition.d.ts +1 -1
  39. package/modules/chart-decomposition.esm.min.js +1 -1
  40. package/modules/chart-decomposition.min.cjs +1 -1
  41. package/modules/chart-decomposition.min.js +1 -1
  42. package/modules/chart-diverging.d.ts +1 -1
  43. package/modules/chart-diverging.esm.min.js +1 -1
  44. package/modules/chart-diverging.min.cjs +1 -1
  45. package/modules/chart-diverging.min.js +1 -1
  46. package/modules/chart-dumbbell.d.ts +1 -1
  47. package/modules/chart-dumbbell.esm.min.js +1 -1
  48. package/modules/chart-dumbbell.min.cjs +1 -1
  49. package/modules/chart-dumbbell.min.js +1 -1
  50. package/modules/chart-fan.d.ts +1 -1
  51. package/modules/chart-fan.esm.min.js +1 -1
  52. package/modules/chart-fan.min.cjs +1 -1
  53. package/modules/chart-fan.min.js +1 -1
  54. package/modules/chart-hexbin.d.ts +1 -1
  55. package/modules/chart-hexbin.esm.min.js +1 -1
  56. package/modules/chart-hexbin.min.cjs +1 -1
  57. package/modules/chart-hexbin.min.js +1 -1
  58. package/modules/chart-hexmap.d.ts +1 -1
  59. package/modules/chart-hexmap.esm.min.js +1 -1
  60. package/modules/chart-hexmap.min.cjs +1 -1
  61. package/modules/chart-hexmap.min.js +1 -1
  62. package/modules/chart-icicle.d.ts +1 -1
  63. package/modules/chart-icicle.esm.min.js +1 -1
  64. package/modules/chart-icicle.min.cjs +1 -1
  65. package/modules/chart-icicle.min.js +1 -1
  66. package/modules/chart-markermap.d.ts +1 -1
  67. package/modules/chart-markermap.esm.min.js +1 -1
  68. package/modules/chart-markermap.min.cjs +1 -1
  69. package/modules/chart-markermap.min.js +1 -1
  70. package/modules/chart-parallel.d.ts +1 -1
  71. package/modules/chart-parallel.esm.min.js +1 -1
  72. package/modules/chart-parallel.min.cjs +1 -1
  73. package/modules/chart-parallel.min.js +1 -1
  74. package/modules/chart-ridgeline.d.ts +1 -1
  75. package/modules/chart-ridgeline.esm.min.js +1 -1
  76. package/modules/chart-ridgeline.min.cjs +1 -1
  77. package/modules/chart-ridgeline.min.js +1 -1
  78. package/modules/chart-roc.d.ts +1 -1
  79. package/modules/chart-roc.esm.min.js +1 -1
  80. package/modules/chart-roc.min.cjs +1 -1
  81. package/modules/chart-roc.min.js +1 -1
  82. package/modules/chart-slope.d.ts +1 -1
  83. package/modules/chart-slope.esm.min.js +1 -1
  84. package/modules/chart-slope.min.cjs +1 -1
  85. package/modules/chart-slope.min.js +1 -1
  86. package/modules/chart-splom.d.ts +1 -1
  87. package/modules/chart-splom.esm.min.js +1 -1
  88. package/modules/chart-splom.min.cjs +1 -1
  89. package/modules/chart-splom.min.js +1 -1
  90. package/modules/chart-waffle.d.ts +1 -1
  91. package/modules/chart-waffle.esm.min.js +1 -1
  92. package/modules/chart-waffle.min.cjs +1 -1
  93. package/modules/chart-waffle.min.js +1 -1
  94. package/modules/charts.d.ts +16 -1
  95. package/modules/charts.esm.min.js +23 -16
  96. package/modules/charts.min.cjs +23 -16
  97. package/modules/charts.min.js +23 -16
  98. package/modules/data-router.d.ts +259 -3
  99. package/modules/data-router.esm.min.js +9 -4
  100. package/modules/data-router.min.cjs +9 -4
  101. package/modules/data-router.min.js +9 -4
  102. package/modules/devtools.d.ts +1 -1
  103. package/modules/devtools.esm.min.js +1 -1
  104. package/modules/devtools.min.cjs +1 -1
  105. package/modules/devtools.min.js +1 -1
  106. package/modules/dhtmlx-compat.d.ts +1 -1
  107. package/modules/dhtmlx-compat.esm.min.js +3 -3
  108. package/modules/dhtmlx-compat.min.cjs +3 -3
  109. package/modules/dhtmlx-compat.min.js +3 -3
  110. package/modules/gantt.d.ts +563 -12
  111. package/modules/gantt.esm.min.js +8 -4
  112. package/modules/gantt.min.cjs +8 -4
  113. package/modules/gantt.min.js +8 -4
  114. package/modules/geo-europe-nuts.d.ts +1 -1
  115. package/modules/geo-europe-nuts.esm.min.js +1 -1
  116. package/modules/geo-uk.d.ts +1 -1
  117. package/modules/geo-uk.esm.min.js +1 -1
  118. package/modules/geo-us-states.d.ts +1 -1
  119. package/modules/geo-us-states.esm.min.js +1 -1
  120. package/modules/geo-world-110m.d.ts +1 -1
  121. package/modules/geo-world-110m.esm.min.js +1 -1
  122. package/modules/geo-world-50m.d.ts +1 -1
  123. package/modules/geo-world-50m.esm.min.js +1 -1
  124. package/modules/htmx.d.ts +1 -1
  125. package/modules/htmx.esm.min.js +197 -39
  126. package/modules/htmx.min.cjs +197 -39
  127. package/modules/htmx.min.js +197 -39
  128. package/modules/kanban.d.ts +687 -4
  129. package/modules/kanban.esm.min.js +3 -3
  130. package/modules/kanban.min.cjs +3 -3
  131. package/modules/kanban.min.js +3 -3
  132. package/modules/kpi.d.ts +237 -3
  133. package/modules/kpi.esm.min.js +4 -4
  134. package/modules/kpi.min.cjs +4 -4
  135. package/modules/kpi.min.js +4 -4
  136. package/modules/layout.d.ts +249 -7
  137. package/modules/layout.esm.min.js +3 -3
  138. package/modules/layout.min.cjs +3 -3
  139. package/modules/layout.min.js +3 -3
  140. package/modules/mock-socket.d.ts +6 -1
  141. package/modules/mock-socket.esm.min.js +1 -1
  142. package/modules/mock-socket.min.cjs +1 -1
  143. package/modules/mock-socket.min.js +1 -1
  144. package/modules/react.d.ts +18 -1
  145. package/modules/react.esm.min.js +3 -3
  146. package/modules/react.min.cjs +3 -3
  147. package/modules/react.min.js +3 -3
  148. package/modules/svelte.d.ts +1 -1
  149. package/modules/svelte.esm.min.js +3 -3
  150. package/modules/svelte.min.cjs +3 -3
  151. package/modules/svelte.min.js +3 -3
  152. package/modules/tabs.d.ts +116 -11
  153. package/modules/tabs.esm.min.js +3 -3
  154. package/modules/tabs.min.cjs +3 -3
  155. package/modules/tabs.min.js +3 -3
  156. package/modules/vue.d.ts +12 -1
  157. package/modules/vue.esm.min.js +3 -3
  158. package/modules/vue.min.cjs +3 -3
  159. package/modules/vue.min.js +3 -3
  160. package/modules/webcomponent.d.ts +89 -6
  161. package/modules/webcomponent.esm.min.js +242 -43
  162. package/modules/webcomponent.min.cjs +242 -43
  163. package/modules/webcomponent.min.js +242 -43
  164. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, layout module type declarations
2
+ * Lattice Grid 1.68.2, layout module type declarations
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -70,38 +70,82 @@ interface LayoutWindow {
70
70
  * read correctly and round-trip wrongly, so it is reported as it is.
71
71
  */
72
72
  interface LayoutInteractive {
73
+ /**
74
+ * Whether dragging a window to another cell is currently allowed for the layout as a
75
+ * whole. Undefined means nothing has been locked or unlocked, so each window's own flag
76
+ * decides.
77
+ */
73
78
  movable: boolean | undefined;
79
+ /**
80
+ * Whether dragging a window's edge is currently allowed for the layout as a whole, on
81
+ * the same terms as `movable`.
82
+ */
74
83
  resizable: boolean | undefined;
84
+ /**
85
+ * Whether the close control is currently allowed for the layout as a whole, on the same
86
+ * terms as `movable`.
87
+ */
75
88
  closable: boolean | undefined;
76
89
  }
77
90
 
78
91
  /** The plain, JSON-safe arrangement `getLayout()` returns and `setLayout()` takes. */
79
92
  interface LayoutSnapshot {
93
+ /**
94
+ * How many cell columns the layout had when the snapshot was taken. Informational on
95
+ * the way back in: `setLayout` reads only `windows`, and clamps each placement to the
96
+ * layout it is restored into.
97
+ */
80
98
  columns: number;
99
+ /** How many cell rows the layout had when the snapshot was taken; informational too. */
81
100
  rows: number;
101
+ /**
102
+ * Each window's id and its cell placement. Position and size only: titles, content and
103
+ * capabilities stay with the configuration.
104
+ */
82
105
  windows: { id: string; xPos: number; yPos: number; xSize: number; ySize: number }[];
83
106
  }
84
107
 
85
108
  /** A cell placement, as carried on the move and resize events. */
86
109
  interface LayoutPlacement {
110
+ /** The window's left-hand column, counted from 1. */
87
111
  xPos: number;
112
+ /** The window's top row, counted from 1. */
88
113
  yPos: number;
114
+ /** How many columns wide the window is; at least 1, and never more than the layout has. */
89
115
  xSize: number;
116
+ /** How many rows tall the window is; at least 1. */
90
117
  ySize: number;
91
118
  }
92
119
 
93
120
  /** The payload of `window:moved`, `beforeWindowMove`, `beforeWindowResize`. */
94
121
  interface LayoutMoveEvent {
122
+ /** Which window moved or was asked to move. */
95
123
  id: string;
124
+ /**
125
+ * Where the window was before the gesture. A move that would change nothing is not
126
+ * reported at all.
127
+ */
96
128
  from: LayoutPlacement;
97
129
  /** Where the window was asked to go. */
98
130
  to: LayoutPlacement;
99
131
  /** Where it actually ended up, which under `compact: 'vertical'` may differ. */
100
132
  landed?: LayoutPlacement;
133
+ /**
134
+ * Who caused it: `user` for a drag, `api` for a call, `init` for the opening
135
+ * arrangement. Defaults to `user`.
136
+ */
101
137
  origin?: 'api' | 'user' | 'init';
138
+ /**
139
+ * Why it was cancelled — whatever was passed to `preventDefault`, `prevented` when
140
+ * nothing was, or `error` when a handler threw. Null while nothing has cancelled it.
141
+ */
102
142
  reason?: string | null;
103
143
  /** Cancel the action (only meaningful on a `before*` event). */
104
144
  preventDefault?: (reason?: string) => void;
145
+ /**
146
+ * True once a handler has cancelled the action. Read it in a later handler to see that
147
+ * an earlier one already refused.
148
+ */
105
149
  defaultPrevented?: boolean;
106
150
  }
107
151
 
@@ -111,32 +155,193 @@ interface LayoutMoveEvent {
111
155
  * changes size, including on the opening frame; never with a zero box.
112
156
  */
113
157
  interface LayoutResizeEvent {
158
+ /** Which window changed size. */
114
159
  id: string;
160
+ /**
161
+ * The id of the window's content container, so a host can find the element it mounted
162
+ * into. Defaults to the window id plus `-body`.
163
+ */
115
164
  payloadId: string;
116
165
  /** The payload container itself, so a host can act on it directly. */
117
166
  payload: HTMLElement;
167
+ /**
168
+ * The content box's width in CSS pixels, measured — not a cell count. A change under a
169
+ * pixel is not reported.
170
+ */
118
171
  width: number;
172
+ /** The content box's height in CSS pixels, on the same terms as `width`. */
119
173
  height: number;
174
+ /** The window's left-hand column at the time of the measurement. */
120
175
  xPos: number;
176
+ /** The window's top row at the time of the measurement. */
121
177
  yPos: number;
178
+ /** How many columns wide the window now is. */
122
179
  xSize: number;
180
+ /** How many rows tall the window now is. */
123
181
  ySize: number;
124
182
  }
125
183
 
126
184
  /** The payload of `window:closed` and `beforeWindowClose`. */
127
185
  interface LayoutCloseEvent {
186
+ /** Which window was closed, or is about to be. */
128
187
  id: string;
188
+ /**
189
+ * The id of its content container — the handle for tearing down whatever was mounted
190
+ * inside.
191
+ */
129
192
  payloadId: string;
130
193
  /** The payload container, handed back so the host can destroy what it mounted. */
131
194
  payload?: HTMLElement;
195
+ /** Who caused it: `user` for the close control, `api` for a call. Defaults to `user`. */
132
196
  origin?: 'api' | 'user';
197
+ /**
198
+ * Why the close was refused — the reason given to `preventDefault`, `prevented` when
199
+ * none was, or `error` when a handler threw.
200
+ */
133
201
  reason?: string | null;
202
+ /**
203
+ * Refuse the close, optionally saying why. Only `beforeWindowClose` is cancellable; by
204
+ * `window:closed` the window has gone.
205
+ */
134
206
  preventDefault?: (reason?: string) => void;
207
+ /** True once a handler has refused the close. */
135
208
  defaultPrevented?: boolean;
136
209
  }
137
210
 
211
+ /**
212
+ * `window:moved`: a window finished moving.
213
+ *
214
+ * The past-tense event, so there is no `preventDefault` on it — the move has
215
+ * happened, and `beforeWindowMove` ({@link LayoutMoveEvent}) is where it could
216
+ * have been stopped.
217
+ */
218
+ interface LayoutWindowMovedEvent {
219
+ /** Which window moved. */
220
+ id: string;
221
+ /** Where it was before the gesture. */
222
+ from: LayoutPlacement;
223
+ /** Where it was asked to go. */
224
+ to: LayoutPlacement;
225
+ /** Where it actually ended up, which under `compact: 'vertical'` may differ from `to`. */
226
+ landed: LayoutPlacement;
227
+ /** Who caused it: `user` for a drag or a keyboard move, `api` for `setWindow`. */
228
+ origin: 'api' | 'user';
229
+ }
230
+
231
+ /**
232
+ * `window:closed`: a window was removed and its payload container handed back.
233
+ *
234
+ * The past-tense event: no `preventDefault`, because the window has gone. The
235
+ * container is **not** destroyed — whatever the host mounted in it is the
236
+ * host's to tear down.
237
+ */
238
+ interface LayoutWindowClosedEvent {
239
+ /** Which window closed. */
240
+ id: string;
241
+ /** The id of its content container. */
242
+ payloadId: string;
243
+ /** The container itself, handed back so the host can destroy what it mounted. */
244
+ payload: HTMLElement;
245
+ /** Who caused it: `user` for the close control, `api` for a call. */
246
+ origin: 'api' | 'user';
247
+ }
248
+
249
+ /**
250
+ * `windowMove:cancelled` and `windowResize:cancelled`: a `before…` handler
251
+ * refused the gesture. A notification, so it carries no `preventDefault`.
252
+ */
253
+ interface LayoutMoveCancelledEvent {
254
+ /** Which window did not move. */
255
+ id: string;
256
+ /** Where it is, and stays. */
257
+ from: LayoutPlacement;
258
+ /** Where it would have gone. */
259
+ to: LayoutPlacement;
260
+ /** Who asked for the gesture that was refused: `user` for a drag or keyboard move, `api` for `setWindow`. */
261
+ origin: 'api' | 'user';
262
+ /** The reason given to `preventDefault`, or `'prevented'`. */
263
+ reason: string;
264
+ }
265
+
266
+ /**
267
+ * `windowClose:cancelled`: a `beforeWindowClose` handler refused the close. A
268
+ * notification, so it carries no `preventDefault`.
269
+ */
270
+ interface LayoutCloseCancelledEvent {
271
+ /** Which window stayed open. */
272
+ id: string;
273
+ /** The id of its content container. */
274
+ payloadId: string;
275
+ /** Who asked for the close that was refused. */
276
+ origin: 'api' | 'user';
277
+ /** The reason given to `preventDefault`, or `'prevented'`. */
278
+ reason: string;
279
+ }
280
+
281
+ /**
282
+ * The events a dashboard layout raises.
283
+ *
284
+ * The layout's own, not a grid's: `grid.on` takes {@link EventName} and knows
285
+ * nothing about these. Each has a matching `on…` config callback (`onWindowMoved`,
286
+ * `onBeforeWindowClose`, …) and both routes fire.
287
+ *
288
+ * The three `before…` events are cancellable: call `preventDefault(reason?)` on
289
+ * the payload, or return a Promise to hold the gesture until it settles; a veto
290
+ * fires the matching `…:cancelled` carrying the reason. Subscribing to `'*'`
291
+ * receives every past-tense event and never gates.
292
+ */
293
+ type LayoutEventName =
294
+ /** A window finished moving, with where it was asked to go and where it actually landed. */
295
+ | 'window:moved'
296
+ /** A window's payload container changed size, measured in CSS pixels — including on the opening frame. */
297
+ | 'window:resized'
298
+ /** A window was closed and its payload container handed back. */
299
+ | 'window:closed'
300
+ /** The arrangement settled after an add, close, move, resize, minimise, restore or `setLayout`. */
301
+ | 'layout:changed'
302
+ /** A window is about to move; cancellable. */
303
+ | 'beforeWindowMove'
304
+ /** A window is about to be resized by a drag or a call; cancellable. */
305
+ | 'beforeWindowResize'
306
+ /** A window is about to be closed; cancellable. */
307
+ | 'beforeWindowClose'
308
+ /** A `beforeWindowMove` handler refused the move. */
309
+ | 'windowMove:cancelled'
310
+ /** A `beforeWindowResize` handler refused the resize. */
311
+ | 'windowResize:cancelled'
312
+ /** A `beforeWindowClose` handler refused the close. */
313
+ | 'windowClose:cancelled';
314
+
315
+ /** What a handler receives, per layout event. */
316
+ interface LayoutEventPayloads {
317
+ /** Which window moved, from where, to where, and where it landed. */
318
+ 'window:moved': LayoutWindowMovedEvent;
319
+ /** The measured content box of the window's payload container. */
320
+ 'window:resized': LayoutResizeEvent;
321
+ /** The window that closed, and the container handed back. */
322
+ 'window:closed': LayoutWindowClosedEvent;
323
+ /** The arrangement, and what settled it. */
324
+ 'layout:changed': LayoutChangedEvent;
325
+ /** The move about to be applied, with `preventDefault` to stop it. */
326
+ beforeWindowMove: LayoutMoveEvent;
327
+ /** The resize about to be applied, with `preventDefault` to stop it. */
328
+ beforeWindowResize: LayoutMoveEvent;
329
+ /** The close about to happen, with `preventDefault` to refuse it. */
330
+ beforeWindowClose: LayoutCloseEvent;
331
+ /** The move that was refused, and why. */
332
+ 'windowMove:cancelled': LayoutMoveCancelledEvent;
333
+ /** The resize that was refused, and why. */
334
+ 'windowResize:cancelled': LayoutMoveCancelledEvent;
335
+ /** The close that was refused, and why. */
336
+ 'windowClose:cancelled': LayoutCloseCancelledEvent;
337
+ }
338
+
138
339
  /** The payload of `layout:changed`: the whole arrangement, plus what moved it. */
139
340
  interface LayoutChangedEvent extends LayoutSnapshot {
341
+ /**
342
+ * What moved the arrangement: `move`, `resize`, `close`, `add`, `minimise`, `restore`,
343
+ * `setLayout` or `init`.
344
+ */
140
345
  cause: string;
141
346
  }
142
347
 
@@ -196,15 +401,44 @@ interface LayoutConfig {
196
401
  ariaLabel?: string;
197
402
  /** A message catalogue, e.g. `grid.messages`; built-in English seeds otherwise. */
198
403
  messages?: { t(key: string, params?: Record<string, unknown>): string };
404
+ /** Called after a window has moved, alongside the `window:moved` event. */
199
405
  onWindowMoved?: (event: LayoutMoveEvent) => void;
406
+ /**
407
+ * Called when a window's measured content box changes, alongside `window:resized` —
408
+ * including on the opening frame.
409
+ */
200
410
  onWindowResized?: (event: LayoutResizeEvent) => void;
411
+ /**
412
+ * Called after a window has closed, with its content container handed back so the host
413
+ * can destroy what it mounted. Alongside `window:closed`.
414
+ */
201
415
  onWindowClosed?: (event: LayoutCloseEvent) => void;
416
+ /**
417
+ * Called whenever the arrangement settles, with the whole snapshot and what caused it —
418
+ * the hook for persisting a dashboard. Alongside `layout:changed`.
419
+ */
202
420
  onLayoutChanged?: (event: LayoutChangedEvent) => void;
421
+ /**
422
+ * Called before a move is applied. Return `false`, call `preventDefault(reason)`, or
423
+ * throw, to refuse it; return a promise and the move waits for it. Alongside the
424
+ * `beforeWindowMove` event.
425
+ */
203
426
  onBeforeWindowMove?: (event: LayoutMoveEvent) => boolean | void | Promise<boolean>;
427
+ /** Called before a resize is applied, on the same terms as `onBeforeWindowMove`. */
204
428
  onBeforeWindowResize?: (event: LayoutMoveEvent) => boolean | void | Promise<boolean>;
429
+ /**
430
+ * Called before a window closes, on the same terms as `onBeforeWindowMove`. This is
431
+ * where an unsaved-changes prompt belongs.
432
+ */
205
433
  onBeforeWindowClose?: (event: LayoutCloseEvent) => boolean | void | Promise<boolean>;
434
+ /**
435
+ * Called when a move was refused, with the reason on the payload. Alongside
436
+ * `windowMove:cancelled`.
437
+ */
206
438
  onWindowMoveCancelled?: (event: LayoutMoveEvent) => void;
439
+ /** Called when a resize was refused. Alongside `windowResize:cancelled`. */
207
440
  onWindowResizeCancelled?: (event: LayoutMoveEvent) => void;
441
+ /** Called when a close was refused. Alongside `windowClose:cancelled`. */
208
442
  onWindowCloseCancelled?: (event: LayoutCloseEvent) => void;
209
443
  }
210
444
 
@@ -219,6 +453,10 @@ interface LayoutConfig {
219
453
  * cannot know what one is.
220
454
  */
221
455
  interface Layout {
456
+ /**
457
+ * The element the layout was mounted on. It carries the layout's host class, which is
458
+ * also how a second `createLayout` on the same element is refused.
459
+ */
222
460
  readonly el: HTMLElement;
223
461
  /** The window ids, in mount order. */
224
462
  windows(): string[];
@@ -315,14 +553,18 @@ interface Layout {
315
553
  getInteractive(): LayoutInteractive;
316
554
  /** Re-measure every window and emit `window:resized` for those that changed. */
317
555
  refresh(): number;
556
+ /**
557
+ * Subscribe to a layout event, or to `'*'` for every past-tense one; returns a function
558
+ * that unsubscribes. Only an explicit `before…` subscription can cancel an action — the
559
+ * `'*'` stream never gates. What each event carries is {@link LayoutEventPayloads}; the
560
+ * handler is declared with the widest of them, so narrow on the name inside it.
561
+ */
318
562
  on(
319
- name: 'window:moved' | 'window:resized' | 'window:closed' | 'layout:changed'
320
- | 'beforeWindowMove' | 'beforeWindowResize' | 'beforeWindowClose'
321
- | 'windowMove:cancelled' | 'windowResize:cancelled' | 'windowClose:cancelled'
322
- | '*' | string,
323
- fn: (event: any) => unknown,
563
+ name: LayoutEventName | '*',
564
+ fn: (event: LayoutEventPayloads[LayoutEventName]) => unknown,
324
565
  ): () => void;
325
- off(name: string, fn: (event: any) => unknown): void;
566
+ /** Remove a handler registered with `on`. */
567
+ off(name: LayoutEventName | '*', fn: (event: LayoutEventPayloads[LayoutEventName]) => unknown): void;
326
568
  /** Tear the layout down; whatever the host mounted in a payload is the host's to destroy. */
327
569
  destroy(): void;
328
570
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, layout module
2
+ * Lattice Grid 1.68.2, layout module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -52,12 +52,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
52
52
  Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
53
53
  Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
54
54
  Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
55
- const STAMPED_VERSION="1.68.0";
55
+ const STAMPED_VERSION="1.68.2";
56
56
  async function resolveVersion(){
57
57
  if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
58
58
  return STAMPED_VERSION;
59
59
  }
60
- const VERSION="1.68.0";
60
+ const VERSION="1.68.2";
61
61
  const warned=new Set();
62
62
  const WARNED_LIMIT=2000;
63
63
  function rememberWarned(key){
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, layout module
2
+ * Lattice Grid 1.68.2, layout module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
54
54
  Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
55
55
  Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
56
56
  Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
57
- const STAMPED_VERSION="1.68.0";
57
+ const STAMPED_VERSION="1.68.2";
58
58
  async function resolveVersion(){
59
59
  if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
60
60
  return STAMPED_VERSION;
61
61
  }
62
- const VERSION="1.68.0";
62
+ const VERSION="1.68.2";
63
63
  const warned=new Set();
64
64
  const WARNED_LIMIT=2000;
65
65
  function rememberWarned(key){
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, layout module
2
+ * Lattice Grid 1.68.2, layout module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
54
54
  Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
55
55
  Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
56
56
  Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
57
- const STAMPED_VERSION="1.68.0";
57
+ const STAMPED_VERSION="1.68.2";
58
58
  async function resolveVersion(){
59
59
  if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
60
60
  return STAMPED_VERSION;
61
61
  }
62
- const VERSION="1.68.0";
62
+ const VERSION="1.68.2";
63
63
  const warned=new Set();
64
64
  const WARNED_LIMIT=2000;
65
65
  function rememberWarned(key){
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, mock-socket module type declarations
2
+ * Lattice Grid 1.68.2, mock-socket module type declarations
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -15,6 +15,11 @@ interface FeedChange { op: 'upsert' | 'delete'; row: FeedRow }
15
15
  * `kind`, exactly as against a real feed that framed its messages the same way.
16
16
  */
17
17
  interface FeedMessage {
18
+ /**
19
+ * Whether this message opens the feed with a full set of rows
20
+ * (`'snapshot'`, which the feed yields first) or carries changes to apply
21
+ * to what is already there (`'delta'`, every message after it).
22
+ */
18
23
  kind: 'snapshot' | 'delta';
19
24
  /** Present on a snapshot: the full opening set of rows. */
20
25
  rows?: FeedRow[];
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, mock-socket module
2
+ * Lattice Grid 1.68.2, mock-socket module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, mock-socket module
2
+ * Lattice Grid 1.68.2, mock-socket module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, mock-socket module
2
+ * Lattice Grid 1.68.2, mock-socket module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, react module type declarations
2
+ * Lattice Grid 1.68.2, react module type declarations
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -37,6 +37,10 @@ export type LatticeGridEventProps = {
37
37
 
38
38
  /** The live instance a `<LatticeGrid>` ref exposes; `null` before mount. */
39
39
  export interface LatticeGridHandle {
40
+ /**
41
+ * The live grid the component built, or null before the mount effect has run and after
42
+ * it has been destroyed.
43
+ */
40
44
  readonly grid: Grid | null;
41
45
  }
42
46
 
@@ -115,6 +119,10 @@ export function createLatticeGrid<Row = unknown>(deps: {
115
119
 
116
120
  /** The live instance a viewer component's ref exposes; `null` before mount. */
117
121
  export interface LatticeViewerHandle<Instance = unknown> {
122
+ /**
123
+ * The live viewer the component built — the board, panel, chart, plan, layout or strip
124
+ * — or null before mount.
125
+ */
118
126
  readonly instance: Instance | null;
119
127
  }
120
128
 
@@ -185,10 +193,19 @@ export type LatticeLayoutProps = Record<string, unknown> & LatticeViewerCommonPr
185
193
 
186
194
  /** One tab of a `<LatticeTabs>`; `content` makes it React's rather than the module's. */
187
195
  export interface LatticeTabSpec {
196
+ /**
197
+ * The tab's identity, used to select it, to name its slot and to derive another tab
198
+ * from it. Required, non-empty and unique; a duplicate or missing id is refused.
199
+ */
188
200
  id: string;
201
+ /** The text on the tab button. Defaults to the id. */
189
202
  label?: string;
190
203
  /** A React element, or a function returning one, rendered through a portal. */
191
204
  content?: unknown | (() => unknown);
205
+ /**
206
+ * Any other prop the host wants to carry on the tab. Passed through untouched, so a
207
+ * React host can key its own state off the same object the grid holds.
208
+ */
192
209
  [key: string]: unknown;
193
210
  }
194
211
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, react module
2
+ * Lattice Grid 1.68.2, react module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -52,12 +52,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
52
52
  Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
53
53
  Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
54
54
  Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
55
- const STAMPED_VERSION="1.68.0";
55
+ const STAMPED_VERSION="1.68.2";
56
56
  async function resolveVersion(){
57
57
  if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
58
58
  return STAMPED_VERSION;
59
59
  }
60
- const VERSION="1.68.0";
60
+ const VERSION="1.68.2";
61
61
  const warned=new Set();
62
62
  const WARNED_LIMIT=2000;
63
63
  function rememberWarned(key){
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, react module
2
+ * Lattice Grid 1.68.2, react module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
54
54
  Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
55
55
  Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
56
56
  Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
57
- const STAMPED_VERSION="1.68.0";
57
+ const STAMPED_VERSION="1.68.2";
58
58
  async function resolveVersion(){
59
59
  if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
60
60
  return STAMPED_VERSION;
61
61
  }
62
- const VERSION="1.68.0";
62
+ const VERSION="1.68.2";
63
63
  const warned=new Set();
64
64
  const WARNED_LIMIT=2000;
65
65
  function rememberWarned(key){
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, react module
2
+ * Lattice Grid 1.68.2, react module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
54
54
  Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
55
55
  Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
56
56
  Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
57
- const STAMPED_VERSION="1.68.0";
57
+ const STAMPED_VERSION="1.68.2";
58
58
  async function resolveVersion(){
59
59
  if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
60
60
  return STAMPED_VERSION;
61
61
  }
62
- const VERSION="1.68.0";
62
+ const VERSION="1.68.2";
63
63
  const warned=new Set();
64
64
  const WARNED_LIMIT=2000;
65
65
  function rememberWarned(key){
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, svelte module type declarations
2
+ * Lattice Grid 1.68.2, svelte module type declarations
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, svelte module
2
+ * Lattice Grid 1.68.2, svelte module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -52,12 +52,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
52
52
  Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
53
53
  Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
54
54
  Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
55
- const STAMPED_VERSION="1.68.0";
55
+ const STAMPED_VERSION="1.68.2";
56
56
  async function resolveVersion(){
57
57
  if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
58
58
  return STAMPED_VERSION;
59
59
  }
60
- const VERSION="1.68.0";
60
+ const VERSION="1.68.2";
61
61
  const warned=new Set();
62
62
  const WARNED_LIMIT=2000;
63
63
  function rememberWarned(key){
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, svelte module
2
+ * Lattice Grid 1.68.2, svelte module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
54
54
  Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
55
55
  Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
56
56
  Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
57
- const STAMPED_VERSION="1.68.0";
57
+ const STAMPED_VERSION="1.68.2";
58
58
  async function resolveVersion(){
59
59
  if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
60
60
  return STAMPED_VERSION;
61
61
  }
62
- const VERSION="1.68.0";
62
+ const VERSION="1.68.2";
63
63
  const warned=new Set();
64
64
  const WARNED_LIMIT=2000;
65
65
  function rememberWarned(key){
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.68.0, svelte module
2
+ * Lattice Grid 1.68.2, svelte module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -54,12 +54,12 @@ Object.defineProperty(__exports,"frameBatched",{enumerable:true,get:function(){r
54
54
  Object.defineProperty(__exports,"settleDebounce",{enumerable:true,get:function(){return settleDebounce;}});
55
55
  Object.defineProperty(__exports,"whenIdle",{enumerable:true,get:function(){return whenIdle;}});
56
56
  Object.defineProperty(__exports,"uid",{enumerable:true,get:function(){return uid;}});
57
- const STAMPED_VERSION="1.68.0";
57
+ const STAMPED_VERSION="1.68.2";
58
58
  async function resolveVersion(){
59
59
  if(STAMPED_VERSION!=='0.0.0-source')return STAMPED_VERSION;
60
60
  return STAMPED_VERSION;
61
61
  }
62
- const VERSION="1.68.0";
62
+ const VERSION="1.68.2";
63
63
  const warned=new Set();
64
64
  const WARNED_LIMIT=2000;
65
65
  function rememberWarned(key){