@prosekit/extensions 0.0.0-next-20240724173606 → 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 +481 -99
- 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 +1 -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
|
|
@@ -178,26 +192,31 @@ export { CodeBlockExtension as CodeBlockExtension_alias_1 }
|
|
178
192
|
/**
|
179
193
|
* @public
|
180
194
|
*/
|
181
|
-
|
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'> {
|
182
207
|
/**
|
183
|
-
* A list of
|
208
|
+
* A list of Shiki themes to pre-load. The first theme in the list will be
|
184
209
|
* used to render the code block.
|
185
210
|
*
|
186
211
|
* @default ['one-dark-pro']
|
187
212
|
*/
|
188
213
|
themes?: BundledTheme[];
|
189
214
|
/**
|
190
|
-
* A list of
|
215
|
+
* A list of Shiki languages to pre-load.
|
191
216
|
*
|
192
217
|
* @default ['text']
|
193
218
|
*/
|
194
219
|
langs?: (BundledLanguage | SpecialLanguage)[];
|
195
|
-
/**
|
196
|
-
* Alias of languages
|
197
|
-
*
|
198
|
-
* @example { 'my-lang': 'javascript' }
|
199
|
-
*/
|
200
|
-
langAlias?: Record<string, BundledLanguage>;
|
201
220
|
}
|
202
221
|
|
203
222
|
/**
|
@@ -286,6 +305,10 @@ export declare function createLazyParser(highlighterOptions: HighlighterOptions)
|
|
286
305
|
*/
|
287
306
|
export declare function createMarkInputRule({ regex, type, attrs, }: MarkInputRuleOptions): InputRule;
|
288
307
|
|
308
|
+
export declare function createOrGetHighlighter(options: HighlighterOptions): HighlighterResult;
|
309
|
+
|
310
|
+
export declare function createOrGetHighlighter_alias_1(options: HighlighterOptions): HighlighterResult;
|
311
|
+
|
289
312
|
export { DedentListOptions }
|
290
313
|
|
291
314
|
export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
@@ -307,13 +330,9 @@ export declare function defineBlockquote(): BlockquoteExtension;
|
|
307
330
|
* Wraps the text block in a blockquote when `>` is typed at the start of a new
|
308
331
|
* line followed by a space.
|
309
332
|
*/
|
310
|
-
export declare function defineBlockquoteInputRule():
|
333
|
+
export declare function defineBlockquoteInputRule(): PlainExtension;
|
311
334
|
|
312
|
-
export declare function defineBlockquoteSpec():
|
313
|
-
Nodes: {
|
314
|
-
blockquote: Attrs;
|
315
|
-
};
|
316
|
-
}>;
|
335
|
+
export declare function defineBlockquoteSpec(): BlockquoteSpecExtension;
|
317
336
|
|
318
337
|
/**
|
319
338
|
* @public
|
@@ -328,12 +347,12 @@ export declare function defineBoldCommands(): BoldCommandsExtension;
|
|
328
347
|
/**
|
329
348
|
* @internal
|
330
349
|
*/
|
331
|
-
export declare function defineBoldInputRule():
|
350
|
+
export declare function defineBoldInputRule(): PlainExtension;
|
332
351
|
|
333
352
|
/**
|
334
353
|
* @internal
|
335
354
|
*/
|
336
|
-
export declare function defineBoldKeymap():
|
355
|
+
export declare function defineBoldKeymap(): PlainExtension;
|
337
356
|
|
338
357
|
/**
|
339
358
|
* @internal
|
@@ -374,7 +393,7 @@ export { defineCodeBlockCommands as defineCodeBlockCommands_alias_1 }
|
|
374
393
|
*
|
375
394
|
* @public
|
376
395
|
*/
|
377
|
-
declare function defineCodeBlockEnterRule():
|
396
|
+
declare function defineCodeBlockEnterRule(): PlainExtension;
|
378
397
|
export { defineCodeBlockEnterRule }
|
379
398
|
export { defineCodeBlockEnterRule as defineCodeBlockEnterRule_alias_1 }
|
380
399
|
|
@@ -384,11 +403,11 @@ export { defineCodeBlockEnterRule as defineCodeBlockEnterRule_alias_1 }
|
|
384
403
|
* [documentation](https://github.com/ocavue/prosemirror-highlight) for more
|
385
404
|
* information.
|
386
405
|
*
|
406
|
+
* @param options
|
407
|
+
*
|
387
408
|
* @public
|
388
409
|
*/
|
389
|
-
declare function defineCodeBlockHighlight({ parser, }:
|
390
|
-
parser: HighlightParser;
|
391
|
-
}): Extension;
|
410
|
+
declare function defineCodeBlockHighlight({ parser, }: CodeBlockHighlightOptions): Extension;
|
392
411
|
export { defineCodeBlockHighlight }
|
393
412
|
export { defineCodeBlockHighlight as defineCodeBlockHighlight_alias_1 }
|
394
413
|
|
@@ -397,21 +416,23 @@ export { defineCodeBlockHighlight as defineCodeBlockHighlight_alias_1 }
|
|
397
416
|
*
|
398
417
|
* @public
|
399
418
|
*/
|
400
|
-
declare function defineCodeBlockInputRule():
|
419
|
+
declare function defineCodeBlockInputRule(): PlainExtension;
|
401
420
|
export { defineCodeBlockInputRule }
|
402
421
|
export { defineCodeBlockInputRule as defineCodeBlockInputRule_alias_1 }
|
403
422
|
|
404
423
|
/**
|
405
424
|
* Defines the keymap for code blocks.
|
406
425
|
*/
|
407
|
-
export declare function defineCodeBlockKeymap():
|
426
|
+
export declare function defineCodeBlockKeymap(): PlainExtension;
|
408
427
|
|
409
428
|
/**
|
410
|
-
* 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.
|
411
432
|
*
|
412
433
|
* @public
|
413
434
|
*/
|
414
|
-
declare function defineCodeBlockShiki({ themes, langs,
|
435
|
+
declare function defineCodeBlockShiki({ themes, langs, ...rest }?: CodeBlockShikiOptions): Extension;
|
415
436
|
export { defineCodeBlockShiki }
|
416
437
|
export { defineCodeBlockShiki as defineCodeBlockShiki_alias_1 }
|
417
438
|
|
@@ -432,12 +453,12 @@ export declare function defineCodeCommands(): CodeCommandsExtension;
|
|
432
453
|
/**
|
433
454
|
* @internal
|
434
455
|
*/
|
435
|
-
export declare function defineCodeInputRule():
|
456
|
+
export declare function defineCodeInputRule(): PlainExtension;
|
436
457
|
|
437
458
|
/**
|
438
459
|
* @internal
|
439
460
|
*/
|
440
|
-
export declare function defineCodeKeymap():
|
461
|
+
export declare function defineCodeKeymap(): PlainExtension;
|
441
462
|
|
442
463
|
/**
|
443
464
|
* @internal
|
@@ -447,12 +468,12 @@ export declare function defineCodeSpec(): CodeSpecExtension;
|
|
447
468
|
/**
|
448
469
|
* Define an extension that can record the changes in the editor.
|
449
470
|
*/
|
450
|
-
export declare function defineCommitRecorder(commitRecorder: CommitRecorder):
|
471
|
+
export declare function defineCommitRecorder(commitRecorder: CommitRecorder): PlainExtension;
|
451
472
|
|
452
473
|
/**
|
453
474
|
* Define an extension to display the changes from the given commit in the editor.
|
454
475
|
*/
|
455
|
-
export declare function defineCommitViewer(commit: Commit):
|
476
|
+
export declare function defineCommitViewer(commit: Commit): PlainExtension;
|
456
477
|
|
457
478
|
/**
|
458
479
|
* Show up a decoration at the drop position when something is dragged over the editor.
|
@@ -468,9 +489,11 @@ export declare function defineDropCursor(options?: DropCursorOptions): DropCurso
|
|
468
489
|
* the cursor matches `regex` and user presses Enter. The `regex` should end
|
469
490
|
* with `$`.
|
470
491
|
*
|
492
|
+
* @param options
|
493
|
+
*
|
471
494
|
* @public
|
472
495
|
*/
|
473
|
-
export declare function defineEnterRule({ regex, handler, stop, }: EnterRuleOptions):
|
496
|
+
export declare function defineEnterRule({ regex, handler, stop, }: EnterRuleOptions): PlainExtension;
|
474
497
|
|
475
498
|
/**
|
476
499
|
* Capture clicks near and arrow-key-motion past places that don't have a
|
@@ -486,7 +509,7 @@ export declare function defineEnterRule({ regex, handler, stop, }: EnterRuleOpti
|
|
486
509
|
*
|
487
510
|
* @public
|
488
511
|
*/
|
489
|
-
export declare function defineGapCursor():
|
512
|
+
export declare function defineGapCursor(): GapCursorExtension;
|
490
513
|
|
491
514
|
/**
|
492
515
|
* @public
|
@@ -506,14 +529,14 @@ export { defineHeadingCommands as defineHeadingCommands_alias_1 }
|
|
506
529
|
*
|
507
530
|
* @internal
|
508
531
|
*/
|
509
|
-
declare function defineHeadingInputRule():
|
532
|
+
declare function defineHeadingInputRule(): PlainExtension;
|
510
533
|
export { defineHeadingInputRule }
|
511
534
|
export { defineHeadingInputRule as defineHeadingInputRule_alias_1 }
|
512
535
|
|
513
536
|
/**
|
514
537
|
* @internal
|
515
538
|
*/
|
516
|
-
declare function defineHeadingKeymap():
|
539
|
+
declare function defineHeadingKeymap(): PlainExtension;
|
517
540
|
export { defineHeadingKeymap }
|
518
541
|
export { defineHeadingKeymap as defineHeadingKeymap_alias_1 }
|
519
542
|
|
@@ -546,7 +569,7 @@ export declare function defineImageSpec(): ImageSpecExtension;
|
|
546
569
|
*
|
547
570
|
* @public
|
548
571
|
*/
|
549
|
-
export declare function defineInputRule(rule: InputRule):
|
572
|
+
export declare function defineInputRule(rule: InputRule): PlainExtension;
|
550
573
|
|
551
574
|
/**
|
552
575
|
* @public
|
@@ -561,12 +584,12 @@ export declare function defineItalicCommands(): ItalicCommandsExtension;
|
|
561
584
|
/**
|
562
585
|
* @internal
|
563
586
|
*/
|
564
|
-
export declare function defineItalicInputRule():
|
587
|
+
export declare function defineItalicInputRule(): PlainExtension;
|
565
588
|
|
566
589
|
/**
|
567
590
|
* @internal
|
568
591
|
*/
|
569
|
-
export declare function defineItalicKeymap():
|
592
|
+
export declare function defineItalicKeymap(): PlainExtension;
|
570
593
|
|
571
594
|
/**
|
572
595
|
* @internal
|
@@ -585,14 +608,14 @@ export declare function defineLinkCommands(): LinkCommandsExtension;
|
|
585
608
|
*
|
586
609
|
* @internal
|
587
610
|
*/
|
588
|
-
export declare function defineLinkEnterRule():
|
611
|
+
export declare function defineLinkEnterRule(): PlainExtension;
|
589
612
|
|
590
613
|
/**
|
591
614
|
* Apply link marks after pressing Space.
|
592
615
|
*
|
593
616
|
* @internal
|
594
617
|
*/
|
595
|
-
export declare function defineLinkInputRule():
|
618
|
+
export declare function defineLinkInputRule(): PlainExtension;
|
596
619
|
|
597
620
|
/**
|
598
621
|
* Apply and remove link marks to the text during typing.
|
@@ -632,14 +655,14 @@ export { defineListInputRules as defineListInputRules_alias_1 }
|
|
632
655
|
*
|
633
656
|
* @internal
|
634
657
|
*/
|
635
|
-
declare function defineListKeymap():
|
658
|
+
declare function defineListKeymap(): PlainExtension;
|
636
659
|
export { defineListKeymap }
|
637
660
|
export { defineListKeymap as defineListKeymap_alias_1 }
|
638
661
|
|
639
662
|
/**
|
640
663
|
* @internal
|
641
664
|
*/
|
642
|
-
declare function defineListPlugins():
|
665
|
+
declare function defineListPlugins(): PlainExtension;
|
643
666
|
export { defineListPlugins }
|
644
667
|
export { defineListPlugins as defineListPlugins_alias_1 }
|
645
668
|
|
@@ -650,13 +673,38 @@ declare function defineListSpec(): ListSpecExtension;
|
|
650
673
|
export { defineListSpec }
|
651
674
|
export { defineListSpec as defineListSpec_alias_1 }
|
652
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
|
+
|
653
701
|
/**
|
654
702
|
* Defines an input rule for automatically adding inline marks when a given
|
655
703
|
* pattern is typed.
|
656
704
|
*
|
657
705
|
* @public
|
658
706
|
*/
|
659
|
-
export declare function defineMarkInputRule(options: MarkInputRuleOptions):
|
707
|
+
export declare function defineMarkInputRule(options: MarkInputRuleOptions): PlainExtension;
|
660
708
|
|
661
709
|
/**
|
662
710
|
* A mark rule is something that can automatically apply marks to text if it
|
@@ -706,12 +754,12 @@ export declare function defineModClickPrevention(): ModClickPreventionExtension;
|
|
706
754
|
* Add a placeholder text to the editor when the current block or document is
|
707
755
|
* empty.
|
708
756
|
*/
|
709
|
-
export declare function definePlaceholder(options: PlaceholderOptions):
|
757
|
+
export declare function definePlaceholder(options: PlaceholderOptions): PlainExtension;
|
710
758
|
|
711
759
|
/**
|
712
760
|
* Make the editor read-only.
|
713
761
|
*/
|
714
|
-
export declare function defineReadonly():
|
762
|
+
export declare function defineReadonly(): PlainExtension;
|
715
763
|
|
716
764
|
/**
|
717
765
|
* Defines commands for search and replace.
|
@@ -736,7 +784,7 @@ replaceAll: [];
|
|
736
784
|
*
|
737
785
|
* @public
|
738
786
|
*/
|
739
|
-
export declare function defineSearchQuery(options: SearchQueryOptions):
|
787
|
+
export declare function defineSearchQuery(options: SearchQueryOptions): PlainExtension;
|
740
788
|
|
741
789
|
/**
|
742
790
|
* @public
|
@@ -751,26 +799,24 @@ export declare function defineStrikeCommands(): StrikeCommandsExtension;
|
|
751
799
|
/**
|
752
800
|
* @internal
|
753
801
|
*/
|
754
|
-
export declare function defineStrikeInputRule():
|
802
|
+
export declare function defineStrikeInputRule(): PlainExtension;
|
755
803
|
|
756
804
|
/**
|
757
805
|
* @internal
|
758
806
|
*/
|
759
|
-
export declare function defineStrikeKeymap():
|
807
|
+
export declare function defineStrikeKeymap(): PlainExtension;
|
760
808
|
|
761
809
|
/**
|
762
810
|
* @internal
|
763
811
|
*/
|
764
|
-
export declare function defineStrikeSpec():
|
765
|
-
Marks: {
|
766
|
-
strike: Attrs;
|
767
|
-
};
|
768
|
-
}>;
|
812
|
+
export declare function defineStrikeSpec(): StrikeSpecExtension;
|
769
813
|
|
770
814
|
/**
|
771
815
|
* @public
|
772
816
|
*/
|
773
|
-
|
817
|
+
declare function defineTable(): TableExtension;
|
818
|
+
export { defineTable }
|
819
|
+
export { defineTable as defineTable_alias_1 }
|
774
820
|
|
775
821
|
/**
|
776
822
|
* @internal
|
@@ -795,7 +841,7 @@ export { defineTableHeaderCellSpec as defineTableHeaderCellSpec_alias_1 }
|
|
795
841
|
/**
|
796
842
|
* @public
|
797
843
|
*/
|
798
|
-
declare function defineTablePlugins():
|
844
|
+
declare function defineTablePlugins(): PlainExtension;
|
799
845
|
export { defineTablePlugins }
|
800
846
|
export { defineTablePlugins as defineTablePlugins_alias_1 }
|
801
847
|
|
@@ -816,7 +862,7 @@ export { defineTableSpec as defineTableSpec_alias_1 }
|
|
816
862
|
/**
|
817
863
|
* @internal
|
818
864
|
*/
|
819
|
-
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<{
|
820
866
|
Nodes: {
|
821
867
|
paragraph: Attrs_2;
|
822
868
|
};
|
@@ -828,35 +874,28 @@ paragraph: Attrs_2;
|
|
828
874
|
*
|
829
875
|
* @public
|
830
876
|
*/
|
831
|
-
export declare function defineTextAlign<NodeName extends string = string>(options: TextAlignOptions<NodeName>):
|
832
|
-
Nodes: {
|
833
|
-
[K in NodeName]: {
|
834
|
-
textAlign: string | null;
|
835
|
-
};
|
836
|
-
};
|
837
|
-
Commands: TextAlignCommandTyping;
|
838
|
-
}>;
|
877
|
+
export declare function defineTextAlign<NodeName extends string = string>(options: TextAlignOptions<NodeName>): TextAlignExtension<NodeName>;
|
839
878
|
|
840
879
|
/**
|
841
880
|
* @internal
|
842
881
|
*/
|
843
|
-
export declare function defineTextAlignCommands(types: string[]):
|
844
|
-
Commands: TextAlignCommandTyping;
|
845
|
-
}>;
|
882
|
+
export declare function defineTextAlignCommands(types: string[]): TextAlignCommandsExtension;
|
846
883
|
|
847
884
|
/**
|
848
885
|
* @internal
|
849
886
|
*/
|
850
|
-
export declare function defineTextAlignKeymap(types: string[]):
|
887
|
+
export declare function defineTextAlignKeymap(types: string[]): PlainExtension;
|
851
888
|
|
852
889
|
/**
|
853
890
|
* Defines an enter rule that replaces the matched text with a block node.
|
854
891
|
*
|
855
892
|
* See also {@link defineEnterRule}.
|
856
893
|
*
|
894
|
+
* @param options
|
895
|
+
*
|
857
896
|
* @public
|
858
897
|
*/
|
859
|
-
export declare function defineTextBlockEnterRule({ regex, type, attrs, stop, }: TextBlockEnterRuleOptions):
|
898
|
+
export declare function defineTextBlockEnterRule({ regex, type, attrs, stop, }: TextBlockEnterRuleOptions): PlainExtension;
|
860
899
|
|
861
900
|
/**
|
862
901
|
* Defines an input rule that changes the type of a textblock when the matched
|
@@ -864,6 +903,8 @@ export declare function defineTextBlockEnterRule({ regex, type, attrs, stop, }:
|
|
864
903
|
*
|
865
904
|
* See also [textblockTypeInputRule](https://prosemirror.net/docs/ref/#inputrules.textblockTypeInputRule)
|
866
905
|
*
|
906
|
+
* @param options
|
907
|
+
*
|
867
908
|
* @public
|
868
909
|
*/
|
869
910
|
export declare function defineTextBlockInputRule({ regex, type, attrs, }: {
|
@@ -881,7 +922,7 @@ export declare function defineTextBlockInputRule({ regex, type, attrs, }: {
|
|
881
922
|
* Attributes to set on the node.
|
882
923
|
*/
|
883
924
|
attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
|
884
|
-
}):
|
925
|
+
}): PlainExtension;
|
885
926
|
|
886
927
|
/**
|
887
928
|
* @public
|
@@ -896,7 +937,7 @@ export declare function defineUnderlineCommands(): UnderlineCommandsExtension;
|
|
896
937
|
/**
|
897
938
|
* @internal
|
898
939
|
*/
|
899
|
-
export declare function defineUnderlineKeymap():
|
940
|
+
export declare function defineUnderlineKeymap(): PlainExtension;
|
900
941
|
|
901
942
|
/**
|
902
943
|
* @internal
|
@@ -921,6 +962,8 @@ export declare function defineVirtualSelection(): VirtualSelectionExtension;
|
|
921
962
|
*
|
922
963
|
* See also [wrappingInputRule](https://prosemirror.net/docs/ref/#inputrules.wrappingInputRule)
|
923
964
|
*
|
965
|
+
* @param options
|
966
|
+
*
|
924
967
|
* @public
|
925
968
|
*/
|
926
969
|
export declare function defineWrappingInputRule({ regex, type, attrs, join, }: {
|
@@ -947,12 +990,37 @@ export declare function defineWrappingInputRule({ regex, type, attrs, join, }: {
|
|
947
990
|
* indicate whether a join should happen.
|
948
991
|
*/
|
949
992
|
join?: (match: RegExpMatchArray, node: ProseMirrorNode) => boolean;
|
950
|
-
}):
|
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 }
|
951
1019
|
|
952
1020
|
/**
|
953
1021
|
* @internal
|
954
1022
|
*/
|
955
|
-
export declare type DropCursorExtension =
|
1023
|
+
export declare type DropCursorExtension = PlainExtension;
|
956
1024
|
|
957
1025
|
export declare interface DropCursorOptions {
|
958
1026
|
/**
|
@@ -1023,16 +1091,39 @@ export declare type EnterRuleOptions = {
|
|
1023
1091
|
*
|
1024
1092
|
* @public
|
1025
1093
|
*/
|
1026
|
-
|
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;
|
1027
1115
|
|
1028
1116
|
export { GapCursor }
|
1029
1117
|
|
1118
|
+
/**
|
1119
|
+
* @internal
|
1120
|
+
*/
|
1121
|
+
export declare type GapCursorExtension = PlainExtension;
|
1122
|
+
|
1030
1123
|
export declare function getCheckRanges(transactions: readonly Transaction[], oldState: EditorState, newState: EditorState): Array<[number, number]>;
|
1031
1124
|
|
1032
1125
|
export declare function getPluginState(state: EditorState): PredictionPluginState | undefined;
|
1033
1126
|
|
1034
|
-
export { getSingletonHighlighter }
|
1035
|
-
|
1036
1127
|
export declare function getTrMeta(tr: Transaction): PredictionPluginState;
|
1037
1128
|
|
1038
1129
|
declare interface HeadingAttrs {
|
@@ -1073,13 +1164,14 @@ declare type HeadingSpecExtension = Extension<{
|
|
1073
1164
|
export { HeadingSpecExtension }
|
1074
1165
|
export { HeadingSpecExtension as HeadingSpecExtension_alias_1 }
|
1075
1166
|
|
1076
|
-
|
1167
|
+
declare interface HighlighterOptions extends Omit<ShikiHighlighterOptions, 'themes' | 'langs'> {
|
1077
1168
|
themes: BundledTheme[];
|
1078
1169
|
langs: (BundledLanguage | SpecialLanguage)[];
|
1079
|
-
|
1080
|
-
}
|
1170
|
+
}
|
1171
|
+
export { HighlighterOptions }
|
1172
|
+
export { HighlighterOptions as HighlighterOptions_alias_1 }
|
1081
1173
|
|
1082
|
-
declare type HighlighterResult = {
|
1174
|
+
export declare type HighlighterResult = {
|
1083
1175
|
highlighter: Highlighter;
|
1084
1176
|
promise?: undefined;
|
1085
1177
|
} | {
|
@@ -1128,22 +1220,39 @@ export declare type ImageSpecExtension = Extension<{
|
|
1128
1220
|
|
1129
1221
|
export { IndentListOptions }
|
1130
1222
|
|
1223
|
+
export declare function inputText(input: string): Promise<void>;
|
1224
|
+
|
1131
1225
|
/**
|
1132
1226
|
* Insert a table node with the given number of rows and columns, and optionally
|
1133
1227
|
* a header row.
|
1134
1228
|
*
|
1229
|
+
* @param options
|
1230
|
+
*
|
1135
1231
|
* @public
|
1136
1232
|
*/
|
1137
|
-
|
1233
|
+
declare function insertTable(options: InsertTableOptions): Command;
|
1234
|
+
export { insertTable }
|
1235
|
+
export { insertTable as insertTable_alias_1 }
|
1138
1236
|
|
1139
1237
|
/**
|
1140
1238
|
* @public
|
1141
1239
|
*/
|
1142
|
-
|
1240
|
+
declare interface InsertTableOptions {
|
1143
1241
|
row: number;
|
1144
1242
|
col: number;
|
1145
1243
|
header: boolean;
|
1146
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 }
|
1147
1256
|
|
1148
1257
|
/**
|
1149
1258
|
* @internal
|
@@ -1273,6 +1382,57 @@ declare type ListSpecExtension = Extension<{
|
|
1273
1382
|
export { ListSpecExtension }
|
1274
1383
|
export { ListSpecExtension as ListSpecExtension_alias_1 }
|
1275
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
|
+
|
1276
1436
|
/**
|
1277
1437
|
* Options for {@link defineMarkInputRule}.
|
1278
1438
|
*
|
@@ -1341,7 +1501,7 @@ export declare interface MentionAttrs {
|
|
1341
1501
|
/**
|
1342
1502
|
* @internal
|
1343
1503
|
*/
|
1344
|
-
export declare type ModClickPreventionExtension =
|
1504
|
+
export declare type ModClickPreventionExtension = PlainExtension;
|
1345
1505
|
|
1346
1506
|
export declare interface PlaceholderOptions {
|
1347
1507
|
/**
|
@@ -1371,8 +1531,6 @@ export declare interface PredictionPluginState {
|
|
1371
1531
|
} | null;
|
1372
1532
|
}
|
1373
1533
|
|
1374
|
-
export declare function prepareHighlighter(options: HighlighterOptions): HighlighterResult;
|
1375
|
-
|
1376
1534
|
/**
|
1377
1535
|
* @example
|
1378
1536
|
*
|
@@ -1385,6 +1543,11 @@ export declare function prepareHighlighter(options: HighlighterOptions): Highlig
|
|
1385
1543
|
*/
|
1386
1544
|
export declare function pressKey(input: string): Promise<void>;
|
1387
1545
|
|
1546
|
+
/**
|
1547
|
+
* @internal
|
1548
|
+
*/
|
1549
|
+
export declare const redo: Command;
|
1550
|
+
|
1388
1551
|
/**
|
1389
1552
|
* Options for {@link defineSearchQuery}
|
1390
1553
|
*
|
@@ -1427,6 +1590,96 @@ export declare interface SearchQueryOptions {
|
|
1427
1590
|
wholeWord?: boolean;
|
1428
1591
|
}
|
1429
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
|
+
|
1430
1683
|
/**
|
1431
1684
|
* @internal
|
1432
1685
|
*/
|
@@ -1441,7 +1694,7 @@ export declare function setTrMeta(tr: Transaction, meta: PredictionPluginState):
|
|
1441
1694
|
* @internal
|
1442
1695
|
*/
|
1443
1696
|
export declare function setupTest(): {
|
1444
|
-
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<{
|
1445
1698
|
Nodes: {
|
1446
1699
|
paragraph: Attrs_2;
|
1447
1700
|
};
|
@@ -1498,13 +1751,13 @@ export declare function setupTest(): {
|
|
1498
1751
|
level: number;
|
1499
1752
|
}>;
|
1500
1753
|
image: NodeAction< {
|
1501
|
-
src?: string | null;
|
1754
|
+
src?: (string | null) | undefined;
|
1502
1755
|
}>;
|
1503
1756
|
list: NodeAction< {
|
1504
|
-
kind?: "bullet" | "ordered" | "task" | "toggle";
|
1505
|
-
order?: number | null;
|
1506
|
-
checked?: boolean;
|
1507
|
-
collapsed?: boolean;
|
1757
|
+
kind?: ("bullet" | "ordered" | "task" | "toggle") | undefined;
|
1758
|
+
order?: (number | null) | undefined;
|
1759
|
+
checked?: boolean | undefined;
|
1760
|
+
collapsed?: boolean | undefined;
|
1508
1761
|
}>;
|
1509
1762
|
table: NodeAction< {
|
1510
1763
|
readonly [x: string]: any;
|
@@ -1534,6 +1787,9 @@ export declare function setupTestFromExtension<E extends Extension>(extension: E
|
|
1534
1787
|
m: ExtractMarkActions<E>;
|
1535
1788
|
};
|
1536
1789
|
|
1790
|
+
export declare interface ShikiHighlighterOptions extends BundledHighlighterOptions<BundledLanguage, BundledTheme> {
|
1791
|
+
}
|
1792
|
+
|
1537
1793
|
/**
|
1538
1794
|
* @internal
|
1539
1795
|
*/
|
@@ -1578,6 +1834,20 @@ declare type TableCommandsExtension = Extension<{
|
|
1578
1834
|
Commands: {
|
1579
1835
|
insertTable: [InsertTableOptions];
|
1580
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: [];
|
1581
1851
|
};
|
1582
1852
|
}>;
|
1583
1853
|
export { TableCommandsExtension }
|
@@ -1586,13 +1856,15 @@ export { TableCommandsExtension as TableCommandsExtension_alias_1 }
|
|
1586
1856
|
/**
|
1587
1857
|
* @internal
|
1588
1858
|
*/
|
1589
|
-
|
1859
|
+
declare type TableExtension = Union<[
|
1590
1860
|
TableSpecExtension,
|
1591
1861
|
TableRowSpecExtension,
|
1592
1862
|
TableCellSpecExtension,
|
1593
1863
|
TableHeaderCellSpecExtension,
|
1594
1864
|
TableCommandsExtension
|
1595
1865
|
]>;
|
1866
|
+
export { TableExtension }
|
1867
|
+
export { TableExtension as TableExtension_alias_1 }
|
1596
1868
|
|
1597
1869
|
/**
|
1598
1870
|
* @internal
|
@@ -1630,10 +1902,34 @@ export { TableSpecExtension as TableSpecExtension_alias_1 }
|
|
1630
1902
|
/**
|
1631
1903
|
* @internal
|
1632
1904
|
*/
|
1633
|
-
export declare type
|
1634
|
-
|
1635
|
-
|
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
|
+
]>;
|
1636
1929
|
|
1930
|
+
/**
|
1931
|
+
* @public
|
1932
|
+
*/
|
1637
1933
|
export declare interface TextAlignOptions<NodeName extends string = string> {
|
1638
1934
|
/**
|
1639
1935
|
* The names of node to add the attribute to.
|
@@ -1706,13 +2002,99 @@ export declare type UnderlineSpecExtension = Extension<{
|
|
1706
2002
|
};
|
1707
2003
|
}>;
|
1708
2004
|
|
2005
|
+
/**
|
2006
|
+
* @internal
|
2007
|
+
*/
|
2008
|
+
export declare const undo: Command;
|
2009
|
+
|
1709
2010
|
export { UnwrapListOptions }
|
1710
2011
|
|
1711
2012
|
/**
|
1712
2013
|
* @internal
|
1713
2014
|
*/
|
1714
|
-
export declare type VirtualSelectionExtension =
|
2015
|
+
export declare type VirtualSelectionExtension = PlainExtension;
|
1715
2016
|
|
1716
2017
|
export { WrapInListGetAttrs }
|
1717
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
|
+
|
1718
2100
|
export { }
|