spell-ui 0.8.11 → 0.8.13

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 (68) hide show
  1. package/README-components.md +5 -3
  2. package/dist/{Dragging-B93hbRxF.js → Dragging-tHPSvf3G.js} +56 -13
  3. package/dist/Dragging-tHPSvf3G.js.map +1 -0
  4. package/dist/_spell-element/DOMElement.d.ts +8 -1
  5. package/dist/_spell-element/drawnWindow.d.ts +62 -0
  6. package/dist/_util/Dragging.d.ts +7 -0
  7. package/dist/components/components.types.d.ts +2 -0
  8. package/dist/components/ui-diagram/UIDiagram.d.ts +3 -0
  9. package/dist/components/ui-graph/GraphLayout.d.ts +54 -0
  10. package/dist/components/ui-graph/UIGraph.d.ts +355 -0
  11. package/dist/components/ui-graph/UIGraph.en.d.ts +137 -0
  12. package/dist/components/ui-graph/UIGraph.es.d.ts +48 -0
  13. package/dist/components/ui-graph/UIGraph.types.d.ts +193 -0
  14. package/dist/components/ui-graph/index.d.ts +5 -0
  15. package/dist/components/ui-json/UIJson.d.ts +275 -10
  16. package/dist/components/ui-json/UIJson.en.d.ts +148 -9
  17. package/dist/components/ui-json/UIJson.es.d.ts +34 -3
  18. package/dist/components/ui-json/index.d.ts +2 -2
  19. package/dist/components/ui-split-panel/UISplitPanel.d.ts +2 -16
  20. package/dist/components/ui-tree/UITree.d.ts +758 -26
  21. package/dist/components/ui-tree/UITree.en.d.ts +113 -3
  22. package/dist/components/ui-tree/UITree.es.d.ts +24 -0
  23. package/dist/components/ui-tree/UITree.types.d.ts +34 -0
  24. package/dist/components/ui-tree/UITreeItem.d.ts +40 -1
  25. package/dist/components/ui-tree/UITreeItem.en.d.ts +9 -0
  26. package/dist/components/ui-tree/UITreeItem.es.d.ts +2 -0
  27. package/dist/components/ui-tree/index.d.ts +3 -2
  28. package/dist/components/ui-tree-diagram/UITreeDiagram.d.ts +3 -0
  29. package/dist/{components.es-DEa8Ep42.js → components.es-DilRG1VO.js} +117 -9
  30. package/dist/components.es-DilRG1VO.js.map +1 -0
  31. package/dist/core.js +713 -671
  32. package/dist/core.js.map +1 -1
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.js +97 -96
  35. package/dist/jsx.d.ts +489 -20
  36. package/dist/ui-diagram.js +2 -2
  37. package/dist/ui-diagram.js.map +1 -1
  38. package/dist/ui-graph.editor-DLsXPyby.js +5 -0
  39. package/dist/ui-graph.editor-DLsXPyby.js.map +1 -0
  40. package/dist/ui-graph.js +1295 -0
  41. package/dist/ui-graph.js.map +1 -0
  42. package/dist/ui-json.editor-BS-v1bqO.js +5 -0
  43. package/dist/ui-json.editor-BS-v1bqO.js.map +1 -0
  44. package/dist/ui-json.js +629 -32
  45. package/dist/ui-json.js.map +1 -1
  46. package/dist/ui-property-editor.js +3 -2
  47. package/dist/ui-property-editor.js.map +1 -1
  48. package/dist/ui-root.js +34 -3
  49. package/dist/ui-root.js.map +1 -1
  50. package/dist/ui-site-nav.js +4 -4
  51. package/dist/ui-site-nav.js.map +1 -1
  52. package/dist/ui-split-panel.js +31 -61
  53. package/dist/ui-split-panel.js.map +1 -1
  54. package/dist/ui-tree-diagram.js +1 -1
  55. package/dist/ui-tree-diagram.js.map +1 -1
  56. package/dist/ui-tree.editor-Bqsa0dYQ.js +5 -0
  57. package/dist/ui-tree.editor-Bqsa0dYQ.js.map +1 -0
  58. package/dist/ui-tree.js +1734 -237
  59. package/dist/ui-tree.js.map +1 -1
  60. package/dist/util/PaneSizes.d.ts +42 -0
  61. package/dist/util/index.d.ts +2 -0
  62. package/package.json +1 -1
  63. package/dist/Dragging-B93hbRxF.js.map +0 -1
  64. package/dist/components.es-DEa8Ep42.js.map +0 -1
  65. package/dist/ui-json.editor-BgZbrB_W.js +0 -5
  66. package/dist/ui-json.editor-BgZbrB_W.js.map +0 -1
  67. package/dist/ui-tree.editor-BoQztwdz.js +0 -5
  68. package/dist/ui-tree.editor-BoQztwdz.js.map +0 -1
@@ -1,6 +1,21 @@
1
1
  import { E } from 'spell/ui/core';
2
2
  import { treeVocabulary } from './UITree.en';
3
+ import { RowPart, TreeItemData } from './UITree.types';
3
4
  import { UITreeItem } from './UITreeItem';
