@toclocoinc/lattice-grid 1.67.0 → 1.68.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.
Files changed (163) hide show
  1. package/README.md +1 -1
  2. package/angular/package.json +1 -1
  3. package/docs/API.html +5334 -3788
  4. package/docs/api-detail.html +40 -5
  5. package/lattice-grid.d.ts +3368 -2
  6. package/lattice-grid.esm.min.js +32 -10
  7. package/lattice-grid.min.cjs +32 -10
  8. package/lattice-grid.min.js +32 -10
  9. package/modules/ai.d.ts +64 -1
  10. package/modules/ai.esm.min.js +3 -3
  11. package/modules/ai.min.cjs +3 -3
  12. package/modules/ai.min.js +3 -3
  13. package/modules/angular.d.ts +1 -1
  14. package/modules/angular.esm.min.js +3 -3
  15. package/modules/angular.min.cjs +3 -3
  16. package/modules/angular.min.js +3 -3
  17. package/modules/chart-alluvial.d.ts +1 -1
  18. package/modules/chart-alluvial.esm.min.js +1 -1
  19. package/modules/chart-alluvial.min.cjs +1 -1
  20. package/modules/chart-alluvial.min.js +1 -1
  21. package/modules/chart-arc.d.ts +1 -1
  22. package/modules/chart-arc.esm.min.js +1 -1
  23. package/modules/chart-arc.min.cjs +1 -1
  24. package/modules/chart-arc.min.js +1 -1
  25. package/modules/chart-bubblemap.d.ts +1 -1
  26. package/modules/chart-bubblemap.esm.min.js +1 -1
  27. package/modules/chart-bubblemap.min.cjs +1 -1
  28. package/modules/chart-bubblemap.min.js +1 -1
  29. package/modules/chart-bump.d.ts +1 -1
  30. package/modules/chart-bump.esm.min.js +1 -1
  31. package/modules/chart-bump.min.cjs +1 -1
  32. package/modules/chart-bump.min.js +1 -1
  33. package/modules/chart-calendar.d.ts +1 -1
  34. package/modules/chart-calendar.esm.min.js +1 -1
  35. package/modules/chart-calendar.min.cjs +1 -1
  36. package/modules/chart-calendar.min.js +1 -1
  37. package/modules/chart-decomposition.d.ts +1 -1
  38. package/modules/chart-decomposition.esm.min.js +1 -1
  39. package/modules/chart-decomposition.min.cjs +1 -1
  40. package/modules/chart-decomposition.min.js +1 -1
  41. package/modules/chart-diverging.d.ts +1 -1
  42. package/modules/chart-diverging.esm.min.js +1 -1
  43. package/modules/chart-diverging.min.cjs +1 -1
  44. package/modules/chart-diverging.min.js +1 -1
  45. package/modules/chart-dumbbell.d.ts +1 -1
  46. package/modules/chart-dumbbell.esm.min.js +1 -1
  47. package/modules/chart-dumbbell.min.cjs +1 -1
  48. package/modules/chart-dumbbell.min.js +1 -1
  49. package/modules/chart-fan.d.ts +1 -1
  50. package/modules/chart-fan.esm.min.js +1 -1
  51. package/modules/chart-fan.min.cjs +1 -1
  52. package/modules/chart-fan.min.js +1 -1
  53. package/modules/chart-hexbin.d.ts +1 -1
  54. package/modules/chart-hexbin.esm.min.js +1 -1
  55. package/modules/chart-hexbin.min.cjs +1 -1
  56. package/modules/chart-hexbin.min.js +1 -1
  57. package/modules/chart-hexmap.d.ts +1 -1
  58. package/modules/chart-hexmap.esm.min.js +1 -1
  59. package/modules/chart-hexmap.min.cjs +1 -1
  60. package/modules/chart-hexmap.min.js +1 -1
  61. package/modules/chart-icicle.d.ts +1 -1
  62. package/modules/chart-icicle.esm.min.js +1 -1
  63. package/modules/chart-icicle.min.cjs +1 -1
  64. package/modules/chart-icicle.min.js +1 -1
  65. package/modules/chart-markermap.d.ts +1 -1
  66. package/modules/chart-markermap.esm.min.js +1 -1
  67. package/modules/chart-markermap.min.cjs +1 -1
  68. package/modules/chart-markermap.min.js +1 -1
  69. package/modules/chart-parallel.d.ts +1 -1
  70. package/modules/chart-parallel.esm.min.js +1 -1
  71. package/modules/chart-parallel.min.cjs +1 -1
  72. package/modules/chart-parallel.min.js +1 -1
  73. package/modules/chart-ridgeline.d.ts +1 -1
  74. package/modules/chart-ridgeline.esm.min.js +1 -1
  75. package/modules/chart-ridgeline.min.cjs +1 -1
  76. package/modules/chart-ridgeline.min.js +1 -1
  77. package/modules/chart-roc.d.ts +1 -1
  78. package/modules/chart-roc.esm.min.js +1 -1
  79. package/modules/chart-roc.min.cjs +1 -1
  80. package/modules/chart-roc.min.js +1 -1
  81. package/modules/chart-slope.d.ts +1 -1
  82. package/modules/chart-slope.esm.min.js +1 -1
  83. package/modules/chart-slope.min.cjs +1 -1
  84. package/modules/chart-slope.min.js +1 -1
  85. package/modules/chart-splom.d.ts +1 -1
  86. package/modules/chart-splom.esm.min.js +1 -1
  87. package/modules/chart-splom.min.cjs +1 -1
  88. package/modules/chart-splom.min.js +1 -1
  89. package/modules/chart-waffle.d.ts +1 -1
  90. package/modules/chart-waffle.esm.min.js +1 -1
  91. package/modules/chart-waffle.min.cjs +1 -1
  92. package/modules/chart-waffle.min.js +1 -1
  93. package/modules/charts.d.ts +16 -1
  94. package/modules/charts.esm.min.js +1391 -1257
  95. package/modules/charts.min.cjs +1391 -1257
  96. package/modules/charts.min.js +1391 -1257
  97. package/modules/data-router.d.ts +227 -1
  98. package/modules/data-router.esm.min.js +204 -8
  99. package/modules/data-router.min.cjs +204 -8
  100. package/modules/data-router.min.js +204 -8
  101. package/modules/devtools.d.ts +1 -1
  102. package/modules/devtools.esm.min.js +1 -1
  103. package/modules/devtools.min.cjs +1 -1
  104. package/modules/devtools.min.js +1 -1
  105. package/modules/dhtmlx-compat.d.ts +1 -1
  106. package/modules/dhtmlx-compat.esm.min.js +3 -3
  107. package/modules/dhtmlx-compat.min.cjs +3 -3
  108. package/modules/dhtmlx-compat.min.js +3 -3
  109. package/modules/gantt.d.ts +302 -1
  110. package/modules/gantt.esm.min.js +32 -7
  111. package/modules/gantt.min.cjs +32 -7
  112. package/modules/gantt.min.js +32 -7
  113. package/modules/geo-europe-nuts.d.ts +1 -1
  114. package/modules/geo-europe-nuts.esm.min.js +1 -1
  115. package/modules/geo-uk.d.ts +1 -1
  116. package/modules/geo-uk.esm.min.js +1 -1
  117. package/modules/geo-us-states.d.ts +1 -1
  118. package/modules/geo-us-states.esm.min.js +1 -1
  119. package/modules/geo-world-110m.d.ts +1 -1
  120. package/modules/geo-world-110m.esm.min.js +1 -1
  121. package/modules/geo-world-50m.d.ts +1 -1
  122. package/modules/geo-world-50m.esm.min.js +1 -1
  123. package/modules/htmx.d.ts +1 -1
  124. package/modules/htmx.esm.min.js +32 -10
  125. package/modules/htmx.min.cjs +32 -10
  126. package/modules/htmx.min.js +32 -10
  127. package/modules/kanban.d.ts +233 -1
  128. package/modules/kanban.esm.min.js +3 -3
  129. package/modules/kanban.min.cjs +3 -3
  130. package/modules/kanban.min.js +3 -3
  131. package/modules/kpi.d.ts +196 -8
  132. package/modules/kpi.esm.min.js +32 -7
  133. package/modules/kpi.min.cjs +32 -7
  134. package/modules/kpi.min.js +32 -7
  135. package/modules/layout.d.ts +117 -1
  136. package/modules/layout.esm.min.js +3 -3
  137. package/modules/layout.min.cjs +3 -3
  138. package/modules/layout.min.js +3 -3
  139. package/modules/mock-socket.d.ts +6 -1
  140. package/modules/mock-socket.esm.min.js +1 -1
  141. package/modules/mock-socket.min.cjs +1 -1
  142. package/modules/mock-socket.min.js +1 -1
  143. package/modules/react.d.ts +14 -1
  144. package/modules/react.esm.min.js +3 -3
  145. package/modules/react.min.cjs +3 -3
  146. package/modules/react.min.js +3 -3
  147. package/modules/svelte.d.ts +1 -1
  148. package/modules/svelte.esm.min.js +3 -3
  149. package/modules/svelte.min.cjs +3 -3
  150. package/modules/svelte.min.js +3 -3
  151. package/modules/tabs.d.ts +30 -1
  152. package/modules/tabs.esm.min.js +13 -14
  153. package/modules/tabs.min.cjs +13 -14
  154. package/modules/tabs.min.js +13 -14
  155. package/modules/vue.d.ts +8 -1
  156. package/modules/vue.esm.min.js +3 -3
  157. package/modules/vue.min.cjs +3 -3
  158. package/modules/vue.min.js +3 -3
  159. package/modules/webcomponent.d.ts +113 -1
  160. package/modules/webcomponent.esm.min.js +32 -10
  161. package/modules/webcomponent.min.cjs +32 -10
  162. package/modules/webcomponent.min.js +32 -10
  163. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.67.0, kpi module
