@prosekit/extensions 0.5.0 → 0.5.1

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.
@@ -6,11 +6,9 @@ import { BundledTheme } from 'shiki';
6
6
  import { BundledThemeInfo } from 'shiki';
7
7
  import { bundledThemesInfo } from 'shiki';
8
8
  import { Command } from '@prosekit/pm/state';
9
- import { CommandArgs } from '@prosekit/core';
10
9
  import { DedentListOptions } from 'prosemirror-flat-list';
11
10
  import { EditorState } from '@prosekit/pm/state';
12
11
  import { Extension } from '@prosekit/core';
13
- import { ExtensionTyping } from '@prosekit/core';
14
12
  import { getHighlighter } from 'shiki/bundle/full';
15
13
  import { IndentListOptions } from 'prosemirror-flat-list';
16
14
  import { InputRule } from '@prosekit/pm/inputrules';
@@ -141,50 +139,62 @@ export declare function defineAutocomplete(rule: AutocompleteRule): Extension;
141
139
  * @public
142
140
  */
143
141
  export declare function defineBlockquote(): Extension< {
144
- NODES: "blockquote";
142
+ Nodes: any;
143
+ Marks: any;
144
+ Commands: {
145
+ [x: string]: any;
146
+ };
145
147
  }>;
146
148
 
147
149
  /**
148
150
  * Wraps the text block in a blockquote when `>` is typed at the start of a new
149
151
  * line followed by a space.
150
152
  */
151
- export declare function defineBlockquoteInputRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
153
+ export declare function defineBlockquoteInputRule(): Extension<any>;
152
154
 
153
155
  export declare function defineBlockquoteSpec(): Extension< {
154
- NODES: "blockquote";
156
+ Nodes: "blockquote";
157
+ Marks: never;
158
+ Commands: never;
155
159
  }>;
156
160
 
157
161
  /**
158
162
  * @public
159
163
  */
