@prosekit/core 0.7.2 → 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.
@@ -465,13 +465,15 @@ export { defineFocusChangeHandler as defineFocusChangeHandler_alias_1 }
465
465
 
466
466
  /**
467
467
  * Add undo/redo history to the editor.
468
+ *
469
+ * @public
468
470
  */
469
- declare function defineHistory(): Extension< {
471
+ declare function defineHistory({ depth, newGroupDelay, }?: HistoryOptions): Extension< {
470
472
  Nodes: never;
471
473
  Marks: never;
472
474
  Commands: {
473
- undo: [];
474
- redo: [];
475
+ readonly undo: [];
476
+ readonly redo: [];
475
477
  };
476
478
  }>;
477
479
  export { defineHistory }
@@ -647,8 +649,8 @@ export declare function defineTestExtension(): Extension<{
647
649
  removeMark: [options: RemoveMarkOptions];
648
650
  unsetBlockType: [options?: UnsetBlockTypeOptions | undefined];
649
651
  unsetMark: [options?: UnsetMarkOptions | undefined];
650
- undo: [];
651
- redo: [];
652
+ readonly undo: [];
653
+ readonly redo: [];
652
654
  };
653
655
  }>;
654
656
 
@@ -1171,6 +1173,30 @@ export declare type GroupedEntries<T extends Record<string, any>> = {
1171
1173
 
1172
1174
  export declare function groupEntries<T extends Record<string, any>>(entries: ObjectEntries<T>[]): GroupedEntries<T>;
1173
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
+
1174
1200
  /**
1175
1201
  * @internal
1176
1202
  */
@@ -1891,8 +1917,8 @@ export declare function setupTest(): {
1891
1917
  removeMark: [options: RemoveMarkOptions];
1892
1918
  unsetBlockType: [options?: UnsetBlockTypeOptions | undefined];
1893
1919
  unsetMark: [options?: UnsetMarkOptions | undefined];
1894
- undo: [];
1895
- redo: [];
1920
+ readonly undo: [];
1921
+ readonly redo: [];
1896
1922
  };
1897
1923
  }>>;
1898
1924
  n: Record<"text" | "doc" | "paragraph" | "heading", NodeBuilder>;