@prosekit/core 0.8.1 → 0.8.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,4 +1,4 @@
1
- import { Editor, EditorInstance, assert, createMarkActions, createNodeActions, isProseMirrorNode, setupEditorExtension } from "./editor-BOiNwODb.js";
1
+ import { Editor, EditorInstance, assert, createMarkActions, createNodeActions, isProseMirrorNode, setupEditorExtension } from "./editor-DlGlYOp-.js";
2
2
  import { NodeSelection, TextSelection } from "@prosekit/pm/state";
3
3
 
4
4
  //#region src/test/test-builder.ts
@@ -1,4 +1,4 @@
1
- import { AnyAttrs, AttrSpec, CommandAction, CommandCreator, CommandTyping, DOMDocumentOptions, DOMParserOptions, DOMSerializerOptions, Editor$1 as Editor, EditorOptions, Extension, ExtensionTyping, ExtractCommandActions, ExtractCommandAppliers, ExtractCommandCreators, ExtractMarkActions, ExtractMarks, ExtractNodeActions, ExtractNodes, JSONParserOptions, MarkAction, MarkBuilder, MarkTyping, NodeAction, NodeBuilder, NodeChild, NodeJSON, NodeTyping, PickSubType, PlainExtension, Priority$1 as Priority, SelectionJSON, SimplifyDeeper, SimplifyUnion, StateJSON, StepJSON, ToMarkAction, ToNodeAction, Union, UnionExtension, createEditor$1 as createEditor, elementFromJSON$1 as elementFromJSON, elementFromNode$1 as elementFromNode, htmlFromJSON$1 as htmlFromJSON, htmlFromNode$1 as htmlFromNode, jsonFromHTML$1 as jsonFromHTML, jsonFromNode$1 as jsonFromNode, jsonFromState$1 as jsonFromState, nodeFromElement$1 as nodeFromElement, nodeFromHTML$1 as nodeFromHTML, nodeFromJSON$1 as nodeFromJSON, stateFromJSON$1 as stateFromJSON } from "./editor-BP9kgR6R.js";
1
+ import { AnyAttrs, AttrSpec, CommandAction, CommandCreator, CommandTyping, DOMDocumentOptions, DOMParserOptions, DOMSerializerOptions, Editor, EditorOptions, Extension, ExtensionTyping, ExtractCommandActions, ExtractCommandAppliers, ExtractCommandCreators, ExtractMarkActions, ExtractMarks, ExtractNodeActions, ExtractNodes, JSONParserOptions, MarkAction, MarkBuilder, MarkTyping, NodeAction, NodeBuilder, NodeChild, NodeJSON, NodeTyping, PickSubType, PlainExtension, Priority, SelectionJSON, SimplifyDeeper, SimplifyUnion, StateJSON, StepJSON, ToMarkAction, ToNodeAction, Union, UnionExtension, createEditor, elementFromJSON, elementFromNode, htmlFromJSON, htmlFromNode, jsonFromHTML, jsonFromNode, jsonFromState, nodeFromElement, nodeFromHTML, nodeFromJSON, stateFromJSON } from "./editor-OUH5V8BA.js";
2
2
  import { AllSelection, Command, EditorState, EditorStateConfig, NodeSelection, Plugin, Selection, TextSelection, Transaction } from "@prosekit/pm/state";
3
3
  import { Attrs as Attrs$1, ContentMatch, DOMSerializer, Fragment, Mark as Mark$1, MarkSpec, MarkType as MarkType$1, Node as Node$1, NodeSpec, NodeType as NodeType$1, ProseMirrorFragment, ProseMirrorNode, ResolvedPos, Schema, Slice } from "@prosekit/pm/model";
4
4
  import { DOMEventMap, EditorView, MarkViewConstructor, NodeView, NodeViewConstructor } from "@prosekit/pm/view";