160
164
  export declare function defineBold(): Extension< {
161
- MARKS: "bold";
162
- COMMAND_ARGS: {
163
- toggleBold: [];
165
+ Nodes: any;
166
+ Marks: any;
167
+ Commands: {
168
+ [x: string]: any;
164
169
  };
165
170
  }>;
166
171
 
167
172
  export declare function defineBoldCommands(): Extension< {
168
- COMMAND_ARGS: {
173
+ Commands: {
169
174
  toggleBold: [];
170
175
  };
176
+ Nodes: never;
177
+ Marks: never;
171
178
  }>;
172
179
 
173
- export declare function defineBoldInputRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
180
+ export declare function defineBoldInputRule(): Extension<any>;
174
181
 
175
- export declare function defineBoldKeymap(): Extension<ExtensionTyping<string, string, CommandArgs>>;
182
+ export declare function defineBoldKeymap(): Extension<any>;
176
183
 
177
184
  export declare function defineBoldSpec(): Extension< {
178
- MARKS: "bold";
185
+ Marks: "bold";
186
+ Nodes: never;
187
+ Commands: never;
179
188
  }>;
180
189
 
181
190
  /**
182
191
  * @public
183
192
  */
184
193
  export declare function defineCode(): Extension< {
185
- MARKS: "code";
186
- COMMAND_ARGS: {
187
- toggleCode: [];
194
+ Nodes: any;
195
+ Marks: any;
196
+ Commands: {
197
+ [x: string]: any;
188
198
  };
189
199
  }>;
190
200
 
@@ -200,12 +210,10 @@ toggleCode: [];
200
210
  * @public
201
211
  */
202
212
  declare function defineCodeBlock(): Extension< {
203
- NODES: "codeBlock";
204
- COMMAND_ARGS: {
205
- setCodeBlock: [attrs?: CodeBlockAttrs | undefined];
206
- insertCodeBlock: [attrs?: CodeBlockAttrs | undefined];
207
- toggleCodeBlock: [attrs?: CodeBlockAttrs | undefined];
208
- setCodeBlockAttrs: [attrs: CodeBlockAttrs];
213
+ Nodes: any;
214
+ Marks: any;
215
+ Commands: {
216
+ [x: string]: any;
209
217
  };
210
218
  }>;
211
219
  export { defineCodeBlock }
@@ -217,12 +225,14 @@ export { defineCodeBlock as defineCodeBlock_alias_1 }
217
225
  * @public
218
226
  */
219
227
  declare function defineCodeBlockCommands(): Extension< {
220
- COMMAND_ARGS: {
228
+ Commands: {
221
229
  setCodeBlock: [attrs?: CodeBlockAttrs | undefined];
222
230
  insertCodeBlock: [attrs?: CodeBlockAttrs | undefined];
223
231
  toggleCodeBlock: [attrs?: CodeBlockAttrs | undefined];
224
232
  setCodeBlockAttrs: [attrs: CodeBlockAttrs];
225
233
  };
234
+ Nodes: never;
235
+ Marks: never;
226
236
  }>;
227
237
  export { defineCodeBlockCommands }
228
238
  export { defineCodeBlockCommands as defineCodeBlockCommands_alias_1 }
@@ -232,7 +242,7 @@ export { defineCodeBlockCommands as defineCodeBlockCommands_alias_1 }
232
242
  *
233
243
  * @public
234
244
  */
235
- declare function defineCodeBlockEnterRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
245
+ declare function defineCodeBlockEnterRule(): Extension<any>;
236
246
  export { defineCodeBlockEnterRule }
237
247
  export { defineCodeBlockEnterRule as defineCodeBlockEnterRule_alias_1 }
238
248
 
@@ -255,14 +265,14 @@ export { defineCodeBlockHighlight as defineCodeBlockHighlight_alias_1 }
255
265
  *
256
266
  * @public
257
267
  */
258
- declare function defineCodeBlockInputRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
268
+ declare function defineCodeBlockInputRule(): Extension<any>;
259
269
  export { defineCodeBlockInputRule }
260
270
  export { defineCodeBlockInputRule as defineCodeBlockInputRule_alias_1 }
261
271
 
262
272
  /**
263
273
  * Defines the keymap for code blocks.
264
274
  */
265
- export declare function defineCodeBlockKeymap(): Extension<ExtensionTyping<string, string, CommandArgs>>;
275
+ export declare function defineCodeBlockKeymap(): Extension<any>;
266
276
 
267
277
  /**
268
278
  * Adds syntax highlighting to code blocks using the [shiki](https://github.com/shikijs/shiki) package.
@@ -279,26 +289,32 @@ export { defineCodeBlockShiki as defineCodeBlockShiki_alias_1 }
279
289
  * @public
280
290
  */
281
291
  declare function defineCodeBlockSpec(): Extension< {
282
- NODES: "codeBlock";
292
+ Nodes: "codeBlock";
293
+ Marks: never;
294
+ Commands: never;
283
295
  }>;
284
296
  export { defineCodeBlockSpec }
285
297
  export { defineCodeBlockSpec as defineCodeBlockSpec_alias_1 }
286
298
 
287
299
  export declare function defineCodeCommands(): Extension< {
288
- COMMAND_ARGS: {
300
+ Commands: {
289
301
  toggleCode: [];
290
302
  };
303
+ Nodes: never;
304
+ Marks: never;
291
305
  }>;
292
306
 
293
- export declare function defineCodeInputRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
307
+ export declare function defineCodeInputRule(): Extension<any>;
294
308
 
295
- export declare function defineCodeKeymap(): Extension<ExtensionTyping<string, string, CommandArgs>>;
309
+ export declare function defineCodeKeymap(): Extension<any>;
296
310
 
297
311
  /**
298
312
  * @public
299
313
  */
300
314
  export declare function defineCodeSpec(): Extension< {
301
- MARKS: "code";
315
+ Marks: "code";
316
+ Nodes: never;
317
+ Commands: never;
302
318
  }>;
303
319
 
304
320
  /**
@@ -308,7 +324,7 @@ MARKS: "code";
308
324
  *
309
325
  * @public
310
326
  */
311
- export declare function defineDropCursor(options?: DropCursorOptions): Extension<ExtensionTyping<string, string, CommandArgs>>;
327
+ export declare function defineDropCursor(options?: DropCursorOptions): Extension<any>;
312
328
 
313
329
  /**
314
330
  * Defines an enter rule. An enter rule applies when the text directly in front of
@@ -323,52 +339,60 @@ export declare function defineEnterRule({ regex, handler, stop, }: EnterRuleOpti
323
339
  * @public
324
340
  */
325
341
  export declare function defineHeading(): Extension< {
326
- NODES: "heading";
327
- COMMAND_ARGS: {
328
- setHeading: [attrs?: HeadingAttrs | undefined];
329
- insertHeading: [attrs?: HeadingAttrs | undefined];
330
- toggleHeading: [attrs?: HeadingAttrs | undefined];
342
+ Nodes: any;
343
+ Marks: any;
344
+ Commands: {
345
+ [x: string]: any;
331
346
  };
332
347
  }>;
333
348
 
334
349
  export declare function defineHeadingCommands(): Extension< {
335
- COMMAND_ARGS: {
350
+ Commands: {
336
351
  setHeading: [attrs?: HeadingAttrs | undefined];
337
352
  insertHeading: [attrs?: HeadingAttrs | undefined];
338
353
  toggleHeading: [attrs?: HeadingAttrs | undefined];
339
354
  };
355
+ Nodes: never;
356
+ Marks: never;
340
357
  }>;
341
358
 
342
359
  /**
343
360
  * Converts the text block to a heading when `#` is typed at the start of a new
344
361
  * line followed by a space.
345
362
  */
346
- export declare function defineHeadingInputRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
363
+ export declare function defineHeadingInputRule(): Extension<any>;
347
364
 
348
- export declare function defineHeadingKeymap(): Extension<ExtensionTyping<string, string, CommandArgs>>;
365
+ export declare function defineHeadingKeymap(): Extension<any>;
349
366
 
350
367
  export declare function defineHeadingSpec(): Extension< {
351
- NODES: "heading";
368
+ Nodes: "heading";
369
+ Marks: never;
370
+ Commands: never;
352
371
  }>;
353
372
 
354
373
  /**
355
374
  * @public
356
375
  */
357
376
  export declare function defineImage(): Extension< {
358
- NODES: "image";
359
- COMMAND_ARGS: {
377
+ Nodes: "image";
378
+ Marks: never;
379
+ Commands: {
360
380
  insertImage: [attrs?: ImageAttrs | undefined];
361
381
  };
362
382
  }>;
363
383
 
364
384
  export declare function defineImageCommands(): Extension< {
365
- COMMAND_ARGS: {
385
+ Commands: {
366
386
  insertImage: [attrs?: ImageAttrs | undefined];
367
387
  };
388
+ Nodes: never;
389
+ Marks: never;
368
390
  }>;
369
391
 
370
392
  export declare function defineImageSpec(): Extension< {
371
- NODES: "image";
393
+ Nodes: "image";
394
+ Marks: never;
395
+ Commands: never;
372
396
  }>;
373
397
 
374
398
  /**
@@ -384,87 +408,87 @@ export declare function defineInputRule(rule: InputRule): Extension;
384
408
  * @public
385
409
  */
386
410
  export declare function defineItalic(): Extension< {
387
- MARKS: "italic";
388
- COMMAND_ARGS: {
389
- toggleItalic: [];
411
+ Nodes: any;
412
+ Marks: any;
413
+ Commands: {
414
+ [x: string]: any;
390
415
  };
391
416
  }>;
392
417
 
393
418
  export declare function defineItalicCommands(): Extension< {
394
- COMMAND_ARGS: {
419
+ Commands: {
395
420
  toggleItalic: [];
396
421
  };
422
+ Nodes: never;
423
+ Marks: never;
397
424
  }>;
398
425
 
399
- export declare function defineItalicInputRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
426
+ export declare function defineItalicInputRule(): Extension<any>;
400
427
 
401
- export declare function defineItalicKeymap(): Extension<ExtensionTyping<string, string, CommandArgs>>;
428
+ export declare function defineItalicKeymap(): Extension<any>;
402
429
 
403
430
  export declare function defineItalicSpec(): Extension< {
404
- MARKS: "italic";
431
+ Marks: "italic";
432
+ Nodes: never;
433
+ Commands: never;
405
434
  }>;
406
435
 
407
436
  /**
408
437
  * @public
409
438
  */
410
439
  export declare function defineLink(): Extension< {
411
- MARKS: "link";
412
- COMMAND_ARGS: {
413
- addLink: [attrs: LinkAttrs];
414
- removeLink: [];
415
- toggleLink: [attrs: LinkAttrs];
416
- expandLink: [];
440
+ Nodes: any;
441
+ Marks: any;
442
+ Commands: {
443
+ [x: string]: any;
417
444
  };
418
445
  }>;
419
446
 
420
447
  export declare function defineLinkCommands(): Extension< {
421
- COMMAND_ARGS: {
448
+ Commands: {
422
449
  addLink: [attrs: LinkAttrs];
423
450
  removeLink: [];
424
451
  toggleLink: [attrs: LinkAttrs];
425
452
  expandLink: [];
426
453
  };
454
+ Nodes: never;
455
+ Marks: never;
427
456
  }>;
428
457
 
429
458
  /**
430
459
  * Apply link marks after typing Enter.
431
460
  */
432
- export declare function defineLinkEnterRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
461
+ export declare function defineLinkEnterRule(): Extension<any>;
433
462
 
434
463
  /**
435
464
  * Apply link marks after pressing Space.
436
465
  */
437
- export declare function defineLinkInputRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
466
+ export declare function defineLinkInputRule(): Extension<any>;
438
467
 
439
468
  /**
440
469
  * Apply and remove link marks to the text during typing.
441
470
  */
442
- export declare function defineLinkMarkRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
471
+ export declare function defineLinkMarkRule(): Extension<any>;
443
472
 
444
473
  export declare function defineLinkSpec(): Extension< {
445
- MARKS: "link";
474
+ Marks: "link";
475
+ Nodes: never;
476
+ Commands: never;
446
477
  }>;
447
478
 
448
479
  /**
449
480
  * @public
450
481
  */
451
482
  export declare function defineList(): Extension<{
452
- NODES: "list";
453
- COMMAND_ARGS: {
454
- dedentList: [options?: DedentListOptions | undefined];
455
- indentList: [options?: IndentListOptions | undefined];
456
- moveList: [direction: "up" | "down"];
457
- splitList: [];
458
- toggleCollapsed: [(ToggleCollapsedOptions | undefined)?];
459
- toggleList: [attrs: ListAttributes];
460
- unwrapList: [options?: UnwrapListOptions | undefined];
461
- wrapInList: [getAttrs: ListAttributes | ((range: NodeRange) => ListAttributes | null)];
462
- insertList: [attrs?: ListAttributes | undefined];
483
+ Nodes: any;
484
+ Marks: any;
485
+ Commands: {
486
+ [x: string]: any;
463
487
  };
464
488
  }>;
465
489
 
466
490
  export declare function defineListCommands(): Extension<{
467
- COMMAND_ARGS: {
491
+ Commands: {
468
492
  dedentList: [options?: DedentListOptions | undefined];
469
493
  indentList: [options?: IndentListOptions | undefined];
470
494
  moveList: [direction: "up" | "down"];
@@ -475,6 +499,8 @@ export declare function defineListCommands(): Extension<{
475
499
  wrapInList: [getAttrs: ListAttributes | ((range: NodeRange) => ListAttributes | null)];
476
500
  insertList: [attrs?: ListAttributes | undefined];
477
501
  };
502
+ Nodes: never;
503
+ Marks: never;
478
504
  }>;
479
505
 
480
506
  export declare function defineListInputRules(): Extension;
@@ -484,12 +510,14 @@ export declare function defineListInputRules(): Extension;
484
510
  *
485
511
  * @public
486
512
  */
487
- export declare function defineListKeymap(): Extension<ExtensionTyping<string, string, CommandArgs>>;
513
+ export declare function defineListKeymap(): Extension<any>;
488
514
 
489
- export declare function defineListPlugins(): Extension<ExtensionTyping<string, string, CommandArgs>>;
515
+ export declare function defineListPlugins(): Extension<any>;
490
516
 
491
517
  export declare function defineListSpec(): Extension<{
492
- NODES: "list";
518
+ Nodes: "list";
519
+ Marks: never;
520
+ Commands: never;
493
521
  }>;
494
522
 
495
523
  /**
@@ -504,7 +532,7 @@ export declare function defineMarkInputRule(options: MarkInputRuleOptions): Exte
504
532
  * A mark rule is something that can automatically apply marks to text if it
505
533
  * matches a certain pattern, and remove them if it doesn't match anymore.
506
534
  */
507
- declare function defineMarkRule(options: MarkRuleOptions): Extension<ExtensionTyping<string, string, CommandArgs>>;
535
+ declare function defineMarkRule(options: MarkRuleOptions): Extension<any>;
508
536
  export { defineMarkRule }
509
537
  export { defineMarkRule as defineMarkRule_alias_1 }
510
538
 
@@ -512,23 +540,28 @@ export { defineMarkRule as defineMarkRule_alias_1 }
512
540
  * @public
513
541
  */
514
542
  export declare function defineMention(): Extension< {
515
- NODES: "mention";
516
- COMMAND_ARGS: {
543
+ Nodes: "mention";
544
+ Marks: never;
545
+ Commands: {
517
546
  insertMention: [attrs: MentionAttrs];
518
547
  };
519
548
  }>;
520
549
 
521
550
  export declare function defineMentionCommands(): Extension< {
522
- COMMAND_ARGS: {
551
+ Commands: {
523
552
  insertMention: [attrs: MentionAttrs];
524
553
  };
554
+ Nodes: never;
555
+ Marks: never;
525
556
  }>;
526
557
 
527
558
  /**
528
559
  * @public
529
560
  */
530
561
  export declare function defineMentionSpec(): Extension< {
531
- NODES: "mention";
562
+ Nodes: "mention";
563
+ Marks: never;
564
+ Commands: never;
532
565
  }>;
533
566
 
534
567
  /**
@@ -543,54 +576,57 @@ export declare function defineModClickPrevention(): Extension;
543
576
  * Add a placeholder text to the editor when the current block or document is
544
577
  * empty.
545
578
  */
546
- export declare function definePlaceholder(options: PlaceholderOptions): Extension<ExtensionTyping<string, string, CommandArgs>>;
579
+ export declare function definePlaceholder(options: PlaceholderOptions): Extension<any>;
547
580
 
548
581
  /**
549
582
  * Make the editor read-only.
550
583
  */
551
- export declare function defineReadonly(): Extension<ExtensionTyping<string, string, CommandArgs>>;
584
+ export declare function defineReadonly(): Extension<any>;
552
585
 
553
586
  /**
554
587
  * @public
555
588
  */
556
589
  export declare function defineStrike(): Extension< {
557
- MARKS: "strike";
558
- COMMAND_ARGS: {
559
- toggleStrike: [];
590
+ Nodes: any;
591
+ Marks: any;
592
+ Commands: {
593
+ [x: string]: any;
560
594
  };
561
595
  }>;
562
596
 
563
597
  export declare function defineStrikeCommands(): Extension< {
564
- COMMAND_ARGS: {
598
+ Commands: {
565
599
  toggleStrike: [];
566
600
  };
601
+ Nodes: never;
602
+ Marks: never;
567
603
  }>;
568
604
 
569
- export declare function defineStrikeInputRule(): Extension<ExtensionTyping<string, string, CommandArgs>>;
605
+ export declare function defineStrikeInputRule(): Extension<any>;
570
606
 
571
- export declare function defineStrikeKeymap(): Extension<ExtensionTyping<string, string, CommandArgs>>;
607
+ export declare function defineStrikeKeymap(): Extension<any>;
572
608
 
573
609
  export declare function defineStrikeSpec(): Extension< {
574
- MARKS: "strike";
610
+ Marks: "strike";
611
+ Nodes: never;
612
+ Commands: never;
575
613
  }>;
576
614
 
577
615
  /**
578
616
  * @public
579
617
  */
580
618
  export declare function defineTable(): Extension< {
581
- NODES: "table" | "tableRow" | "tableCell" | "tableHeaderCell";
582
- COMMAND_ARGS: {
583
- insertTable: [{
584
- row: number;
585
- col: number;
586
- header: boolean;
587
- }];
588
- exitTable: [];
619
+ Nodes: any;
620
+ Marks: any;
621
+ Commands: {
622
+ [x: string]: any;
589
623
  };
590
624
  }>;
591
625
 
592
626
  declare function defineTableCellSpec(): Extension< {
593
- NODES: "tableCell";
627
+ Nodes: "tableCell";
628
+ Marks: never;
629
+ Commands: never;
594
630
  }>;
595
631
  export { defineTableCellSpec }
596
632
  export { defineTableCellSpec as defineTableCellSpec_alias_1 }
@@ -601,7 +637,7 @@ export { defineTableCellSpec as defineTableCellSpec_alias_1 }
601
637
  * @public
602
638
  */
603
639
  declare function defineTableCommands(): Extension< {
604
- COMMAND_ARGS: {
640
+ Commands: {
605
641
  insertTable: [{
606
642
  row: number;
607
643
  col: number;
@@ -609,12 +645,16 @@ header: boolean;
609
645
  }];
610
646
  exitTable: [];
611
647
  };
648
+ Nodes: never;
649
+ Marks: never;
612
650
  }>;
613
651
  export { defineTableCommands }
614
652
  export { defineTableCommands as defineTableCommands_alias_1 }
615
653
 
616
654
  declare function defineTableHeaderCellSpec(): Extension< {
617
- NODES: "tableHeaderCell";
655
+ Nodes: "tableHeaderCell";
656
+ Marks: never;
657
+ Commands: never;
618
658
  }>;
619
659
  export { defineTableHeaderCellSpec }
620
660
  export { defineTableHeaderCellSpec as defineTableHeaderCellSpec_alias_1 }
@@ -622,18 +662,22 @@ export { defineTableHeaderCellSpec as defineTableHeaderCellSpec_alias_1 }
622
662
  /**
623
663
  * @public
624
664
  */
625
- declare function defineTablePlugins(): Extension<ExtensionTyping<string, string, CommandArgs>>;
665
+ declare function defineTablePlugins(): Extension<any>;
626
666
  export { defineTablePlugins }
627
667
  export { defineTablePlugins as defineTablePlugins_alias_1 }
628
668
 
629
669
  declare function defineTableRowSpec(): Extension< {
630
- NODES: "tableRow";
670
+ Nodes: "tableRow";
671
+ Marks: never;
672
+ Commands: never;
631
673
  }>;
632
674
  export { defineTableRowSpec }
633
675
  export { defineTableRowSpec as defineTableRowSpec_alias_1 }
634
676
 
635
677
  declare function defineTableSpec(): Extension< {
636
- NODES: "table";
678
+ Nodes: "table";
679
+ Marks: never;
680
+ Commands: never;
637
681
  }>;
638
682
  export { defineTableSpec }
639
683
  export { defineTableSpec as defineTableSpec_alias_1 }
@@ -645,8 +689,10 @@ export { defineTableSpec as defineTableSpec_alias_1 }
645
689
  * @public
646
690
  */
647
691
  export declare function defineTextAlign(options: TextAlignOptions): Extension<{
648
- COMMAND_ARGS: {
649
- setTextAlign: [value: string | null];
692
+ Nodes: any;
693
+ Marks: any;
694
+ Commands: {
695
+ [x: string]: any;
650
696
  };
651
697
  }>;
652
698
 
@@ -654,15 +700,17 @@ export declare function defineTextAlign(options: TextAlignOptions): Extension<{
654
700
  * @internal
655
701
  */
656
702
  export declare function defineTextAlignCommands(types: string[]): Extension<{
657
- COMMAND_ARGS: {
703
+ Commands: {
658
704
  setTextAlign: [value: string | null];
659
705
  };
706
+ Nodes: never;
707
+ Marks: never;
660
708
  }>;
661
709
 
662
710
  /**
663
711
  * @internal
664
712
  */
665
- export declare function defineTextAlignKeymap(types: string[]): Extension<ExtensionTyping<string, string, CommandArgs>>;
713
+ export declare function defineTextAlignKeymap(types: string[]): Extension<any>;
666
714
 
667
715
  /**
668
716
  * Defines an enter rule that replaces the matched text with a block node.
@@ -702,22 +750,27 @@ export declare function defineTextBlockInputRule({ regex, type, attrs, }: {
702
750
  * @public
703
751
  */
704
752
  export declare function defineUnderline(): Extension< {
705
- MARKS: "underline";
706
- COMMAND_ARGS: {
707
- toggleUnderline: [];
753
+ Nodes: any;
754
+ Marks: any;
755
+ Commands: {
756
+ [x: string]: any;
708
757
  };
709
758
  }>;
710
759
 
711
760
  export declare function defineUnderlineCommands(): Extension< {
712
- COMMAND_ARGS: {
761
+ Commands: {
713
762
  toggleUnderline: [];
714
763
  };
764
+ Nodes: never;
765
+ Marks: never;
715
766
  }>;
716
767
 
717
- export declare function defineUnderlineKeymap(): Extension<ExtensionTyping<string, string, CommandArgs>>;
768
+ export declare function defineUnderlineKeymap(): Extension<any>;
718
769
 
719
770
  export declare function defineUnderlineSpec(): Extension< {
720
- MARKS: "underline";
771
+ Marks: "underline";
772
+ Nodes: never;
773
+ Commands: never;
721
774
  }>;
722
775
 
723
776
  /**
@@ -880,11 +933,6 @@ export declare function insertTable({ row, col, header, }: {
880
933
  header: boolean;
881
934
  }): Command;
882
935
 
883
- /**
884
- * @deprecated Use `isApple` from `@prosekit/core`
885
- */
886
- export declare const isApple: boolean;
887
-
888
936
  export declare const LINK_ENTER_RE: RegExp;
889
937
 
890
938
  export declare const LINK_INPUT_RE: RegExp;
@@ -1,11 +1,6 @@
1
1
  // src/mod-click-prevention/index.ts
2
- import { definePlugin } from "@prosekit/core";
2
+ import { definePlugin, isApple } from "@prosekit/core";
3
3
  import { Plugin, PluginKey } from "@prosekit/pm/state";
4
-
5
- // src/mod-click-prevention/env.ts
6
- var isApple = typeof navigator !== "undefined" ? /Mac|iP(hone|[ao]d)/.test(navigator.platform) : false;
7
-
8
- // src/mod-click-prevention/index.ts
9
4
  function defineModClickPrevention() {
10
5
  return definePlugin(new Plugin({ key, props: { handleClick } }));
11
6
  }
@@ -8,7 +8,7 @@ function definePlaceholder(options) {
8
8
  }
9
9
  function createPlaceholderPlugin(options) {
10
10
  return new Plugin({
11
- key: placeholderPluginKey,
11
+ key: new PluginKey("prosekit-placeholder"),
12
12
  props: {
13
13
  decorations: (state) => {
14
14
  if (options.strategy === "doc" && !isDocEmpty(state.doc)) {
@@ -27,7 +27,6 @@ function createPlaceholderPlugin(options) {
27
27
  }
28
28
  });
29
29
  }
30
- var placeholderPluginKey = new PluginKey("prosekit-placeholder");
31
30
  function isDocEmpty(doc) {
32
31
  var _a;
33
32
  return doc.childCount <= 1 && !((_a = doc.firstChild) == null ? void 0 : _a.content.size);
@@ -1,6 +1,6 @@
1
1
  /* src/virtual-selection/style.css */
2
2
  .prosekit-virtual-selection {
3
- background-color: Highlight;
4
- box-shadow: 0 0 0 3px Highlight;
3
+ background-color: #8888884d;
4
+ box-shadow: 0 0 0 2px #8888884d;
5
5
  border-radius: 2px;
6
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prosekit/extensions",
3
3
  "type": "module",
4
- "version": "0.5.0",
4
+ "version": "0.5.1",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",
@@ -162,19 +162,19 @@
162
162
  "dist"
163
163
  ],
164
164
  "dependencies": {
165
- "@prosekit/core": "^0.5.0",
166
- "@prosekit/pm": "^0.1.3",
165
+ "@prosekit/core": "^0.5.2",
166
+ "@prosekit/pm": "^0.1.4",
167
167
  "prosemirror-dropcursor": "^1.8.1",
168
168
  "prosemirror-flat-list": "^0.5.0",
169
- "prosemirror-highlight": "^0.5.0",
169
+ "prosemirror-highlight": "^0.6.0",
170
170
  "prosemirror-tables": "^1.3.7",
171
- "shiki": "^1.4.0"
171
+ "shiki": "^1.6.1"
172
172
  },
173
173
  "devDependencies": {
174
- "@prosekit/dev": "*",
175
174
  "tsup": "^8.0.2",
176
175
  "typescript": "^5.4.5",
177
- "vitest": "^1.6.0"
176
+ "vitest": "^1.6.0",
177
+ "@prosekit/dev": "0.0.0"
178
178
  },
179
179
  "scripts": {
180
180
  "build:tsup": "tsup",