5
+ /****************
6
+ * ### `DOMTreeElement`
7
+ * The `<ui-tree>` in the page: its script API, over its component (`UITree`).
8
+ ****************/
9
+ export declare class DOMTreeElement extends E.DOMElement<UITree> {
10
+ /**
11
+ * Open it so `levels` levels of rows show (`UITree.openTo()`): in columns, that many columns.
12
+ * - Settles once they show, rows a page adds as their row opens and promised `children` included.
13
+ * - NEVER rejects.
14
+ */
15
+ openTo(levels: number): Promise<void>;
16
+ /** Close every row, so only the top rows show (`UITree.closeAll()`). */
17
+ closeAll(): void;
18
+ }
4
19
  /****************
5
20
  * ### `UITree`
6
21
  * The component behind `<ui-tree>`: rows nested in rows (`<ui-tree-item>`s), which open and close,
@@ -16,6 +31,10 @@ import { UITreeItem } from './UITreeItem';
16
31
  * - `filter`: only the rows whose words hold it, with the rows they're inside kept open.
17
32
  * It changes no row's `open`. Rows drawn only once their parent opens can't be found while that's closed.
18
33
  * - Plain walks over its light DOM, so 500 rows filter in a few milliseconds.
34
+ * - `openTo(levels)` and `closeAll()`: open it so that many levels of rows show, as a person would; in columns,
35
+ * that many columns. Rows still to come (`expandable`, promised `children`) are waited for, a level at a time.
36
+ * - `tools` draws a button for each, "Open 2 levels", "Open 3 levels", "Close all";
37
+ * `slot="tools"` goes at the end of their line (a filter field, say).
19
38
  * - `appearance="columns"`: a column per level, side by side, as a Mac's Finder shows folders.
20
39
  * - The same rows, nested the same way: each open row draws the rows inside it as the next column
21
40
  * (`UITreeColumns.css`).
@@ -23,11 +42,46 @@ import { UITreeItem } from './UITreeItem';
23
42
  * the open rows are the chain of picks, one a column (a picked row with no rows is open too, drawing none).
24
43
  * - The keys select as they move: up and down within a column; right and left to the next and previous column.
25
44
  * - `column-titles`: a title over each column, by level.
26
- * - The line after each column resizes it: dragged, or its arrow keys; a double-click puts it back.
27
- * A tree with an `id` remembers the widths in this browser, under it; one without, until the page reloads.
45
+ * - `size`: each column's width, by level (`E.PaneSizes`, as `<ui-split-panel>` reads its sizes): px, `em`, a
46
+ * percent of the box of columns, `auto` to fit the rows it shows (measured, `fitWidths`), `*` for the token's.
47
+ * - The line after each column resizes it, as a Mac's Finder's does: dragged, or its arrow keys; with Option (Alt),
48
+ * every column together; a double-click fits the column to its longest row, with Option every column.
49
+ * A width set so wins over `size`. A tree with an `id` remembers them in this browser (the `ui-tree` store,
50
+ * `widths:<id>`); one without, until the page reloads.
51
+ * - `path`: the ids of each column's pick, from the top; set it to open a path, read it as people pick.
52
+ * A tree with an `id` keeps it in the same store (`path:<id>`), and opens it again on a page that sets none.
53
+ * - `slot="detail"`: a pane after the last column, tight against it, showing what's picked (`detailPane()`).
54
+ * - Drawn only while something is slotted and something is picked; the tree sets the slotted element's `item`.
55
+ * - As wide as its content, until its line is dragged (kept with the widths); the columns make room for it.
56
+ * - `sticky-detail`: it stays in view at the box's end while the columns scroll sideways.
57
+ * - `filter` filters one column: the last one on screen as the filter starts, so moving about doesn't move it.
58
+ * After its rows, the matches elsewhere in the tree, at any depth (`otherMatches`): a click on one opens the
59
+ * path to it. The column's kept pick, which may not match, is dimmed (`unmatched`). From `items`, it runs the `children` functions to look, waiting for promised ones, but opens no
60
+ * column.
61
+ * - `sticky-path`: the path line above the columns, naming each column's pick; a click on one picks it again,
62
+ * keeping the columns after it, and scrolls its column into view.
63
+ * The selected row's name is in bold; outer names that would show fewer than about 3 letters fold into one `…`.
64
+ * - Narrow columns: while the columns don't fit the tree's width, the first ones narrow to a strip with their pick's
65
+ * name, as few as it takes, never the last `narrow-before` (2) nor the selected row's.
66
+ * The pointer or the focus on one draws it whole again, OVER the columns after it, which stay put.
67
+ * While even the strips don't make room, the full columns share what they leave (`fullColumnMostPx`).
68
+ * - The box scrolls sideways a column at a time (it snaps), and keeps the selected row's column in view.
69
+ * - `show`: which parts each row shows (`icon which count chevron`).
70
+ * - An `expandable` row picked before its rows come shows a spinner in its column (`<ui-loader>`).
71
+ * - Its rows can be DATA instead: `items`, a `TreeItemData` list, drawn in its shadow root ("Columns from data").
72
+ * For big trees: a `children` function runs the first time its item opens, and only the open path is drawn.
73
+ * Each column draws its first rows, then more as its end scrolls near (`drawnInWindow()`, `itemRows()`):
74
+ * 5,000 rows open as fast as 300 (epic `from-jarvis` P8).
75
+ * Rows from markup draw themselves, as in every tree: none builds a shadow root it doesn't show.
76
+ * - `ui-settled`: `ui-changed`'s detail again, once what's selected has stayed put for a moment (the arrow keys stopped).
77
+ * - For subclasses (a `<netlist-columns>` built on it):
78
+ * - `rowClass(item)`: class names for a row drawn from `items`, which the subclass's own sheet styles
79
+ * (`elementSetup.styleSheets`, spread from this one's)
80
+ * - its tokens and parts: `UITreeColumns.css`'s header
28
81
  * - `sticky-path`: while it scrolls, one line pinned at its top names the open rows the first row in view is inside.
29
82
  * - Read again on every scroll of whatever scrolls it, before the next paint: rows know nothing of it.
30
83
  * - Hidden from screen readers: each row already says how deep it is (`aria-level`), and the keys walk the rows.
84
+ * - The same line as the columns' path line, drawn by one `renderPath()`.
31
85
  ****************/
32
86
  export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
33
87
  static vocabulary: {
@@ -54,6 +108,11 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
54
108
  readonly group: "behaviour";
55
109
  readonly kind: "string";
56
110
  readonly description: string;
111
+ }, {
112
+ readonly name: "tools";
113
+ readonly group: "behaviour";
114
+ readonly kind: "keyOnly";
115
+ readonly description: string;
57
116
  }, {
58
117
  readonly name: "label";
59
118
  readonly group: "behaviour";
@@ -70,20 +129,57 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
70
129
  readonly group: "appearance";
71
130
  readonly kind: "string";
72
131
  readonly description: string;
132
+ }, {
133
+ readonly name: "items";
134
+ readonly group: "content";
135
+ readonly kind: "json";
136
+ readonly reflect: false;
137
+ readonly description: string;
138
+ }, {
139
+ readonly name: "path";
140
+ readonly group: "behaviour";
141
+ readonly kind: "json";
142
+ readonly reflect: false;
143
+ readonly description: string;
144
+ }, {
145
+ readonly name: "size";
146
+ readonly group: "appearance";
147
+ readonly kind: "string";
148
+ readonly description: string;
149
+ }, {
150
+ readonly name: "narrow-before";
151
+ readonly group: "appearance";
152
+ readonly kind: "number";
153
+ readonly default: 2;
154
+ readonly description: string;
155
+ }, {
156
+ readonly name: "show";
157
+ readonly group: "appearance";
158
+ readonly kind: "string";
159
+ readonly description: string;
73
160
  }, {
74
161
  readonly name: "sticky-path";
75
162
  readonly group: "behaviour";
76
163
  readonly kind: "keyOnly";
77
164
  readonly description: string;
165
+ }, {
166
+ readonly name: "sticky-detail";
167
+ readonly group: "behaviour";
168
+ readonly kind: "keyOnly";
169
+ readonly description: string;
78
170
  }];
79
171
  readonly events: readonly [{
80
172
  readonly name: "ui-selecting";
81
173
  readonly cancelable: true;
82
- readonly detail: "{ item: HTMLElement, value: string, originalEvent?: Event }";
174
+ readonly detail: "{ item: HTMLElement | TreeItemData, value: string, path?: string[], originalEvent?: Event }";
83
175
  readonly description: string;
84
176
  }, {
85
177
  readonly name: "ui-changed";
86
- readonly detail: "{ value: string, values: string[], originalEvent?: Event }";
178
+ readonly detail: "{ value: string, values: string[], item?: HTMLElement | TreeItemData, path?: string[], originalEvent?: Event }";
179
+ readonly description: string;
180
+ }, {
181
+ readonly name: "ui-settled";
182
+ readonly detail: "{ value: string, values: string[], item?: HTMLElement | TreeItemData, path?: string[], originalEvent?: Event }";
87
183
  readonly description: string;
88
184
  }];
89
185
  readonly slots: readonly [{
@@ -92,6 +188,12 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
92
188
  }, {
93
189
  readonly name: "empty";
94
190
  readonly description: "Shown when `filter` matches no row.";
191
+ }, {
192
+ readonly name: "tools";
193
+ readonly description: string;
194
+ }, {
195
+ readonly name: "detail";
196
+ readonly description: string;
95
197
  }];
