@plait/core 0.62.0-next.9 → 0.62.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.
@@ -12,7 +12,6 @@ export * from './point';
12
12
  export * from './selection';
13
13
  export * from './viewport';
14
14
  export * from './history';
15
- export * from './plugin-key';
16
15
  export * from './theme';
17
16
  export * from './direction';
18
17
  export * from './group';
@@ -1,2 +1,13 @@
1
1
  import { PlaitBoard } from './board';
2
2
  export type PlaitPlugin = (board: PlaitBoard) => PlaitBoard;
3
+ export interface WithPluginOptions {
4
+ disabled?: boolean;
5
+ }
6
+ export interface WithSelectionPluginOptions extends WithPluginOptions {
7
+ isMultipleSelection: boolean;
8
+ isDisabledSelection: boolean;
9
+ isPreventClearSelection: boolean;
10
+ }
11
+ export declare enum PlaitPluginKey {
12
+ 'withSelection' = "withSelection"
13
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@plait/core",
3
- "version": "0.62.0-next.9",
3
+ "version": "0.62.0",
4
4
  "peerDependencies": {
5
5
  "immer": "^10.0.3",
6
6
  "is-hotkey": "^0.2.0",
7
- "rxjs": "~7.8.0",
7
+ "rxjs": "^7.8.0",
8
8
  "roughjs": "^4.5.2",
9
9
  "points-on-curve": "^1.0.0"
10
10
  },
@@ -1,9 +1,7 @@
1
1
  import { PlaitBoard } from '../interfaces/board';
2
- export interface PlaitPluginOptions {
3
- disabled?: boolean;
4
- }
2
+ import { WithPluginOptions } from '../interfaces/plugin';
5
3
  export interface PlaitOptionsBoard extends PlaitBoard {
6
- getPluginOptions: <K = PlaitPluginOptions>(key: string) => K;
7
- setPluginOptions: <K = PlaitPluginOptions>(key: string, value: Partial<K>) => void;
4
+ getPluginOptions: <K = WithPluginOptions>(key: string) => K;
5
+ setPluginOptions: <K = WithPluginOptions>(key: string, value: Partial<K>) => void;
8
6
  }
9
7
  export declare const withOptions: (board: PlaitBoard) => PlaitOptionsBoard;
@@ -1,7 +1,2 @@
1
1
  import { PlaitBoard } from '../interfaces/board';
2
- import { PlaitPluginOptions } from './with-options';
3
- export interface WithPluginOptions extends PlaitPluginOptions {
4
- isMultiple: boolean;
5
- isDisabledSelect: boolean;
6
- }
7
2
  export declare function withSelection(board: PlaitBoard): PlaitBoard;
@@ -1,4 +1,4 @@
1
- import { PlaitBoard, PlaitElement, PlaitGroup } from '../interfaces';
1
+ import { PlaitBoard, PlaitElement, PlaitGroup, WithSelectionPluginOptions } from '../interfaces';
2
2
  export declare function isSelectionMoving(board: PlaitBoard): boolean;
3
3
  export declare function setSelectionMoving(board: PlaitBoard): void;
4
4
  export declare function clearSelectionMoving(board: PlaitBoard): void;
@@ -14,3 +14,5 @@ export declare function drawEntireActiveRectangleG(board: PlaitBoard): SVGGEleme
14
14
  export declare function setSelectedElementsWithGroup(board: PlaitBoard, elements: PlaitElement[], isShift: boolean): void;
15
15
  export declare function cacheSelectedElementsWithGroupOnShift(board: PlaitBoard, elements: PlaitElement[], isSelectGroupElement: boolean, elementsInHighestGroup: PlaitElement[]): void;
16
16
  export declare function cacheSelectedElementsWithGroup(board: PlaitBoard, elements: PlaitElement[], isSelectGroupElement: boolean, hitElementGroups: PlaitGroup[]): void;
17
+ export declare const getSelectionOptions: (board: PlaitBoard) => WithSelectionPluginOptions;
18
+ export declare const setSelectionOptions: (board: PlaitBoard, options: Partial<WithSelectionPluginOptions>) => void;
@@ -1,5 +0,0 @@
1
- export var PlaitPluginKey;
2
- (function (PlaitPluginKey) {
3
- PlaitPluginKey["withSelection"] = "withSelection";
4
- })(PlaitPluginKey || (PlaitPluginKey = {}));
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGx1Z2luLWtleS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvc3JjL2ludGVyZmFjZXMvcGx1Z2luLWtleS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxjQUVYO0FBRkQsV0FBWSxjQUFjO0lBQ3RCLGlEQUFpQyxDQUFBO0FBQ3JDLENBQUMsRUFGVyxjQUFjLEtBQWQsY0FBYyxRQUV6QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIFBsYWl0UGx1Z2luS2V5IHtcbiAgICAnd2l0aFNlbGVjdGlvbicgPSAnd2l0aFNlbGVjdGlvbidcbn1cbiJdfQ==
@@ -1,3 +0,0 @@
1
- export declare enum PlaitPluginKey {
2
- 'withSelection' = "withSelection"
3
- }