@@ -7,9 +7,6 @@ import { DOMEventMap, EditorView, MarkViewConstructor, NodeView, NodeViewConstru
7
7
  /**
8
8
  * @public
9
9
  */
10
- /**
11
- * @public
12
- */
13
10
  interface AddMarkOptions {
14
11
  /**
15
12
  * The type of the mark to add.
@@ -33,7 +30,8 @@ interface AddMarkOptions {
33
30
  *
34
31
  * @public
35
32
  */
36
- declare function addMark(options: AddMarkOptions): Command; //#endregion
33
+ declare function addMark(options: AddMarkOptions): Command;
34
+ //#endregion
37
35
  //#region src/commands/expand-mark.d.ts
38
36
  /**
39
37
  * @public
@@ -50,7 +48,6 @@ interface ExpandMarkOptions {
50
48
  * @public
51
49
  */
52
50
  declare function expandMark(options: ExpandMarkOptions): Command;
53
-
54
51
  //#endregion
55
52
  //#region src/commands/insert-default-block.d.ts
56
53
  /**
@@ -70,7 +67,6 @@ interface InsertDefaultBlockOptions {
70
67
  * @public
71
68
  */
72
69
  declare function insertDefaultBlock(options?: InsertDefaultBlockOptions): Command;
73
-
74
70
  //#endregion
75
71
  //#region src/commands/insert-node.d.ts
76
72
  /**
@@ -102,7 +98,6 @@ interface InsertNodeOptions {
102
98
  * @public
103
99
  */
104
100
  declare function insertNode(options: InsertNodeOptions): Command;
105
-
106
101
  //#endregion
107
102
  //#region src/commands/remove-mark.d.ts
108
103
  /**
@@ -132,7 +127,6 @@ interface RemoveMarkOptions {
132
127
  * @public
133
128
  */
134
129
  declare function removeMark(options: RemoveMarkOptions): Command;
135
-
136
130
  //#endregion
137
131
  //#region src/commands/remove-node.d.ts
138
132
  /**
@@ -155,7 +149,6 @@ interface RemoveNodeOptions {
155
149
  * @public
156
150
  */
157
151
  declare function removeNode(options: RemoveNodeOptions): Command;
158
-
159
152
  //#endregion
160
153
  //#region src/commands/set-block-type.d.ts
161
154
  /**
@@ -174,7 +167,6 @@ interface SetBlockTypeOptions {
174
167
  * @public
175
168
  */
176
169
  declare function setBlockType(options: SetBlockTypeOptions): Command;
177
-
178
170
  //#endregion
179
171
  //#region src/commands/set-node-attrs.d.ts
180
172
  /**
@@ -203,7 +195,6 @@ interface SetNodeAttrsOptions {
203
195
  * @public
204
196
  */
205
197
  declare function setNodeAttrs(options: SetNodeAttrsOptions): Command;
206
-
207
198
  //#endregion
208
199
  //#region src/commands/toggle-mark.d.ts
209
200
  /**
@@ -248,7 +239,6 @@ declare function toggleMark({
248
239
  removeWhenPresent,
249
240
  enterInlineAtoms
250
241
  }: ToggleMarkOptions): Command;
251
-
252
242
  //#endregion
253
243
  //#region src/commands/toggle-node.d.ts
254
244
  /**
@@ -276,7 +266,6 @@ declare function toggleNode({
276
266
  type,
277
267
  attrs
278
268
  }: ToggleNodeOptions): Command;
279
-
280
269
  //#endregion
281
270
  //#region src/commands/toggle-wrap.d.ts
282
271
  interface ToggleWrapOptions {
@@ -291,14 +280,13 @@ interface ToggleWrapOptions {
291
280
  }
292
281
  /**
293
282
  * Toggle between wrapping an inactive node with the provided node type, and
294
- * lifting it up into it's parent.
283
+ * lifting it up into its parent.
295
284
  *
296
285
  * @param options
297
286
  *
298
287
  * @public
299
288
  */
300
289
  declare function toggleWrap(options: ToggleWrapOptions): Command;
301
-
302
290
  //#endregion
303
291
  //#region src/commands/unset-block-type.d.ts
304
292
  /**
@@ -321,7 +309,6 @@ interface UnsetBlockTypeOptions {
321
309
  * @public
322
310
  */
323
311
  declare function unsetBlockType(options?: UnsetBlockTypeOptions): Command;
324
-
325
312
  //#endregion
326
313
  //#region src/commands/unset-mark.d.ts
327
314
  /**
@@ -343,7 +330,6 @@ interface UnsetMarkOptions {
343
330
  * @public
344
331
  */
345
332
  declare function unsetMark(options?: UnsetMarkOptions): Command;
346
-
347
333
  //#endregion
348
334
  //#region src/commands/wrap.d.ts
349
335
  /**
@@ -371,7 +357,6 @@ interface WrapOptions {
371
357
  * @public
372
358
  */
373
359
  declare function wrap(options: WrapOptions): Command;
374
-
375
360
  //#endregion
376
361
  //#region src/editor/union.d.ts
377
362
  /**
@@ -406,7 +391,6 @@ declare function wrap(options: WrapOptions): Command;
406
391
  */
407
392
  declare function union<const E extends readonly Extension[]>(...exts: E): Union<E>;
408
393
  declare function union<const E extends readonly Extension[]>(exts: E): Union<E>;
409
-
410
394
  //#endregion
411
395
  //#region src/editor/with-priority.d.ts
412
396
  /**
@@ -422,7 +406,6 @@ declare function union<const E extends readonly Extension[]>(exts: E): Union<E>;
422
406
  * @public
423
407
  */
424
408
  declare function withPriority<T extends Extension>(extension: T, priority: Priority): T;
425
-
426
409
  //#endregion
427
410
  //#region src/error.d.ts
428
411
  /**
@@ -437,17 +420,15 @@ declare class ProseKitError extends Error {}
437
420
  declare class EditorNotFoundError extends ProseKitError {
438
421
  constructor();
439
422
  }
440
-
441
- //#endregion
442
- //#region src/types/any-function.d.ts
443
423
  /**
444
424
  * @internal
445
425
  */
426
+ //#endregion
427
+ //#region src/types/any-function.d.ts
446
428
  /**
447
429
  * @internal
448
430
  */
449
431
  type AnyFunction = (...args: any[]) => any;
450
-
451
432
  //#endregion
452
433
  //#region src/extensions/clipboard-serializer.d.ts
453
434
  type SerializeFragmentFunction = typeof DOMSerializer.prototype.serializeFragment;
@@ -468,7 +449,6 @@ interface ClipboardSerializerOptions {
468
449
  * @internal
469
450
  */
470
451
  declare function defineClipboardSerializer(options: ClipboardSerializerOptions): PlainExtension;
471
-
472
452
  //#endregion
473
453
  //#region src/commands/insert-text.d.ts
474
454
  /**
@@ -479,14 +459,13 @@ type InsertTextOptions = {
479
459
  from?: number;
480
460
  to?: number;
481
461
  };
482
-
483
- //#endregion
484
- //#region src/extensions/command.d.ts
485
462
  /**
486
463
  * Returns a command that inserts the given text.
487
464
  *
488
465
  * @public
489
466
  */
467
+ //#endregion
468
+ //#region src/extensions/command.d.ts
490
469
  declare function defineCommands<T extends Record<string, CommandCreator> = Record<string, CommandCreator>>(commands: T): Extension<{
491
470
  Commands: { [K in keyof T]: Parameters<T[K]> };
492
471
  }>;
@@ -516,7 +495,6 @@ type BaseCommandsExtension = Extension<{
516
495
  * @public
517
496
  */
518
497
  declare function defineBaseCommands(): BaseCommandsExtension;
519
-
520
498
  //#endregion
521
499
  //#region src/extensions/default-state.d.ts
522
500
  /**
@@ -561,7 +539,6 @@ declare function defineDefaultState({
561
539
  defaultDoc,
562
540
  defaultHTML
563
541
  }: DefaultStateOptions): PlainExtension;
564
-
565
542
  //#endregion
566
543
  //#region src/extensions/doc.d.ts
567
544
  /**
@@ -582,7 +559,6 @@ type DocExtension = Extension<{
582
559
  * ```
583
560
  */
584
561
  declare function defineDoc(): DocExtension;
585
-
586
562
  //#endregion
587
563
  //#region src/extensions/events/doc-change.d.ts
588
564
  /**
@@ -600,14 +576,12 @@ type DocChangeHandler = (view: EditorView, prevState: EditorState) => void;
600
576
  * @public
601
577
  */
602
578
  declare function defineDocChangeHandler(handler: DocChangeHandler): PlainExtension;
603
-
604
579
  //#endregion
605
580
  //#region src/facets/facet-types.d.ts
606
581
  /**
607
582
  * @internal
608
583
  */
609
584
  type FacetReducer<Input, Output> = (input: Input[]) => Output;
610
-
611
585
  //#endregion
612
586
  //#region src/facets/facet.d.ts
613
587
  /**
@@ -664,13 +638,11 @@ declare function defineFacet<Input, Output>(options: {
664
638
  */
665
639
  reduce?: () => FacetReducer<Input, Output>;
666
640
  }): Facet<Input, Output>;
667
-
668
641
  //#endregion
669
642
  //#region src/facets/state.d.ts
670
643
  type StatePayload = (ctx: {
671
644
  schema: Schema;
672
645
  }) => EditorStateConfig;
673
-
674
646
  //#endregion
675
647
  //#region src/extensions/plugin.d.ts
676
648
  /**
@@ -694,7 +666,6 @@ type PluginPayload = Plugin | Plugin[] | ((context: {
694
666
  * @internal
695
667
  */
696
668
  declare const pluginFacet: Facet<PluginPayload, StatePayload>;
697
-
698
669
  //#endregion
699
670
  //#region src/extensions/events/dom-event.d.ts
700
671
  /**
@@ -716,12 +687,11 @@ type DOMEventHandler<Event extends keyof DOMEventMap = string> = (view: EditorVi
716
687
  * @public
717
688
  */
718
689
  declare function defineDOMEventHandler<Event extends keyof DOMEventMap = string>(event: Event, handler: DOMEventHandler<Event>): PlainExtension;
719
-
720
- //#endregion
721
- //#region src/types/object-entries.d.ts
722
690
  /**
723
691
  * @internal
724
692
  */
693
+ //#endregion
694
+ //#region src/types/object-entries.d.ts
725
695
  /**
726
696
  * @internal
727
697
  *
@@ -733,7 +703,6 @@ declare function defineDOMEventHandler<Event extends keyof DOMEventMap = string>
733
703
  * // ^ ["a", 1] | ["b", "B"]
734
704
  */
735
705
  type ObjectEntries<T extends Record<string, any>> = { [K in keyof T]: [K, T[K]] }[keyof T];
736
-
737
706
  //#endregion
738
707
  //#region src/extensions/events/editor-event.d.ts
739
708
  type KeyDownHandler = (view: EditorView, event: KeyboardEvent) => boolean | void;
@@ -842,7 +811,6 @@ type EditorEventPayload = ObjectEntries<EditorEventMap>;
842
811
  * @internal
843
812
  */
844
813
  declare const editorEventFacet: Facet<EditorEventPayload, PluginPayload>;
845
-
846
814
  //#endregion
847
815
  //#region src/extensions/events/focus.d.ts
848
816
  /**
@@ -859,7 +827,6 @@ type FocusChangeHandler = (hasFocus: boolean) => void;
859
827
  * @public
860
828
  */
861
829
  declare function defineFocusChangeHandler(handler: FocusChangeHandler): PlainExtension;
862
-
863
830
  //#endregion
864
831
  //#region src/extensions/events/plugin-view.d.ts
865
832
  /**
@@ -903,7 +870,6 @@ declare function defineUpdateHandler(handler: UpdateHandler): PlainExtension;
903
870
  * @public
904
871
  */
905
872
  declare function defineUnmountHandler(handler: UnmountHandler): PlainExtension;
906
-
907
873
  //#endregion
908
874
  //#region src/extensions/history.d.ts
909
875
  /**
@@ -947,7 +913,6 @@ declare function defineHistory({
947
913
  depth,
948
914
  newGroupDelay
949
915
  }?: HistoryOptions): HistoryExtension;
950
-
951
916
  //#endregion
952
917
  //#region src/extensions/keymap.d.ts
953
918
  /**
@@ -968,7 +933,6 @@ type KeymapPayload = Keymap;
968
933
  * @internal
969
934
  */
970
935
  declare const keymapFacet: Facet<KeymapPayload, PluginPayload>;
971
-
972
936
  //#endregion
973
937
  //#region src/extensions/keymap-base.d.ts
974
938
  /**
@@ -988,7 +952,6 @@ declare function defineBaseKeymap(options?: {
988
952
  */
989
953
  priority?: Priority;
990
954
  }): BaseKeymapExtension;
