@plait/core 0.1.0 → 0.1.1
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/plugins/with-selection.mjs +16 -6
- package/esm2020/public-api.mjs +2 -1
- package/esm2020/transforms/selection.mjs +10 -2
- package/esm2020/utils/weak-maps.mjs +3 -1
- package/fesm2015/plait-core.mjs +36 -18
- package/fesm2015/plait-core.mjs.map +1 -1
- package/fesm2020/plait-core.mjs +36 -18
- package/fesm2020/plait-core.mjs.map +1 -1
- package/package.json +1 -1
- package/plugins/with-selection.d.ts +2 -0
- package/public-api.d.ts +1 -0
- package/transforms/selection.d.ts +3 -0
- package/utils/weak-maps.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { PlaitBoard } from '../interfaces/board';
|
|
2
2
|
export declare function withSelection<T extends PlaitBoard>(board: T): T;
|
|
3
|
+
export declare function getTemporaryElements(board: PlaitBoard): import("../interfaces").PlaitElement[] | undefined;
|
|
4
|
+
export declare function deleteTemporaryElements(board: PlaitBoard): void;
|
package/public-api.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { PlaitBoard } from '../interfaces/board';
|
|
2
2
|
import { Selection } from '../interfaces/selection';
|
|
3
|
+
import { PlaitElement } from '../interfaces/element';
|
|
3
4
|
export declare function setSelection(board: PlaitBoard, selection: Selection | null): void;
|
|
4
5
|
export interface SelectionTransforms {
|
|
5
6
|
setSelection: (board: PlaitBoard, selection: Selection | null) => void;
|
|
7
|
+
setSelectionWithTemporaryElements: (board: PlaitBoard, elements: PlaitElement[]) => void;
|
|
6
8
|
}
|
|
7
9
|
export declare const SelectionTransforms: SelectionTransforms;
|
|
10
|
+
export declare function setSelectionWithTemporaryElements(board: PlaitBoard, elements: PlaitElement[]): void;
|
package/utils/weak-maps.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export declare const BOARD_TO_HOST: WeakMap<PlaitBoard, SVGSVGElement>;
|
|
|
12
12
|
export declare const BOARD_TO_ELEMENT_HOST: WeakMap<PlaitBoard, SVGGElement>;
|
|
13
13
|
export declare const BOARD_TO_SELECTED_ELEMENT: WeakMap<PlaitBoard, PlaitElement[]>;
|
|
14
14
|
export declare const BOARD_TO_MOVING_POINT: WeakMap<PlaitBoard, Point>;
|
|
15
|
+
export declare const BOARD_TO_TEMPORARY_ELEMENTS: WeakMap<PlaitBoard, PlaitElement[]>;
|