96
198
  readonly parts: readonly [{
97
199
  readonly name: "empty";
@@ -102,6 +204,33 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
102
204
  }, {
103
205
  readonly name: "path-row";
104
206
  readonly description: "`sticky-path`: each row's name in the path.";
207
+ }, {
208
+ readonly name: "narrow-column";
209
+ readonly description: string;
210
+ }, {
211
+ readonly name: "column-title";
212
+ readonly description: string;
213
+ }, {
214
+ readonly name: "column";
215
+ readonly description: "`appearance=\"columns\"` with `items`: one column.";
216
+ }, {
217
+ readonly name: "detail";
218
+ readonly description: "`appearance=\"columns\"`: the pane around the `detail` slot.";
219
+ }, {
220
+ readonly name: "column-row";
221
+ readonly description: "`appearance=\"columns\"` with `items`: one row of a column.";
222
+ }, {
223
+ readonly name: "tools";
224
+ readonly description: "`tools`: the line of buttons above the rows.";
225
+ }, {
226
+ readonly name: "tool";
227
+ readonly description: "`tools`: each button.";
228
+ }, {
229
+ readonly name: "matches-title";
230
+ readonly description: "`appearance=\"columns\"` with a `filter`: the title over the matches elsewhere in the tree.";
231
+ }, {
232
+ readonly name: "match";
233
+ readonly description: "`appearance=\"columns\"` with a `filter`: a match elsewhere in the tree, with the rows it's inside.";
105
234
  }];
106
235
  readonly states: readonly [{
107
236
  readonly name: "filtering";
@@ -112,6 +241,9 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
112
241
  }, {
113
242
  readonly name: "columns";
114
243
  readonly description: "Its `appearance` is `columns`: a column per level, side by side.";
244
+ }, {
245
+ readonly name: "resizing";
246
+ readonly description: "`appearance=\"columns\"`: the line after a column is being dragged.";
115
247
  }];
116
248
  readonly texts: readonly [{
117
249
  readonly key: "noMatches";
@@ -120,7 +252,39 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
120
252
  }, {
121
253
  readonly key: "resizeColumn";
122
254
  readonly text: "Resize this column";
123
- readonly description: "`appearance=\"columns\"`: the name of the line after a column, for a screen reader.";
255
+ readonly description: string;
256
+ }, {
257
+ readonly key: "resizeDetail";
258
+ readonly text: "Resize the detail pane";
259
+ readonly description: string;
260
+ }, {
261
+ readonly key: "loading";
262
+ readonly text: "Loading";
263
+ readonly description: "`appearance=\"columns\"`: what a screen reader hears while a column's rows are on their way.";
264
+ }, {
265
+ readonly key: "openLevels";
266
+ readonly text: "Open {levels} levels";
267
+ readonly description: "`tools`: the button that opens the tree so that many levels of rows show.";
268
+ }, {
269
+ readonly key: "closeAll";
270
+ readonly text: "Close all";
271
+ readonly description: "`tools`: the button that closes every row.";
272
+ }, {
273
+ readonly key: "elsewhere";
274
+ readonly text: "Elsewhere in the tree";
275
+ readonly description: "`appearance=\"columns\"` with a `filter`: the title over the matches outside the filtered column.";
276
+ }, {
277
+ readonly key: "lookingElsewhere";
278
+ readonly text: "Looking through the tree";
279
+ readonly description: "`appearance=\"columns\"` with a `filter`: what a screen reader hears while promised rows are on their way.";
280
+ }, {
281
+ readonly key: "moreMatches";
282
+ readonly text: "{count} more, not listed";
283
+ readonly description: "`appearance=\"columns\"` with a `filter`: how many matches elsewhere aren't listed.";
284
+ }, {
285
+ readonly key: "stoppedLooking";
286
+ readonly text: "Stopped looking after {count} rows";
287
+ readonly description: "`appearance=\"columns\"` with a `filter`: the look through the tree went through that many rows, and stopped.";
124
288
  }];
125
289
  };
126
290
  static elementSetup: Partial<E.ElementSetup>;
@@ -146,10 +310,40 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
146
310
  /** The rows, nested: every appearance but `columns`. */
147
311
  private renderRows;
148
312
  /**
149
- * `appearance="columns"`: the top rows as the first column, in a box that scrolls sideways.
150
- * - Each open row draws the rows inside it as the next column, placed against this box (`UITreeColumns.css`).
313
+ * The path line: `rows`' names, outermost first, `›` between them, each a click handing `onPick` its row and place.
314
+ * - The outline's `sticky-path`, pinned over the rows; in columns, a line of its own above them.
315
+ * - `current`: the place of the row that reads as where you are, the last unless it says.
316
+ * It's in bold, and never shrinks; in columns, it's the selected row's column (`.current`).
317
+ * - The outer names give way first: each shrinks a hundred times more than the one after it.
318
+ * Those that would show fewer than about 3 letters fold into one `…` (`pathFolded`), its tooltip naming them.
319
+ * - Every name's tooltip is its whole name.
320
+ * - Hidden from screen readers (the class docstring says why).
321
+ */
322
+ private renderPath;
323
+ /** How many of the path line's outer names fold into one `…`: measured as its names or the tree's width change. */
324
+ accessor pathFolded: number;
325
+ /** The tree's width, in px, while it has a `sticky-path`: the path line is measured again as it changes. */
326
+ accessor treeWidthPx: number;
327
+ /** The path line's names, and the place of the one that reads as where you are: as one text, empty for none. */
328
+ protected get pathKey(): string;
329
+ /** While it's in the page with a `sticky-path`: its width, measured as it changes. */
330
+ protected watchTreeWidth(isConnected: boolean, stickyPath: boolean | undefined): (() => void) | undefined;
331
+ /** The path line's names or the tree's width changed: how many names fold, worked out before the next paint. */
332
+ protected onPathLineChanged(pathKey: string): (() => void) | undefined;
333
+ /**
334
+ * How many of the path line's outer names fold into one `…`, so none shows fewer than about 3 letters
335
+ * (`foldedNamesFor()`): each name measured in the line's font, the current one in its own (bold).
336
+ */
337
+ private measurePathFold;
338
+ /**
339
+ * `appearance="columns"`: the columns, in a box that scrolls sideways, with the line after each to size it.
340
+ * - From markup: the top rows are the first column, and each open row draws the rows inside it as the next,
341
+ * placed against this box (`UITreeColumns.css`).
342
+ * - From `items`: every column is drawn here (`itemColumns()`).
151
343
  */
152
344
  private renderColumns;
345
+ /** From markup: the top rows, as the first column. */
346
+ private firstColumn;
153
347
  /** The rows directly under `parent`. */
154
348
  private rowsIn;
155
349
  /** The rows on screen, in their order. */
@@ -165,6 +359,10 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
165
359
  * - `keepsInside`: a column view keeps the columns after it open, as when a key goes back to it.
166
360
  */
167
361
  private activate;
362
+ /** A `ui-settled` waiting for what's selected to stay put. */
363
+ private settleTimer;
364
+ /** `ui-settled`, with `detail`, once nothing else is selected for `SETTLE_SECONDS`. */
365
+ private settleSoon;
168
366
  /**
169
367
  * `appearance="columns"`: `row` is picked, so the rows inside it become the next column.
170
368
  * - It opens, though it has no rows: `open` marks each column's pick, the earlier ones drawn grey.
@@ -172,6 +370,14 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
172
370
  * - Then the box scrolls to its end, so the newest column is in view.
173
371
  */
174
372
  private openColumnOf;
373
+ /**
374
+ * The ids of each column's pick, from the top: the `path` property.
375
+ * - From `items`, it's the one fact the columns are drawn from.
376
+ * - From markup, the rows' `open` is: a pick writes it here, and a page that sets it opens those rows.
377
+ */
378
+ accessor openPath: readonly string[];
379
+ /** From markup: a page set `path`, so open its rows, and select the last, as a pick would, sending nothing. */
380
+ protected onPathChanged(path: readonly string[]): void;
175
381
  /** The open rows, outermost first, one a level: each column's pick, the last one the newest. */
