@prosekit/extensions 0.7.18 → 0.7.20

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.
Files changed (35) hide show
  1. package/dist/_tsup-dts-rollup.d.ts +2463 -2312
  2. package/dist/prosekit-extensions-autocomplete.d.ts +3 -3
  3. package/dist/prosekit-extensions-blockquote.d.ts +8 -8
  4. package/dist/prosekit-extensions-bold.d.ts +8 -8
  5. package/dist/prosekit-extensions-code-block.d.ts +20 -20
  6. package/dist/prosekit-extensions-code.d.ts +8 -8
  7. package/dist/prosekit-extensions-commit.d.ts +4 -4
  8. package/dist/prosekit-extensions-drop-cursor.d.ts +3 -3
  9. package/dist/prosekit-extensions-enter-rule.d.ts +5 -5
  10. package/dist/prosekit-extensions-file.d.ts +8 -0
  11. package/dist/prosekit-extensions-file.js +151 -0
  12. package/dist/prosekit-extensions-gap-cursor.d.ts +2 -2
  13. package/dist/prosekit-extensions-heading.d.ts +9 -9
  14. package/dist/prosekit-extensions-horizontal-rule.d.ts +8 -8
  15. package/dist/prosekit-extensions-image.d.ts +7 -7
  16. package/dist/prosekit-extensions-image.js +14 -2
  17. package/dist/prosekit-extensions-input-rule.d.ts +6 -6
  18. package/dist/prosekit-extensions-italic.d.ts +8 -8
  19. package/dist/prosekit-extensions-link.d.ts +10 -10
  20. package/dist/prosekit-extensions-list.d.ts +16 -16
  21. package/dist/prosekit-extensions-loro.d.ts +11 -11
  22. package/dist/prosekit-extensions-mark-rule.d.ts +2 -2
  23. package/dist/prosekit-extensions-mention.d.ts +4 -4
  24. package/dist/prosekit-extensions-mod-click-prevention.d.ts +2 -2
  25. package/dist/prosekit-extensions-placeholder.d.ts +2 -2
  26. package/dist/prosekit-extensions-placeholder.js +2 -2
  27. package/dist/prosekit-extensions-readonly.d.ts +1 -1
  28. package/dist/prosekit-extensions-search.d.ts +3 -3
  29. package/dist/prosekit-extensions-strike.d.ts +8 -8
  30. package/dist/prosekit-extensions-table.d.ts +25 -25
  31. package/dist/prosekit-extensions-text-align.d.ts +8 -8
  32. package/dist/prosekit-extensions-underline.d.ts +7 -7
  33. package/dist/prosekit-extensions-virtual-selection.d.ts +2 -2
  34. package/dist/prosekit-extensions-yjs.d.ts +14 -14
  35. package/package.json +19 -11