991
-
992
955
  //#endregion
993
956
  //#region src/extensions/mark-spec.d.ts
994
957
  /**
@@ -1042,7 +1005,6 @@ declare function defineMarkSpec<Mark extends string, Attrs extends AnyAttrs = An
1042
1005
  declare function defineMarkAttr<MarkType extends string = string, AttrName extends string = string, AttrType = any>(options: MarkAttrOptions<MarkType, AttrName, AttrType>): Extension<{
1043
1006
  Marks: { [K in MarkType]: AttrType };
1044
1007
  }>;
1045
-
1046
1008
  //#endregion
1047
1009
  //#region src/extensions/mark-view.d.ts
1048
1010
  interface MarkViewOptions {
@@ -1050,7 +1012,6 @@ interface MarkViewOptions {
1050
1012
  constructor: MarkViewConstructor;
1051
1013
  }
1052
1014
  declare function defineMarkView(options: MarkViewOptions): Extension;
1053
-
1054
1015
  //#endregion
1055
1016
  //#region src/extensions/mark-view-effect.d.ts
1056
1017
  /**
@@ -1076,7 +1037,6 @@ declare function defineMarkViewFactory<T>(options: MarkViewFactoryOptions<T>): E
1076
1037
  * @internal
1077
1038
  */
1078
1039
  declare function defineMarkViewComponent<T>(options: MarkViewComponentOptions<T>): Extension;
