@kopexa/extension-table 17.0.45 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/chunk-2NBDRVYL.mjs +428 -0
  2. package/dist/chunk-3SWV7BGP.mjs +638 -0
  3. package/dist/chunk-4QSZXHZO.mjs +276 -0
  4. package/dist/chunk-5B5XIL2G.mjs +457 -0
  5. package/dist/chunk-62B2LU2Q.mjs +603 -0
  6. package/dist/chunk-6FHFDGJO.mjs +251 -0
  7. package/dist/chunk-CD62W5C3.mjs +165 -0
  8. package/dist/chunk-CN73TYHV.mjs +190 -0
  9. package/dist/chunk-CPDSPBS6.mjs +276 -0
  10. package/dist/chunk-E7W2KRZG.mjs +49 -0
  11. package/dist/chunk-G6GHC2WO.mjs +276 -0
  12. package/dist/chunk-GBTQVIN5.mjs +174 -0
  13. package/dist/chunk-GDEXPEW5.mjs +52 -0
  14. package/dist/chunk-GQLZBIWF.mjs +198 -0
  15. package/dist/chunk-IRJ6RAVQ.mjs +116 -0
  16. package/dist/chunk-J4VOSZCZ.mjs +59 -0
  17. package/dist/chunk-KIYFW7MP.mjs +122 -0
  18. package/dist/chunk-KTRZVXJC.mjs +306 -0
  19. package/dist/chunk-LUA32VH4.mjs +35 -0
  20. package/dist/{chunk-SNJF4UW6.mjs → chunk-MB52MZQ4.mjs} +7 -8
  21. package/dist/chunk-PTX5UYV6.mjs +10 -0
  22. package/dist/chunk-TEGO6KUS.mjs +96 -0
  23. package/dist/chunk-VIBVRWS4.mjs +197 -0
  24. package/dist/chunk-VQV757EG.mjs +113 -0
  25. package/dist/chunk-XRNQXADK.mjs +149 -0
  26. package/dist/chunk-ZVPJDJBO.mjs +134 -0
  27. package/dist/{kit.d.mts → extensions/kit.d.mts} +1 -3
  28. package/dist/{kit.d.ts → extensions/kit.d.ts} +1 -3
  29. package/dist/extensions/kit.js +1041 -0
  30. package/dist/extensions/kit.mjs +15 -0
  31. package/dist/extensions/table-cell.d.mts +6 -0
  32. package/dist/extensions/table-cell.d.ts +6 -0
  33. package/dist/extensions/table-cell.js +70 -0
  34. package/dist/{table/icons.mjs → extensions/table-cell.mjs} +3 -3
  35. package/dist/extensions/table-handle-plugin.d.mts +46 -0
  36. package/dist/extensions/table-handle-plugin.d.ts +46 -0
  37. package/dist/extensions/table-handle-plugin.js +1100 -0
  38. package/dist/extensions/table-handle-plugin.mjs +18 -0
  39. package/dist/extensions/table-handle.d.mts +19 -0
  40. package/dist/extensions/table-handle.d.ts +19 -0
  41. package/dist/extensions/table-handle.js +865 -0
  42. package/dist/extensions/table-handle.mjs +11 -0
  43. package/dist/{table → extensions}/table.d.mts +2 -2
  44. package/dist/{table → extensions}/table.d.ts +2 -2
  45. package/dist/extensions/table.js +138 -0
  46. package/dist/extensions/table.mjs +9 -0
  47. package/dist/hooks/use-resize-overlay.d.mts +5 -0
  48. package/dist/hooks/use-resize-overlay.d.ts +5 -0
  49. package/dist/hooks/use-resize-overlay.js +83 -0
  50. package/dist/hooks/use-resize-overlay.mjs +9 -0
  51. package/dist/hooks/use-table-add-row-column.d.mts +57 -0
  52. package/dist/hooks/use-table-add-row-column.d.ts +57 -0
  53. package/dist/hooks/use-table-add-row-column.js +551 -0
  54. package/dist/hooks/use-table-add-row-column.mjs +11 -0
  55. package/dist/hooks/use-table-align-cell.d.mts +148 -0
  56. package/dist/hooks/use-table-align-cell.d.ts +148 -0
  57. package/dist/hooks/use-table-align-cell.js +655 -0
  58. package/dist/hooks/use-table-align-cell.mjs +13 -0
  59. package/dist/hooks/use-table-clear-row-column-content.d.mts +103 -0
  60. package/dist/hooks/use-table-clear-row-column-content.d.ts +103 -0
  61. package/dist/hooks/use-table-clear-row-column-content.js +681 -0
  62. package/dist/hooks/use-table-clear-row-column-content.mjs +11 -0
  63. package/dist/hooks/use-table-delete-row-column.d.mts +87 -0
  64. package/dist/hooks/use-table-delete-row-column.d.ts +87 -0
  65. package/dist/hooks/use-table-delete-row-column.js +459 -0
  66. package/dist/hooks/use-table-delete-row-column.mjs +11 -0
  67. package/dist/hooks/use-table-duplicate-row-column.d.mts +49 -0
  68. package/dist/hooks/use-table-duplicate-row-column.d.ts +49 -0
  69. package/dist/hooks/use-table-duplicate-row-column.js +758 -0
  70. package/dist/hooks/use-table-duplicate-row-column.mjs +11 -0
  71. package/dist/hooks/use-table-handle-positioning.d.mts +42 -0
  72. package/dist/hooks/use-table-handle-positioning.d.ts +42 -0
  73. package/dist/hooks/use-table-handle-positioning.js +190 -0
  74. package/dist/hooks/use-table-handle-positioning.mjs +10 -0
  75. package/dist/hooks/use-table-handle-state.d.mts +28 -0
  76. package/dist/hooks/use-table-handle-state.d.ts +28 -0
  77. package/dist/hooks/use-table-handle-state.js +76 -0
  78. package/dist/hooks/use-table-handle-state.mjs +9 -0
  79. package/dist/hooks/use-table-header-row-column.d.mts +58 -0
  80. package/dist/hooks/use-table-header-row-column.d.ts +58 -0
  81. package/dist/hooks/use-table-header-row-column.js +603 -0
  82. package/dist/hooks/use-table-header-row-column.mjs +13 -0
  83. package/dist/hooks/use-table-merge-split-cell.d.mts +123 -0
  84. package/dist/hooks/use-table-merge-split-cell.d.ts +123 -0
  85. package/dist/hooks/use-table-merge-split-cell.js +331 -0
  86. package/dist/hooks/use-table-merge-split-cell.mjs +12 -0
  87. package/dist/hooks/use-table-move-row-column.d.mts +101 -0
  88. package/dist/hooks/use-table-move-row-column.d.ts +101 -0
  89. package/dist/hooks/use-table-move-row-column.js +621 -0
  90. package/dist/hooks/use-table-move-row-column.mjs +13 -0
  91. package/dist/hooks/use-table-sort-row-column.d.mts +118 -0
  92. package/dist/hooks/use-table-sort-row-column.d.ts +118 -0
  93. package/dist/hooks/use-table-sort-row-column.js +623 -0
  94. package/dist/hooks/use-table-sort-row-column.mjs +13 -0
  95. package/dist/index.d.mts +18 -5
  96. package/dist/index.d.ts +18 -5
  97. package/dist/index.js +4939 -910
  98. package/dist/index.mjs +43 -18
  99. package/dist/lib/constants.d.mts +4 -0
  100. package/dist/lib/constants.d.ts +4 -0
  101. package/dist/{table-row.js → lib/constants.js} +10 -10
  102. package/dist/lib/constants.mjs +10 -0
  103. package/dist/lib/create-image.d.mts +12 -0
  104. package/dist/lib/create-image.d.ts +12 -0
  105. package/dist/lib/create-image.js +221 -0
  106. package/dist/lib/create-image.mjs +8 -0
  107. package/dist/lib/table-utils.d.mts +263 -0
  108. package/dist/lib/table-utils.d.ts +263 -0
  109. package/dist/lib/table-utils.js +488 -0
  110. package/dist/lib/table-utils.mjs +40 -0
  111. package/dist/messages.d.mts +174 -0
  112. package/dist/messages.d.ts +174 -0
  113. package/dist/messages.js +213 -0
  114. package/dist/{table-row.mjs → messages.mjs} +3 -3
  115. package/dist/ui/table-alignment-menu.d.mts +25 -0
  116. package/dist/ui/table-alignment-menu.d.ts +25 -0
  117. package/dist/ui/table-alignment-menu.js +758 -0
  118. package/dist/ui/table-alignment-menu.mjs +14 -0
  119. package/dist/ui/table-cell-handle-menu.d.mts +12 -0
  120. package/dist/ui/table-cell-handle-menu.d.ts +12 -0
  121. package/dist/ui/table-cell-handle-menu.js +1317 -0
  122. package/dist/ui/table-cell-handle-menu.mjs +17 -0
  123. package/dist/ui/table-handle-menu.d.mts +23 -0
  124. package/dist/ui/table-handle-menu.d.ts +23 -0
  125. package/dist/ui/table-handle-menu.js +2598 -0
  126. package/dist/ui/table-handle-menu.mjs +21 -0
  127. package/dist/ui/table-handle.d.mts +48 -0
  128. package/dist/ui/table-handle.d.ts +48 -0
  129. package/dist/ui/table-handle.js +3126 -0
  130. package/dist/ui/table-handle.mjs +22 -0
  131. package/dist/ui/table-selection-overlay.d.mts +14 -0
  132. package/dist/ui/table-selection-overlay.d.ts +14 -0
  133. package/dist/ui/table-selection-overlay.js +553 -0
  134. package/dist/ui/table-selection-overlay.mjs +11 -0
  135. package/package.json +16 -12
  136. package/dist/chunk-6NY5XWR7.mjs +0 -11
  137. package/dist/chunk-74O2ORPO.mjs +0 -81
  138. package/dist/chunk-7NEAULTF.mjs +0 -58
  139. package/dist/chunk-ARSGMUXM.mjs +0 -116
  140. package/dist/chunk-BAQU2YT5.mjs +0 -41
  141. package/dist/chunk-DF6ZMJLL.mjs +0 -40
  142. package/dist/chunk-FKOIW52J.mjs +0 -11
  143. package/dist/chunk-GMNNSVR3.mjs +0 -540
  144. package/dist/chunk-IMRHHVEF.mjs +0 -113
  145. package/dist/chunk-NTWXQSW6.mjs +0 -13
  146. package/dist/chunk-OPDSKEZR.mjs +0 -93
  147. package/dist/chunk-YSUOVRY4.mjs +0 -1
  148. package/dist/kit.js +0 -1024
  149. package/dist/kit.mjs +0 -19
  150. package/dist/table/icons.d.mts +0 -13
  151. package/dist/table/icons.d.ts +0 -13
  152. package/dist/table/icons.js +0 -81
  153. package/dist/table/index.d.mts +0 -3
  154. package/dist/table/index.d.ts +0 -3
  155. package/dist/table/index.js +0 -809
  156. package/dist/table/index.mjs +0 -15
  157. package/dist/table/table-controls.d.mts +0 -15
  158. package/dist/table/table-controls.d.ts +0 -15
  159. package/dist/table/table-controls.js +0 -131
  160. package/dist/table/table-controls.mjs +0 -8
  161. package/dist/table/table-view.d.mts +0 -43
  162. package/dist/table/table-view.d.ts +0 -43
  163. package/dist/table/table-view.js +0 -610
  164. package/dist/table/table-view.mjs +0 -12
  165. package/dist/table/table.js +0 -807
  166. package/dist/table/table.mjs +0 -14
  167. package/dist/table/utilities/col-style.d.mts +0 -3
  168. package/dist/table/utilities/col-style.d.ts +0 -3
  169. package/dist/table/utilities/col-style.js +0 -36
  170. package/dist/table/utilities/col-style.mjs +0 -8
  171. package/dist/table/utilities/delete-table-when-all-cells-selected.d.mts +0 -5
  172. package/dist/table/utilities/delete-table-when-all-cells-selected.d.ts +0 -5
  173. package/dist/table/utilities/delete-table-when-all-cells-selected.js +0 -66
  174. package/dist/table/utilities/delete-table-when-all-cells-selected.mjs +0 -40
  175. package/dist/table/utilities/get-table-node-types.d.mts +0 -7
  176. package/dist/table/utilities/get-table-node-types.d.ts +0 -7
  177. package/dist/table/utilities/get-table-node-types.js +0 -44
  178. package/dist/table/utilities/get-table-node-types.mjs +0 -21
  179. package/dist/table/utilities/insert-line-above-table-action.d.mts +0 -5
  180. package/dist/table/utilities/insert-line-above-table-action.d.ts +0 -5
  181. package/dist/table/utilities/insert-line-above-table-action.js +0 -64
  182. package/dist/table/utilities/insert-line-above-table-action.mjs +0 -8
  183. package/dist/table/utilities/insert-line-below-table-action.d.mts +0 -5
  184. package/dist/table/utilities/insert-line-below-table-action.d.ts +0 -5
  185. package/dist/table/utilities/insert-line-below-table-action.js +0 -63
  186. package/dist/table/utilities/insert-line-below-table-action.mjs +0 -8
  187. package/dist/table/utilities/is-cell-selection.d.mts +0 -5
  188. package/dist/table/utilities/is-cell-selection.d.ts +0 -5
  189. package/dist/table/utilities/is-cell-selection.js +0 -34
  190. package/dist/table/utilities/is-cell-selection.mjs +0 -8
  191. package/dist/table-cell.d.mts +0 -8
  192. package/dist/table-cell.d.ts +0 -8
  193. package/dist/table-cell.js +0 -139
  194. package/dist/table-cell.mjs +0 -8
  195. package/dist/table-header.d.mts +0 -6
  196. package/dist/table-header.d.ts +0 -6
  197. package/dist/table-header.js +0 -104
  198. package/dist/table-header.mjs +0 -8
  199. package/dist/table-row.d.mts +0 -6
  200. package/dist/table-row.d.ts +0 -6