@@ -1,2312 +1,2463 @@
1
- import { Attrs } from '@prosekit/pm/model';
2
- import { Attrs as Attrs_2 } from 'prosemirror-model';
3
- import type { Awareness } from 'y-protocols/awareness';
4
- import { BaseCommandsExtension } from '@prosekit/core';
5
- import type { BundledHighlighterOptions } from 'shiki';
6
- import { BundledLanguage } from 'shiki';
7
- import { BundledLanguageInfo } from 'shiki';
8
- import { bundledLanguagesInfo } from 'shiki';
9
- import { BundledTheme } from 'shiki';
10
- import { BundledThemeInfo } from 'shiki';
11
- import { bundledThemesInfo } from 'shiki';
12
- import { CellSelection } from 'prosemirror-tables';
13
- import { Command } from '@prosekit/pm/state';
14
- import { CursorAwareness } from 'loro-prosemirror';
15
- import type { DecorationAttrs } from '@prosekit/pm/view';
16
- import { DedentListOptions } from 'prosemirror-flat-list';
17
- import { config as default_alias_1 } from '@prosekit/dev/config-vitest';
18
- import { DocExtension } from '@prosekit/core';
19
- import { EditorState } from '@prosekit/pm/state';
20
- import { Extension } from '@prosekit/core';
21
- import { ExtensionTyping } from '@prosekit/core';
22
- import { ExtractMarkActions } from '@prosekit/core';
23
- import { ExtractNodeActions } from '@prosekit/core';
24
- import { FindParentNodeResult } from '@prosekit/core';
25
- import { GapCursor } from 'prosemirror-gapcursor';
26
- import type { Highlighter } from 'shiki';
27
- import { HistoryExtension } from '@prosekit/core';
28
- import { IndentListOptions } from 'prosemirror-flat-list';
29
- import { InputRule } from '@prosekit/pm/inputrules';
30
- import type { IsEqual } from 'type-fest';
31
- import { ListAttributes } from 'prosemirror-flat-list';
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';
36
- import { MarkType } from '@prosekit/pm/model';
37
- import { Node as Node_2 } from 'prosemirror-model';
38
- import { NodeAction } from '@prosekit/core';
39
- import { NodeChild } from '@prosekit/core';
40
- import { NodeJSON } from '@prosekit/core';
41
- import type { NodeType } from '@prosekit/pm/model';
42
- import { Options } from 'tsup';
43
- import { Parser } from 'prosemirror-highlight';
44
- import type { PeerID } from 'loro-crdt';
45
- import { PlainExtension } from '@prosekit/core';
46
- import { Plugin as Plugin_2 } from '@prosekit/pm/state';
47
- import { PluginKey } from '@prosekit/pm/state';
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';
51
- import { SimplifyDeeper } from '@prosekit/core';
52
- import type { SpecialLanguage } from 'shiki';
53
- import { StepJSON } from '@prosekit/core';
54
- import { TestEditor } from '@prosekit/core/test';
55
- import { TextExtension } from '@prosekit/core';
56
- import { ToggleCollapsedOptions } from 'prosemirror-flat-list';
57
- import { ToMarkAction } from '@prosekit/core';
58
- import { Transaction } from '@prosekit/pm/state';
59
- import { Union } from '@prosekit/core';
60
- import { UnwrapListOptions } from 'prosemirror-flat-list';
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';
66
-
67
- export declare function applyMarkRules(rules: MarkRuleOptions[], transactions: readonly Transaction[], oldState: EditorState, newState: EditorState): Transaction | null;
68
-
69
- /**
70
- * Utility function assert that two types are equal in tests.
71
- */
72
- export declare function assertTypeEqual<T, U>(_val: IsEqual<T, U>): void;
73
-
74
- declare class AutocompleteRule {
75
- readonly regex: RegExp;
76
- readonly onMatch: MatchHandler;
77
- readonly onLeave?: VoidFunction;
78
- readonly canMatch: (options: {
79
- state: EditorState;
80
- }) => boolean;
81
- constructor(options: {
82
- regex: RegExp;
83
- onEnter: MatchHandler;
84
- onLeave?: VoidFunction;
85
- canMatch?: (options: {
86
- state: EditorState;
87
- }) => boolean;
88
- });
89
- }
90
- export { AutocompleteRule }
91
- export { AutocompleteRule as AutocompleteRule_alias_1 }
92
-
93
- declare type BlockquoteCommandsExtension = Extension<{
94
- Commands: {
95
- setBlockquote: [];
96
- insertBlockquote: [];
97
- toggleBlockquote: [];
98
- };
99
- }>;
100
- export { BlockquoteCommandsExtension }
101
- export { BlockquoteCommandsExtension as BlockquoteCommandsExtension_alias_1 }
102
-
103
- /**
104
- * @internal
105
- */
106
- declare type BlockquoteExtension = Union<[
107
- BlockquoteSpecExtension,
108
- BlockquoteCommandsExtension
109
- ]>;
110
- export { BlockquoteExtension }
111
- export { BlockquoteExtension as BlockquoteExtension_alias_1 }
112
-
113
- declare type BlockquoteSpecExtension = Extension<{
114
- Nodes: {
115
- blockquote: Attrs;
116
- };
117
- }>;
118
- export { BlockquoteSpecExtension }
119
- export { BlockquoteSpecExtension as BlockquoteSpecExtension_alias_1 }
120
-
121
- /**
122
- * @internal
123
- */
124
- declare type BoldCommandsExtension = Extension<{
125
- Commands: {
126
- toggleBold: [];
127
- };
128
- }>;
129
- export { BoldCommandsExtension }
130
- export { BoldCommandsExtension as BoldCommandsExtension_alias_1 }
131
-
132
- /**
133
- * @internal
134
- */
135
- declare type BoldExtension = Union<[BoldSpecExtension, BoldCommandsExtension]>;
136
- export { BoldExtension }
137
- export { BoldExtension as BoldExtension_alias_1 }
138
-
139
- /**
140
- * @internal
141
- */
142
- declare type BoldSpecExtension = Extension<{
143
- Marks: {
144
- bold: Attrs;
145
- };
146
- }>;
147
- export { BoldSpecExtension }
148
- export { BoldSpecExtension as BoldSpecExtension_alias_1 }
149
-
150
- export { BundledLanguage as ShikiBundledLanguage }
151
- export { BundledLanguage as ShikiBundledLanguage_alias_1 }
152
-
153
- export { BundledLanguageInfo as ShikiBundledLanguageInfo }
154
- export { BundledLanguageInfo as ShikiBundledLanguageInfo_alias_1 }
155
-
156
- export { bundledLanguagesInfo as shikiBundledLanguagesInfo }
157
- export { bundledLanguagesInfo as shikiBundledLanguagesInfo_alias_1 }
158
-
159
- export { BundledTheme as ShikiBundledTheme }
160
- export { BundledTheme as ShikiBundledTheme_alias_1 }
161
-
162
- export { BundledThemeInfo as ShikiBundledThemeInfo }
163
- export { BundledThemeInfo as ShikiBundledThemeInfo_alias_1 }
164
-
165
- export { bundledThemesInfo as shikiBundledThemesInfo }
166
- export { bundledThemesInfo as shikiBundledThemesInfo_alias_1 }
167
-
168
- /**
169
- * @public
170
- */
171
- export declare interface CellAttrs {
172
- colspan: number;
173
- rowspan: number;
174
- colwidth: number[] | null;
175
- }
176
-
177
- /**
178
- * The attributes for the `codeBlock` node.
179
- *
180
- * @public
181
- */
182
- declare interface CodeBlockAttrs {
183
- language: string;
184
- }
185
- export { CodeBlockAttrs }
186
- export { CodeBlockAttrs as CodeBlockAttrs_alias_1 }
187
-
188
- /**
189
- * @internal
190
- */
191
- declare type CodeBlockCommandsExtension = Extension<{
192
- Commands: {
193
- setCodeBlock: [attrs?: CodeBlockAttrs];
194
- insertCodeBlock: [attrs?: CodeBlockAttrs];
195
- toggleCodeBlock: [attrs?: CodeBlockAttrs];
196
- setCodeBlockAttrs: [attrs: CodeBlockAttrs];
197
- };
198
- }>;
199
- export { CodeBlockCommandsExtension }
200
- export { CodeBlockCommandsExtension as CodeBlockCommandsExtension_alias_1 }
201
-
202
- /**
203
- * @internal
204
- */
205
- declare type CodeBlockExtension = Union<[
206
- CodeBlockSpecExtension,
207
- CodeBlockCommandsExtension
208
- ]>;
209
- export { CodeBlockExtension }
210
- export { CodeBlockExtension as CodeBlockExtension_alias_1 }
211
-
212
- /**
213
- * @public
214
- */
215
- declare type CodeBlockHighlightOptions = {
216
- parser: HighlightParser;
217
- };
218
- export { CodeBlockHighlightOptions }
219
- export { CodeBlockHighlightOptions as CodeBlockHighlightOptions_alias_1 }
220
-
221
- /**
222
- * The options to configure the Shiki highlighter.
223
- *
224
- * @public
225
- */
226
- export declare interface CodeBlockShikiOptions extends Omit<ShikiHighlighterOptions, 'themes' | 'langs' | 'engine'> {
227
- /**
228
- * A list of Shiki themes to pre-load. The first theme in the list will be
229
- * used to render the code block.
230
- *
231
- * @default ['one-dark-pro']
232
- */
233
- themes?: BundledTheme[];
234
- /**
235
- * A list of Shiki languages to pre-load.
236
- *
237
- * @default ['text']
238
- */
239
- langs?: (BundledLanguage | SpecialLanguage)[];
240
- /**
241
- * The RegExp engine to use. By default, the JavaScript engine is used.
242
- */
243
- engine?: ShikiHighlighterOptions['engine'];
244
- }
245
-
246
- /**
247
- * @internal
248
- */
249
- declare type CodeBlockSpecExtension = Extension<{
250
- Nodes: {
251
- codeBlock: CodeBlockAttrs;
252
- };
253
- }>;
254
- export { CodeBlockSpecExtension }
255
- export { CodeBlockSpecExtension as CodeBlockSpecExtension_alias_1 }
256
-
257
- /**
258
- * @internal
259
- */
260
- declare type CodeCommandsExtension = Extension<{
261
- Commands: {
262
- toggleCode: [];
263
- };
264
- }>;
265
- export { CodeCommandsExtension }
266
- export { CodeCommandsExtension as CodeCommandsExtension_alias_1 }
267
-
268
- /**
269
- * @internal
270
- */
271
- declare type CodeExtension = Union<[CodeSpecExtension, CodeCommandsExtension]>;
272
- export { CodeExtension }
273
- export { CodeExtension as CodeExtension_alias_1 }
274
-
275
- /**
276
- * @internal
277
- */
278
- declare type CodeSpecExtension = Extension<{
279
- Marks: {
280
- code: Attrs;
281
- };
282
- }>;
283
- export { CodeSpecExtension }
284
- export { CodeSpecExtension as CodeSpecExtension_alias_1 }
285
-
286
- /**
287
- * A JSON representation of a commit.
288
- */
289
- export declare interface Commit {
290
- /**
291
- * The current doc node in the JSON format
292
- */
293
- doc: NodeJSON;
294
- /**
295
- * The parent node in the JSON format
296
- */
297
- parent: NodeJSON;
298
- /**
299
- * An array of steps in the JSON format that transform the parent node to the
300
- * current doc node.
301
- */
302
- steps: StepJSON[];
303
- }
304
-
305
- export declare class CommitRecorder {
306
- private parent;
307
- private doc;
308
- private steps;
309
- /**
310
- * Return a commit object including all changes since the last commit. `null`
311
- * will be returned if there is no change.
312
- */
313
- commit(): Commit | null;
314
- /**
315
- * @internal
316
- */
317
- init(doc: ProseMirrorNode): void;
318
- /**
319
- * @internal
320
- */
321
- apply(tr: Transaction): void;
322
- }
323
-
324
- export declare function createAutocompletePlugin({ getRules, }: {
325
- getRules: () => AutocompleteRule[];
326
- }): Plugin_2;
327
-
328
- /**
329
- * @internal
330
- */
331
- export declare function createLazyParser(highlighterOptions: HighlighterOptions): Parser;
332
-
333
- /**
334
- * @internal
335
- */
336
- export declare function createMarkInputRule({ regex, type, attrs, }: MarkInputRuleOptions): InputRule;
337
-
338
- export declare function createOrGetHighlighter(options: HighlighterOptions): HighlighterResult;
339
-
340
- export declare function createOrGetHighlighter_alias_1(options: HighlighterOptions): HighlighterResult;
341
-
342
- export { DedentListOptions }
343
- export { DedentListOptions as DedentListOptions_alias_1 }
344
-
345
- export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
346
-
347
- export { default_alias_1 }
348
-
349
- export declare function defaultCanMatch({ state }: {
350
- state: EditorState;
351
- }): boolean;
352
-
353
- declare function defineAutocomplete(rule: AutocompleteRule): Extension;
354
- export { defineAutocomplete }
355
- export { defineAutocomplete as defineAutocomplete_alias_1 }
356
-
357
- /**
358
- * @public
359
- */
360
- declare function defineBlockquote(): BlockquoteExtension;
361
- export { defineBlockquote }
362
- export { defineBlockquote as defineBlockquote_alias_1 }
363
-
364
- /**
365
- * @internal
366
- */
367
- declare function defineBlockquoteCommands(): BlockquoteCommandsExtension;
368
- export { defineBlockquoteCommands }
369
- export { defineBlockquoteCommands as defineBlockquoteCommands_alias_1 }
370
-
371
- /**
372
- * Wraps the text block in a blockquote when `>` is typed at the start of a new
373
- * line followed by a space.
374
- */
375
- declare function defineBlockquoteInputRule(): PlainExtension;
376
- export { defineBlockquoteInputRule }
377
- export { defineBlockquoteInputRule as defineBlockquoteInputRule_alias_1 }
378
-
379
- /**
380
- * @internal
381
- */
382
- declare function defineBlockquoteKeymap(): PlainExtension;
383
- export { defineBlockquoteKeymap }
384
- export { defineBlockquoteKeymap as defineBlockquoteKeymap_alias_1 }
385
-
386
- declare function defineBlockquoteSpec(): BlockquoteSpecExtension;
387
- export { defineBlockquoteSpec }
388
- export { defineBlockquoteSpec as defineBlockquoteSpec_alias_1 }
389
-
390
- /**
391
- * @public
392
- */
393
- declare function defineBold(): BoldExtension;
394
- export { defineBold }
395
- export { defineBold as defineBold_alias_1 }
396
-
397
- /**
398
- * @internal
399
- */
400
- declare function defineBoldCommands(): BoldCommandsExtension;
401
- export { defineBoldCommands }
402
- export { defineBoldCommands as defineBoldCommands_alias_1 }
403
-
404
- /**
405
- * @internal
406
- */
407
- declare function defineBoldInputRule(): PlainExtension;
408
- export { defineBoldInputRule }
409
- export { defineBoldInputRule as defineBoldInputRule_alias_1 }
410
-
411
- /**
412
- * @internal
413
- */
414
- declare function defineBoldKeymap(): PlainExtension;
415
- export { defineBoldKeymap }
416
- export { defineBoldKeymap as defineBoldKeymap_alias_1 }
417
-
418
- /**
419
- * @internal
420
- */
421
- declare function defineBoldSpec(): BoldSpecExtension;
422
- export { defineBoldSpec }
423
- export { defineBoldSpec as defineBoldSpec_alias_1 }
424
-
425
- /**
426
- * @public
427
- */
428
- declare function defineCode(): CodeExtension;
429
- export { defineCode }
430
- export { defineCode as defineCode_alias_1 }
431
-
432
- /**
433
- * Adds `codeBlock` nodes to the editor. This includes the following extensions:
434
- *
435
- * - {@link defineCodeBlockSpec}
436
- * - {@link defineCodeBlockInputRule}
437
- * - {@link defineCodeBlockEnterRule}
438
- * - {@link defineCodeBlockKeymap}
439
- * - {@link defineCodeBlockCommands}.
440
- *
441
- * @public
442
- */
443
- declare function defineCodeBlock(): CodeBlockExtension;
444
- export { defineCodeBlock }
445
- export { defineCodeBlock as defineCodeBlock_alias_1 }
446
-
447
- /**
448
- * Adds commands for working with `codeBlock` nodes.
449
- *
450
- * @public
451
- */
452
- declare function defineCodeBlockCommands(): CodeBlockCommandsExtension;
453
- export { defineCodeBlockCommands }
454
- export { defineCodeBlockCommands as defineCodeBlockCommands_alias_1 }
455
-
456
- /**
457
- * Adds enter rules for `codeBlock` nodes.
458
- *
459
- * @public
460
- */
461
- declare function defineCodeBlockEnterRule(): PlainExtension;
462
- export { defineCodeBlockEnterRule }
463
- export { defineCodeBlockEnterRule as defineCodeBlockEnterRule_alias_1 }
464
-
465
- /**
466
- * Adds syntax highlighting to code blocks. This function requires a `Parser`
467
- * instance from the `prosemirror-highlight` package. See the
468
- * [documentation](https://github.com/ocavue/prosemirror-highlight) for more
469
- * information.
470
- *
471
- * @param options
472
- *
473
- * @public
474
- */
475
- declare function defineCodeBlockHighlight({ parser, }: CodeBlockHighlightOptions): Extension;
476
- export { defineCodeBlockHighlight }
477
- export { defineCodeBlockHighlight as defineCodeBlockHighlight_alias_1 }
478
-
479
- /**
480
- * Adds input rules for `codeBlock` nodes.
481
- *
482
- * @public
483
- */
484
- declare function defineCodeBlockInputRule(): PlainExtension;
485
- export { defineCodeBlockInputRule }
486
- export { defineCodeBlockInputRule as defineCodeBlockInputRule_alias_1 }
487
-
488
- /**
489
- * Defines the keymap for code blocks.
490
- */
491
- declare function defineCodeBlockKeymap(): PlainExtension;
492
- export { defineCodeBlockKeymap }
493
- export { defineCodeBlockKeymap as defineCodeBlockKeymap_alias_1 }
494
-
495
- /**
496
- * Adds syntax highlighting to code blocks using the [Shiki](https://github.com/shikijs/shiki) package.
497
- *
498
- * @param options - The options to configure the Shiki highlighter.
499
- *
500
- * @public
501
- */
502
- declare function defineCodeBlockShiki({ themes, langs, ...rest }?: CodeBlockShikiOptions): Extension;
503
- export { defineCodeBlockShiki }
504
- export { defineCodeBlockShiki as defineCodeBlockShiki_alias_1 }
505
-
506
- /**
507
- * Defines the `codeBlock` node spec.
508
- *
509
- * @public
510
- */
511
- declare function defineCodeBlockSpec(): CodeBlockSpecExtension;
512
- export { defineCodeBlockSpec }
513
- export { defineCodeBlockSpec as defineCodeBlockSpec_alias_1 }
514
-
515
- /**
516
- * @internal
517
- */
518
- declare function defineCodeCommands(): CodeCommandsExtension;
519
- export { defineCodeCommands }
520
- export { defineCodeCommands as defineCodeCommands_alias_1 }
521
-
522
- /**
523
- * @internal
524
- */
525
- declare function defineCodeInputRule(): PlainExtension;
526
- export { defineCodeInputRule }
527
- export { defineCodeInputRule as defineCodeInputRule_alias_1 }
528
-
529
- /**
530
- * @internal
531
- */
532
- declare function defineCodeKeymap(): PlainExtension;
533
- export { defineCodeKeymap }
534
- export { defineCodeKeymap as defineCodeKeymap_alias_1 }
535
-
536
- /**
537
- * @internal
538
- */
539
- declare function defineCodeSpec(): CodeSpecExtension;
540
- export { defineCodeSpec }
541
- export { defineCodeSpec as defineCodeSpec_alias_1 }
542
-
543
- /**
544
- * Define an extension that can record the changes in the editor.
545
- */
546
- export declare function defineCommitRecorder(commitRecorder: CommitRecorder): PlainExtension;
547
-
548
- /**
549
- * Define an extension to display the changes from the given commit in the editor.
550
- */
551
- export declare function defineCommitViewer(commit: Commit): PlainExtension;
552
-
553
- /**
554
- * Show up a decoration at the drop position when something is dragged over the editor.
555
- *
556
- * See [prosemirror-dropcursor](https://github.com/ProseMirror/prosemirror-dropcursor) for more information.
557
- *
558
- * @public
559
- */
560
- declare function defineDropCursor(options?: DropCursorOptions): DropCursorExtension;
561
- export { defineDropCursor }
562
- export { defineDropCursor as defineDropCursor_alias_1 }
563
-
564
- /**
565
- * Defines an enter rule. An enter rule applies when the text directly in front of
566
- * the cursor matches `regex` and user presses Enter. The `regex` should end
567
- * with `$`.
568
- *
569
- * @param options
570
- *
571
- * @public
572
- */
573
- export declare function defineEnterRule({ regex, handler, stop, }: EnterRuleOptions): PlainExtension;
574
-
575
- /**
576
- * Capture clicks near and arrow-key-motion past places that don't have a
577
- * normally selectable position nearby, and create a gap cursor selection for
578
- * them. The cursor is drawn as an element with class `ProseMirror-gapcursor`.
579
- *
580
- * You can either include `prosekit/extensions/gap-cursor.css` or add your own
581
- * styles to make it visible.
582
- *
583
- * See
584
- * [prosemirror-gapcursor](https://github.com/ProseMirror/prosemirror-gapcursor)
585
- * for more information.
586
- *
587
- * @public
588
- */
589
- declare function defineGapCursor(): GapCursorExtension;
590
- export { defineGapCursor }
591
- export { defineGapCursor as defineGapCursor_alias_1 }
592
-
593
- /**
594
- * @public
595
- */
596
- declare function defineHeading(): HeadingExtension;
597
- export { defineHeading }
598
- export { defineHeading as defineHeading_alias_1 }
599
-
600
- /**
601
- * @internal
602
- */
603
- declare function defineHeadingCommands(): HeadingCommandsExtension;
604
- export { defineHeadingCommands }
605
- export { defineHeadingCommands as defineHeadingCommands_alias_1 }
606
-
607
- /**
608
- * Converts the text block to a heading when `#` is typed at the start of a new
609
- * line followed by a space.
610
- *
611
- * @internal
612
- */
613
- declare function defineHeadingInputRule(): PlainExtension;
614
- export { defineHeadingInputRule }
615
- export { defineHeadingInputRule as defineHeadingInputRule_alias_1 }
616
-
617
- /**
618
- * @internal
619
- */
620
- declare function defineHeadingKeymap(): PlainExtension;
621
- export { defineHeadingKeymap }
622
- export { defineHeadingKeymap as defineHeadingKeymap_alias_1 }
623
-
624
- /**
625
- * @internal
626
- */
627
- declare function defineHeadingSpec(): HeadingSpecExtension;
628
- export { defineHeadingSpec }
629
- export { defineHeadingSpec as defineHeadingSpec_alias_1 }
630
-
631
- /**
632
- * @public
633
- */
634
- declare function defineHorizontalRule(): HorizontalRuleExtension;
635
- export { defineHorizontalRule }
636
- export { defineHorizontalRule as defineHorizontalRule_alias_1 }
637
-
638
- declare function defineHorizontalRuleCommands(): HorizontalRuleCommandsExtension;
639
- export { defineHorizontalRuleCommands }
640
- export { defineHorizontalRuleCommands as defineHorizontalRuleCommands_alias_1 }
641
-
642
- /**
643
- * @public
644
- */
645
- declare function defineHorizontalRuleInputRule(): PlainExtension;
646
- export { defineHorizontalRuleInputRule }
647
- export { defineHorizontalRuleInputRule as defineHorizontalRuleInputRule_alias_1 }
648
-
649
- declare function defineHorizontalRuleSpec(): HorizontalRuleSpecExtension;
650
- export { defineHorizontalRuleSpec }
651
- export { defineHorizontalRuleSpec as defineHorizontalRuleSpec_alias_1 }
652
-
653
- /**
654
- * @public
655
- */
656
- declare function defineImage(): ImageExtension;
657
- export { defineImage }
658
- export { defineImage as defineImage_alias_1 }
659
-
660
- /**
661
- * @internal
662
- */
663
- declare function defineImageCommands(): ImageCommandsExtension;
664
- export { defineImageCommands }
665
- export { defineImageCommands as defineImageCommands_alias_1 }
666
-
667
- /**
668
- * @internal
669
- */
670
- declare function defineImageSpec(): ImageSpecExtension;
671
- export { defineImageSpec }
672
- export { defineImageSpec as defineImageSpec_alias_1 }
673
-
674
- /**
675
- * Defines an input rule extension.
676
- *
677
- * @param rule - The ProseMirror input rule to add.
678
- *
679
- * @public
680
- */
681
- export declare function defineInputRule(rule: InputRule): PlainExtension;
682
-
683
- /**
684
- * @public
685
- */
686
- declare function defineItalic(): ItalicExtension;
687
- export { defineItalic }
688
- export { defineItalic as defineItalic_alias_1 }
689
-
690
- /**
691
- * @internal
692
- */
693
- declare function defineItalicCommands(): ItalicCommandsExtension;
694
- export { defineItalicCommands }
695
- export { defineItalicCommands as defineItalicCommands_alias_1 }
696
-
697
- /**
698
- * @internal
699
- */
700
- declare function defineItalicInputRule(): PlainExtension;
701
- export { defineItalicInputRule }
702
- export { defineItalicInputRule as defineItalicInputRule_alias_1 }
703
-
704
- /**
705
- * @internal
706
- */
707
- declare function defineItalicKeymap(): PlainExtension;
708
- export { defineItalicKeymap }
709
- export { defineItalicKeymap as defineItalicKeymap_alias_1 }
710
-
711
- /**
712
- * @internal
713
- */
714
- declare function defineItalicSpec(): ItalicSpecExtension;
715
- export { defineItalicSpec }
716
- export { defineItalicSpec as defineItalicSpec_alias_1 }
717
-
718
- /**
719
- * @public
720
- */
721
- export declare function defineLink(): LinkExtension;
722
-
723
- export declare function defineLinkCommands(): LinkCommandsExtension;
724
-
725
- /**
726
- * Apply link marks after typing Enter.
727
- *
728
- * @internal
729
- */
730
- export declare function defineLinkEnterRule(): PlainExtension;
731
-
732
- /**
733
- * Apply link marks after pressing Space.
734
- *
735
- * @internal
736
- */
737
- export declare function defineLinkInputRule(): PlainExtension;
738
-
739
- /**
740
- * Apply and remove link marks to the text during typing.
741
- *
742
- * @internal
743
- */
744
- export declare function defineLinkMarkRule(): Extension<ExtensionTyping<any, any, any>>;
745
-
746
- /**
747
- * @internal
748
- */
749
- export declare function defineLinkSpec(): LinkSpecExtension;
750
-
751
- /**
752
- * @public
753
- */
754
- declare function defineList(): ListExtension;
755
- export { defineList }
756
- export { defineList as defineList_alias_1 }
757
-
758
- /**
759
- * Defines list commands.
760
- *
761
- * @internal
762
- */
763
- declare function defineListCommands(): ListCommandsExtension;
764
- export { defineListCommands }
765
- export { defineListCommands as defineListCommands_alias_1 }
766
- export { defineListCommands as defineListCommands_alias_2 }
767
-
768
- /**
769
- * @internal
770
- */
771
- declare function defineListInputRules(): Extension;
772
- export { defineListInputRules }
773
- export { defineListInputRules as defineListInputRules_alias_1 }
774
- export { defineListInputRules as defineListInputRules_alias_2 }
775
-
776
- /**
777
- * Returns a extension that adds key bindings for list.
778
- *
779
- * @internal
780
- */
781
- declare function defineListKeymap(): PlainExtension;
782
- export { defineListKeymap }
783
- export { defineListKeymap as defineListKeymap_alias_1 }
784
- export { defineListKeymap as defineListKeymap_alias_2 }
785
-
786
- /**
787
- * @internal
788
- */
789
- declare function defineListPlugins(): PlainExtension;
790
- export { defineListPlugins }
791
- export { defineListPlugins as defineListPlugins_alias_1 }
792
- export { defineListPlugins as defineListPlugins_alias_2 }
793
-
794
- /**
795
- * @internal
796
- */
797
- declare function defineListSpec(): ListSpecExtension;
798
- export { defineListSpec }
799
- export { defineListSpec as defineListSpec_alias_1 }
800
- export { defineListSpec as defineListSpec_alias_2 }
801
-
802
- /**
803
- * @public
804
- */
805
- declare function defineLoro(options: LoroOptions): LoroExtension;
806
- export { defineLoro }
807
- export { defineLoro as defineLoro_alias_1 }
808
-
809
- declare function defineLoroCommands(): LoroCommandsExtension;
810
- export { defineLoroCommands }
811
- export { defineLoroCommands as defineLoroCommands_alias_1 }
812
- export { defineLoroCommands as defineLoroCommands_alias_2 }
813
-
814
- declare function defineLoroCursorPlugin(options: LoroCursorOptions): PlainExtension;
815
- export { defineLoroCursorPlugin }
816
- export { defineLoroCursorPlugin as defineLoroCursorPlugin_alias_1 }
817
- export { defineLoroCursorPlugin as defineLoroCursorPlugin_alias_2 }
818
-
819
- declare function defineLoroKeymap(): PlainExtension;
820
- export { defineLoroKeymap }
821
- export { defineLoroKeymap as defineLoroKeymap_alias_1 }
822
- export { defineLoroKeymap as defineLoroKeymap_alias_2 }
823
-
824
- declare function defineLoroSyncPlugin(options: LoroSyncPluginProps): PlainExtension;
825
- export { defineLoroSyncPlugin }
826
- export { defineLoroSyncPlugin as defineLoroSyncPlugin_alias_1 }
827
- export { defineLoroSyncPlugin as defineLoroSyncPlugin_alias_2 }
828
-
829
- declare function defineLoroUndoPlugin(options: LoroUndoPluginProps): PlainExtension;
830
- export { defineLoroUndoPlugin }
831
- export { defineLoroUndoPlugin as defineLoroUndoPlugin_alias_1 }
832
- export { defineLoroUndoPlugin as defineLoroUndoPlugin_alias_2 }
833
-
834
- /**
835
- * Defines an input rule for automatically adding inline marks when a given
836
- * pattern is typed.
837
- *
838
- * @public
839
- */
840
- export declare function defineMarkInputRule(options: MarkInputRuleOptions): PlainExtension;
841
-
842
- /**
843
- * A mark rule is something that can automatically apply marks to text if it
844
- * matches a certain pattern, and remove them if it doesn't match anymore.
845
- */
846
- declare function defineMarkRule(options: MarkRuleOptions): Extension<ExtensionTyping<any, any, any>>;
847
- export { defineMarkRule }
848
- export { defineMarkRule as defineMarkRule_alias_1 }
849
-
850
- /**
851
- * @public
852
- */
853
- export declare function defineMention(): Union<readonly [Extension< {
854
- Nodes: {
855
- mention: MentionAttrs;
856
- };
857
- }>, Extension< {
858
- Commands: {
859
- insertMention: [attrs: MentionAttrs];
860
- };
861
- }>]>;
862
-
863
- export declare function defineMentionCommands(): Extension< {
864
- Commands: {
865
- insertMention: [attrs: MentionAttrs];
866
- };
867
- }>;
868
-
869
- /**
870
- * @public
871
- */
872
- export declare function defineMentionSpec(): Extension< {
873
- Nodes: {
874
- mention: MentionAttrs;
875
- };
876
- }>;
877
-
878
- /**
879
- * By default, clicking a node while holding the mod key will select the node. This
880
- * extension disables that behavior.
881
- *
882
- * @public
883
- */
884
- export declare function defineModClickPrevention(): ModClickPreventionExtension;
885
-
886
- /**
887
- * Add a placeholder text to the editor when the current block or document is
888
- * empty.
889
- */
890
- export declare function definePlaceholder(options: PlaceholderOptions): PlainExtension;
891
-
892
- /**
893
- * Make the editor read-only.
894
- */
895
- export declare function defineReadonly(): PlainExtension;
896
-
897
- /**
898
- * Defines commands for search and replace.
899
- *
900
- * @public
901
- */
902
- export declare function defineSearchCommands(): Extension< {
903
- Commands: {
904
- findNext: [];
905
- findPrev: [];
906
- findNextNoWrap: [];
907
- findPrevNoWrap: [];
908
- replaceNext: [];
909
- replaceNextNoWrap: [];
910
- replaceCurrent: [];
911
- replaceAll: [];
912
- };
913
- }>;
914
-
915
- /**
916
- * Defines an extension that stores a current search query and replace string.
917
- *
918
- * @public
919
- */
920
- export declare function defineSearchQuery(options: SearchQueryOptions): PlainExtension;
921
-
922
- /**
923
- * @public
924
- */
925
- export declare function defineStrike(): StrikeExtension;
926
-
927
- /**
928
- * @internal
929
- */
930
- export declare function defineStrikeCommands(): StrikeCommandsExtension;
931
-
932
- /**
933
- * @internal
934
- */
935
- export declare function defineStrikeInputRule(): PlainExtension;
936
-
937
- /**
938
- * @internal
939
- */
940
- export declare function defineStrikeKeymap(): PlainExtension;
941
-
942
- /**
943
- * @internal
944
- */
945
- export declare function defineStrikeSpec(): StrikeSpecExtension;
946
-
947
- /**
948
- * @public
949
- */
950
- declare function defineTable(): TableExtension;
951
- export { defineTable }
952
- export { defineTable as defineTable_alias_1 }
953
-
954
- /**
955
- * @internal
956
- */
957
- declare function defineTableCellSpec(): TableCellSpecExtension;
958
- export { defineTableCellSpec }
959
- export { defineTableCellSpec as defineTableCellSpec_alias_1 }
960
-
961
- /**
962
- * Adds commands for working with `table` nodes.
963
- *
964
- * @public
965
- */
966
- declare function defineTableCommands(): TableCommandsExtension;
967
- export { defineTableCommands }
968
- export { defineTableCommands as defineTableCommands_alias_1 }
969
-
970
- declare function defineTableHeaderCellSpec(): TableHeaderCellSpecExtension;
971
- export { defineTableHeaderCellSpec }
972
- export { defineTableHeaderCellSpec as defineTableHeaderCellSpec_alias_1 }
973
-
974
- /**
975
- * @public
976
- */
977
- declare function defineTablePlugins(): PlainExtension;
978
- export { defineTablePlugins }
979
- export { defineTablePlugins as defineTablePlugins_alias_1 }
980
-
981
- /**
982
- * @internal
983
- */
984
- declare function defineTableRowSpec(): TableRowSpecExtension;
985
- export { defineTableRowSpec }
986
- export { defineTableRowSpec as defineTableRowSpec_alias_1 }
987
-
988
- /**
989
- * @internal
990
- */
991
- declare function defineTableSpec(): TableSpecExtension;
992
- export { defineTableSpec }
993
- export { defineTableSpec as defineTableSpec_alias_1 }
994
-
995
- /**
996
- * @internal
997
- */
998
- export declare function defineTestExtension(): Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension, PlainExtension, BaseCommandsExtension, ItalicExtension, BoldExtension, UnderlineExtension, StrikeExtension, CodeExtension, LinkExtension, ImageExtension, Extension<{
999
- Nodes: {
1000
- paragraph: Attrs_2;
1001
- };
1002
- }>, TableExtension, HorizontalRuleExtension]>;
1003
-
1004
- /**
1005
- * Adds a `textAlign` attribute to the specified nodes. This will be rendered as
1006
- * a CSS `text-align` style.
1007
- *
1008
- * @public
1009
- */
1010
- export declare function defineTextAlign<NodeName extends string = string>(options: TextAlignOptions<NodeName>): TextAlignExtension<NodeName>;
1011
-
1012
- /**
1013
- * @internal
1014
- */
1015
- export declare function defineTextAlignCommands(types: string[]): TextAlignCommandsExtension;
1016
-
1017
- /**
1018
- * @internal
1019
- */
1020
- export declare function defineTextAlignKeymap(types: string[]): PlainExtension;
1021
-
1022
- /**
1023
- * Defines an enter rule that replaces the matched text with a block node.
1024
- *
1025
- * See also {@link defineEnterRule}.
1026
- *
1027
- * @param options
1028
- *
1029
- * @public
1030
- */
1031
- export declare function defineTextBlockEnterRule({ regex, type, attrs, stop, }: TextBlockEnterRuleOptions): PlainExtension;
1032
-
1033
- /**
1034
- * Defines an input rule that changes the type of a textblock when the matched
1035
- * text is typed into it.
1036
- *
1037
- * See also [textblockTypeInputRule](https://prosemirror.net/docs/ref/#inputrules.textblockTypeInputRule)
1038
- *
1039
- * @param options
1040
- *
1041
- * @public
1042
- */
1043
- export declare function defineTextBlockInputRule({ regex, type, attrs, }: {
1044
- /**
1045
- * The regular expression to match against, which should end with `$`. It
1046
- * usually also starts with `^` to that it is only matched at the start of a
1047
- * textblock.
1048
- */
1049
- regex: RegExp;
1050
- /**
1051
- * The node type to replace the matched text with.
1052
- */
1053
- type: string | NodeType;
1054
- /**
1055
- * Attributes to set on the node.
1056
- */
1057
- attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
1058
- }): PlainExtension;
1059
-
1060
- /**
1061
- * @public
1062
- */
1063
- export declare function defineUnderline(): UnderlineExtension;
1064
-
1065
- /**
1066
- * @internal
1067
- */
1068
- export declare function defineUnderlineCommands(): UnderlineCommandsExtension;
1069
-
1070
- /**
1071
- * @internal
1072
- */
1073
- export declare function defineUnderlineKeymap(): PlainExtension;
1074
-
1075
- /**
1076
- * @internal
1077
- */
1078
- export declare function defineUnderlineSpec(): UnderlineSpecExtension;
1079
-
1080
- /**
1081
- * Shows a virtual selection when the editor is not focused. When the editor is
1082
- * not focused, the selected inline content will be wrapped in a `<span>`
1083
- * element with the class `prosekit-virtual-selection`.
1084
- *
1085
- * This is useful when you want to move the focus to an element outside the
1086
- * editor, but still want to show the selection.
1087
- *
1088
- * @public
1089
- */
1090
- export declare function defineVirtualSelection(): VirtualSelectionExtension;
1091
-
1092
- /**
1093
- * Defines an input rule for automatically wrapping a textblock when a given
1094
- * string is typed.
1095
- *
1096
- * See also [wrappingInputRule](https://prosemirror.net/docs/ref/#inputrules.wrappingInputRule)
1097
- *
1098
- * @param options
1099
- *
1100
- * @public
1101
- */
1102
- export declare function defineWrappingInputRule({ regex, type, attrs, join, }: {
1103
- /**
1104
- * The regular expression to match against, which should end with `$`. It
1105
- * usually also starts with `^` to that it is only matched at the start of a
1106
- * textblock.
1107
- */
1108
- regex: RegExp;
1109
- /**
1110
- * The type of node to wrap in.
1111
- */
1112
- type: string | NodeType;
1113
- /**
1114
- * Attributes to set on the node.
1115
- */
1116
- attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
1117
- /**
1118
- * By default, if there's a node with the same type above the newly wrapped
1119
- * node, the rule will try to
1120
- * [join](https://prosemirror.net/docs/ref/#transform.Transform.join) those
1121
- * two nodes. You can pass a join predicate, which takes a regular expression
1122
- * match and the node before the wrapped node, and can return a boolean to
1123
- * indicate whether a join should happen.
1124
- */
1125
- join?: (match: RegExpMatchArray, node: ProseMirrorNode) => boolean;
1126
- }): PlainExtension;
1127
-
1128
- /**
1129
- * @public
1130
- */
1131
- declare function defineYjs(options: YjsOptions): YjsExtension;
1132
- export { defineYjs }
1133
- export { defineYjs as defineYjs_alias_1 }
1134
-
1135
- declare function defineYjsCommands(): YjsCommandsExtension;
1136
- export { defineYjsCommands }
1137
- export { defineYjsCommands as defineYjsCommands_alias_1 }
1138
-
1139
- declare function defineYjsCursorPlugin(options: YjsCursorOptions): PlainExtension;
1140
- export { defineYjsCursorPlugin }
1141
- export { defineYjsCursorPlugin as defineYjsCursorPlugin_alias_1 }
1142
-
1143
- declare function defineYjsKeymap(): PlainExtension;
1144
- export { defineYjsKeymap }
1145
- export { defineYjsKeymap as defineYjsKeymap_alias_1 }
1146
-
1147
- declare function defineYjsSyncPlugin(options: YjsSyncOptions): PlainExtension;
1148
- export { defineYjsSyncPlugin }
1149
- export { defineYjsSyncPlugin as defineYjsSyncPlugin_alias_1 }
1150
-
1151
- declare function defineYjsUndoPlugin(options: YjsUndoOptions): PlainExtension;
1152
- export { defineYjsUndoPlugin }
1153
- export { defineYjsUndoPlugin as defineYjsUndoPlugin_alias_1 }
1154
-
1155
- /**
1156
- * @internal
1157
- */
1158
- declare type DropCursorExtension = PlainExtension;
1159
- export { DropCursorExtension }
1160
- export { DropCursorExtension as DropCursorExtension_alias_1 }
1161
-
1162
- declare interface DropCursorOptions {
1163
- /**
1164
- * The color of the cursor. Use `false` to apply no color and rely only on class.
1165
- *
1166
- * @default 'black'
1167
- */
1168
- color?: string | false;
1169
- /**
1170
- * The precise width of the cursor in pixels.
1171
- *
1172
- * @default 1
1173
- */
1174
- width?: number;
1175
- /**
1176
- * A CSS class name to add to the cursor element.
1177
- */
1178
- class?: string;
1179
- }
1180
- export { DropCursorOptions }
1181
- export { DropCursorOptions as DropCursorOptions_alias_1 }
1182
-
1183
- /**
1184
- * @public
1185
- */
1186
- export declare type EnterRuleHandler = (options: {
1187
- /**
1188
- * The current editor state.
1189
- */
1190
- state: EditorState;
1191
- /**
1192
- * The start position of the matched text.
1193
- */
1194
- from: number;
1195
- /**
1196
- * The end position of the matched text.
1197
- */
1198
- to: number;
1199
- /**
1200
- * The matched result from the regular expression.
1201
- */
1202
- match: RegExpExecArray;
1203
- }) => Transaction | null;
1204
-
1205
- /**
1206
- * Options for {@link defineEnterRule}.
1207
- *
1208
- * @public
1209
- */
1210
- export declare type EnterRuleOptions = {
1211
- /**
1212
- * The regular expression to match against. It should end with `$`.
1213
- */
1214
- regex: RegExp;
1215
- /**
1216
- * A function to be called when an enter rule is triggered.
1217
- */
1218
- handler: EnterRuleHandler;
1219
- /**
1220
- * Whether to stop further handlers from being called if this rule is triggered.
1221
- *
1222
- * @default false
1223
- */
1224
- stop?: boolean;
1225
- };
1226
-
1227
- /**
1228
- * When the selection is in a table node, create a default block after the table
1229
- * table, and move the cursor there.
1230
- *
1231
- * @public
1232
- */
1233
- declare const exitTable: Command;
1234
- export { exitTable }
1235
- export { exitTable as exitTable_alias_1 }
1236
-
1237
- /**
1238
- * Try to find a resolved pos of a cell by using the given pos as a hit point.
1239
- *
1240
- * @internal
1241
- */
1242
- export declare function findCellPos(doc: ProseMirrorNode, pos: number): ResolvedPos | undefined;
1243
-
1244
- /**
1245
- * Try to find the anchor and head cell in the same table by using the given
1246
- * anchor and head as hit points, or fallback to the selection's anchor and
1247
- * head.
1248
- *
1249
- * @internal
1250
- */
1251
- export declare function findCellRange(selection: Selection_2, anchorHit?: number, headHit?: number): [ResolvedPos, ResolvedPos] | undefined;
1252
-
1253
- export declare function findTable($pos: ResolvedPos): FindParentNodeResult | undefined;
1254
-
1255
- export { GapCursor }
1256
-
1257
- /**
1258
- * @internal
1259
- */
1260
- declare type GapCursorExtension = PlainExtension;
1261
- export { GapCursorExtension }
1262
- export { GapCursorExtension as GapCursorExtension_alias_1 }
1263
-
1264
- export declare function getCheckRanges(transactions: readonly Transaction[], oldState: EditorState, newState: EditorState): Array<[number, number]>;
1265
-
1266
- export declare function getPluginState(state: EditorState): PredictionPluginState | undefined;
1267
-
1268
- export declare function getTrMeta(tr: Transaction): PredictionPluginState;
1269
-
1270
- declare interface HeadingAttrs {
1271
- level: number;
1272
- }
1273
- export { HeadingAttrs }
1274
- export { HeadingAttrs as HeadingAttrs_alias_1 }
1275
-
1276
- /**
1277
- * @internal
1278
- */
1279
- declare type HeadingCommandsExtension = Extension<{
1280
- Commands: {
1281
- setHeading: [attrs?: HeadingAttrs | undefined];
1282
- insertHeading: [attrs?: HeadingAttrs | undefined];
1283
- toggleHeading: [attrs?: HeadingAttrs | undefined];
1284
- };
1285
- }>;
1286
- export { HeadingCommandsExtension }
1287
- export { HeadingCommandsExtension as HeadingCommandsExtension_alias_1 }
1288
-
1289
- /**
1290
- * @internal
1291
- */
1292
- declare type HeadingExtension = Union<[
1293
- HeadingSpecExtension,
1294
- HeadingCommandsExtension
1295
- ]>;
1296
- export { HeadingExtension }
1297
- export { HeadingExtension as HeadingExtension_alias_1 }
1298
-
1299
- /**
1300
- * @internal
1301
- */
1302
- declare type HeadingSpecExtension = Extension<{
1303
- Nodes: {
1304
- heading: HeadingAttrs;
1305
- };
1306
- }>;
1307
- export { HeadingSpecExtension }
1308
- export { HeadingSpecExtension as HeadingSpecExtension_alias_1 }
1309
-
1310
- declare interface HighlighterOptions extends Omit<ShikiHighlighterOptions, 'langs' | 'themes'> {
1311
- themes: BundledTheme[];
1312
- langs: (BundledLanguage | SpecialLanguage)[];
1313
- }
1314
- export { HighlighterOptions }
1315
- export { HighlighterOptions as HighlighterOptions_alias_1 }
1316
-
1317
- export declare type HighlighterResult = {
1318
- highlighter: Highlighter;
1319
- promise?: undefined;
1320
- } | {
1321
- highlighter?: undefined;
1322
- promise: Promise<void>;
1323
- };
1324
-
1325
- /**
1326
- * @public
1327
- *
1328
- * An alias for the `Parser` type from the `prosemirror-highlight` package.
1329
- */
1330
- declare type HighlightParser = Parser;
1331
- export { HighlightParser }
1332
- export { HighlightParser as HighlightParser_alias_1 }
1333
-
1334
- declare type HorizontalRuleCommandsExtension = Extension<{
1335
- Commands: {
1336
- insertHorizontalRule: [];
1337
- };
1338
- }>;
1339
- export { HorizontalRuleCommandsExtension }
1340
- export { HorizontalRuleCommandsExtension as HorizontalRuleCommandsExtension_alias_1 }
1341
-
1342
- declare type HorizontalRuleExtension = Union<[
1343
- HorizontalRuleSpecExtension,
1344
- HorizontalRuleCommandsExtension
1345
- ]>;
1346
- export { HorizontalRuleExtension }
1347
- export { HorizontalRuleExtension as HorizontalRuleExtension_alias_1 }
1348
-
1349
- declare type HorizontalRuleSpecExtension = Extension<{
1350
- Nodes: {
1351
- horizontalRule: Attrs;
1352
- };
1353
- }>;
1354
- export { HorizontalRuleSpecExtension }
1355
- export { HorizontalRuleSpecExtension as HorizontalRuleSpecExtension_alias_1 }
1356
-
1357
- /**
1358
- * @public
1359
- */
1360
- declare interface ImageAttrs {
1361
- src?: string | null;
1362
- }
1363
- export { ImageAttrs }
1364
- export { ImageAttrs as ImageAttrs_alias_1 }
1365
-
1366
- /**
1367
- * @internal
1368
- */
1369
- declare type ImageCommandsExtension = Extension<{
1370
- Commands: {
1371
- insertImage: [attrs?: ImageAttrs];
1372
- };
1373
- }>;
1374
- export { ImageCommandsExtension }
1375
- export { ImageCommandsExtension as ImageCommandsExtension_alias_1 }
1376
-
1377
- /**
1378
- * @internal
1379
- */
1380
- declare type ImageExtension = Union<[ImageSpecExtension, ImageCommandsExtension]>;
1381
- export { ImageExtension }
1382
- export { ImageExtension as ImageExtension_alias_1 }
1383
-
1384
- /**
1385
- * @internal
1386
- */
1387
- declare type ImageSpecExtension = Extension<{
1388
- Nodes: {
1389
- image: ImageAttrs;
1390
- };
1391
- }>;
1392
- export { ImageSpecExtension }
1393
- export { ImageSpecExtension as ImageSpecExtension_alias_1 }
1394
-
1395
- export { IndentListOptions }
1396
- export { IndentListOptions as IndentListOptions_alias_1 }
1397
-
1398
- export declare function inputText(input: string): Promise<void>;
1399
-
1400
- /**
1401
- * Returns a command that inserts a horizontal rule at the current selection.
1402
- */
1403
- declare function insertHorizontalRule(): Command;
1404
- export { insertHorizontalRule }
1405
- export { insertHorizontalRule as insertHorizontalRule_alias_1 }
1406
-
1407
- /**
1408
- * Insert a table node with the given number of rows and columns, and optionally
1409
- * a header row.
1410
- *
1411
- * @param options
1412
- *
1413
- * @public
1414
- */
1415
- declare function insertTable(options: InsertTableOptions): Command;
1416
- export { insertTable }
1417
- export { insertTable as insertTable_alias_1 }
1418
-
1419
- /**
1420
- * @public
1421
- */
1422
- declare interface InsertTableOptions {
1423
- row: number;
1424
- col: number;
1425
- header: boolean;
1426
- }
1427
- export { InsertTableOptions }
1428
- export { InsertTableOptions as InsertTableOptions_alias_1 }
1429
-
1430
- /**
1431
- * Checks if the given object is a `CellSelection` instance.
1432
- *
1433
- * @public
1434
- */
1435
- declare function isCellSelection(value: unknown): value is CellSelection;
1436
- export { isCellSelection }
1437
- export { isCellSelection as isCellSelection_alias_1 }
1438
-
1439
- /**
1440
- * @internal
1441
- */
1442
- declare type ItalicCommandsExtension = Extension<{
1443
- Commands: {
1444
- toggleItalic: [];
1445
- };
1446
- }>;
1447
- export { ItalicCommandsExtension }
1448
- export { ItalicCommandsExtension as ItalicCommandsExtension_alias_1 }
1449
-
1450
- /**
1451
- * @internal
1452
- */
1453
- declare type ItalicExtension = Union<[
1454
- ItalicSpecExtension,
1455
- ItalicCommandsExtension
1456
- ]>;
1457
- export { ItalicExtension }
1458
- export { ItalicExtension as ItalicExtension_alias_1 }
1459
-
1460
- /**
1461
- * @internal
1462
- */
1463
- declare type ItalicSpecExtension = Extension<{
1464
- Marks: {
1465
- italic: Attrs;
1466
- };
1467
- }>;
1468
- export { ItalicSpecExtension }
1469
- export { ItalicSpecExtension as ItalicSpecExtension_alias_1 }
1470
-
1471
- export declare const LINK_ENTER_RE: RegExp;
1472
-
1473
- export declare const LINK_INPUT_RE: RegExp;
1474
-
1475
- export declare const LINK_MARK_RE: RegExp;
1476
-
1477
- /**
1478
- * @public
1479
- */
1480
- export declare interface LinkAttrs {
1481
- href: string;
1482
- }
1483
-
1484
- /**
1485
- * @internal
1486
- */
1487
- export declare type LinkCommandsExtension = Extension<{
1488
- Commands: {
1489
- addLink: [LinkAttrs];
1490
- removeLink: [];
1491
- toggleLink: [LinkAttrs];
1492
- expandLink: [];
1493
- };
1494
- }>;
1495
-
1496
- /**
1497
- * @internal
1498
- */
1499
- export declare type LinkExtension = Union<[LinkSpecExtension, LinkCommandsExtension]>;
1500
-
1501
- /**
1502
- * @internal
1503
- */
1504
- export declare type LinkSpecExtension = Extension<{
1505
- Marks: {
1506
- link: LinkAttrs;
1507
- };
1508
- }>;
1509
-
1510
- /**
1511
- * The attributes of a list node.
1512
- *
1513
- * @public
1514
- */
1515
- declare interface ListAttrs {
1516
- /**
1517
- * The kind of list node.
1518
- */
1519
- kind?: 'bullet' | 'ordered' | 'task' | 'toggle';
1520
- /**
1521
- * The optional order of the list node.
1522
- */
1523
- order?: number | null;
1524
- /**
1525
- * Whether the list node is checked if its `kind` is `"task"`.
1526
- */
1527
- checked?: boolean;
1528
- /**
1529
- * Whether the list node is collapsed if its `kind` is `"toggle"`.
1530
- */
1531
- collapsed?: boolean;
1532
- }
1533
- export { ListAttrs }
1534
- export { ListAttrs as ListAttrs_alias_1 }
1535
- export { ListAttrs as ListAttrs_alias_2 }
1536
-
1537
- /**
1538
- * @internal
1539
- */
1540
- declare type ListCommandsExtension = Extension<{
1541
- Commands: {
1542
- dedentList: [options?: DedentListOptions];
1543
- indentList: [options?: IndentListOptions];
1544
- moveList: [direction: 'up' | 'down'];
1545
- splitList: [];
1546
- toggleCollapsed: [options?: ToggleCollapsedOptions];
1547
- unwrapList: [options?: UnwrapListOptions];
1548
- toggleList: [attrs?: ListAttributes];
1549
- wrapInList: [attrs?: ListAttributes];
1550
- insertList: [attrs?: ListAttributes];
1551
- };
1552
- }>;
1553
- export { ListCommandsExtension }
1554
- export { ListCommandsExtension as ListCommandsExtension_alias_1 }
1555
- export { ListCommandsExtension as ListCommandsExtension_alias_2 }
1556
-
1557
- export { ListDOMSerializer }
1558
- export { ListDOMSerializer as ListDOMSerializer_alias_1 }
1559
-
1560
- /**
1561
- * @internal
1562
- */
1563
- declare type ListExtension = Union<[ListSpecExtension, ListCommandsExtension]>;
1564
- export { ListExtension }
1565
- export { ListExtension as ListExtension_alias_1 }
1566
-
1567
- /**
1568
- * @internal
1569
- */
1570
- declare type ListSpecExtension = Extension<{
1571
- Nodes: {
1572
- list: ListAttrs;
1573
- };
1574
- }>;
1575
- export { ListSpecExtension }
1576
- export { ListSpecExtension as ListSpecExtension_alias_1 }
1577
- export { ListSpecExtension as ListSpecExtension_alias_2 }
1578
-
1579
- /**
1580
- * @internal
1581
- */
1582
- export declare type LoroCommandsExtension = Extension<{
1583
- Commands: {
1584
- undo: [];
1585
- redo: [];
1586
- };
1587
- }>;
1588
-
1589
- declare interface LoroCursorOptions {
1590
- awareness: CursorAwareness;
1591
- getSelection?: (state: EditorState) => Selection_2;
1592
- createCursor?: (user: PeerID) => Element;
1593
- createSelection?: (user: PeerID) => DecorationAttrs;
1594
- }
1595
- export { LoroCursorOptions }
1596
- export { LoroCursorOptions as LoroCursorOptions_alias_1 }
1597
- export { LoroCursorOptions as LoroCursorOptions_alias_2 }
1598
-
1599
- /**
1600
- * @internal
1601
- */
1602
- declare type LoroExtension = Union<[LoroCommandsExtension, PlainExtension]>;
1603
- export { LoroExtension }
1604
- export { LoroExtension as LoroExtension_alias_1 }
1605
-
1606
- declare interface LoroOptions {
1607
- /**
1608
- * The Loro instance handles the state of shared data.
1609
- */
1610
- doc: LoroDocType;
1611
- /**
1612
- * The Awareness instance.
1613
- */
1614
- awareness: CursorAwareness;
1615
- /**
1616
- * Extra options for `LoroSyncPlugin`.
1617
- */
1618
- sync?: Omit<LoroSyncPluginProps, 'doc'>;
1619
- /**
1620
- * Extra options for the `LoroUndoPlugin`.
1621
- */
1622
- undo?: Omit<LoroUndoPluginProps, 'doc'>;
1623
- /**
1624
- * Extra options for `LoroCursorPlugin`.
1625
- */
1626
- cursor?: Omit<LoroCursorOptions, 'awareness'>;
1627
- }
1628
- export { LoroOptions }
1629
- export { LoroOptions as LoroOptions_alias_1 }
1630
-
1631
- export { LoroSyncPluginProps }
1632
- export { LoroSyncPluginProps as LoroSyncPluginProps_alias_1 }
1633
-
1634
- export { LoroUndoPluginProps }
1635
- export { LoroUndoPluginProps as LoroUndoPluginProps_alias_1 }
1636
-
1637
- /**
1638
- * Options for {@link defineMarkInputRule}.
1639
- *
1640
- * @public
1641
- */
1642
- export declare interface MarkInputRuleOptions {
1643
- /**
1644
- * The regular expression to match against, which should end with `$` and has
1645
- * exactly one capture group. All other matched text outside the capture group
1646
- * will be deleted.
1647
- */
1648
- regex: RegExp;
1649
- /**
1650
- * The type of mark to set.
1651
- */
1652
- type: string | MarkType;
1653
- /**
1654
- * Attributes to set on the mark.
1655
- */
1656
- attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
1657
- }
1658
-
1659
- /**
1660
- * The options for {@link defineMarkRule}.
1661
- *
1662
- * @public
1663
- */
1664
- declare interface MarkRuleOptions {
1665
- /**
1666
- * The regular expression to match against. It must has a `g` flag to match
1667
- * all instances of the mark.
1668
- */
1669
- regex: RegExp;
1670
- /**
1671
- * The mark type to apply to the matched text.
1672
- */
1673
- type: string | MarkType;
1674
- /**
1675
- * Attributes to set on the mark. If a function is provided, it will be called
1676
- * with the matched result from the regular expression.
1677
- *
1678
- * @default null
1679
- */
1680
- attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
1681
- }
1682
- export { MarkRuleOptions }
1683
- export { MarkRuleOptions as MarkRuleOptions_alias_1 }
1684
-
1685
- declare type MatchHandler = (options: {
1686
- state: EditorState;
1687
- match: RegExpExecArray;
1688
- from: number;
1689
- to: number;
1690
- ignoreMatch: () => void;
1691
- deleteMatch: () => void;
1692
- }) => void;
1693
- export { MatchHandler }
1694
- export { MatchHandler as MatchHandler_alias_1 }
1695
-
1696
- export declare interface MentionAttrs {
1697
- id: string;
1698
- value: string;
1699
- kind: string;
1700
- }
1701
-
1702
- /**
1703
- * @internal
1704
- */
1705
- export declare type ModClickPreventionExtension = PlainExtension;
1706
-
1707
- export declare interface PlaceholderOptions {
1708
- /**
1709
- * The placeholder to use. It can be a static string or a function that
1710
- * receives the current editor state and returns a string.
1711
- */
1712
- placeholder: string | ((state: EditorState) => string);
1713
- /**
1714
- * By default, the placeholder text will be shown whenever the current text
1715
- * cursor is in an empty text node. If you only want to show the placeholder
1716
- * when the whole doc is empty, you can set this option to 'doc'.
1717
- *
1718
- * @default 'block'
1719
- */
1720
- strategy?: 'doc' | 'block';
1721
- }
1722
-
1723
- export declare const pluginKey: PluginKey<PredictionPluginState>;
1724
-
1725
- export declare interface PredictionPluginState {
1726
- active: boolean;
1727
- ignore: number | null;
1728
- matching: {
1729
- rule: AutocompleteRule;
1730
- from: number;
1731
- to: number;
1732
- match: RegExpExecArray;
1733
- } | null;
1734
- }
1735
-
1736
- /**
1737
- * @example
1738
- *
1739
- * ```ts
1740
- * await pressKey('mod-1')
1741
- * await pressKey('Backspace')
1742
- * ```
1743
- *
1744
- * @internal
1745
- */
1746
- export declare function pressKey(input: string): Promise<void>;
1747
-
1748
- /**
1749
- * @internal
1750
- */
1751
- export declare const redo: Command;
1752
-
1753
- /**
1754
- * Options for {@link defineSearchQuery}
1755
- *
1756
- * @public
1757
- */
1758
- export declare interface SearchQueryOptions {
1759
- /**
1760
- * The search string (or regular expression).
1761
- */
1762
- search: string;
1763
- /**
1764
- * The replace text.
1765
- */
1766
- replace?: string;
1767
- /**
1768
- * Indicates whether the search is case-sensitive
1769
- *
1770
- * @default false
1771
- */
1772
- caseSensitive?: boolean;
1773
- /**
1774
- * By default, string search will replace `\n`, `\r`, and `\t` in the query
1775
- * with newline, return, and tab characters. When this is set to true, that
1776
- * behavior is disabled.
1777
- *
1778
- * @default false
1779
- */
1780
- literal?: boolean;
1781
- /**
1782
- * When true, the search string is interpreted as a regular expression.
1783
- *
1784
- * @default false
1785
- */
1786
- regexp?: boolean;
1787
- /**
1788
- * Enable whole-word matching.
1789
- *
1790
- * @default false
1791
- */
1792
- wholeWord?: boolean;
1793
- }
1794
-
1795
- /**
1796
- * @public
1797
- */
1798
- declare function selectTable(options?: SelectTableOptions): Command;
1799
- export { selectTable }
1800
- export { selectTable as selectTable_alias_1 }
1801
-
1802
- /**
1803
- * @public
1804
- */
1805
- declare function selectTableCell(options?: SelectTableCellOptions): Command;
1806
- export { selectTableCell }
1807
- export { selectTableCell as selectTableCell_alias_1 }
1808
-
1809
- /**
1810
- * @public
1811
- */
1812
- declare interface SelectTableCellOptions {
1813
- /**
1814
- * A hit position of the table cell to select from. By default, the selection
1815
- * anchor will be used.
1816
- */
1817
- pos?: number;
1818
- }
1819
- export { SelectTableCellOptions }
1820
- export { SelectTableCellOptions as SelectTableCellOptions_alias_1 }
1821
-
1822
- /**
1823
- * @public
1824
- */
1825
- declare function selectTableColumn(options?: SelectTableColumnOptions): Command;
1826
- export { selectTableColumn }
1827
- export { selectTableColumn as selectTableColumn_alias_1 }
1828
-
1829
- /**
1830
- * @public
1831
- */
1832
- declare interface SelectTableColumnOptions {
1833
- /**
1834
- * A hit position of the table cell to select from. By default, the selection
1835
- * anchor will be used.
1836
- */
1837
- anchor?: number;
1838
- /**
1839
- * A hit position of the table cell to select to. By default, the selection
1840
- * head will be used.
1841
- */
1842
- head?: number;
1843
- }
1844
- export { SelectTableColumnOptions }
1845
- export { SelectTableColumnOptions as SelectTableColumnOptions_alias_1 }
1846
-
1847
- /**
1848
- * @public
1849
- */
1850
- declare interface SelectTableOptions {
1851
- /**
1852
- * A hit position of the table to select from. By default, the selection
1853
- * anchor will be used.
1854
- */
1855
- pos?: number;
1856
- }
1857
- export { SelectTableOptions }
1858
- export { SelectTableOptions as SelectTableOptions_alias_1 }
1859
-
1860
- /**
1861
- * @public
1862
- */
1863
- declare function selectTableRow(options?: SelectTableRowOptions): Command;
1864
- export { selectTableRow }
1865
- export { selectTableRow as selectTableRow_alias_1 }
1866
-
1867
- /**
1868
- * @public
1869
- */
1870
- declare interface SelectTableRowOptions {
1871
- /**
1872
- * A hit position of the table cell to select from. By default, the selection
1873
- * anchor will be used.
1874
- */
1875
- anchor?: number;
1876
- /**
1877
- * A hit position of the table cell to select to. By default, the selection
1878
- * head will be used.
1879
- */
1880
- head?: number;
1881
- }
1882
- export { SelectTableRowOptions }
1883
- export { SelectTableRowOptions as SelectTableRowOptions_alias_1 }
1884
-
1885
- /**
1886
- * @internal
1887
- */
1888
- export declare function setTextAlign({ types, value, }: {
1889
- types: string[];
1890
- value: string | null;
1891
- }): Command;
1892
-
1893
- export declare function setTrMeta(tr: Transaction, meta: PredictionPluginState): Transaction;
1894
-
1895
- /**
1896
- * @internal
1897
- */
1898
- export declare function setupTest(): {
1899
- editor: TestEditor<Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension, PlainExtension, BaseCommandsExtension, ItalicExtension, BoldExtension, UnderlineExtension, StrikeExtension, CodeExtension, LinkExtension, ImageExtension, Extension<{
1900
- Nodes: {
1901
- paragraph: Attrs_2;
1902
- };
1903
- }>, TableExtension, HorizontalRuleExtension]>>;
1904
- m: ToMarkAction<SimplifyDeeper< {
1905
- bold: {
1906
- readonly [x: string]: any;
1907
- };
1908
- code: {
1909
- readonly [x: string]: any;
1910
- };
1911
- italic: {
1912
- readonly [x: string]: any;
1913
- };
1914
- link: {
1915
- href: string;
1916
- };
1917
- strike: {
1918
- readonly [x: string]: any;
1919
- };
1920
- underline: {
1921
- readonly [x: string]: any;
1922
- };
1923
- }>>;
1924
- n: {
1925
- p: NodeAction< {
1926
- readonly [x: string]: any;
1927
- }>;
1928
- h1: (...children: NodeChild[]) => Node_2;
1929
- h2: (...children: NodeChild[]) => Node_2;
1930
- h3: (...children: NodeChild[]) => Node_2;
1931
- h4: (...children: NodeChild[]) => Node_2;
1932
- h5: (...children: NodeChild[]) => Node_2;
1933
- h6: (...children: NodeChild[]) => Node_2;
1934
- bullet: (...children: NodeChild[]) => Node_2;
1935
- ordered: (...children: NodeChild[]) => Node_2;
1936
- checked: (...children: NodeChild[]) => Node_2;
1937
- unchecked: (...children: NodeChild[]) => Node_2;
1938
- collapsed: (...children: NodeChild[]) => Node_2;
1939
- expanded: (...children: NodeChild[]) => Node_2;
1940
- doc: NodeAction< {
1941
- readonly [x: string]: any;
1942
- }>;
1943
- paragraph: NodeAction< {
1944
- readonly [x: string]: any;
1945
- }>;
1946
- text: NodeAction< {
1947
- readonly [x: string]: any;
1948
- }>;
1949
- blockquote: NodeAction< {
1950
- readonly [x: string]: any;
1951
- }>;
1952
- heading: NodeAction< {
1953
- level: number;
1954
- }>;
1955
- horizontalRule: NodeAction< {
1956
- readonly [x: string]: any;
1957
- }>;
1958
- image: NodeAction< {
1959
- src?: (string | null) | undefined;
1960
- }>;
1961
- list: NodeAction< {
1962
- kind?: ("bullet" | "ordered" | "task" | "toggle") | undefined;
1963
- order?: (number | null) | undefined;
1964
- checked?: boolean | undefined;
1965
- collapsed?: boolean | undefined;
1966
- }>;
1967
- table: NodeAction< {
1968
- readonly [x: string]: any;
1969
- }>;
1970
- tableRow: NodeAction< {
1971
- readonly [x: string]: any;
1972
- }>;
1973
- tableCell: NodeAction< {
1974
- colspan: number;
1975
- rowspan: number;
1976
- colwidth: number[] | null;
1977
- }>;
1978
- tableHeaderCell: NodeAction< {
1979
- colspan: number;
1980
- rowspan: number;
1981
- colwidth: number[] | null;
1982
- }>;
1983
- };
1984
- };
1985
-
1986
- /**
1987
- * @internal
1988
- */
1989
- export declare function setupTestFromExtension<E extends Extension>(extension: E): {
1990
- editor: TestEditor<E>;
1991
- n: ExtractNodeActions<E>;
1992
- m: ExtractMarkActions<E>;
1993
- };
1994
-
1995
- export declare interface ShikiHighlighterOptions extends BundledHighlighterOptions<BundledLanguage, BundledTheme> {
1996
- }
1997
-
1998
- /**
1999
- * @internal
2000
- */
2001
- export declare type StrikeCommandsExtension = Extension<{
2002
- Commands: {
2003
- toggleStrike: [];
2004
- };
2005
- }>;
2006
-
2007
- /**
2008
- * @internal
2009
- */
2010
- export declare type StrikeExtension = Union<[
2011
- StrikeSpecExtension,
2012
- StrikeCommandsExtension
2013
- ]>;
2014
-
2015
- /**
2016
- * @internal
2017
- */
2018
- export declare type StrikeSpecExtension = Extension<{
2019
- Marks: {
2020
- strike: Attrs;
2021
- };
2022
- }>;
2023
-
2024
- /**
2025
- * @internal
2026
- */
2027
- declare type TableCellSpecExtension = Extension<{
2028
- Nodes: {
2029
- tableCell: CellAttrs;
2030
- };
2031
- }>;
2032
- export { TableCellSpecExtension }
2033
- export { TableCellSpecExtension as TableCellSpecExtension_alias_1 }
2034
-
2035
- /**
2036
- * @internal
2037
- */
2038
- declare type TableCommandsExtension = Extension<{
2039
- Commands: {
2040
- insertTable: [InsertTableOptions];
2041
- exitTable: [];
2042
- selectTable: [options?: SelectTableOptions];
2043
- selectTableCell: [options?: SelectTableCellOptions];
2044
- selectTableColumn: [options?: SelectTableColumnOptions];
2045
- selectTableRow: [options?: SelectTableRowOptions];
2046
- addTableColumnBefore: [];
2047
- addTableColumnAfter: [];
2048
- addTableRowAbove: [];
2049
- addTableRowBelow: [];
2050
- deleteTable: [];
2051
- deleteTableColumn: [];
2052
- deleteTableRow: [];
2053
- deleteCellSelection: [];
2054
- mergeTableCells: [];
2055
- splitTableCell: [];
2056
- };
2057
- }>;
2058
- export { TableCommandsExtension }
2059
- export { TableCommandsExtension as TableCommandsExtension_alias_1 }
2060
-
2061
- /**
2062
- * @internal
2063
- */
2064
- declare type TableExtension = Union<[
2065
- TableSpecExtension,
2066
- TableRowSpecExtension,
2067
- TableCellSpecExtension,
2068
- TableHeaderCellSpecExtension,
2069
- TableCommandsExtension
2070
- ]>;
2071
- export { TableExtension }
2072
- export { TableExtension as TableExtension_alias_1 }
2073
-
2074
- /**
2075
- * @internal
2076
- */
2077
- declare type TableHeaderCellSpecExtension = Extension<{
2078
- Nodes: {
2079
- tableHeaderCell: CellAttrs;
2080
- };
2081
- }>;
2082
- export { TableHeaderCellSpecExtension }
2083
- export { TableHeaderCellSpecExtension as TableHeaderCellSpecExtension_alias_1 }
2084
-
2085
- /**
2086
- * @internal
2087
- */
2088
- declare type TableRowSpecExtension = Extension<{
2089
- Nodes: {
2090
- tableRow: Attrs;
2091
- };
2092
- }>;
2093
- export { TableRowSpecExtension }
2094
- export { TableRowSpecExtension as TableRowSpecExtension_alias_1 }
2095
-
2096
- /**
2097
- * @internal
2098
- */
2099
- declare type TableSpecExtension = Extension<{
2100
- Nodes: {
2101
- table: Attrs;
2102
- };
2103
- }>;
2104
- export { TableSpecExtension }
2105
- export { TableSpecExtension as TableSpecExtension_alias_1 }
2106
-
2107
- /**
2108
- * @internal
2109
- */
2110
- export declare type TextAlignAttrsExtension<NodeName extends string> = Extension<{
2111
- Nodes: {
2112
- [K in NodeName]: {
2113
- textAlign: string | null;
2114
- };
2115
- };
2116
- }>;
2117
-
2118
- /**
2119
- * @internal
2120
- */
2121
- export declare type TextAlignCommandsExtension = Extension<{
2122
- Commands: {
2123
- setTextAlign: [value: string | null];
2124
- };
2125
- }>;
2126
-
2127
- /**
2128
- * @internal
2129
- */
2130
- export declare type TextAlignExtension<NodeName extends string> = Union<[
2131
- TextAlignAttrsExtension<NodeName>,
2132
- TextAlignCommandsExtension
2133
- ]>;
2134
-
2135
- /**
2136
- * @public
2137
- */
2138
- export declare interface TextAlignOptions<NodeName extends string = string> {
2139
- /**
2140
- * The names of node to add the attribute to.
2141
- *
2142
- * @example
2143
- *
2144
- * ["paragraph", "heading"]
2145
- */
2146
- types: NodeName[];
2147
- /**
2148
- * The default value for the attribute.
2149
- *
2150
- * @default "left"
2151
- */
2152
- default?: string;
2153
- }
2154
-
2155
- /**
2156
- * Options for {@link defineTextBlockEnterRule}.
2157
- *
2158
- * @public
2159
- */
2160
- export declare type TextBlockEnterRuleOptions = {
2161
- /**
2162
- * The regular expression to match against. It should end with `$`.
2163
- */
2164
- regex: RegExp;
2165
- /**
2166
- * The node type to replace the matched text with.
2167
- */
2168
- type: string | NodeType;
2169
- /**
2170
- * Attributes to set on the node. If a function is provided, it will be called
2171
- * with the matched result from the regular expression.
2172
- */
2173
- attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
2174
- /**
2175
- * Whether to stop further handlers from being called if this rule is triggered.
2176
- *
2177
- * @default true
2178
- */
2179
- stop?: boolean;
2180
- };
2181
-
2182
- export { ToggleCollapsedOptions }
2183
- export { ToggleCollapsedOptions as ToggleCollapsedOptions_alias_1 }
2184
-
2185
- /**
2186
- * @internal
2187
- */
2188
- export declare type UnderlineCommandsExtension = Extension<{
2189
- Commands: {
2190
- toggleUnderline: [];
2191
- };
2192
- }>;
2193
-
2194
- /**
2195
- * @internal
2196
- */
2197
- export declare type UnderlineExtension = Union<[
2198
- UnderlineSpecExtension,
2199
- UnderlineCommandsExtension
2200
- ]>;
2201
-
2202
- /**
2203
- * @internal
2204
- */
2205
- export declare type UnderlineSpecExtension = Extension<{
2206
- Marks: {
2207
- underline: Attrs;
2208
- };
2209
- }>;
2210
-
2211
- /**
2212
- * @internal
2213
- */
2214
- export declare const undo: Command;
2215
-
2216
- export { UnwrapListOptions }
2217
- export { UnwrapListOptions as UnwrapListOptions_alias_1 }
2218
-
2219
- /**
2220
- * @internal
2221
- */
2222
- export declare type VirtualSelectionExtension = PlainExtension;
2223
-
2224
- export { WrapInListGetAttrs }
2225
- export { WrapInListGetAttrs as WrapInListGetAttrs_alias_1 }
2226
-
2227
- /**
2228
- * @internal
2229
- */
2230
- export declare type YjsCommandsExtension = Extension<{
2231
- Commands: {
2232
- undo: [];
2233
- redo: [];
2234
- };
2235
- }>;
2236
-
2237
- declare interface YjsCursorOptions extends YjsCursorPluginOptions {
2238
- awareness: Awareness;
2239
- }
2240
- export { YjsCursorOptions }
2241
- export { YjsCursorOptions as YjsCursorOptions_alias_1 }
2242
-
2243
- /**
2244
- * Options for `y-prosemirror`'s `yCursorPlugin`.
2245
- */
2246
- declare type YjsCursorPluginOptions = NonNullable<Parameters<typeof yCursorPlugin>[1]>;
2247
- export { YjsCursorPluginOptions }
2248
- export { YjsCursorPluginOptions as YjsCursorPluginOptions_alias_1 }
2249
-
2250
- /**
2251
- * @internal
2252
- */
2253
- declare type YjsExtension = Union<[YjsCommandsExtension, PlainExtension]>;
2254
- export { YjsExtension }
2255
- export { YjsExtension as YjsExtension_alias_1 }
2256
-
2257
- declare interface YjsOptions {
2258
- /**
2259
- * The Yjs instance handles the state of shared data.
2260
- */
2261
- doc: Y.Doc;
2262
- /**
2263
- * The Awareness instance.
2264
- */
2265
- awareness: Awareness;
2266
- /**
2267
- * The Yjs XmlFragment to use. If not provided,
2268
- * `doc.getXmlFragment('prosemirror')` will be used.
2269
- */
2270
- fragment?: Y.XmlFragment;
2271
- /**
2272
- * Options for `y-prosemirror`'s `ySyncPlugin`.
2273
- */
2274
- sync?: YjsSyncPluginOptions;
2275
- /**
2276
- * Options for the `y-prosemirror`'s `yUndoPlugin`.
2277
- */
2278
- undo?: YjsUndoPluginOptions;
2279
- /**
2280
- * Options for `y-prosemirror`'s `yCursorPlugin`.
2281
- */
2282
- cursor?: YjsCursorPluginOptions;
2283
- }
2284
- export { YjsOptions }
2285
- export { YjsOptions as YjsOptions_alias_1 }
2286
-
2287
- declare interface YjsSyncOptions extends YjsSyncPluginOptions {
2288
- fragment: Y.XmlFragment;
2289
- }
2290
- export { YjsSyncOptions }
2291
- export { YjsSyncOptions as YjsSyncOptions_alias_1 }
2292
-
2293
- /**
2294
- * Options for `y-prosemirror`'s `ySyncPlugin`.
2295
- */
2296
- declare type YjsSyncPluginOptions = NonNullable<Parameters<typeof ySyncPlugin>[1]>;
2297
- export { YjsSyncPluginOptions }
2298
- export { YjsSyncPluginOptions as YjsSyncPluginOptions_alias_1 }
2299
-
2300
- declare interface YjsUndoOptions extends YjsUndoPluginOptions {
2301
- }
2302
- export { YjsUndoOptions }
2303
- export { YjsUndoOptions as YjsUndoOptions_alias_1 }
2304
-
2305
- /**
2306
- * Options for the `y-prosemirror`'s `yUndoPlugin`.
2307
- */
2308
- declare type YjsUndoPluginOptions = NonNullable<Parameters<typeof yUndoPlugin>[0]>;
2309
- export { YjsUndoPluginOptions }
2310
- export { YjsUndoPluginOptions as YjsUndoPluginOptions_alias_1 }
2311
-
2312
- export { }
1
+ import { Attrs } from '@prosekit/pm/model';
2
+ import { Attrs as Attrs_2 } from 'prosemirror-model';
3
+ import type { Awareness } from 'y-protocols/awareness';
4
+ import { BaseCommandsExtension } from '@prosekit/core';
5
+ import type { BundledHighlighterOptions } from 'shiki';
6
+ import { BundledLanguage } from 'shiki';
7
+ import { BundledLanguageInfo } from 'shiki';
8
+ import { bundledLanguagesInfo } from 'shiki';
9
+ import { BundledTheme } from 'shiki';
10
+ import { BundledThemeInfo } from 'shiki';
11
+ import { bundledThemesInfo } from 'shiki';
12
+ import { CellSelection } from 'prosemirror-tables';
13
+ import { Command } from '@prosekit/pm/state';
14
+ import { CursorAwareness } from 'loro-prosemirror';
15
+ import type { DecorationAttrs } from '@prosekit/pm/view';
16
+ import { DedentListOptions } from 'prosemirror-flat-list';
17
+ import { config as default_alias_1 } from '@prosekit/dev/config-vitest';
18
+ import { DocExtension } from '@prosekit/core';
19
+ import { EditorState } from '@prosekit/pm/state';
20
+ import type { EditorView } from '@prosekit/pm/view';
21
+ import { Extension } from '@prosekit/core';
22
+ import { ExtensionTyping } from '@prosekit/core';
23
+ import { ExtractMarkActions } from '@prosekit/core';
24
+ import { ExtractNodeActions } from '@prosekit/core';
25
+ import { FindParentNodeResult } from '@prosekit/core';
26
+ import { GapCursor } from 'prosemirror-gapcursor';
27
+ import type { Highlighter } from 'shiki';
28
+ import { HistoryExtension } from '@prosekit/core';
29
+ import { IndentListOptions } from 'prosemirror-flat-list';
30
+ import { InputRule } from '@prosekit/pm/inputrules';
31
+ import type { IsEqual } from 'type-fest';
32
+ import { ListAttributes } from 'prosemirror-flat-list';
33
+ import { ListDOMSerializer } from 'prosemirror-flat-list';
34
+ import type { LoroDocType } from 'loro-prosemirror';
35
+ import { LoroSyncPluginProps } from 'loro-prosemirror';
36
+ import { LoroUndoPluginProps } from 'loro-prosemirror';
37
+ import { MarkType } from '@prosekit/pm/model';
38
+ import { Node as Node_2 } from 'prosemirror-model';
39
+ import { NodeAction } from '@prosekit/core';
40
+ import { NodeChild } from '@prosekit/core';
41
+ import { NodeJSON } from '@prosekit/core';
42
+ import type { NodeType } from '@prosekit/pm/model';
43
+ import { Options } from 'tsup';
44
+ import { Parser } from 'prosemirror-highlight';
45
+ import type { PeerID } from 'loro-crdt';
46
+ import { PlainExtension } from '@prosekit/core';
47
+ import { Plugin as Plugin_2 } from '@prosekit/pm/state';
48
+ import { PluginKey } from '@prosekit/pm/state';
49
+ import { ProseMirrorNode } from '@prosekit/pm/model';
50
+ import type { ResolvedPos } from '@prosekit/pm/model';
51
+ import type { Selection as Selection_2 } from '@prosekit/pm/state';
52
+ import { SimplifyDeeper } from '@prosekit/core';
53
+ import type { SpecialLanguage } from 'shiki';
54
+ import { StepJSON } from '@prosekit/core';
55
+ import { TestEditor } from '@prosekit/core/test';
56
+ import { TextExtension } from '@prosekit/core';
57
+ import { ToggleCollapsedOptions } from 'prosemirror-flat-list';
58
+ import { ToMarkAction } from '@prosekit/core';
59
+ import { Transaction } from '@prosekit/pm/state';
60
+ import { Union } from '@prosekit/core';
61
+ import { UnwrapListOptions } from 'prosemirror-flat-list';
62
+ import { WrapInListGetAttrs } from 'prosemirror-flat-list';
63
+ import type * as Y from 'yjs';
64
+ import { yCursorPlugin } from 'y-prosemirror';
65
+ import { ySyncPlugin } from 'y-prosemirror';
66
+ import { yUndoPlugin } from 'y-prosemirror';
67
+
68
+ export declare function applyMarkRules(rules: MarkRuleOptions[], transactions: readonly Transaction[], oldState: EditorState, newState: EditorState): Transaction | null;
69
+
70
+ /**
71
+ * Utility function assert that two types are equal in tests.
72
+ */
73
+ export declare function assertTypeEqual<T, U>(_val: IsEqual<T, U>): void;
74
+
75
+ declare class AutocompleteRule {
76
+ readonly regex: RegExp;
77
+ readonly onMatch: MatchHandler;
78
+ readonly onLeave?: VoidFunction;
79
+ readonly canMatch: (options: {
80
+ state: EditorState;
81
+ }) => boolean;
82
+ constructor(options: {
83
+ regex: RegExp;
84
+ onEnter: MatchHandler;
85
+ onLeave?: VoidFunction;
86
+ canMatch?: (options: {
87
+ state: EditorState;
88
+ }) => boolean;
89
+ });
90
+ }
91
+ export { AutocompleteRule }
92
+ export { AutocompleteRule as AutocompleteRule_alias_1 }
93
+
94
+ declare type BlockquoteCommandsExtension = Extension<{
95
+ Commands: {
96
+ setBlockquote: [];
97
+ insertBlockquote: [];
98
+ toggleBlockquote: [];
99
+ };
100
+ }>;
101
+ export { BlockquoteCommandsExtension }
102
+ export { BlockquoteCommandsExtension as BlockquoteCommandsExtension_alias_1 }
103
+
104
+ /**
105
+ * @internal
106
+ */
107
+ declare type BlockquoteExtension = Union<[
108
+ BlockquoteSpecExtension,
109
+ BlockquoteCommandsExtension
110
+ ]>;
111
+ export { BlockquoteExtension }
112
+ export { BlockquoteExtension as BlockquoteExtension_alias_1 }
113
+
114
+ declare type BlockquoteSpecExtension = Extension<{
115
+ Nodes: {
116
+ blockquote: Attrs;
117
+ };
118
+ }>;
119
+ export { BlockquoteSpecExtension }
120
+ export { BlockquoteSpecExtension as BlockquoteSpecExtension_alias_1 }
121
+
122
+ /**
123
+ * @internal
124
+ */
125
+ declare type BoldCommandsExtension = Extension<{
126
+ Commands: {
127
+ toggleBold: [];
128
+ };
129
+ }>;
130
+ export { BoldCommandsExtension }
131
+ export { BoldCommandsExtension as BoldCommandsExtension_alias_1 }
132
+
133
+ /**
134
+ * @internal
135
+ */
136
+ declare type BoldExtension = Union<[BoldSpecExtension, BoldCommandsExtension]>;
137
+ export { BoldExtension }
138
+ export { BoldExtension as BoldExtension_alias_1 }
139
+
140
+ /**
141
+ * @internal
142
+ */
143
+ declare type BoldSpecExtension = Extension<{
144
+ Marks: {
145
+ bold: Attrs;
146
+ };
147
+ }>;
148
+ export { BoldSpecExtension }
149
+ export { BoldSpecExtension as BoldSpecExtension_alias_1 }
150
+
151
+ export { BundledLanguage as ShikiBundledLanguage }
152
+ export { BundledLanguage as ShikiBundledLanguage_alias_1 }
153
+
154
+ export { BundledLanguageInfo as ShikiBundledLanguageInfo }
155
+ export { BundledLanguageInfo as ShikiBundledLanguageInfo_alias_1 }
156
+
157
+ export { bundledLanguagesInfo as shikiBundledLanguagesInfo }
158
+ export { bundledLanguagesInfo as shikiBundledLanguagesInfo_alias_1 }
159
+
160
+ export { BundledTheme as ShikiBundledTheme }
161
+ export { BundledTheme as ShikiBundledTheme_alias_1 }
162
+
163
+ export { BundledThemeInfo as ShikiBundledThemeInfo }
164
+ export { BundledThemeInfo as ShikiBundledThemeInfo_alias_1 }
165
+
166
+ export { bundledThemesInfo as shikiBundledThemesInfo }
167
+ export { bundledThemesInfo as shikiBundledThemesInfo_alias_1 }
168
+
169
+ /**
170
+ * @public
171
+ */
172
+ export declare interface CellAttrs {
173
+ colspan: number;
174
+ rowspan: number;
175
+ colwidth: number[] | null;
176
+ }
177
+
178
+ /**
179
+ * The attributes for the `codeBlock` node.
180
+ *
181
+ * @public
182
+ */
183
+ declare interface CodeBlockAttrs {
184
+ language: string;
185
+ }
186
+ export { CodeBlockAttrs }
187
+ export { CodeBlockAttrs as CodeBlockAttrs_alias_1 }
188
+
189
+ /**
190
+ * @internal
191
+ */
192
+ declare type CodeBlockCommandsExtension = Extension<{
193
+ Commands: {
194
+ setCodeBlock: [attrs?: CodeBlockAttrs];
195
+ insertCodeBlock: [attrs?: CodeBlockAttrs];
196
+ toggleCodeBlock: [attrs?: CodeBlockAttrs];
197
+ setCodeBlockAttrs: [attrs: CodeBlockAttrs];
198
+ };
199
+ }>;
200
+ export { CodeBlockCommandsExtension }
201
+ export { CodeBlockCommandsExtension as CodeBlockCommandsExtension_alias_1 }
202
+
203
+ /**
204
+ * @internal
205
+ */
206
+ declare type CodeBlockExtension = Union<[
207
+ CodeBlockSpecExtension,
208
+ CodeBlockCommandsExtension
209
+ ]>;
210
+ export { CodeBlockExtension }
211
+ export { CodeBlockExtension as CodeBlockExtension_alias_1 }
212
+
213
+ /**
214
+ * @public
215
+ */
216
+ declare type CodeBlockHighlightOptions = {
217
+ parser: HighlightParser;
218
+ };
219
+ export { CodeBlockHighlightOptions }
220
+ export { CodeBlockHighlightOptions as CodeBlockHighlightOptions_alias_1 }
221
+
222
+ /**
223
+ * The options to configure the Shiki highlighter.
224
+ *
225
+ * @public
226
+ */
227
+ export declare interface CodeBlockShikiOptions extends Omit<ShikiHighlighterOptions, 'themes' | 'langs' | 'engine'> {
228
+ /**
229
+ * A list of Shiki themes to pre-load. The first theme in the list will be
230
+ * used to render the code block.
231
+ *
232
+ * @default ['one-dark-pro']
233
+ */
234
+ themes?: BundledTheme[];
235
+ /**
236
+ * A list of Shiki languages to pre-load.
237
+ *
238
+ * @default ['text']
239
+ */
240
+ langs?: (BundledLanguage | SpecialLanguage)[];
241
+ /**
242
+ * The RegExp engine to use. By default, the JavaScript engine is used.
243
+ */
244
+ engine?: ShikiHighlighterOptions['engine'];
245
+ }
246
+
247
+ /**
248
+ * @internal
249
+ */
250
+ declare type CodeBlockSpecExtension = Extension<{
251
+ Nodes: {
252
+ codeBlock: CodeBlockAttrs;
253
+ };
254
+ }>;
255
+ export { CodeBlockSpecExtension }
256
+ export { CodeBlockSpecExtension as CodeBlockSpecExtension_alias_1 }
257
+
258
+ /**
259
+ * @internal
260
+ */
261
+ declare type CodeCommandsExtension = Extension<{
262
+ Commands: {
263
+ toggleCode: [];
264
+ };
265
+ }>;
266
+ export { CodeCommandsExtension }
267
+ export { CodeCommandsExtension as CodeCommandsExtension_alias_1 }
268
+
269
+ /**
270
+ * @internal
271
+ */
272
+ declare type CodeExtension = Union<[CodeSpecExtension, CodeCommandsExtension]>;
273
+ export { CodeExtension }
274
+ export { CodeExtension as CodeExtension_alias_1 }
275
+
276
+ /**
277
+ * @internal
278
+ */
279
+ declare type CodeSpecExtension = Extension<{
280
+ Marks: {
281
+ code: Attrs;
282
+ };
283
+ }>;
284
+ export { CodeSpecExtension }
285
+ export { CodeSpecExtension as CodeSpecExtension_alias_1 }
286
+
287
+ /**
288
+ * A JSON representation of a commit.
289
+ */
290
+ export declare interface Commit {
291
+ /**
292
+ * The current doc node in the JSON format
293
+ */
294
+ doc: NodeJSON;
295
+ /**
296
+ * The parent node in the JSON format
297
+ */
298
+ parent: NodeJSON;
299
+ /**
300
+ * An array of steps in the JSON format that transform the parent node to the
301
+ * current doc node.
302
+ */
303
+ steps: StepJSON[];
304
+ }
305
+
306
+ export declare class CommitRecorder {
307
+ private parent;
308
+ private doc;
309
+ private steps;
310
+ /**
311
+ * Return a commit object including all changes since the last commit. `null`
312
+ * will be returned if there is no change.
313
+ */
314
+ commit(): Commit | null;
315
+ /**
316
+ * @internal
317
+ */
318
+ init(doc: ProseMirrorNode): void;
319
+ /**
320
+ * @internal
321
+ */
322
+ apply(tr: Transaction): void;
323
+ }
324
+
325
+ export declare function createAutocompletePlugin({ getRules, }: {
326
+ getRules: () => AutocompleteRule[];
327
+ }): Plugin_2;
328
+
329
+ /**
330
+ * @internal
331
+ */
332
+ export declare function createLazyParser(highlighterOptions: HighlighterOptions): Parser;
333
+
334
+ /**
335
+ * @internal
336
+ */
337
+ export declare function createMarkInputRule({ regex, type, attrs, }: MarkInputRuleOptions): InputRule;
338
+
339
+ export declare function createOrGetHighlighter(options: HighlighterOptions): HighlighterResult;
340
+
341
+ export declare function createOrGetHighlighter_alias_1(options: HighlighterOptions): HighlighterResult;
342
+
343
+ export { DedentListOptions }
344
+ export { DedentListOptions as DedentListOptions_alias_1 }
345
+
346
+ export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
347
+
348
+ export { default_alias_1 }
349
+
350
+ export declare function defaultCanMatch({ state }: {
351
+ state: EditorState;
352
+ }): boolean;
353
+
354
+ declare function defineAutocomplete(rule: AutocompleteRule): Extension;
355
+ export { defineAutocomplete }
356
+ export { defineAutocomplete as defineAutocomplete_alias_1 }
357
+
358
+ /**
359
+ * @public
360
+ */
361
+ declare function defineBlockquote(): BlockquoteExtension;
362
+ export { defineBlockquote }
363
+ export { defineBlockquote as defineBlockquote_alias_1 }
364
+
365
+ /**
366
+ * @internal
367
+ */
368
+ declare function defineBlockquoteCommands(): BlockquoteCommandsExtension;
369
+ export { defineBlockquoteCommands }
370
+ export { defineBlockquoteCommands as defineBlockquoteCommands_alias_1 }
371
+
372
+ /**
373
+ * Wraps the text block in a blockquote when `>` is typed at the start of a new
374
+ * line followed by a space.
375
+ */
376
+ declare function defineBlockquoteInputRule(): PlainExtension;
377
+ export { defineBlockquoteInputRule }
378
+ export { defineBlockquoteInputRule as defineBlockquoteInputRule_alias_1 }
379
+
380
+ /**
381
+ * @internal
382
+ */
383
+ declare function defineBlockquoteKeymap(): PlainExtension;
384
+ export { defineBlockquoteKeymap }
385
+ export { defineBlockquoteKeymap as defineBlockquoteKeymap_alias_1 }
386
+
387
+ declare function defineBlockquoteSpec(): BlockquoteSpecExtension;
388
+ export { defineBlockquoteSpec }
389
+ export { defineBlockquoteSpec as defineBlockquoteSpec_alias_1 }
390
+
391
+ /**
392
+ * @public
393
+ */
394
+ declare function defineBold(): BoldExtension;
395
+ export { defineBold }
396
+ export { defineBold as defineBold_alias_1 }
397
+
398
+ /**
399
+ * @internal
400
+ */
401
+ declare function defineBoldCommands(): BoldCommandsExtension;
402
+ export { defineBoldCommands }
403
+ export { defineBoldCommands as defineBoldCommands_alias_1 }
404
+
405
+ /**
406
+ * @internal
407
+ */
408
+ declare function defineBoldInputRule(): PlainExtension;
409
+ export { defineBoldInputRule }
410
+ export { defineBoldInputRule as defineBoldInputRule_alias_1 }
411
+
412
+ /**
413
+ * @internal
414
+ */
415
+ declare function defineBoldKeymap(): PlainExtension;
416
+ export { defineBoldKeymap }
417
+ export { defineBoldKeymap as defineBoldKeymap_alias_1 }
418
+
419
+ /**
420
+ * @internal
421
+ */
422
+ declare function defineBoldSpec(): BoldSpecExtension;
423
+ export { defineBoldSpec }
424
+ export { defineBoldSpec as defineBoldSpec_alias_1 }
425
+
426
+ /**
427
+ * @public
428
+ */
429
+ declare function defineCode(): CodeExtension;
430
+ export { defineCode }
431
+ export { defineCode as defineCode_alias_1 }
432
+
433
+ /**
434
+ * Adds `codeBlock` nodes to the editor. This includes the following extensions:
435
+ *
436
+ * - {@link defineCodeBlockSpec}
437
+ * - {@link defineCodeBlockInputRule}
438
+ * - {@link defineCodeBlockEnterRule}
439
+ * - {@link defineCodeBlockKeymap}
440
+ * - {@link defineCodeBlockCommands}.
441
+ *
442
+ * @public
443
+ */
444
+ declare function defineCodeBlock(): CodeBlockExtension;
445
+ export { defineCodeBlock }
446
+ export { defineCodeBlock as defineCodeBlock_alias_1 }
447
+
448
+ /**
449
+ * Adds commands for working with `codeBlock` nodes.
450
+ *
451
+ * @public
452
+ */
453
+ declare function defineCodeBlockCommands(): CodeBlockCommandsExtension;
454
+ export { defineCodeBlockCommands }
455
+ export { defineCodeBlockCommands as defineCodeBlockCommands_alias_1 }
456
+
457
+ /**
458
+ * Adds enter rules for `codeBlock` nodes.
459
+ *
460
+ * @public
461
+ */
462
+ declare function defineCodeBlockEnterRule(): PlainExtension;
463
+ export { defineCodeBlockEnterRule }
464
+ export { defineCodeBlockEnterRule as defineCodeBlockEnterRule_alias_1 }
465
+
466
+ /**
467
+ * Adds syntax highlighting to code blocks. This function requires a `Parser`
468
+ * instance from the `prosemirror-highlight` package. See the
469
+ * [documentation](https://github.com/ocavue/prosemirror-highlight) for more
470
+ * information.
471
+ *
472
+ * @param options
473
+ *
474
+ * @public
475
+ */
476
+ declare function defineCodeBlockHighlight({ parser, }: CodeBlockHighlightOptions): Extension;
477
+ export { defineCodeBlockHighlight }
478
+ export { defineCodeBlockHighlight as defineCodeBlockHighlight_alias_1 }
479
+
480
+ /**
481
+ * Adds input rules for `codeBlock` nodes.
482
+ *
483
+ * @public
484
+ */
485
+ declare function defineCodeBlockInputRule(): PlainExtension;
486
+ export { defineCodeBlockInputRule }
487
+ export { defineCodeBlockInputRule as defineCodeBlockInputRule_alias_1 }
488
+
489
+ /**
490
+ * Defines the keymap for code blocks.
491
+ */
492
+ declare function defineCodeBlockKeymap(): PlainExtension;
493
+ export { defineCodeBlockKeymap }
494
+ export { defineCodeBlockKeymap as defineCodeBlockKeymap_alias_1 }
495
+
496
+ /**
497
+ * Adds syntax highlighting to code blocks using the [Shiki](https://github.com/shikijs/shiki) package.
498
+ *
499
+ * @param options - The options to configure the Shiki highlighter.
500
+ *
501
+ * @public
502
+ */
503
+ declare function defineCodeBlockShiki({ themes, langs, ...rest }?: CodeBlockShikiOptions): Extension;
504
+ export { defineCodeBlockShiki }
505
+ export { defineCodeBlockShiki as defineCodeBlockShiki_alias_1 }
506
+
507
+ /**
508
+ * Defines the `codeBlock` node spec.
509
+ *
510
+ * @public
511
+ */
512
+ declare function defineCodeBlockSpec(): CodeBlockSpecExtension;
513
+ export { defineCodeBlockSpec }
514
+ export { defineCodeBlockSpec as defineCodeBlockSpec_alias_1 }
515
+
516
+ /**
517
+ * @internal
518
+ */
519
+ declare function defineCodeCommands(): CodeCommandsExtension;
520
+ export { defineCodeCommands }
521
+ export { defineCodeCommands as defineCodeCommands_alias_1 }
522
+
523
+ /**
524
+ * @internal
525
+ */
526
+ declare function defineCodeInputRule(): PlainExtension;
527
+ export { defineCodeInputRule }
528
+ export { defineCodeInputRule as defineCodeInputRule_alias_1 }
529
+
530
+ /**
531
+ * @internal
532
+ */
533
+ declare function defineCodeKeymap(): PlainExtension;
534
+ export { defineCodeKeymap }
535
+ export { defineCodeKeymap as defineCodeKeymap_alias_1 }
536
+
537
+ /**
538
+ * @internal
539
+ */
540
+ declare function defineCodeSpec(): CodeSpecExtension;
541
+ export { defineCodeSpec }
542
+ export { defineCodeSpec as defineCodeSpec_alias_1 }
543
+
544
+ /**
545
+ * Define an extension that can record the changes in the editor.
546
+ */
547
+ export declare function defineCommitRecorder(commitRecorder: CommitRecorder): PlainExtension;
548
+
549
+ /**
550
+ * Define an extension to display the changes from the given commit in the editor.
551
+ */
552
+ export declare function defineCommitViewer(commit: Commit): PlainExtension;
553
+
554
+ /**
555
+ * Show up a decoration at the drop position when something is dragged over the editor.
556
+ *
557
+ * See [prosemirror-dropcursor](https://github.com/ProseMirror/prosemirror-dropcursor) for more information.
558
+ *
559
+ * @public
560
+ */
561
+ declare function defineDropCursor(options?: DropCursorOptions): DropCursorExtension;
562
+ export { defineDropCursor }
563
+ export { defineDropCursor as defineDropCursor_alias_1 }
564
+
565
+ /**
566
+ * Defines an enter rule. An enter rule applies when the text directly in front of
567
+ * the cursor matches `regex` and user presses Enter. The `regex` should end
568
+ * with `$`.
569
+ *
570
+ * @param options
571
+ *
572
+ * @public
573
+ */
574
+ export declare function defineEnterRule({ regex, handler, stop, }: EnterRuleOptions): PlainExtension;
575
+
576
+ declare function defineFileDropHandler(handler: FileDropHandler): PlainExtension;
577
+ export { defineFileDropHandler }
578
+ export { defineFileDropHandler as defineFileDropHandler_alias_1 }
579
+
580
+ declare function defineFilePasteHandler(handler: FilePasteHandler): PlainExtension;
581
+ export { defineFilePasteHandler }
582
+ export { defineFilePasteHandler as defineFilePasteHandler_alias_1 }
583
+
584
+ /**
585
+ * Capture clicks near and arrow-key-motion past places that don't have a
586
+ * normally selectable position nearby, and create a gap cursor selection for
587
+ * them. The cursor is drawn as an element with class `ProseMirror-gapcursor`.
588
+ *
589
+ * You can either include `prosekit/extensions/gap-cursor.css` or add your own
590
+ * styles to make it visible.
591
+ *
592
+ * See
593
+ * [prosemirror-gapcursor](https://github.com/ProseMirror/prosemirror-gapcursor)
594
+ * for more information.
595
+ *
596
+ * @public
597
+ */
598
+ declare function defineGapCursor(): GapCursorExtension;
599
+ export { defineGapCursor }
600
+ export { defineGapCursor as defineGapCursor_alias_1 }
601
+
602
+ /**
603
+ * @public
604
+ */
605
+ declare function defineHeading(): HeadingExtension;
606
+ export { defineHeading }
607
+ export { defineHeading as defineHeading_alias_1 }
608
+
609
+ /**
610
+ * @internal
611
+ */
612
+ declare function defineHeadingCommands(): HeadingCommandsExtension;
613
+ export { defineHeadingCommands }
614
+ export { defineHeadingCommands as defineHeadingCommands_alias_1 }
615
+
616
+ /**
617
+ * Converts the text block to a heading when `#` is typed at the start of a new
618
+ * line followed by a space.
619
+ *
620
+ * @internal
621
+ */
622
+ declare function defineHeadingInputRule(): PlainExtension;
623
+ export { defineHeadingInputRule }
624
+ export { defineHeadingInputRule as defineHeadingInputRule_alias_1 }
625
+
626
+ /**
627
+ * @internal
628
+ */
629
+ declare function defineHeadingKeymap(): PlainExtension;
630
+ export { defineHeadingKeymap }
631
+ export { defineHeadingKeymap as defineHeadingKeymap_alias_1 }
632
+
633
+ /**
634
+ * @internal
635
+ */
636
+ declare function defineHeadingSpec(): HeadingSpecExtension;
637
+ export { defineHeadingSpec }
638
+ export { defineHeadingSpec as defineHeadingSpec_alias_1 }
639
+
640
+ /**
641
+ * @public
642
+ */
643
+ declare function defineHorizontalRule(): HorizontalRuleExtension;
644
+ export { defineHorizontalRule }
645
+ export { defineHorizontalRule as defineHorizontalRule_alias_1 }
646
+
647
+ declare function defineHorizontalRuleCommands(): HorizontalRuleCommandsExtension;
648
+ export { defineHorizontalRuleCommands }
649
+ export { defineHorizontalRuleCommands as defineHorizontalRuleCommands_alias_1 }
650
+
651
+ /**
652
+ * @public
653
+ */
654
+ declare function defineHorizontalRuleInputRule(): PlainExtension;
655
+ export { defineHorizontalRuleInputRule }
656
+ export { defineHorizontalRuleInputRule as defineHorizontalRuleInputRule_alias_1 }
657
+
658
+ declare function defineHorizontalRuleSpec(): HorizontalRuleSpecExtension;
659
+ export { defineHorizontalRuleSpec }
660
+ export { defineHorizontalRuleSpec as defineHorizontalRuleSpec_alias_1 }
661
+
662
+ /**
663
+ * @public
664
+ */
665
+ declare function defineImage(): ImageExtension;
666
+ export { defineImage }
667
+ export { defineImage as defineImage_alias_1 }
668
+
669
+ /**
670
+ * @internal
671
+ */
672
+ declare function defineImageCommands(): ImageCommandsExtension;
673
+ export { defineImageCommands }
674
+ export { defineImageCommands as defineImageCommands_alias_1 }
675
+
676
+ /**
677
+ * @internal
678
+ */
679
+ declare function defineImageSpec(): ImageSpecExtension;
680
+ export { defineImageSpec }
681
+ export { defineImageSpec as defineImageSpec_alias_1 }
682
+
683
+ /**
684
+ * Defines an input rule extension.
685
+ *
686
+ * @param rule - The ProseMirror input rule to add.
687
+ *
688
+ * @public
689
+ */
690
+ export declare function defineInputRule(rule: InputRule): PlainExtension;
691
+
692
+ /**
693
+ * @public
694
+ */
695
+ declare function defineItalic(): ItalicExtension;
696
+ export { defineItalic }
697
+ export { defineItalic as defineItalic_alias_1 }
698
+
699
+ /**
700
+ * @internal
701
+ */
702
+ declare function defineItalicCommands(): ItalicCommandsExtension;
703
+ export { defineItalicCommands }
704
+ export { defineItalicCommands as defineItalicCommands_alias_1 }
705
+
706
+ /**
707
+ * @internal
708
+ */
709
+ declare function defineItalicInputRule(): PlainExtension;
710
+ export { defineItalicInputRule }
711
+ export { defineItalicInputRule as defineItalicInputRule_alias_1 }
712
+
713
+ /**
714
+ * @internal
715
+ */
716
+ declare function defineItalicKeymap(): PlainExtension;
717
+ export { defineItalicKeymap }
718
+ export { defineItalicKeymap as defineItalicKeymap_alias_1 }
719
+
720
+ /**
721
+ * @internal
722
+ */
723
+ declare function defineItalicSpec(): ItalicSpecExtension;
724
+ export { defineItalicSpec }
725
+ export { defineItalicSpec as defineItalicSpec_alias_1 }
726
+
727
+ /**
728
+ * @public
729
+ */
730
+ export declare function defineLink(): LinkExtension;
731
+
732
+ export declare function defineLinkCommands(): LinkCommandsExtension;
733
+
734
+ /**
735
+ * Apply link marks after typing Enter.
736
+ *
737
+ * @internal
738
+ */
739
+ export declare function defineLinkEnterRule(): PlainExtension;
740
+
741
+ /**
742
+ * Apply link marks after pressing Space.
743
+ *
744
+ * @internal
745
+ */
746
+ export declare function defineLinkInputRule(): PlainExtension;
747
+
748
+ /**
749
+ * Apply and remove link marks to the text during typing.
750
+ *
751
+ * @internal
752
+ */
753
+ export declare function defineLinkMarkRule(): Extension<ExtensionTyping<any, any, any>>;
754
+
755
+ /**
756
+ * @internal
757
+ */
758
+ export declare function defineLinkSpec(): LinkSpecExtension;
759
+
760
+ /**
761
+ * @public
762
+ */
763
+ declare function defineList(): ListExtension;
764
+ export { defineList }
765
+ export { defineList as defineList_alias_1 }
766
+
767
+ /**
768
+ * Defines list commands.
769
+ *
770
+ * @internal
771
+ */
772
+ declare function defineListCommands(): ListCommandsExtension;
773
+ export { defineListCommands }
774
+ export { defineListCommands as defineListCommands_alias_1 }
775
+ export { defineListCommands as defineListCommands_alias_2 }
776
+
777
+ /**
778
+ * @internal
779
+ */
780
+ declare function defineListInputRules(): Extension;
781
+ export { defineListInputRules }
782
+ export { defineListInputRules as defineListInputRules_alias_1 }
783
+ export { defineListInputRules as defineListInputRules_alias_2 }
784
+
785
+ /**
786
+ * Returns a extension that adds key bindings for list.
787
+ *
788
+ * @internal
789
+ */
790
+ declare function defineListKeymap(): PlainExtension;
791
+ export { defineListKeymap }
792
+ export { defineListKeymap as defineListKeymap_alias_1 }
793
+ export { defineListKeymap as defineListKeymap_alias_2 }
794
+
795
+ /**
796
+ * @internal
797
+ */
798
+ declare function defineListPlugins(): PlainExtension;
799
+ export { defineListPlugins }
800
+ export { defineListPlugins as defineListPlugins_alias_1 }
801
+ export { defineListPlugins as defineListPlugins_alias_2 }
802
+
803
+ /**
804
+ * @internal
805
+ */
806
+ declare function defineListSpec(): ListSpecExtension;
807
+ export { defineListSpec }
808
+ export { defineListSpec as defineListSpec_alias_1 }
809
+ export { defineListSpec as defineListSpec_alias_2 }
810
+
811
+ /**
812
+ * @public
813
+ */
814
+ declare function defineLoro(options: LoroOptions): LoroExtension;
815
+ export { defineLoro }
816
+ export { defineLoro as defineLoro_alias_1 }
817
+
818
+ declare function defineLoroCommands(): LoroCommandsExtension;
819
+ export { defineLoroCommands }
820
+ export { defineLoroCommands as defineLoroCommands_alias_1 }
821
+ export { defineLoroCommands as defineLoroCommands_alias_2 }
822
+
823
+ declare function defineLoroCursorPlugin(options: LoroCursorOptions): PlainExtension;
824
+ export { defineLoroCursorPlugin }
825
+ export { defineLoroCursorPlugin as defineLoroCursorPlugin_alias_1 }
826
+ export { defineLoroCursorPlugin as defineLoroCursorPlugin_alias_2 }
827
+
828
+ declare function defineLoroKeymap(): PlainExtension;
829
+ export { defineLoroKeymap }
830
+ export { defineLoroKeymap as defineLoroKeymap_alias_1 }
831
+ export { defineLoroKeymap as defineLoroKeymap_alias_2 }
832
+
833
+ declare function defineLoroSyncPlugin(options: LoroSyncPluginProps): PlainExtension;
834
+ export { defineLoroSyncPlugin }
835
+ export { defineLoroSyncPlugin as defineLoroSyncPlugin_alias_1 }
836
+ export { defineLoroSyncPlugin as defineLoroSyncPlugin_alias_2 }
837
+
838
+ declare function defineLoroUndoPlugin(options: LoroUndoPluginProps): PlainExtension;
839
+ export { defineLoroUndoPlugin }
840
+ export { defineLoroUndoPlugin as defineLoroUndoPlugin_alias_1 }
841
+ export { defineLoroUndoPlugin as defineLoroUndoPlugin_alias_2 }
842
+
843
+ /**
844
+ * Defines an input rule for automatically adding inline marks when a given
845
+ * pattern is typed.
846
+ *
847
+ * @public
848
+ */
849
+ export declare function defineMarkInputRule(options: MarkInputRuleOptions): PlainExtension;
850
+
851
+ /**
852
+ * A mark rule is something that can automatically apply marks to text if it
853
+ * matches a certain pattern, and remove them if it doesn't match anymore.
854
+ */
855
+ declare function defineMarkRule(options: MarkRuleOptions): Extension<ExtensionTyping<any, any, any>>;
856
+ export { defineMarkRule }
857
+ export { defineMarkRule as defineMarkRule_alias_1 }
858
+
859
+ /**
860
+ * @public
861
+ */
862
+ export declare function defineMention(): Union<readonly [Extension< {
863
+ Nodes: {
864
+ mention: MentionAttrs;
865
+ };
866
+ }>, Extension< {
867
+ Commands: {
868
+ insertMention: [attrs: MentionAttrs];
869
+ };
870
+ }>]>;
871
+
872
+ export declare function defineMentionCommands(): Extension< {
873
+ Commands: {
874
+ insertMention: [attrs: MentionAttrs];
875
+ };
876
+ }>;
877
+
878
+ /**
879
+ * @public
880
+ */
881
+ export declare function defineMentionSpec(): Extension< {
882
+ Nodes: {
883
+ mention: MentionAttrs;
884
+ };
885
+ }>;
886
+
887
+ /**
888
+ * By default, clicking a node while holding the mod key will select the node. This
889
+ * extension disables that behavior.
890
+ *
891
+ * @public
892
+ */
893
+ export declare function defineModClickPrevention(): ModClickPreventionExtension;
894
+
895
+ /**
896
+ * Add a placeholder text to the editor when the current block or document is
897
+ * empty.
898
+ */
899
+ export declare function definePlaceholder(options: PlaceholderOptions): PlainExtension;
900
+
901
+ /**
902
+ * Make the editor read-only.
903
+ */
904
+ export declare function defineReadonly(): PlainExtension;
905
+
906
+ /**
907
+ * Defines commands for search and replace.
908
+ *
909
+ * @public
910
+ */
911
+ export declare function defineSearchCommands(): Extension< {
912
+ Commands: {
913
+ findNext: [];
914
+ findPrev: [];
915
+ findNextNoWrap: [];
916
+ findPrevNoWrap: [];
917
+ replaceNext: [];
918
+ replaceNextNoWrap: [];
919
+ replaceCurrent: [];
920
+ replaceAll: [];
921
+ };
922
+ }>;
923
+
924
+ /**
925
+ * Defines an extension that stores a current search query and replace string.
926
+ *
927
+ * @public
928
+ */
929
+ export declare function defineSearchQuery(options: SearchQueryOptions): PlainExtension;
930
+
931
+ /**
932
+ * @public
933
+ */
934
+ export declare function defineStrike(): StrikeExtension;
935
+
936
+ /**
937
+ * @internal
938
+ */
939
+ export declare function defineStrikeCommands(): StrikeCommandsExtension;
940
+
941
+ /**
942
+ * @internal
943
+ */
944
+ export declare function defineStrikeInputRule(): PlainExtension;
945
+
946
+ /**
947
+ * @internal
948
+ */
949
+ export declare function defineStrikeKeymap(): PlainExtension;
950
+
951
+ /**
952
+ * @internal
953
+ */
954
+ export declare function defineStrikeSpec(): StrikeSpecExtension;
955
+
956
+ /**
957
+ * @public
958
+ */
959
+ declare function defineTable(): TableExtension;
960
+ export { defineTable }
961
+ export { defineTable as defineTable_alias_1 }
962
+
963
+ /**
964
+ * @internal
965
+ */
966
+ declare function defineTableCellSpec(): TableCellSpecExtension;
967
+ export { defineTableCellSpec }
968
+ export { defineTableCellSpec as defineTableCellSpec_alias_1 }
969
+
970
+ /**
971
+ * Adds commands for working with `table` nodes.
972
+ *
973
+ * @public
974
+ */
975
+ declare function defineTableCommands(): TableCommandsExtension;
976
+ export { defineTableCommands }
977
+ export { defineTableCommands as defineTableCommands_alias_1 }
978
+
979
+ declare function defineTableHeaderCellSpec(): TableHeaderCellSpecExtension;
980
+ export { defineTableHeaderCellSpec }
981
+ export { defineTableHeaderCellSpec as defineTableHeaderCellSpec_alias_1 }
982
+
983
+ /**
984
+ * @public
985
+ */
986
+ declare function defineTablePlugins(): PlainExtension;
987
+ export { defineTablePlugins }
988
+ export { defineTablePlugins as defineTablePlugins_alias_1 }
989
+
990
+ /**
991
+ * @internal
992
+ */
993
+ declare function defineTableRowSpec(): TableRowSpecExtension;
994
+ export { defineTableRowSpec }
995
+ export { defineTableRowSpec as defineTableRowSpec_alias_1 }
996
+
997
+ /**
998
+ * @internal
999
+ */
1000
+ declare function defineTableSpec(): TableSpecExtension;
1001
+ export { defineTableSpec }
1002
+ export { defineTableSpec as defineTableSpec_alias_1 }
1003
+
1004
+ /**
1005
+ * @internal
1006
+ */
1007
+ export declare function defineTestExtension(): Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension, PlainExtension, BaseCommandsExtension, ItalicExtension, BoldExtension, UnderlineExtension, StrikeExtension, CodeExtension, LinkExtension, ImageExtension, Extension<{
1008
+ Nodes: {
1009
+ paragraph: Attrs_2;
1010
+ };
1011
+ }>, TableExtension, HorizontalRuleExtension]>;
1012
+
1013
+ /**
1014
+ * Adds a `textAlign` attribute to the specified nodes. This will be rendered as
1015
+ * a CSS `text-align` style.
1016
+ *
1017
+ * @public
1018
+ */
1019
+ export declare function defineTextAlign<NodeName extends string = string>(options: TextAlignOptions<NodeName>): TextAlignExtension<NodeName>;
1020
+
1021
+ /**
1022
+ * @internal
1023
+ */
1024
+ export declare function defineTextAlignCommands(types: string[]): TextAlignCommandsExtension;
1025
+
1026
+ /**
1027
+ * @internal
1028
+ */
1029
+ export declare function defineTextAlignKeymap(types: string[]): PlainExtension;
1030
+
1031
+ /**
1032
+ * Defines an enter rule that replaces the matched text with a block node.
1033
+ *
1034
+ * See also {@link defineEnterRule}.
1035
+ *
1036
+ * @param options
1037
+ *
1038
+ * @public
1039
+ */
1040
+ export declare function defineTextBlockEnterRule({ regex, type, attrs, stop, }: TextBlockEnterRuleOptions): PlainExtension;
1041
+
1042
+ /**
1043
+ * Defines an input rule that changes the type of a textblock when the matched
1044
+ * text is typed into it.
1045
+ *
1046
+ * See also [textblockTypeInputRule](https://prosemirror.net/docs/ref/#inputrules.textblockTypeInputRule)
1047
+ *
1048
+ * @param options
1049
+ *
1050
+ * @public
1051
+ */
1052
+ export declare function defineTextBlockInputRule({ regex, type, attrs, }: {
1053
+ /**
1054
+ * The regular expression to match against, which should end with `$`. It
1055
+ * usually also starts with `^` to that it is only matched at the start of a
1056
+ * textblock.
1057
+ */
1058
+ regex: RegExp;
1059
+ /**
1060
+ * The node type to replace the matched text with.
1061
+ */
1062
+ type: string | NodeType;
1063
+ /**
1064
+ * Attributes to set on the node.
1065
+ */
1066
+ attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
1067
+ }): PlainExtension;
1068
+
1069
+ /**
1070
+ * @public
1071
+ */
1072
+ export declare function defineUnderline(): UnderlineExtension;
1073
+
1074
+ /**
1075
+ * @internal
1076
+ */
1077
+ export declare function defineUnderlineCommands(): UnderlineCommandsExtension;
1078
+
1079
+ /**
1080
+ * @internal
1081
+ */
1082
+ export declare function defineUnderlineKeymap(): PlainExtension;
1083
+
1084
+ /**
1085
+ * @internal
1086
+ */
1087
+ export declare function defineUnderlineSpec(): UnderlineSpecExtension;
1088
+
1089
+ /**
1090
+ * Shows a virtual selection when the editor is not focused. When the editor is
1091
+ * not focused, the selected inline content will be wrapped in a `<span>`
1092
+ * element with the class `prosekit-virtual-selection`.
1093
+ *
1094
+ * This is useful when you want to move the focus to an element outside the
1095
+ * editor, but still want to show the selection.
1096
+ *
1097
+ * @public
1098
+ */
1099
+ export declare function defineVirtualSelection(): VirtualSelectionExtension;
1100
+
1101
+ /**
1102
+ * Defines an input rule for automatically wrapping a textblock when a given
1103
+ * string is typed.
1104
+ *
1105
+ * See also [wrappingInputRule](https://prosemirror.net/docs/ref/#inputrules.wrappingInputRule)
1106
+ *
1107
+ * @param options
1108
+ *
1109
+ * @public
1110
+ */
1111
+ export declare function defineWrappingInputRule({ regex, type, attrs, join, }: {
1112
+ /**
1113
+ * The regular expression to match against, which should end with `$`. It
1114
+ * usually also starts with `^` to that it is only matched at the start of a
1115
+ * textblock.
1116
+ */
1117
+ regex: RegExp;
1118
+ /**
1119
+ * The type of node to wrap in.
1120
+ */
1121
+ type: string | NodeType;
1122
+ /**
1123
+ * Attributes to set on the node.
1124
+ */
1125
+ attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
1126
+ /**
1127
+ * By default, if there's a node with the same type above the newly wrapped
1128
+ * node, the rule will try to
1129
+ * [join](https://prosemirror.net/docs/ref/#transform.Transform.join) those
1130
+ * two nodes. You can pass a join predicate, which takes a regular expression
1131
+ * match and the node before the wrapped node, and can return a boolean to
1132
+ * indicate whether a join should happen.
1133
+ */
1134
+ join?: (match: RegExpMatchArray, node: ProseMirrorNode) => boolean;
1135
+ }): PlainExtension;
1136
+
1137
+ /**
1138
+ * @public
1139
+ */
1140
+ declare function defineYjs(options: YjsOptions): YjsExtension;
1141
+ export { defineYjs }
1142
+ export { defineYjs as defineYjs_alias_1 }
1143
+
1144
+ declare function defineYjsCommands(): YjsCommandsExtension;
1145
+ export { defineYjsCommands }
1146
+ export { defineYjsCommands as defineYjsCommands_alias_1 }
1147
+
1148
+ declare function defineYjsCursorPlugin(options: YjsCursorOptions): PlainExtension;
1149
+ export { defineYjsCursorPlugin }
1150
+ export { defineYjsCursorPlugin as defineYjsCursorPlugin_alias_1 }
1151
+
1152
+ declare function defineYjsKeymap(): PlainExtension;
1153
+ export { defineYjsKeymap }
1154
+ export { defineYjsKeymap as defineYjsKeymap_alias_1 }
1155
+
1156
+ declare function defineYjsSyncPlugin(options: YjsSyncOptions): PlainExtension;
1157
+ export { defineYjsSyncPlugin }
1158
+ export { defineYjsSyncPlugin as defineYjsSyncPlugin_alias_1 }
1159
+
1160
+ declare function defineYjsUndoPlugin(options: YjsUndoOptions): PlainExtension;
1161
+ export { defineYjsUndoPlugin }
1162
+ export { defineYjsUndoPlugin as defineYjsUndoPlugin_alias_1 }
1163
+
1164
+ /**
1165
+ * @internal
1166
+ */
1167
+ declare type DropCursorExtension = PlainExtension;
1168
+ export { DropCursorExtension }
1169
+ export { DropCursorExtension as DropCursorExtension_alias_1 }
1170
+
1171
+ declare interface DropCursorOptions {
1172
+ /**
1173
+ * The color of the cursor. Use `false` to apply no color and rely only on class.
1174
+ *
1175
+ * @default 'black'
1176
+ */
1177
+ color?: string | false;
1178
+ /**
1179
+ * The precise width of the cursor in pixels.
1180
+ *
1181
+ * @default 1
1182
+ */
1183
+ width?: number;
1184
+ /**
1185
+ * A CSS class name to add to the cursor element.
1186
+ */
1187
+ class?: string;
1188
+ }
1189
+ export { DropCursorOptions }
1190
+ export { DropCursorOptions as DropCursorOptions_alias_1 }
1191
+
1192
+ /**
1193
+ * @public
1194
+ */
1195
+ export declare type EnterRuleHandler = (options: {
1196
+ /**
1197
+ * The current editor state.
1198
+ */
1199
+ state: EditorState;
1200
+ /**
1201
+ * The start position of the matched text.
1202
+ */
1203
+ from: number;
1204
+ /**
1205
+ * The end position of the matched text.
1206
+ */
1207
+ to: number;
1208
+ /**
1209
+ * The matched result from the regular expression.
1210
+ */
1211
+ match: RegExpExecArray;
1212
+ }) => Transaction | null;
1213
+
1214
+ /**
1215
+ * Options for {@link defineEnterRule}.
1216
+ *
1217
+ * @public
1218
+ */
1219
+ export declare type EnterRuleOptions = {
1220
+ /**
1221
+ * The regular expression to match against. It should end with `$`.
1222
+ */
1223
+ regex: RegExp;
1224
+ /**
1225
+ * A function to be called when an enter rule is triggered.
1226
+ */
1227
+ handler: EnterRuleHandler;
1228
+ /**
1229
+ * Whether to stop further handlers from being called if this rule is triggered.
1230
+ *
1231
+ * @default false
1232
+ */
1233
+ stop?: boolean;
1234
+ };
1235
+
1236
+ /**
1237
+ * When the selection is in a table node, create a default block after the table
1238
+ * table, and move the cursor there.
1239
+ *
1240
+ * @public
1241
+ */
1242
+ declare const exitTable: Command;
1243
+ export { exitTable }
1244
+ export { exitTable as exitTable_alias_1 }
1245
+
1246
+ /**
1247
+ * A function that handles one of the files in a drop event.
1248
+ *
1249
+ * Returns `true` if the file was handled and thus should not be handled by
1250
+ * other handlers.
1251
+ */
1252
+ export declare type FileDropHandler = (options: FileDropHandlerOptions) => boolean | void;
1253
+
1254
+ declare interface FileDropHandlerOptions {
1255
+ /**
1256
+ * The editor view.
1257
+ */
1258
+ view: EditorView;
1259
+ /**
1260
+ * The event that triggered the drop.
1261
+ */
1262
+ event: DragEvent;
1263
+ /**
1264
+ * The file that was dropped.
1265
+ */
1266
+ file: File;
1267
+ /**
1268
+ * The position of the document where the file was dropped.
1269
+ */
1270
+ pos: number;
1271
+ }
1272
+ export { FileDropHandlerOptions }
1273
+ export { FileDropHandlerOptions as FileDropHandlerOptions_alias_1 }
1274
+
1275
+ declare type FileHandler<E extends Event> = (options: {
1276
+ view: EditorView;
1277
+ event: E;
1278
+ file: File;
1279
+ }) => boolean | void;
1280
+
1281
+ /**
1282
+ * A function that handles one of the files in a paste event.
1283
+ *
1284
+ * Returns `true` if the file was handled and thus should not be handled by
1285
+ * other handlers.
1286
+ */
1287
+ export declare type FilePasteHandler = (options: FilePasteHandlerOptions) => boolean | void;
1288
+
1289
+ declare interface FilePasteHandlerOptions {
1290
+ /**
1291
+ * The editor view.
1292
+ */
1293
+ view: EditorView;
1294
+ /**
1295
+ * The event that triggered the paste.
1296
+ */
1297
+ event: ClipboardEvent;
1298
+ /**
1299
+ * The file that was pasted.
1300
+ */
1301
+ file: File;
1302
+ }
1303
+ export { FilePasteHandlerOptions }
1304
+ export { FilePasteHandlerOptions as FilePasteHandlerOptions_alias_1 }
1305
+
1306
+ /**
1307
+ * Try to find a resolved pos of a cell by using the given pos as a hit point.
1308
+ *
1309
+ * @internal
1310
+ */
1311
+ export declare function findCellPos(doc: ProseMirrorNode, pos: number): ResolvedPos | undefined;
1312
+
1313
+ /**
1314
+ * Try to find the anchor and head cell in the same table by using the given
1315
+ * anchor and head as hit points, or fallback to the selection's anchor and
1316
+ * head.
1317
+ *
1318
+ * @internal
1319
+ */
1320
+ export declare function findCellRange(selection: Selection_2, anchorHit?: number, headHit?: number): [ResolvedPos, ResolvedPos] | undefined;
1321
+
1322
+ export declare function findTable($pos: ResolvedPos): FindParentNodeResult | undefined;
1323
+
1324
+ export { GapCursor }
1325
+
1326
+ /**
1327
+ * @internal
1328
+ */
1329
+ declare type GapCursorExtension = PlainExtension;
1330
+ export { GapCursorExtension }
1331
+ export { GapCursorExtension as GapCursorExtension_alias_1 }
1332
+
1333
+ export declare function getCheckRanges(transactions: readonly Transaction[], oldState: EditorState, newState: EditorState): Array<[number, number]>;
1334
+
1335
+ export declare function getPluginState(state: EditorState): PredictionPluginState | undefined;
1336
+
1337
+ export declare function getTrMeta(tr: Transaction): PredictionPluginState;
1338
+
1339
+ export declare function handleEvent<E extends Event>(view: EditorView, event: E, handlers: FileHandler<E>[], getFiles: (event: E) => File[]): boolean;
1340
+
1341
+ declare interface HeadingAttrs {
1342
+ level: number;
1343
+ }
1344
+ export { HeadingAttrs }
1345
+ export { HeadingAttrs as HeadingAttrs_alias_1 }
1346
+
1347
+ /**
1348
+ * @internal
1349
+ */
1350
+ declare type HeadingCommandsExtension = Extension<{
1351
+ Commands: {
1352
+ setHeading: [attrs?: HeadingAttrs | undefined];
1353
+ insertHeading: [attrs?: HeadingAttrs | undefined];
1354
+ toggleHeading: [attrs?: HeadingAttrs | undefined];
1355
+ };
1356
+ }>;
1357
+ export { HeadingCommandsExtension }
1358
+ export { HeadingCommandsExtension as HeadingCommandsExtension_alias_1 }
1359
+
1360
+ /**
1361
+ * @internal
1362
+ */
1363
+ declare type HeadingExtension = Union<[
1364
+ HeadingSpecExtension,
1365
+ HeadingCommandsExtension
1366
+ ]>;
1367
+ export { HeadingExtension }
1368
+ export { HeadingExtension as HeadingExtension_alias_1 }
1369
+
1370
+ /**
1371
+ * @internal
1372
+ */
1373
+ declare type HeadingSpecExtension = Extension<{
1374
+ Nodes: {
1375
+ heading: HeadingAttrs;
1376
+ };
1377
+ }>;
1378
+ export { HeadingSpecExtension }
1379
+ export { HeadingSpecExtension as HeadingSpecExtension_alias_1 }
1380
+
1381
+ declare interface HighlighterOptions extends Omit<ShikiHighlighterOptions, 'langs' | 'themes'> {
1382
+ themes: BundledTheme[];
1383
+ langs: (BundledLanguage | SpecialLanguage)[];
1384
+ }
1385
+ export { HighlighterOptions }
1386
+ export { HighlighterOptions as HighlighterOptions_alias_1 }
1387
+
1388
+ export declare type HighlighterResult = {
1389
+ highlighter: Highlighter;
1390
+ promise?: undefined;
1391
+ } | {
1392
+ highlighter?: undefined;
1393
+ promise: Promise<void>;
1394
+ };
1395
+
1396
+ /**
1397
+ * @public
1398
+ *
1399
+ * An alias for the `Parser` type from the `prosemirror-highlight` package.
1400
+ */
1401
+ declare type HighlightParser = Parser;
1402
+ export { HighlightParser }
1403
+ export { HighlightParser as HighlightParser_alias_1 }
1404
+
1405
+ declare type HorizontalRuleCommandsExtension = Extension<{
1406
+ Commands: {
1407
+ insertHorizontalRule: [];
1408
+ };
1409
+ }>;
1410
+ export { HorizontalRuleCommandsExtension }
1411
+ export { HorizontalRuleCommandsExtension as HorizontalRuleCommandsExtension_alias_1 }
1412
+
1413
+ declare type HorizontalRuleExtension = Union<[
1414
+ HorizontalRuleSpecExtension,
1415
+ HorizontalRuleCommandsExtension
1416
+ ]>;
1417
+ export { HorizontalRuleExtension }
1418
+ export { HorizontalRuleExtension as HorizontalRuleExtension_alias_1 }
1419
+
1420
+ declare type HorizontalRuleSpecExtension = Extension<{
1421
+ Nodes: {
1422
+ horizontalRule: Attrs;
1423
+ };
1424
+ }>;
1425
+ export { HorizontalRuleSpecExtension }
1426
+ export { HorizontalRuleSpecExtension as HorizontalRuleSpecExtension_alias_1 }
1427
+
1428
+ /**
1429
+ * @public
1430
+ */
1431
+ declare interface ImageAttrs {
1432
+ src?: string | null;
1433
+ width?: number | null;
1434
+ height?: number | null;
1435
+ }
1436
+ export { ImageAttrs }
1437
+ export { ImageAttrs as ImageAttrs_alias_1 }
1438
+
1439
+ /**
1440
+ * @internal
1441
+ */
1442
+ declare type ImageCommandsExtension = Extension<{
1443
+ Commands: {
1444
+ insertImage: [attrs?: ImageAttrs];
1445
+ };
1446
+ }>;
1447
+ export { ImageCommandsExtension }
1448
+ export { ImageCommandsExtension as ImageCommandsExtension_alias_1 }
1449
+
1450
+ /**
1451
+ * @internal
1452
+ */
1453
+ declare type ImageExtension = Union<[ImageSpecExtension, ImageCommandsExtension]>;
1454
+ export { ImageExtension }
1455
+ export { ImageExtension as ImageExtension_alias_1 }
1456
+
1457
+ /**
1458
+ * @internal
1459
+ */
1460
+ declare type ImageSpecExtension = Extension<{
1461
+ Nodes: {
1462
+ image: ImageAttrs;
1463
+ };
1464
+ }>;
1465
+ export { ImageSpecExtension }
1466
+ export { ImageSpecExtension as ImageSpecExtension_alias_1 }
1467
+
1468
+ export { IndentListOptions }
1469
+ export { IndentListOptions as IndentListOptions_alias_1 }
1470
+
1471
+ export declare function inputText(input: string): Promise<void>;
1472
+
1473
+ /**
1474
+ * Returns a command that inserts a horizontal rule at the current selection.
1475
+ */
1476
+ declare function insertHorizontalRule(): Command;
1477
+ export { insertHorizontalRule }
1478
+ export { insertHorizontalRule as insertHorizontalRule_alias_1 }
1479
+
1480
+ /**
1481
+ * Insert a table node with the given number of rows and columns, and optionally
1482
+ * a header row.
1483
+ *
1484
+ * @param options
1485
+ *
1486
+ * @public
1487
+ */
1488
+ declare function insertTable(options: InsertTableOptions): Command;
1489
+ export { insertTable }
1490
+ export { insertTable as insertTable_alias_1 }
1491
+
1492
+ /**
1493
+ * @public
1494
+ */
1495
+ declare interface InsertTableOptions {
1496
+ row: number;
1497
+ col: number;
1498
+ header: boolean;
1499
+ }
1500
+ export { InsertTableOptions }
1501
+ export { InsertTableOptions as InsertTableOptions_alias_1 }
1502
+
1503
+ /**
1504
+ * Checks if the given object is a `CellSelection` instance.
1505
+ *
1506
+ * @public
1507
+ */
1508
+ declare function isCellSelection(value: unknown): value is CellSelection;
1509
+ export { isCellSelection }
1510
+ export { isCellSelection as isCellSelection_alias_1 }
1511
+
1512
+ /**
1513
+ * @internal
1514
+ */
1515
+ declare type ItalicCommandsExtension = Extension<{
1516
+ Commands: {
1517
+ toggleItalic: [];
1518
+ };
1519
+ }>;
1520
+ export { ItalicCommandsExtension }
1521
+ export { ItalicCommandsExtension as ItalicCommandsExtension_alias_1 }
1522
+
1523
+ /**
1524
+ * @internal
1525
+ */
1526
+ declare type ItalicExtension = Union<[
1527
+ ItalicSpecExtension,
1528
+ ItalicCommandsExtension
1529
+ ]>;
1530
+ export { ItalicExtension }
1531
+ export { ItalicExtension as ItalicExtension_alias_1 }
1532
+
1533
+ /**
1534
+ * @internal
1535
+ */
1536
+ declare type ItalicSpecExtension = Extension<{
1537
+ Marks: {
1538
+ italic: Attrs;
1539
+ };
1540
+ }>;
1541
+ export { ItalicSpecExtension }
1542
+ export { ItalicSpecExtension as ItalicSpecExtension_alias_1 }
1543
+
1544
+ export declare const LINK_ENTER_RE: RegExp;
1545
+
1546
+ export declare const LINK_INPUT_RE: RegExp;
1547
+
1548
+ export declare const LINK_MARK_RE: RegExp;
1549
+
1550
+ /**
1551
+ * @public
1552
+ */
1553
+ export declare interface LinkAttrs {
1554
+ href: string;
1555
+ }
1556
+
1557
+ /**
1558
+ * @internal
1559
+ */
1560
+ export declare type LinkCommandsExtension = Extension<{
1561
+ Commands: {
1562
+ addLink: [LinkAttrs];
1563
+ removeLink: [];
1564
+ toggleLink: [LinkAttrs];
1565
+ expandLink: [];
1566
+ };
1567
+ }>;
1568
+
1569
+ /**
1570
+ * @internal
1571
+ */
1572
+ export declare type LinkExtension = Union<[LinkSpecExtension, LinkCommandsExtension]>;
1573
+
1574
+ /**
1575
+ * @internal
1576
+ */
1577
+ export declare type LinkSpecExtension = Extension<{
1578
+ Marks: {
1579
+ link: LinkAttrs;
1580
+ };
1581
+ }>;
1582
+
1583
+ /**
1584
+ * The attributes of a list node.
1585
+ *
1586
+ * @public
1587
+ */
1588
+ declare interface ListAttrs {
1589
+ /**
1590
+ * The kind of list node.
1591
+ */
1592
+ kind?: 'bullet' | 'ordered' | 'task' | 'toggle';
1593
+ /**
1594
+ * The optional order of the list node.
1595
+ */
1596
+ order?: number | null;
1597
+ /**
1598
+ * Whether the list node is checked if its `kind` is `"task"`.
1599
+ */
1600
+ checked?: boolean;
1601
+ /**
1602
+ * Whether the list node is collapsed if its `kind` is `"toggle"`.
1603
+ */
1604
+ collapsed?: boolean;
1605
+ }
1606
+ export { ListAttrs }
1607
+ export { ListAttrs as ListAttrs_alias_1 }
1608
+ export { ListAttrs as ListAttrs_alias_2 }
1609
+
1610
+ /**
1611
+ * @internal
1612
+ */
1613
+ declare type ListCommandsExtension = Extension<{
1614
+ Commands: {
1615
+ dedentList: [options?: DedentListOptions];
1616
+ indentList: [options?: IndentListOptions];
1617
+ moveList: [direction: 'up' | 'down'];
1618
+ splitList: [];
1619
+ toggleCollapsed: [options?: ToggleCollapsedOptions];
1620
+ unwrapList: [options?: UnwrapListOptions];
1621
+ toggleList: [attrs?: ListAttributes];
1622
+ wrapInList: [attrs?: ListAttributes];
1623
+ insertList: [attrs?: ListAttributes];
1624
+ };
1625
+ }>;
1626
+ export { ListCommandsExtension }
1627
+ export { ListCommandsExtension as ListCommandsExtension_alias_1 }
1628
+ export { ListCommandsExtension as ListCommandsExtension_alias_2 }
1629
+
1630
+ export { ListDOMSerializer }
1631
+ export { ListDOMSerializer as ListDOMSerializer_alias_1 }
1632
+
1633
+ /**
1634
+ * @internal
1635
+ */
1636
+ declare type ListExtension = Union<[ListSpecExtension, ListCommandsExtension]>;
1637
+ export { ListExtension }
1638
+ export { ListExtension as ListExtension_alias_1 }
1639
+
1640
+ /**
1641
+ * @internal
1642
+ */
1643
+ declare type ListSpecExtension = Extension<{
1644
+ Nodes: {
1645
+ list: ListAttrs;
1646
+ };
1647
+ }>;
1648
+ export { ListSpecExtension }
1649
+ export { ListSpecExtension as ListSpecExtension_alias_1 }
1650
+ export { ListSpecExtension as ListSpecExtension_alias_2 }
1651
+
1652
+ /**
1653
+ * @internal
1654
+ */
1655
+ export declare type LoroCommandsExtension = Extension<{
1656
+ Commands: {
1657
+ undo: [];
1658
+ redo: [];
1659
+ };
1660
+ }>;
1661
+
1662
+ declare interface LoroCursorOptions {
1663
+ awareness: CursorAwareness;
1664
+ getSelection?: (state: EditorState) => Selection_2;
1665
+ createCursor?: (user: PeerID) => Element;
1666
+ createSelection?: (user: PeerID) => DecorationAttrs;
1667
+ }
1668
+ export { LoroCursorOptions }
1669
+ export { LoroCursorOptions as LoroCursorOptions_alias_1 }
1670
+ export { LoroCursorOptions as LoroCursorOptions_alias_2 }
1671
+
1672
+ /**
1673
+ * @internal
1674
+ */
1675
+ declare type LoroExtension = Union<[LoroCommandsExtension, PlainExtension]>;
1676
+ export { LoroExtension }
1677
+ export { LoroExtension as LoroExtension_alias_1 }
1678
+
1679
+ declare interface LoroOptions {
1680
+ /**
1681
+ * The Loro instance handles the state of shared data.
1682
+ */
1683
+ doc: LoroDocType;
1684
+ /**
1685
+ * The Awareness instance.
1686
+ */
1687
+ awareness: CursorAwareness;
1688
+ /**
1689
+ * Extra options for `LoroSyncPlugin`.
1690
+ */
1691
+ sync?: Omit<LoroSyncPluginProps, 'doc'>;
1692
+ /**
1693
+ * Extra options for the `LoroUndoPlugin`.
1694
+ */
1695
+ undo?: Omit<LoroUndoPluginProps, 'doc'>;
1696
+ /**
1697
+ * Extra options for `LoroCursorPlugin`.
1698
+ */
1699
+ cursor?: Omit<LoroCursorOptions, 'awareness'>;
1700
+ }
1701
+ export { LoroOptions }
1702
+ export { LoroOptions as LoroOptions_alias_1 }
1703
+
1704
+ export { LoroSyncPluginProps }
1705
+ export { LoroSyncPluginProps as LoroSyncPluginProps_alias_1 }
1706
+
1707
+ export { LoroUndoPluginProps }
1708
+ export { LoroUndoPluginProps as LoroUndoPluginProps_alias_1 }
1709
+
1710
+ /**
1711
+ * Options for {@link defineMarkInputRule}.
1712
+ *
1713
+ * @public
1714
+ */
1715
+ export declare interface MarkInputRuleOptions {
1716
+ /**
1717
+ * The regular expression to match against, which should end with `$` and has
1718
+ * exactly one capture group. All other matched text outside the capture group
1719
+ * will be deleted.
1720
+ */
1721
+ regex: RegExp;
1722
+ /**
1723
+ * The type of mark to set.
1724
+ */
1725
+ type: string | MarkType;
1726
+ /**
1727
+ * Attributes to set on the mark.
1728
+ */
1729
+ attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
1730
+ }
1731
+
1732
+ /**
1733
+ * The options for {@link defineMarkRule}.
1734
+ *
1735
+ * @public
1736
+ */
1737
+ declare interface MarkRuleOptions {
1738
+ /**
1739
+ * The regular expression to match against. It must has a `g` flag to match
1740
+ * all instances of the mark.
1741
+ */
1742
+ regex: RegExp;
1743
+ /**
1744
+ * The mark type to apply to the matched text.
1745
+ */
1746
+ type: string | MarkType;
1747
+ /**
1748
+ * Attributes to set on the mark. If a function is provided, it will be called
1749
+ * with the matched result from the regular expression.
1750
+ *
1751
+ * @default null
1752
+ */
1753
+ attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
1754
+ }
1755
+ export { MarkRuleOptions }
1756
+ export { MarkRuleOptions as MarkRuleOptions_alias_1 }
1757
+
1758
+ declare type MatchHandler = (options: {
1759
+ state: EditorState;
1760
+ match: RegExpExecArray;
1761
+ from: number;
1762
+ to: number;
1763
+ ignoreMatch: () => void;
1764
+ deleteMatch: () => void;
1765
+ }) => void;
1766
+ export { MatchHandler }
1767
+ export { MatchHandler as MatchHandler_alias_1 }
1768
+
1769
+ export declare interface MentionAttrs {
1770
+ id: string;
1771
+ value: string;
1772
+ kind: string;
1773
+ }
1774
+
1775
+ /**
1776
+ * @internal
1777
+ */
1778
+ export declare type ModClickPreventionExtension = PlainExtension;
1779
+
1780
+ export declare interface PlaceholderOptions {
1781
+ /**
1782
+ * The placeholder to use. It can be a static string or a function that
1783
+ * receives the current editor state and returns a string.
1784
+ */
1785
+ placeholder: string | ((state: EditorState) => string);
1786
+ /**
1787
+ * By default, the placeholder text will be shown whenever the current text
1788
+ * cursor is in an empty text node. If you only want to show the placeholder
1789
+ * when the whole doc is empty, you can set this option to 'doc'.
1790
+ *
1791
+ * @default 'block'
1792
+ */
1793
+ strategy?: 'doc' | 'block';
1794
+ }
1795
+
1796
+ export declare const pluginKey: PluginKey<PredictionPluginState>;
1797
+
1798
+ export declare interface PredictionPluginState {
1799
+ active: boolean;
1800
+ ignore: number | null;
1801
+ matching: {
1802
+ rule: AutocompleteRule;
1803
+ from: number;
1804
+ to: number;
1805
+ match: RegExpExecArray;
1806
+ } | null;
1807
+ }
1808
+
1809
+ /**
1810
+ * @example
1811
+ *
1812
+ * ```ts
1813
+ * await pressKey('mod-1')
1814
+ * await pressKey('Backspace')
1815
+ * ```
1816
+ *
1817
+ * @internal
1818
+ */
1819
+ export declare function pressKey(input: string): Promise<void>;
1820
+
1821
+ /**
1822
+ * @internal
1823
+ */
1824
+ export declare const redo: Command;
1825
+
1826
+ /**
1827
+ * Options for {@link defineSearchQuery}
1828
+ *
1829
+ * @public
1830
+ */
1831
+ export declare interface SearchQueryOptions {
1832
+ /**
1833
+ * The search string (or regular expression).
1834
+ */
1835
+ search: string;
1836
+ /**
1837
+ * The replace text.
1838
+ */
1839
+ replace?: string;
1840
+ /**
1841
+ * Indicates whether the search is case-sensitive
1842
+ *
1843
+ * @default false
1844
+ */
1845
+ caseSensitive?: boolean;
1846
+ /**
1847
+ * By default, string search will replace `\n`, `\r`, and `\t` in the query
1848
+ * with newline, return, and tab characters. When this is set to true, that
1849
+ * behavior is disabled.
1850
+ *
1851
+ * @default false
1852
+ */
1853
+ literal?: boolean;
1854
+ /**
1855
+ * When true, the search string is interpreted as a regular expression.
1856
+ *
1857
+ * @default false
1858
+ */
1859
+ regexp?: boolean;
1860
+ /**
1861
+ * Enable whole-word matching.
1862
+ *
1863
+ * @default false
1864
+ */
1865
+ wholeWord?: boolean;
1866
+ }
1867
+
1868
+ /**
1869
+ * @public
1870
+ */
1871
+ declare function selectTable(options?: SelectTableOptions): Command;
1872
+ export { selectTable }
1873
+ export { selectTable as selectTable_alias_1 }
1874
+
1875
+ /**
1876
+ * @public
1877
+ */
1878
+ declare function selectTableCell(options?: SelectTableCellOptions): Command;
1879
+ export { selectTableCell }
1880
+ export { selectTableCell as selectTableCell_alias_1 }
1881
+
1882
+ /**
1883
+ * @public
1884
+ */
1885
+ declare interface SelectTableCellOptions {
1886
+ /**
1887
+ * A hit position of the table cell to select from. By default, the selection
1888
+ * anchor will be used.
1889
+ */
1890
+ pos?: number;
1891
+ }
1892
+ export { SelectTableCellOptions }
1893
+ export { SelectTableCellOptions as SelectTableCellOptions_alias_1 }
1894
+
1895
+ /**
1896
+ * @public
1897
+ */
1898
+ declare function selectTableColumn(options?: SelectTableColumnOptions): Command;
1899
+ export { selectTableColumn }
1900
+ export { selectTableColumn as selectTableColumn_alias_1 }
1901
+
1902
+ /**
1903
+ * @public
1904
+ */
1905
+ declare interface SelectTableColumnOptions {
1906
+ /**
1907
+ * A hit position of the table cell to select from. By default, the selection
1908
+ * anchor will be used.
1909
+ */
1910
+ anchor?: number;
1911
+ /**
1912
+ * A hit position of the table cell to select to. By default, the selection
1913
+ * head will be used.
1914
+ */
1915
+ head?: number;
1916
+ }
1917
+ export { SelectTableColumnOptions }
1918
+ export { SelectTableColumnOptions as SelectTableColumnOptions_alias_1 }
1919
+
1920
+ /**
1921
+ * @public
1922
+ */
1923
+ declare interface SelectTableOptions {
1924
+ /**
1925
+ * A hit position of the table to select from. By default, the selection
1926
+ * anchor will be used.
1927
+ */
1928
+ pos?: number;
1929
+ }
1930
+ export { SelectTableOptions }
1931
+ export { SelectTableOptions as SelectTableOptions_alias_1 }
1932
+
1933
+ /**
1934
+ * @public
1935
+ */
1936
+ declare function selectTableRow(options?: SelectTableRowOptions): Command;
1937
+ export { selectTableRow }
1938
+ export { selectTableRow as selectTableRow_alias_1 }
1939
+
1940
+ /**
1941
+ * @public
1942
+ */
1943
+ declare interface SelectTableRowOptions {
1944
+ /**
1945
+ * A hit position of the table cell to select from. By default, the selection
1946
+ * anchor will be used.
1947
+ */
1948
+ anchor?: number;
1949
+ /**
1950
+ * A hit position of the table cell to select to. By default, the selection
1951
+ * head will be used.
1952
+ */
1953
+ head?: number;
1954
+ }
1955
+ export { SelectTableRowOptions }
1956
+ export { SelectTableRowOptions as SelectTableRowOptions_alias_1 }
1957
+
1958
+ /**
1959
+ * @internal
1960
+ */
1961
+ export declare function setTextAlign({ types, value, }: {
1962
+ types: string[];
1963
+ value: string | null;
1964
+ }): Command;
1965
+
1966
+ export declare function setTrMeta(tr: Transaction, meta: PredictionPluginState): Transaction;
1967
+
1968
+ /**
1969
+ * @internal
1970
+ */
1971
+ export declare function setupTest(): {
1972
+ editor: TestEditor<Union<readonly [DocExtension, TextExtension, HeadingExtension, HistoryExtension, ListExtension, BlockquoteExtension, PlainExtension, BaseCommandsExtension, ItalicExtension, BoldExtension, UnderlineExtension, StrikeExtension, CodeExtension, LinkExtension, ImageExtension, Extension<{
1973
+ Nodes: {
1974
+ paragraph: Attrs_2;
1975
+ };
1976
+ }>, TableExtension, HorizontalRuleExtension]>>;
1977
+ m: ToMarkAction<SimplifyDeeper< {
1978
+ bold: {
1979
+ readonly [x: string]: any;
1980
+ };
1981
+ code: {
1982
+ readonly [x: string]: any;
1983
+ };
1984
+ italic: {
1985
+ readonly [x: string]: any;
1986
+ };
1987
+ link: {
1988
+ href: string;
1989
+ };
1990
+ strike: {
1991
+ readonly [x: string]: any;
1992
+ };
1993
+ underline: {
1994
+ readonly [x: string]: any;
1995
+ };
1996
+ }>>;
1997
+ n: {
1998
+ p: NodeAction< {
1999
+ readonly [x: string]: any;
2000
+ }>;
2001
+ h1: (...children: NodeChild[]) => Node_2;
2002
+ h2: (...children: NodeChild[]) => Node_2;
2003
+ h3: (...children: NodeChild[]) => Node_2;
2004
+ h4: (...children: NodeChild[]) => Node_2;
2005
+ h5: (...children: NodeChild[]) => Node_2;
2006
+ h6: (...children: NodeChild[]) => Node_2;
2007
+ bullet: (...children: NodeChild[]) => Node_2;
2008
+ ordered: (...children: NodeChild[]) => Node_2;
2009
+ checked: (...children: NodeChild[]) => Node_2;
2010
+ unchecked: (...children: NodeChild[]) => Node_2;
2011
+ collapsed: (...children: NodeChild[]) => Node_2;
2012
+ expanded: (...children: NodeChild[]) => Node_2;
2013
+ doc: NodeAction< {
2014
+ readonly [x: string]: any;
2015
+ }>;
2016
+ paragraph: NodeAction< {
2017
+ readonly [x: string]: any;
2018
+ }>;
2019
+ text: NodeAction< {
2020
+ readonly [x: string]: any;
2021
+ }>;
2022
+ blockquote: NodeAction< {
2023
+ readonly [x: string]: any;
2024
+ }>;
2025
+ heading: NodeAction< {
2026
+ level: number;
2027
+ }>;
2028
+ horizontalRule: NodeAction< {
2029
+ readonly [x: string]: any;
2030
+ }>;
2031
+ image: NodeAction< {
2032
+ src?: (string | null) | undefined;
2033
+ width?: (number | null) | undefined;
2034
+ height?: (number | null) | undefined;
2035
+ }>;
2036
+ list: NodeAction< {
2037
+ kind?: ("bullet" | "ordered" | "task" | "toggle") | undefined;
2038
+ order?: (number | null) | undefined;
2039
+ checked?: boolean | undefined;
2040
+ collapsed?: boolean | undefined;
2041
+ }>;
2042
+ table: NodeAction< {
2043
+ readonly [x: string]: any;
2044
+ }>;
2045
+ tableRow: NodeAction< {
2046
+ readonly [x: string]: any;
2047
+ }>;
2048
+ tableCell: NodeAction< {
2049
+ colspan: number;
2050
+ rowspan: number;
2051
+ colwidth: number[] | null;
2052
+ }>;
2053
+ tableHeaderCell: NodeAction< {
2054
+ colspan: number;
2055
+ rowspan: number;
2056
+ colwidth: number[] | null;
2057
+ }>;
2058
+ };
2059
+ };
2060
+
2061
+ /**
2062
+ * @internal
2063
+ */
2064
+ export declare function setupTestFromExtension<E extends Extension>(extension: E): {
2065
+ editor: TestEditor<E>;
2066
+ n: ExtractNodeActions<E>;
2067
+ m: ExtractMarkActions<E>;
2068
+ };
2069
+
2070
+ export declare interface ShikiHighlighterOptions extends BundledHighlighterOptions<BundledLanguage, BundledTheme> {
2071
+ }
2072
+
2073
+ /**
2074
+ * @internal
2075
+ */
2076
+ export declare type StrikeCommandsExtension = Extension<{
2077
+ Commands: {
2078
+ toggleStrike: [];
2079
+ };
2080
+ }>;
2081
+
2082
+ /**
2083
+ * @internal
2084
+ */
2085
+ export declare type StrikeExtension = Union<[
2086
+ StrikeSpecExtension,
2087
+ StrikeCommandsExtension
2088
+ ]>;
2089
+
2090
+ /**
2091
+ * @internal
2092
+ */
2093
+ export declare type StrikeSpecExtension = Extension<{
2094
+ Marks: {
2095
+ strike: Attrs;
2096
+ };
2097
+ }>;
2098
+
2099
+ /**
2100
+ * @internal
2101
+ */
2102
+ declare type TableCellSpecExtension = Extension<{
2103
+ Nodes: {
2104
+ tableCell: CellAttrs;
2105
+ };
2106
+ }>;
2107
+ export { TableCellSpecExtension }
2108
+ export { TableCellSpecExtension as TableCellSpecExtension_alias_1 }
2109
+
2110
+ /**
2111
+ * @internal
2112
+ */
2113
+ declare type TableCommandsExtension = Extension<{
2114
+ Commands: {
2115
+ insertTable: [InsertTableOptions];
2116
+ exitTable: [];
2117
+ selectTable: [options?: SelectTableOptions];
2118
+ selectTableCell: [options?: SelectTableCellOptions];
2119
+ selectTableColumn: [options?: SelectTableColumnOptions];
2120
+ selectTableRow: [options?: SelectTableRowOptions];
2121
+ addTableColumnBefore: [];
2122
+ addTableColumnAfter: [];
2123
+ addTableRowAbove: [];
2124
+ addTableRowBelow: [];
2125
+ deleteTable: [];
2126
+ deleteTableColumn: [];
2127
+ deleteTableRow: [];
2128
+ deleteCellSelection: [];
2129
+ mergeTableCells: [];
2130
+ splitTableCell: [];
2131
+ };
2132
+ }>;
2133
+ export { TableCommandsExtension }
2134
+ export { TableCommandsExtension as TableCommandsExtension_alias_1 }
2135
+
2136
+ /**
2137
+ * @internal
2138
+ */
2139
+ declare type TableExtension = Union<[
2140
+ TableSpecExtension,
2141
+ TableRowSpecExtension,
2142
+ TableCellSpecExtension,
2143
+ TableHeaderCellSpecExtension,
2144
+ TableCommandsExtension
2145
+ ]>;
2146
+ export { TableExtension }
2147
+ export { TableExtension as TableExtension_alias_1 }
2148
+
2149
+ /**
2150
+ * @internal
2151
+ */
2152
+ declare type TableHeaderCellSpecExtension = Extension<{
2153
+ Nodes: {
2154
+ tableHeaderCell: CellAttrs;
2155
+ };
2156
+ }>;
2157
+ export { TableHeaderCellSpecExtension }
2158
+ export { TableHeaderCellSpecExtension as TableHeaderCellSpecExtension_alias_1 }
2159
+
2160
+ /**
2161
+ * @internal
2162
+ */
2163
+ declare type TableRowSpecExtension = Extension<{
2164
+ Nodes: {
2165
+ tableRow: Attrs;
2166
+ };
2167
+ }>;
2168
+ export { TableRowSpecExtension }
2169
+ export { TableRowSpecExtension as TableRowSpecExtension_alias_1 }
2170
+
2171
+ /**
2172
+ * @internal
2173
+ */
2174
+ declare type TableSpecExtension = Extension<{
2175
+ Nodes: {
2176
+ table: Attrs;
2177
+ };
2178
+ }>;
2179
+ export { TableSpecExtension }
2180
+ export { TableSpecExtension as TableSpecExtension_alias_1 }
2181
+
2182
+ /**
2183
+ * @internal
2184
+ */
2185
+ export declare type TextAlignAttrsExtension<NodeName extends string> = Extension<{
2186
+ Nodes: {
2187
+ [K in NodeName]: {
2188
+ textAlign: string | null;
2189
+ };
2190
+ };
2191
+ }>;
2192
+
2193
+ /**
2194
+ * @internal
2195
+ */
2196
+ export declare type TextAlignCommandsExtension = Extension<{
2197
+ Commands: {
2198
+ setTextAlign: [value: string | null];
2199
+ };
2200
+ }>;
2201
+
2202
+ /**
2203
+ * @internal
2204
+ */
2205
+ export declare type TextAlignExtension<NodeName extends string> = Union<[
2206
+ TextAlignAttrsExtension<NodeName>,
2207
+ TextAlignCommandsExtension
2208
+ ]>;
2209
+
2210
+ /**
2211
+ * @public
2212
+ */
2213
+ export declare interface TextAlignOptions<NodeName extends string = string> {
2214
+ /**
2215
+ * The names of node to add the attribute to.
2216
+ *
2217
+ * @example
2218
+ *
2219
+ * ["paragraph", "heading"]
2220
+ */
2221
+ types: NodeName[];
2222
+ /**
2223
+ * The default value for the attribute.
2224
+ *
2225
+ * @default "left"
2226
+ */
2227
+ default?: string;
2228
+ }
2229
+
2230
+ /**
2231
+ * Options for {@link defineTextBlockEnterRule}.
2232
+ *
2233
+ * @public
2234
+ */
2235
+ export declare type TextBlockEnterRuleOptions = {
2236
+ /**
2237
+ * The regular expression to match against. It should end with `$`.
2238
+ */
2239
+ regex: RegExp;
2240
+ /**
2241
+ * The node type to replace the matched text with.
2242
+ */
2243
+ type: string | NodeType;
2244
+ /**
2245
+ * Attributes to set on the node. If a function is provided, it will be called
2246
+ * with the matched result from the regular expression.
2247
+ */
2248
+ attrs?: Attrs | null | ((match: RegExpMatchArray) => Attrs | null);
2249
+ /**
2250
+ * Whether to stop further handlers from being called if this rule is triggered.
2251
+ *
2252
+ * @default true
2253
+ */
2254
+ stop?: boolean;
2255
+ };
2256
+
2257
+ export { ToggleCollapsedOptions }
2258
+ export { ToggleCollapsedOptions as ToggleCollapsedOptions_alias_1 }
2259
+
2260
+ /**
2261
+ * @internal
2262
+ */
2263
+ export declare type UnderlineCommandsExtension = Extension<{
2264
+ Commands: {
2265
+ toggleUnderline: [];
2266
+ };
2267
+ }>;
2268
+
2269
+ /**
2270
+ * @internal
2271
+ */
2272
+ export declare type UnderlineExtension = Union<[
2273
+ UnderlineSpecExtension,
2274
+ UnderlineCommandsExtension
2275
+ ]>;
2276
+
2277
+ /**
2278
+ * @internal
2279
+ */
2280
+ export declare type UnderlineSpecExtension = Extension<{
2281
+ Marks: {
2282
+ underline: Attrs;
2283
+ };
2284
+ }>;
2285
+
2286
+ /**
2287
+ * @internal
2288
+ */
2289
+ export declare const undo: Command;
2290
+
2291
+ export { UnwrapListOptions }
2292
+ export { UnwrapListOptions as UnwrapListOptions_alias_1 }
2293
+
2294
+ /**
2295
+ * The implementation of the actual upload function. You need to implement this
2296
+ * function to upload files to your desired destination.
2297
+ */
2298
+ declare type Uploader<Result> = (options: UploaderOptions) => Promise<Result>;
2299
+ export { Uploader }
2300
+ export { Uploader as Uploader_alias_1 }
2301
+
2302
+ declare interface UploaderOptions {
2303
+ /**
2304
+ * The file to be uploaded.
2305
+ */
2306
+ file: File;
2307
+ /**
2308
+ * A callback function that should be called with the upload progress updates.
2309
+ */
2310
+ onProgress: (progress: UploadProgress) => void;
2311
+ }
2312
+ export { UploaderOptions }
2313
+ export { UploaderOptions as UploaderOptions_alias_1 }
2314
+
2315
+ /**
2316
+ * An interface representing the upload progress.
2317
+ */
2318
+ declare interface UploadProgress {
2319
+ loaded: number;
2320
+ total: number;
2321
+ }
2322
+ export { UploadProgress }
2323
+ export { UploadProgress as UploadProgress_alias_1 }
2324
+
2325
+ /**
2326
+ * A class that represents a upload task.
2327
+ */
2328
+ declare class UploadTask<Result> {
2329
+ /**
2330
+ * An [object URL](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL)
2331
+ * representing the file to be uploaded. This URL will be revoked once the
2332
+ * upload is complete successfully.
2333
+ */
2334
+ readonly objectURL: string;
2335
+ /**
2336
+ * A boolean indicating whether the upload is complete (either successfully or with an error).
2337
+ */
2338
+ protected done: boolean;
2339
+ /**
2340
+ * A promise that fulfills once the upload is complete, or rejects if an error occurs.
2341
+ */
2342
+ readonly finished: Promise<Result>;
2343
+ private subscribers;
2344
+ /**
2345
+ * Creates a new upload task. You can find the upload task by its object URL
2346
+ * later using `UploadTask.get()`.
2347
+ *
2348
+ * @param options - The options for the upload task.
2349
+ */
2350
+ constructor({ file, uploader }: {
2351
+ file: File;
2352
+ uploader: Uploader<Result>;
2353
+ });
2354
+ /**
2355
+ * Subscribes to progress updates. Returns a function to unsubscribe.
2356
+ */
2357
+ subscribeProgress(callback: (progress: UploadProgress) => void): VoidFunction;
2358
+ /**
2359
+ * Finds an upload task by its object URL.
2360
+ */
2361
+ static get<Result = unknown>(objectURL: string): UploadTask<Result> | undefined;
2362
+ /**
2363
+ * Deletes an upload task by its object URL.
2364
+ */
2365
+ static delete(objectURL: string): void;
2366
+ }
2367
+ export { UploadTask }
2368
+ export { UploadTask as UploadTask_alias_1 }
2369
+
2370
+ /**
2371
+ * @internal
2372
+ */
2373
+ export declare type VirtualSelectionExtension = PlainExtension;
2374
+
2375
+ export { WrapInListGetAttrs }
2376
+ export { WrapInListGetAttrs as WrapInListGetAttrs_alias_1 }
2377
+
2378
+ /**
2379
+ * @internal
2380
+ */
2381
+ export declare type YjsCommandsExtension = Extension<{
2382
+ Commands: {
2383
+ undo: [];
2384
+ redo: [];
2385
+ };
2386
+ }>;
2387
+
2388
+ declare interface YjsCursorOptions extends YjsCursorPluginOptions {
2389
+ awareness: Awareness;
2390
+ }
2391
+ export { YjsCursorOptions }
2392
+ export { YjsCursorOptions as YjsCursorOptions_alias_1 }
2393
+
2394
+ /**
2395
+ * Options for `y-prosemirror`'s `yCursorPlugin`.
2396
+ */
2397
+ declare type YjsCursorPluginOptions = NonNullable<Parameters<typeof yCursorPlugin>[1]>;
2398
+ export { YjsCursorPluginOptions }
2399
+ export { YjsCursorPluginOptions as YjsCursorPluginOptions_alias_1 }
2400
+
2401
+ /**
2402
+ * @internal
2403
+ */
2404
+ declare type YjsExtension = Union<[YjsCommandsExtension, PlainExtension]>;
2405
+ export { YjsExtension }
2406
+ export { YjsExtension as YjsExtension_alias_1 }
2407
+
2408
+ declare interface YjsOptions {
2409
+ /**
2410
+ * The Yjs instance handles the state of shared data.
2411
+ */
2412
+ doc: Y.Doc;
2413
+ /**
2414
+ * The Awareness instance.
2415
+ */
2416
+ awareness: Awareness;
2417
+ /**
2418
+ * The Yjs XmlFragment to use. If not provided,
2419
+ * `doc.getXmlFragment('prosemirror')` will be used.
2420
+ */
2421
+ fragment?: Y.XmlFragment;
2422
+ /**
2423
+ * Options for `y-prosemirror`'s `ySyncPlugin`.
2424
+ */
2425
+ sync?: YjsSyncPluginOptions;
2426
+ /**
2427
+ * Options for the `y-prosemirror`'s `yUndoPlugin`.
2428
+ */
2429
+ undo?: YjsUndoPluginOptions;
2430
+ /**
2431
+ * Options for `y-prosemirror`'s `yCursorPlugin`.
2432
+ */
2433
+ cursor?: YjsCursorPluginOptions;
2434
+ }
2435
+ export { YjsOptions }
2436
+ export { YjsOptions as YjsOptions_alias_1 }
2437
+
2438
+ declare interface YjsSyncOptions extends YjsSyncPluginOptions {
2439
+ fragment: Y.XmlFragment;
2440
+ }
2441
+ export { YjsSyncOptions }
2442
+ export { YjsSyncOptions as YjsSyncOptions_alias_1 }
2443
+
2444
+ /**
2445
+ * Options for `y-prosemirror`'s `ySyncPlugin`.
2446
+ */
2447
+ declare type YjsSyncPluginOptions = NonNullable<Parameters<typeof ySyncPlugin>[1]>;
2448
+ export { YjsSyncPluginOptions }
2449
+ export { YjsSyncPluginOptions as YjsSyncPluginOptions_alias_1 }
2450
+
2451
+ declare interface YjsUndoOptions extends YjsUndoPluginOptions {
2452
+ }
2453
+ export { YjsUndoOptions }
2454
+ export { YjsUndoOptions as YjsUndoOptions_alias_1 }
2455
+
2456
+ /**
2457
+ * Options for the `y-prosemirror`'s `yUndoPlugin`.
2458
+ */
2459
+ declare type YjsUndoPluginOptions = NonNullable<Parameters<typeof yUndoPlugin>[0]>;
2460
+ export { YjsUndoPluginOptions }
2461
+ export { YjsUndoPluginOptions as YjsUndoPluginOptions_alias_1 }
2462
+
2463
+ export { }