1079
-
1080
1040
  //#endregion
1081
1041
  //#region src/extensions/node-spec.d.ts
1082
1042
  /**
@@ -1147,7 +1107,6 @@ declare function defineNodeSpec<Node extends string, Attrs extends AnyAttrs = An
1147
1107
  declare function defineNodeAttr<NodeType extends string = string, AttrName extends string = string, AttrType = any>(options: NodeAttrOptions<NodeType, AttrName, AttrType>): Extension<{
1148
1108
  Nodes: { [K in NodeType]: { [K in AttrName]: AttrType } };
1149
1109
  }>;
1150
-
1151
1110
  //#endregion
1152
1111
  //#region src/extensions/node-view.d.ts
1153
1112
  interface NodeViewOptions {
@@ -1155,7 +1114,6 @@ interface NodeViewOptions {
1155
1114
  constructor: NodeViewConstructor;
1156
1115
  }
1157
1116
  declare function defineNodeView(options: NodeViewOptions): Extension;
1158
-
1159
1117
  //#endregion
1160
1118
  //#region src/extensions/node-view-effect.d.ts
1161
1119
  /**
@@ -1181,7 +1139,6 @@ declare function defineNodeViewFactory<T>(options: NodeViewFactoryOptions<T>): E
1181
1139
  * @internal
1182
1140
  */