2
+ * Lattice Grid 1.68.1, kpi 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.67.0";
57
+ const STAMPED_VERSION="1.68.1";
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.67.0";
62
+ const VERSION="1.68.1";
63
63
  const warned=new Set();
64
64
  const WARNED_LIMIT=2000;
65
65
  function rememberWarned(key){
@@ -827,7 +827,15 @@ const rank=Math.max(SEVERITY[a]||0,SEVERITY[b]||0);
827
827
  return BY_RANK[rank];
828
828
  }
829
829
  function resolveHierarchy(config,tiles){
830
- if(config===false||!tiles.length)return null;
830
+ if(!tiles.length)return null;
831
+ if(config===false)return null;
832
+ if(config===undefined||config===null){
833
+ if(tiles.some((t)=>t.id.includes(DEFAULT_SEPARATOR))){
834
+ warnOnce('kpi:tree:dotted-id',
835
+ 'kpi: tile ids contain dots; set `tree` to render them as a hierarchy.');
836
+ }
837
+ return null;
838
+ }
831
839
  const cfg=isObject(config)?config:{};
832
840
  const order=tiles.map((_,i)=>i);
833
841
  const keyOf=(physical)=>tiles[physical].id;
@@ -1186,14 +1194,20 @@ return node;
1186
1194
  function deltaNode(doc,fig,t){
1187
1195
  const dir=t.delta>0?'up':(t.delta<0?'down':'flat');
1188
1196
  const arrow=t.delta>0?'▲':(t.delta<0?'▼':'■');
1197
+ const abs=t.deltaFormatted??t.delta;
1189
1198
  const pct=t.deltaPercent===null||t.deltaPercent===undefined
1190
- ?'':` (${(t.deltaPercent*100).toFixed(1)}%)`;
1199
+ ?null:`${(t.deltaPercent*100).toFixed(1)}%`;
1200
+ const mode=t.deltaMode||'both';
1201
+ let text;
1202
+ if(mode==='absolute'||pct===null)text=`${arrow} ${abs}`;
1203
+ else if(mode==='relative')text=`${arrow} ${pct}`;
1204
+ else text=`${arrow} ${abs} (${pct})`;
1191
1205
  const node=childByClass(fig,`${NS}__delta`)||div(doc,`${NS}__delta`);
1192
1206
  for(const d of['up','down','flat']){
1193
1207
  if(d!==dir)node.classList.remove(`${NS}__delta--${d}`);
1194
1208
  }
1195
1209
  node.classList.add(`${NS}__delta--${dir}`);
1196
- setText(node,`${arrow} ${t.deltaFormatted??t.delta}${pct}`);
1210
+ setText(node,text);
1197
1211
  return node;
1198
1212
  }
1199
1213
  function sparkNode(doc,fig,t){
@@ -5584,7 +5598,7 @@ const columns=this.#columnList();
5584
5598
  const parts=[];
5585
5599
  const hidden=this.#ctx.columnHidden;
5586
5600
  for(const column of columns){
5587
- if(column.filter&&column.filter.enabled===false)continue;
5601
+ if(column.quickFilter===false)continue;
5588
5602
  if(isFunction(hidden)&&hidden(column.id))continue;
5589
5603
  const custom=column.value&&isFunction(column.value.quickFilterText)
5590
5604
  ?column.value.quickFilterText({value:undefined,data,row:null,column,colId:column.id,grid:null,context:this.#state('context',null)})
@@ -5845,6 +5859,7 @@ const readClock=__m7["readClock"];
5845
5859
  const KPI_EVENTS=Object.freeze([
5846
5860
  'tile:click','tile:dblclick','tile:contextmenu','node:toggle','change',
5847
5861
  ]);
5862
+ const DELTA_MODES=Object.freeze(['absolute','relative','both']);
5848
5863
  const GRID_FOLLOW_EVENTS=Object.freeze([
5849
5864
  'rows:changed','filter:changed','sort:changed','cell:changed','model:changed',
5850
5865
  'stream:chunk','stream:evicted',
@@ -5910,12 +5925,20 @@ format:spec.format,
5910
5925
  target:spec.target,
5911
5926
  barBounds:barBounds(spec),
5912
5927
  baseline:spec.baseline,
5928
+ deltaMode:resolveDeltaMode(spec.delta,id),
5913
5929
  spark:normaliseSpark(spec.sparkline),
5914
5930
  acc,
5915
5931
  members:0,
5916
5932
  noColumn:false,
5917
5933
  };
5918
5934
  }
5935
+ function resolveDeltaMode(raw,id){
5936
+ if(raw===undefined)return'both';
5937
+ if(DELTA_MODES.includes(raw))return raw;
5938
+ warnOnce(`kpi:delta:${id}`,
5939
+ `kpi: tile "${id}" has delta: ${JSON.stringify(raw)}; expected one of ${DELTA_MODES.join(', ')}. Falling back to 'both'.`);
5940
+ return'both';
5941
+ }
5919
5942
  function normaliseSpark(s){
5920
5943
  if(!s)return null;
5921
5944
  if(typeof s==='string')return{x:undefined,y:accessorFor(s)};
@@ -6162,6 +6185,7 @@ baseline:undefined,
6162
6185
  delta:null,
6163
6186
  deltaPercent:null,
6164
6187
  deltaFormatted:undefined,
6188
+ deltaMode:undefined,
6165
6189
  count:0,
6166
6190
  sparkline:null,
6167
6191
  bar:null,
@@ -6199,6 +6223,7 @@ baseline:t.baseline,
6199
6223
  delta,
6200
6224
  deltaPercent,
6201
6225
  deltaFormatted,
6226
+ deltaMode:t.deltaMode,
6202
6227
  count:t.members,
6203
6228
  sparkline:sparkFor(t),
6204
6229
  bar:t.barBounds
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.67.0, layout module type declarations
2
+ * Lattice Grid 1.68.1, 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,65 @@ 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
 
138
211
  /** The payload of `layout:changed`: the whole arrangement, plus what moved it. */
139
212
  interface LayoutChangedEvent extends LayoutSnapshot {
213
+ /**
214
+ * What moved the arrangement: `move`, `resize`, `close`, `add`, `minimise`, `restore`,
215
+ * `setLayout` or `init`.
216
+ */
140
217
  cause: string;
141
218
  }
142
219
 
@@ -196,15 +273,44 @@ interface LayoutConfig {
196
273
  ariaLabel?: string;
197
274
  /** A message catalogue, e.g. `grid.messages`; built-in English seeds otherwise. */
198
275
  messages?: { t(key: string, params?: Record<string, unknown>): string };
276
+ /** Called after a window has moved, alongside the `window:moved` event. */
199
277
  onWindowMoved?: (event: LayoutMoveEvent) => void;
278
+ /**
279
+ * Called when a window's measured content box changes, alongside `window:resized` —
280
+ * including on the opening frame.
281
+ */
200
282
  onWindowResized?: (event: LayoutResizeEvent) => void;
283
+ /**
284
+ * Called after a window has closed, with its content container handed back so the host
285
+ * can destroy what it mounted. Alongside `window:closed`.
286
+ */
201
287
  onWindowClosed?: (event: LayoutCloseEvent) => void;
288
+ /**
289
+ * Called whenever the arrangement settles, with the whole snapshot and what caused it —
290
+ * the hook for persisting a dashboard. Alongside `layout:changed`.
291
+ */
202
292
  onLayoutChanged?: (event: LayoutChangedEvent) => void;
293
+ /**
294
+ * Called before a move is applied. Return `false`, call `preventDefault(reason)`, or
295
+ * throw, to refuse it; return a promise and the move waits for it. Alongside the
296
+ * `beforeWindowMove` event.
297
+ */
203
298
  onBeforeWindowMove?: (event: LayoutMoveEvent) => boolean | void | Promise<boolean>;
299
+ /** Called before a resize is applied, on the same terms as `onBeforeWindowMove`. */
204
300
  onBeforeWindowResize?: (event: LayoutMoveEvent) => boolean | void | Promise<boolean>;
301
+ /**
302
+ * Called before a window closes, on the same terms as `onBeforeWindowMove`. This is
303
+ * where an unsaved-changes prompt belongs.
304
+ */
205
305
  onBeforeWindowClose?: (event: LayoutCloseEvent) => boolean | void | Promise<boolean>;
306
+ /**
307
+ * Called when a move was refused, with the reason on the payload. Alongside
308
+ * `windowMove:cancelled`.
309
+ */
206
310
  onWindowMoveCancelled?: (event: LayoutMoveEvent) => void;
311
+ /** Called when a resize was refused. Alongside `windowResize:cancelled`. */
207
312
  onWindowResizeCancelled?: (event: LayoutMoveEvent) => void;
313
+ /** Called when a close was refused. Alongside `windowClose:cancelled`. */
208
314
  onWindowCloseCancelled?: (event: LayoutCloseEvent) => void;
209
315
  }
210
316
 
@@ -219,6 +325,10 @@ interface LayoutConfig {
219
325
  * cannot know what one is.
220
326
  */
221
327
  interface Layout {
328
+ /**
329
+ * The element the layout was mounted on. It carries the layout's host class, which is
330
+ * also how a second `createLayout` on the same element is refused.
331
+ */
222
332
  readonly el: HTMLElement;
223
333
  /** The window ids, in mount order. */
224
334
  windows(): string[];
@@ -315,6 +425,11 @@ interface Layout {
315
425
  getInteractive(): LayoutInteractive;
316
426
  /** Re-measure every window and emit `window:resized` for those that changed. */
317
427
  refresh(): number;
428
+ /**
429
+ * Subscribe to a layout event, or to `'*'` for every past-tense one; returns a function
430
+ * that unsubscribes. Only an explicit `before…` subscription can cancel an action — the
431
+ * `'*'` stream never gates.
432
+ */
318
433
  on(
319
434
  name: 'window:moved' | 'window:resized' | 'window:closed' | 'layout:changed'
320
435
  | 'beforeWindowMove' | 'beforeWindowResize' | 'beforeWindowClose'
@@ -322,6 +437,7 @@ interface Layout {
322
437
  | '*' | string,
323
438
  fn: (event: any) => unknown,
324
439
  ): () => void;
440
+ /** Remove a handler registered with `on`. */
325
441
  off(name: string, fn: (event: any) => unknown): void;
326
442
  /** Tear the layout down; whatever the host mounted in a payload is the host's to destroy. */
327
443
  destroy(): void;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.67.0, layout module
2
+ * Lattice Grid 1.68.1, 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.67.0";
55
+ const STAMPED_VERSION="1.68.1";
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.67.0";
60
+ const VERSION="1.68.1";
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.67.0, layout module
2
+ * Lattice Grid 1.68.1, 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.67.0";
57
+ const STAMPED_VERSION="1.68.1";
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.67.0";
62
+ const VERSION="1.68.1";
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.67.0, layout module
2
+ * Lattice Grid 1.68.1, 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.67.0";
57
+ const STAMPED_VERSION="1.68.1";
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.67.0";
62
+ const VERSION="1.68.1";
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.67.0, mock-socket module type declarations
2
+ * Lattice Grid 1.68.1, 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.67.0, mock-socket module
2
+ * Lattice Grid 1.68.1, 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.67.0, mock-socket module
2
+ * Lattice Grid 1.68.1, 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.67.0, mock-socket module
2
+ * Lattice Grid 1.68.1, 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.67.0, react module type declarations
2
+ * Lattice Grid 1.68.1, 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,7 +193,12 @@ 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);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.67.0, react module
2
+ * Lattice Grid 1.68.1, 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.67.0";
55
+ const STAMPED_VERSION="1.68.1";
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.67.0";
60
+ const VERSION="1.68.1";
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.67.0, react module
2
+ * Lattice Grid 1.68.1, 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.67.0";
57
+ const STAMPED_VERSION="1.68.1";
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.67.0";
62
+ const VERSION="1.68.1";
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.67.0, react module
2
+ * Lattice Grid 1.68.1, 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.67.0";
57
+ const STAMPED_VERSION="1.68.1";
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.67.0";
62
+ const VERSION="1.68.1";
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.67.0, svelte module type declarations
2
+ * Lattice Grid 1.68.1, 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.67.0, svelte module
2
+ * Lattice Grid 1.68.1, 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.67.0";
55
+ const STAMPED_VERSION="1.68.1";
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.67.0";
60
+ const VERSION="1.68.1";
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.67.0, svelte module
2
+ * Lattice Grid 1.68.1, 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.67.0";
57
+ const STAMPED_VERSION="1.68.1";
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.67.0";
62
+ const VERSION="1.68.1";
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.67.0, svelte module
2
+ * Lattice Grid 1.68.1, 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.67.0";
57
+ const STAMPED_VERSION="1.68.1";
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.67.0";
62
+ const VERSION="1.68.1";
63
63
  const warned=new Set();
64
64
  const WARNED_LIMIT=2000;
65
65
  function rememberWarned(key){