@prismicio/editor-fields 0.4.65 → 0.4.67-alpha.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/dist/EditorConfig.d.ts +3 -0
- package/dist/core/service/customType.d.ts +9 -9
- package/dist/core/service/document.d.ts +82 -38
- package/dist/core/service/documentSearch.d.ts +5 -5
- package/dist/fields/LinkField/Documents/documentsData.d.ts +2 -2
- package/dist/fields/RichTextField/extensions/Table/Table.d.ts +6 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/types.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/utils.d.ts +0 -1
- package/dist/fields/RichTextField/extensions/Table/TableEvent.d.ts +31 -0
- package/dist/fields/RichTextField/extensions/Table/TableLimitToast.d.ts +7 -0
- package/dist/fields/RichTextField/extensions/Table/menus/utils.d.ts +5 -0
- package/dist/fields/RichTextField/extensions/Table/utils.d.ts +48 -2
- package/dist/index.cjs.js +42 -42
- package/dist/index.es.js +26838 -28827
- package/dist/slices/utils.d.ts +6 -2
- package/package.json +8 -5
|
@@ -3,6 +3,11 @@ import type { Editor } from "@tiptap/core";
|
|
|
3
3
|
* Row utilities
|
|
4
4
|
*/
|
|
5
5
|
export declare const isFirstRow: (editor: Editor) => boolean;
|
|
6
|
+
export declare function isFirstOrLastRow(editor: Editor): {
|
|
7
|
+
isFirstRow: boolean;
|
|
8
|
+
isLastRow: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function isSecondRow(editor: Editor): boolean;
|
|
6
11
|
export declare const isHeaderRowToggled: (editor: Editor) => boolean;
|
|
7
12
|
export declare const isSingleRow: (editor: Editor) => boolean;
|
|
8
13
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Editor } from "@tiptap/core";
|
|
2
|
-
import type
|
|
3
|
-
import type { Selection } from "@tiptap/pm/state";
|
|
2
|
+
import { type Schema } from "@tiptap/pm/model";
|
|
3
|
+
import type { EditorState, Selection, Transaction } from "@tiptap/pm/state";
|
|
4
4
|
export declare function getNodeFromSchema(schema: Schema, name: string): import("prosemirror-model").NodeType;
|
|
5
5
|
export declare function findTable(selection: Selection): {
|
|
6
6
|
pos: number;
|
|
@@ -8,7 +8,53 @@ export declare function findTable(selection: Selection): {
|
|
|
8
8
|
depth: number;
|
|
9
9
|
node: import("prosemirror-model").Node;
|
|
10
10
|
} | undefined;
|
|
11
|
+
export declare function findRow(selection: Selection): {
|
|
12
|
+
pos: number;
|
|
13
|
+
start: number;
|
|
14
|
+
depth: number;
|
|
15
|
+
node: import("prosemirror-model").Node;
|
|
16
|
+
} | undefined;
|
|
17
|
+
export declare function findTableAndRow(selection: Selection): {
|
|
18
|
+
table: null;
|
|
19
|
+
row: null;
|
|
20
|
+
} | {
|
|
21
|
+
table: null;
|
|
22
|
+
row: {
|
|
23
|
+
pos: number;
|
|
24
|
+
start: number;
|
|
25
|
+
depth: number;
|
|
26
|
+
node: import("prosemirror-model").Node;
|
|
27
|
+
};
|
|
28
|
+
} | {
|
|
29
|
+
table: {
|
|
30
|
+
pos: number;
|
|
31
|
+
start: number;
|
|
32
|
+
depth: number;
|
|
33
|
+
node: import("prosemirror-model").Node;
|
|
34
|
+
};
|
|
35
|
+
row: {
|
|
36
|
+
pos: number;
|
|
37
|
+
start: number;
|
|
38
|
+
depth: number;
|
|
39
|
+
node: import("prosemirror-model").Node;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
11
42
|
export declare function getTableColumnCount(editor: Editor): number;
|
|
12
43
|
export declare function getTableRowCount(editor: Editor): number;
|
|
13
44
|
export declare function isTableColumnLimitReached(editor: Editor): boolean;
|
|
14
45
|
export declare function isTableRowLimitReached(editor: Editor): boolean;
|
|
46
|
+
export declare function select(type: "row" | "column", args: {
|
|
47
|
+
index: number;
|
|
48
|
+
tr: Transaction;
|
|
49
|
+
}): Transaction;
|
|
50
|
+
export declare function selectRow(args: {
|
|
51
|
+
index: number;
|
|
52
|
+
tr: Transaction;
|
|
53
|
+
}): Transaction;
|
|
54
|
+
export declare function moveRow(args: {
|
|
55
|
+
direction: "up" | "down";
|
|
56
|
+
state: EditorState;
|
|
57
|
+
}): {
|
|
58
|
+
tr: Transaction;
|
|
59
|
+
index: number;
|
|
60
|
+
} | undefined;
|