1183
1141
  declare function defineNodeViewComponent<T>(options: NodeViewComponentOptions<T>): Extension;
1184
-
1185
1142
  //#endregion
1186
1143
  //#region src/extensions/paragraph.d.ts
1187
1144
  /**
@@ -1214,7 +1171,6 @@ type ParagraphExtension = ParagraphSpecExtension;
1214
1171
  * ```
1215
1172
  */
1216
1173
  declare function defineParagraph(): ParagraphExtension;
1217
-
1218
1174
  //#endregion
1219
1175
  //#region src/extensions/text.d.ts
1220
1176
  /**
@@ -1235,16 +1191,15 @@ type TextExtension = Extension<{
1235
1191
  * ```
1236
1192
  */
1237
1193
  declare function defineText(): TextExtension;
1238
-
1239
1194
  //#endregion
1240
1195
  //#region src/facets/facet-extension.d.ts
1241
1196
  /**
1242
1197
  * @internal
1243
1198
  */
1244
1199
  declare function defineFacetPayload<Input>(facet: Facet<Input, any>, payloads: Input[]): Extension;
1245
-
1246
1200
  //#endregion
1247
1201
  //#region src/types/base-node-view-options.d.ts
1202
+ // This should be synced with the type `CoreNodeViewUserOptions` from `@prosemirror-adapter/core`
1248
1203
  /**
1249
1204
  * Some basic props for custom node views.
1250
1205
  *
@@ -1270,18 +1225,15 @@ interface BaseNodeViewOptions {
1270
1225
  destroy?: NodeView["destroy"];
1271
1226
  onUpdate?: () => void;
1272
1227
  }
1273
-
1274
1228
  //#endregion
1275
1229
  //#region src/utils/assert.d.ts
1276
1230
  /**
1277
1231
  * @internal
1278
1232
  */
1279
1233
  declare function assert(condition: unknown, message?: string): asserts condition;
1280
-
1281
1234
  //#endregion
1282
1235
  //#region src/utils/can-use-regex-lookbehind.d.ts
1283
1236
  declare const canUseRegexLookbehind: () => boolean;
1284
-
1285
1237
  //#endregion
1286
1238
  //#region src/utils/clsx.d.ts
1287
1239
  /**
@@ -1292,20 +1244,20 @@ declare const canUseRegexLookbehind: () => boolean;
1292
1244
  * @public
1293
1245
  */
1294
1246
  declare const clsx: (...args: Array<string | boolean | null | undefined>) => string;
1295
-
1296
1247
  //#endregion
1297
1248
  //#region src/utils/collect-children.d.ts
1298
1249
  /**
1299
1250
  * Collects all children of a node or a fragment, and returns them as an array.
1300
1251
  *
1301
- * @public
1252
+ * @deprecated Use `node.children` or `fragment.content` instead.
1253
+ *
1254
+ * @hidden
1302
1255
  */
1303
1256
  declare function collectChildren(parent: ProseMirrorNode | Fragment): ProseMirrorNode[];
1304
-
1305
1257
  //#endregion
1306
1258
  //#region src/utils/collect-nodes.d.ts
1307
1259
  /**
1308
- * @public
1260
+ * @hidden
1309
1261
  *
1310
1262
  * @deprecated
1311
1263
  */
