@olvnck/ingrid 0.0.0-stage → 0.15.21

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 (220) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +5535 -2
  4. package/THIRD_PARTY_NOTICES.md +10 -0
  5. package/dist/engine/clipboard/copy.d.ts +40 -0
  6. package/dist/engine/clipboard/options.d.ts +16 -0
  7. package/dist/engine/clipboard/text.d.ts +32 -0
  8. package/dist/engine/columns/autosize.d.ts +43 -0
  9. package/dist/engine/columns/dataType.d.ts +30 -0
  10. package/dist/engine/columns/fold.d.ts +48 -0
  11. package/dist/engine/columns/layout.d.ts +150 -0
  12. package/dist/engine/columns/model.d.ts +369 -0
  13. package/dist/engine/columns/query.d.ts +16 -0
  14. package/dist/engine/columns/tooltips.d.ts +27 -0
  15. package/dist/engine/data/client/clientSource.d.ts +151 -0
  16. package/dist/engine/data/client/columnFilters.d.ts +106 -0
  17. package/dist/engine/data/client/descendants.d.ts +35 -0
  18. package/dist/engine/data/client/diff.d.ts +23 -0
  19. package/dist/engine/data/client/fields.d.ts +70 -0
  20. package/dist/engine/data/client/filter.d.ts +95 -0
  21. package/dist/engine/data/client/flatten.d.ts +141 -0
  22. package/dist/engine/data/client/groupSize.d.ts +14 -0
  23. package/dist/engine/data/client/hierarchy.d.ts +85 -0
  24. package/dist/engine/data/client/order.d.ts +32 -0
  25. package/dist/engine/data/client/pipeline.d.ts +277 -0
  26. package/dist/engine/data/client/remap.d.ts +33 -0
  27. package/dist/engine/data/client/trees.d.ts +41 -0
  28. package/dist/engine/data/client/types.d.ts +173 -0
  29. package/dist/engine/data/memory/generate.d.ts +36 -0
  30. package/dist/engine/data/memory/memoryDatasource.d.ts +46 -0
  31. package/dist/engine/data/rowKey.d.ts +15 -0
  32. package/dist/engine/data/server/contract.d.ts +64 -0
  33. package/dist/engine/data/server/expansion.d.ts +35 -0
  34. package/dist/engine/data/server/levelStore.d.ts +99 -0
  35. package/dist/engine/data/server/loader.d.ts +128 -0
  36. package/dist/engine/data/server/reader.d.ts +88 -0
  37. package/dist/engine/data/server/response.d.ts +31 -0
  38. package/dist/engine/data/server/serverSource.d.ts +130 -0
  39. package/dist/engine/data/shared/aggregate.d.ts +12 -0
  40. package/dist/engine/data/shared/columnFilter.d.ts +19 -0
  41. package/dist/engine/data/shared/compare.d.ts +12 -0
  42. package/dist/engine/data/shared/dateParts.d.ts +19 -0
  43. package/dist/engine/data/shared/distinct.d.ts +30 -0
  44. package/dist/engine/data/shared/filterRecord.d.ts +7 -0
  45. package/dist/engine/data/shared/keys.d.ts +17 -0
  46. package/dist/engine/data/shared/quickFilter.d.ts +17 -0
  47. package/dist/engine/data/shared/sourceUtils.d.ts +11 -0
  48. package/dist/engine/data/shared/splice.d.ts +9 -0
  49. package/dist/engine/detail/builds.d.ts +26 -0
  50. package/dist/engine/detail/content.d.ts +24 -0
  51. package/dist/engine/detail/controller.d.ts +176 -0
  52. package/dist/engine/detail/events.d.ts +11 -0
  53. package/dist/engine/detail/follow.d.ts +56 -0
  54. package/dist/engine/detail/layer.d.ts +119 -0
  55. package/dist/engine/detail/live.d.ts +96 -0
  56. package/dist/engine/detail/options.d.ts +53 -0
  57. package/dist/engine/detail/state.d.ts +140 -0
  58. package/dist/engine/edit/clear.d.ts +20 -0
  59. package/dist/engine/edit/editing.d.ts +4 -0
  60. package/dist/engine/edit/editors/date.d.ts +3 -0
  61. package/dist/engine/edit/editors/index.d.ts +23 -0
  62. package/dist/engine/edit/editors/internals.d.ts +25 -0
  63. package/dist/engine/edit/editors/largeText.d.ts +2 -0
  64. package/dist/engine/edit/editors/number.d.ts +4 -0
  65. package/dist/engine/edit/editors/select.d.ts +2 -0
  66. package/dist/engine/edit/editors/text.d.ts +15 -0
  67. package/dist/engine/edit/fill.d.ts +47 -0
  68. package/dist/engine/edit/fillHandle.d.ts +66 -0
  69. package/dist/engine/edit/fillValues.d.ts +15 -0
  70. package/dist/engine/edit/operations.d.ts +68 -0
  71. package/dist/engine/edit/paste.d.ts +23 -0
  72. package/dist/engine/edit/pastePlan.d.ts +17 -0
  73. package/dist/engine/edit/popupHost.d.ts +63 -0
  74. package/dist/engine/edit/session.d.ts +52 -0
  75. package/dist/engine/edit/types.d.ts +234 -0
  76. package/dist/engine/edit/undo.d.ts +38 -0
  77. package/dist/engine/edit/validation.d.ts +10 -0
  78. package/dist/engine/edit/values.d.ts +38 -0
  79. package/dist/engine/export/columns.d.ts +19 -0
  80. package/dist/engine/export/deliver.d.ts +47 -0
  81. package/dist/engine/export/dsv.d.ts +2 -0
  82. package/dist/engine/export/expanded.d.ts +69 -0
  83. package/dist/engine/export/export.d.ts +25 -0
  84. package/dist/engine/export/headers.d.ts +15 -0
  85. package/dist/engine/export/options.d.ts +19 -0
  86. package/dist/engine/export/plan.d.ts +43 -0
  87. package/dist/engine/export/values.d.ts +33 -0
  88. package/dist/engine/export/walk.d.ts +31 -0
  89. package/dist/engine/export/writer.d.ts +62 -0
  90. package/dist/engine/export/xlsx/cells.d.ts +31 -0
  91. package/dist/engine/export/xlsx/index.d.ts +12 -0
  92. package/dist/engine/export/xlsx/parts.d.ts +36 -0
  93. package/dist/engine/export/xlsx/sheet.d.ts +30 -0
  94. package/dist/engine/export/xlsx/styles.d.ts +15 -0
  95. package/dist/engine/export/xlsx/table.d.ts +8 -0
  96. package/dist/engine/export/xlsx/zip.d.ts +24 -0
  97. package/dist/engine/filter/groupFilter.d.ts +28 -0
  98. package/dist/engine/filter/model.d.ts +235 -0
  99. package/dist/engine/filter/shorthand.d.ts +36 -0
  100. package/dist/engine/filter/state.d.ts +76 -0
  101. package/dist/engine/filter/summary.d.ts +16 -0
  102. package/dist/engine/filter/values.d.ts +40 -0
  103. package/dist/engine/find/index.d.ts +94 -0
  104. package/dist/engine/find/match.d.ts +38 -0
  105. package/dist/engine/find/model.d.ts +115 -0
  106. package/dist/engine/grid.d.ts +42 -0
  107. package/dist/engine/i18n/numbers.d.ts +34 -0
  108. package/dist/engine/i18n/texts.d.ts +306 -0
  109. package/dist/engine/interact/autoScroll.d.ts +11 -0
  110. package/dist/engine/interact/body.d.ts +41 -0
  111. package/dist/engine/interact/focus.d.ts +158 -0
  112. package/dist/engine/interact/header.d.ts +216 -0
  113. package/dist/engine/interact/host.d.ts +400 -0
  114. package/dist/engine/interact/keyboard.d.ts +20 -0
  115. package/dist/engine/interact/menuKey.d.ts +7 -0
  116. package/dist/engine/interact/own.d.ts +2 -0
  117. package/dist/engine/interact/ranges.d.ts +68 -0
  118. package/dist/engine/interact/rowSelection.d.ts +53 -0
  119. package/dist/engine/interact/shortcut.d.ts +21 -0
  120. package/dist/engine/interact/tooltips.d.ts +63 -0
  121. package/dist/engine/measure.d.ts +30 -0
  122. package/dist/engine/render/cells.d.ts +322 -0
  123. package/dist/engine/render/columns.d.ts +28 -0
  124. package/dist/engine/render/dom.d.ts +24 -0
  125. package/dist/engine/render/flash.d.ts +74 -0
  126. package/dist/engine/render/groupCell.d.ts +50 -0
  127. package/dist/engine/render/groupPanel.d.ts +21 -0
  128. package/dist/engine/render/header.d.ts +162 -0
  129. package/dist/engine/render/overlay.d.ts +15 -0
  130. package/dist/engine/render/pinnedRows.d.ts +106 -0
  131. package/dist/engine/render/rowPool.d.ts +3 -0
  132. package/dist/engine/render/scrollbars.d.ts +77 -0
  133. package/dist/engine/render/strategy.d.ts +397 -0
  134. package/dist/engine/reportError.d.ts +7 -0
  135. package/dist/engine/rowdrag/controller.d.ts +80 -0
  136. package/dist/engine/rowdrag/events.d.ts +17 -0
  137. package/dist/engine/rowdrag/gesture.d.ts +33 -0
  138. package/dist/engine/rowdrag/keys.d.ts +21 -0
  139. package/dist/engine/rowdrag/model.d.ts +67 -0
  140. package/dist/engine/rowdrag/options.d.ts +34 -0
  141. package/dist/engine/rowdrag/rows.d.ts +61 -0
  142. package/dist/engine/rowdrag/target.d.ts +59 -0
  143. package/dist/engine/rowdrag/zones.d.ts +79 -0
  144. package/dist/engine/schedule.d.ts +29 -0
  145. package/dist/engine/selection/aggregate.d.ts +30 -0
  146. package/dist/engine/selection/options.d.ts +7 -0
  147. package/dist/engine/selection/rangeRows.d.ts +19 -0
  148. package/dist/engine/selection/ranges.d.ts +114 -0
  149. package/dist/engine/selection/rows.d.ts +207 -0
  150. package/dist/engine/source.d.ts +225 -0
  151. package/dist/engine/synthetic.d.ts +28 -0
  152. package/dist/engine/table/cells.d.ts +52 -0
  153. package/dist/engine/table/headers.d.ts +20 -0
  154. package/dist/engine/table/host.d.ts +65 -0
  155. package/dist/engine/table/job.d.ts +21 -0
  156. package/dist/engine/table/rows.d.ts +99 -0
  157. package/dist/engine/table/slicer.d.ts +54 -0
  158. package/dist/engine/table/takes.d.ts +145 -0
  159. package/dist/engine/types.d.ts +2950 -0
  160. package/dist/engine/ui/announce.d.ts +7 -0
  161. package/dist/engine/ui/chooser.d.ts +19 -0
  162. package/dist/engine/ui/columnList.d.ts +41 -0
  163. package/dist/engine/ui/columnMenu.d.ts +96 -0
  164. package/dist/engine/ui/columnsPanel.d.ts +16 -0
  165. package/dist/engine/ui/contextMenu.d.ts +48 -0
  166. package/dist/engine/ui/controller.d.ts +295 -0
  167. package/dist/engine/ui/filters/apply.d.ts +53 -0
  168. package/dist/engine/ui/filters/custom.d.ts +3 -0
  169. package/dist/engine/ui/filters/date.d.ts +12 -0
  170. package/dist/engine/ui/filters/host.d.ts +102 -0
  171. package/dist/engine/ui/filters/multi.d.ts +6 -0
  172. package/dist/engine/ui/filters/number.d.ts +15 -0
  173. package/dist/engine/ui/filters/numberMask.d.ts +15 -0
  174. package/dist/engine/ui/filters/set.d.ts +3 -0
  175. package/dist/engine/ui/filters/simple.d.ts +52 -0
  176. package/dist/engine/ui/filters/text.d.ts +5 -0
  177. package/dist/engine/ui/filtersPanel.d.ts +18 -0
  178. package/dist/engine/ui/floating.d.ts +66 -0
  179. package/dist/engine/ui/floatingShorthand.d.ts +20 -0
  180. package/dist/engine/ui/floatingTypes.d.ts +82 -0
  181. package/dist/engine/ui/icons.d.ts +25 -0
  182. package/dist/engine/ui/menu.d.ts +45 -0
  183. package/dist/engine/ui/overlayHost.d.ts +7 -0
  184. package/dist/engine/ui/place.d.ts +37 -0
  185. package/dist/engine/ui/popup.d.ts +97 -0
  186. package/dist/engine/ui/sideBar.d.ts +26 -0
  187. package/dist/engine/ui/statusBar.d.ts +29 -0
  188. package/dist/engine/ui/toolbar/buttons.d.ts +21 -0
  189. package/dist/engine/ui/toolbar/chipState.d.ts +52 -0
  190. package/dist/engine/ui/toolbar/chips.d.ts +23 -0
  191. package/dist/engine/ui/toolbar/findBox.d.ts +10 -0
  192. package/dist/engine/ui/toolbar/quickFilterBox.d.ts +12 -0
  193. package/dist/engine/ui/toolbar/registry.d.ts +5 -0
  194. package/dist/engine/ui/toolbar/toolbar.d.ts +31 -0
  195. package/dist/engine/ui/toolbar/types.d.ts +23 -0
  196. package/dist/engine/ui/tooltip.d.ts +34 -0
  197. package/dist/engine/ui/virtualList.d.ts +35 -0
  198. package/dist/engine/viewport/heightView.d.ts +62 -0
  199. package/dist/engine/viewport/heights.d.ts +39 -0
  200. package/dist/engine/viewport/intervals.d.ts +19 -0
  201. package/dist/engine/viewport/range.d.ts +51 -0
  202. package/dist/engine/viewport/scroll.d.ts +45 -0
  203. package/dist/engine/viewport/stack.d.ts +160 -0
  204. package/dist/grid-C34VEap6.js +32310 -0
  205. package/dist/index.d.ts +19 -0
  206. package/dist/index.js +1273 -0
  207. package/dist/ingrid.css +1 -0
  208. package/dist/internal.d.ts +13 -0
  209. package/dist/internal.js +1 -0
  210. package/dist/locale/de.d.ts +4 -0
  211. package/dist/locale/de.js +222 -0
  212. package/dist/themes/primevue.css +63 -0
  213. package/dist/themes/tailwind.css +68 -0
  214. package/dist/vue/InGrid.vue.d.ts +263 -0
  215. package/dist/vue/stableOptions.d.ts +8 -0
  216. package/dist/vue/useClientSource.d.ts +28 -0
  217. package/dist/vue/useServerSource.d.ts +8 -0
  218. package/dist/vue/vueRenderer.d.ts +164 -0
  219. package/dist/xlsx-59umS_n_.js +325 -0
  220. package/package.json +78 -5
