@plait/draw 0.82.0-next.0 → 0.83.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.82.0-next.0",
3
+ "version": "0.83.0",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
@@ -1,7 +1,12 @@
1
1
  import { PlaitBoard } from '@plait/core';
2
- import { PlaitArrowLine } from '../interfaces';
2
+ import { PlaitArrowLine, PlaitGeometry } from '../../interfaces';
3
3
  export declare const WithArrowLineAutoCompletePluginKey = "plait-arrow-line-auto-complete-plugin-key";
4
4
  export interface ArrowLineAutoCompleteOptions {
5
5
  afterComplete: (element: PlaitArrowLine) => {};
6
6
  }
7
+ export type PreCommitRef = {
8
+ temporaryArrowLineElement: PlaitArrowLine;
9
+ temporaryShapeElement: PlaitGeometry;
10
+ };
11
+ export declare const BOARD_TO_PRE_COMMIT: WeakMap<PlaitBoard, PreCommitRef>;
7
12
  export declare const withArrowLineAutoComplete: (board: PlaitBoard) => PlaitBoard;
@@ -1,8 +1,13 @@
1
1
  import { PlaitBoard } from '@plait/core';
2
+ import { PlaitGeometry } from '../interfaces';
3
+ import { GeometryShapeGenerator } from '../generators/geometry-shape.generator';
4
+ import { DrawPointerType } from '../constants';
2
5
  import { TextManage } from '@plait/common';
6
+ import { TableGenerator } from '../generators/table.generator';
3
7
  export interface FakeCreateTextRef {
4
8
  g: SVGGElement;
5
9
  textManage: TextManage;
6
10
  }
11
+ export declare const getGeometryGeneratorByShape: (board: PlaitBoard, shape: DrawPointerType) => GeometryShapeGenerator | TableGenerator<PlaitGeometry>;
7
12
  export declare const withGeometryCreateByDrag: (board: PlaitBoard) => PlaitBoard;
8
13
  export declare const withGeometryCreateByDrawing: (board: PlaitBoard) => PlaitBoard;
package/public-api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from './interfaces';
2
2
  export * from './plugins/with-draw';
3
- export * from './plugins/with-arrow-line-auto-complete';
3
+ export * from './plugins/arrow-line/with-arrow-line-auto-complete';
4
4
  export * from './constants';
5
5
  export * from './utils';
6
6
  export * from './geometry.component';
@@ -10,4 +10,4 @@ export declare const getHitConnectorPoint: (point: Point, hitElement: PlaitShape
10
10
  export declare const getArrowLineTextRectangle: (board: PlaitBoard, element: PlaitArrowLine, index: number) => RectangleClient;
11
11
  export declare const getArrowLines: (board: PlaitBoard) => PlaitArrowLine[];
12
12
  export declare const Q2C: (points: Point[]) => Point[];
13
- export declare const handleArrowLineCreating: (board: PlaitBoard, lineShape: ArrowLineShape, sourcePoint: Point, movingPoint: Point, sourceElement: PlaitShapeElement | null, lineShapeG: SVGGElement) => PlaitArrowLine;
13
+ export declare const handleArrowLineCreating: (board: PlaitBoard, lineShape: ArrowLineShape, sourcePoint: Point, movingPoint: Point, sourceElement: PlaitShapeElement | null, lineShapeG: SVGGElement, options?: Pick<PlaitArrowLine, "strokeColor" | "strokeWidth">) => PlaitArrowLine;