@@ -1315,31 +1267,27 @@ type NodeContent = ProseMirrorNode | ProseMirrorFragment | NodeContent[];
1315
1267
  *
1316
1268
  * @deprecated Use `collectChildren` instead.
1317
1269
  *
1318
- * @public
1270
+ * @hidden
1319
1271
  */
1320
1272
  declare function collectNodes(content: NodeContent): ProseMirrorNode[];
1321
-
1322
1273
  //#endregion
1323
1274
  //#region src/utils/contains-inline-node.d.ts
1324
1275
  /**
1325
1276
  * @internal
1326
1277
  */
1327
1278
  declare function containsInlineNode(doc: ProseMirrorNode, from: number, to: number): boolean;
1328
-
1329
1279
  //#endregion
1330
1280
  //#region src/utils/default-block-at.d.ts
1331
1281
  /**
1332
1282
  * @internal
1333
1283
  */
1334
1284
  declare function defaultBlockAt(match: ContentMatch): NodeType$1 | null;
1335
-
1336
1285
  //#endregion
1337
1286
  //#region src/utils/env.d.ts
1338
1287
  /**
1339
1288
  * @private
1340
1289
  */
1341
1290
  declare const isApple: boolean;
1342
-
1343
1291
  //#endregion
1344
1292
  //#region src/utils/find-parent-node.d.ts
1345
1293
  /**
@@ -1369,7 +1317,6 @@ interface FindParentNodeResult {
1369
1317
  * @public
1370
1318
  */
1371
1319
  declare function findParentNode(predicate: (node: ProseMirrorNode) => boolean, $pos: ResolvedPos): FindParentNodeResult | undefined;
1372
-
1373
1320
  //#endregion
1374
1321
  //#region src/utils/find-parent-node-of-type.d.ts
1375
1322
  /**
@@ -1378,7 +1325,6 @@ declare function findParentNode(predicate: (node: ProseMirrorNode) => boolean, $
1378
1325
  * @public
1379
1326
  */
1380
1327
  declare function findParentNodeOfType(type: NodeType$1 | string, $pos: ResolvedPos): FindParentNodeResult | undefined;
1381
-
1382
1328
  //#endregion
1383
1329
  //#region src/utils/get-id.d.ts
1384
1330
  /**
@@ -1387,21 +1333,18 @@ declare function findParentNodeOfType(type: NodeType$1 | string, $pos: ResolvedP
1387
1333
  * @internal
1388
1334
  */
1389
1335
  declare function getId(): string;
1390
-
1391
1336
  //#endregion
1392
1337
  //#region src/utils/get-mark-type.d.ts
1393
1338
  /**
1394
1339
  * @internal
1395
1340
  */
1396
1341
  declare function getMarkType(schema: Schema, type: string | MarkType$1): MarkType$1;
1397
-
1398
1342
  //#endregion
1399
1343
  //#region src/utils/get-node-type.d.ts
1400
1344
  /**
1401
1345
  * @internal
1402
1346
  */
1403
1347
  declare function getNodeType(schema: Schema, type: string | NodeType$1): NodeType$1;
1404
-
1405
1348
  //#endregion
1406
1349
  //#region src/utils/is-at-block-start.d.ts
1407
1350
  /**
@@ -1410,7 +1353,6 @@ declare function getNodeType(schema: Schema, type: string | NodeType$1): NodeTyp
1410
1353
  * @internal
1411
1354
  */
1412
1355
  declare function isAtBlockStart(state: EditorState, view?: EditorView): ResolvedPos | null;
1413
-
1414
1356
  //#endregion
1415
1357
  //#region src/utils/is-in-code-block.d.ts
1416
1358
  /**
@@ -1419,7 +1361,6 @@ declare function isAtBlockStart(state: EditorState, view?: EditorView): Resolved
1419
1361
  * @internal
1420
1362
  */
1421
1363
  declare function isInCodeBlock(selection: Selection): boolean;
1422
-
1423
1364
  //#endregion
1424
1365
  //#region src/utils/is-mark-absent.d.ts
1425
1366
  /**
@@ -1430,90 +1371,83 @@ declare function isInCodeBlock(selection: Selection): boolean;
1430
1371
  * @internal
1431
1372
  */
1432
1373
  declare function isMarkAbsent(node: ProseMirrorNode, from: number, to: number, markType: MarkType$1, attrs?: Attrs$1 | null): boolean;
1433
-
1434
1374
  //#endregion
1435
1375
  //#region src/utils/is-mark-active.d.ts