@@ -0,0 +1,216 @@
1
+ import { type DisplayLayout, type ResolvedColumn, type Segment } from '../columns/layout';
2
+ import type { ColumnGroupInfo, ColumnState, PinnedSide } from '../types';
3
+ import type { Lane } from '../viewport/range';
4
+ import type { InteractHost } from './host';
5
+ /** Distance outside the grid at which a drop hides the column(s): the default, and where the refused look starts. */
6
+ export declare const HIDE_DISTANCE = 32;
7
+ /**
8
+ * Where a drag would drop: a gap in a lane (`anchor: null` = after every user column of the lane), a pin, hide, a place
9
+ * in the grouping, or a refused drop that changes nothing.
10
+ */
11
+ export type DropTarget = {
12
+ kind: 'move';
13
+ lane: Lane;
14
+ anchor: {
15
+ before: string;
16
+ } | {
17
+ after: string;
18
+ } | null;
19
+ } | {
20
+ kind: 'pin';
21
+ side: PinnedSide;
22
+ } | {
23
+ kind: 'hide';
24
+ }
25
+ /** A header leaf over the group panel: group it at `index`. */
26
+ | {
27
+ kind: 'group';
28
+ index: number;
29
+ }
30
+ /** A chip within the panel: move it to `index` of the grouping. */
31
+ | {
32
+ kind: 'regroup';
33
+ index: number;
34
+ }
35
+ /** A chip released outside the panel: ungroup it. */
36
+ | {
37
+ kind: 'ungroup';
38
+ }
39
+ /** A header leaf over the side bar's Values section: aggregate it with its first function. */
40
+ | {
41
+ kind: 'aggregate';
42
+ }
43
+ /**
44
+ * Refused: the ghost says so and the drop changes nothing (over the panel with something it does not take;
45
+ * the group column outside the grid).
46
+ */
47
+ | {
48
+ kind: 'none';
49
+ };
50
+ /**
51
+ * A drop zone outside the header and the group panel: the side bar's Row Groups or Values section. The
52
+ * zone aims and draws its own marker; the header drag and the column list's row drag use it alike.
53
+ */
54
+ export interface DropZone {
55
+ /** The point (viewport coordinates) is over it: one layout read. */
56
+ over(x: number, y: number): boolean;
57
+ /**
58
+ * Where a drop of `ids` at (x, y) goes, without DOM writes: a place in the grouping (`group`, or `regroup` for a
59
+ * chip — `chip` true — of a grouped column), an aggregation, or `none` when the zone does not take them.
60
+ */
61
+ aim(ids: readonly string[], x: number, y: number, chip: boolean): DropTarget;
62
+ /** Draws where `target` drops (its last aim); null removes the marker. */
63
+ mark(target: DropTarget | null): void;
64
+ /** The column of the draggable chip `target` lies in (Row Groups chips; not their remove button), or null. */
65
+ chipAt(target: Element): {
66
+ id: string;
67
+ label: string;
68
+ } | null;
69
+ }
70
+ /** The shown side bar as a drag sees it: its element, and the drop zones of its open panel. */
71
+ export interface SideBarZones {
72
+ readonly el: HTMLElement;
73
+ readonly zones: readonly DropZone[];
74
+ }
75
+ /** What the header gestures need from the grid. */
76
+ export interface HeaderHost {
77
+ root: HTMLElement;
78
+ /**
79
+ * How far outside the grid a dragged header is let go to hide its columns (`GridOptions.dragOutHides`);
80
+ * null: it does not hide. Read every move.
81
+ */
82
+ hideDistance(): number | null;
83
+ /** The top bar while it shows, else null: a drag-out's top edge lies below it. */
84
+ toolbar(): HTMLElement | null;
85
+ header: HTMLElement;
86
+ /** The scroll container: auto-scroll target, and the bounds of the centre lane's visible part. */
87
+ viewport: HTMLElement;
88
+ /** The width its rows can be seen in: its own less a classic vertical bar's strip (no layout read). */
89
+ visibleWidth(): number;
90
+ /** The current display layout (a pending relayout applied first). */
91
+ layout(): DisplayLayout;
92
+ /** The resolved column of a defined id, with current widths (hidden ones too, `displayed: false`). */
93
+ column(id: string): ResolvedColumn | null;
94
+ /**
95
+ * The lane of a displayed column, `null` otherwise. Cheap enough per pointer move: no pending relayout is applied,
96
+ * since only an applied layout (a commit) changes lanes; a pending one changes widths only.
97
+ */
98
+ laneOf(id: string): Lane | null;
99
+ /** The segment behind a group header element or a group's resize zone. */
100
+ segmentOf(el: Element): Segment | null;
101
+ /**
102
+ * Folds or unfolds a column group that can fold now (a chevron click, a double-click on its segment), one
103
+ * `'ui'` toggle event; false when it cannot fold (or is unknown).
104
+ */
105
+ toggleGroup(id: string): boolean;
106
+ /** Left, centre and right lane of the header's leaf row. */
107
+ leafLanes(): readonly HTMLElement[];
108
+ /** The column under the pointer (null: none): its leaf cell and fillers show the hover look together. */
109
+ hover(id: string | null): void;
110
+ /**
111
+ * The separator line of the resize zone under the pointer (its `data-line`, null: none): every zone on it shows
112
+ * the line, the full height where the line ends groups.
113
+ */
114
+ resizeLine(key: string | null): void;
115
+ /**
116
+ * The header's `pointerover` and `pointerleave` for the styled tooltips: one optional call each, so a
117
+ * grid without tooltips does nothing more.
118
+ */
119
+ tooltipPointer(e: PointerEvent): void;
120
+ /**
121
+ * The columns a header drag carries, tinted while it runs: their leaf cells, and from header row `level` down
122
+ * the group segments made of them (a drag that started on a segment; null: on a leaf cell). `null` ends the tint.
123
+ */
124
+ moving(ids: readonly string[] | null, level: number | null): void;
125
+ /** The group panel element (always there). */
126
+ panel: HTMLElement;
127
+ /** The panel is shown (option on, not tree mode). */
128
+ panelShown(): boolean;
129
+ /** The panel's chips, in grouping order. */
130
+ panelChips(): readonly HTMLElement[];
131
+ /** The panel takes this column. */
132
+ groupable(id: string): boolean;
133
+ isGrouped(id: string): boolean;
134
+ /** Live resize: fixed width, clamped, previewed once per frame; no event. */
135
+ resize(id: string, width: number): void;
136
+ /** Puts a column's state back without an event (a cancelled gesture). */
137
+ restore(entry: ColumnState): void;
138
+ /** A resize gesture ended (released or cancelled): its preview gives way to the applied layout. */
139
+ endResize(): void;
140
+ stateOf(id: string): ColumnState | null;
141
+ /** A gesture changed the state: one state event. */
142
+ finish(source: 'resize'): void;
143
+ autoSize(id: string): void;
144
+ sort(id: string, multi: boolean): void;
145
+ /**
146
+ * Applies a drop (move, pin, unpin, hide, group, regroup or ungroup) with its state event; none when nothing
147
+ * changes or it is refused. A header drag's moves and pins go through `moveLive` instead; keyboard moves come here.
148
+ */
149
+ drop(ids: string[], target: DropTarget): void;
150
+ /**
151
+ * A move or pin target of a header drag shows live: the columns go to their new place at once
152
+ * (sliding within a lane), without a state event. The first one keeps the drag's starting order and pins.
153
+ */
154
+ moveLive(ids: string[], target: Extract<DropTarget, {
155
+ kind: 'move' | 'pin';
156
+ }>): void;
157
+ /**
158
+ * A header drag ended: `keep`, one state event if it moved or pinned columns live (`'pin'` when a pin
159
+ * changed, else `'move'`); otherwise they go back to the drag's starting order and pins, without an event.
160
+ */
161
+ endLive(keep: boolean): void;
162
+ /** A click on a header cell's filter or menu button: the UI toggles that popup, anchored to it. */
163
+ openButton(id: string, which: 'menu' | 'filter', button: HTMLElement): void;
164
+ /**
165
+ * A right-click on the header the grid takes: on a leaf cell or one of its fillers its column, on
166
+ * a group segment its group, elsewhere (empty area, the row-number column) `null`; `at` in viewport coordinates.
167
+ * True when a menu opened; false when it had no entries (the browser's menu then shows).
168
+ */
169
+ headerMenu(target: {
170
+ column: string;
171
+ } | {
172
+ group: ColumnGroupInfo;
173
+ } | null, at: {
174
+ x: number;
175
+ y: number;
176
+ }, event: MouseEvent): boolean;
177
+ /** A grid popup is open: Escape is the popup's. */
178
+ popupOpen(): boolean;
179
+ /** A header drag started: open popups close. */
180
+ dragStarted(): void;
181
+ /**
182
+ * The shown side bar and its drop zones; null without one. Over the side bar a header drag drops
183
+ * only on a zone; a chip of a zone drags like a group-panel chip.
184
+ */
185
+ sideBarZones(): SideBarZones | null;
186
+ /**
187
+ * A pointer gesture of the body owns the grid (`InteractHost.gesture`: a range press or a row drag): the
188
+ * header's presses and clicks are another pointer's then, and ignored.
189
+ */
190
+ pointerGesture(): boolean;
191
+ /** The cell ranges as header clicks change them: the grid's interaction host. */
192
+ cells: Pick<InteractHost, 'ranges' | 'cellSelection' | 'rangeColumns' | 'rowCount' | 'rowNumbersSelect' | 'stateChanged' | 'emitRange'>;
193
+ }
194
+ /** What the header keys run through the header's gesture code, so a key acts as the pointer does. */
195
+ export interface HeaderActions {
196
+ /**
197
+ * A click on a header cell, or Enter on a focused one: `target` is the cell's element (or content in it). Sorts
198
+ * its column (Shift adding it to the multi-sort) or, with column selection, selects columns as the mode says
199
+ * (`'click'`: Enter selects, Shift+Enter extends, Alt+Enter sorts); the corner selects every cell. Keys pass no
200
+ * Mod (Mod+Enter opens the filter) and report their range change as `'keyboard'`.
201
+ */
202
+ activate(target: Element, shift: boolean, alt: boolean): void;
203
+ /**
204
+ * Shift+← / Shift+→: the column one place left (−1) or right (1) among the user columns of its lane, through the drop
205
+ * a drag makes (one `'move'` state event); nothing at the lane's edge or for a column a drag could not carry.
206
+ */
207
+ moveBy(id: string, dir: -1 | 1): void;
208
+ /** Alt+← / Alt+→: the column `delta` px wider, within its limits, as a resize gesture ends (one `'resize'` event). */
209
+ resizeBy(id: string, delta: number): void;
210
+ }
211
+ /**
212
+ * Delegated pointer handling on the header: resize, double-click auto-size, sort and column-selection clicks,
213
+ * and dragging leaf cells or group segments to reorder, pin, unpin or hide them; and the same actions
214
+ * for the header keys. Must run inside the grid's effect scope (the VueUse listeners, timer and frame loop stop with it).
215
+ */
216
+ export declare function createHeaderInteractions(host: HeaderHost): HeaderActions;
@@ -0,0 +1,400 @@
1
+ import type { CopyKeys } from '../clipboard/options';
2
+ import type { Band } from '../edit/clear';
3
+ import type { FillHandle } from '../edit/fillHandle';
4
+ import type { Editing } from '../edit/types';
5
+ import type { FlashTarget } from '../render/flash';
6
+ import type { HeaderTarget } from '../render/header';
7
+ import type { DropMark } from '../render/strategy';
8
+ import type { RowGeometry } from '../rowdrag/model';
9
+ import type { ResolvedCellSelection } from '../selection/options';
10
+ import type { SelectionOp } from '../selection/rows';
11
+ import type { TableHost } from '../table/host';
12
+ import type { CellAddress, ColumnGroupInfo, CopyInfo, CopyOptions, CopyResult, FocusChange, Grid, GridOptions, RangeChange, ScrollAlign, SelectionChange } from '../types';
13
+ import type { FocusModel } from './focus';
14
+ /** A page key's scroll: `row` to `align`, before the focused cell is revealed. */
15
+ export interface PageScroll {
16
+ row: number;
17
+ align: 'start' | 'end';
18
+ }
19
+ export interface InteractHost extends TableHost {
20
+ readonly root: HTMLElement;
21
+ /** The body area: the content scroller, its proxy scrollbars and the focus guards. */
22
+ readonly body: HTMLElement;
23
+ /** The content scroller (`role="grid"`). */
24
+ readonly viewport: HTMLElement;
25
+ readonly header: HTMLElement;
26
+ /** The rows region. */
27
+ readonly rowsEl: HTMLElement;
28
+ /**
29
+ * The pinned-row sections around it: `.ig-pinned-top` and `.ig-pinned-bottom`, always present
30
+ * (hidden while empty). The rows' press, click and double-click listeners sit on them too.
31
+ */
32
+ readonly sectionEls: readonly HTMLElement[];
33
+ readonly api: Grid;
34
+ /** The rows of pinned section `side`: a pinned address's `row` is an index into them. */
35
+ pinnedRowCount(side: 'top' | 'bottom'): number;
36
+ /**
37
+ * The pinned section an element lies in, undefined outside both — and at once, without a DOM test, while
38
+ * neither has rows.
39
+ */
40
+ sectionAt(el: Element): 'top' | 'bottom' | undefined;
41
+ /**
42
+ * The display row of a bound row element, −1 if none. With `pinned` the index of a bound row of
43
+ * that pinned section.
44
+ */
45
+ rowOf(rowEl: Element, pinned?: 'top' | 'bottom'): number;
46
+ /**
47
+ * The cell an event target is in (a bound row's cell), with its row and column: a body cell, or a pinned row's
48
+ * With its section as `pinned` and `row` its index there; null outside cells. A caller that serves
49
+ * body rows only (the row drag) refuses a `pinned` hit.
50
+ */
51
+ cellAt(target: EventTarget | null): {
52
+ row: number;
53
+ column: string;
54
+ cell: HTMLElement;
55
+ pinned?: 'top' | 'bottom';
56
+ } | null;
57
+ /** The drawn cell of a row in a column — with `pinned` of that section's row —, null when not drawn. */
58
+ cellElement(row: number, column: string, pinned?: 'top' | 'bottom'): HTMLElement | null;
59
+ /** The element of a bound row — with `pinned` of that section's row —, null when it is not bound. */
60
+ rowElement(row: number, pinned?: 'top' | 'bottom'): HTMLElement | null;
61
+ /** Flashes cells by position: an entry in the grid's flash registry, drawn by the row pool. */
62
+ flash(target: FlashTarget): void;
63
+ /** The element of a header cell as the focus model names it; null when it is not displayed. */
64
+ headerElement(target: HeaderTarget): HTMLElement | null;
65
+ /** The header cell an element belongs to (a filler stands for its leaf); null outside header cells. */
66
+ headerTargetOf(el: Element): HeaderTarget | null;
67
+ /** The floating-filter row shows. */
68
+ floatingRow(): boolean;
69
+ /** The fully visible rows of the last frame (`last < first`: none). */
70
+ visibleRows(): {
71
+ first: number;
72
+ last: number;
73
+ };
74
+ /**
75
+ * The rows in the (top) stack in the last frame: stuck under the header or being pushed out,
76
+ * top-down; [] when none shows (the options off, a source without `parentRow` / `groupEnd`, or the stack changed
77
+ * since). The top group totals and the top grand total are among them.
78
+ */
79
+ stackRows(): readonly number[];
80
+ /**
81
+ * The rows in the bottom stack in the last frame — bottom group totals and the bottom grand total, stuck
82
+ * above the bottom edge or being pushed out —, top-down; [] when none shows (no bottom total sticks, or as
83
+ * `stackRows`).
84
+ */
85
+ bottomStackRows(): readonly number[];
86
+ /**
87
+ * Scrolls a cell into view in the next pass (requests coalesce, one scroll per frame): its row to `align`, its
88
+ * column (a centre one) to the nearest edge. Row −1: no vertical scroll; column null: no horizontal scroll. `page`
89
+ * (PageUp / PageDown): that row goes to its edge first, then the cell's row only if it is not in view. A pinned
90
+ * cell (`pinned`) scrolls its column only, never the rows: its section is always in view.
91
+ */
92
+ scrollCellIntoView(cell: {
93
+ row: number;
94
+ column: string | null;
95
+ pinned?: 'top' | 'bottom';
96
+ }, align: ScrollAlign, page?: PageScroll): void;
97
+ /**
98
+ * PageUp / PageDown from `row`, measured on the last frame: `focus` is the
99
+ * row one rows-area height below `row`'s top (down) / above its bottom (up); `scroll` is the row at the page's
100
+ * bottom edge, which goes to the top (down) / at its top edge, which goes to the bottom (up), so the focused row
101
+ * keeps its place on the screen. A move that would stay on `row` moves one row; both are clamped to the rows; a
102
+ * focus row taller than the page goes to the top itself. Null without rows. From a pinned row (`pinned`;
103
+ * `row` unread) `scroll` is the same and `focus` the body row beside the section after that scroll, clamped
104
+ * at the body's ends: the first fully shown row under the top section, the last one above the bottom section.
105
+ */
106
+ pageRows(row: number, up: boolean, pinned?: 'top' | 'bottom'): {
107
+ focus: number;
108
+ scroll: PageScroll;
109
+ } | null;
110
+ /** Delivers a `FocusChange` through the grid's event queue, its position taken now. */
111
+ emitFocus(source: FocusChange['source']): void;
112
+ /** The focus model. */
113
+ focusModel(): FocusModel;
114
+ /**
115
+ * One row selection gesture (a key, a click) through the row selection wiring: a data change the model has
116
+ * not seen yet first, then drawn rows and the header checkbox follow and one `SelectionChange` with `source`
117
+ * goes out. True when the selection changed; false also while row selection is off.
118
+ */
119
+ rowGesture(op: SelectionOp, source: SelectionChange['source']): boolean;
120
+ /**
121
+ * Expands or collapses a group row or tree parent (a chevron click, Enter); `all`: every
122
+ * group at once (Alt). False when the source cannot expand rows or the row is no group: the gesture is not the
123
+ * grid's. A throwing source callback is reported once and counts as handled.
124
+ */
125
+ toggleGroup(row: number, all: boolean): boolean;
126
+ /** `GroupColumnOptions.doubleClickToggle`: a double-click on a group column cell toggles its row. */
127
+ groupDoubleClick(): boolean;
128
+ /**
129
+ * Opens or closes a master's detail (a chevron click, Enter / Shift+Enter): one `onDetailToggle`
130
+ * with `source`. False when the row is no master (or master/detail is off): the gesture is not the grid's.
131
+ */
132
+ toggleDetail(row: number, source: 'pointer' | 'keyboard'): boolean;
133
+ /** The row is a master whose detail is open; false while master/detail is off. */
134
+ detailOpen(row: number): boolean;
135
+ /**
136
+ * The detail of this grid an element belongs to: its master's row (−1 while hidden) and the part —
137
+ * the strip (the stop), its panel, a Tab sentinel, or `'content'` for anything inside the content host (a nested
138
+ * grid's own details included). Null for any other element, and while master/detail is off.
139
+ */
140
+ detailOf(el: Element): {
141
+ row: number;
142
+ part: 'strip' | 'panel' | 'content' | 'start' | 'end';
143
+ } | null;
144
+ /** The shown detail strip of master row `row` (the stop's element); null when none is drawn. */
145
+ detailElement(row: number): HTMLElement | null;
146
+ /**
147
+ * The master row now of the detail whose content holds `el`, found by the detail's key — also right after a reset
148
+ * that moved it, before any pass drew it there; −1 when `el` is in no content of this grid's details.
149
+ */
150
+ detailMasterOf(el: Element): number;
151
+ /**
152
+ * Alt+Enter on `row`: every detail closes when `row`'s is open, else every one opens (one `onDetailToggle`
153
+ * with source `'keyboard'`). False when `row` is no master: the key is not the grid's.
154
+ */
155
+ setAllDetails(row: number): boolean;
156
+ /**
157
+ * Enter / F2 on the stop: DOM focus into `row`'s detail content — a nested grid's remembered cell, a
158
+ * renderer's focus, else its first tabbable element; content not built yet takes it once built. Nothing focusable
159
+ * inside: focus stays on the stop.
160
+ */
161
+ detailInto(row: number): void;
162
+ /** Focus is inside `row`'s detail content: its Tab sentinels take Tab; −1: none. */
163
+ detailFocusInside(row: number): void;
164
+ /**
165
+ * Scrolls master row `row`'s detail into view in the next pass (nearest; a detail taller than the rows area
166
+ * shows its top), as `scrollCellIntoView` does for a cell.
167
+ */
168
+ scrollDetailIntoView(row: number): void;
169
+ /** The resolved `cellSelection` options; null while cell selection is off. */
170
+ cellSelection(): ResolvedCellSelection | null;
171
+ /**
172
+ * The row-number column is shown and selects (`RowNumbersOptions.selects`): its cells and its header (the
173
+ * corner) make ranges while cell selection is on.
174
+ */
175
+ rowNumbersSelect(): boolean;
176
+ /** Schedules a pass. */
177
+ request(): void;
178
+ /** Moves the `StrategyContext` state version and schedules a pass: drawn rows read their state again. */
179
+ stateChanged(): void;
180
+ /** Delivers a `SelectionChange` through the grid's event queue, its count taken now. */
181
+ emitSelection(source: SelectionChange['source']): void;
182
+ /** Delivers a `RangeChange` through the grid's event queue, its ranges taken now. */
183
+ emitRange(event: Omit<RangeChange, 'ranges'>): void;
184
+ /** A count as the locale writes it: the `formatted` argument of the count texts (`rowsSelected`, …). */
185
+ formatCount(count: number): string;
186
+ /** Says `text` in the grid's polite live region. */
187
+ announce(text: string): void;
188
+ /** The focused body cell's display row; −1 without one (an export of `rows: 'selection'`). */
189
+ focusedRow(): number;
190
+ /** `textSelection` is on: a native text selection in the grid is the browser's to copy. */
191
+ textSelection(): boolean;
192
+ /**
193
+ * Runs the `onCellKeyDown` listeners for a key on or inside the cell `row`, `column` — with `pinned`
194
+ * a pinned row's, its value from that section —, before the grid acts, each isolated. True when
195
+ * one of them called `preventDefault()`: the grid then stays out.
196
+ */
197
+ cellKeyDown(row: number, column: string, event: KeyboardEvent, pinned?: 'top' | 'bottom'): boolean;
198
+ /**
199
+ * `onCellClick` / `onCellDoubleClick`: the listeners get the cell's row, column and raw value — with `pinned`
200
+ * a pinned row's, its value from that section —; each is isolated. Nothing is built while there
201
+ * are no listeners.
202
+ */
203
+ cellEvent(kind: 'click' | 'dblclick', row: number, column: string, event: MouseEvent, pinned?: 'top' | 'bottom'): void;
204
+ /**
205
+ * The header keys act through the header's own code: a click's action on a header cell element, a
206
+ * column moved one place or resized by `delta` px as a drag does it (one state event).
207
+ */
208
+ activateHeader(target: Element, shift: boolean, alt: boolean): void;
209
+ /**
210
+ * Enter / Alt+Enter on a focused group header: folds or unfolds a column group that can fold now, one
211
+ * `'ui'` toggle event; false when it cannot fold (the key then acts as a click).
212
+ */
213
+ toggleColumnGroup(id: string): boolean;
214
+ moveColumnBy(id: string, dir: -1 | 1): void;
215
+ resizeColumnBy(id: string, delta: number): void;
216
+ /**
217
+ * Opens the column's filter popup or the column's or group's menu from the header cell `cell`; a keyboard
218
+ * close returns focus to it. False when nothing opened.
219
+ */
220
+ headerPopup(target: {
221
+ column: string;
222
+ } | {
223
+ group: ColumnGroupInfo;
224
+ }, which: 'filter' | 'menu', cell: HTMLElement): boolean;
225
+ /** Focus into a column's floating editor (built then); false when the cell has none that takes focus. */
226
+ enterFloating(column: string, at?: 'first' | 'last'): boolean;
227
+ /**
228
+ * Tab / Shift+Tab between the group cell's two boxes: focus moves from `from` to the other box and
229
+ * this returns true; false when the move would leave the cell (every cell but the group cell's).
230
+ */
231
+ floatingStep(column: string, from: Element, back: boolean): boolean;
232
+ /** What a click on the header checkbox does (Space on its header cell); false when nothing changed. */
233
+ toggleSelectAll(): boolean;
234
+ /**
235
+ * A right-click (a macOS context click) is the grid's context menu's: `contextMenu` is not false, Ctrl is
236
+ * held only with `withControlKey` (otherwise the browser's menu shows), and it is not on selected text. Its
237
+ * focus and range rules apply only then — before the entries are known, so also when the menu turns out to have
238
+ * none (`clipboard: false` and no `items`, an empty array) and the browser's menu shows.
239
+ */
240
+ takesContextClick(event: MouseEvent): boolean;
241
+ /**
242
+ * The ContextMenu key or Shift+F10 on the focused cell `cell` — a pinned one's too, its context carrying
243
+ * `pinned`: the context menu of that cell, anchored to it. False when nothing opened (`contextMenu:
244
+ * false`, no entries): the key is then left to the browser.
245
+ */
246
+ openContextMenu(cell: CellAddress): boolean;
247
+ /** Reports an app callback's error once per key. */
248
+ report(key: string, error: unknown): void;
249
+ /**
250
+ * Runs a module's lazy setup inside the grid's effect scope, so its composables (`useEventListener`, watchers) stop
251
+ * with the grid, also when the setup runs long after creation (a setter turning a feature on). Undefined
252
+ * once the grid is destroyed.
253
+ */
254
+ inScope<T>(setup: () => T): T | undefined;
255
+ /**
256
+ * The row drag's drop mark on this grid's rows: the target row's `.ig-row-drop-on` (tint and
257
+ * ring) or its insert line (`above` / `below`); null removes it. Drawn as the focus is: it requests a pass and moves
258
+ * no state version, and only the previous and the new target row are rewritten. The values are copied.
259
+ */
260
+ setDropMark(mark: DropMark | null): void;
261
+ /**
262
+ * Runs a pending pass now (`FrameScheduler.flush`; nothing when none is pending). For a change made inside another
263
+ * animation frame callback (the row drag's frame, the keyboard twin's): a pass requested there runs one frame later,
264
+ * so that frame would paint the old rows and mark.
265
+ */
266
+ flushPass(): void;
267
+ /**
268
+ * The rows of a running drag from this grid (display rows; null when none), dimmed by `.ig-row-dragging`:
269
+ * one state version move each time a set is given or cleared.
270
+ */
271
+ setDraggedRows(rows: ReadonlySet<number> | null): void;
272
+ /**
273
+ * The pointer gesture that owns the grid: a range press (`body.ts`) or a row-drag press (`rowdrag/
274
+ * gesture.ts`), from its press to its release or cancel. The body's, the header's and the row selection wiring's
275
+ * press handlers ignore a press by another pointer while it is set; a press by the same pointer (its release was
276
+ * lost) calls its `end()` first. Null while none runs.
277
+ */
278
+ gesture(): PointerGesture | null;
279
+ setGesture(gesture: PointerGesture | null): void;
280
+ /**
281
+ * This press makes no click: set by a range drag, a row drag or a cancelled one, cleared by the next
282
+ * press on the rows while no gesture runs; read by `body.ts`'s click and double-click handlers and the row selection
283
+ * wiring's click handler.
284
+ */
285
+ noClick(): boolean;
286
+ setNoClick(on: boolean): void;
287
+ /**
288
+ * The rows area in client coordinates: the content scroller below its sticky header, without its scrollbars — the
289
+ * body between the pinned sections (the row drag's aiming). The range drag takes the rows area as a whole,
290
+ * the sections around it included (`sectionHeight`).
291
+ */
292
+ rowsArea(): {
293
+ left: number;
294
+ top: number;
295
+ right: number;
296
+ bottom: number;
297
+ };
298
+ /**
299
+ * The height pinned section `side` is drawn with (no layout read): 0 while it is hidden. It sticks right
300
+ * above (top) or below (bottom) `rowsArea()`.
301
+ */
302
+ sectionHeight(side: 'top' | 'bottom'): number;
303
+ /**
304
+ * The width the rows can be seen in (no layout read): the content scroller's less the strip a classic vertical bar
305
+ * covers over the rows' right edge.
306
+ */
307
+ visibleWidth(): number;
308
+ /**
309
+ * The height index as aiming reads it, with the model top the screen shows (the last pass's, moved by a
310
+ * scroll since). One object, read through.
311
+ */
312
+ rowGeometry(): RowGeometry & {
313
+ modelTop: number;
314
+ };
315
+ /**
316
+ * Runs `run` through the grid's event queue, so the row-drag events keep their order with the grid's other
317
+ * events; nothing runs after `destroy()`.
318
+ */
319
+ queueEvent(run: () => void): void;
320
+ /**
321
+ * The keyboard twin: Alt+↑ (−1) / Alt+↓ (1) on the focused body cell move the focused row — or the
322
+ * displayed selection it is in — one place, applied in the next frame. True when the grid takes the key; false (the
323
+ * key passes) without row dragging, at an edge, refused, or while the grid's own rows take no gap drops.
324
+ */
325
+ moveRowsByKey(dir: -1 | 1): boolean;
326
+ /** `GridOptions.groupKeys`, resolved: the key (`KeyboardEvent.key`) per action; none = off. */
327
+ groupKeys(): {
328
+ expandAll?: string;
329
+ collapseAll?: string;
330
+ };
331
+ /**
332
+ * The column menu's "Expand all" / "Collapse all". False — nothing done, the key passes — while the view
333
+ * has no expandable rows (neither grouped nor a tree, or a source that cannot expand).
334
+ */
335
+ expandAllGroups(expanded: boolean): boolean;
336
+ /**
337
+ * Toggles the live checkbox the body cell `row`, `column` shows (a checkbox column's box on a
338
+ * loaded data row, the column `editable`, the cell writable) — a click on it, Space on its cell: `!value` (a mixed
339
+ * box: `true`) through the value write path, `onCellValueChanged` with `source: 'checkbox'`. With `box` — a
340
+ * click's, which the browser toggled already — the box shows the cell's value afterwards: the written one, or after
341
+ * a refused write the one it had. False, nothing done, where the cell shows no live box. `pinned`: a
342
+ * pinned row's box, `row` its index in that section — written into the app's object.
343
+ */
344
+ toggleCheckbox(row: number, column: string, box?: HTMLInputElement, pinned?: 'top' | 'bottom'): boolean;
345
+ /** The editing module (lazy); null while nothing can be edited: one null test per key or press. */
346
+ edit(): Editing | null;
347
+ /**
348
+ * A cut's text is written: the editable cells among `cells` are cleared as Delete clears them, one
349
+ * operation `'cut'`; nothing on a grid that can't edit.
350
+ */
351
+ cutWritten(cells: readonly Band[], source: CopyInfo['source']): void;
352
+ /** The fill handle; null while cell selection has none: one null test per press on it. */
353
+ fill(): FillHandle | null;
354
+ }
355
+ /**
356
+ * A pointer gesture that owns the grid: its owner (a range press, a row drag, a handle's drag: the fill
357
+ * handle's or the range handle's), its
358
+ * pointer, and how to end it when its release was lost (the same pointer pressed again).
359
+ */
360
+ export interface PointerGesture {
361
+ owner: 'range' | 'row' | 'fill';
362
+ pointerId: number;
363
+ end(): void;
364
+ }
365
+ /**
366
+ * The copy plumbing as the key map and the menus call it, implemented by `clipboard/copy.ts` (declared
367
+ * earlier).
368
+ */
369
+ export interface CopyController {
370
+ /** A copy (the default target, or `options.target`); `source` goes into the `write` hook's info. */
371
+ copy(options: CopyOptions, source: CopyInfo['source']): Promise<CopyResult>;
372
+ /** The text `copy` would write, written nowhere. */
373
+ copyText(options: CopyOptions): Promise<string>;
374
+ /** Writes a column's header text (the `header` hook applied), as Mod+C on its focused header cell does. */
375
+ copyHeader(column: string): void;
376
+ /**
377
+ * A Mod+C key press on the grid's own focus element: copies nothing at once — the browser's `copy`
378
+ * event, the key's default action, does — and schedules the fallback for the next task, which a `copy` event for the
379
+ * press cancels. The key is left unprevented.
380
+ */
381
+ press(): void;
382
+ /** `clipboard.keys` parsed; null while copying is off. */
383
+ keys(): CopyKeys | null;
384
+ /**
385
+ * A copy key's press: what Mod+C copies there (a focused header as in `press`), with `headers`,
386
+ * written through the clipboard API inside the press — no `copy` event fires for it. `source` `'keyboard'`; the same
387
+ * gesture again within a second is skipped. False with nothing to copy (or a native text selection to leave alone).
388
+ */
389
+ keyCopy(headers: true | 'groups'): boolean;
390
+ /** `GridOptions.clipboard` as given (`setClipboard`). */
391
+ setOptions(options: GridOptions['clipboard']): void;
392
+ /** The editing module was made or dropped: `clipboard.keys` are checked again against the keys the grid takes. */
393
+ editingChanged(): void;
394
+ /**
395
+ * Shift+Delete was pressed in the grid: Chromium makes a `cut` event of it, which the grid doesn't take,
396
+ * as no modified Delete does anything. Holds for the key's own task only.
397
+ */
398
+ skipCut(): void;
399
+ destroy(): void;
400
+ }
@@ -0,0 +1,20 @@
1
+ import type { EditTarget } from '../edit/types';
2
+ import type { GridOptions } from '../types';
3
+ import { type FocusModel } from './focus';
4
+ import type { CopyController, InteractHost } from './host';
5
+ export interface Keyboard {
6
+ /** The grid's one `keydown` listener, on the content scroller (body and header). */
7
+ onKeyDown(event: KeyboardEvent): void;
8
+ /** `Grid.handleKey`: true when the grid handled the key; the event is not prevented here. */
9
+ handleKey(event: KeyboardEvent, options?: {
10
+ focus?: boolean;
11
+ }): boolean;
12
+ setNavigate(navigate: GridOptions['navigate']): void;
13
+ /** Enter's move: focus to the cell below (`up`: above), never a stop or the header; no `navigate`. */
14
+ enterMove(from: EditTarget, up: boolean): void;
15
+ /** Tab from the cell of a committed edit. `'pass'`: the key is the browser's. */
16
+ tabOn(from: EditTarget, e: KeyboardEvent): 'done' | 'pass';
17
+ destroy(): void;
18
+ }
19
+ /** `copy` is the copy plumbing: Mod+C on a body or header cell hands the press to it. */
20
+ export declare function createKeyboard(host: InteractHost, focus: FocusModel, copy: () => CopyController | null): Keyboard;
@@ -0,0 +1,7 @@
1
+ import type { InteractHost } from './host';
2
+ export interface MenuKeyGuard {
3
+ /** The grid handled `event` (a ContextMenu or Shift+F10 keydown) and opened its own menu. */
4
+ arm(event: KeyboardEvent): void;
5
+ destroy(): void;
6
+ }
7
+ export declare function createMenuKeyGuard(host: InteractHost): MenuKeyGuard;
@@ -0,0 +1,2 @@
1
+ /** `target` (an element, or a node inside one) belongs to the grid whose root is `root`: no allocation, one walk up. */
2
+ export declare function ownsEvent(root: Element, target: EventTarget | null): boolean;