176
382
  private get openChain();
177
383
  /** The columns on screen, by level: the top rows', then one for each pick with rows inside it. */
@@ -186,6 +392,62 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
186
392
  private rowsBeside;
187
393
  /** Scroll the columns' box to its end, once the newest column is drawn. */
188
394
  private showNewestColumn;
395
+ /**
396
+ * `tools`: a line of buttons above the rows, "Open 2 levels", "Open 3 levels" and "Close all" (`openTo()`,
397
+ * `closeAll()`), as the old netlist viewer's side bar has; Spell UI's mini basic buttons.
398
+ * - Then the `tools` slot, at the line's end: a filter field, say. Slotted alone, without `tools`, it draws the
399
+ * line too.
400
+ * - The buttons scroll sideways rather than wrap; the slot drops to a line of its own when there's no room.
401
+ */
402
+ private toolbar;
403
+ /** The element slotted as `tools`: the first child with that `slot`, followed as children come and go. */
404
+ get toolsElement(): Element | undefined;
405
+ /** Its first child in slot `slot` (by its translated name), else `undefined`. */
406
+ private childInSlot;
407
+ /** `openTo(levels)`, not waited for: a failure only warned about. */
408
+ private startOpening;
409
+ /**
410
+ * Open the tree so `levels` levels of rows show: `openTo(2)`, the top rows and the rows inside them.
411
+ * - In the outline, every row less deep than that opens, and every deeper one closes, as a person would
412
+ * (`ui-opening` / `ui-closing`, each cancelable).
413
+ * - In columns, `levels` columns show: each column's pick stays, and where a column has none, its first row that
414
+ * holds rows is picked; the last of them is selected, as a click would (`ui-selecting`, `ui-changed`).
415
+ * - A level at a time: rows still to come are waited for, then opened in turn.
416
+ * - an `expandable` row's, which a page adds as it opens
417
+ * - from `items`, a promised `children` list: meanwhile the path so far is picked, its column a spinner
418
+ * - Settles once every level asked shows, or as deep as the tree goes; a newer `openTo()` stops it.
419
+ * - `openTo(1)`: only the top rows, `closeAll()`.
420
+ */
421
+ openTo(levels: number, originalEvent?: Event): Promise<void>;
422
+ /**
423
+ * Close every row, so only the top rows show.
424
+ * - In columns: back to the first column, nothing picked, with no `ui-changed` (nothing new is selected).
425
+ */
426
+ closeAll(originalEvent?: Event): void;
427
+ /** Counts each `openTo()`, so one waiting for rows stops once a newer one starts. */
428
+ private opens;
429
+ /** Each wait for rows to come (`whenRowsCome()`): called, it stops waiting. */
430
+ private readonly openWaits;
431
+ /**
432
+ * `openTo()` in the outline, from `parent` down: rows less deep than `depth - 1` open, deeper ones close.
433
+ * - Rows in the page are opened at once; an `expandable` row's rows are waited for, then opened in turn.
434
+ */
435
+ private openRowsTo;
436
+ /** `openTo()` in columns: `columns` columns, keeping each column's pick, else its first row that holds rows. */
437
+ private openColumnsTo;
438
+ /** Open every row of `chain`, and select its last, as a click would. */
439
+ private openPicks;
440
+ /**
441
+ * `openTo()` in columns from `items`: the path to `columns` columns, its last pick selected, as a click would.
442
+ * - A promised `children` list with more columns to go: the path so far is picked, its column a spinner, until the
443
+ * list comes; then it goes on.
444
+ */
445
+ private openItemColumnsTo;
446
+ /**
447
+ * Wait for `row`'s rows to come, each ready: an `expandable` row, which a page fills as it opens.
448
+ * - `false`: a newer `openTo()` started, or the row closed or left the page, first.
449
+ */
450
+ private whenRowsCome;
189
451
  /** Is it in the page, with the runtime there to rove with? */
190
452
  protected get canRove(): boolean;
191
453
  /** The keys, while it's in the page: the rows are read again on each press. */
@@ -205,44 +467,327 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
205
467
  /** Move the focus to `row`. */
206
468
  private focusRow;
207
469
  /**
208
- * Each column's width by level, in px, as a person sized it: `undefined` for one left at `--ui-tree-column-width`.
209
- * - Kept under the tree's `id`, when it has one (`columnWidthStore`).
470
+ * `size`, read: each column's size by level, the last going on for every deeper column.
471
+ * - `undefined` for `*`, or an entry that isn't a size (warned about): that column takes `--ui-tree-column-width`.
472
+ */
473
+ get columnSizes(): readonly (E.PaneSize | undefined)[];
474
+ /** Column `index`'s `size`: `undefined` for the token's width. */
475
+ sizeOfColumn(index: number): E.PaneSize | undefined;
476
+ /**
477
+ * Each column's width by level, in px, as a person dragged it: `undefined` for one left as `size` says.
478
+ * - Kept under the tree's `id`, when it has one (`keepWidths()`).
210
479
  */
211
480
  accessor columnWidths: readonly (number | undefined)[];
212
- /** Column `index`'s width, as CSS: its own, else the token's. */
481
+ /** The width an Option-drag gave every column, in px: a column's own drag still wins. */
482
+ accessor everyColumnWidth: number | undefined;
483
+ /** Each `size="auto"` column's width by level, in px: what its rows need, measured as they draw (`fitKey`). */
484
+ accessor fitWidths: readonly (number | undefined)[];
485
+ /** Column `index`'s width as a person dragged it, in px: its own drag, else an Option-drag's; else `undefined`. */
486
+ private draggedWidthOf;
487
+ /**
488
+ * Column `index`'s width, as CSS: a narrow strip's (`narrowColumns`), else its full width (`fullWidthCSS()`).
489
+ * - A narrow one under the pointer is drawn whole (`peekColumn`), over the columns after it.
490
+ */
213
491
  columnWidthCSS(index: number): string;
214
- /** Where column `index` starts, as CSS: the widths of the columns before it, added up. */
492
+ /**
493
+ * The room column `index` takes in the row of columns, as CSS: a strip's when it's narrow, though drawn whole for
494
+ * now, so the columns after it stay where they are.
495
+ */
496
+ private roomOfColumnCSS;
497
+ /**
498
+ * Column `index`'s `margin-inline-end`, while it's drawn whole over the columns after it (`peekColumn`):
499
+ * the strip's width less its own, so it takes a strip's room. `undefined` otherwise.
500
+ */
501
+ peekMarginCSS(index: number): string | undefined;
502
+ /**
503
+ * Column `index`'s full width, as CSS: a person's drag, else `size`'s, else the token's; never over
504
+ * `fullColumnMostPx` while the columns don't fit, unless `isShared` is false (a narrow one drawn whole over the rest).
505
+ * - `auto`: its rows' width once measured; the token's until then.
506
+ * - A percent is of the tree's box of columns, never under `MIN_COLUMN_PX`.
507
+ */
508
+ private fullWidthCSS;
509
+ /** Column `index`'s width on screen, in px: a strip's, or its full width, never over `fullColumnMostPx`. */
510
+ private shownWidthPxOf;
511
+ /** Column `index`'s width when it isn't narrow, in px: as `columnWidthCSS()` says, worked out. */
512
+ widthPxOf(index: number): number;
513
+ /** Where column `index` starts, as CSS: the room of the columns before it, added up. */
215
514
  columnStartCSS(index: number): string;
