@plait/core 0.0.17 → 0.0.21
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.
- package/esm2020/board/board.component.mjs +2 -2
- package/esm2020/interfaces/board.mjs +1 -1
- package/esm2020/interfaces/history.mjs +3 -2
- package/esm2020/plugins/create-board.mjs +2 -2
- package/esm2020/plugins/with-board.mjs +2 -2
- package/esm2020/plugins/with-history.mjs +3 -39
- package/esm2020/plugins/with-selection.mjs +10 -9
- package/esm2020/utils/history.mjs +37 -2
- package/fesm2015/plait-core.mjs +52 -49
- package/fesm2015/plait-core.mjs.map +1 -1
- package/fesm2020/plait-core.mjs +52 -49
- package/fesm2020/plait-core.mjs.map +1 -1
- package/interfaces/board.d.ts +1 -1
- package/interfaces/history.d.ts +3 -0
- package/package.json +1 -1
- package/plugins/with-history.d.ts +0 -22
- package/styles/styles.scss +62 -0
- package/styles/theme.scss +14 -0
- package/utils/history.d.ts +21 -1
package/utils/history.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlaitOperation } from '../interfaces';
|
|
1
|
+
import { PlaitBoard, PlaitOperation } from '../interfaces';
|
|
2
2
|
/**
|
|
3
3
|
* Check whether to merge an operation into the previous operation.
|
|
4
4
|
*/
|
|
@@ -11,3 +11,23 @@ export declare const shouldSave: (op: PlaitOperation, prev: PlaitOperation | und
|
|
|
11
11
|
* Check whether an operation should clear the redos stack.
|
|
12
12
|
*/
|
|
13
13
|
export declare const shouldClear: (op: PlaitOperation) => boolean;
|
|
14
|
+
export declare const PlaitHistoryBoard: {
|
|
15
|
+
/**
|
|
16
|
+
* Get the saving flag's current value.
|
|
17
|
+
*/
|
|
18
|
+
isSaving(board: PlaitBoard): boolean | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Get the merge flag's current value.
|
|
21
|
+
*/
|
|
22
|
+
isMerging(board: PlaitBoard): boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Apply a series of changes inside a synchronous `fn`, without merging any of
|
|
25
|
+
* the new operations into previous save point in the history.
|
|
26
|
+
*/
|
|
27
|
+
withoutMerging(board: PlaitBoard, fn: () => void): void;
|
|
28
|
+
/**
|
|
29
|
+
* Apply a series of changes inside a synchronous `fn`, without saving any of
|
|
30
|
+
* their operations into the history.
|
|
31
|
+
*/
|
|
32
|
+
withoutSaving(board: PlaitBoard, fn: () => void): void;
|
|
33
|
+
};
|