@plait/common 0.64.9 → 0.65.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/common",
3
- "version": "0.64.9",
3
+ "version": "0.65.0",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
@@ -4,11 +4,11 @@ export interface SetOptions<T extends PlaitElement = PlaitElement> {
4
4
  getMemorizeKey?: (element: T) => string;
5
5
  match?: (element: T) => boolean;
6
6
  }
7
- export declare const setProperty: <T extends PlaitElement = PlaitElement>(board: PlaitBoard, properties: Partial<T>, options?: SetOptions<T> | undefined) => void;
7
+ export declare const setProperty: <T extends PlaitElement = PlaitElement>(board: PlaitBoard, properties: Partial<T>, options?: SetOptions<T>) => void;
8
8
  export declare const PropertyTransforms: {
9
9
  setFillColor: (board: PlaitBoard, fill: string, options: SetOptions) => void;
10
10
  setStrokeStyle: (board: PlaitBoard, strokeStyle: string, options: SetOptions) => void;
11
- setProperty: <T extends PlaitElement = PlaitElement>(board: PlaitBoard, properties: Partial<T>, options?: SetOptions<T> | undefined) => void;
11
+ setProperty: <T extends PlaitElement = PlaitElement>(board: PlaitBoard, properties: Partial<T>, options?: SetOptions<T>) => void;
12
12
  setStrokeWidth: (board: PlaitBoard, strokeWidth: number, options: SetOptions) => void;
13
13
  setStrokeColor: (board: PlaitBoard, strokeColor: string, options: SetOptions) => void;
14
14
  };
@@ -1,4 +1,4 @@
1
1
  import { PlaitBoard, PlaitElement } from '@plait/core';
2
2
  export declare const getElementArea: (board: PlaitBoard, element: PlaitElement) => number;
3
- export declare const sortElementsByArea: (board: PlaitBoard, elements: PlaitElement[], direction?: 'desc' | 'asc') => PlaitElement[];
3
+ export declare const sortElementsByArea: (board: PlaitBoard, elements: PlaitElement[], direction?: "desc" | "asc") => PlaitElement[];
4
4
  export declare const isFilled: (fill: string) => boolean | "";
package/utils/resize.d.ts CHANGED
@@ -18,7 +18,7 @@ export declare const getRectangleResizeHandleRefs: (rectangle: RectangleClient,
18
18
  export declare const getResizeHandlePointByIndex: (rectangle: RectangleClient, index: number) => Point;
19
19
  export declare const IS_RESIZING: WeakMap<PlaitBoard, ResizeRef<any, any, any>>;
20
20
  export declare const isResizing: (board: PlaitBoard) => boolean;
21
- export declare const isResizingByCondition: <T extends PlaitElementOrArray, K>(board: PlaitBoard, match: (resizeRef: ResizeRef<T, K, import("../types/resize").ResizeOptions>) => boolean) => boolean;
21
+ export declare const isResizingByCondition: <T extends PlaitElementOrArray, K>(board: PlaitBoard, match: (resizeRef: ResizeRef<T, K>) => boolean) => boolean;
22
22
  export declare const addResizing: <T extends PlaitElementOrArray, K, P>(board: PlaitBoard, resizeRef: ResizeRef<T, K, P>, key: string) => void;
23
23
  export declare const removeResizing: (board: PlaitBoard, key: string) => void;
24
24
  export declare const isEdgeHandle: (board: PlaitBoard, handle: ResizeHandle) => boolean;