@@ -0,0 +1,263 @@
1
+ import { Node } from '@tiptap/pm/model';
2
+ import { Transaction, EditorState, Command } from '@tiptap/pm/state';
3
+ import { TableMap, FindNodeResult, Rect } from '@tiptap/pm/tables';
4
+ import { Editor } from '@tiptap/react';
5
+
6
+ type Orientation = "row" | "column";
7
+ type TableInfo = {
8
+ map: TableMap;
9
+ } & FindNodeResult;
10
+ interface CellInfo extends FindNodeResult {
11
+ row: number;
12
+ column: number;
13
+ }
14
+ type DomCellAroundResult = {
15
+ type: "cell";
16
+ domNode: HTMLElement;
17
+ tbodyNode: HTMLTableSectionElement | null;
18
+ } | {
19
+ type: "wrapper";
20
+ domNode: HTMLElement;
21
+ tbodyNode: HTMLTableSectionElement | null;
22
+ };
23
+ /**
24
+ * Walk up from an element until we find a TD/TH or the table wrapper.
25
+ * Returns the found element plus its tbody (if present).
26
+ */
27
+ declare function domCellAround(target: Element): DomCellAroundResult | undefined;
28
+ /**
29
+ * Given a DOM cell element, find its (row, col) indices within the table.
30
+ *
31
+ * This function:
32
+ * - Locates the nearest ancestor table element
33
+ * - Uses the editor's document model to resolve the cell's position
34
+ * - Traverses up the node hierarchy to find the corresponding table cell node
35
+ * - Uses `TableMap` to translate the cell's position into (row, col) indices
36
+ *
37
+ * Returns null if:
38
+ * - the table or cell cannot be found in the editor's document
39
+ * - any error occurs during position resolution
40
+ *
41
+ * @param cell The HTMLTableCellElement (td or th)
42
+ * @param tableNode The table node in the ProseMirror document
43
+ * @param editor The Tiptap editor instance
44
+ * @returns An object with { rowIndex, colIndex } or null if not found
45
+ */
46
+ declare function getCellIndicesFromDOM(cell: HTMLTableCellElement, tableNode: Node | null, editor: Editor): {
47
+ rowIndex: number;
48
+ colIndex: number;
49
+ } | null;
50
+ /**
51
+ * Checks if a cell is merged (has colspan or rowspan > 1)
52
+ */
53
+ declare function isCellMerged(node: Node | null): boolean;
54
+ /**
55
+ * Collect cells (and unique merged cells) from the current table.
56
+ * - If `columnIndex` is provided, scans that column.
57
+ * - If omitted, uses the first (leftmost) selected column based on the current selection.
58
+ */
59
+ declare function getColumnCells(editor: Editor | null, columnIndex?: number, tablePos?: number): {
60
+ cells: CellInfo[];
61
+ mergedCells: CellInfo[];
62
+ };
63
+ /**
64
+ * Get information about the table at the current selection or a specific position.
65
+ *
66
+ * If `tablePos` is provided, it looks for a table at that exact position.
67
+ * Otherwise, it finds the nearest table containing the current selection.
68
+ *
69
+ * Returns an object with:
70
+ * - `node`: the table node
71
+ * - `pos`: the position of the table in the document
72
+ * - `start`: the position just after the table node (where its content starts)
73
+ * - `map`: the `TableMap` for layout info (rows, columns, spans)
74
+ *
75
+ * If no table is found, returns null.
76
+ */
77
+ declare function getTable(editor: Editor | null, tablePos?: number): {
78
+ map: TableMap;
79
+ node: Node;
80
+ pos: number;
81
+ start: number;
82
+ depth: number;
83
+ } | null;
84
+ /**
85
+ * Get all (row, col) coordinates for a given row or column index.
86
+ *
87
+ * - If `orientation` is "row", returns all columns in that row.
88
+ * - If `orientation` is "column", returns all rows in that column.
89
+ *
90
+ * Returns null if:
91
+ * - the editor or table is not found
92
+ * - the index is out of bounds
93
+ *
94
+ * @param editor The Tiptap editor instance
95
+ * @param index The row or column index (0-based)
96
+ * @param orientation "row" to get row coordinates, "column" for column coordinates
97
+ * @param tablePos Optional position of the table node in the document
98
+ * @returns Array of {row, col} objects or null if invalid
99
+ */
100
+ declare function getIndexCoordinates({ editor, index, orientation, tablePos, }: {
101
+ editor: Editor | null;
102
+ index: number;
103
+ orientation?: Orientation;
104
+ tablePos?: number;
105
+ }): {
106
+ row: number;
107
+ col: number;
108
+ }[] | null;
109
+ /**
110
+ * Collect cells (and unique merged cells) from a specific row.
111
+ * - If `rowIndex` is provided, scans that row.
112
+ * - If omitted, uses the first (topmost) selected row based on the current selection.
113
+ */
114
+ declare function getRowCells(editor: Editor | null, rowIndex?: number, tablePos?: number): {
115
+ cells: CellInfo[];
116
+ mergedCells: CellInfo[];
117
+ };
118
+ /**
119
+ * Given a DOM element inside a table, find the corresponding table node and its position.
120
+ *
121
+ * This function:
122
+ * - Locates the nearest ancestor table element
123
+ * - Uses the editor's document model to resolve the table's position
124
+ * - Traverses up the node hierarchy to find the corresponding table node
125
+ *
126
+ * Returns null if:
127
+ * - the table cannot be found in the editor's document
128
+ * - any error occurs during position resolution
129
+ *
130
+ * @param tableElement The HTMLTableElement or an element inside it
131
+ * @param editor The Tiptap editor instance
132
+ * @returns An object with { node: tableNode, pos: tablePos } or null if not found
133
+ */
134
+ declare function getTableFromDOM(tableElement: HTMLElement, editor: Editor): {
135
+ node: Node;
136
+ pos: number;
137
+ } | null;
138
+ /**
139
+ * Checks if a node is a table node
140
+ */
141
+ declare function isTableNode(node: Node | null | undefined): node is Node;
142
+ type TransactionSelectionOptions = {
143
+ mode: "transaction";
144
+ };
145
+ type StateSelectionOptions = {
146
+ mode?: "state";
147
+ };
148
+ type SelectionReturnMode = "state" | "transaction" | "dispatch";
149
+ type DispatchSelectionOptions = {
150
+ mode: "dispatch";
151
+ dispatch: (tr: Transaction) => void;
152
+ };
153
+ /**
154
+ * Selects table cells by their (row, col) coordinates.
155
+ *
156
+ * This function can be used in three modes:
157
+ * - `"state"` (default) → Returns a new `EditorState` with the selection applied, or null if failed.
158
+ * - `"transaction"` → Returns a `Transaction` with the selection set, or null if failed.
159
+ * - `"dispatch"` → Immediately dispatches the selection and returns boolean success status.
160
+ *
161
+ * @param editor - The editor instance
162
+ * @param tablePos - Position of the table in the document
163
+ * @param coords - Array of {row, col} coordinates to select
164
+ * @param options - Mode and dispatch options
165
+ */
166
+ declare function selectCellsByCoords(editor: Editor | null, tablePos: number, coords: {
167
+ row: number;
168
+ col: number;
169
+ }[], options?: StateSelectionOptions): EditorState;
170
+ declare function selectCellsByCoords(editor: Editor | null, tablePos: number, coords: {
171
+ row: number;
172
+ col: number;
173
+ }[], options: TransactionSelectionOptions): Transaction;
174
+ declare function selectCellsByCoords(editor: Editor | null, tablePos: number, coords: {
175
+ row: number;
176
+ col: number;
177
+ }[], options: DispatchSelectionOptions): void;
178
+ /**
179
+ * Determine if the current selection is a full row or column selection.
180
+ *
181
+ * If the selection is a `CellSelection` that spans an entire row or column,
182
+ * returns an object indicating the type and index:
183
+ * - `{ type: "row", index: number }` for full row selections
184
+ * - `{ type: "column", index: number }` for full column selections
185
+ *
186
+ * If the selection is not a full row/column, or if no table is found, returns null.
187
+ */
188
+ declare function getTableSelectionType(editor: Editor | null, index?: number, orientation?: Orientation, tablePos?: number): {
189
+ orientation: Orientation;
190
+ index: number;
191
+ } | null;
192
+ /**
193
+ * Get all cells (and unique merged cells) in the selected row or column.
194
+ *
195
+ * - If `index` is provided, uses that row/column index.
196
+ * - If omitted, uses the first selected row/column based on current selection.
197
+ *
198
+ * Returns an object with:
199
+ * - `cells`: all cells in the row/column
200
+ * - `mergedCells`: only the unique cells that have rowspan/colspan > 1
201
+ *
202
+ * If no valid selection or index is found, returns empty arrays.
203
+ */
204
+ declare function getRowOrColumnCells(editor: Editor | null, index?: number, orientation?: Orientation, tablePos?: number): {
205
+ cells: CellInfo[];
206
+ mergedCells: CellInfo[];
207
+ index?: number;
208
+ orientation?: Orientation;
209
+ tablePos?: number;
210
+ };
211
+ /**
212
+ * After moving a row or column, update the selection to the moved item.
213
+ *
214
+ * This ensures that after a move operation, the selection remains on the
215
+ * moved row or column, providing better user feedback.
216
+ *
217
+ * @param editor - The editor instance
218
+ * @param orientation - "row" or "column" indicating what was moved
219
+ * @param newIndex - The new index of the moved row/column
220
+ * @param tablePos - Optional position of the table in the document
221
+ */
222
+ declare function updateSelectionAfterAction(editor: Editor, orientation: Orientation, newIndex: number, tablePos?: number): void;
223
+ /**
224
+ * Determines whether a table cell is effectively empty.
225
+ *
226
+ * A cell is considered empty when:
227
+ * - it has no children, or
228
+ * - it contains only whitespace text, or
229
+ * - it contains no text and no non-text leaf nodes (images, embeds, etc.)
230
+ *
231
+ * Early-outs as soon as any meaningful content is found.
232
+ *
233
+ * @param cellNode - The table cell node to check
234
+ * @returns true if the cell is empty; false otherwise
235
+ */
236
+ declare function isCellEmpty(cellNode: Node): boolean;
237
+ /**
238
+ * Returns a command that sets the given attributes to the given values,
239
+ * and is only available when the currently selected cell doesn't
240
+ * already have those attributes set to those values.
241
+ *
242
+ * @public
243
+ */
244
+ declare function setCellAttr(attrs: Record<string, unknown>): Command;
245
+ declare function setCellAttr(name: string, value: unknown): Command;
246
+ /**
247
+ * Cells overlap a rectangle if any of the cells in the rectangle are merged
248
+ * with cells outside the rectangle.
249
+ */
250
+ declare function cellsOverlapRectangle({ width, height, map }: TableMap, rect: Rect): boolean;
251
+ /**
252
+ * Compares two DOMRect objects for equality.
253
+ *
254
+ * Treats `undefined` as a valid state, where two `undefined` rects are equal,
255
+ * and `undefined` is not equal to any defined rect.
256
+ *
257
+ * @param a - The first DOMRect or undefined
258
+ * @param b - The second DOMRect or undefined
259
+ * @returns true if both rects are equal or both are undefined; false otherwise
260
+ */
261
+ declare function rectEq(a?: DOMRect | null, b?: DOMRect | null): boolean;
262
+
263
+ export { type CellInfo, type DispatchSelectionOptions, type DomCellAroundResult, type Orientation, type SelectionReturnMode, type StateSelectionOptions, type TableInfo, type TransactionSelectionOptions, cellsOverlapRectangle, domCellAround, getCellIndicesFromDOM, getColumnCells, getIndexCoordinates, getRowCells, getRowOrColumnCells, getTable, getTableFromDOM, getTableSelectionType, isCellEmpty, isCellMerged, isTableNode, rectEq, selectCellsByCoords, setCellAttr, updateSelectionAfterAction };