@prosekit/core 0.7.1 → 0.7.3

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.
@@ -1,6 +1,5 @@
1
1
  import { AllSelection } from '@prosekit/pm/state';
2
2
  import { Attrs } from '@prosekit/pm/model';
3
- import { Attrs as Attrs_2 } from 'prosemirror-model';
4
3
  import { Command } from '@prosekit/pm/state';
5
4
  import type { ContentMatch } from '@prosekit/pm/model';
6
5
  import { config as default_alias_1 } from '@prosekit/dev/config-vitest';
@@ -15,9 +14,7 @@ import type { IsEqual } from 'type-fest';
15
14
  import { Mark } from '@prosekit/pm/model';
16
15
  import type { MarkSpec } from '@prosekit/pm/model';
17
16
  import { MarkType } from '@prosekit/pm/model';
18
- import { MarkType as MarkType_2 } from 'prosemirror-model';
19
- import { Node as Node_2 } from 'prosemirror-model';
20
- import type { Node as Node_3 } from '@prosekit/pm/model';
17
+ import type { Node as Node_2 } from '@prosekit/pm/model';
21
18
  import { NodeSelection } from '@prosekit/pm/state';
22
19
  import type { NodeSpec } from '@prosekit/pm/model';
23
20
  import { NodeType } from '@prosekit/pm/model';
