@plait/draw 0.30.0 → 0.32.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/draw",
3
- "version": "0.30.0",
3
+ "version": "0.32.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.0.0",
6
6
  "@angular/core": "^16.0.0",
@@ -1,4 +1,4 @@
1
1
  import { PlaitBoard, Point } from '@plait/core';
2
2
  import { PlaitDrawElement, PlaitGeometry, PlaitLine } from '../interfaces';
3
- export declare const buildClipboardData: (board: PlaitBoard, elements: PlaitDrawElement[], startPoint: Point) => (PlaitGeometry | PlaitLine)[];
3
+ export declare const buildClipboardData: (board: PlaitBoard, elements: PlaitDrawElement[], startPoint: Point) => (PlaitLine | PlaitGeometry)[];
4
4
  export declare const insertClipboardData: (board: PlaitBoard, elements: PlaitDrawElement[], startPoint: Point) => void;
@@ -34,4 +34,4 @@ export declare const getDefaultFlowchartProperty: (symbol: FlowchartSymbols) =>
34
34
  width: number;
35
35
  height: number;
36
36
  };
37
- export declare const createDefaultFlowchart: (point: Point) => (PlaitGeometry | import("../interfaces").PlaitLine)[];
37
+ export declare const createDefaultFlowchart: (point: Point) => (import("../interfaces").PlaitLine | PlaitGeometry)[];
package/utils/hit.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  import { PlaitElement, Selection, PlaitBoard, Point } from '@plait/core';
2
+ import { PlaitGeometry } from '../interfaces';
3
+ export declare const isTextExceedingBounds: (geometry: PlaitGeometry) => boolean;
2
4
  export declare const isRectangleHitDrawElement: (board: PlaitBoard, element: PlaitElement, selection: Selection) => boolean | null;
3
5
  export declare const isHitDrawElement: (board: PlaitBoard, element: PlaitElement, point: Point) => boolean | null;
package/utils/line.d.ts CHANGED
@@ -19,6 +19,5 @@ export declare const transformPointToConnection: (board: PlaitBoard, point: Poin
19
19
  export declare const getHitConnectorPoint: (movingPoint: Point, hitElement: PlaitGeometry, rectangle: RectangleClient) => Point | undefined;
20
20
  export declare const getLineTextRectangle: (board: PlaitBoard, element: PlaitLine, index: number) => RectangleClient;
21
21
  export declare const getBoardLines: (board: PlaitBoard) => PlaitLine[];
22
- export declare const getExtendPoint: (source: Point, target: Point, extendDistance: number) => Point;
23
22
  export declare const Q2C: (points: Point[]) => Point[];
24
23
  export declare const getVectorByConnection: (boundElement: PlaitGeometry, connection: PointOfRectangle) => Vector;
@@ -1,5 +1,6 @@
1
1
  import { PlaitBoard, Point } from '@plait/core';
2
2
  import { PlaitGeometry } from '../../interfaces';
3
+ import { ResizeHandle } from '@plait/common';
3
4
  import { PlaitImage } from '../../interfaces/image';
4
5
  export declare const getHitGeometryResizeHandleRef: (board: PlaitBoard, element: PlaitGeometry | PlaitImage, point: Point) => {
5
6
  rectangle: {
@@ -8,7 +9,7 @@ export declare const getHitGeometryResizeHandleRef: (board: PlaitBoard, element:
8
9
  width: number;
9
10
  height: number;
10
11
  };
11
- handle: import("@plait/common").ResizeHandle;
12
+ handle: ResizeHandle;
12
13
  cursorClass: import("@plait/common").ResizeCursorClass;
13
14
  } | undefined;
14
15
  export declare const getHitOutlineGeometry: (board: PlaitBoard, point: Point, offset?: number) => PlaitGeometry | null;