@prosekit/extensions 0.0.0-next-20240724172520 → 0.0.0-next-20240901092634
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 +520 -129
- package/dist/{chunk-GPSAJOJA.js → chunk-GITDYNLT.js} +0 -3
- package/dist/{chunk-LVMTQOWG.js → chunk-LAQZC3ZM.js} +12 -14
- package/dist/{chunk-OJCMRVEY.js → chunk-RE23OQPF.js} +2 -2
- package/dist/loro/style.css +30 -0
- package/dist/prosekit-extensions-autocomplete.js +3 -2
- package/dist/prosekit-extensions-blockquote.js +2 -2
- package/dist/prosekit-extensions-bold.js +3 -3
- package/dist/prosekit-extensions-code-block.d.ts +4 -0
- package/dist/prosekit-extensions-code-block.js +20 -46
- package/dist/prosekit-extensions-code.js +3 -3
- package/dist/prosekit-extensions-commit.js +9 -6
- package/dist/prosekit-extensions-enter-rule.js +1 -1
- package/dist/prosekit-extensions-gap-cursor.d.ts +1 -0
- package/dist/prosekit-extensions-heading.d.ts +1 -1
- package/dist/prosekit-extensions-heading.js +3 -3
- package/dist/prosekit-extensions-image.js +1 -1
- package/dist/prosekit-extensions-input-rule.js +1 -1
- package/dist/prosekit-extensions-italic.js +3 -3
- package/dist/prosekit-extensions-link.js +5 -5
- package/dist/prosekit-extensions-list.js +3 -3
- package/dist/prosekit-extensions-loro.d.ts +11 -0
- package/dist/prosekit-extensions-loro.js +79 -0
- package/dist/prosekit-extensions-mark-rule.js +1 -1
- package/dist/prosekit-extensions-mention.js +1 -1
- package/dist/prosekit-extensions-placeholder.js +0 -1
- package/dist/prosekit-extensions-strike.js +3 -3
- package/dist/prosekit-extensions-table.d.ts +15 -3
- package/dist/prosekit-extensions-table.js +191 -90
- package/dist/prosekit-extensions-text-align.d.ts +3 -1
- package/dist/prosekit-extensions-text-align.js +2 -2
- package/dist/prosekit-extensions-underline.js +2 -2
- package/dist/prosekit-extensions-yjs.d.ts +14 -0
- package/dist/prosekit-extensions-yjs.js +143 -0
- package/dist/shiki-highlighter-chunk-C5VVQ2TD.js +50 -0
- package/dist/table/style.css +6 -1
- package/dist/yjs/style.css +31 -0
- package/package.json +58 -10
- package/dist/shiki-import-UFUFVKJ2.js +0 -5
@@ -1,14 +1,18 @@
|
|
1
1
|
import { Attrs } from '@prosekit/pm/model';
|
2
2
|
import { Attrs as Attrs_2 } from 'prosemirror-model';
|
3
|
+
import type { Awareness } from 'y-protocols/awareness';
|
3
4
|
import { BaseCommandsExtension } from '@prosekit/core';
|
4
|
-
import {
|
5
|
+
import type { BundledHighlighterOptions } from 'shiki';
|
5
6
|
import { BundledLanguage } from 'shiki';
|
6
7
|
import { BundledLanguageInfo } from 'shiki';
|
7
8
|
import { bundledLanguagesInfo } from 'shiki';
|
8
9
|
import { BundledTheme } from 'shiki';
|
9
10
|
import { BundledThemeInfo } from 'shiki';
|
10
11
|
import { bundledThemesInfo } from 'shiki';
|
12
|
+
import { CellSelection } from 'prosemirror-tables';
|
11
13
|
import { Command } from '@prosekit/pm/state';
|
14
|
+
import { CursorAwareness } from 'loro-prosemirror';
|
15
|
+
import type { DecorationAttrs } from '@prosekit/pm/view';
|
12
16
|
import { DedentListOptions } from 'prosemirror-flat-list';
|
13
17
|
import { config as default_alias_1 } from '@prosekit/dev/config-vitest';
|
14
18
|
import { DocExtension } from '@prosekit/core';
|
@@ -17,27 +21,33 @@ import { Extension } from '@prosekit/core';
|
|
17
21
|
import { ExtensionTyping } from '@prosekit/core';
|
18
22
|
import { ExtractMarkActions } from '@prosekit/core';
|
19
23
|
import { ExtractNodeActions } from '@prosekit/core';
|
24
|
+
import { FindParentNodeResult } from '@prosekit/core';
|
20
25
|
import { GapCursor } from 'prosemirror-gapcursor';
|
21
|
-
import { getSingletonHighlighter } from 'shiki/bundle/full';
|
22
26
|
import type { Highlighter } from 'shiki';
|
23
27
|
import { HistoryExtension } from '@prosekit/core';
|
24
28
|
import { IndentListOptions } from 'prosemirror-flat-list';
|
25
29
|
import { InputRule } from '@prosekit/pm/inputrules';
|
26
30
|
import type { IsEqual } from 'type-fest';
|
27
|
-
import
|
31
|
+
import { ListAttributes } from 'prosemirror-flat-list';
|
28
32
|
import { ListDOMSerializer } from 'prosemirror-flat-list';
|
33
|
+
import type { LoroDocType } from 'loro-prosemirror';
|
34
|
+
import { LoroSyncPluginProps } from 'loro-prosemirror';
|
35
|
+
import { LoroUndoPluginProps } from 'loro-prosemirror';
|
29
36
|
import { MarkType } from '@prosekit/pm/model';
|
30
37
|
import { Node as Node_2 } from 'prosemirror-model';
|
31
38
|
import { NodeAction } from '@prosekit/core';
|
32
39
|
import { NodeChild } from '@prosekit/core';
|
33
40
|
import { NodeJSON } from '@prosekit/core';
|
34
|
-
import { NodeType } from '@prosekit/pm/model';
|
41
|
+
import type { NodeType } from '@prosekit/pm/model';
|
35
42
|
import { Options } from 'tsup';
|
36
43
|
import { Parser } from 'prosemirror-highlight';
|
44
|
+
import type { PeerID } from 'loro-crdt';
|
45
|
+
import { PlainExtension } from '@prosekit/core';
|
37
46
|
import { Plugin as Plugin_2 } from '@prosekit/pm/state';
|
38
|
-
import { PluginExtension } from '@prosekit/core';
|
39
47
|
import { PluginKey } from '@prosekit/pm/state';
|
40
48
|
import { ProseMirrorNode } from '@prosekit/pm/model';
|
49
|
+
import type { ResolvedPos } from '@prosekit/pm/model';
|
50
|
+
import type { Selection as Selection_2 } from '@prosekit/pm/state';
|
41
51
|
import { SimplifyDeeper } from '@prosekit/core';
|
42
52
|
import type { SpecialLanguage } from 'shiki';
|
43
53
|
import { StepJSON } from '@prosekit/core';
|
@@ -49,6 +59,10 @@ import { Transaction } from '@prosekit/pm/state';
|
|
49
59
|
import { Union } from '@prosekit/core';
|
50
60
|
import { UnwrapListOptions } from 'prosemirror-flat-list';
|
51
61
|
import { WrapInListGetAttrs } from 'prosemirror-flat-list';
|
62
|
+
import type * as Y from 'yjs';
|
63
|
+
import { yCursorPlugin } from 'y-prosemirror';
|
64
|
+
import { ySyncPlugin } from 'y-prosemirror';
|
65
|
+
import { yUndoPlugin } from 'y-prosemirror';
|
52
66
|
|
53
67
|
export declare function applyMarkRules(rules: MarkRuleOptions[], transactions: readonly Transaction[], oldState: EditorState, newState: EditorState): Transaction | null;
|
54
68
|
|
@@ -146,36 +160,76 @@ export declare interface CellAttrs {
|
|
146
160
|
* @public
|
147
161
|
*/
|
148
162
|
declare interface CodeBlockAttrs {
|
149
|
-
language
|
163
|
+
language: string;
|
150
164
|
}
|
151
165
|
export { CodeBlockAttrs }
|
152
166
|
export { CodeBlockAttrs as CodeBlockAttrs_alias_1 }
|
153
167
|
|
168
|
+
/**
|
169
|
+
* @internal
|
170
|
+
*/
|
171
|
+
declare type CodeBlockCommandsExtension = Extension<{
|
172
|
+
Commands: {
|
173
|
+
setCodeBlock: [attrs?: CodeBlockAttrs];
|
174
|
+
insertCodeBlock: [attrs?: CodeBlockAttrs];
|
175
|
+
toggleCodeBlock: [attrs?: CodeBlockAttrs];
|
176
|
+
setCodeBlockAttrs: [attrs: CodeBlockAttrs];
|
177
|
+
};
|
178
|
+
}>;
|
179
|
+
export { CodeBlockCommandsExtension }
|
180
|
+
export { CodeBlockCommandsExtension as CodeBlockCommandsExtension_alias_1 }
|
181
|
+
|
182
|
+
/**
|
183
|
+
* @internal
|
184
|
+
*/
|
185
|
+
declare type CodeBlockExtension = Union<[
|
186
|
+
CodeBlockSpecExtension,
|
187
|
+
CodeBlockCommandsExtension
|
188
|
+
]>;
|
189
|
+
export { CodeBlockExtension }
|
190
|
+
export { CodeBlockExtension as CodeBlockExtension_alias_1 }
|
191
|
+
|
154
192
|
/**
|
155
193
|
* @public
|
156
194
|
*/
|
157
|
-
|
195
|
+
declare type CodeBlockHighlightOptions = {
|
196
|
+
parser: HighlightParser;
|
197
|
+
};
|
198
|
+
export { CodeBlockHighlightOptions }
|
199
|
+
export { CodeBlockHighlightOptions as CodeBlockHighlightOptions_alias_1 }
|
200
|
+
|
201
|
+
/**
|
202
|
+
* The options to configure the Shiki highlighter.
|
203
|
+
*
|
204
|
+
* @public
|
205
|
+
*/
|
206
|
+
export declare interface CodeBlockShikiOptions extends Omit<ShikiHighlighterOptions, 'themes' | 'langs'> {
|
158
207
|
/**
|
159
|
-
* A list of
|
208
|
+
* A list of Shiki themes to pre-load. The first theme in the list will be
|
160
209
|
* used to render the code block.
|
161
210
|
*
|
162
211
|
* @default ['one-dark-pro']
|
163
212
|
*/
|
164
213
|
themes?: BundledTheme[];
|
165
214
|
/**
|
166
|
-
* A list of
|
215
|
+
* A list of Shiki languages to pre-load.
|
167
216
|
*
|
168
217
|
* @default ['text']
|
169
218
|
*/
|
170
219
|
langs?: (BundledLanguage | SpecialLanguage)[];
|
171
|
-
/**
|
172
|
-
* Alias of languages
|
173
|
-
*
|
174
|
-
* @example { 'my-lang': 'javascript' }
|
175
|
-
*/
|
176
|
-
langAlias?: Record<string, BundledLanguage>;
|
177
220
|
}
|
178
221
|
|
222
|
+
/**
|
223
|
+
* @internal
|
224
|
+
*/
|
225
|
+
declare type CodeBlockSpecExtension = Extension<{
|
226
|
+
Nodes: {
|
227
|
+
codeBlock: CodeBlockAttrs;
|
228
|
+
};
|
229
|
+
}>;
|
230
|
+
export { CodeBlockSpecExtension }
|
231
|
+
export { CodeBlockSpecExtension as CodeBlockSpecExtension_alias_1 }
|
232
|
+
|
179
233
|
/**
|
180
234
|
* @internal
|
181
235
|
*/
|
@@ -251,6 +305,10 @@ export declare function createLazyParser(highlighterOptions: HighlighterOptions)
|
|
251
305
|
*/
|
252
306
|
export declare function createMarkInputRule({ regex, type, attrs, }: MarkInputRuleOptions): InputRule;
|
253
307
|
|
308
|
+
export declare function createOrGetHighlighter(options: HighlighterOptions): HighlighterResult;
|
309
|
+
|
310
|
+
export declare function createOrGetHighlighter_alias_1(options: HighlighterOptions): HighlighterResult;
|
311
|
+
|
254
312
|
export { DedentListOptions }
|
255
313
|
|
256
314
|
export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
@@ -272,13 +330,9 @@ export declare function defineBlockquote(): BlockquoteExtension;
|
|
272
330
|
* Wraps the text block in a blockquote when `>` is typed at the start of a new
|
273
331
|
* line followed by a space.
|
274
332
|
*/
|
275
|
-
export declare function defineBlockquoteInputRule():
|
333
|
+
export declare function defineBlockquoteInputRule(): PlainExtension;
|
276
334
|
|
277
|
-
export declare function defineBlockquoteSpec():
|
278
|
-
Nodes: {
|
279
|
-
blockquote: Attrs;
|
280
|
-
};
|
281
|
-
}>;
|
335
|
+
export declare function defineBlockquoteSpec(): BlockquoteSpecExtension;
|
282
336
|
|
283
337
|
/**
|
284
338
|
* @public
|
@@ -293,12 +347,12 @@ export declare function defineBoldCommands(): BoldCommandsExtension;
|
|
293
347
|
/**
|
294
348
|
* @internal
|
295
349
|
*/
|
296
|
-
export declare function defineBoldInputRule():
|
350
|
+
export declare function defineBoldInputRule(): PlainExtension;
|
297
351
|
|
298
352
|
/**
|
299
353
|
* @internal
|
300
354
|
*/
|
301
|
-
export declare function defineBoldKeymap():
|
355
|
+
export declare function defineBoldKeymap(): PlainExtension;
|
302
356
|
|
303
357
|
/**
|
304
358
|
* @internal
|
@@ -321,20 +375,7 @@ export declare function defineCode(): CodeExtension;
|
|
321
375
|
*
|
322
376
|
* @public
|
323
377
|
*/
|
324
|
-
declare function defineCodeBlock():
|
325
|
-
Nodes: {
|
326
|
-
codeBlock: {
|
327
|
-
language: string;
|
328
|
-
};
|
329
|
-
};
|
330
|
-
}>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>, Extension< {
|
331
|
-
Commands: {
|
332
|
-
setCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
333
|
-
insertCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
334
|
-
toggleCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
335
|
-
setCodeBlockAttrs: [attrs: CodeBlockAttrs];
|
336
|
-
};
|
337
|
-
}>]>;
|
378
|
+
declare function defineCodeBlock(): CodeBlockExtension;
|
338
379
|
export { defineCodeBlock }
|
339
380
|
export { defineCodeBlock as defineCodeBlock_alias_1 }
|
340
381
|
|
@@ -343,14 +384,7 @@ export { defineCodeBlock as defineCodeBlock_alias_1 }
|
|
343
384
|
*
|
344
385
|
* @public
|
345
386
|
*/
|
346
|
-
declare function defineCodeBlockCommands():
|
347
|
-
Commands: {
|
348
|
-
setCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
349
|
-
insertCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
350
|
-
toggleCodeBlock: [attrs?: CodeBlockAttrs | undefined];
|
351
|
-
setCodeBlockAttrs: [attrs: CodeBlockAttrs];
|
352
|
-
};
|
353
|
-
}>;
|
387
|
+
declare function defineCodeBlockCommands(): CodeBlockCommandsExtension;
|
354
388
|
export { defineCodeBlockCommands }
|
355
389
|
export { defineCodeBlockCommands as defineCodeBlockCommands_alias_1 }
|
356
390
|
|
@@ -359,7 +393,7 @@ export { defineCodeBlockCommands as defineCodeBlockCommands_alias_1 }
|
|
359
393
|
*
|
360
394
|
* @public
|
361
395
|
*/
|
362
|
-
declare function defineCodeBlockEnterRule():
|
396
|
+
declare function defineCodeBlockEnterRule(): PlainExtension;
|
363
397
|
export { defineCodeBlockEnterRule }
|
364
398
|
export { defineCodeBlockEnterRule as defineCodeBlockEnterRule_alias_1 }
|
365
399
|
|
@@ -369,11 +403,11 @@ export { defineCodeBlockEnterRule as defineCodeBlockEnterRule_alias_1 }
|
|
369
403
|
* [documentation](https://github.com/ocavue/prosemirror-highlight) for more
|
370
404
|
* information.
|
371
405
|
*
|
406
|
+
* @param options
|
407
|
+
*
|
372
408
|
* @public
|
373
409
|
*/
|
374
|
-
declare function defineCodeBlockHighlight({ parser, }:
|
375
|
-
parser: HighlightParser;
|
376
|
-
}): Extension;
|
410
|
+
declare function defineCodeBlockHighlight({ parser, }: CodeBlockHighlightOptions): Extension;
|
377
411
|
export { defineCodeBlockHighlight }
|
378
412
|
export { defineCodeBlockHighlight as defineCodeBlockHighlight_alias_1 }
|
379
413
|
|
@@ -382,21 +416,23 @@ export { defineCodeBlockHighlight as defineCodeBlockHighlight_alias_1 }
|
|
382
416
|
*
|
383
417
|
* @public
|
384
418
|
*/
|
385
|
-
declare function defineCodeBlockInputRule():
|
419
|
+
declare function defineCodeBlockInputRule(): PlainExtension;
|
386
420
|
export { defineCodeBlockInputRule }
|
387
421
|
export { defineCodeBlockInputRule as defineCodeBlockInputRule_alias_1 }
|
388
422
|
|
389
423
|
/**
|
390
424
|
* Defines the keymap for code blocks.
|
391
425
|
*/
|
392
|
-
export declare function defineCodeBlockKeymap():
|
426
|
+
export declare function defineCodeBlockKeymap(): PlainExtension;
|
393
427
|
|
394
428
|
/**
|
395
|
-
* Adds syntax highlighting to code blocks using the [
|
429
|
+
* Adds syntax highlighting to code blocks using the [Shiki](https://github.com/shikijs/shiki) package.
|
430
|
+
*
|
431
|
+
* @param options - The options to configure the Shiki highlighter.
|
396
432
|
*
|
397
433
|
* @public
|
398
434
|
*/
|
399
|
-
declare function defineCodeBlockShiki({ themes, langs,
|
435
|
+
declare function defineCodeBlockShiki({ themes, langs, ...rest }?: CodeBlockShikiOptions): Extension;
|
400
436
|
export { defineCodeBlockShiki }
|
401
437
|
export { defineCodeBlockShiki as defineCodeBlockShiki_alias_1 }
|
402
438
|
|
@@ -405,13 +441,7 @@ export { defineCodeBlockShiki as defineCodeBlockShiki_alias_1 }
|
|
405
441
|
*
|
406
442
|
* @public
|
407
443
|
*/
|
408
|
-
declare function defineCodeBlockSpec():
|
409
|
-
Nodes: {
|
410
|
-
codeBlock: {
|
411
|
-
language: string;
|
412
|
-
};
|
413
|
-
};
|
414
|
-
}>;
|
444
|
+
declare function defineCodeBlockSpec(): CodeBlockSpecExtension;
|
415
445
|
export { defineCodeBlockSpec }
|
416
446
|
export { defineCodeBlockSpec as defineCodeBlockSpec_alias_1 }
|
417
447
|
|
@@ -423,12 +453,12 @@ export declare function defineCodeCommands(): CodeCommandsExtension;
|
|
423
453
|
/**
|
424
454
|
* @internal
|
425
455
|
*/
|
426
|
-
export declare function defineCodeInputRule():
|
456
|
+
export declare function defineCodeInputRule(): PlainExtension;
|
427
457
|
|
428
458
|
/**
|
429
459
|
* @internal
|
430
460
|
*/
|
431
|
-
export declare function defineCodeKeymap():
|
461
|
+
export declare function defineCodeKeymap(): PlainExtension;
|
432
462
|
|
433
463
|
/**
|
434
464
|
* @internal
|
@@ -438,12 +468,12 @@ export declare function defineCodeSpec(): CodeSpecExtension;
|
|
438
468
|
/**
|
439
469
|
* Define an extension that can record the changes in the editor.
|
440
470
|
*/
|
441
|
-
export declare function defineCommitRecorder(commitRecorder: CommitRecorder):
|
471
|
+
export declare function defineCommitRecorder(commitRecorder: CommitRecorder): PlainExtension;
|
442
472
|
|
443
473
|
/**
|
444
474
|
* Define an extension to display the changes from the given commit in the editor.
|
445
475
|
*/
|
446
|
-
export declare function defineCommitViewer(commit: Commit):
|
476
|
+
export declare function defineCommitViewer(commit: Commit): PlainExtension;
|
447
477
|
|
448
478
|
/**
|
449
479
|
* Show up a decoration at the drop position when something is dragged over the editor.
|
@@ -459,9 +489,11 @@ export declare function defineDropCursor(options?: DropCursorOptions): DropCurso
|
|
459
489
|
* the cursor matches `regex` and user presses Enter. The `regex` should end
|
460
490
|
* with `$`.
|
461
491
|
*
|
492
|
+
* @param options
|
493
|
+
*
|
462
494
|
* @public
|
463
495
|
*/
|
464
|
-
export declare function defineEnterRule({ regex, handler, stop, }: EnterRuleOptions):
|
496
|
+
export declare function defineEnterRule({ regex, handler, stop, }: EnterRuleOptions): PlainExtension;
|
465
497
|
|
466
498
|
/**
|
467
499
|
* Capture clicks near and arrow-key-motion past places that don't have a
|
@@ -477,7 +509,7 @@ export declare function defineEnterRule({ regex, handler, stop, }: EnterRuleOpti
|
|
477
509
|
*
|
478
510
|
* @public
|
479
511
|
*/
|
480
|
-
export declare function defineGapCursor():
|
512
|
+
export declare function defineGapCursor(): GapCursorExtension;
|
481
513
|
|
482
514
|
/**
|
483
515
|
* @public
|
@@ -497,14 +529,14 @@ export { defineHeadingCommands as defineHeadingCommands_alias_1 }
|
|
497
529
|
*
|
498
530
|
* @internal
|
499
531
|
*/
|
500
|
-
declare function defineHeadingInputRule():
|
532
|
+
declare function defineHeadingInputRule(): PlainExtension;
|
501
533
|
export { defineHeadingInputRule }
|
502
534
|
export { defineHeadingInputRule as defineHeadingInputRule_alias_1 }
|
503
535
|
|
504
536
|
/**
|
505
537
|
* @internal
|
506
538
|
*/
|
507
|
-
declare function defineHeadingKeymap():
|
539
|
+
declare function defineHeadingKeymap(): PlainExtension;
|
508
540
|
export { defineHeadingKeymap }
|
509
541
|
export { defineHeadingKeymap as defineHeadingKeymap_alias_1 }
|
510
542
|
|
@@ -537,7 +569,7 @@ export declare function defineImageSpec(): ImageSpecExtension;
|
|
537
569
|
*
|
538
570
|
* @public
|
539
571
|
*/
|
540
|
-
export declare function defineInputRule(rule: InputRule):
|
572
|
+
export declare function defineInputRule(rule: InputRule): PlainExtension;
|
541
573
|
|
542
574
|
/**
|
543
575
|
* @public
|
@@ -552,12 +584,12 @@ export declare function defineItalicCommands(): ItalicCommandsExtension;
|
|
552
584
|
/**
|
553
585
|
* @internal
|
554
586
|
*/
|
555
|
-
export declare function defineItalicInputRule():
|
587
|
+
export declare function defineItalicInputRule(): PlainExtension;
|
556
588
|
|
557
589
|
/**
|
558
590
|
* @internal
|
559
591
|
*/
|
560
|
-
export declare function defineItalicKeymap():
|
592
|
+
export declare function defineItalicKeymap(): PlainExtension;
|
561
593
|
|
562
594
|
/**
|
563
595
|
* @internal
|
@@ -576,14 +608,14 @@ export declare function defineLinkCommands(): LinkCommandsExtension;
|
|
576
608
|
*
|
577
609
|
* @internal
|
578
610
|
*/
|
579
|
-
export declare function defineLinkEnterRule():
|
611
|
+
export declare function defineLinkEnterRule(): PlainExtension;
|
580
612
|
|
581
613
|
/**
|
582
614
|
* Apply link marks after pressing Space.
|
583
615
|
*
|
584
616
|
* @internal
|
585
617
|
*/
|
586
|
-
export declare function defineLinkInputRule():
|
618
|
+
export declare function defineLinkInputRule(): PlainExtension;
|
587
619
|
|
588
620
|
/**
|
589
621
|
* Apply and remove link marks to the text during typing.
|
@@ -623,14 +655,14 @@ export { defineListInputRules as defineListInputRules_alias_1 }
|
|
623
655
|
*
|
624
656
|
* @internal
|
625
657
|
*/
|
626
|
-
declare function defineListKeymap():
|
658
|
+
declare function defineListKeymap(): PlainExtension;
|
627
659
|
export { defineListKeymap }
|
628
660
|
export { defineListKeymap as defineListKeymap_alias_1 }
|
629
661
|
|
630
662
|
/**
|
631
663
|
* @internal
|
632
664
|
*/
|
633
|
-
declare function defineListPlugins():
|
665
|
+
declare function defineListPlugins(): PlainExtension;
|
634
666
|
export { defineListPlugins }
|
635
667
|
export { defineListPlugins as defineListPlugins_alias_1 }
|
636
668
|
|
@@ -641,13 +673,38 @@ declare function defineListSpec(): ListSpecExtension;
|
|
641
673
|
export { defineListSpec }
|
642
674
|
export { defineListSpec as defineListSpec_alias_1 }
|
643
675
|
|
676
|
+
/**
|
677
|
+
* @public
|
678
|
+
*/
|
679
|
+
export declare function defineLoro(options: LoroOptions): LoroExtension;
|
680
|
+
|
681
|
+
declare function defineLoroCommands(): LoroCommandsExtension;
|
682
|
+
export { defineLoroCommands }
|
683
|
+
export { defineLoroCommands as defineLoroCommands_alias_1 }
|
684
|
+
|
685
|
+
declare function defineLoroCursorPlugin(options: LoroCursorOptions): PlainExtension;
|
686
|
+
export { defineLoroCursorPlugin }
|
687
|
+
export { defineLoroCursorPlugin as defineLoroCursorPlugin_alias_1 }
|
688
|
+
|
689
|
+
declare function defineLoroKeymap(): PlainExtension;
|
690
|
+
export { defineLoroKeymap }
|
691
|
+
export { defineLoroKeymap as defineLoroKeymap_alias_1 }
|
692
|
+
|
693
|
+
declare function defineLoroSyncPlugin(options: LoroSyncPluginProps): PlainExtension;
|
694
|
+
export { defineLoroSyncPlugin }
|
695
|
+
export { defineLoroSyncPlugin as defineLoroSyncPlugin_alias_1 }
|
696
|
+
|
697
|
+
declare function defineLoroUndoPlugin(options: LoroUndoPluginProps): PlainExtension;
|
698
|
+
export { defineLoroUndoPlugin }
|
699
|
+
export { defineLoroUndoPlugin as defineLoroUndoPlugin_alias_1 }
|
700
|
+
|
644
701
|
/**
|
645
702
|
* Defines an input rule for automatically adding inline marks when a given
|
646
703
|
* pattern is typed.
|
647
704
|
*
|
648
705
|
* @public
|
649
706
|
*/
|
650
|
-
export declare function defineMarkInputRule(options: MarkInputRuleOptions):
|
707
|
+
export declare function defineMarkInputRule(options: MarkInputRuleOptions): PlainExtension;
|
651
708
|
|
652
709
|
/**
|
653
710
|
* A mark rule is something that can automatically apply marks to text if it
|
@@ -697,12 +754,12 @@ export declare function defineModClickPrevention(): ModClickPreventionExtension;
|
|
697
754
|
* Add a placeholder text to the editor when the current block or document is
|
698
755
|
* empty.
|
699
756
|
*/
|
700
|
-
export declare function definePlaceholder(options: PlaceholderOptions):
|
757
|
+
export declare function definePlaceholder(options: PlaceholderOptions): PlainExtension;
|
701
758
|
|
702
759
|
/**
|
703
760
|
* Make the editor read-only.
|
704
761
|
*/
|
705
|
-
export declare function defineReadonly():
|
762
|
+
export declare function defineReadonly(): PlainExtension;
|
706
763
|
|
707
764
|
/**
|
708
765
|
* Defines commands for search and replace.
|
@@ -727,7 +784,7 @@ replaceAll: [];
|
|
727
784
|
*
|
728
785
|
* @public
|
729
786
|
*/
|
730
|
-
export declare function defineSearchQuery(options: SearchQueryOptions):
|
787
|
+
export declare function defineSearchQuery(options: SearchQueryOptions): PlainExtension;
|
731
788
|
|
732
789
|
/**
|
733
790
|
* @public
|
@@ -742,26 +799,24 @@ export declare function defineStrikeCommands(): StrikeCommandsExtension;
|
|
742
799
|
/**
|
743
800
|
* @internal
|
744
801
|
*/
|
745
|
-
export declare function defineStrikeInputRule():
|
802
|
+
export declare function defineStrikeInputRule(): PlainExtension;
|
746
803
|
|
747
804
|
/**
|
748
805
|
* @internal
|
749
806
|
*/
|
750
|
-
export declare function defineStrikeKeymap():
|
807
|
+
export declare function defineStrikeKeymap(): PlainExtension;
|
751
808
|
|
752
809
|
/**
|
753
810
|
* @internal
|
754
811
|
*/
|
755
|
-
export declare function defineStrikeSpec():
|
756
|
-
Marks: {
|
757
|
-
strike: Attrs;
|
758
|
-
};
|
759
|
-
}>;
|
812
|
+
export declare function defineStrikeSpec(): StrikeSpecExtension;
|
760
813
|
|
761
814
|
/**
|
762
815
|
* @public
|
763
816
|
*/
|
764
|
-
|
817
|
+
declare function defineTable(): TableExtension;
|
818
|
+
export { defineTable }
|
819
|
+
export { defineTable as defineTable_alias_1 }
|
765
820
|
|
766
821
|
/**
|
767
822
|
* @internal
|
@@ -786,7 +841,7 @@ export { defineTableHeaderCellSpec as defineTableHeaderCellSpec_alias_1 }
|
|
786
841
|
/**
|
787
842
|
* @public
|
788
843
|
*/
|
789
|
-
declare function defineTablePlugins():
|
844
|
+
declare function defineTablePlugins(): PlainExtension;
|
790
845
|
export { defineTablePlugins }
|
791
846
|
export { defineTablePlugins as defineTablePlugins_alias_1 }
|
792
847
|
|
@@ -807,7 +862,7 @@ export { defineTableSpec as defineTableSpec_alias_1 }
|
|
807
862
|
/**
|
808
863
|
* @internal
|
809
864
|
*/
|
810
|
-
export declare function defineTestExtension(): Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension,
|
865
|
+
export declare function defineTestExtension(): Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension, PlainExtension, BaseCommandsExtension, ItalicExtension, BoldExtension, UnderlineExtension, StrikeExtension, CodeExtension, LinkExtension, ImageExtension, Extension<{
|
811
866
|
Nodes: {
|
812
867
|
paragraph: Attrs_2;
|
813
868
|
};
|
@@ -819,35 +874,28 @@ paragraph: Attrs_2;
|
|
819
874
|
*
|
820
875
|
* @public
|
821
876
|
*/
|
822
|
-
export declare function defineTextAlign<NodeName extends string = string>(options: TextAlignOptions<NodeName>):
|
823
|
-
Nodes: {
|
824
|
-
[K in NodeName]: {
|
825
|
-
textAlign: string | null;
|
826
|
-
};
|
827
|
-
};
|
828
|
-
Commands: TextAlignCommandTyping;
|
829
|
-
}>;
|
877
|
+
export declare function defineTextAlign<NodeName extends string = string>(options: TextAlignOptions<NodeName>): TextAlignExtension<NodeName>;
|
830
878
|
|
831
879
|
/**
|
832
880
|
* @internal
|
833
881
|
*/
|
834
|
-
export declare function defineTextAlignCommands(types: string[]):
|
835
|
-
Commands: TextAlignCommandTyping;
|
836
|
-
}>;
|
882
|
+
export declare function defineTextAlignCommands(types: string[]): TextAlignCommandsExtension;
|
837
883
|
|
838
884
|
/**
|
839
885
|
* @internal
|
840
886
|
*/
|
841
|
-
export declare function defineTextAlignKeymap(types: string[]):
|
887
|
+
export declare function defineTextAlignKeymap(types: string[]): PlainExtension;
|
842
888
|
|
843
889
|
/**
|
844
890
|
* Defines an enter rule that replaces the matched text with a block node.
|
845
891
|
*
|
846
892
|
* See also {@link defineEnterRule}.
|
847
893
|
*
|
894
|
+
* @param options
|
895
|
+
*
|
848
896
|
* @public
|
849
897
|
*/
|
850
|
-
export declare function defineTextBlockEnterRule({ regex, type, attrs, stop, }: TextBlockEnterRuleOptions):
|
898
|
+
export declare function defineTextBlockEnterRule({ regex, type, attrs, stop, }: TextBlockEnterRuleOptions): PlainExtension;
|
851
899
|
|
852
900
|
/**
|
853
901
|
* Defines an input rule that changes the type of a textblock when the matched
|
@@ -855,6 +903,8 @@ export declare function defineTextBlockEnterRule({ regex, type, attrs, stop, }:
|
|
855
903
|
*
|
856
904
|
* See also [textblockTypeInputRule](https://prosemirror.net/docs/ref/#inputrules.textblockTypeInputRule)
|
857
905
|
*
|
906
|
+
* @param options
|
907
|
+
*
|
858
908
|
* @public
|
859
909
|
*/
|
860
910
|
export declare function defineTextBlockInputRule({ regex, type, attrs, }: {
|
@@ -872,7 +922,7 @@ export declare function defineTextBlockInputRule({ regex, type, attrs, }: {
|
|
872
922
|
* Attributes to set on the node.
|
873
923
|
*/
|
874
924
|
attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
|
875
|
-
}):
|
925
|
+
}): PlainExtension;
|
876
926
|
|
877
927
|
/**
|
878
928
|
* @public
|
@@ -887,7 +937,7 @@ export declare function defineUnderlineCommands(): UnderlineCommandsExtension;
|
|
887
937
|
/**
|
888
938
|
* @internal
|
889
939
|
*/
|
890
|
-
export declare function defineUnderlineKeymap():
|
940
|
+
export declare function defineUnderlineKeymap(): PlainExtension;
|
891
941
|
|
892
942
|
/**
|
893
943
|
* @internal
|
@@ -912,6 +962,8 @@ export declare function defineVirtualSelection(): VirtualSelectionExtension;
|
|
912
962
|
*
|
913
963
|
* See also [wrappingInputRule](https://prosemirror.net/docs/ref/#inputrules.wrappingInputRule)
|
914
964
|
*
|
965
|
+
* @param options
|
966
|
+
*
|
915
967
|
* @public
|
916
968
|
*/
|
917
969
|
export declare function defineWrappingInputRule({ regex, type, attrs, join, }: {
|
@@ -938,12 +990,37 @@ export declare function defineWrappingInputRule({ regex, type, attrs, join, }: {
|
|
938
990
|
* indicate whether a join should happen.
|
939
991
|
*/
|
940
992
|
join?: (match: RegExpMatchArray, node: ProseMirrorNode) => boolean;
|
941
|
-
}):
|
993
|
+
}): PlainExtension;
|
994
|
+
|
995
|
+
/**
|
996
|
+
* @public
|
997
|
+
*/
|
998
|
+
export declare function defineYjs(options: YjsOptions): YjsExtension;
|
999
|
+
|
1000
|
+
declare function defineYjsCommands(): YjsCommandsExtension;
|
1001
|
+
export { defineYjsCommands }
|
1002
|
+
export { defineYjsCommands as defineYjsCommands_alias_1 }
|
1003
|
+
|
1004
|
+
declare function defineYjsCursorPlugin(options: YjsCursorOptions): PlainExtension;
|
1005
|
+
export { defineYjsCursorPlugin }
|
1006
|
+
export { defineYjsCursorPlugin as defineYjsCursorPlugin_alias_1 }
|
1007
|
+
|
1008
|
+
declare function defineYjsKeymap(): PlainExtension;
|
1009
|
+
export { defineYjsKeymap }
|
1010
|
+
export { defineYjsKeymap as defineYjsKeymap_alias_1 }
|
1011
|
+
|
1012
|
+
declare function defineYjsSyncPlugin(options: YjsSyncOptions): PlainExtension;
|
1013
|
+
export { defineYjsSyncPlugin }
|
1014
|
+
export { defineYjsSyncPlugin as defineYjsSyncPlugin_alias_1 }
|
1015
|
+
|
1016
|
+
declare function defineYjsUndoPlugin(options: YjsUndoOptions): PlainExtension;
|
1017
|
+
export { defineYjsUndoPlugin }
|
1018
|
+
export { defineYjsUndoPlugin as defineYjsUndoPlugin_alias_1 }
|
942
1019
|
|
943
1020
|
/**
|
944
1021
|
* @internal
|
945
1022
|
*/
|
946
|
-
export declare type DropCursorExtension =
|
1023
|
+
export declare type DropCursorExtension = PlainExtension;
|
947
1024
|
|
948
1025
|
export declare interface DropCursorOptions {
|
949
1026
|
/**
|
@@ -1014,16 +1091,39 @@ export declare type EnterRuleOptions = {
|
|
1014
1091
|
*
|
1015
1092
|
* @public
|
1016
1093
|
*/
|
1017
|
-
|
1094
|
+
declare const exitTable: Command;
|
1095
|
+
export { exitTable }
|
1096
|
+
export { exitTable as exitTable_alias_1 }
|
1097
|
+
|
1098
|
+
/**
|
1099
|
+
* Try to find a resolved pos of a cell by using the given pos as a hit point.
|
1100
|
+
*
|
1101
|
+
* @internal
|
1102
|
+
*/
|
1103
|
+
export declare function findCellPos(doc: ProseMirrorNode, pos: number): ResolvedPos | undefined;
|
1104
|
+
|
1105
|
+
/**
|
1106
|
+
* Try to find the anchor and head cell in the same table by using the given
|
1107
|
+
* anchor and head as hit points, or fallback to the selection's anchor and
|
1108
|
+
* head.
|
1109
|
+
*
|
1110
|
+
* @internal
|
1111
|
+
*/
|
1112
|
+
export declare function findCellRange(selection: Selection_2, anchorHit?: number, headHit?: number): [ResolvedPos, ResolvedPos] | undefined;
|
1113
|
+
|
1114
|
+
export declare function findTable($pos: ResolvedPos): FindParentNodeResult | undefined;
|
1018
1115
|
|
1019
1116
|
export { GapCursor }
|
1020
1117
|
|
1118
|
+
/**
|
1119
|
+
* @internal
|
1120
|
+
*/
|
1121
|
+
export declare type GapCursorExtension = PlainExtension;
|
1122
|
+
|
1021
1123
|
export declare function getCheckRanges(transactions: readonly Transaction[], oldState: EditorState, newState: EditorState): Array<[number, number]>;
|
1022
1124
|
|
1023
1125
|
export declare function getPluginState(state: EditorState): PredictionPluginState | undefined;
|
1024
1126
|
|
1025
|
-
export { getSingletonHighlighter }
|
1026
|
-
|
1027
1127
|
export declare function getTrMeta(tr: Transaction): PredictionPluginState;
|
1028
1128
|
|
1029
1129
|
declare interface HeadingAttrs {
|
@@ -1064,13 +1164,14 @@ declare type HeadingSpecExtension = Extension<{
|
|
1064
1164
|
export { HeadingSpecExtension }
|
1065
1165
|
export { HeadingSpecExtension as HeadingSpecExtension_alias_1 }
|
1066
1166
|
|
1067
|
-
|
1167
|
+
declare interface HighlighterOptions extends Omit<ShikiHighlighterOptions, 'themes' | 'langs'> {
|
1068
1168
|
themes: BundledTheme[];
|
1069
1169
|
langs: (BundledLanguage | SpecialLanguage)[];
|
1070
|
-
|
1071
|
-
}
|
1170
|
+
}
|
1171
|
+
export { HighlighterOptions }
|
1172
|
+
export { HighlighterOptions as HighlighterOptions_alias_1 }
|
1072
1173
|
|
1073
|
-
declare type HighlighterResult = {
|
1174
|
+
export declare type HighlighterResult = {
|
1074
1175
|
highlighter: Highlighter;
|
1075
1176
|
promise?: undefined;
|
1076
1177
|
} | {
|
@@ -1119,22 +1220,39 @@ export declare type ImageSpecExtension = Extension<{
|
|
1119
1220
|
|
1120
1221
|
export { IndentListOptions }
|
1121
1222
|
|
1223
|
+
export declare function inputText(input: string): Promise<void>;
|
1224
|
+
|
1122
1225
|
/**
|
1123
1226
|
* Insert a table node with the given number of rows and columns, and optionally
|
1124
1227
|
* a header row.
|
1125
1228
|
*
|
1229
|
+
* @param options
|
1230
|
+
*
|
1126
1231
|
* @public
|
1127
1232
|
*/
|
1128
|
-
|
1233
|
+
declare function insertTable(options: InsertTableOptions): Command;
|
1234
|
+
export { insertTable }
|
1235
|
+
export { insertTable as insertTable_alias_1 }
|
1129
1236
|
|
1130
1237
|
/**
|
1131
1238
|
* @public
|
1132
1239
|
*/
|
1133
|
-
|
1240
|
+
declare interface InsertTableOptions {
|
1134
1241
|
row: number;
|
1135
1242
|
col: number;
|
1136
1243
|
header: boolean;
|
1137
1244
|
}
|
1245
|
+
export { InsertTableOptions }
|
1246
|
+
export { InsertTableOptions as InsertTableOptions_alias_1 }
|
1247
|
+
|
1248
|
+
/**
|
1249
|
+
* Checks if the given object is a `CellSelection` instance.
|
1250
|
+
*
|
1251
|
+
* @public
|
1252
|
+
*/
|
1253
|
+
declare function isCellSelection(value: unknown): value is CellSelection;
|
1254
|
+
export { isCellSelection }
|
1255
|
+
export { isCellSelection as isCellSelection_alias_1 }
|
1138
1256
|
|
1139
1257
|
/**
|
1140
1258
|
* @internal
|
@@ -1264,6 +1382,57 @@ declare type ListSpecExtension = Extension<{
|
|
1264
1382
|
export { ListSpecExtension }
|
1265
1383
|
export { ListSpecExtension as ListSpecExtension_alias_1 }
|
1266
1384
|
|
1385
|
+
/**
|
1386
|
+
* @internal
|
1387
|
+
*/
|
1388
|
+
export declare type LoroCommandsExtension = Extension<{
|
1389
|
+
Commands: {
|
1390
|
+
undo: [];
|
1391
|
+
redo: [];
|
1392
|
+
};
|
1393
|
+
}>;
|
1394
|
+
|
1395
|
+
declare interface LoroCursorOptions {
|
1396
|
+
awareness: CursorAwareness;
|
1397
|
+
getSelection?: (state: EditorState) => Selection_2;
|
1398
|
+
createCursor?: (user: PeerID) => Element;
|
1399
|
+
createSelection?: (user: PeerID) => DecorationAttrs;
|
1400
|
+
}
|
1401
|
+
export { LoroCursorOptions }
|
1402
|
+
export { LoroCursorOptions as LoroCursorOptions_alias_1 }
|
1403
|
+
|
1404
|
+
/**
|
1405
|
+
* @internal
|
1406
|
+
*/
|
1407
|
+
export declare type LoroExtension = Union<[LoroCommandsExtension, PlainExtension]>;
|
1408
|
+
|
1409
|
+
export declare interface LoroOptions {
|
1410
|
+
/**
|
1411
|
+
* The Loro instance handles the state of shared data.
|
1412
|
+
*/
|
1413
|
+
doc: LoroDocType;
|
1414
|
+
/**
|
1415
|
+
* The Awareness instance.
|
1416
|
+
*/
|
1417
|
+
awareness: CursorAwareness;
|
1418
|
+
/**
|
1419
|
+
* Extra options for `LoroSyncPlugin`.
|
1420
|
+
*/
|
1421
|
+
sync?: Omit<LoroSyncPluginProps, 'doc'>;
|
1422
|
+
/**
|
1423
|
+
* Extra options for the `LoroUndoPlugin`.
|
1424
|
+
*/
|
1425
|
+
undo?: Omit<LoroUndoPluginProps, 'doc'>;
|
1426
|
+
/**
|
1427
|
+
* Extra options for `LoroCursorPlugin`.
|
1428
|
+
*/
|
1429
|
+
cursor?: Omit<LoroCursorOptions, 'awareness'>;
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
export { LoroSyncPluginProps }
|
1433
|
+
|
1434
|
+
export { LoroUndoPluginProps }
|
1435
|
+
|
1267
1436
|
/**
|
1268
1437
|
* Options for {@link defineMarkInputRule}.
|
1269
1438
|
*
|
@@ -1332,7 +1501,7 @@ export declare interface MentionAttrs {
|
|
1332
1501
|
/**
|
1333
1502
|
* @internal
|
1334
1503
|
*/
|
1335
|
-
export declare type ModClickPreventionExtension =
|
1504
|
+
export declare type ModClickPreventionExtension = PlainExtension;
|
1336
1505
|
|
1337
1506
|
export declare interface PlaceholderOptions {
|
1338
1507
|
/**
|
@@ -1362,8 +1531,6 @@ export declare interface PredictionPluginState {
|
|
1362
1531
|
} | null;
|
1363
1532
|
}
|
1364
1533
|
|
1365
|
-
export declare function prepareHighlighter(options: HighlighterOptions): HighlighterResult;
|
1366
|
-
|
1367
1534
|
/**
|
1368
1535
|
* @example
|
1369
1536
|
*
|
@@ -1376,6 +1543,11 @@ export declare function prepareHighlighter(options: HighlighterOptions): Highlig
|
|
1376
1543
|
*/
|
1377
1544
|
export declare function pressKey(input: string): Promise<void>;
|
1378
1545
|
|
1546
|
+
/**
|
1547
|
+
* @internal
|
1548
|
+
*/
|
1549
|
+
export declare const redo: Command;
|
1550
|
+
|
1379
1551
|
/**
|
1380
1552
|
* Options for {@link defineSearchQuery}
|
1381
1553
|
*
|
@@ -1418,6 +1590,96 @@ export declare interface SearchQueryOptions {
|
|
1418
1590
|
wholeWord?: boolean;
|
1419
1591
|
}
|
1420
1592
|
|
1593
|
+
/**
|
1594
|
+
* @public
|
1595
|
+
*/
|
1596
|
+
declare function selectTable(options?: SelectTableOptions): Command;
|
1597
|
+
export { selectTable }
|
1598
|
+
export { selectTable as selectTable_alias_1 }
|
1599
|
+
|
1600
|
+
/**
|
1601
|
+
* @public
|
1602
|
+
*/
|
1603
|
+
declare function selectTableCell(options?: SelectTableCellOptions): Command;
|
1604
|
+
export { selectTableCell }
|
1605
|
+
export { selectTableCell as selectTableCell_alias_1 }
|
1606
|
+
|
1607
|
+
/**
|
1608
|
+
* @public
|
1609
|
+
*/
|
1610
|
+
declare interface SelectTableCellOptions {
|
1611
|
+
/**
|
1612
|
+
* A hit position of the table cell to select from. By default, the selection
|
1613
|
+
* anchor will be used.
|
1614
|
+
*/
|
1615
|
+
pos?: number;
|
1616
|
+
}
|
1617
|
+
export { SelectTableCellOptions }
|
1618
|
+
export { SelectTableCellOptions as SelectTableCellOptions_alias_1 }
|
1619
|
+
|
1620
|
+
/**
|
1621
|
+
* @public
|
1622
|
+
*/
|
1623
|
+
declare function selectTableColumn(options?: SelectTableColumnOptions): Command;
|
1624
|
+
export { selectTableColumn }
|
1625
|
+
export { selectTableColumn as selectTableColumn_alias_1 }
|
1626
|
+
|
1627
|
+
/**
|
1628
|
+
* @public
|
1629
|
+
*/
|
1630
|
+
declare interface SelectTableColumnOptions {
|
1631
|
+
/**
|
1632
|
+
* A hit position of the table cell to select from. By default, the selection
|
1633
|
+
* anchor will be used.
|
1634
|
+
*/
|
1635
|
+
anchor?: number;
|
1636
|
+
/**
|
1637
|
+
* A hit position of the table cell to select to. By default, the selection
|
1638
|
+
* head will be used.
|
1639
|
+
*/
|
1640
|
+
head?: number;
|
1641
|
+
}
|
1642
|
+
export { SelectTableColumnOptions }
|
1643
|
+
export { SelectTableColumnOptions as SelectTableColumnOptions_alias_1 }
|
1644
|
+
|
1645
|
+
/**
|
1646
|
+
* @public
|
1647
|
+
*/
|
1648
|
+
declare interface SelectTableOptions {
|
1649
|
+
/**
|
1650
|
+
* A hit position of the table to select from. By default, the selection
|
1651
|
+
* anchor will be used.
|
1652
|
+
*/
|
1653
|
+
pos?: number;
|
1654
|
+
}
|
1655
|
+
export { SelectTableOptions }
|
1656
|
+
export { SelectTableOptions as SelectTableOptions_alias_1 }
|
1657
|
+
|
1658
|
+
/**
|
1659
|
+
* @public
|
1660
|
+
*/
|
1661
|
+
declare function selectTableRow(options?: SelectTableRowOptions): Command;
|
1662
|
+
export { selectTableRow }
|
1663
|
+
export { selectTableRow as selectTableRow_alias_1 }
|
1664
|
+
|
1665
|
+
/**
|
1666
|
+
* @public
|
1667
|
+
*/
|
1668
|
+
declare interface SelectTableRowOptions {
|
1669
|
+
/**
|
1670
|
+
* A hit position of the table cell to select from. By default, the selection
|
1671
|
+
* anchor will be used.
|
1672
|
+
*/
|
1673
|
+
anchor?: number;
|
1674
|
+
/**
|
1675
|
+
* A hit position of the table cell to select to. By default, the selection
|
1676
|
+
* head will be used.
|
1677
|
+
*/
|
1678
|
+
head?: number;
|
1679
|
+
}
|
1680
|
+
export { SelectTableRowOptions }
|
1681
|
+
export { SelectTableRowOptions as SelectTableRowOptions_alias_1 }
|
1682
|
+
|
1421
1683
|
/**
|
1422
1684
|
* @internal
|
1423
1685
|
*/
|
@@ -1432,7 +1694,7 @@ export declare function setTrMeta(tr: Transaction, meta: PredictionPluginState):
|
|
1432
1694
|
* @internal
|
1433
1695
|
*/
|
1434
1696
|
export declare function setupTest(): {
|
1435
|
-
editor: TestEditor<Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension,
|
1697
|
+
editor: TestEditor<Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension, PlainExtension, BaseCommandsExtension, ItalicExtension, BoldExtension, UnderlineExtension, StrikeExtension, CodeExtension, LinkExtension, ImageExtension, Extension<{
|
1436
1698
|
Nodes: {
|
1437
1699
|
paragraph: Attrs_2;
|
1438
1700
|
};
|
@@ -1489,13 +1751,13 @@ export declare function setupTest(): {
|
|
1489
1751
|
level: number;
|
1490
1752
|
}>;
|
1491
1753
|
image: NodeAction< {
|
1492
|
-
src?: string | null;
|
1754
|
+
src?: (string | null) | undefined;
|
1493
1755
|
}>;
|
1494
1756
|
list: NodeAction< {
|
1495
|
-
kind?: "bullet" | "ordered" | "task" | "toggle";
|
1496
|
-
order?: number | null;
|
1497
|
-
checked?: boolean;
|
1498
|
-
collapsed?: boolean;
|
1757
|
+
kind?: ("bullet" | "ordered" | "task" | "toggle") | undefined;
|
1758
|
+
order?: (number | null) | undefined;
|
1759
|
+
checked?: boolean | undefined;
|
1760
|
+
collapsed?: boolean | undefined;
|
1499
1761
|
}>;
|
1500
1762
|
table: NodeAction< {
|
1501
1763
|
readonly [x: string]: any;
|
@@ -1525,6 +1787,9 @@ export declare function setupTestFromExtension<E extends Extension>(extension: E
|
|
1525
1787
|
m: ExtractMarkActions<E>;
|
1526
1788
|
};
|
1527
1789
|
|
1790
|
+
export declare interface ShikiHighlighterOptions extends BundledHighlighterOptions<BundledLanguage, BundledTheme> {
|
1791
|
+
}
|
1792
|
+
|
1528
1793
|
/**
|
1529
1794
|
* @internal
|
1530
1795
|
*/
|
@@ -1569,6 +1834,20 @@ declare type TableCommandsExtension = Extension<{
|
|
1569
1834
|
Commands: {
|
1570
1835
|
insertTable: [InsertTableOptions];
|
1571
1836
|
exitTable: [];
|
1837
|
+
selectTable: [options?: SelectTableOptions];
|
1838
|
+
selectTableCell: [options?: SelectTableCellOptions];
|
1839
|
+
selectTableColumn: [options?: SelectTableColumnOptions];
|
1840
|
+
selectTableRow: [options?: SelectTableRowOptions];
|
1841
|
+
addTableColumnBefore: [];
|
1842
|
+
addTableColumnAfter: [];
|
1843
|
+
addTableRowAbove: [];
|
1844
|
+
addTableRowBelow: [];
|
1845
|
+
deleteTable: [];
|
1846
|
+
deleteTableColumn: [];
|
1847
|
+
deleteTableRow: [];
|
1848
|
+
deleteCellSelection: [];
|
1849
|
+
mergeTableCells: [];
|
1850
|
+
splitTableCell: [];
|
1572
1851
|
};
|
1573
1852
|
}>;
|
1574
1853
|
export { TableCommandsExtension }
|
@@ -1577,13 +1856,15 @@ export { TableCommandsExtension as TableCommandsExtension_alias_1 }
|
|
1577
1856
|
/**
|
1578
1857
|
* @internal
|
1579
1858
|
*/
|
1580
|
-
|
1859
|
+
declare type TableExtension = Union<[
|
1581
1860
|
TableSpecExtension,
|
1582
1861
|
TableRowSpecExtension,
|
1583
1862
|
TableCellSpecExtension,
|
1584
1863
|
TableHeaderCellSpecExtension,
|
1585
1864
|
TableCommandsExtension
|
1586
1865
|
]>;
|
1866
|
+
export { TableExtension }
|
1867
|
+
export { TableExtension as TableExtension_alias_1 }
|
1587
1868
|
|
1588
1869
|
/**
|
1589
1870
|
* @internal
|
@@ -1621,10 +1902,34 @@ export { TableSpecExtension as TableSpecExtension_alias_1 }
|
|
1621
1902
|
/**
|
1622
1903
|
* @internal
|
1623
1904
|
*/
|
1624
|
-
export declare type
|
1625
|
-
|
1626
|
-
|
1905
|
+
export declare type TextAlignAttrsExtension<NodeName extends string> = Extension<{
|
1906
|
+
Nodes: {
|
1907
|
+
[K in NodeName]: {
|
1908
|
+
textAlign: string | null;
|
1909
|
+
};
|
1910
|
+
};
|
1911
|
+
}>;
|
1912
|
+
|
1913
|
+
/**
|
1914
|
+
* @internal
|
1915
|
+
*/
|
1916
|
+
export declare type TextAlignCommandsExtension = Extension<{
|
1917
|
+
Commands: {
|
1918
|
+
setTextAlign: [value: string | null];
|
1919
|
+
};
|
1920
|
+
}>;
|
1921
|
+
|
1922
|
+
/**
|
1923
|
+
* @internal
|
1924
|
+
*/
|
1925
|
+
export declare type TextAlignExtension<NodeName extends string> = Union<[
|
1926
|
+
TextAlignAttrsExtension<NodeName>,
|
1927
|
+
TextAlignCommandsExtension
|
1928
|
+
]>;
|
1627
1929
|
|
1930
|
+
/**
|
1931
|
+
* @public
|
1932
|
+
*/
|
1628
1933
|
export declare interface TextAlignOptions<NodeName extends string = string> {
|
1629
1934
|
/**
|
1630
1935
|
* The names of node to add the attribute to.
|
@@ -1697,13 +2002,99 @@ export declare type UnderlineSpecExtension = Extension<{
|
|
1697
2002
|
};
|
1698
2003
|
}>;
|
1699
2004
|
|
2005
|
+
/**
|
2006
|
+
* @internal
|
2007
|
+
*/
|
2008
|
+
export declare const undo: Command;
|
2009
|
+
|
1700
2010
|
export { UnwrapListOptions }
|
1701
2011
|
|
1702
2012
|
/**
|
1703
2013
|
* @internal
|
1704
2014
|
*/
|
1705
|
-
export declare type VirtualSelectionExtension =
|
2015
|
+
export declare type VirtualSelectionExtension = PlainExtension;
|
1706
2016
|
|
1707
2017
|
export { WrapInListGetAttrs }
|
1708
2018
|
|
2019
|
+
/**
|
2020
|
+
* @internal
|
2021
|
+
*/
|
2022
|
+
export declare type YjsCommandsExtension = Extension<{
|
2023
|
+
Commands: {
|
2024
|
+
undo: [];
|
2025
|
+
redo: [];
|
2026
|
+
};
|
2027
|
+
}>;
|
2028
|
+
|
2029
|
+
declare interface YjsCursorOptions extends YjsCursorPluginOptions {
|
2030
|
+
awareness: Awareness;
|
2031
|
+
}
|
2032
|
+
export { YjsCursorOptions }
|
2033
|
+
export { YjsCursorOptions as YjsCursorOptions_alias_1 }
|
2034
|
+
|
2035
|
+
/**
|
2036
|
+
* Options for `y-prosemirror`'s `yCursorPlugin`.
|
2037
|
+
*/
|
2038
|
+
declare type YjsCursorPluginOptions = NonNullable<Parameters<typeof yCursorPlugin>[1]>;
|
2039
|
+
export { YjsCursorPluginOptions }
|
2040
|
+
export { YjsCursorPluginOptions as YjsCursorPluginOptions_alias_1 }
|
2041
|
+
|
2042
|
+
/**
|
2043
|
+
* @internal
|
2044
|
+
*/
|
2045
|
+
export declare type YjsExtension = Union<[YjsCommandsExtension, PlainExtension]>;
|
2046
|
+
|
2047
|
+
export declare interface YjsOptions {
|
2048
|
+
/**
|
2049
|
+
* The Yjs instance handles the state of shared data.
|
2050
|
+
*/
|
2051
|
+
doc: Y.Doc;
|
2052
|
+
/**
|
2053
|
+
* The Awareness instance.
|
2054
|
+
*/
|
2055
|
+
awareness: Awareness;
|
2056
|
+
/**
|
2057
|
+
* The Yjs XmlFragment to use. If not provided,
|
2058
|
+
* `doc.getXmlFragment('prosemirror')` will be used.
|
2059
|
+
*/
|
2060
|
+
fragment?: Y.XmlFragment;
|
2061
|
+
/**
|
2062
|
+
* Options for `y-prosemirror`'s `ySyncPlugin`.
|
2063
|
+
*/
|
2064
|
+
sync?: YjsSyncPluginOptions;
|
2065
|
+
/**
|
2066
|
+
* Options for the `y-prosemirror`'s `yUndoPlugin`.
|
2067
|
+
*/
|
2068
|
+
undo?: YjsUndoPluginOptions;
|
2069
|
+
/**
|
2070
|
+
* Options for `y-prosemirror`'s `yCursorPlugin`.
|
2071
|
+
*/
|
2072
|
+
cursor?: YjsCursorPluginOptions;
|
2073
|
+
}
|
2074
|
+
|
2075
|
+
declare interface YjsSyncOptions extends YjsSyncPluginOptions {
|
2076
|
+
fragment: Y.XmlFragment;
|
2077
|
+
}
|
2078
|
+
export { YjsSyncOptions }
|
2079
|
+
export { YjsSyncOptions as YjsSyncOptions_alias_1 }
|
2080
|
+
|
2081
|
+
/**
|
2082
|
+
* Options for `y-prosemirror`'s `ySyncPlugin`.
|
2083
|
+
*/
|
2084
|
+
declare type YjsSyncPluginOptions = NonNullable<Parameters<typeof ySyncPlugin>[1]>;
|
2085
|
+
export { YjsSyncPluginOptions }
|
2086
|
+
export { YjsSyncPluginOptions as YjsSyncPluginOptions_alias_1 }
|
2087
|
+
|
2088
|
+
declare interface YjsUndoOptions extends YjsUndoPluginOptions {
|
2089
|
+
}
|
2090
|
+
export { YjsUndoOptions }
|
2091
|
+
export { YjsUndoOptions as YjsUndoOptions_alias_1 }
|
2092
|
+
|
2093
|
+
/**
|
2094
|
+
* Options for the `y-prosemirror`'s `yUndoPlugin`.
|
2095
|
+
*/
|
2096
|
+
declare type YjsUndoPluginOptions = NonNullable<Parameters<typeof yUndoPlugin>[0]>;
|
2097
|
+
export { YjsUndoPluginOptions }
|
2098
|
+
export { YjsUndoPluginOptions as YjsUndoPluginOptions_alias_1 }
|
2099
|
+
|
1709
2100
|
export { }
|