@lexical/table 0.25.1-nightly.20250225.0 → 0.25.1-nightly.20250227.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.
- package/LexicalTable.js.flow +43 -0
- package/package.json +4 -4
package/LexicalTable.js.flow
CHANGED
@@ -114,6 +114,21 @@ declare export function $isTableNode(
|
|
114
114
|
node: ?LexicalNode,
|
115
115
|
): node is TableNode;
|
116
116
|
|
117
|
+
declare export function $isScrollableTablesActive(
|
118
|
+
editor?: LexicalEditor
|
119
|
+
): boolean;
|
120
|
+
declare export function setScrollableTablesActive(
|
121
|
+
editor: LexicalEditor,
|
122
|
+
active: boolean,
|
123
|
+
): void;
|
124
|
+
declare export function $getTableAndElementByKey(
|
125
|
+
tableNodeKey: NodeKey,
|
126
|
+
editor?: LexicalEditor,
|
127
|
+
): {
|
128
|
+
tableNode: TableNode;
|
129
|
+
tableElement: HTMLTableElementWithWithTableSelectionState;
|
130
|
+
};
|
131
|
+
|
117
132
|
/**
|
118
133
|
* LexicalTableRowNode
|
119
134
|
*/
|
@@ -139,6 +154,8 @@ declare export function $isTableRowNode(
|
|
139
154
|
* LexicalTableSelectionHelpers
|
140
155
|
*/
|
141
156
|
|
157
|
+
export const LEXICAL_ELEMENT_KEY = '__lexicalTableSelection';
|
158
|
+
|
142
159
|
export type TableDOMCell = {
|
143
160
|
elem: HTMLElement,
|
144
161
|
highlighted: boolean,
|
@@ -154,6 +171,10 @@ export type TableDOMTable = {
|
|
154
171
|
rows: number,
|
155
172
|
};
|
156
173
|
|
174
|
+
export type HTMLTableElementWithWithTableSelectionState = HTMLTableElement & Partial<{
|
175
|
+
[typeof LEXICAL_ELEMENT_KEY]: TableObserver | void;
|
176
|
+
}>;
|
177
|
+
|
157
178
|
declare export function applyTableHandlers(
|
158
179
|
tableNode: TableNode,
|
159
180
|
tableElement: HTMLElement,
|
@@ -176,6 +197,11 @@ declare export function $findTableNode(node: LexicalNode): null | TableNode;
|
|
176
197
|
|
177
198
|
declare export function $findCellNode(node: LexicalNode): null | TableCellNode;
|
178
199
|
|
200
|
+
declare export function getTableElement<T: HTMLElement | null>(
|
201
|
+
tableNode: TableNode,
|
202
|
+
dom: T,
|
203
|
+
): HTMLTableElementWithWithTableSelectionState | (T & null);
|
204
|
+
|
179
205
|
/**
|
180
206
|
* LexicalTableUtils
|
181
207
|
*/
|
@@ -263,6 +289,16 @@ declare export function $getTableCellNodeRect(tableCellNode: TableCellNode): {
|
|
263
289
|
colSpan: number;
|
264
290
|
} | null;
|
265
291
|
|
292
|
+
declare export function $computeTableMapSkipCellCheck(
|
293
|
+
tableNode: TableNode,
|
294
|
+
cellA: null | TableCellNode,
|
295
|
+
cellB: null | TableCellNode,
|
296
|
+
): [
|
297
|
+
tableMap: TableMapType,
|
298
|
+
cellAValue: TableMapValueType | null,
|
299
|
+
cellBValue: TableMapValueType | null,
|
300
|
+
];
|
301
|
+
|
266
302
|
/**
|
267
303
|
* LexicalTableObserver.js
|
268
304
|
*/
|
@@ -329,6 +365,12 @@ declare export function $isTableSelection(
|
|
329
365
|
|
330
366
|
declare export function $createTableSelection(): TableSelection;
|
331
367
|
|
368
|
+
declare export function $createTableSelectionFrom(
|
369
|
+
tableNode: TableNode,
|
370
|
+
anchorCell: TableCellNode,
|
371
|
+
focusCell: TableCellNode,
|
372
|
+
): TableSelection;
|
373
|
+
|
332
374
|
/**
|
333
375
|
* LexicalTableCommands
|
334
376
|
*/
|
@@ -357,3 +399,4 @@ declare export function registerTableCellUnmergeTransform(editor: LexicalEditor)
|
|
357
399
|
declare export function registerTablePlugin(editor: LexicalEditor): () => void;
|
358
400
|
|
359
401
|
declare export function registerTableSelectionObserver(editor: LexicalEditor, hasTabHandler?: boolean): () => void;
|
402
|
+
|
package/package.json
CHANGED
@@ -8,13 +8,13 @@
|
|
8
8
|
"table"
|
9
9
|
],
|
10
10
|
"license": "MIT",
|
11
|
-
"version": "0.25.1-nightly.
|
11
|
+
"version": "0.25.1-nightly.20250227.0",
|
12
12
|
"main": "LexicalTable.js",
|
13
13
|
"types": "index.d.ts",
|
14
14
|
"dependencies": {
|
15
|
-
"@lexical/clipboard": "0.25.1-nightly.
|
16
|
-
"@lexical/utils": "0.25.1-nightly.
|
17
|
-
"lexical": "0.25.1-nightly.
|
15
|
+
"@lexical/clipboard": "0.25.1-nightly.20250227.0",
|
16
|
+
"@lexical/utils": "0.25.1-nightly.20250227.0",
|
17
|
+
"lexical": "0.25.1-nightly.20250227.0"
|
18
18
|
},
|
19
19
|
"repository": {
|
20
20
|
"type": "git",
|