216
- /** The line after column `index`: a few px of it to drag, or to move with the keys, sizing that column. */
515
+ /**
516
+ * The line after column `index`: a few px of it to drag, or to move with the keys, sizing that column;
517
+ * Option (Alt) with either sizes every column. A double-click fits the column to its rows; with Option, every one.
518
+ */
217
519
  private columnEdge;
218
520
  /** What an unsized column's width comes to, in px: measured as the columns draw. */
219
521
  accessor defaultWidthPx: number;
220
- /** Column `index`'s width on screen now, in px. */
221
- private widthOf;
222
- /** Measure what an unsized column's width comes to, in px, and keep it (`defaultWidthPx`). */
522
+ /** What `1em` comes to in the columns, in px: for a `size` in `em`. */
523
+ accessor emPx: number;
524
+ /** What `1rem` comes to, in px: for a `size` in `rem`. */
525
+ accessor remPx: number;
526
+ /** Measure what an unsized column's width comes to, in px, and keep it (`defaultWidthPx`); a narrow one's; an em's. */
223
527
  private measureDefaultWidth;
224
- /** Drag column `index`'s line: it follows the pointer; Escape puts it back. */
528
+ /** Column `index`'s width on screen now, in px, measuring an unsized one's first if it hasn't been. */
529
+ private widthNowOf;
530
+ /** Drag column `index`'s line: it follows the pointer; with Option (Alt), every column takes its width. Escape puts it back. */
225
531
  private startResizing;
226
- /** Left and right on column `index`'s line: narrower and wider, ten times as far with Shift. */
532
+ /**
533
+ * Drag a line that sizes the box before it, from `startWidth` px: a column's, or the `detail` pane's.
534
+ * - `resize(width)` as the pointer moves; kept once it's dropped (`keepWidths()`); `restore()` on Escape.
535
+ */
536
+ private dragWidth;
537
+ /** A column's line is being dragged: `:state(resizing)`, so the columns follow the pointer with no easing. */
538
+ accessor isResizing: boolean;
539
+ /** Left and right on column `index`'s line: narrower and wider, ten times as far with Shift; every column with Option. */
227
540
  private resizeByKey;
228
541
  /**
229
- * Column `index` is `width` px wide now, at least `MIN_COLUMN_PX`; `undefined`: back to the token's.
542
+ * How far a key on a line moves it, in px, wider positive: `undefined` for a key that doesn't.
543
+ * - SIDE EFFECT: a key that does is the line's own, so it goes no further.
544
+ */
545
+ private keyStepPx;
546
+ /**
547
+ * A double-click on column `index`'s line: the column fits its longest row, as a person's width (kept);
548
+ * with Option (Alt), every column on screen fits its own.
549
+ * - A narrow column keeps what it had: its rows aren't drawn whole.
550
+ */
551
+ private fitColumn;
552
+ /**
553
+ * Column `index` is `width` px wide now, at least `MIN_COLUMN_PX`; `undefined`: back to what `size` says.
230
554
  * - SIDE EFFECT: kept under the tree's `id`, unless `keeps` is false (mid-drag).
231
555
  */
232
556
  private setColumnWidth;
233
- /** The widths kept under its `id`, as it connects; what an unsized one comes to; its newest column, in view. */
557
+ /**
558
+ * Every column is `width` px wide now, at least `MIN_COLUMN_PX`, deeper ones as they come: an Option-drag.
559
+ * - Each column's own width goes, so they're all the same.
560
+ * - SIDE EFFECT: kept under the tree's `id`, unless `keeps` is false (mid-drag).
561
+ */
562
+ private setEveryColumnWidth;
563
+ /** Keep the widths a person set under the tree's `id`, when it has one: `widths:<id>` in the tree's store, the `detail` pane's too. */
564
+ private keepWidths;
565
+ /**
566
+ * As it connects: the widths kept under its `id`, and the path, when the page sets none; what an unsized column
567
+ * comes to; its newest column, in view.
568
+ */
234
569
  protected onConnectedInColumns(isConnected: boolean, isColumns: boolean): void;
235
570
  /** Is it laid out right to left? */
236
571
  private get isRightToLeft();
