@prosekit/extensions 0.7.5 → 0.7.7
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/_tsup-dts-rollup.d.ts +639 -648
- package/dist/{chunk-OJCMRVEY.js → chunk-5H7DHO2K.js} +6 -13
- package/dist/{chunk-LVMTQOWG.js → chunk-J57QWYYX.js} +12 -13
- package/dist/gap-cursor/style.css +23 -0
- package/dist/prosekit-extensions-blockquote.d.ts +2 -0
- package/dist/prosekit-extensions-blockquote.js +5 -2
- package/dist/prosekit-extensions-bold.d.ts +3 -0
- package/dist/prosekit-extensions-bold.js +1 -1
- package/dist/prosekit-extensions-code-block.d.ts +3 -0
- package/dist/prosekit-extensions-code-block.js +2 -2
- package/dist/prosekit-extensions-code.d.ts +3 -0
- package/dist/prosekit-extensions-code.js +1 -1
- package/dist/prosekit-extensions-drop-cursor.d.ts +1 -0
- package/dist/prosekit-extensions-enter-rule.js +1 -1
- package/dist/prosekit-extensions-gap-cursor.d.ts +3 -0
- package/dist/prosekit-extensions-gap-cursor.js +11 -0
- package/dist/prosekit-extensions-heading.d.ts +3 -0
- package/dist/prosekit-extensions-heading.js +1 -1
- package/dist/prosekit-extensions-image.d.ts +3 -0
- package/dist/prosekit-extensions-input-rule.js +1 -1
- package/dist/prosekit-extensions-italic.d.ts +3 -0
- package/dist/prosekit-extensions-italic.js +1 -1
- package/dist/prosekit-extensions-link.d.ts +3 -0
- package/dist/prosekit-extensions-link.js +2 -2
- package/dist/prosekit-extensions-list.d.ts +3 -0
- package/dist/prosekit-extensions-list.js +2 -2
- package/dist/prosekit-extensions-mod-click-prevention.d.ts +1 -0
- package/dist/prosekit-extensions-strike.d.ts +3 -0
- package/dist/prosekit-extensions-strike.js +1 -1
- package/dist/prosekit-extensions-table.d.ts +6 -0
- package/dist/prosekit-extensions-table.js +6 -10
- package/dist/prosekit-extensions-text-align.d.ts +3 -1
- package/dist/prosekit-extensions-underline.d.ts +3 -0
- package/dist/prosekit-extensions-underline.js +2 -2
- package/dist/prosekit-extensions-virtual-selection.d.ts +1 -0
- package/package.json +20 -8
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import { Attrs } from 'prosemirror-model';
|
3
|
-
import {
|
1
|
+
import { Attrs } from '@prosekit/pm/model';
|
2
|
+
import { Attrs as Attrs_2 } from 'prosemirror-model';
|
3
|
+
import { BaseCommandsExtension } from '@prosekit/core';
|
4
4
|
import { BundledLanguage } from 'shiki';
|
5
5
|
import { BundledLanguageInfo } from 'shiki';
|
6
6
|
import { bundledLanguagesInfo } from 'shiki';
|
@@ -10,18 +10,20 @@ import { bundledThemesInfo } from 'shiki';
|
|
10
10
|
import { Command } from '@prosekit/pm/state';
|
11
11
|
import { DedentListOptions } from 'prosemirror-flat-list';
|
12
12
|
import { config as default_alias_1 } from '@prosekit/dev/config-vitest';
|
13
|
+
import { DocExtension } from '@prosekit/core';
|
13
14
|
import { EditorState } from '@prosekit/pm/state';
|
14
15
|
import { Extension } from '@prosekit/core';
|
15
16
|
import { ExtensionTyping } from '@prosekit/core';
|
16
17
|
import { ExtractMarkActions } from '@prosekit/core';
|
17
18
|
import { ExtractNodeActions } from '@prosekit/core';
|
19
|
+
import { GapCursor } from 'prosemirror-gapcursor';
|
18
20
|
import { getSingletonHighlighter } from 'shiki/bundle/full';
|
19
21
|
import type { Highlighter } from 'shiki';
|
22
|
+
import { HistoryExtension } from '@prosekit/core';
|
20
23
|
import { IndentListOptions } from 'prosemirror-flat-list';
|
21
24
|
import { InputRule } from '@prosekit/pm/inputrules';
|
22
|
-
import { InsertNodeOptions } from '@prosekit/core';
|
23
25
|
import type { IsEqual } from 'type-fest';
|
24
|
-
import { ListAttributes } from 'prosemirror-flat-list';
|
26
|
+
import type { ListAttributes } from 'prosemirror-flat-list';
|
25
27
|
import { ListDOMSerializer } from 'prosemirror-flat-list';
|
26
28
|
import { MarkType } from '@prosekit/pm/model';
|
27
29
|
import { Node as Node_2 } from 'prosemirror-model';
|
@@ -31,25 +33,21 @@ import { NodeJSON } from '@prosekit/core';
|
|
31
33
|
import { NodeType } from '@prosekit/pm/model';
|
32
34
|
import { Options } from 'tsup';
|
33
35
|
import { Parser } from 'prosemirror-highlight';
|
36
|
+
import { PlainExtension } from '@prosekit/core';
|
34
37
|
import { Plugin as Plugin_2 } from '@prosekit/pm/state';
|
35
38
|
import { PluginKey } from '@prosekit/pm/state';
|
36
39
|
import { ProseMirrorNode } from '@prosekit/pm/model';
|
37
|
-
import { RemoveMarkOptions } from '@prosekit/core';
|
38
|
-
import { RemoveNodeOptions } from '@prosekit/core';
|
39
|
-
import { SetBlockTypeOptions } from '@prosekit/core';
|
40
|
-
import { SetNodeAttrsOptions } from '@prosekit/core';
|
41
40
|
import { SimplifyDeeper } from '@prosekit/core';
|
42
41
|
import type { SpecialLanguage } from 'shiki';
|
43
42
|
import { StepJSON } from '@prosekit/core';
|
44
43
|
import { TestEditor } from '@prosekit/core/test';
|
44
|
+
import { TextExtension } from '@prosekit/core';
|
45
45
|
import { ToggleCollapsedOptions } from 'prosemirror-flat-list';
|
46
46
|
import { ToMarkAction } from '@prosekit/core';
|
47
47
|
import { Transaction } from '@prosekit/pm/state';
|
48
|
-
import {
|
49
|
-
import { UnsetMarkOptions } from '@prosekit/core';
|
48
|
+
import { Union } from '@prosekit/core';
|
50
49
|
import { UnwrapListOptions } from 'prosemirror-flat-list';
|
51
50
|
import { WrapInListGetAttrs } from 'prosemirror-flat-list';
|
52
|
-
import { WrapOptions } from '@prosekit/core';
|
53
51
|
|
54
52
|
export declare function applyMarkRules(rules: MarkRuleOptions[], transactions: readonly Transaction[], oldState: EditorState, newState: EditorState): Transaction | null;
|
55
53
|
|
@@ -77,6 +75,43 @@ declare class AutocompleteRule {
|
|
77
75
|
export { AutocompleteRule }
|
78
76
|
export { AutocompleteRule as AutocompleteRule_alias_1 }
|
79
77
|
|
78
|
+
/**
|
79
|
+
* @internal
|
80
|
+
*/
|
81
|
+
export declare type BlockquoteExtension = Union<[BlockquoteSpecExtension]>;
|
82
|
+
|
83
|
+
/**
|
84
|
+
* @internal
|
85
|
+
*/
|
86
|
+
export declare type BlockquoteSpecExtension = Extension<{
|
87
|
+
Nodes: {
|
88
|
+
blockquote: Attrs;
|
89
|
+
};
|
90
|
+
}>;
|
91
|
+
|
92
|
+
/**
|
93
|
+
* @internal
|
94
|
+
*/
|
95
|
+
export declare type BoldCommandsExtension = Extension<{
|
96
|
+
Commands: {
|
97
|
+
toggleBold: [];
|
98
|
+
};
|
99
|
+
}>;
|
100
|
+
|
101
|
+
/**
|
102
|
+
* @internal
|
103
|
+
*/
|
104
|
+
export declare type BoldExtension = Union<[BoldSpecExtension, BoldCommandsExtension]>;
|
105
|
+
|
106
|
+
/**
|
107
|
+
* @internal
|
108
|
+
*/
|
109
|
+
export declare type BoldSpecExtension = Extension<{
|
110
|
+
Marks: {
|
111
|
+
bold: Attrs;
|
112
|
+
};
|
113
|
+
}>;
|
114
|
+
|
80
115
|
export { BundledLanguage as ShikiBundledLanguage }
|
81
116
|
export { BundledLanguage as ShikiBundledLanguage_alias_1 }
|
82
117
|
|
@@ -95,6 +130,9 @@ export { BundledThemeInfo as ShikiBundledThemeInfo_alias_1 }
|
|
95
130
|
export { bundledThemesInfo as shikiBundledThemesInfo }
|
96
131
|
export { bundledThemesInfo as shikiBundledThemesInfo_alias_1 }
|
97
132
|
|
133
|
+
/**
|
134
|
+
* @public
|
135
|
+
*/
|
98
136
|
export declare interface CellAttrs {
|
99
137
|
colspan: number;
|
100
138
|
rowspan: number;
|
@@ -107,11 +145,35 @@ export declare interface CellAttrs {
|
|
107
145
|
* @public
|
108
146
|
*/
|
109
147
|
declare interface CodeBlockAttrs {
|
110
|
-
language
|
148
|
+
language: string;
|
111
149
|
}
|
112
150
|
export { CodeBlockAttrs }
|
113
151
|
export { CodeBlockAttrs as CodeBlockAttrs_alias_1 }
|
114
152
|
|
153
|
+
/**
|
154
|
+
* @internal
|
155
|
+
*/
|
156
|
+
declare type CodeBlockCommandsExtension = Extension<{
|
157
|
+
Commands: {
|
158
|
+
setCodeBlock: [attrs?: CodeBlockAttrs];
|
159
|
+
insertCodeBlock: [attrs?: CodeBlockAttrs];
|
160
|
+
toggleCodeBlock: [attrs?: CodeBlockAttrs];
|
161
|
+
setCodeBlockAttrs: [attrs: CodeBlockAttrs];
|
162
|
+
};
|
163
|
+
}>;
|
164
|
+
export { CodeBlockCommandsExtension }
|
165
|
+
export { CodeBlockCommandsExtension as CodeBlockCommandsExtension_alias_1 }
|
166
|
+
|
167
|
+
/**
|
168
|
+
* @internal
|
169
|
+
*/
|
170
|
+
declare type CodeBlockExtension = Union<[
|
171
|
+
CodeBlockSpecExtension,
|
172
|
+
CodeBlockCommandsExtension
|
173
|
+
]>;
|
174
|
+
export { CodeBlockExtension }
|
175
|
+
export { CodeBlockExtension as CodeBlockExtension_alias_1 }
|
176
|
+
|
115
177
|
/**
|
116
178
|
* @public
|
117
179
|
*/
|
@@ -137,6 +199,40 @@ export declare interface CodeBlockShikiOptions {
|
|
137
199
|
langAlias?: Record<string, BundledLanguage>;
|
138
200
|
}
|
139
201
|
|
202
|
+
/**
|
203
|
+
* @internal
|
204
|
+
*/
|
205
|
+
declare type CodeBlockSpecExtension = Extension<{
|
206
|
+
Nodes: {
|
207
|
+
codeBlock: CodeBlockAttrs;
|
208
|
+
};
|
209
|
+
}>;
|
210
|
+
export { CodeBlockSpecExtension }
|
211
|
+
export { CodeBlockSpecExtension as CodeBlockSpecExtension_alias_1 }
|
212
|
+
|
213
|
+
/**
|
214
|
+
* @internal
|
215
|
+
*/
|
216
|
+
export declare type CodeCommandsExtension = Extension<{
|
217
|
+
Commands: {
|
218
|
+
toggleCode: [];
|
219
|
+
};
|
220
|
+
}>;
|
221
|
+
|
222
|
+
/**
|
223
|
+
* @internal
|
224
|
+
*/
|
225
|
+
export declare type CodeExtension = Union<[CodeSpecExtension, CodeCommandsExtension]>;
|
226
|
+
|
227
|
+
/**
|
228
|
+
* @internal
|
229
|
+
*/
|
230
|
+
export declare type CodeSpecExtension = Extension<{
|
231
|
+
Marks: {
|
232
|
+
code: Attrs;
|
233
|
+
};
|
234
|
+
}>;
|
235
|
+
|
140
236
|
/**
|
141
237
|
* A JSON representation of a commit.
|
142
238
|
*/
|
@@ -204,73 +300,45 @@ export declare function defineAutocomplete(rule: AutocompleteRule): Extension;
|
|
204
300
|
/**
|
205
301
|
* @public
|
206
302
|
*/
|
207
|
-
export declare function defineBlockquote():
|
208
|
-
Nodes: SimplifyDeeper< {
|
209
|
-
blockquote: Attrs;
|
210
|
-
}>;
|
211
|
-
Marks: never;
|
212
|
-
Commands: never;
|
213
|
-
}>;
|
303
|
+
export declare function defineBlockquote(): BlockquoteExtension;
|
214
304
|
|
215
305
|
/**
|
216
306
|
* Wraps the text block in a blockquote when `>` is typed at the start of a new
|
217
307
|
* line followed by a space.
|
218
308
|
*/
|
219
|
-
export declare function defineBlockquoteInputRule():
|
309
|
+
export declare function defineBlockquoteInputRule(): PlainExtension;
|
220
310
|
|
221
|
-
export declare function defineBlockquoteSpec():
|
222
|
-
Nodes: {
|
223
|
-
blockquote: Attrs;
|
224
|
-
};
|
225
|
-
Marks: never;
|
226
|
-
Commands: never;
|
227
|
-
}>;
|
311
|
+
export declare function defineBlockquoteSpec(): BlockquoteSpecExtension;
|
228
312
|
|
229
313
|
/**
|
230
314
|
* @public
|
231
315
|
*/
|
232
|
-
export declare function defineBold():
|
233
|
-
Nodes: never;
|
234
|
-
Marks: SimplifyDeeper< {
|
235
|
-
bold: Attrs;
|
236
|
-
}>;
|
237
|
-
Commands: {
|
238
|
-
toggleBold: [];
|
239
|
-
};
|
240
|
-
}>;
|
316
|
+
export declare function defineBold(): BoldExtension;
|
241
317
|
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
Nodes: never;
|
247
|
-
Marks: never;
|
248
|
-
}>;
|
318
|
+
/**
|
319
|
+
* @internal
|
320
|
+
*/
|
321
|
+
export declare function defineBoldCommands(): BoldCommandsExtension;
|
249
322
|
|
250
|
-
|
323
|
+
/**
|
324
|
+
* @internal
|
325
|
+
*/
|
326
|
+
export declare function defineBoldInputRule(): PlainExtension;
|
251
327
|
|
252
|
-
|
328
|
+
/**
|
329
|
+
* @internal
|
330
|
+
*/
|
331
|
+
export declare function defineBoldKeymap(): PlainExtension;
|
253
332
|
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
Nodes: never;
|
259
|
-
Commands: never;
|
260
|
-
}>;
|
333
|
+
/**
|
334
|
+
* @internal
|
335
|
+
*/
|
336
|
+
export declare function defineBoldSpec(): BoldSpecExtension;
|
261
337
|
|
262
338
|
/**
|
263
339
|
* @public
|
264
340
|
*/
|
265
|
-
export declare function defineCode():
|
266
|
-
Nodes: never;
|
267
|
-
Marks: SimplifyDeeper< {
|
268
|
-
code: Attrs;
|
269
|
-
}>;
|
270
|
-
Commands: {
|
271
|
-
toggleCode: [];
|
272
|
-
};
|
273
|
-
}>;
|
341
|
+
export declare function defineCode(): CodeExtension;
|
274
342
|
|
275
343
|
/**
|
276
344
|
* Adds `codeBlock` nodes to the editor. This includes the following extensions:
|
@@ -283,20 +351,7 @@ toggleCode: [];
|
|
283
351
|
*
|
284
352
|
* @public
|
285
353
|
*/
|
286
|
-
declare function defineCodeBlock():
|
287
|
-
Nodes: SimplifyDeeper< {
|
288
|
-
codeBlock: {
|
289
|
-
language: string;
|
290
|
-
};
|
291
|
-
}>;
|
292
|
-
Marks: never;
|
293
|
-
Commands: {
|
294
|
-
setCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
295
|
-
insertCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
296
|
-
toggleCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
297
|
-
setCodeBlockAttrs: [attrs: CodeBlockAttrs];
|
298
|
-
};
|
299
|
-
}>;
|
354
|
+
declare function defineCodeBlock(): CodeBlockExtension;
|
300
355
|
export { defineCodeBlock }
|
301
356
|
export { defineCodeBlock as defineCodeBlock_alias_1 }
|
302
357
|
|
@@ -305,16 +360,7 @@ export { defineCodeBlock as defineCodeBlock_alias_1 }
|
|
305
360
|
*
|
306
361
|
* @public
|
307
362
|
*/
|
308
|
-
declare function defineCodeBlockCommands():
|
309
|
-
Commands: {
|
310
|
-
setCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
311
|
-
insertCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
312
|
-
toggleCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
313
|
-
setCodeBlockAttrs: [attrs: CodeBlockAttrs];
|
314
|
-
};
|
315
|
-
Nodes: never;
|
316
|
-
Marks: never;
|
317
|
-
}>;
|
363
|
+
declare function defineCodeBlockCommands(): CodeBlockCommandsExtension;
|
318
364
|
export { defineCodeBlockCommands }
|
319
365
|
export { defineCodeBlockCommands as defineCodeBlockCommands_alias_1 }
|
320
366
|
|
@@ -323,7 +369,7 @@ export { defineCodeBlockCommands as defineCodeBlockCommands_alias_1 }
|
|
323
369
|
*
|
324
370
|
* @public
|
325
371
|
*/
|
326
|
-
declare function defineCodeBlockEnterRule():
|
372
|
+
declare function defineCodeBlockEnterRule(): PlainExtension;
|
327
373
|
export { defineCodeBlockEnterRule }
|
328
374
|
export { defineCodeBlockEnterRule as defineCodeBlockEnterRule_alias_1 }
|
329
375
|
|
@@ -346,14 +392,14 @@ export { defineCodeBlockHighlight as defineCodeBlockHighlight_alias_1 }
|
|
346
392
|
*
|
347
393
|
* @public
|
348
394
|
*/
|
349
|
-
declare function defineCodeBlockInputRule():
|
395
|
+
declare function defineCodeBlockInputRule(): PlainExtension;
|
350
396
|
export { defineCodeBlockInputRule }
|
351
397
|
export { defineCodeBlockInputRule as defineCodeBlockInputRule_alias_1 }
|
352
398
|
|
353
399
|
/**
|
354
400
|
* Defines the keymap for code blocks.
|
355
401
|
*/
|
356
|
-
export declare function defineCodeBlockKeymap():
|
402
|
+
export declare function defineCodeBlockKeymap(): PlainExtension;
|
357
403
|
|
358
404
|
/**
|
359
405
|
* Adds syntax highlighting to code blocks using the [shiki](https://github.com/shikijs/shiki) package.
|
@@ -369,54 +415,39 @@ export { defineCodeBlockShiki as defineCodeBlockShiki_alias_1 }
|
|
369
415
|
*
|
370
416
|
* @public
|
371
417
|
*/
|
372
|
-
declare function defineCodeBlockSpec():
|
373
|
-
Nodes: {
|
374
|
-
codeBlock: {
|
375
|
-
language: string;
|
376
|
-
};
|
377
|
-
};
|
378
|
-
Marks: never;
|
379
|
-
Commands: never;
|
380
|
-
}>;
|
418
|
+
declare function defineCodeBlockSpec(): CodeBlockSpecExtension;
|
381
419
|
export { defineCodeBlockSpec }
|
382
420
|
export { defineCodeBlockSpec as defineCodeBlockSpec_alias_1 }
|
383
421
|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
Nodes: never;
|
389
|
-
Marks: never;
|
390
|
-
}>;
|
422
|
+
/**
|
423
|
+
* @internal
|
424
|
+
*/
|
425
|
+
export declare function defineCodeCommands(): CodeCommandsExtension;
|
391
426
|
|
392
|
-
|
427
|
+
/**
|
428
|
+
* @internal
|
429
|
+
*/
|
430
|
+
export declare function defineCodeInputRule(): PlainExtension;
|
393
431
|
|
394
|
-
|
432
|
+
/**
|
433
|
+
* @internal
|
434
|
+
*/
|
435
|
+
export declare function defineCodeKeymap(): PlainExtension;
|
395
436
|
|
396
437
|
/**
|
397
|
-
* @
|
438
|
+
* @internal
|
398
439
|
*/
|
399
|
-
export declare function defineCodeSpec():
|
400
|
-
Marks: {
|
401
|
-
code: Attrs;
|
402
|
-
};
|
403
|
-
Nodes: never;
|
404
|
-
Commands: never;
|
405
|
-
}>;
|
440
|
+
export declare function defineCodeSpec(): CodeSpecExtension;
|
406
441
|
|
407
442
|
/**
|
408
443
|
* Define an extension that can record the changes in the editor.
|
409
444
|
*/
|
410
|
-
export declare function defineCommitRecorder(commitRecorder: CommitRecorder):
|
445
|
+
export declare function defineCommitRecorder(commitRecorder: CommitRecorder): PlainExtension;
|
411
446
|
|
412
447
|
/**
|
413
448
|
* Define an extension to display the changes from the given commit in the editor.
|
414
449
|
*/
|
415
|
-
export declare function defineCommitViewer(commit: Commit):
|
416
|
-
Nodes: never;
|
417
|
-
Marks: never;
|
418
|
-
Commands: never;
|
419
|
-
}>;
|
450
|
+
export declare function defineCommitViewer(commit: Commit): PlainExtension;
|
420
451
|
|
421
452
|
/**
|
422
453
|
* Show up a decoration at the drop position when something is dragged over the editor.
|
@@ -425,7 +456,7 @@ Commands: never;
|
|
425
456
|
*
|
426
457
|
* @public
|
427
458
|
*/
|
428
|
-
export declare function defineDropCursor(options?: DropCursorOptions):
|
459
|
+
export declare function defineDropCursor(options?: DropCursorOptions): DropCursorExtension;
|
429
460
|
|
430
461
|
/**
|
431
462
|
* Defines an enter rule. An enter rule applies when the text directly in front of
|
@@ -434,93 +465,74 @@ export declare function defineDropCursor(options?: DropCursorOptions): Extension
|
|
434
465
|
*
|
435
466
|
* @public
|
436
467
|
*/
|
437
|
-
export declare function defineEnterRule(
|
468
|
+
export declare function defineEnterRule(options: EnterRuleOptions): PlainExtension;
|
438
469
|
|
439
470
|
/**
|
471
|
+
* Capture clicks near and arrow-key-motion past places that don't have a
|
472
|
+
* normally selectable position nearby, and create a gap cursor selection for
|
473
|
+
* them. The cursor is drawn as an element with class `ProseMirror-gapcursor`.
|
474
|
+
*
|
475
|
+
* You can either include `prosekit/extensions/gap-cursor.css` or add your own
|
476
|
+
* styles to make it visible.
|
477
|
+
*
|
478
|
+
* See
|
479
|
+
* [prosemirror-gapcursor](https://github.com/ProseMirror/prosemirror-gapcursor)
|
480
|
+
* for more information.
|
481
|
+
*
|
440
482
|
* @public
|
441
483
|
*/
|
442
|
-
export declare function
|
443
|
-
Nodes: SimplifyDeeper< {
|
444
|
-
heading: {
|
445
|
-
level: number;
|
446
|
-
};
|
447
|
-
}>;
|
448
|
-
Marks: never;
|
449
|
-
Commands: {
|
450
|
-
setHeading: [attrs?: HeadingAttrs | undefined];
|
451
|
-
insertHeading: [attrs?: HeadingAttrs | undefined];
|
452
|
-
toggleHeading: [attrs?: HeadingAttrs | undefined];
|
453
|
-
};
|
454
|
-
}>;
|
484
|
+
export declare function defineGapCursor(): GapCursorExtension;
|
455
485
|
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
486
|
+
/**
|
487
|
+
* @public
|
488
|
+
*/
|
489
|
+
export declare function defineHeading(): HeadingExtension;
|
490
|
+
|
491
|
+
/**
|
492
|
+
* @internal
|
493
|
+
*/
|
494
|
+
declare function defineHeadingCommands(): HeadingCommandsExtension;
|
465
495
|
export { defineHeadingCommands }
|
466
496
|
export { defineHeadingCommands as defineHeadingCommands_alias_1 }
|
467
497
|
|
468
498
|
/**
|
469
499
|
* Converts the text block to a heading when `#` is typed at the start of a new
|
470
500
|
* line followed by a space.
|
501
|
+
*
|
502
|
+
* @internal
|
471
503
|
*/
|
472
|
-
declare function defineHeadingInputRule():
|
504
|
+
declare function defineHeadingInputRule(): PlainExtension;
|
473
505
|
export { defineHeadingInputRule }
|
474
506
|
export { defineHeadingInputRule as defineHeadingInputRule_alias_1 }
|
475
507
|
|
476
|
-
|
508
|
+
/**
|
509
|
+
* @internal
|
510
|
+
*/
|
511
|
+
declare function defineHeadingKeymap(): PlainExtension;
|
477
512
|
export { defineHeadingKeymap }
|
478
513
|
export { defineHeadingKeymap as defineHeadingKeymap_alias_1 }
|
479
514
|
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
};
|
485
|
-
};
|
486
|
-
Marks: never;
|
487
|
-
Commands: never;
|
488
|
-
}>;
|
515
|
+
/**
|
516
|
+
* @internal
|
517
|
+
*/
|
518
|
+
declare function defineHeadingSpec(): HeadingSpecExtension;
|
489
519
|
export { defineHeadingSpec }
|
490
520
|
export { defineHeadingSpec as defineHeadingSpec_alias_1 }
|
491
521
|
|
492
522
|
/**
|
493
523
|
* @public
|
494
524
|
*/
|
495
|
-
export declare function defineImage():
|
496
|
-
Nodes: SimplifyDeeper< {
|
497
|
-
image: {
|
498
|
-
src: null;
|
499
|
-
};
|
500
|
-
}>;
|
501
|
-
Marks: never;
|
502
|
-
Commands: {
|
503
|
-
insertImage: [attrs?: ImageAttrs | undefined];
|
504
|
-
};
|
505
|
-
}>;
|
525
|
+
export declare function defineImage(): ImageExtension;
|
506
526
|
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
Nodes: never;
|
512
|
-
Marks: never;
|
513
|
-
}>;
|
527
|
+
/**
|
528
|
+
* @internal
|
529
|
+
*/
|
530
|
+
export declare function defineImageCommands(): ImageCommandsExtension;
|
514
531
|
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
};
|
520
|
-
};
|
521
|
-
Marks: never;
|
522
|
-
Commands: never;
|
523
|
-
}>;
|
532
|
+
/**
|
533
|
+
* @internal
|
534
|
+
*/
|
535
|
+
export declare function defineImageSpec(): ImageSpecExtension;
|
524
536
|
|
525
537
|
/**
|
526
538
|
* Defines an input rule extension.
|
@@ -529,132 +541,77 @@ Commands: never;
|
|
529
541
|
*
|
530
542
|
* @public
|
531
543
|
*/
|
532
|
-
export declare function defineInputRule(rule: InputRule):
|
544
|
+
export declare function defineInputRule(rule: InputRule): PlainExtension;
|
533
545
|
|
534
546
|
/**
|
535
547
|
* @public
|
536
548
|
*/
|
537
|
-
export declare function defineItalic():
|
538
|
-
Nodes: never;
|
539
|
-
Marks: SimplifyDeeper< {
|
540
|
-
italic: Attrs;
|
541
|
-
}>;
|
542
|
-
Commands: {
|
543
|
-
toggleItalic: [];
|
544
|
-
};
|
545
|
-
}>;
|
549
|
+
export declare function defineItalic(): ItalicExtension;
|
546
550
|
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
Nodes: never;
|
552
|
-
Marks: never;
|
553
|
-
}>;
|
551
|
+
/**
|
552
|
+
* @internal
|
553
|
+
*/
|
554
|
+
export declare function defineItalicCommands(): ItalicCommandsExtension;
|
554
555
|
|
555
|
-
|
556
|
+
/**
|
557
|
+
* @internal
|
558
|
+
*/
|
559
|
+
export declare function defineItalicInputRule(): PlainExtension;
|
556
560
|
|
557
|
-
|
561
|
+
/**
|
562
|
+
* @internal
|
563
|
+
*/
|
564
|
+
export declare function defineItalicKeymap(): PlainExtension;
|
558
565
|
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
Nodes: never;
|
564
|
-
Commands: never;
|
565
|
-
}>;
|
566
|
+
/**
|
567
|
+
* @internal
|
568
|
+
*/
|
569
|
+
export declare function defineItalicSpec(): ItalicSpecExtension;
|
566
570
|
|
567
571
|
/**
|
568
572
|
* @public
|
569
573
|
*/
|
570
|
-
export declare function defineLink():
|
571
|
-
Nodes: never;
|
572
|
-
Marks: SimplifyDeeper< {
|
573
|
-
link: LinkAttrs;
|
574
|
-
}>;
|
575
|
-
Commands: {
|
576
|
-
addLink: [attrs: LinkAttrs];
|
577
|
-
removeLink: [];
|
578
|
-
toggleLink: [attrs: LinkAttrs];
|
579
|
-
expandLink: [];
|
580
|
-
};
|
581
|
-
}>;
|
574
|
+
export declare function defineLink(): LinkExtension;
|
582
575
|
|
583
|
-
export declare function defineLinkCommands():
|
584
|
-
Commands: {
|
585
|
-
addLink: [attrs: LinkAttrs];
|
586
|
-
removeLink: [];
|
587
|
-
toggleLink: [attrs: LinkAttrs];
|
588
|
-
expandLink: [];
|
589
|
-
};
|
590
|
-
Nodes: never;
|
591
|
-
Marks: never;
|
592
|
-
}>;
|
576
|
+
export declare function defineLinkCommands(): LinkCommandsExtension;
|
593
577
|
|
594
578
|
/**
|
595
579
|
* Apply link marks after typing Enter.
|
580
|
+
*
|
581
|
+
* @internal
|
596
582
|
*/
|
597
|
-
export declare function defineLinkEnterRule():
|
583
|
+
export declare function defineLinkEnterRule(): PlainExtension;
|
598
584
|
|
599
585
|
/**
|
600
586
|
* Apply link marks after pressing Space.
|
587
|
+
*
|
588
|
+
* @internal
|
601
589
|
*/
|
602
|
-
export declare function defineLinkInputRule():
|
590
|
+
export declare function defineLinkInputRule(): PlainExtension;
|
603
591
|
|
604
592
|
/**
|
605
593
|
* Apply and remove link marks to the text during typing.
|
594
|
+
*
|
595
|
+
* @internal
|
606
596
|
*/
|
607
597
|
export declare function defineLinkMarkRule(): Extension<ExtensionTyping<any, any, any>>;
|
608
598
|
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
Nodes: never;
|
614
|
-
Commands: never;
|
615
|
-
}>;
|
599
|
+
/**
|
600
|
+
* @internal
|
601
|
+
*/
|
602
|
+
export declare function defineLinkSpec(): LinkSpecExtension;
|
616
603
|
|
617
604
|
/**
|
618
605
|
* @public
|
619
606
|
*/
|
620
|
-
export declare function defineList():
|
621
|
-
Nodes: SimplifyDeeper< {
|
622
|
-
list: ListAttrs;
|
623
|
-
}>;
|
624
|
-
Marks: never;
|
625
|
-
Commands: {
|
626
|
-
dedentList: [options?: DedentListOptions | undefined];
|
627
|
-
indentList: [options?: IndentListOptions | undefined];
|
628
|
-
moveList: [direction: "up" | "down"];
|
629
|
-
splitList: [];
|
630
|
-
toggleCollapsed: [(ToggleCollapsedOptions | undefined)?];
|
631
|
-
toggleList: [attrs: ListAttributes];
|
632
|
-
unwrapList: [options?: UnwrapListOptions | undefined];
|
633
|
-
wrapInList: [getAttrs: WrapInListGetAttrs<ListAttributes>];
|
634
|
-
insertList: [attrs?: ListAttributes | undefined];
|
635
|
-
};
|
636
|
-
}>;
|
607
|
+
export declare function defineList(): ListExtension;
|
637
608
|
|
638
609
|
/**
|
639
610
|
* Defines list commands.
|
640
611
|
*
|
641
612
|
* @internal
|
642
613
|
*/
|
643
|
-
declare function defineListCommands():
|
644
|
-
Commands: {
|
645
|
-
dedentList: [options?: DedentListOptions | undefined];
|
646
|
-
indentList: [options?: IndentListOptions | undefined];
|
647
|
-
moveList: [direction: "up" | "down"];
|
648
|
-
splitList: [];
|
649
|
-
toggleCollapsed: [(ToggleCollapsedOptions | undefined)?];
|
650
|
-
toggleList: [attrs: ListAttributes];
|
651
|
-
unwrapList: [options?: UnwrapListOptions | undefined];
|
652
|
-
wrapInList: [getAttrs: WrapInListGetAttrs<ListAttributes>];
|
653
|
-
insertList: [attrs?: ListAttributes | undefined];
|
654
|
-
};
|
655
|
-
Nodes: never;
|
656
|
-
Marks: never;
|
657
|
-
}>;
|
614
|
+
declare function defineListCommands(): ListCommandsExtension;
|
658
615
|
export { defineListCommands }
|
659
616
|
export { defineListCommands as defineListCommands_alias_1 }
|
660
617
|
|
@@ -670,27 +627,21 @@ export { defineListInputRules as defineListInputRules_alias_1 }
|
|
670
627
|
*
|
671
628
|
* @internal
|
672
629
|
*/
|
673
|
-
declare function defineListKeymap():
|
630
|
+
declare function defineListKeymap(): PlainExtension;
|
674
631
|
export { defineListKeymap }
|
675
632
|
export { defineListKeymap as defineListKeymap_alias_1 }
|
676
633
|
|
677
634
|
/**
|
678
635
|
* @internal
|
679
636
|
*/
|
680
|
-
declare function defineListPlugins():
|
637
|
+
declare function defineListPlugins(): PlainExtension;
|
681
638
|
export { defineListPlugins }
|
682
639
|
export { defineListPlugins as defineListPlugins_alias_1 }
|
683
640
|
|
684
641
|
/**
|
685
642
|
* @internal
|
686
643
|
*/
|
687
|
-
declare function defineListSpec():
|
688
|
-
Nodes: {
|
689
|
-
list: ListAttrs;
|
690
|
-
};
|
691
|
-
Marks: never;
|
692
|
-
Commands: never;
|
693
|
-
}>;
|
644
|
+
declare function defineListSpec(): ListSpecExtension;
|
694
645
|
export { defineListSpec }
|
695
646
|
export { defineListSpec as defineListSpec_alias_1 }
|
696
647
|
|
@@ -700,7 +651,7 @@ export { defineListSpec as defineListSpec_alias_1 }
|
|
700
651
|
*
|
701
652
|
* @public
|
702
653
|
*/
|
703
|
-
export declare function defineMarkInputRule(options: MarkInputRuleOptions):
|
654
|
+
export declare function defineMarkInputRule(options: MarkInputRuleOptions): PlainExtension;
|
704
655
|
|
705
656
|
/**
|
706
657
|
* A mark rule is something that can automatically apply marks to text if it
|
@@ -713,22 +664,20 @@ export { defineMarkRule as defineMarkRule_alias_1 }
|
|
713
664
|
/**
|
714
665
|
* @public
|
715
666
|
*/
|
716
|
-
export declare function defineMention(): Extension< {
|
717
|
-
Nodes:
|
667
|
+
export declare function defineMention(): Union<readonly [Extension< {
|
668
|
+
Nodes: {
|
718
669
|
mention: MentionAttrs;
|
719
|
-
}
|
720
|
-
|
670
|
+
};
|
671
|
+
}>, Extension< {
|
721
672
|
Commands: {
|
722
673
|
insertMention: [attrs: MentionAttrs];
|
723
674
|
};
|
724
|
-
}>;
|
675
|
+
}>]>;
|
725
676
|
|
726
677
|
export declare function defineMentionCommands(): Extension< {
|
727
678
|
Commands: {
|
728
679
|
insertMention: [attrs: MentionAttrs];
|
729
680
|
};
|
730
|
-
Nodes: never;
|
731
|
-
Marks: never;
|
732
681
|
}>;
|
733
682
|
|
734
683
|
/**
|
@@ -738,8 +687,6 @@ export declare function defineMentionSpec(): Extension< {
|
|
738
687
|
Nodes: {
|
739
688
|
mention: MentionAttrs;
|
740
689
|
};
|
741
|
-
Marks: never;
|
742
|
-
Commands: never;
|
743
690
|
}>;
|
744
691
|
|
745
692
|
/**
|
@@ -748,18 +695,18 @@ Commands: never;
|
|
748
695
|
*
|
749
696
|
* @public
|
750
697
|
*/
|
751
|
-
export declare function defineModClickPrevention():
|
698
|
+
export declare function defineModClickPrevention(): ModClickPreventionExtension;
|
752
699
|
|
753
700
|
/**
|
754
701
|
* Add a placeholder text to the editor when the current block or document is
|
755
702
|
* empty.
|
756
703
|
*/
|
757
|
-
export declare function definePlaceholder(options: PlaceholderOptions):
|
704
|
+
export declare function definePlaceholder(options: PlaceholderOptions): PlainExtension;
|
758
705
|
|
759
706
|
/**
|
760
707
|
* Make the editor read-only.
|
761
708
|
*/
|
762
|
-
export declare function defineReadonly():
|
709
|
+
export declare function defineReadonly(): PlainExtension;
|
763
710
|
|
764
711
|
/**
|
765
712
|
* Defines commands for search and replace.
|
@@ -777,8 +724,6 @@ replaceNextNoWrap: [];
|
|
777
724
|
replaceCurrent: [];
|
778
725
|
replaceAll: [];
|
779
726
|
};
|
780
|
-
Nodes: never;
|
781
|
-
Marks: never;
|
782
727
|
}>;
|
783
728
|
|
784
729
|
/**
|
@@ -786,75 +731,42 @@ Marks: never;
|
|
786
731
|
*
|
787
732
|
* @public
|
788
733
|
*/
|
789
|
-
export declare function defineSearchQuery(options: SearchQueryOptions):
|
734
|
+
export declare function defineSearchQuery(options: SearchQueryOptions): PlainExtension;
|
790
735
|
|
791
736
|
/**
|
792
737
|
* @public
|
793
738
|
*/
|
794
|
-
export declare function defineStrike():
|
795
|
-
Nodes: never;
|
796
|
-
Marks: SimplifyDeeper< {
|
797
|
-
strike: Attrs;
|
798
|
-
}>;
|
799
|
-
Commands: {
|
800
|
-
toggleStrike: [];
|
801
|
-
};
|
802
|
-
}>;
|
739
|
+
export declare function defineStrike(): StrikeExtension;
|
803
740
|
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
Nodes: never;
|
809
|
-
Marks: never;
|
810
|
-
}>;
|
741
|
+
/**
|
742
|
+
* @internal
|
743
|
+
*/
|
744
|
+
export declare function defineStrikeCommands(): StrikeCommandsExtension;
|
811
745
|
|
812
|
-
|
746
|
+
/**
|
747
|
+
* @internal
|
748
|
+
*/
|
749
|
+
export declare function defineStrikeInputRule(): PlainExtension;
|
813
750
|
|
814
|
-
|
751
|
+
/**
|
752
|
+
* @internal
|
753
|
+
*/
|
754
|
+
export declare function defineStrikeKeymap(): PlainExtension;
|
815
755
|
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
Nodes: never;
|
821
|
-
Commands: never;
|
822
|
-
}>;
|
756
|
+
/**
|
757
|
+
* @internal
|
758
|
+
*/
|
759
|
+
export declare function defineStrikeSpec(): StrikeSpecExtension;
|
823
760
|
|
824
761
|
/**
|
825
762
|
* @public
|
826
763
|
*/
|
827
|
-
export declare function defineTable():
|
828
|
-
Nodes: SimplifyDeeper< {
|
829
|
-
table: Attrs;
|
830
|
-
tableRow: Attrs;
|
831
|
-
tableCell: {
|
832
|
-
[x: string]: any;
|
833
|
-
};
|
834
|
-
tableHeaderCell: {
|
835
|
-
[x: string]: any;
|
836
|
-
};
|
837
|
-
}>;
|
838
|
-
Marks: never;
|
839
|
-
Commands: {
|
840
|
-
insertTable: [{
|
841
|
-
row: number;
|
842
|
-
col: number;
|
843
|
-
header: boolean;
|
844
|
-
}];
|
845
|
-
exitTable: [];
|
846
|
-
};
|
847
|
-
}>;
|
764
|
+
export declare function defineTable(): TableExtension;
|
848
765
|
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
};
|
854
|
-
};
|
855
|
-
Marks: never;
|
856
|
-
Commands: never;
|
857
|
-
}>;
|
766
|
+
/**
|
767
|
+
* @internal
|
768
|
+
*/
|
769
|
+
declare function defineTableCellSpec(): TableCellSpecExtension;
|
858
770
|
export { defineTableCellSpec }
|
859
771
|
export { defineTableCellSpec as defineTableCellSpec_alias_1 }
|
860
772
|
|
@@ -863,164 +775,43 @@ export { defineTableCellSpec as defineTableCellSpec_alias_1 }
|
|
863
775
|
*
|
864
776
|
* @public
|
865
777
|
*/
|
866
|
-
declare function defineTableCommands():
|
867
|
-
Commands: {
|
868
|
-
insertTable: [{
|
869
|
-
row: number;
|
870
|
-
col: number;
|
871
|
-
header: boolean;
|
872
|
-
}];
|
873
|
-
exitTable: [];
|
874
|
-
};
|
875
|
-
Nodes: never;
|
876
|
-
Marks: never;
|
877
|
-
}>;
|
778
|
+
declare function defineTableCommands(): TableCommandsExtension;
|
878
779
|
export { defineTableCommands }
|
879
780
|
export { defineTableCommands as defineTableCommands_alias_1 }
|
880
781
|
|
881
|
-
declare function defineTableHeaderCellSpec():
|
882
|
-
Nodes: {
|
883
|
-
tableHeaderCell: {
|
884
|
-
[x: string]: any;
|
885
|
-
};
|
886
|
-
};
|
887
|
-
Marks: never;
|
888
|
-
Commands: never;
|
889
|
-
}>;
|
782
|
+
declare function defineTableHeaderCellSpec(): TableHeaderCellSpecExtension;
|
890
783
|
export { defineTableHeaderCellSpec }
|
891
784
|
export { defineTableHeaderCellSpec as defineTableHeaderCellSpec_alias_1 }
|
892
785
|
|
893
786
|
/**
|
894
787
|
* @public
|
895
788
|
*/
|
896
|
-
declare function defineTablePlugins():
|
789
|
+
declare function defineTablePlugins(): PlainExtension;
|
897
790
|
export { defineTablePlugins }
|
898
791
|
export { defineTablePlugins as defineTablePlugins_alias_1 }
|
899
792
|
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
Marks: never;
|
905
|
-
Commands: never;
|
906
|
-
}>;
|
793
|
+
/**
|
794
|
+
* @internal
|
795
|
+
*/
|
796
|
+
declare function defineTableRowSpec(): TableRowSpecExtension;
|
907
797
|
export { defineTableRowSpec }
|
908
798
|
export { defineTableRowSpec as defineTableRowSpec_alias_1 }
|
909
799
|
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
Marks: never;
|
915
|
-
Commands: never;
|
916
|
-
}>;
|
800
|
+
/**
|
801
|
+
* @internal
|
802
|
+
*/
|
803
|
+
declare function defineTableSpec(): TableSpecExtension;
|
917
804
|
export { defineTableSpec }
|
918
805
|
export { defineTableSpec as defineTableSpec_alias_1 }
|
919
806
|
|
920
807
|
/**
|
921
808
|
* @internal
|
922
809
|
*/
|
923
|
-
export declare function defineTestExtension(): Extension<{
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
blockquote: {
|
929
|
-
readonly [x: string]: any;
|
930
|
-
};
|
931
|
-
heading: {
|
932
|
-
level: number;
|
933
|
-
};
|
934
|
-
image: {
|
935
|
-
src: null;
|
936
|
-
};
|
937
|
-
list: {
|
938
|
-
kind?: "bullet" | "ordered" | "task" | "toggle";
|
939
|
-
order?: number | null;
|
940
|
-
checked?: boolean;
|
941
|
-
collapsed?: boolean;
|
942
|
-
};
|
943
|
-
table: {
|
944
|
-
readonly [x: string]: any;
|
945
|
-
};
|
946
|
-
tableRow: {
|
947
|
-
readonly [x: string]: any;
|
948
|
-
};
|
949
|
-
tableCell: {
|
950
|
-
[x: string]: any;
|
951
|
-
};
|
952
|
-
tableHeaderCell: {
|
953
|
-
[x: string]: any;
|
954
|
-
};
|
955
|
-
}>;
|
956
|
-
Marks: SimplifyDeeper< {
|
957
|
-
bold: {
|
958
|
-
readonly [x: string]: any;
|
959
|
-
};
|
960
|
-
code: {
|
961
|
-
readonly [x: string]: any;
|
962
|
-
};
|
963
|
-
italic: {
|
964
|
-
readonly [x: string]: any;
|
965
|
-
};
|
966
|
-
link: {
|
967
|
-
href: string;
|
968
|
-
};
|
969
|
-
strike: {
|
970
|
-
readonly [x: string]: any;
|
971
|
-
};
|
972
|
-
underline: {
|
973
|
-
readonly [x: string]: any;
|
974
|
-
};
|
975
|
-
}>;
|
976
|
-
Commands: {
|
977
|
-
insertText: [{
|
978
|
-
text: string;
|
979
|
-
from?: number;
|
980
|
-
to?: number;
|
981
|
-
}];
|
982
|
-
insertNode: [options: InsertNodeOptions];
|
983
|
-
removeNode: [options: RemoveNodeOptions];
|
984
|
-
wrap: [WrapOptions];
|
985
|
-
setBlockType: [options: SetBlockTypeOptions];
|
986
|
-
setNodeAttrs: [options: SetNodeAttrsOptions];
|
987
|
-
selectAll: [];
|
988
|
-
addMark: [options: AddMarkOptions];
|
989
|
-
removeMark: [options: RemoveMarkOptions];
|
990
|
-
unsetBlockType: [options?: UnsetBlockTypeOptions | undefined];
|
991
|
-
unsetMark: [options?: UnsetMarkOptions | undefined];
|
992
|
-
readonly undo: [];
|
993
|
-
readonly redo: [];
|
994
|
-
toggleBold: [];
|
995
|
-
toggleCode: [];
|
996
|
-
setHeading: [attrs?: HeadingAttrs | undefined];
|
997
|
-
insertHeading: [attrs?: HeadingAttrs | undefined];
|
998
|
-
toggleHeading: [attrs?: HeadingAttrs | undefined];
|
999
|
-
insertImage: [attrs?: ImageAttrs | undefined];
|
1000
|
-
toggleItalic: [];
|
1001
|
-
addLink: [attrs: LinkAttrs];
|
1002
|
-
removeLink: [];
|
1003
|
-
toggleLink: [attrs: LinkAttrs];
|
1004
|
-
expandLink: [];
|
1005
|
-
dedentList: [options?: DedentListOptions | undefined];
|
1006
|
-
indentList: [options?: IndentListOptions | undefined];
|
1007
|
-
moveList: [direction: "up" | "down"];
|
1008
|
-
splitList: [];
|
1009
|
-
toggleCollapsed: [(ToggleCollapsedOptions | undefined)?];
|
1010
|
-
toggleList: [attrs: ListAttributes];
|
1011
|
-
unwrapList: [options?: UnwrapListOptions | undefined];
|
1012
|
-
wrapInList: [getAttrs: WrapInListGetAttrs<ListAttributes>];
|
1013
|
-
insertList: [attrs?: ListAttributes | undefined];
|
1014
|
-
toggleStrike: [];
|
1015
|
-
insertTable: [{
|
1016
|
-
row: number;
|
1017
|
-
col: number;
|
1018
|
-
header: boolean;
|
1019
|
-
}];
|
1020
|
-
exitTable: [];
|
1021
|
-
toggleUnderline: [];
|
1022
|
-
};
|
1023
|
-
}>;
|
810
|
+
export declare function defineTestExtension(): Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension, PlainExtension, BaseCommandsExtension, ItalicExtension, BoldExtension, UnderlineExtension, StrikeExtension, CodeExtension, LinkExtension, ImageExtension, Extension<{
|
811
|
+
Nodes: {
|
812
|
+
paragraph: Attrs_2;
|
813
|
+
};
|
814
|
+
}>, TableExtension]>;
|
1024
815
|
|
1025
816
|
/**
|
1026
817
|
* Adds a `textAlign` attribute to the specified nodes. This will be rendered as
|
@@ -1028,29 +819,17 @@ export declare function defineTestExtension(): Extension<{
|
|
1028
819
|
*
|
1029
820
|
* @public
|
1030
821
|
*/
|
1031
|
-
export declare function defineTextAlign<NodeName extends string = string>(options: TextAlignOptions<NodeName>):
|
1032
|
-
Nodes: {
|
1033
|
-
[K in NodeName]: {
|
1034
|
-
textAlign: string | null;
|
1035
|
-
};
|
1036
|
-
};
|
1037
|
-
Marks: never;
|
1038
|
-
Commands: TextAlignCommandTyping;
|
1039
|
-
}>;
|
822
|
+
export declare function defineTextAlign<NodeName extends string = string>(options: TextAlignOptions<NodeName>): TextAlignExtension<NodeName>;
|
1040
823
|
|
1041
824
|
/**
|
1042
825
|
* @internal
|
1043
826
|
*/
|
1044
|
-
export declare function defineTextAlignCommands(types: string[]):
|
1045
|
-
Nodes: never;
|
1046
|
-
Marks: never;
|
1047
|
-
Commands: TextAlignCommandTyping;
|
1048
|
-
}>;
|
827
|
+
export declare function defineTextAlignCommands(types: string[]): TextAlignCommandsExtension;
|
1049
828
|
|
1050
829
|
/**
|
1051
830
|
* @internal
|
1052
831
|
*/
|
1053
|
-
export declare function defineTextAlignKeymap(types: string[]):
|
832
|
+
export declare function defineTextAlignKeymap(types: string[]): PlainExtension;
|
1054
833
|
|
1055
834
|
/**
|
1056
835
|
* Defines an enter rule that replaces the matched text with a block node.
|
@@ -1059,7 +838,7 @@ export declare function defineTextAlignKeymap(types: string[]): Extension<Extens
|
|
1059
838
|
*
|
1060
839
|
* @public
|
1061
840
|
*/
|
1062
|
-
export declare function defineTextBlockEnterRule(
|
841
|
+
export declare function defineTextBlockEnterRule(options: TextBlockEnterRuleOptions): PlainExtension;
|
1063
842
|
|
1064
843
|
/**
|
1065
844
|
* Defines an input rule that changes the type of a textblock when the matched
|
@@ -1083,39 +862,28 @@ export declare function defineTextBlockInputRule({ regex, type, attrs, }: {
|
|
1083
862
|
/**
|
1084
863
|
* Attributes to set on the node.
|
1085
864
|
*/
|
1086
|
-
attrs?:
|
1087
|
-
}):
|
865
|
+
attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
|
866
|
+
}): PlainExtension;
|
1088
867
|
|
1089
868
|
/**
|
1090
869
|
* @public
|
1091
870
|
*/
|
1092
|
-
export declare function defineUnderline():
|
1093
|
-
Nodes: never;
|
1094
|
-
Marks: SimplifyDeeper< {
|
1095
|
-
underline: Attrs;
|
1096
|
-
}>;
|
1097
|
-
Commands: {
|
1098
|
-
toggleUnderline: [];
|
1099
|
-
};
|
1100
|
-
}>;
|
871
|
+
export declare function defineUnderline(): UnderlineExtension;
|
1101
872
|
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
Nodes: never;
|
1107
|
-
Marks: never;
|
1108
|
-
}>;
|
873
|
+
/**
|
874
|
+
* @internal
|
875
|
+
*/
|
876
|
+
export declare function defineUnderlineCommands(): UnderlineCommandsExtension;
|
1109
877
|
|
1110
|
-
|
878
|
+
/**
|
879
|
+
* @internal
|
880
|
+
*/
|
881
|
+
export declare function defineUnderlineKeymap(): PlainExtension;
|
1111
882
|
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
Nodes: never;
|
1117
|
-
Commands: never;
|
1118
|
-
}>;
|
883
|
+
/**
|
884
|
+
* @internal
|
885
|
+
*/
|
886
|
+
export declare function defineUnderlineSpec(): UnderlineSpecExtension;
|
1119
887
|
|
1120
888
|
/**
|
1121
889
|
* Shows a virtual selection when the editor is not focused. When the editor is
|
@@ -1127,7 +895,7 @@ Commands: never;
|
|
1127
895
|
*
|
1128
896
|
* @public
|
1129
897
|
*/
|
1130
|
-
export declare function defineVirtualSelection():
|
898
|
+
export declare function defineVirtualSelection(): VirtualSelectionExtension;
|
1131
899
|
|
1132
900
|
/**
|
1133
901
|
* Defines an input rule for automatically wrapping a textblock when a given
|
@@ -1151,7 +919,7 @@ export declare function defineWrappingInputRule({ regex, type, attrs, join, }: {
|
|
1151
919
|
/**
|
1152
920
|
* Attributes to set on the node.
|
1153
921
|
*/
|
1154
|
-
attrs?:
|
922
|
+
attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
|
1155
923
|
/**
|
1156
924
|
* By default, if there's a node with the same type above the newly wrapped
|
1157
925
|
* node, the rule will try to
|
@@ -1161,7 +929,12 @@ export declare function defineWrappingInputRule({ regex, type, attrs, join, }: {
|
|
1161
929
|
* indicate whether a join should happen.
|
1162
930
|
*/
|
1163
931
|
join?: (match: RegExpMatchArray, node: ProseMirrorNode) => boolean;
|
1164
|
-
}):
|
932
|
+
}): PlainExtension;
|
933
|
+
|
934
|
+
/**
|
935
|
+
* @internal
|
936
|
+
*/
|
937
|
+
export declare type DropCursorExtension = PlainExtension;
|
1165
938
|
|
1166
939
|
export declare interface DropCursorOptions {
|
1167
940
|
/**
|
@@ -1234,6 +1007,13 @@ export declare type EnterRuleOptions = {
|
|
1234
1007
|
*/
|
1235
1008
|
export declare const exitTable: Command;
|
1236
1009
|
|
1010
|
+
export { GapCursor }
|
1011
|
+
|
1012
|
+
/**
|
1013
|
+
* @internal
|
1014
|
+
*/
|
1015
|
+
export declare type GapCursorExtension = PlainExtension;
|
1016
|
+
|
1237
1017
|
export declare function getCheckRanges(transactions: readonly Transaction[], oldState: EditorState, newState: EditorState): Array<[number, number]>;
|
1238
1018
|
|
1239
1019
|
export declare function getPluginState(state: EditorState): PredictionPluginState | undefined;
|
@@ -1248,6 +1028,38 @@ declare interface HeadingAttrs {
|
|
1248
1028
|
export { HeadingAttrs }
|
1249
1029
|
export { HeadingAttrs as HeadingAttrs_alias_1 }
|
1250
1030
|
|
1031
|
+
/**
|
1032
|
+
* @internal
|
1033
|
+
*/
|
1034
|
+
declare type HeadingCommandsExtension = Extension<{
|
1035
|
+
Commands: {
|
1036
|
+
setHeading: [attrs?: HeadingAttrs | undefined];
|
1037
|
+
insertHeading: [attrs?: HeadingAttrs | undefined];
|
1038
|
+
toggleHeading: [attrs?: HeadingAttrs | undefined];
|
1039
|
+
};
|
1040
|
+
}>;
|
1041
|
+
export { HeadingCommandsExtension }
|
1042
|
+
export { HeadingCommandsExtension as HeadingCommandsExtension_alias_1 }
|
1043
|
+
|
1044
|
+
/**
|
1045
|
+
* @internal
|
1046
|
+
*/
|
1047
|
+
export declare type HeadingExtension = Union<[
|
1048
|
+
HeadingSpecExtension,
|
1049
|
+
HeadingCommandsExtension
|
1050
|
+
]>;
|
1051
|
+
|
1052
|
+
/**
|
1053
|
+
* @internal
|
1054
|
+
*/
|
1055
|
+
declare type HeadingSpecExtension = Extension<{
|
1056
|
+
Nodes: {
|
1057
|
+
heading: HeadingAttrs;
|
1058
|
+
};
|
1059
|
+
}>;
|
1060
|
+
export { HeadingSpecExtension }
|
1061
|
+
export { HeadingSpecExtension as HeadingSpecExtension_alias_1 }
|
1062
|
+
|
1251
1063
|
export declare type HighlighterOptions = {
|
1252
1064
|
themes: BundledTheme[];
|
1253
1065
|
langs: (BundledLanguage | SpecialLanguage)[];
|
@@ -1271,10 +1083,36 @@ declare type HighlightParser = Parser;
|
|
1271
1083
|
export { HighlightParser }
|
1272
1084
|
export { HighlightParser as HighlightParser_alias_1 }
|
1273
1085
|
|
1086
|
+
/**
|
1087
|
+
* @public
|
1088
|
+
*/
|
1274
1089
|
export declare interface ImageAttrs {
|
1275
1090
|
src?: string | null;
|
1276
1091
|
}
|
1277
1092
|
|
1093
|
+
/**
|
1094
|
+
* @internal
|
1095
|
+
*/
|
1096
|
+
export declare type ImageCommandsExtension = Extension<{
|
1097
|
+
Commands: {
|
1098
|
+
insertImage: [attrs?: ImageAttrs];
|
1099
|
+
};
|
1100
|
+
}>;
|
1101
|
+
|
1102
|
+
/**
|
1103
|
+
* @internal
|
1104
|
+
*/
|
1105
|
+
export declare type ImageExtension = Union<[ImageSpecExtension, ImageCommandsExtension]>;
|
1106
|
+
|
1107
|
+
/**
|
1108
|
+
* @internal
|
1109
|
+
*/
|
1110
|
+
export declare type ImageSpecExtension = Extension<{
|
1111
|
+
Nodes: {
|
1112
|
+
image: ImageAttrs;
|
1113
|
+
};
|
1114
|
+
}>;
|
1115
|
+
|
1278
1116
|
export { IndentListOptions }
|
1279
1117
|
|
1280
1118
|
/**
|
@@ -1283,11 +1121,42 @@ export { IndentListOptions }
|
|
1283
1121
|
*
|
1284
1122
|
* @public
|
1285
1123
|
*/
|
1286
|
-
export declare function insertTable({ row, col, header
|
1124
|
+
export declare function insertTable({ row, col, header }: InsertTableOptions): Command;
|
1125
|
+
|
1126
|
+
/**
|
1127
|
+
* @public
|
1128
|
+
*/
|
1129
|
+
export declare interface InsertTableOptions {
|
1287
1130
|
row: number;
|
1288
1131
|
col: number;
|
1289
1132
|
header: boolean;
|
1290
|
-
}
|
1133
|
+
}
|
1134
|
+
|
1135
|
+
/**
|
1136
|
+
* @internal
|
1137
|
+
*/
|
1138
|
+
export declare type ItalicCommandsExtension = Extension<{
|
1139
|
+
Commands: {
|
1140
|
+
toggleItalic: [];
|
1141
|
+
};
|
1142
|
+
}>;
|
1143
|
+
|
1144
|
+
/**
|
1145
|
+
* @internal
|
1146
|
+
*/
|
1147
|
+
export declare type ItalicExtension = Union<[
|
1148
|
+
ItalicSpecExtension,
|
1149
|
+
ItalicCommandsExtension
|
1150
|
+
]>;
|
1151
|
+
|
1152
|
+
/**
|
1153
|
+
* @internal
|
1154
|
+
*/
|
1155
|
+
export declare type ItalicSpecExtension = Extension<{
|
1156
|
+
Marks: {
|
1157
|
+
italic: Attrs;
|
1158
|
+
};
|
1159
|
+
}>;
|
1291
1160
|
|
1292
1161
|
export declare const LINK_ENTER_RE: RegExp;
|
1293
1162
|
|
@@ -1302,6 +1171,32 @@ export declare interface LinkAttrs {
|
|
1302
1171
|
href: string;
|
1303
1172
|
}
|
1304
1173
|
|
1174
|
+
/**
|
1175
|
+
* @internal
|
1176
|
+
*/
|
1177
|
+
export declare type LinkCommandsExtension = Extension<{
|
1178
|
+
Commands: {
|
1179
|
+
addLink: [LinkAttrs];
|
1180
|
+
removeLink: [];
|
1181
|
+
toggleLink: [LinkAttrs];
|
1182
|
+
expandLink: [];
|
1183
|
+
};
|
1184
|
+
}>;
|
1185
|
+
|
1186
|
+
/**
|
1187
|
+
* @internal
|
1188
|
+
*/
|
1189
|
+
export declare type LinkExtension = Union<[LinkSpecExtension, LinkCommandsExtension]>;
|
1190
|
+
|
1191
|
+
/**
|
1192
|
+
* @internal
|
1193
|
+
*/
|
1194
|
+
export declare type LinkSpecExtension = Extension<{
|
1195
|
+
Marks: {
|
1196
|
+
link: LinkAttrs;
|
1197
|
+
};
|
1198
|
+
}>;
|
1199
|
+
|
1305
1200
|
/**
|
1306
1201
|
* The attributes of a list node.
|
1307
1202
|
*
|
@@ -1328,8 +1223,43 @@ declare interface ListAttrs {
|
|
1328
1223
|
export { ListAttrs }
|
1329
1224
|
export { ListAttrs as ListAttrs_alias_1 }
|
1330
1225
|
|
1226
|
+
/**
|
1227
|
+
* @internal
|
1228
|
+
*/
|
1229
|
+
declare type ListCommandsExtension = Extension<{
|
1230
|
+
Commands: {
|
1231
|
+
dedentList: [options?: DedentListOptions];
|
1232
|
+
indentList: [options?: IndentListOptions];
|
1233
|
+
moveList: [direction: 'up' | 'down'];
|
1234
|
+
splitList: [];
|
1235
|
+
toggleCollapsed: [options?: ToggleCollapsedOptions];
|
1236
|
+
unwrapList: [options?: UnwrapListOptions];
|
1237
|
+
toggleList: [attrs?: ListAttributes];
|
1238
|
+
wrapInList: [attrs?: ListAttributes];
|
1239
|
+
insertList: [attrs?: ListAttributes];
|
1240
|
+
};
|
1241
|
+
}>;
|
1242
|
+
export { ListCommandsExtension }
|
1243
|
+
export { ListCommandsExtension as ListCommandsExtension_alias_1 }
|
1244
|
+
|
1331
1245
|
export { ListDOMSerializer }
|
1332
1246
|
|
1247
|
+
/**
|
1248
|
+
* @internal
|
1249
|
+
*/
|
1250
|
+
export declare type ListExtension = Union<[ListSpecExtension, ListCommandsExtension]>;
|
1251
|
+
|
1252
|
+
/**
|
1253
|
+
* @internal
|
1254
|
+
*/
|
1255
|
+
declare type ListSpecExtension = Extension<{
|
1256
|
+
Nodes: {
|
1257
|
+
list: ListAttrs;
|
1258
|
+
};
|
1259
|
+
}>;
|
1260
|
+
export { ListSpecExtension }
|
1261
|
+
export { ListSpecExtension as ListSpecExtension_alias_1 }
|
1262
|
+
|
1333
1263
|
/**
|
1334
1264
|
* Options for {@link defineMarkInputRule}.
|
1335
1265
|
*
|
@@ -1349,7 +1279,7 @@ export declare interface MarkInputRuleOptions {
|
|
1349
1279
|
/**
|
1350
1280
|
* Attributes to set on the mark.
|
1351
1281
|
*/
|
1352
|
-
attrs?:
|
1282
|
+
attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
|
1353
1283
|
}
|
1354
1284
|
|
1355
1285
|
/**
|
@@ -1373,7 +1303,7 @@ declare interface MarkRuleOptions {
|
|
1373
1303
|
*
|
1374
1304
|
* @default null
|
1375
1305
|
*/
|
1376
|
-
attrs?:
|
1306
|
+
attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
|
1377
1307
|
}
|
1378
1308
|
export { MarkRuleOptions }
|
1379
1309
|
export { MarkRuleOptions as MarkRuleOptions_alias_1 }
|
@@ -1395,6 +1325,11 @@ export declare interface MentionAttrs {
|
|
1395
1325
|
kind: string;
|
1396
1326
|
}
|
1397
1327
|
|
1328
|
+
/**
|
1329
|
+
* @internal
|
1330
|
+
*/
|
1331
|
+
export declare type ModClickPreventionExtension = PlainExtension;
|
1332
|
+
|
1398
1333
|
export declare interface PlaceholderOptions {
|
1399
1334
|
/**
|
1400
1335
|
* The placeholder text to use.
|
@@ -1493,107 +1428,11 @@ export declare function setTrMeta(tr: Transaction, meta: PredictionPluginState):
|
|
1493
1428
|
* @internal
|
1494
1429
|
*/
|
1495
1430
|
export declare function setupTest(): {
|
1496
|
-
editor: TestEditor<Extension<{
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
blockquote: {
|
1502
|
-
readonly [x: string]: any;
|
1503
|
-
};
|
1504
|
-
heading: {
|
1505
|
-
level: number;
|
1506
|
-
};
|
1507
|
-
image: {
|
1508
|
-
src: null;
|
1509
|
-
};
|
1510
|
-
list: {
|
1511
|
-
kind?: "bullet" | "ordered" | "task" | "toggle";
|
1512
|
-
order?: number | null;
|
1513
|
-
checked?: boolean;
|
1514
|
-
collapsed?: boolean;
|
1515
|
-
};
|
1516
|
-
table: {
|
1517
|
-
readonly [x: string]: any;
|
1518
|
-
};
|
1519
|
-
tableRow: {
|
1520
|
-
readonly [x: string]: any;
|
1521
|
-
};
|
1522
|
-
tableCell: {
|
1523
|
-
[x: string]: any;
|
1524
|
-
};
|
1525
|
-
tableHeaderCell: {
|
1526
|
-
[x: string]: any;
|
1527
|
-
};
|
1528
|
-
}>;
|
1529
|
-
Marks: SimplifyDeeper< {
|
1530
|
-
bold: {
|
1531
|
-
readonly [x: string]: any;
|
1532
|
-
};
|
1533
|
-
code: {
|
1534
|
-
readonly [x: string]: any;
|
1535
|
-
};
|
1536
|
-
italic: {
|
1537
|
-
readonly [x: string]: any;
|
1538
|
-
};
|
1539
|
-
link: {
|
1540
|
-
href: string;
|
1541
|
-
};
|
1542
|
-
strike: {
|
1543
|
-
readonly [x: string]: any;
|
1544
|
-
};
|
1545
|
-
underline: {
|
1546
|
-
readonly [x: string]: any;
|
1547
|
-
};
|
1548
|
-
}>;
|
1549
|
-
Commands: {
|
1550
|
-
insertText: [{
|
1551
|
-
text: string;
|
1552
|
-
from?: number;
|
1553
|
-
to?: number;
|
1554
|
-
}];
|
1555
|
-
insertNode: [options: InsertNodeOptions];
|
1556
|
-
removeNode: [options: RemoveNodeOptions];
|
1557
|
-
wrap: [WrapOptions];
|
1558
|
-
setBlockType: [options: SetBlockTypeOptions];
|
1559
|
-
setNodeAttrs: [options: SetNodeAttrsOptions];
|
1560
|
-
selectAll: [];
|
1561
|
-
addMark: [options: AddMarkOptions];
|
1562
|
-
removeMark: [options: RemoveMarkOptions];
|
1563
|
-
unsetBlockType: [options?: UnsetBlockTypeOptions | undefined];
|
1564
|
-
unsetMark: [options?: UnsetMarkOptions | undefined];
|
1565
|
-
readonly undo: [];
|
1566
|
-
readonly redo: [];
|
1567
|
-
toggleBold: [];
|
1568
|
-
toggleCode: [];
|
1569
|
-
setHeading: [attrs?: HeadingAttrs | undefined];
|
1570
|
-
insertHeading: [attrs?: HeadingAttrs | undefined];
|
1571
|
-
toggleHeading: [attrs?: HeadingAttrs | undefined];
|
1572
|
-
insertImage: [attrs?: ImageAttrs | undefined];
|
1573
|
-
toggleItalic: [];
|
1574
|
-
addLink: [attrs: LinkAttrs];
|
1575
|
-
removeLink: [];
|
1576
|
-
toggleLink: [attrs: LinkAttrs];
|
1577
|
-
expandLink: [];
|
1578
|
-
dedentList: [options?: DedentListOptions | undefined];
|
1579
|
-
indentList: [options?: IndentListOptions | undefined];
|
1580
|
-
moveList: [direction: "up" | "down"];
|
1581
|
-
splitList: [];
|
1582
|
-
toggleCollapsed: [(ToggleCollapsedOptions | undefined)?];
|
1583
|
-
toggleList: [attrs: ListAttributes];
|
1584
|
-
unwrapList: [options?: UnwrapListOptions | undefined];
|
1585
|
-
wrapInList: [getAttrs: WrapInListGetAttrs<ListAttributes>];
|
1586
|
-
insertList: [attrs?: ListAttributes | undefined];
|
1587
|
-
toggleStrike: [];
|
1588
|
-
insertTable: [{
|
1589
|
-
row: number;
|
1590
|
-
col: number;
|
1591
|
-
header: boolean;
|
1592
|
-
}];
|
1593
|
-
exitTable: [];
|
1594
|
-
toggleUnderline: [];
|
1595
|
-
};
|
1596
|
-
}>>;
|
1431
|
+
editor: TestEditor<Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension, PlainExtension, BaseCommandsExtension, ItalicExtension, BoldExtension, UnderlineExtension, StrikeExtension, CodeExtension, LinkExtension, ImageExtension, Extension<{
|
1432
|
+
Nodes: {
|
1433
|
+
paragraph: Attrs_2;
|
1434
|
+
};
|
1435
|
+
}>, TableExtension]>>;
|
1597
1436
|
m: ToMarkAction<SimplifyDeeper< {
|
1598
1437
|
bold: {
|
1599
1438
|
readonly [x: string]: any;
|
@@ -1630,10 +1469,10 @@ export declare function setupTest(): {
|
|
1630
1469
|
unchecked: (...children: NodeChild[]) => Node_2;
|
1631
1470
|
collapsed: (...children: NodeChild[]) => Node_2;
|
1632
1471
|
expanded: (...children: NodeChild[]) => Node_2;
|
1633
|
-
|
1472
|
+
doc: NodeAction< {
|
1634
1473
|
readonly [x: string]: any;
|
1635
1474
|
}>;
|
1636
|
-
|
1475
|
+
paragraph: NodeAction< {
|
1637
1476
|
readonly [x: string]: any;
|
1638
1477
|
}>;
|
1639
1478
|
text: NodeAction< {
|
@@ -1646,7 +1485,7 @@ export declare function setupTest(): {
|
|
1646
1485
|
level: number;
|
1647
1486
|
}>;
|
1648
1487
|
image: NodeAction< {
|
1649
|
-
src
|
1488
|
+
src?: string | null;
|
1650
1489
|
}>;
|
1651
1490
|
list: NodeAction< {
|
1652
1491
|
kind?: "bullet" | "ordered" | "task" | "toggle";
|
@@ -1661,10 +1500,14 @@ export declare function setupTest(): {
|
|
1661
1500
|
readonly [x: string]: any;
|
1662
1501
|
}>;
|
1663
1502
|
tableCell: NodeAction< {
|
1664
|
-
|
1503
|
+
colspan: number;
|
1504
|
+
rowspan: number;
|
1505
|
+
colwidth: number[] | null;
|
1665
1506
|
}>;
|
1666
1507
|
tableHeaderCell: NodeAction< {
|
1667
|
-
|
1508
|
+
colspan: number;
|
1509
|
+
rowspan: number;
|
1510
|
+
colwidth: number[] | null;
|
1668
1511
|
}>;
|
1669
1512
|
};
|
1670
1513
|
};
|
@@ -1681,10 +1524,127 @@ export declare function setupTestFromExtension<E extends Extension>(extension: E
|
|
1681
1524
|
/**
|
1682
1525
|
* @internal
|
1683
1526
|
*/
|
1684
|
-
export declare type
|
1685
|
-
|
1686
|
-
|
1527
|
+
export declare type StrikeCommandsExtension = Extension<{
|
1528
|
+
Commands: {
|
1529
|
+
toggleStrike: [];
|
1530
|
+
};
|
1531
|
+
}>;
|
1532
|
+
|
1533
|
+
/**
|
1534
|
+
* @internal
|
1535
|
+
*/
|
1536
|
+
export declare type StrikeExtension = Union<[
|
1537
|
+
StrikeSpecExtension,
|
1538
|
+
StrikeCommandsExtension
|
1539
|
+
]>;
|
1540
|
+
|
1541
|
+
/**
|
1542
|
+
* @internal
|
1543
|
+
*/
|
1544
|
+
export declare type StrikeSpecExtension = Extension<{
|
1545
|
+
Marks: {
|
1546
|
+
strike: Attrs;
|
1547
|
+
};
|
1548
|
+
}>;
|
1549
|
+
|
1550
|
+
/**
|
1551
|
+
* @internal
|
1552
|
+
*/
|
1553
|
+
declare type TableCellSpecExtension = Extension<{
|
1554
|
+
Nodes: {
|
1555
|
+
tableCell: CellAttrs;
|
1556
|
+
};
|
1557
|
+
}>;
|
1558
|
+
export { TableCellSpecExtension }
|
1559
|
+
export { TableCellSpecExtension as TableCellSpecExtension_alias_1 }
|
1560
|
+
|
1561
|
+
/**
|
1562
|
+
* @internal
|
1563
|
+
*/
|
1564
|
+
declare type TableCommandsExtension = Extension<{
|
1565
|
+
Commands: {
|
1566
|
+
insertTable: [InsertTableOptions];
|
1567
|
+
exitTable: [];
|
1568
|
+
};
|
1569
|
+
}>;
|
1570
|
+
export { TableCommandsExtension }
|
1571
|
+
export { TableCommandsExtension as TableCommandsExtension_alias_1 }
|
1572
|
+
|
1573
|
+
/**
|
1574
|
+
* @internal
|
1575
|
+
*/
|
1576
|
+
export declare type TableExtension = Union<[
|
1577
|
+
TableSpecExtension,
|
1578
|
+
TableRowSpecExtension,
|
1579
|
+
TableCellSpecExtension,
|
1580
|
+
TableHeaderCellSpecExtension,
|
1581
|
+
TableCommandsExtension
|
1582
|
+
]>;
|
1583
|
+
|
1584
|
+
/**
|
1585
|
+
* @internal
|
1586
|
+
*/
|
1587
|
+
declare type TableHeaderCellSpecExtension = Extension<{
|
1588
|
+
Nodes: {
|
1589
|
+
tableHeaderCell: CellAttrs;
|
1590
|
+
};
|
1591
|
+
}>;
|
1592
|
+
export { TableHeaderCellSpecExtension }
|
1593
|
+
export { TableHeaderCellSpecExtension as TableHeaderCellSpecExtension_alias_1 }
|
1594
|
+
|
1595
|
+
/**
|
1596
|
+
* @internal
|
1597
|
+
*/
|
1598
|
+
declare type TableRowSpecExtension = Extension<{
|
1599
|
+
Nodes: {
|
1600
|
+
tableRow: Attrs;
|
1601
|
+
};
|
1602
|
+
}>;
|
1603
|
+
export { TableRowSpecExtension }
|
1604
|
+
export { TableRowSpecExtension as TableRowSpecExtension_alias_1 }
|
1605
|
+
|
1606
|
+
/**
|
1607
|
+
* @internal
|
1608
|
+
*/
|
1609
|
+
declare type TableSpecExtension = Extension<{
|
1610
|
+
Nodes: {
|
1611
|
+
table: Attrs;
|
1612
|
+
};
|
1613
|
+
}>;
|
1614
|
+
export { TableSpecExtension }
|
1615
|
+
export { TableSpecExtension as TableSpecExtension_alias_1 }
|
1616
|
+
|
1617
|
+
/**
|
1618
|
+
* @internal
|
1619
|
+
*/
|
1620
|
+
export declare type TextAlignAttrsExtension<NodeName extends string> = Extension<{
|
1621
|
+
Nodes: {
|
1622
|
+
[K in NodeName]: {
|
1623
|
+
textAlign: string | null;
|
1624
|
+
};
|
1625
|
+
};
|
1626
|
+
}>;
|
1627
|
+
|
1628
|
+
/**
|
1629
|
+
* @internal
|
1630
|
+
*/
|
1631
|
+
export declare type TextAlignCommandsExtension = Extension<{
|
1632
|
+
Commands: {
|
1633
|
+
setTextAlign: [value: string | null];
|
1634
|
+
};
|
1635
|
+
}>;
|
1636
|
+
|
1637
|
+
/**
|
1638
|
+
* @internal
|
1639
|
+
*/
|
1640
|
+
export declare type TextAlignExtension<NodeName extends string> = Union<[
|
1641
|
+
TextAlignAttrsExtension<NodeName>,
|
1642
|
+
TextAlignCommandsExtension
|
1643
|
+
]>;
|
1687
1644
|
|
1645
|
+
/**
|
1646
|
+
* @public
|
1647
|
+
*/
|
1688
1648
|
export declare interface TextAlignOptions<NodeName extends string = string> {
|
1689
1649
|
/**
|
1690
1650
|
* The names of node to add the attribute to.
|
@@ -1720,7 +1680,7 @@ export declare type TextBlockEnterRuleOptions = {
|
|
1720
1680
|
* Attributes to set on the node. If a function is provided, it will be called
|
1721
1681
|
* with the matched result from the regular expression.
|
1722
1682
|
*/
|
1723
|
-
attrs?:
|
1683
|
+
attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
|
1724
1684
|
/**
|
1725
1685
|
* Whether to stop further handlers from being called if this rule is triggered.
|
1726
1686
|
*
|
@@ -1731,8 +1691,39 @@ export declare type TextBlockEnterRuleOptions = {
|
|
1731
1691
|
|
1732
1692
|
export { ToggleCollapsedOptions }
|
1733
1693
|
|
1694
|
+
/**
|
1695
|
+
* @internal
|
1696
|
+
*/
|
1697
|
+
export declare type UnderlineCommandsExtension = Extension<{
|
1698
|
+
Commands: {
|
1699
|
+
toggleUnderline: [];
|
1700
|
+
};
|
1701
|
+
}>;
|
1702
|
+
|
1703
|
+
/**
|
1704
|
+
* @internal
|
1705
|
+
*/
|
1706
|
+
export declare type UnderlineExtension = Union<[
|
1707
|
+
UnderlineSpecExtension,
|
1708
|
+
UnderlineCommandsExtension
|
1709
|
+
]>;
|
1710
|
+
|
1711
|
+
/**
|
1712
|
+
* @internal
|
1713
|
+
*/
|
1714
|
+
export declare type UnderlineSpecExtension = Extension<{
|
1715
|
+
Marks: {
|
1716
|
+
underline: Attrs;
|
1717
|
+
};
|
1718
|
+
}>;
|
1719
|
+
|
1734
1720
|
export { UnwrapListOptions }
|
1735
1721
|
|
1722
|
+
/**
|
1723
|
+
* @internal
|
1724
|
+
*/
|
1725
|
+
export declare type VirtualSelectionExtension = PlainExtension;
|
1726
|
+
|
1736
1727
|
export { WrapInListGetAttrs }
|
1737
1728
|
|
1738
1729
|
export { }
|