1436
1376
  /**
1437
1377
  * @internal
1438
1378
  */
1439
1379
  declare function isMarkActive(state: EditorState, type: string | MarkType$1, attrs?: Attrs$1 | null): boolean;
1440
-
1441
1380
  //#endregion
1442
1381
  //#region src/utils/maybe-run.d.ts
1443
1382
  /**
1444
1383
  * @internal
1445
1384
  */
1446
- declare function maybeRun<MaybeFn, Result = (MaybeFn extends ((...args: any[]) => void) ? ReturnType<MaybeFn> : MaybeFn)>(value: MaybeFn, ...args: MaybeFn extends ((...args: any[]) => void) ? Parameters<MaybeFn> : never): Result;
1447
-
1385
+ declare function maybeRun<Value, Args extends unknown[]>(value: Value | ((...args: Args) => Value), ...args: Args): Value;
1448
1386
  //#endregion
1449
1387
  //#region src/utils/set-selection-around.d.ts
1450
1388
  declare function setSelectionAround(tr: Transaction, pos: number): void;
1451
-
1452
1389
  //#endregion
1453
1390
  //#region src/utils/type-assertion.d.ts
1454
1391
  /**
1455
- * Checks if the given object is a `ProseMirrorNode` instance.
1392
+ * Checks if the given object is a {@link ProseMirrorNode} instance.
1456
1393
  */
1457
- declare function isProseMirrorNode(node: unknown): node is ProseMirrorNode;
1394
+ declare function isProseMirrorNode(value: unknown): value is ProseMirrorNode;
1458
1395
  /**
1459
- * Checks if the given object is a `Mark` instance.
1396
+ * Checks if the given object is a {@link Mark} instance.
1460
1397
  *
1461
1398
  * @public
1462
1399
  */
1463
- declare function isMark(mark: unknown): mark is Mark$1;
1400
+ declare function isMark(value: unknown): value is Mark$1;
1464
1401
  /**
1465
- * Checks if the given object is a `Fragment` instance.
1402
+ * Checks if the given object is a {@link Fragment} instance.
1466
1403
  *
1467
1404
  * @public
1468
1405
  */
1469
- declare function isFragment(fragment: unknown): fragment is Fragment;
1406
+ declare function isFragment(value: unknown): value is Fragment;
1470
1407
  /**
1471
- * Checks if the given object is a `Slice` instance.
1408
+ * Checks if the given object is a {@link Slice} instance.
1472
1409
  *
1473
1410
  * @public
1474
1411
  */
1475
- declare function isSlice(slice: unknown): slice is Slice;
1412
+ declare function isSlice(value: unknown): value is Slice;
1476
1413
  /**
1477
- * Checks if the given object is a `Selection` instance.
1414
+ * Checks if the given object is a {@link Selection} instance.
1478
1415
  *
1479
1416
  * @public
1480
1417
  */
1481
- declare function isSelection(sel: unknown): sel is Selection;
1418
+ declare function isSelection(value: unknown): value is Selection;
1482
1419
  /**
1483
- * Checks if the given object is a `TextSelection` instance.
1420
+ * Checks if the given object is a {@link TextSelection} instance.
1484
1421
  *
1485
1422
  * @public
1486
1423
  */
1487
- declare function isTextSelection(sel: Selection): sel is TextSelection;
1424
+ declare function isTextSelection(value: Selection): value is TextSelection;
1488
1425
  /**
1489
- * Checks if the given object is a `NodeSelection` instance.
1426
+ * Checks if the given object is a {@link NodeSelection} instance.
1490
1427
  *
1491
1428
  * @public
1492
1429
  */
1493
- declare function isNodeSelection(sel: Selection): sel is NodeSelection;
1430
+ declare function isNodeSelection(value: Selection): value is NodeSelection;
1494
1431
  /**
1495
- * Checks if the given object is a `AllSelection` instance.
1432
+ * Checks if the given object is a {@link AllSelection} instance.
1496
1433
  *
1497
1434
  * @public
1498
1435
  */
1499
- declare function isAllSelection(sel: Selection): sel is AllSelection;
1500
-
1501
- //#endregion
1502
- //#region src/utils/unicode.d.ts
1436
+ declare function isAllSelection(value: Selection): value is AllSelection;
1503
1437
  /**
1504
1438
  * @internal
1505
1439
  */
1440
+ //#endregion
1441
+ //#region src/utils/unicode.d.ts
1506
1442
  /**
1507
1443
  * @internal
1508
1444
  */
1509
1445
  declare const OBJECT_REPLACEMENT_CHARACTER = "";
1510
-
1511
1446
  //#endregion
