@plait/draw 0.64.9 → 0.65.0-next.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.64.9",
3
+ "version": "0.65.0-next.0",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
@@ -1,9 +1,9 @@
1
1
  export declare const DrawTransforms: {
2
- setText: (board: import("@plait/core").PlaitBoard, element: import("@plait/draw").PlaitGeometry, text: import("slate").BaseElement, width: number, textHeight: number) => void;
2
+ setText: (board: import("@plait/core").PlaitBoard, element: import("@plait/draw").PlaitGeometry, text: import("slate").Element, width: number, textHeight: number) => void;
3
3
  setDrawShapeText: (board: import("@plait/core").PlaitBoard, element: import("@plait/draw").PlaitMultipleTextGeometry, text: import("@plait/draw").PlaitDrawShapeText) => void;
4
4
  insertGeometry: (board: import("@plait/core").PlaitBoard, points: [import("@plait/core").Point, import("@plait/core").Point], shape: import("@plait/draw").GeometryShapes) => import("@plait/draw").PlaitCommonGeometry;
5
5
  resizeGeometry: (board: import("@plait/core").PlaitBoard, points: [import("@plait/core").Point, import("@plait/core").Point], textHeight: number, path: import("@plait/core").Path) => void;
6
- insertText: (board: import("@plait/core").PlaitBoard, point: import("@plait/core").Point, text: string | import("slate").BaseElement) => void;
6
+ insertText: (board: import("@plait/core").PlaitBoard, point: import("@plait/core").Point, text: string | import("slate").Element) => void;
7
7
  setTextSize: (board: import("@plait/core").PlaitBoard, element: import("@plait/draw").PlaitGeometry, textWidth: number, textHeight: number) => void;
8
8
  resizeArrowLine: (board: import("@plait/core").PlaitBoard, options: Partial<import("@plait/draw").PlaitArrowLine>, path: import("@plait/core").Path) => void;
9
9
  setArrowLineTexts: (board: import("@plait/core").PlaitBoard, element: import("@plait/draw").PlaitArrowLine, texts: import("@plait/draw").ArrowLineText[]) => void;
@@ -11,10 +11,10 @@ export declare const DrawTransforms: {
11
11
  setArrowLineMark: (board: import("@plait/core").PlaitBoard, handleKey: import("@plait/draw").ArrowLineHandleKey, marker: import("@plait/draw").ArrowLineMarkerType) => void;
12
12
  setArrowLineShape: (board: import("@plait/core").PlaitBoard, newProperties: Partial<import("@plait/draw").PlaitArrowLine>) => void;
13
13
  setVectorLineShape: (board: import("@plait/core").PlaitBoard, newProperties: Partial<import("@plait/draw").PlaitVectorLine>) => void;
14
- insertImage: (board: import("@plait/core").PlaitBoard, imageItem: import("@plait/common").CommonImageItem, startPoint?: import("@plait/core").Point | undefined) => void;
14
+ insertImage: (board: import("@plait/core").PlaitBoard, imageItem: import("@plait/common").CommonImageItem, startPoint?: import("@plait/core").Point) => void;
15
15
  connectArrowLineToDraw: (board: import("@plait/core").PlaitBoard, lineElement: import("@plait/draw").PlaitArrowLine, handle: import("@plait/draw").ArrowLineHandleKey, geometryElement: import("@plait/draw").PlaitShapeElement) => void;
16
16
  switchGeometryShape: (board: import("@plait/core").PlaitBoard, shape: import("@plait/draw").GeometryShapes) => void;
17
- setTableText: (board: import("@plait/core").PlaitBoard, path: import("@plait/core").Path, cellId: string, text: import("slate").BaseElement, textHeight: number) => void;
17
+ setTableText: (board: import("@plait/core").PlaitBoard, path: import("@plait/core").Path, cellId: string, text: import("slate").Element, textHeight: number) => void;
18
18
  addSwimlaneRow: (board: import("@plait/core").PlaitBoard, swimlane: import("@plait/draw").PlaitSwimlane, index: number, count?: number) => void;
19
19
  addSwimlaneColumn: (board: import("@plait/core").PlaitBoard, swimlane: import("@plait/draw").PlaitSwimlane, index: number, count?: number) => void;
20
20
  removeSwimlaneRow: (board: import("@plait/core").PlaitBoard, swimlane: import("@plait/draw").PlaitSwimlane, index: number, count?: number) => void;
@@ -1,6 +1,6 @@
1
1
  import { Point, PlaitBoard, RectangleClient } from '@plait/core';
2
2
  import { ArrowLineHandle, ArrowLineShape, ArrowLineText, PlaitArrowLine, PlaitShapeElement } from '../../interfaces';
3
- export declare const createArrowLineElement: (shape: ArrowLineShape, points: [Point, Point], source: ArrowLineHandle, target: ArrowLineHandle, texts?: ArrowLineText[], options?: Pick<PlaitArrowLine, 'strokeColor' | 'strokeWidth'>) => PlaitArrowLine;
3
+ export declare const createArrowLineElement: (shape: ArrowLineShape, points: [Point, Point], source: ArrowLineHandle, target: ArrowLineHandle, texts?: ArrowLineText[], options?: Pick<PlaitArrowLine, "strokeColor" | "strokeWidth">) => PlaitArrowLine;
4
4
  export declare const getArrowLinePoints: (board: PlaitBoard, element: PlaitArrowLine) => Point[];
5
5
  export declare const getCurvePoints: (board: PlaitBoard, element: PlaitArrowLine) => Point[];
6
6
  export declare const drawArrowLine: (board: PlaitBoard, element: PlaitArrowLine) => SVGGElement;
package/utils/hit.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare const isHitElementText: (element: PlaitCommonGeometry, point: Poi
10
10
  export declare const isRectangleHitDrawElement: (board: PlaitBoard, element: PlaitElement, selection: Selection) => boolean | null;
11
11
  export declare const getDrawHitElement: (board: PlaitBoard, elements: PlaitDrawElement[]) => PlaitElement;
12
12
  export declare const getFirstFilledDrawElement: (board: PlaitBoard, elements: PlaitDrawElement[]) => PlaitGeometry | null;
13
- export declare const getFirstTextOrLineElement: (elements: PlaitDrawElement[]) => PlaitGeometry | import("../interfaces").PlaitBaseTable | PlaitArrowLine | PlaitVectorLine | import("../interfaces/image").PlaitImage | null;
13
+ export declare const getFirstTextOrLineElement: (elements: PlaitDrawElement[]) => PlaitArrowLine | import("../interfaces").PlaitText | null;
14
14
  export declare const isHitDrawElement: (board: PlaitBoard, element: PlaitElement, point: Point) => boolean | null;
15
15
  export declare const isHitEdgeOfShape: (board: PlaitBoard, element: PlaitShapeElement, point: Point, hitDistanceBuffer: number) => boolean;
16
16
  export declare const isInsideOfShape: (board: PlaitBoard, element: PlaitShapeElement, point: Point, hitDistanceBuffer: number) => boolean;
@@ -6,22 +6,22 @@ export declare const getMemorizeKey: (element: PlaitElement) => string;
6
6
  export declare const getLineMemorizedLatest: () => {
7
7
  [x: string]: any;
8
8
  id: string;
9
- children?: PlaitElement[] | undefined;
10
- points?: import("@plait/core").Point[] | undefined;
11
- type?: string | undefined;
12
- groupId?: string | undefined;
13
- angle?: number | undefined;
9
+ children?: PlaitElement[];
10
+ points?: import("@plait/core").Point[];
11
+ type?: string;
12
+ groupId?: string;
13
+ angle?: number;
14
14
  };
15
15
  export declare const getMemorizedLatestByPointer: (pointer: DrawPointerType) => {
16
16
  textProperties: any;
17
17
  geometryProperties: {
18
18
  [x: string]: any;
19
19
  id: string;
20
- children?: PlaitElement[] | undefined;
21
- points?: import("@plait/core").Point[] | undefined;
22
- type?: string | undefined;
23
- groupId?: string | undefined;
24
- angle?: number | undefined;
20
+ children?: PlaitElement[];
21
+ points?: import("@plait/core").Point[];
22
+ type?: string;
23
+ groupId?: string;
24
+ angle?: number;
25
25
  };
26
26
  };
27
27
  export declare const memorizeLatestText: <T extends PlaitElement = PlaitDrawElement>(element: T, operations: BaseOperation[]) => void;
@@ -4,25 +4,25 @@ export declare function buildSwimlaneTable(element: PlaitSwimlane): {
4
4
  [x: string]: any;
5
5
  type: "swimlane";
6
6
  shape: SwimlaneSymbols;
7
- header?: boolean | undefined;
7
+ header?: boolean;
8
8
  id: string;
9
9
  points: Point[];
10
10
  rows: {
11
11
  id: string;
12
- height?: number | undefined;
12
+ height?: number;
13
13
  }[];
14
14
  columns: {
15
15
  id: string;
16
- width?: number | undefined;
16
+ width?: number;
17
17
  }[];
18
18
  cells: PlaitTableCell[];
19
- groupId?: string | undefined;
20
- children?: import("@plait/core").PlaitElement[] | undefined;
21
- angle?: number | undefined;
19
+ groupId?: string;
20
+ children?: import("@plait/core").PlaitElement[];
21
+ angle?: number;
22
22
  };
23
23
  export declare const getDefaultSwimlanePoints: (pointer: SwimlaneDrawSymbols, centerPoint: Point) => [Point, Point];
24
24
  export declare const createDefaultSwimlane: (shape: SwimlaneDrawSymbols, points: [Point, Point]) => PlaitSwimlane;
25
- export declare const createDefaultRowsOrColumns: (shape: SwimlaneSymbols, type: 'row' | 'column', header: boolean, size: number) => {
25
+ export declare const createDefaultRowsOrColumns: (shape: SwimlaneSymbols, type: "row" | "column", header: boolean, size: number) => {
26
26
  id: string;
27
27
  }[];
28
28
  export declare const createDefaultCells: (shape: SwimlaneSymbols, rows: {
package/utils/table.d.ts CHANGED
@@ -9,14 +9,14 @@ export declare function getTextManageByCell(board: PlaitBoard, cell: PlaitTableC
9
9
  export declare const updateColumns: (table: PlaitBaseTable, columnId: string, width: number, offset: number) => {
10
10
  columns: {
11
11
  id: string;
12
- width?: number | undefined;
12
+ width?: number;
13
13
  }[];
14
14
  points: Point[];
15
15
  };
16
16
  export declare const updateRows: (table: PlaitBaseTable, rowId: string, height: number, offset: number) => {
17
17
  rows: {
18
18
  id: string;
19
- height?: number | undefined;
19
+ height?: number;
20
20
  }[];
21
21
  points: Point[];
22
22
  };
@@ -2,6 +2,6 @@ import { PlaitBoard, Point } from '@plait/core';
2
2
  import { PlaitVectorLine, VectorLineShape } from '../interfaces';
3
3
  export declare const isClosedVectorLine: (vectorLine: PlaitVectorLine) => boolean;
4
4
  export declare const getVectorLinePoints: (board: PlaitBoard, element: PlaitVectorLine) => Point[] | null;
5
- export declare const createVectorLineElement: (shape: VectorLineShape, points: Point[], options?: Pick<PlaitVectorLine, 'strokeColor' | 'strokeWidth' | 'fill'>) => PlaitVectorLine;
5
+ export declare const createVectorLineElement: (shape: VectorLineShape, points: Point[], options?: Pick<PlaitVectorLine, "strokeColor" | "strokeWidth" | "fill">) => PlaitVectorLine;
6
6
  export declare const vectorLineCreating: (board: PlaitBoard, lineShape: VectorLineShape, points: Point[], movingPoint: Point, lineShapeG: SVGGElement) => PlaitVectorLine;
7
7
  export declare const drawVectorLine: (board: PlaitBoard, element: PlaitVectorLine) => SVGGElement;