@prosekit/extensions 0.11.0 → 0.11.2
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/{drop-indicator-CCCaHFvw.js → drop-indicator-B8P652g2.js} +30 -3
- package/dist/prosekit-extensions-autocomplete.d.ts +47 -47
- package/dist/prosekit-extensions-blockquote.d.ts +11 -11
- package/dist/prosekit-extensions-bold.d.ts +16 -16
- package/dist/prosekit-extensions-code-block.d.ts +82 -82
- package/dist/prosekit-extensions-code.d.ts +16 -16
- package/dist/prosekit-extensions-commit.d.ts +20 -20
- package/dist/prosekit-extensions-doc.d.ts +4 -4
- package/dist/prosekit-extensions-drop-cursor.d.ts +20 -20
- package/dist/prosekit-extensions-drop-indicator.d.ts +77 -63
- package/dist/prosekit-extensions-drop-indicator.js +1 -1
- package/dist/prosekit-extensions-enter-rule.d.ts +57 -57
- package/dist/prosekit-extensions-file.d.ts +54 -54
- package/dist/prosekit-extensions-gap-cursor.d.ts +15 -15
- package/dist/prosekit-extensions-hard-break.d.ts +16 -16
- package/dist/prosekit-extensions-heading.d.ts +19 -19
- package/dist/prosekit-extensions-horizontal-rule.d.ts +6 -6
- package/dist/prosekit-extensions-image.d.ts +14 -14
- package/dist/prosekit-extensions-input-rule.d.ts +70 -70
- package/dist/prosekit-extensions-italic.d.ts +16 -16
- package/dist/prosekit-extensions-link.d.ts +24 -24
- package/dist/prosekit-extensions-list.d.ts +38 -38
- package/dist/prosekit-extensions-list.js +1 -1
- package/dist/prosekit-extensions-loro.d.ts +19 -19
- package/dist/prosekit-extensions-mark-rule.d.ts +17 -17
- package/dist/prosekit-extensions-mention.d.ts +10 -10
- package/dist/prosekit-extensions-mod-click-prevention.d.ts +7 -7
- package/dist/prosekit-extensions-paragraph.d.ts +23 -23
- package/dist/prosekit-extensions-placeholder.d.ts +20 -20
- package/dist/prosekit-extensions-readonly.d.ts +2 -2
- package/dist/prosekit-extensions-search.d.ts +36 -36
- package/dist/prosekit-extensions-strike.d.ts +16 -16
- package/dist/prosekit-extensions-table.d.ts +134 -134
- package/dist/prosekit-extensions-text-align.d.ts +29 -29
- package/dist/prosekit-extensions-text.d.ts +4 -4
- package/dist/prosekit-extensions-underline.d.ts +14 -14
- package/dist/prosekit-extensions-virtual-selection.d.ts +11 -11
- package/dist/prosekit-extensions-virtual-selection.js +1 -1
- package/dist/prosekit-extensions-yjs.d.ts +27 -27
- package/dist/{shiki-highlighter-chunk-NV2F_Qjl.d.ts → shiki-highlighter-chunk-D7gKY7Kr.d.ts} +1 -1
- package/dist/shiki-highlighter-chunk.d.ts +1 -1
- package/package.json +8 -8
|
@@ -3,55 +3,55 @@ import { Extension, PlainExtension } from "@prosekit/core";
|
|
|
3
3
|
//#region src/search/index.d.ts
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Options for {@link defineSearchQuery}
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
6
|
+
* Options for {@link defineSearchQuery}
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
10
|
interface SearchQueryOptions {
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
* The search string (or regular expression).
|
|
13
|
+
*/
|
|
14
14
|
search: string;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
* The replace text.
|
|
17
|
+
*/
|
|
18
18
|
replace?: string;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
* Indicates whether the search is case-sensitive
|
|
21
|
+
*
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
24
|
caseSensitive?: boolean;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
* By default, string search will replace `\n`, `\r`, and `\t` in the query
|
|
27
|
+
* with newline, return, and tab characters. When this is set to true, that
|
|
28
|
+
* behavior is disabled.
|
|
29
|
+
*
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
32
|
literal?: boolean;
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
* When true, the search string is interpreted as a regular expression.
|
|
35
|
+
*
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
38
|
regexp?: boolean;
|
|
39
39
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
* Enable whole-word matching.
|
|
41
|
+
*
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
44
|
wholeWord?: boolean;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Defines an extension that stores a current search query and replace string.
|
|
48
|
-
*
|
|
49
|
-
* @public
|
|
50
|
-
*/
|
|
47
|
+
* Defines an extension that stores a current search query and replace string.
|
|
48
|
+
*
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
51
|
declare function defineSearchQuery(options: SearchQueryOptions): PlainExtension;
|
|
52
52
|
/**
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
55
|
type SearchCommandsExtension = Extension<{
|
|
56
56
|
Commands: {
|
|
57
57
|
findNext: [];
|
|
@@ -65,10 +65,10 @@ type SearchCommandsExtension = Extension<{
|
|
|
65
65
|
};
|
|
66
66
|
}>;
|
|
67
67
|
/**
|
|
68
|
-
* Defines commands for search and replace.
|
|
69
|
-
*
|
|
70
|
-
* @public
|
|
71
|
-
*/
|
|
68
|
+
* Defines commands for search and replace.
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
72
|
declare function defineSearchCommands(): SearchCommandsExtension;
|
|
73
73
|
//#endregion
|
|
74
74
|
export { SearchCommandsExtension, SearchQueryOptions, defineSearchCommands, defineSearchQuery };
|
|
@@ -4,44 +4,44 @@ import { Attrs } from "@prosekit/pm/model";
|
|
|
4
4
|
//#region src/strike/index.d.ts
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
9
|
type StrikeSpecExtension = Extension<{
|
|
10
10
|
Marks: {
|
|
11
11
|
strike: Attrs;
|
|
12
12
|
};
|
|
13
13
|
}>;
|
|
14
14
|
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
17
|
declare function defineStrikeSpec(): StrikeSpecExtension;
|
|
18
18
|
/**
|
|
19
|
-
* @internal
|
|
20
|
-
*/
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
21
|
type StrikeCommandsExtension = Extension<{
|
|
22
22
|
Commands: {
|
|
23
23
|
toggleStrike: [];
|
|
24
24
|
};
|
|
25
25
|
}>;
|
|
26
26
|
/**
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
29
|
declare function defineStrikeCommands(): StrikeCommandsExtension;
|
|
30
30
|
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
33
|
declare function defineStrikeKeymap(): PlainExtension;
|
|
34
34
|
/**
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
37
|
declare function defineStrikeInputRule(): PlainExtension;
|
|
38
38
|
/**
|
|
39
|
-
* @internal
|
|
40
|
-
*/
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
41
|
type StrikeExtension = Union<[StrikeSpecExtension, StrikeCommandsExtension]>;
|
|
42
42
|
/**
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
45
|
declare function defineStrike(): StrikeExtension;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { StrikeCommandsExtension, StrikeExtension, StrikeSpecExtension, defineStrike, defineStrikeCommands, defineStrikeInputRule, defineStrikeKeymap, defineStrikeSpec };
|
|
@@ -5,175 +5,175 @@ import { CellSelection } from "prosemirror-tables";
|
|
|
5
5
|
|
|
6
6
|
//#region src/table/table-commands/move-table-column.d.ts
|
|
7
7
|
/**
|
|
8
|
-
* Options for {@link moveTableColumn}
|
|
9
|
-
*
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
8
|
+
* Options for {@link moveTableColumn}
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
12
|
interface MoveTableColumnOptions {
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* The source column index to move from.
|
|
15
|
+
*/
|
|
16
16
|
from: number;
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
* The destination column index to move to.
|
|
19
|
+
*/
|
|
20
20
|
to: number;
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
* Whether to select the moved column after the operation.
|
|
23
|
+
*
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
26
|
select?: boolean;
|
|
27
27
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
* Optional position to resolve table from. If not provided, uses the current selection.
|
|
29
|
+
*/
|
|
30
30
|
pos?: number;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Move a table column from index `origin` to index `target`.
|
|
34
|
-
*
|
|
35
|
-
* @public
|
|
36
|
-
*/
|
|
33
|
+
* Move a table column from index `origin` to index `target`.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
37
|
declare function moveTableColumn(options: MoveTableColumnOptions): Command;
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/table/table-commands/move-table-row.d.ts
|
|
40
40
|
/**
|
|
41
|
-
* Options for {@link moveTableRow}
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
41
|
+
* Options for {@link moveTableRow}
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
45
|
interface MoveTableRowOptions {
|
|
46
46
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
* The source row index to move from.
|
|
48
|
+
*/
|
|
49
49
|
from: number;
|
|
50
50
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
* The destination row index to move to.
|
|
52
|
+
*/
|
|
53
53
|
to: number;
|
|
54
54
|
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
* Whether to select the moved row after the operation.
|
|
56
|
+
*
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
59
|
select?: boolean;
|
|
60
60
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
* Optional position to resolve table from. If not provided, uses the current selection.
|
|
62
|
+
*/
|
|
63
63
|
pos?: number;
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
-
* Move a table row from index `origin` to index `target`.
|
|
67
|
-
*
|
|
68
|
-
* @public
|
|
69
|
-
*/
|
|
66
|
+
* Move a table row from index `origin` to index `target`.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
70
|
declare function moveTableRow(options: MoveTableRowOptions): Command;
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/table/table-commands.d.ts
|
|
73
73
|
/**
|
|
74
|
-
* @public
|
|
75
|
-
*/
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
76
|
interface InsertTableOptions {
|
|
77
77
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
* The number of rows in the table.
|
|
79
|
+
*/
|
|
80
80
|
row: number;
|
|
81
81
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
* The number of columns in the table.
|
|
83
|
+
*/
|
|
84
84
|
col: number;
|
|
85
85
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
* Whether the table has a header row.
|
|
87
|
+
*
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
90
|
header?: boolean;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* Insert a table node with the given number of rows and columns, and optionally
|
|
94
|
-
* a header row.
|
|
95
|
-
*
|
|
96
|
-
* @param options
|
|
97
|
-
*
|
|
98
|
-
* @public
|
|
99
|
-
*/
|
|
93
|
+
* Insert a table node with the given number of rows and columns, and optionally
|
|
94
|
+
* a header row.
|
|
95
|
+
*
|
|
96
|
+
* @param options
|
|
97
|
+
*
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
100
|
declare function insertTable(options: InsertTableOptions): Command;
|
|
101
101
|
/**
|
|
102
|
-
* When the selection is in a table node, create a default block after the table
|
|
103
|
-
* table, and move the cursor there.
|
|
104
|
-
*
|
|
105
|
-
* @public
|
|
106
|
-
*/
|
|
102
|
+
* When the selection is in a table node, create a default block after the table
|
|
103
|
+
* table, and move the cursor there.
|
|
104
|
+
*
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
107
|
declare const exitTable: Command;
|
|
108
108
|
/**
|
|
109
|
-
* @public
|
|
110
|
-
*/
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
111
|
interface SelectTableColumnOptions {
|
|
112
112
|
/**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
* A hit position of the table cell to select from. By default, the selection
|
|
114
|
+
* anchor will be used.
|
|
115
|
+
*/
|
|
116
116
|
anchor?: number;
|
|
117
117
|
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
* A hit position of the table cell to select to. By default, the selection
|
|
119
|
+
* head will be used.
|
|
120
|
+
*/
|
|
121
121
|
head?: number;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
|
-
* @public
|
|
125
|
-
*/
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
126
|
declare function selectTableColumn(options?: SelectTableColumnOptions): Command;
|
|
127
127
|
/**
|
|
128
|
-
* @public
|
|
129
|
-
*/
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
130
|
interface SelectTableRowOptions {
|
|
131
131
|
/**
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
* A hit position of the table cell to select from. By default, the selection
|
|
133
|
+
* anchor will be used.
|
|
134
|
+
*/
|
|
135
135
|
anchor?: number;
|
|
136
136
|
/**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
* A hit position of the table cell to select to. By default, the selection
|
|
138
|
+
* head will be used.
|
|
139
|
+
*/
|
|
140
140
|
head?: number;
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
|
-
* @public
|
|
144
|
-
*/
|
|
143
|
+
* @public
|
|
144
|
+
*/
|
|
145
145
|
declare function selectTableRow(options?: SelectTableRowOptions): Command;
|
|
146
146
|
/**
|
|
147
|
-
* @public
|
|
148
|
-
*/
|
|
147
|
+
* @public
|
|
148
|
+
*/
|
|
149
149
|
interface SelectTableCellOptions {
|
|
150
150
|
/**
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
* A hit position of the table cell to select from. By default, the selection
|
|
152
|
+
* anchor will be used.
|
|
153
|
+
*/
|
|
154
154
|
pos?: number;
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
|
-
* @public
|
|
158
|
-
*/
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
159
159
|
declare function selectTableCell(options?: SelectTableCellOptions): Command;
|
|
160
160
|
/**
|
|
161
|
-
* @public
|
|
162
|
-
*/
|
|
161
|
+
* @public
|
|
162
|
+
*/
|
|
163
163
|
interface SelectTableOptions {
|
|
164
164
|
/**
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
* A hit position of the table to select from. By default, the selection
|
|
166
|
+
* anchor will be used.
|
|
167
|
+
*/
|
|
168
168
|
pos?: number;
|
|
169
169
|
}
|
|
170
170
|
/**
|
|
171
|
-
* @public
|
|
172
|
-
*/
|
|
171
|
+
* @public
|
|
172
|
+
*/
|
|
173
173
|
declare function selectTable(options?: SelectTableOptions): Command;
|
|
174
174
|
/**
|
|
175
|
-
* @internal
|
|
176
|
-
*/
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
177
|
type TableCommandsExtension = Extension<{
|
|
178
178
|
Commands: {
|
|
179
179
|
insertTable: [options: InsertTableOptions];
|
|
@@ -197,60 +197,60 @@ type TableCommandsExtension = Extension<{
|
|
|
197
197
|
};
|
|
198
198
|
}>;
|
|
199
199
|
/**
|
|
200
|
-
* Adds commands for working with `table` nodes.
|
|
201
|
-
*
|
|
202
|
-
* @public
|
|
203
|
-
*/
|
|
200
|
+
* Adds commands for working with `table` nodes.
|
|
201
|
+
*
|
|
202
|
+
* @public
|
|
203
|
+
*/
|
|
204
204
|
declare function defineTableCommands(): TableCommandsExtension;
|
|
205
205
|
//#endregion
|
|
206
206
|
//#region src/table/table-spec.d.ts
|
|
207
207
|
/**
|
|
208
|
-
* @public
|
|
209
|
-
*/
|
|
208
|
+
* @public
|
|
209
|
+
*/
|
|
210
210
|
interface CellAttrs {
|
|
211
211
|
colspan?: number;
|
|
212
212
|
rowspan?: number;
|
|
213
213
|
colwidth?: number[] | null;
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
|
-
* @internal
|
|
217
|
-
*/
|
|
216
|
+
* @internal
|
|
217
|
+
*/
|
|
218
218
|
type TableSpecExtension = Extension<{
|
|
219
219
|
Nodes: {
|
|
220
220
|
table: Attrs;
|
|
221
221
|
};
|
|
222
222
|
}>;
|
|
223
223
|
/**
|
|
224
|
-
* @internal
|
|
225
|
-
*/
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
226
226
|
declare function defineTableSpec(): TableSpecExtension;
|
|
227
227
|
/**
|
|
228
|
-
* @internal
|
|
229
|
-
*/
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
230
|
type TableRowSpecExtension = Extension<{
|
|
231
231
|
Nodes: {
|
|
232
232
|
tableRow: Attrs;
|
|
233
233
|
};
|
|
234
234
|
}>;
|
|
235
235
|
/**
|
|
236
|
-
* @internal
|
|
237
|
-
*/
|
|
236
|
+
* @internal
|
|
237
|
+
*/
|
|
238
238
|
declare function defineTableRowSpec(): TableRowSpecExtension;
|
|
239
239
|
/**
|
|
240
|
-
* @internal
|
|
241
|
-
*/
|
|
240
|
+
* @internal
|
|
241
|
+
*/
|
|
242
242
|
type TableCellSpecExtension = Extension<{
|
|
243
243
|
Nodes: {
|
|
244
244
|
tableCell: CellAttrs;
|
|
245
245
|
};
|
|
246
246
|
}>;
|
|
247
247
|
/**
|
|
248
|
-
* @internal
|
|
249
|
-
*/
|
|
248
|
+
* @internal
|
|
249
|
+
*/
|
|
250
250
|
declare function defineTableCellSpec(): TableCellSpecExtension;
|
|
251
251
|
/**
|
|
252
|
-
* @internal
|
|
253
|
-
*/
|
|
252
|
+
* @internal
|
|
253
|
+
*/
|
|
254
254
|
type TableHeaderCellSpecExtension = Extension<{
|
|
255
255
|
Nodes: {
|
|
256
256
|
tableHeaderCell: CellAttrs;
|
|
@@ -260,40 +260,40 @@ declare function defineTableHeaderCellSpec(): TableHeaderCellSpecExtension;
|
|
|
260
260
|
//#endregion
|
|
261
261
|
//#region src/table/table.d.ts
|
|
262
262
|
/**
|
|
263
|
-
* @internal
|
|
264
|
-
*/
|
|
263
|
+
* @internal
|
|
264
|
+
*/
|
|
265
265
|
type TableExtension = Union<[TableSpecExtension, TableRowSpecExtension, TableCellSpecExtension, TableHeaderCellSpecExtension, TableCommandsExtension]>;
|
|
266
266
|
/**
|
|
267
|
-
* @public
|
|
268
|
-
*/
|
|
267
|
+
* @public
|
|
268
|
+
*/
|
|
269
269
|
declare function defineTable(): TableExtension;
|
|
270
270
|
//#endregion
|
|
271
271
|
//#region src/table/table-plugins.d.ts
|
|
272
272
|
/**
|
|
273
|
-
* @public
|
|
274
|
-
*/
|
|
273
|
+
* @public
|
|
274
|
+
*/
|
|
275
275
|
declare function defineTablePlugins(): PlainExtension;
|
|
276
276
|
//#endregion
|
|
277
277
|
//#region src/table/table-utils/query.d.ts
|
|
278
278
|
/**
|
|
279
|
-
* Checks if the given object is a `CellSelection` instance.
|
|
280
|
-
*
|
|
281
|
-
* @public
|
|
282
|
-
*/
|
|
279
|
+
* Checks if the given object is a `CellSelection` instance.
|
|
280
|
+
*
|
|
281
|
+
* @public
|
|
282
|
+
*/
|
|
283
283
|
declare function isCellSelection(value: unknown): value is CellSelection;
|
|
284
284
|
/**
|
|
285
|
-
* Find the closest table node.
|
|
286
|
-
*
|
|
287
|
-
* @internal
|
|
288
|
-
*/
|
|
285
|
+
* Find the closest table node.
|
|
286
|
+
*
|
|
287
|
+
* @internal
|
|
288
|
+
*/
|
|
289
289
|
declare function findTable($pos: ResolvedPos): FindParentNodeResult | undefined;
|
|
290
290
|
/**
|
|
291
|
-
* Try to find the anchor and head cell in the same table by using the given
|
|
292
|
-
* anchor and head as hit points, or fallback to the selection's anchor and
|
|
293
|
-
* head.
|
|
294
|
-
*
|
|
295
|
-
* @internal
|
|
296
|
-
*/
|
|
291
|
+
* Try to find the anchor and head cell in the same table by using the given
|
|
292
|
+
* anchor and head as hit points, or fallback to the selection's anchor and
|
|
293
|
+
* head.
|
|
294
|
+
*
|
|
295
|
+
* @internal
|
|
296
|
+
*/
|
|
297
297
|
|
|
298
298
|
//#endregion
|
|
299
299
|
export { type InsertTableOptions, type MoveTableColumnOptions, type MoveTableRowOptions, type SelectTableCellOptions, type SelectTableColumnOptions, type SelectTableOptions, type SelectTableRowOptions, type TableCellSpecExtension, type TableCommandsExtension, type TableExtension, type TableHeaderCellSpecExtension, type TableRowSpecExtension, type TableSpecExtension, defineTable, defineTableCellSpec, defineTableCommands, defineTableHeaderCellSpec, defineTablePlugins, defineTableRowSpec, defineTableSpec, exitTable, findTable, insertTable, isCellSelection, moveTableColumn, moveTableRow, selectTable, selectTableCell, selectTableColumn, selectTableRow };
|
|
@@ -4,35 +4,35 @@ import { Command } from "@prosekit/pm/state";
|
|
|
4
4
|
//#region src/text-align/index.d.ts
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
9
|
interface TextAlignOptions<NodeName extends string = string> {
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
* The names of node to add the attribute to.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* ["paragraph", "heading"]
|
|
16
|
+
*/
|
|
17
17
|
types: NodeName[];
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
* The default value for the attribute.
|
|
20
|
+
*
|
|
21
|
+
* @default "left"
|
|
22
|
+
*/
|
|
23
23
|
default?: string;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
28
|
type TextAlignAttrsExtension<NodeName extends string> = Extension<{
|
|
29
29
|
Nodes: { [K in NodeName]: {
|
|
30
30
|
textAlign: string | null;
|
|
31
31
|
} };
|
|
32
32
|
}>;
|
|
33
33
|
/**
|
|
34
|
-
* @internal
|
|
35
|
-
*/
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
36
|
declare function setTextAlign({
|
|
37
37
|
types,
|
|
38
38
|
value
|
|
@@ -41,31 +41,31 @@ declare function setTextAlign({
|
|
|
41
41
|
value: string | null;
|
|
42
42
|
}): Command;
|
|
43
43
|
/**
|
|
44
|
-
* @internal
|
|
45
|
-
*/
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
46
|
type TextAlignCommandsExtension = Extension<{
|
|
47
47
|
Commands: {
|
|
48
48
|
setTextAlign: [value: string | null];
|
|
49
49
|
};
|
|
50
50
|
}>;
|
|
51
51
|
/**
|
|
52
|
-
* @internal
|
|
53
|
-
*/
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
54
|
declare function defineTextAlignCommands(types: string[]): TextAlignCommandsExtension;
|
|
55
55
|
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
58
|
declare function defineTextAlignKeymap(types: string[]): PlainExtension;
|
|
59
59
|
/**
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
62
|
type TextAlignExtension<NodeName extends string> = Union<[TextAlignAttrsExtension<NodeName>, TextAlignCommandsExtension]>;
|
|
63
63
|
/**
|
|
64
|
-
* Adds a `textAlign` attribute to the specified nodes. This will be rendered as
|
|
65
|
-
* a CSS `text-align` style.
|
|
66
|
-
*
|
|
67
|
-
* @public
|
|
68
|
-
*/
|
|
64
|
+
* Adds a `textAlign` attribute to the specified nodes. This will be rendered as
|
|
65
|
+
* a CSS `text-align` style.
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
69
|
declare function defineTextAlign<NodeName extends string = string>(options: TextAlignOptions<NodeName>): TextAlignExtension<NodeName>;
|
|
70
70
|
//#endregion
|
|
71
71
|
export { TextAlignAttrsExtension, TextAlignCommandsExtension, TextAlignExtension, TextAlignOptions, defineTextAlign, defineTextAlignCommands, defineTextAlignKeymap, setTextAlign };
|
|
@@ -4,16 +4,16 @@ import { Attrs } from "@prosekit/pm/model";
|
|
|
4
4
|
//#region src/text/index.d.ts
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
9
|
type TextExtension = Extension<{
|
|
10
10
|
Nodes: {
|
|
11
11
|
text: Attrs;
|
|
12
12
|
};
|
|
13
13
|
}>;
|
|
14
14
|
/**
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
17
|
declare function defineText(): TextExtension;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { TextExtension, defineText };
|