@plait/core 0.72.0 → 0.74.0

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,3 +6,5 @@ export interface PlaitHistory {
6
6
  }
7
7
  export declare const SAVING: WeakMap<PlaitBoard, boolean | undefined>;
8
8
  export declare const MERGING: WeakMap<PlaitBoard, boolean | undefined>;
9
+ export declare const HISTORY: WeakMap<PlaitBoard, History>;
10
+ export declare const SPLITTING_ONCE: WeakMap<PlaitBoard, boolean | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/core",
3
- "version": "0.72.0",
3
+ "version": "0.74.0",
4
4
  "peerDependencies": {
5
5
  "immer": "^10.0.3",
6
6
  "is-hotkey": "^0.2.0",
@@ -20,6 +20,22 @@ export declare const PlaitHistoryBoard: {
20
20
  * Get the merge flag's current value.
21
21
  */
22
22
  isMerging(board: PlaitBoard): boolean | undefined;
23
+ /**
24
+ * Get the splitting once flag's current value.
25
+ */
26
+ isSplittingOnce(board: PlaitBoard): boolean | undefined;
27
+ setSplittingOnce(board: PlaitBoard, value: boolean | undefined): void;
28
+ /**
29
+ * Apply a series of changes inside a synchronous `fn`, These operations will
30
+ * be merged into the previous history.
31
+ */
32
+ withMerging(board: PlaitBoard, fn: () => void): void;
33
+ /**
34
+ * Apply a series of changes inside a synchronous `fn`, ensuring that the first
35
+ * operation starts a new batch in the history. Subsequent operations will be
36
+ * merged as usual.
37
+ */
38
+ withNewBatch(board: PlaitBoard, fn: () => void): void;
23
39
  /**
24
40
  * Apply a series of changes inside a synchronous `fn`, without merging any of
25
41
  * the new operations into previous save point in the history.