@@ -50,7 +47,14 @@ declare type Action = (options: {
50
47
  *
51
48
  * @public
52
49
  */
53
- declare function addMark(options: {
50
+ declare function addMark(options: AddMarkOptions): Command;
51
+ export { addMark }
52
+ export { addMark as addMark_alias_1 }
53
+
54
+ /**
55
+ * @public
56
+ */
57
+ declare interface AddMarkOptions {
54
58
  /**
55
59
  * The type of the mark to add.
56
60
  */
@@ -67,9 +71,9 @@ declare function addMark(options: {
67
71
  * The end position of the document. By default it will be the end position of current selection.
68
72
  */
69
73
  to?: number;
70
- }): Command;
71
- export { addMark }
72
- export { addMark as addMark_alias_1 }
74
+ }
75
+ export { AddMarkOptions }
76
+ export { AddMarkOptions as AddMarkOptions_alias_1 }
73
77
 
74
78
  export declare function applyAction(operator: Action): Command;
75
79
 
@@ -169,7 +173,7 @@ declare type ClickHandler = (view: EditorView, pos: number, event: MouseEvent) =
169
173
  export { ClickHandler }
170
174
  export { ClickHandler as ClickHandler_alias_1 }
171
175
 
172
- declare type ClickOnHandler = (view: EditorView, pos: number, node: Node_3, nodePos: number, event: MouseEvent, direct: boolean) => boolean | void;
176
+ declare type ClickOnHandler = (view: EditorView, pos: number, node: Node_2, nodePos: number, event: MouseEvent, direct: boolean) => boolean | void;
173
177
  export { ClickOnHandler }
174
178
  export { ClickOnHandler as ClickOnHandler_alias_1 }
175
179
 
@@ -295,49 +299,16 @@ declare function defineBaseCommands(): Extension<{
295
299
  from?: number;
296
300
  to?: number;
297
301
  }];
298
- insertNode: [options: {
299
- node: Node_2;
300
- pos?: number;
301
- type?: undefined;
302
- attrs?: undefined;
303
- } | {
304
- node?: undefined;
305
- pos?: number;
306
- type: string;
307
- attrs?: Attrs_2;
308
- }];
309
- removeNode: [options: {
310
- type: string | NodeType_2;
311
- pos?: number;
312
- }];
313
- wrap: [{
314
- nodeType: NodeType_2;
315
- attrs?: Attrs_2 | null;
316
- }];
317
- setBlockType: [options: {
318
- type: NodeType_2 | string;
319
- attrs?: Attrs_2 | null;
320
- from?: number;
321
- to?: number;
322
- }];
323
- setNodeAttrs: [options: {
324
- type: string | NodeType_2 | string[] | NodeType_2[];
325
- attrs: Attrs_2;
326
- pos?: number;
327
- }];
302
+ insertNode: [options: InsertNodeOptions];
303
+ removeNode: [options: RemoveNodeOptions];
304
+ wrap: [WrapOptions];
305
+ setBlockType: [options: SetBlockTypeOptions];
306
+ setNodeAttrs: [options: SetNodeAttrsOptions];
328
307
  selectAll: [];
329
- addMark: [options: {
330
- type: string | MarkType_2;
331
- attrs?: Attrs_2 | null;
332
- from?: number;
333
- to?: number;
334
- }];
335
- removeMark: [options: {
336
- type: string | MarkType_2;
337
- attrs?: Attrs_2 | null;
338
- from?: number;
339
- to?: number;
340
- }];
308
+ addMark: [options: AddMarkOptions];
309
+ removeMark: [options: RemoveMarkOptions];
310
+ unsetBlockType: [options?: UnsetBlockTypeOptions | undefined];
311
+ unsetMark: [options?: UnsetMarkOptions | undefined];
341
312
  };
342
313
  Nodes: never;
343
314
  Marks: never;
@@ -494,13 +465,15 @@ export { defineFocusChangeHandler as defineFocusChangeHandler_alias_1 }
494
465
 
495
466
  /**
496
467
  * Add undo/redo history to the editor.
468
+ *
469
+ * @public
497
470
  */
498
- declare function defineHistory(): Extension< {
471
+ declare function defineHistory({ depth, newGroupDelay, }?: HistoryOptions): Extension< {
499
472
  Nodes: never;
500
473
  Marks: never;
501
474
  Commands: {
502
- undo: [];
503
- redo: [];
475
+ readonly undo: [];
476
+ readonly redo: [];
504
477
  };
505
478
  }>;
506
479
  export { defineHistory }
@@ -657,61 +630,28 @@ export { defineScrollToSelectionHandler as defineScrollToSelectionHandler_alias_
657
630
  /**
658
631
  * @internal
659
632
  */
660
- export declare function defineTestExtension(): Extension< {
661
- Nodes: "text" | "doc" | "paragraph";
662
- Marks: "bold";
663
- Commands: {
664
- undo: [];
665
- redo: [];
666
- insertText: [{
667
- text: string;
668
- from?: number;
669
- to?: number;
670
- }];
671
- insertNode: [options: {
672
- node: Node_2;
673
- pos?: number;
674
- type?: undefined;
675
- attrs?: undefined;
676
- } | {
677
- node?: undefined;
678
- pos?: number;
679
- type: string;
680
- attrs?: Attrs_2;
681
- }];
682
- removeNode: [options: {
683
- type: string | NodeType_2;
684
- pos?: number;
685
- }];
686
- wrap: [{
687
- nodeType: NodeType_2;
688
- attrs?: Attrs_2 | null;
689
- }];
690
- setBlockType: [options: {
691
- type: NodeType_2 | string;
692
- attrs?: Attrs_2 | null;
693
- from?: number;
694
- to?: number;
695
- }];
696
- setNodeAttrs: [options: {
697
- type: string | NodeType_2 | string[] | NodeType_2[];
698
- attrs: Attrs_2;
699
- pos?: number;
700
- }];
701
- selectAll: [];
702
- addMark: [options: {
703
- type: string | MarkType_2;
704
- attrs?: Attrs_2 | null;
705
- from?: number;
706
- to?: number;
707
- }];
708
- removeMark: [options: {
709
- type: string | MarkType_2;
710
- attrs?: Attrs_2 | null;
711
- from?: number;
712
- to?: number;
713
- }];
714
- };
633
+ export declare function defineTestExtension(): Extension<{
634
+ Nodes: "text" | "doc" | "paragraph" | "heading";
635
+ Marks: "bold" | "italic";
636
+ Commands: {
637
+ insertText: [{
638
+ text: string;
639
+ from?: number;
640
+ to?: number;
641
+ }];
642
+ insertNode: [options: InsertNodeOptions];
643
+ removeNode: [options: RemoveNodeOptions];
644
+ wrap: [WrapOptions];
645
+ setBlockType: [options: SetBlockTypeOptions];
646
+ setNodeAttrs: [options: SetNodeAttrsOptions];
647
+ selectAll: [];
648
+ addMark: [options: AddMarkOptions];
649
+ removeMark: [options: RemoveMarkOptions];
650
+ unsetBlockType: [options?: UnsetBlockTypeOptions | undefined];
651
+ unsetMark: [options?: UnsetMarkOptions | undefined];
652
+ readonly undo: [];
653
+ readonly redo: [];
654
+ };
715
655
  }>;
716
656
 
717
657
  /**
@@ -838,7 +778,7 @@ declare type DoubleClickHandler = (view: EditorView, pos: number, event: MouseEv
838
778
  export { DoubleClickHandler }
839
779
  export { DoubleClickHandler as DoubleClickHandler_alias_1 }
840
780
 
841
- declare type DoubleClickOnHandler = (view: EditorView, pos: number, node: Node_3, nodePos: number, event: MouseEvent, direct: boolean) => boolean | void;
781
+ declare type DoubleClickOnHandler = (view: EditorView, pos: number, node: Node_2, nodePos: number, event: MouseEvent, direct: boolean) => boolean | void;
842
782
  export { DoubleClickOnHandler }
843
783
  export { DoubleClickOnHandler as DoubleClickOnHandler_alias_1 }
844
784
 
@@ -1012,14 +952,21 @@ export { elementFromNode as elementFromNode_alias_1 }
1012
952
  *
1013
953
  * @public
1014
954
  */
1015
- declare function expandMark(options: {
955
+ declare function expandMark(options: ExpandMarkOptions): Command;
956
+ export { expandMark }
957
+ export { expandMark as expandMark_alias_1 }
958
+
959
+ /**
960
+ * @public
961
+ */
962
+ declare interface ExpandMarkOptions {
1016
963
  /**
1017
964
  * The type of the mark to expand.
1018
965
  */
1019
966
  type: string | MarkType;
1020
- }): Command;
1021
- export { expandMark }
1022
- export { expandMark as expandMark_alias_1 }
967
+ }
968
+ export { ExpandMarkOptions }
969
+ export { ExpandMarkOptions as ExpandMarkOptions_alias_1 }
1023
970
 
1024
971
  /**
1025
972
  * @public
@@ -1226,6 +1173,30 @@ export declare type GroupedEntries<T extends Record<string, any>> = {
1226
1173
 
1227
1174
  export declare function groupEntries<T extends Record<string, any>>(entries: ObjectEntries<T>[]): GroupedEntries<T>;
1228
1175
 
1176
+ /**
1177
+ * Options for {@link defineHistory}.
1178
+ *
1179
+ * @public
1180
+ */
1181
+ declare interface HistoryOptions {
1182
+ /**
1183
+ * The amount of history events that are collected before the oldest events
1184
+ * are discarded.
1185
+ *
1186
+ * @default 200
1187
+ */
1188
+ depth?: number;
1189
+ /**
1190
+ * The delay in milliseconds between changes after which a new group should be
1191
+ * started.
1192
+ *
1193
+ * @default 250
1194
+ */
1195
+ newGroupDelay?: number;
1196
+ }
1197
+ export { HistoryOptions }
1198
+ export { HistoryOptions as HistoryOptions_alias_1 }
1199
+
1229
1200
  /**
1230
1201
  * @internal
1231
1202
  */
@@ -1255,17 +1226,7 @@ export { htmlFromNode as htmlFromNode_alias_1 }
1255
1226
  *
1256
1227
  * @public
1257
1228
  */
1258
- declare function insertNode(options: {
1259
- node: ProseMirrorNode;
1260
- pos?: number;
1261
- type?: undefined;
1262
- attrs?: undefined;
1263
- } | {
1264
- node?: undefined;
1265
- pos?: number;
1266
- type: string;
1267
- attrs?: Attrs;
1268
- }): Command;
1229
+ declare function insertNode(options: InsertNodeOptions): Command;
1269
1230
  export { insertNode }
1270
1231
  export { insertNode as insertNode_alias_1 }
1271
1232
 
@@ -1274,6 +1235,31 @@ export declare function insertNodeAction({ node, pos, }: {
1274
1235
  pos?: number;
1275
1236
  }): Action;
1276
1237
 
1238
+ /**
1239
+ * @public
1240
+ */
1241
+ declare interface InsertNodeOptions {
1242
+ /**
1243
+ * The node to insert. Either this or `type` must be provided.
1244
+ */
1245
+ node?: ProseMirrorNode;
1246
+ /**
1247
+ * The type of the node to insert. Either this or `node` must be provided.
1248
+ */
1249
+ type?: string | NodeType;
1250
+ /**
1251
+ * When `type` is provided, the attributes of the node to insert.
1252
+ */
1253
+ attrs?: Attrs;
1254
+ /**
1255
+ * The position to insert the node at. By default it will be the anchor
1256
+ * position of current selection.
1257
+ */
1258
+ pos?: number;
1259
+ }
1260
+ export { InsertNodeOptions }
1261
+ export { InsertNodeOptions as InsertNodeOptions_alias_1 }
1262
+
1277
1263
  /**
1278
1264
  * Returns a command that inserts the given text.
1279
1265
  *
@@ -1299,6 +1285,15 @@ declare const isApple: boolean;
1299
1285
  export { isApple }
1300
1286
  export { isApple as isApple_alias_1 }
1301
1287
 
1288
+ /**
1289
+ * Whether the selection is an empty text selection at the start of a block.
1290
+ *
1291
+ * @internal
1292
+ */
1293
+ declare function isAtBlockStart(state: EditorState, view?: EditorView): ResolvedPos | null;
1294
+ export { isAtBlockStart }
1295
+ export { isAtBlockStart as isAtBlockStart_alias_1 }
1296
+
1302
1297
  export declare function isElement(value: unknown): value is Element;
1303
1298
 
1304
1299
  /**
@@ -1734,7 +1729,14 @@ export { ProseKitError as ProseKitError_alias_1 }
1734
1729
  *
1735
1730
  * @public
1736
1731
  */
1737
- declare function removeMark(options: {
1732
+ declare function removeMark(options: RemoveMarkOptions): Command;
1733
+ export { removeMark }
1734
+ export { removeMark as removeMark_alias_1 }
1735
+
1736
+ /**
1737
+ * @public
1738
+ */
1739
+ declare interface RemoveMarkOptions {
1738
1740
  /**
1739
1741
  * The type of the mark to remove.
1740
1742
  */
@@ -1751,16 +1753,23 @@ declare function removeMark(options: {
1751
1753
  * The end position of the document. By default it will be the end position of current selection.
1752
1754
  */
1753
1755
  to?: number;
1754
- }): Command;
1755
- export { removeMark }
1756
- export { removeMark as removeMark_alias_1 }
1756
+ }
1757
+ export { RemoveMarkOptions }
1758
+ export { RemoveMarkOptions as RemoveMarkOptions_alias_1 }
1757
1759
 
1758
1760
  /**
1759
1761
  * Returns a command to remove the nearest ancestor node of a specific type from the current position.
1760
1762
  *
1761
1763
  * @public
1762
1764
  */
1763
- declare function removeNode(options: {
1765
+ declare function removeNode(options: RemoveNodeOptions): Command;
1766
+ export { removeNode }
1767
+ export { removeNode as removeNode_alias_1 }
1768
+
1769
+ /**
1770
+ * @public
1771
+ */
1772
+ declare interface RemoveNodeOptions {
1764
1773
  /**
1765
1774
  * The type of the node to remove.
1766
1775
  */
@@ -1769,9 +1778,9 @@ declare function removeNode(options: {
1769
1778
  * The document position to start searching node. By default it will be the anchor position of current selection.
1770
1779
  */
1771
1780
  pos?: number;
1772
- }): Command;
1773
- export { removeNode }
1774
- export { removeNode as removeNode_alias_1 }
1781
+ }
1782
+ export { RemoveNodeOptions }
1783
+ export { RemoveNodeOptions as RemoveNodeOptions_alias_1 }
1775
1784
 
1776
1785
  export declare const rootFacet: Facet<RootPayload, RootOutput>;
1777
1786
 
@@ -1825,21 +1834,35 @@ export { SelectionJSON as SelectionJSON_alias_1 }
1825
1834
  *
1826
1835
  * @public
1827
1836
  */
1828
- declare function setBlockType(options: {
1837
+ declare function setBlockType(options: SetBlockTypeOptions): Command;
1838
+ export { setBlockType }
1839
+ export { setBlockType as setBlockType_alias_1 }
1840
+
1841
+ /**
1842
+ * @public
1843
+ */
1844
+ declare interface SetBlockTypeOptions {
1829
1845
  type: NodeType | string;
1830
1846
  attrs?: Attrs | null;
1831
1847
  from?: number;
1832
1848
  to?: number;
1833
- }): Command;
1834
- export { setBlockType }
1835
- export { setBlockType as setBlockType_alias_1 }
1849
+ }
1850
+ export { SetBlockTypeOptions }
1851
+ export { SetBlockTypeOptions as SetBlockTypeOptions_alias_1 }
1836
1852
 
1837
1853
  /**
1838
1854
  * Returns a command that set the attributes of the current node.
1839
1855
  *
1840
1856
  * @public
1841
1857
  */
1842
- declare function setNodeAttrs(options: {
1858
+ declare function setNodeAttrs(options: SetNodeAttrsOptions): Command;
1859
+ export { setNodeAttrs }
1860
+ export { setNodeAttrs as setNodeAttrs_alias_1 }
1861
+
1862
+ /**
1863
+ * @public
1864
+ */
1865
+ declare interface SetNodeAttrsOptions {
1843
1866
  /**
1844
1867
  * The type of node to set the attributes of.
1845
1868
  *
@@ -1855,9 +1878,9 @@ declare function setNodeAttrs(options: {
1855
1878
  * containing the current selection.
1856
1879
  */
1857
1880
  pos?: number;
1858
- }): Command;
1859
- export { setNodeAttrs }
1860
- export { setNodeAttrs as setNodeAttrs_alias_1 }
1881
+ }
1882
+ export { SetNodeAttrsOptions }
1883
+ export { SetNodeAttrsOptions as SetNodeAttrsOptions_alias_1 }
1861
1884
 
1862
1885
  export declare function setSelectionAround(tr: Transaction, pos: number): void;
1863
1886
 
@@ -1871,6 +1894,46 @@ export declare type Setter<T> = (value: T) => void;
1871
1894
  */
1872
1895
  export declare function setupEditorExtension<E extends Extension>(options: EditorOptions<E>): E;
1873
1896
 
1897
+ /**
1898
+ * @internal
1899
+ */
1900
+ export declare function setupTest(): {
1901
+ editor: TestEditor<Extension<{
1902
+ Nodes: "text" | "doc" | "paragraph" | "heading";
1903
+ Marks: "bold" | "italic";
1904
+ Commands: {
1905
+ insertText: [{
1906
+ text: string;
1907
+ from?: number;
1908
+ to?: number;
1909
+ }];
1910
+ insertNode: [options: InsertNodeOptions];
1911
+ removeNode: [options: RemoveNodeOptions];
1912
+ wrap: [WrapOptions];
1913
+ setBlockType: [options: SetBlockTypeOptions];
1914
+ setNodeAttrs: [options: SetNodeAttrsOptions];
1915
+ selectAll: [];
1916
+ addMark: [options: AddMarkOptions];
1917
+ removeMark: [options: RemoveMarkOptions];
1918
+ unsetBlockType: [options?: UnsetBlockTypeOptions | undefined];
1919
+ unsetMark: [options?: UnsetMarkOptions | undefined];
1920
+ readonly undo: [];
1921
+ readonly redo: [];
1922
+ };
1923
+ }>>;
1924
+ n: Record<"text" | "doc" | "paragraph" | "heading", NodeBuilder>;
1925
+ m: Record<"bold" | "italic", MarkBuilder>;
1926
+ };
1927
+
1928
+ /**
1929
+ * @internal
1930
+ */
1931
+ export declare function setupTestFromExtension<E extends Extension>(extension: E): {
1932
+ editor: TestEditor<E>;
1933
+ n: Record<ExtractNodes<E>, NodeBuilder>;
1934
+ m: Record<ExtractMarks<E>, MarkBuilder>;
1935
+ };
1936
+
1874
1937
  /**
1875
1938
  * @internal
1876
1939
  */
@@ -1984,33 +2047,53 @@ export declare type ToCommandCreators<T extends CommandTyping> = {
1984
2047
  *
1985
2048
  * @public
1986
2049
  */
1987
- declare function toggleMark({ type, attrs, }: {
1988
- type: string | MarkType;
1989
- attrs?: Attrs | null;
1990
- }): Command;
2050
+ declare function toggleMark({ type, attrs }: ToggleMarkOptions): Command;
1991
2051
  export { toggleMark }
1992
2052
  export { toggleMark as toggleMark_alias_1 }
1993
2053
 
2054
+ /**
2055
+ * @public
2056
+ */
2057
+ declare interface ToggleMarkOptions {
2058
+ type: string | MarkType;
2059
+ attrs?: Attrs | null;
2060
+ }
2061
+ export { ToggleMarkOptions }
2062
+ export { ToggleMarkOptions as ToggleMarkOptions_alias_1 }
2063
+
1994
2064
  /**
1995
2065
  * Returns a command that set the selected textblocks to the given node type
1996
2066
  * with the given attributes.
1997
2067
  *
1998
2068
  * @public
1999
2069
  */
2000
- declare function toggleNode({ type, attrs, }: {
2001
- type: string | NodeType;
2002
- attrs?: Attrs | null;
2003
- }): Command;
2070
+ declare function toggleNode({ type, attrs }: ToggleNodeOptions): Command;
2004
2071
  export { toggleNode }
2005
2072
  export { toggleNode as toggleNode_alias_1 }
2006
2073
 
2074
+ /**
2075
+ * @public
2076
+ */
2077
+ declare interface ToggleNodeOptions {
2078
+ /**
2079
+ * The type of the node to toggle.
2080
+ */
2081
+ type: string | NodeType;
2082
+ /**
2083
+ * The attributes of the node to toggle.
2084
+ */
2085
+ attrs?: Attrs | null;
2086
+ }
2087
+ export { ToggleNodeOptions }
2088
+ export { ToggleNodeOptions as ToggleNodeOptions_alias_1 }
2089
+
2007
2090
  export declare function toReversed<T>(arr: T[]): T[];
2008
2091
 
2009
2092
  declare type TripleClickHandler = (view: EditorView, pos: number, event: MouseEvent) => boolean | void;
2010
2093
  export { TripleClickHandler }
2011
2094
  export { TripleClickHandler as TripleClickHandler_alias_1 }
2012
2095
 
2013
- declare type TripleClickOnHandler = (view: EditorView, pos: number, node: Node_3, nodePos: number, event: MouseEvent, direct: boolean) => boolean | void;
2096
+ declare type TripleClickOnHandler = (view: EditorView, pos: number, node: Node_2, nodePos: number, event: MouseEvent, direct: boolean) => boolean | void;
2014
2097
  export { TripleClickOnHandler }
2015
2098
  export { TripleClickOnHandler as TripleClickOnHandler_alias_1 }
2016
2099
 
@@ -2087,6 +2170,57 @@ declare type UnmountHandler = () => void;
2087
2170
  export { UnmountHandler }
2088
2171
  export { UnmountHandler as UnmountHandler_alias_1 }
2089
2172
 
2173
+ /**
2174
+ * Returns a command that set the type of all textblocks between the given range
2175
+ * to the default type (usually `paragraph`).
2176
+ *
2177
+ * @public
2178
+ */
2179
+ declare function unsetBlockType(options?: UnsetBlockTypeOptions): Command;
2180
+ export { unsetBlockType }
2181
+ export { unsetBlockType as unsetBlockType_alias_1 }
2182
+
2183
+ /**
2184
+ * @public
2185
+ */
2186
+ declare interface UnsetBlockTypeOptions {
2187
+ /**
2188
+ * The start position of the document. By default it will be the start position of current selection.
2189
+ */
2190
+ from?: number;
2191
+ /**
2192
+ * The end position of the document. By default it will be the end position of current selection.
2193
+ */
2194
+ to?: number;
2195
+ }
2196
+ export { UnsetBlockTypeOptions }
2197
+ export { UnsetBlockTypeOptions as UnsetBlockTypeOptions_alias_1 }
2198
+
2199
+ /**
2200
+ * Returns a command that removes all marks.
2201
+ *
2202
+ * @public
2203
+ */
2204
+ declare function unsetMark(options?: UnsetMarkOptions): Command;
2205
+ export { unsetMark }
2206
+ export { unsetMark as unsetMark_alias_1 }
2207
+
2208
+ /**
2209
+ * @public
2210
+ */
2211
+ declare interface UnsetMarkOptions {
2212
+ /**
2213
+ * The start position of the document. By default it will be the start position of current selection.
2214
+ */
2215
+ from?: number;
2216
+ /**
2217
+ * The end position of the document. By default it will be the end position of current selection.
2218
+ */
2219
+ to?: number;
2220
+ }
2221
+ export { UnsetMarkOptions }
2222
+ export { UnsetMarkOptions as UnsetMarkOptions_alias_1 }
2223
+
2090
2224
  /**
2091
2225
  * A function that is called when the editor state is updated.
2092
2226
  *
@@ -2134,10 +2268,19 @@ export { withSkipCodeBlock as withSkipCodeBlock_alias_1 }
2134
2268
  *
2135
2269
  * @public
2136
2270
  */
2137
- export declare function wrap({ nodeType, attrs, }: {
2271
+ declare function wrap({ nodeType, attrs }: WrapOptions): Command;
2272
+ export { wrap }
2273
+ export { wrap as wrap_alias_1 }
2274
+
2275
+ /**
2276
+ * @public
2277
+ */
2278
+ declare interface WrapOptions {
2138
2279
  nodeType: NodeType;
2139
2280
  attrs?: Attrs | null;
2140
- }): Command;
2281
+ }
2282
+ export { WrapOptions }
2283
+ export { WrapOptions as WrapOptions_alias_1 }
2141
2284
 
2142
2285
  export declare function zip<T, P>(a: T[], b: P[]): [T, P][];
2143
2286