@plait/core 0.62.0 → 0.63.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.
- package/esm2022/interfaces/plugin.mjs +2 -1
- package/esm2022/plugins/with-hand.mjs +29 -19
- package/esm2022/transforms/board.mjs +24 -3
- package/fesm2022/plait-core.mjs +50 -18
- package/fesm2022/plait-core.mjs.map +1 -1
- package/interfaces/plugin.d.ts +5 -1
- package/package.json +1 -1
- package/transforms/board.d.ts +2 -0
package/interfaces/plugin.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export interface WithSelectionPluginOptions extends WithPluginOptions {
|
|
|
8
8
|
isDisabledSelection: boolean;
|
|
9
9
|
isPreventClearSelection: boolean;
|
|
10
10
|
}
|
|
11
|
+
export interface WithHandPluginOptions extends WithPluginOptions {
|
|
12
|
+
isHandMode: (board: PlaitBoard, event: PointerEvent) => boolean;
|
|
13
|
+
}
|
|
11
14
|
export declare enum PlaitPluginKey {
|
|
12
|
-
'withSelection' = "withSelection"
|
|
15
|
+
'withSelection' = "withSelection",
|
|
16
|
+
'withHand' = "withHand"
|
|
13
17
|
}
|
package/package.json
CHANGED
package/transforms/board.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ declare function fitViewportWidth(board: PlaitBoard, options: FitViewportOptions
|
|
|
12
12
|
* invoke applyThemeColor
|
|
13
13
|
*/
|
|
14
14
|
declare function updateThemeColor(board: PlaitBoard, mode: ThemeColorMode): void;
|
|
15
|
+
declare function moveToCenter(board: PlaitBoard, centerPoint: Point): void;
|
|
15
16
|
export declare const BoardTransforms: {
|
|
16
17
|
updatePointerType: <T extends string = PlaitPointerType>(board: PlaitBoard, pointer: T) => void;
|
|
17
18
|
updateViewport: typeof updateViewport;
|
|
@@ -19,5 +20,6 @@ export declare const BoardTransforms: {
|
|
|
19
20
|
updateZoom: typeof updateZoom;
|
|
20
21
|
updateThemeColor: typeof updateThemeColor;
|
|
21
22
|
fitViewportWidth: typeof fitViewportWidth;
|
|
23
|
+
moveToCenter: typeof moveToCenter;
|
|
22
24
|
};
|
|
23
25
|
export {};
|