237
- /** Where every column tree's widths are kept, by its `id`: made on first use, so a server render never touches storage. */
238
- private static get columnWidthStore();
239
- private static madeColumnWidthStore?;
572
+ /**
573
+ * What the `size="auto"` columns' widths depend on, as one text: they're measured again as it changes.
574
+ * - Empty while there's nothing to measure: not columns, not ready, or no `auto` column.
575
+ */
576
+ protected get fitKey(): string;
577
+ /** The `auto` columns' rows changed, or what they show: measure them again, once they're drawn. */
578
+ protected onFitKeyChanged(fitKey: string): (() => void) | undefined;
579
+ /** Measure each `auto` column on screen that a person hasn't sized, and isn't narrow (`fitWidths`). */
580
+ private measureFitWidths;
581
+ /**
582
+ * The width column `index` needs to show its longest row whole, in px, from `MIN_COLUMN_PX` to `most`;
583
+ * `undefined` when it isn't drawn, or has no rows.
584
+ * - SIDE EFFECT: lays the page out, once a column.
585
+ */
586
+ private measureFitWidth;
587
+ /**
588
+ * From `items`: the width column `index`'s rows need, in px, measured from the DATA, not the rows drawn.
589
+ * - Its words' and `which`'s tracks, as `textTracksOf()` measures them, so a row needn't be drawn
590
+ * (`Row Windowing` draws only those in view).
591
+ * - What else a row takes (its icon, count, chevron, margins, the column's scroll bar) is the column's width
592
+ * less its words' and `which`'s tracks and the room after them: the grid makes them the same in every row.
593
+ */
594
+ private fitOfItemColumn;
595
+ /** Column `index`'s `<ul>`, from `items`; `undefined` when it isn't drawn. */
596
+ private itemColumnElement;
597
+ /**
598
+ * Each column's words and `which` tracks, by level, in px: as wide as its widest label and `which`, from `items`.
599
+ * - Measured from the data, so they don't move as `Row Windowing` draws more rows in (I13).
600
+ * - Set on the column as `--_tree-words-track` / `--_tree-which-track`; `undefined`: sized from the rows drawn.
601
+ */
602
+ private accessor textTracks;
603
+ /**
604
+ * What the columns' text tracks are measured from: each column's shown items, and what the rows show.
605
+ * - `undefined` while there's nothing to measure: not columns from `items`, or not ready.
606
+ */
607
+ protected get textTrackSources(): {
608
+ lists: readonly (readonly TreeItemData[])[];
609
+ show: string | undefined;
610
+ } | undefined;
611
+ /** The columns' items changed, or what their rows show: measure their text tracks again, once they're drawn. */
612
+ protected onTextTrackSourcesChanged(sources: UITree["textTrackSources"]): (() => void) | undefined;
613
+ /**
614
+ * The words and `which` tracks `items` need in `column`, in px: each label and `which` measured in its row's
615
+ * font (`TreeMeasure.widthOf()`), from one row drawn; `undefined` while no row is.
616
+ * - `which`: its widest, with its margin; `undefined` when no drawn row has one to take its font from,
617
+ * but some item does, so the grid sizes it from the rows drawn.
618
+ * - Kept per list and font: a pick that leaves a column's list alone doesn't measure its 5,000 labels again.
619
+ */
620
+ private textTracksOf;
621
+ /** `textTracksOf()`'s answers, by list: with the fonts they were measured in (`key`). */
622
+ private readonly measuredTracks;
623
+ /** Column `depth`'s text tracks, as the CSS variables its grid reads. */
624
+ private textTracksCSS;
625
+ /**
626
+ * From markup: the width column `index`'s rows need, in px: its box measured at `max-content`, for a moment.
627
+ * - Rows from markup draw themselves (their icon, count, badge, actions), so their text alone wouldn't say.
628
+ * - The rows inside a picked row are out of the column's flow (`position: fixed`), so they don't count.
629
+ */
630
+ private fitOfRowColumn;
631
+ /** The tree's store of what it keeps: `widths:<id>` and `path:<id>`; made on first use, so a server render never touches storage. */
632
+ private static get store();
633
+ private static madeStore?;
634
+ /**
635
+ * The widths kept under tree `id`.
636
+ * - SIDE EFFECT: moves what the old store kept (`ui-tree-column-widths`, a list of widths by `id`) over, once.
637
+ */
638
+ private static keptWidths;
639
+ /**
640
+ * A tree with an `id` opens where it was left: the path kept under `path:<id>` in the tree's store, set as `path`,
641
+ * when the page sets none.
642
+ * - None: a page that set `path`, or (from markup) marked a row `open` or `selected`.
643
+ * - A page setting `path` later still wins: the kept one is only where it starts.
644
+ */
645
+ private openKeptPath;
646
+ /**
647
+ * A person's pick: the new `path` kept under the tree's `id`, when it has one, so a reload opens it again.
648
+ * - Only picks (a click, a key, the path line, the filter's matches, the tools' buttons): a page that sets `path`
649
+ * keeps nothing, so it never writes over where a person left it.
650
+ */
651
+ private keepPath;
652
+ /** The element slotted as `detail`: the first child with that `slot`, followed as children come and go. */
653
+ get detailElement(): Element | undefined;
654
+ /** The selected row: in columns, the `items` entry, or the `<ui-tree-item>`; `undefined` while none is. */
655
+ get pickedItem(): TreeItemData | HTMLElement | undefined;
656
+ /** In columns, with something slotted as `detail` and something picked: the pane shows, after the last column. */
657
+ get hasDetail(): boolean;
658
+ /** The pane's width, in px, as a person dragged it: `undefined` to size it to its content. Kept with the widths. */
659
+ accessor detailWidth: number | undefined;
660
+ /** The pane's width on screen, in px: measured as it changes, 0 while it doesn't show. */
661
+ accessor detailWidthPx: number;
662
+ /** The picked row, handed to the element slotted as `detail` as its `item` property. */
663
+ protected onDetailItemChanged(detail: Element | undefined, item: TreeItemData | HTMLElement | undefined): void;
664
+ /**
665
+ * The `detail` pane: its slot, and the line after it that sizes it, as a column's does.
666
+ * - From markup, the deeper columns are out of the row of columns (`position: fixed`), so it keeps their room
667
+ * before it (`margin-inline-start`); from `items`, they're beside it.
668
+ * - `sticky-detail`: it sticks to the box's end while the columns scroll under it.
669
+ * - With `column-titles`, an empty title cell tops it, so the row of titles runs on unbroken over it.
670
+ */
671
+ private detailPane;
672
+ /** The pane came, went or changed width, or the tree did: the selected row's column in view again, beside it. */
673
+ protected onDetailSizeChanged(): void;
674
+ /** From markup: the room of the columns after the first, as CSS, kept before the pane. */
675
+ private detailMarginCSS;
676
+ /** The pane's width, measured as it changes, while it's drawn: the columns make room for it (`columnsRoomPx`). */
677
+ private watchDetailWidth;
678
+ /** What measures the pane: replaced each time it's drawn. */
679
+ private detailObserver;
680
+ /** The pane's width on screen now, in px. */
681
+ private detailWidthNow;
682
+ /** Drag the line after the pane: it follows the pointer. Escape puts it back. */
683
+ private startResizingDetail;
684
+ /** Left and right on the pane's line: narrower and wider, ten times as far with Shift. */
685
+ private resizeDetailByKey;
686
+ /**
687
+ * The pane is `width` px wide now, from `MIN_COLUMN_PX` to the box's width less a column's;
688
+ * `undefined`: back to its content's width (a double-click on its line).
689
+ * - SIDE EFFECT: kept under the tree's `id`, unless `keeps` is false (mid-drag).
690
+ */
691
+ private setDetailWidth;
692
+ /** In columns, with `sticky-path`: each column's pick, outermost first, as the path line names them. */
693
+ private get columnPicks();
694
+ /** In columns, the column of the selected row, by level: the last pick's, unless the keys or the path went back. */
695
+ private get selectedColumn();
696
+ /**
697
+ * The path line's name for column `depth`'s pick was clicked: that pick is selected again, as the key back to it
698
+ * would, the columns after it kept; then its column is scrolled into view, and has the focus.
699
+ */
700
+ private pickFromPath;
701
+ /**
702
+ * Scroll the columns' box the least that shows column `depth` whole, once it's drawn at its new width.
703
+ * - Always to a column's start, where the box's scroll snaps (`scroll-snap-type`): the first one far enough along
704
+ * to show column `depth`'s end.
705
+ * - Not under a `sticky-detail` pane: it takes its width off the box's.
706
+ */
707
+ private showColumn;
708
+ /** How wide the box of columns is, in px: measured as it changes size, 0 until then. */
709
+ accessor boxWidthPx: number;
710
+ /** What a narrow column's width comes to, in px (`--ui-tree-narrow-width`): measured as the columns draw. */
711
+ accessor narrowWidthPx: number;
712
+ /** The column under the pointer, by level: a narrow one widens over the columns after it while it's there. */
713
+ accessor hoveredColumn: number | undefined;
714
+ /** The column with the focus, by level: a narrow one widens over the columns after it while it has it. */
715
+ accessor focusedColumn: number | undefined;
716
+ /**
717
+ * The columns that take a narrow strip's room, by level: while the columns don't fit the tree's width, the first
718
+ * ones, as few as it takes, each a strip with its pick's name.
719
+ * - Never the last `narrow-before` (2), nor the selected row's column.
720
+ * - The `detail` pane's room comes off the tree's width first (`columnsRoomPx`).
721
+ * - A column a person sized, or `size` sizes, narrows too, and widens back to that size.
722
+ * - The one under the pointer or with the focus too: it widens OVER the columns after it (`peekColumn`), so they
723
+ * stay where they are and the selected one stays in view.
724
+ */
725
+ get narrowColumns(): readonly number[];
726
+ /**
727
+ * The room the columns have, in px: the box of columns', less the `detail` pane's while it shows,
728
+ * never under `MIN_COLUMN_PX`.
729
+ */
730
+ get columnsRoomPx(): number;
731
+ /** The narrow column under the pointer, else the one with the focus: drawn whole, over the columns after it. */
732
+ get peekColumn(): number | undefined;
733
+ /** Is column `index` drawn narrow, a strip with its pick? Rows from markup ask too (`UITreeItem`). */
734
+ isNarrowColumn(index: number): boolean;
735
+ /** Is column `index` a narrow one drawn whole for now, over the columns after it? Rows from markup ask too. */
736
+ isPeekColumn(index: number): boolean;
737
+ /**
738
+ * From markup, while a narrow column is drawn whole over the ones after it (`peekColumn`): `clip-path` for the
739
+ * lines of column `index`, cutting off what the peeking column covers. `undefined` for none.
740
+ * - Needed because each column from markup is drawn INSIDE the row picked before it, so a later column paints over
741
+ * the peeking one, whatever its `z-index`; from `items`, the columns are siblings, and `z-index` does it.
742
+ * - Each line's own box, not its column's: clipping a column would clip every column drawn inside it.
743
+ */
744
+ peekClipCSS(index: number): string | undefined;
745
+ /**
746
+ * From markup: is column `index` wholly under the narrow column drawn whole over it (`peekColumn`)?
747
+ * Its border goes too, which `peekClipCSS()` can't reach.
748
+ */
749
+ isCoveredColumn(index: number): boolean;
750
+ /**
751
+ * The widest a full column is drawn, in px, while the columns don't fit even with the strips: the full ones share
752
+ * what the strips leave, so the selected column shows whole (at a phone's width, say); `Infinity` while they fit.
753
+ * - Shared fairly: a column narrower than its share keeps its width, and the rest share what it leaves.
754
+ * - Never under `MIN_COLUMN_PX`.
755
+ */
756
+ get fullColumnMostPx(): number;
757
+ /** While it's in the page as columns: the width of its box of columns, measured as it changes. */
758
+ protected watchBoxWidth(isConnected: boolean, isColumns: boolean, isReady: boolean): (() => void) | undefined;
759
+ /**
760
+ * The pointer moved onto a column: a narrow one widens while it's there. Its line, after it, changes nothing.
761
+ * - Heard on the shadow root: a move between two of its own boxes never reaches the tree's element, as both ends
762
+ * of it are the element there (the rows from `items` stayed peeking, epic `from-jarvis` P7).
763
+ * Rows from markup pass through it too, by their slots.
764
+ */
765
+ protected onPointerOver(event: PointerEvent): void;
766
+ /** The pointer left the tree: no column is under it. */
767
+ protected onPointerLeft(): void;
768
+ /** The focus moved into a column: a narrow one widens while it has it. Heard on the shadow root, as the pointer is. */
769
+ protected onFocusIn(event: FocusEvent): void;
770
+ /** The focus left: the next `focusin`, if it stays in the tree, says where it went. */
771
+ protected onFocusOut(): void;
772
+ /** The columns narrow when they were last looked at: so a column that turns narrow is told from one that was. */
773
+ private lastNarrowColumns;
774
+ /**
775
+ * A column turned narrow, as a later one was picked: it isn't drawn whole, though the pointer or the focus was
776
+ * last in it. The next move onto it widens it again.
777
+ */
778
+ protected onNarrowColumnsChanged(narrow: readonly number[]): void;
779
+ /**
780
+ * The column an event went through, by level, from its `composedPath()`: `undefined` for none.
781
+ * - From `items`, each column is a `ul.column` with its `data-depth`; from markup, the first is the tree's own
782
+ * `.column`, and each deeper one an open row's `.rows`, one level deeper than that row.
783
+ */
784
+ private columnOf;
240
785
  /** `sticky-path`: the open rows the first row in view is inside, outermost first, while one is out of sight. */