1512
1447
  //#region src/utils/with-skip-code-block.d.ts
1513
1448
  /**
1514
1449
  * @internal
1515
1450
  */
1516
1451
  declare function withSkipCodeBlock(command: Command): Command;
1517
-
1518
1452
  //#endregion
1519
1453
  export { AddMarkOptions, AnyAttrs, AnyFunction, AttrSpec, BaseCommandsExtension, BaseKeymapExtension, BaseNodeViewOptions, ClickHandler, ClickOnHandler, ClipboardSerializerOptions, CommandAction, CommandTyping, DOMDocumentOptions, DOMEventHandler, DOMParserOptions, DOMSerializerOptions, DefaultStateOptions, DocChangeHandler, DocExtension, DoubleClickHandler, DoubleClickOnHandler, DropHandler, Editor, EditorEventPayload, EditorNotFoundError, EditorOptions, ExpandMarkOptions, Extension, ExtensionTyping, ExtractCommandActions, ExtractCommandAppliers, ExtractCommandCreators, ExtractMarkActions, ExtractMarks, ExtractNodeActions, ExtractNodes, Facet, FindParentNodeResult, FocusChangeHandler, HistoryExtension, HistoryOptions, InsertDefaultBlockOptions, InsertNodeOptions, JSONParserOptions, KeyDownHandler, KeyPressHandler, Keymap, KeymapPayload, MarkAction, MarkAttrOptions, MarkBuilder, MarkSpecOptions, MarkTyping, MarkViewComponentOptions, MarkViewFactoryOptions, MarkViewOptions, MountHandler, NodeAction, NodeAttrOptions, NodeBuilder, NodeChild, NodeContent, NodeJSON, NodeSpecOptions, NodeTyping, NodeViewComponentOptions, NodeViewFactoryOptions, NodeViewOptions, OBJECT_REPLACEMENT_CHARACTER, ParagraphExtension, PasteHandler, PickSubType, PlainExtension, PluginPayload, Priority, ProseKitError, RemoveMarkOptions, RemoveNodeOptions, ScrollToSelectionHandler, SelectionJSON, SetBlockTypeOptions, SetNodeAttrsOptions, SimplifyDeeper, SimplifyUnion, StateJSON, StepJSON, TextExtension, TextInputHandler, ToMarkAction, ToNodeAction, ToggleMarkOptions, ToggleNodeOptions, ToggleWrapOptions, TripleClickHandler, TripleClickOnHandler, Union, UnionExtension, UnmountHandler, UnsetBlockTypeOptions, UnsetMarkOptions, UpdateHandler, WrapOptions, getId as _getId, addMark, assert, canUseRegexLookbehind, clsx, collectChildren, collectNodes, containsInlineNode, createEditor, defaultBlockAt, defineBaseCommands, defineBaseKeymap, defineClickHandler, defineClickOnHandler, defineClipboardSerializer, defineCommands, defineDOMEventHandler, defineDefaultState, defineDoc, defineDocChangeHandler, defineDoubleClickHandler, defineDoubleClickOnHandler, defineDropHandler, defineFacet, defineFacetPayload, defineFocusChangeHandler, defineHistory, defineKeyDownHandler, defineKeyPressHandler, defineKeymap, defineMarkAttr, defineMarkSpec, defineMarkView, defineMarkViewComponent, defineMarkViewFactory, defineMountHandler, defineNodeAttr, defineNodeSpec, defineNodeView, defineNodeViewComponent, defineNodeViewFactory, defineParagraph, definePasteHandler, definePlugin, defineScrollToSelectionHandler, defineText, defineTextInputHandler, defineTripleClickHandler, defineTripleClickOnHandler, defineUnmountHandler, defineUpdateHandler, editorEventFacet, elementFromJSON, elementFromNode, expandMark, findParentNode, findParentNodeOfType, getMarkType, getNodeType, htmlFromJSON, htmlFromNode, insertDefaultBlock, insertNode, isAllSelection, isApple, isAtBlockStart, isFragment, isInCodeBlock, isMark, isMarkAbsent, isMarkActive, isNodeSelection, isProseMirrorNode, isSelection, isSlice, isTextSelection, jsonFromHTML, jsonFromNode, jsonFromState, keymapFacet, maybeRun, nodeFromElement, nodeFromHTML, nodeFromJSON, pluginFacet, removeMark, removeNode, setBlockType, setNodeAttrs, setSelectionAround, stateFromJSON, toggleMark, toggleNode, toggleWrap, union, unsetBlockType, unsetMark, withPriority, withSkipCodeBlock, wrap };