241
786
  accessor pathRows: readonly UITreeItem[];
242
787
  /** A read of the path is waiting for the next paint. */
243
788
  private cancelPathRead;
244
- /** While connected with `sticky-path`: every scroll that moves the tree reads the path again. */
245
- protected watchScrolling(isConnected: boolean, stickyPath: boolean | undefined): (() => void) | undefined;
789
+ /** While connected with `sticky-path`, as rows: every scroll that moves the tree reads the path again. */
790
+ protected watchScrolling(isConnected: boolean, stickyPath: boolean | undefined, isColumns: boolean): (() => void) | undefined;
246
791
  /** Read the path before the next paint, once however many scrolls ask. */
247
792
  private readPathSoon;
248
793
  /** The open rows around the first row in view, when the outermost of them is above the top of what's in view. */
@@ -251,12 +796,199 @@ export declare class UITree extends E.UIComponent<typeof treeVocabulary> {
251
796
  private scrollToRow;
252
797
  /** How tall the path's line is while it shows: 0 while it doesn't. */
253
798
  private get pathHeight();
254
- /** The text to look for changed. */
255
- protected onFilterChanged(): void;
799
+ /**
800
+ * The text to look for changed, or the rows it looks in: as it starts, in a column view, the last column on screen
801
+ * is the one it filters.
802
+ */
803
+ protected onFilterChanged(filter: string | undefined): void;
804
+ /** `filter`, as it's matched: trimmed, lower case. */
805
+ private get filterText();
806
+ /** It had a `filter` when that last changed. */
807
+ private accessor hadFilter;
808
+ /** `appearance="columns"`: the column `filter` filters, by level, set as it starts: the last one on screen. */
809
+ accessor filterColumn: number;
810
+ /**
811
+ * `appearance="columns"`: the column `filter` filters now, by level: `filterColumn`, else, while that's off
812
+ * screen (a match nearer the top was picked), the last one on screen.
813
+ * - Its rows that match show, and after them the matches elsewhere in the tree (`matchList()`).
814
+ */
815
+ get filteredColumn(): number;
816
+ /** From markup, in a column view: the element whose rows `filter` filters, the tree or a pick. */
817
+ get filteredRowsParent(): Element;
818
+ /**
819
+ * From `items`, in a column view: the picks before the column `filter` filters, as one text.
820
+ * - A pick there changes what that column holds, so it's looked through again (`onFilterBaseChanged()`).
821
+ */
822
+ protected get filterBase(): string;
823
+ /** From `items`: a pick before the filtered column changed what it holds. */
824
+ protected onFilterBaseChanged(): void;
256
825
  /** Rows came or went, or their words changed. */
257
826
  protected onRowsChanged(): void;
258
827
  /** Hide what doesn't match, and keep open what's around what does. */
259
828
  private applyFilter;
829
+ /**
830
+ * In a column view, `text` filters one column (`filteredColumn`), then looks through the rest of the tree
831
+ * (`lookElsewhere()`).
832
+ * - That column shows its rows that hold it, and its pick, which the columns after it hang from.
833
+ */
834
+ private applyColumnFilter;
835
+ /**
836
+ * In columns, `filter`'s matches anywhere in the tree but the column it filters, nearest the top first, at most
837
+ * `MOST_MATCHES`: listed after that column's own rows (`matchList()`), a click opening the path to one
838
+ * (`pickMatch()`).
839
+ */
840
+ accessor otherMatches: readonly OtherMatch[];
841
+ /** How many matches elsewhere there are, listed or not: up to `REACH_ROWS` rows looked at. */
842
+ accessor otherMatchCount: number;
843
+ /** Promised `children` are on their way, to be looked through. */
844
+ accessor isLooking: boolean;
845
+ /** It stopped after `REACH_ROWS` rows, with more left to look at. */
846
+ accessor didStopLooking: boolean;
847
+ /** Counts each look, so one that's waiting on promised `children` stops once a newer one starts. */
848
+ private looks;
849
+ /** It has matches elsewhere, or is still looking: so the filtered column doesn't say nothing matches. */
850
+ get hasOtherMatches(): boolean;
851
+ /**
852
+ * In columns, look for `text` through the whole tree, but the filtered column's own rows (`otherMatches`).
853
+ * - From markup, every row is in the page already.
854
+ * - From `items`, each `children` function runs once, as opening its item would, its list kept;
855
+ * promised lists are waited for, a level at a time. It opens no column: a click on a match does.
856
+ * - It stops after `REACH_ROWS` rows (`didStopLooking`).
857
+ */
858
+ private lookElsewhere;
859
+ /** From markup: `text`'s matches through the whole tree, a level at a time, but the filtered column's rows. */
860
+ private lookInRows;
861
+ /**
862
+ * From `items`: `text`'s matches through the whole tree, a level at a time, but the filtered column's items,
863
+ * waiting for promised `children` (`isLooking`); `look` stops it once a newer look starts.
864
+ */
865
+ private lookInItems;
866
+ /**
867
+ * A match elsewhere was clicked: the path to it opens, and it's selected, as a click on it would.
868
+ * - The filtered column keeps its pick, though it doesn't match; a match nearer the top than that column filters the
869
+ * last column on screen instead (`filteredColumn`).
870
+ */
871
+ private pickMatch;
872
+ /**
873
+ * The matches elsewhere, after the filtered column's rows: each its icon and words, the rows it's inside under its
874
+ * words, quieter; a spinner and "Looking through the tree" while promised `children` come; a line when there are
875
+ * more than it lists, or it stopped looking.
876
+ * - Drawn by its column (`filteredColumn`): from `items` and the first column, here; else by the pick the column is
877
+ * inside (`UITreeItem`).
878
+ */
879
+ matchList(): import('@solidjs/web').JSX.Element;
880
+ /** `show`'s words: the parts of a column's row it shows. */
881
+ get shownParts(): readonly RowPart[];
882
+ /** Does a column's row show `part`? Rows from markup ask too (`UITreeItem`). */
883
+ shows(part: RowPart): boolean;
884
+ /** `items` is set: the columns are drawn from it, here, not from `<ui-tree-item>`s. */
885
+ get hasItemData(): boolean;
886
+ /** The top items. */
887
+ private get topItems();
888
+ /** Each item's children once its `children` has run: the list, or the promise of it. */
889
+ private readonly childrenOfItem;
890
+ /** Bumped as a promised list comes: what's read from `childrenOfItem` is read again. */
891
+ private accessor childrenVersion;
892
+ /**
893
+ * `item`'s children, made once: `undefined` while a promise of them is on its way.
894
+ * - SIDE EFFECT: the first call runs a `children` function.
895
+ */
896
+ private childrenOf;
897
+ /**
898
+ * `item`'s children, made once: the list, or the promise of it, with no reactive read or write.
899
+ * - SIDE EFFECT: the first call runs a `children` function; a promised list bumps `childrenVersion` as it comes.
900
+ */
901
+ private childrenNow;
902
+ /** Does `item` open a column? A `children` function does until it's run; then, if it made any. */
903
+ private hasChildren;
904
+ /** The count `item`'s row shows: its own, else how many children it has, once known. */
905
+ private countOf;
906
+ /**
907
+ * Each column's items, by level: the top items, then the children of each pick of `path` that has some.
908
+ * - `undefined`: that column's items are on their way.
909
+ */
910
+ private get columnLists();
911
+ /**
912
+ * The items column `depth` shows: `list`, filtered if it's `filter`'s column.
913
+ * - Its pick stays, though it doesn't match: the columns after it hang from it (a match elsewhere, picked).
914
+ */
915
+ private shownIn;
916
+ /**
917
+ * Was a pick made by going back a column (the left key), so the columns after it stay?
918
+ * - Kept with the `path` it was made on: any other path (a new pick, a page setting it) ends it.
919
+ */
920
+ private accessor wentBack;
921
+ /** The column of the selected item: the last pick, unless the keys went back. */
922
+ private get selectedDepth();
923
+ /** The item that takes the tab stop in column `depth`: its pick, else its first. */
924
+ private keyItemIn;
925
+ /**
926
+ * Extra class names for `item`'s row in a column drawn from `items`: none here; a subclass overrides it.
927
+ * - Set on the row (`.column-row`), for the subclass's own sheet (`elementSetup.styleSheets`) to style:
928
+ * `.column-row.port .which { ... }`.
929
+ * - Read once, as the row is drawn.
930
+ * - Rows from markup draw themselves, in shadow roots a subclass's sheet doesn't reach: so only `items` rows.
931
+ */
932
+ rowClass(_item: TreeItemData): string | undefined;
933
+ /** Every column, from `items`. */
934
+ private itemColumns;
935
+ /** Column `depth`: its title, its rows, and while they're on their way, a spinner. */
936
+ private itemColumn;
937
+ /**
938
+ * Column `depth`'s rows: the first ones, then more as its end scrolls near (`drawnInWindow()`), so a column of
939
+ * 5,000 rows opens as fast as one of 300.
940
+ * - Its pick, and the row with the tab stop, are always drawn, with every row before them:
941
+ * a path set, `openTo()`, a match elsewhere picked, or End pressed, draws down to it first.
942
+ * - What's drawn stays drawn, as in every long list: a column scrolled to its end holds all its rows.
943
+ */
944
+ private itemRows;
945
+ /**
946
+ * An empty row that holds open the column's icon, count and chevron tracks as wide as any of its rows needs them,
947
+ * though that row isn't drawn yet (`Row Windowing`): no height, hidden, out of the accessibility tree.
948
+ * - Its icon when any item has one, its widest count (tabular figures, so the longest), its chevron when any item
949
+ * has children: so neither the parts nor `size="auto"`'s width move as rows draw in (I13).
950
+ * - The words and `which` tracks come from `textTracks` instead: their widths need measuring.
951
+ */
952
+ private trackProbe;
953
+ /** `item`'s row in column `depth`: icon, label and which, count, chevron, each as `show` says. */
954
+ private itemRow;
955
+ /**
956
+ * `item`, in column `depth`, was clicked, or a key moved onto it: it's selected, asking first.
957
+ * - The path is cut there, so the columns after it close and its children open in the next;
958
+ * with `keepsInside`, and it already picked (the keys going back or in), the columns after it stay.
959
+ * - `path`: the whole path to it, when it isn't in a column on screen yet (a match elsewhere, `openTo()`).
960
+ */
961
+ private pickItem;
962
+ /**
963
+ * The keys on a row from `items`, as the markup rows' (`columnKeyActions()`): they select as they move.
964
+ * - Up, down, Home and End within its column; the key toward the next column goes in, onto its pick, else its
965
+ * first; the other goes back, the columns after it kept. Enter and Space select.
966
+ */
967
+ private onItemKeyDown;
968
+ /** The focus goes to the row with the tab stop, scrolled into its column's view. */
969
+ private focusKeyRow;
970
+ /** `path` changed: the selected row's column in view, its end too; from `items`, each column's pick in view. */
971
+ protected onOpenPathChanged(): void;
972
+ /** Scroll each column from `items` to its pick, before the next paint. */
973
+ private showPicks;
260
974
  }
261
975
  export interface UITree extends E.AttributeValues<typeof treeVocabulary> {
262
976
  }
977
+ /** One of `filter`'s matches elsewhere in the tree than the column it filters (`UITree.otherMatches`). */
978
+ type OtherMatch = {
979
+ /** its words */
980
+ label: string;
981
+ /** its icon, as its row shows it */
982
+ icon?: string | undefined;
983
+ /** its `which`, quieter */
984
+ which?: string | undefined;
985
+ /** the ids from the top down to it: `path` once it's picked */
986
+ path: readonly string[];
987
+ /** the rows it's inside, from the top: shown under its words */
988
+ names: readonly string[];
989
+ /** the item, from `items` */
990
+ item?: TreeItemData;
991
+ /** the row, from markup */
992
+ row?: UITreeItem;
993
+ };
994
+ export {};