@plait/common 0.91.1 → 0.92.0-next.1
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/index.d.ts +605 -3
- package/package.json +1 -1
- package/algorithms/a-star.d.ts +0 -10
- package/algorithms/data-structures/graph.d.ts +0 -14
- package/algorithms/data-structures/index.d.ts +0 -2
- package/algorithms/data-structures/priority-queue.d.ts +0 -16
- package/algorithms/index.d.ts +0 -2
- package/constants/default.d.ts +0 -10
- package/constants/index.d.ts +0 -4
- package/constants/media.d.ts +0 -6
- package/constants/property.d.ts +0 -5
- package/constants/resize.d.ts +0 -10
- package/core/element-flavour.d.ts +0 -5
- package/core/element-ref.d.ts +0 -13
- package/core/group.component.d.ts +0 -12
- package/core/index.d.ts +0 -4
- package/core/render-component.d.ts +0 -4
- package/generators/active.generator.d.ts +0 -22
- package/generators/generator.d.ts +0 -27
- package/generators/group.generator.d.ts +0 -7
- package/generators/index.d.ts +0 -3
- package/image/image-base.component.d.ts +0 -9
- package/image/image.generator.d.ts +0 -26
- package/image/index.d.ts +0 -3
- package/image/with-image.d.ts +0 -15
- package/plugins/index.d.ts +0 -2
- package/plugins/with-group.d.ts +0 -2
- package/plugins/with-resize.d.ts +0 -4
- package/public-api.d.ts +0 -12
- package/shapes/common.d.ts +0 -2
- package/shapes/index.d.ts +0 -1
- package/text/index.d.ts +0 -4
- package/text/text-manage.d.ts +0 -42
- package/text/text-measure.d.ts +0 -15
- package/text/types.d.ts +0 -28
- package/text/with-text.d.ts +0 -25
- package/transforms/align.d.ts +0 -20
- package/transforms/index.d.ts +0 -2
- package/transforms/property.d.ts +0 -14
- package/types/index.d.ts +0 -2
- package/types/resize.d.ts +0 -34
- package/types/rotate.d.ts +0 -6
- package/utils/animate.d.ts +0 -7
- package/utils/clipboard.d.ts +0 -10
- package/utils/creation-mode.d.ts +0 -9
- package/utils/default-orthogonal-routing.d.ts +0 -2
- package/utils/direction.d.ts +0 -25
- package/utils/drawing/index.d.ts +0 -2
- package/utils/drawing/resize-handle.d.ts +0 -4
- package/utils/drawing/rotate-handle.d.ts +0 -2
- package/utils/elbow-line-route.d.ts +0 -48
- package/utils/elements.d.ts +0 -4
- package/utils/hot-key.d.ts +0 -6
- package/utils/image.d.ts +0 -11
- package/utils/index.d.ts +0 -19
- package/utils/line-path.d.ts +0 -7
- package/utils/math.d.ts +0 -3
- package/utils/memorize.d.ts +0 -3
- package/utils/point-placement.d.ts +0 -5
- package/utils/resize.d.ts +0 -28
- package/utils/rotate.d.ts +0 -6
- package/utils/stroke.d.ts +0 -2
- package/utils/text.d.ts +0 -33
- package/utils/vector.d.ts +0 -6
package/utils/memorize.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { PlaitElement } from '@plait/core';
|
|
2
|
-
export declare const memorizeLatest: <T extends PlaitElement = PlaitElement>(memorizedKey: string, propertyKey: keyof T, propertyValue: T[keyof T]) => void;
|
|
3
|
-
export declare const getMemorizedLatest: <T extends PlaitElement = PlaitElement>(memorizedKey: string) => T;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Direction, Point } from '@plait/core';
|
|
2
|
-
export declare const moveXOfPoint: (point: Point, distance: number, direction?: Direction) => Point;
|
|
3
|
-
export declare const moveYOfPoint: (point: Point, distance: number, direction?: Direction) => Point;
|
|
4
|
-
export declare const getDirectionByIndex: (index: number) => Direction;
|
|
5
|
-
export declare const getXDistanceBetweenPoint: (point1: Point, point2: Point, isHorizontal: boolean) => number;
|
package/utils/resize.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { PlaitBoard, Point, RectangleClient, ResizeCursorClass, PlaitElement } from '@plait/core';
|
|
2
|
-
import { ResizeHandle } from '../constants/resize';
|
|
3
|
-
import { PlaitElementOrArray, ResizeRef } from '../types/resize';
|
|
4
|
-
export declare const getResizeHandleByIndex: (index: number) => ResizeHandle;
|
|
5
|
-
export declare const getIndexByResizeHandle: (resizeHandle: ResizeHandle) => number;
|
|
6
|
-
export declare const getSymmetricHandleIndex: (board: PlaitBoard, index: number) => number;
|
|
7
|
-
export declare const getRotatedResizeCursorClassByAngle: (cursor: ResizeCursorClass, angle: number) => ResizeCursorClass;
|
|
8
|
-
export declare const getRectangleResizeHandleRefs: (rectangle: RectangleClient, diameter: number) => {
|
|
9
|
-
rectangle: {
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
};
|
|
15
|
-
handle: ResizeHandle;
|
|
16
|
-
cursorClass: ResizeCursorClass;
|
|
17
|
-
}[];
|
|
18
|
-
export declare const getResizeHandlePointByIndex: (rectangle: RectangleClient, index: number) => Point;
|
|
19
|
-
export declare const IS_RESIZING: WeakMap<PlaitBoard, ResizeRef<any, any, any>>;
|
|
20
|
-
export declare const isResizing: (board: PlaitBoard) => boolean;
|
|
21
|
-
export declare const isResizingByCondition: <T extends PlaitElementOrArray, K>(board: PlaitBoard, match: (resizeRef: ResizeRef<T, K>) => boolean) => boolean;
|
|
22
|
-
export declare const addResizing: <T extends PlaitElementOrArray, K, P>(board: PlaitBoard, resizeRef: ResizeRef<T, K, P>, key: string) => void;
|
|
23
|
-
export declare const removeResizing: (board: PlaitBoard, key: string) => void;
|
|
24
|
-
export declare const isEdgeHandle: (board: PlaitBoard, handle: ResizeHandle) => boolean;
|
|
25
|
-
export declare const isCornerHandle: (board: PlaitBoard, handle: ResizeHandle) => boolean;
|
|
26
|
-
export declare const resetPointsAfterResize: (originRectangle: RectangleClient, currentRectangle: RectangleClient, originSelectionCenterPoint: Point, currentSelectionCenterPoint: Point, angle: number) => [Point, Point];
|
|
27
|
-
export declare const hasMoreThanOnePoint: (element: PlaitElement) => boolean;
|
|
28
|
-
export declare const hasResizeHandle: (board: PlaitBoard, element: PlaitElement) => boolean;
|
package/utils/rotate.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PlaitBoard } from '@plait/core';
|
|
2
|
-
import { RotateRef } from '../types';
|
|
3
|
-
export declare const IS_ROTATING: WeakMap<PlaitBoard, RotateRef<import("@plait/core").PlaitElement>>;
|
|
4
|
-
export declare const isRotating: (board: PlaitBoard) => boolean;
|
|
5
|
-
export declare const addRotating: (board: PlaitBoard, rotateRef: RotateRef) => void;
|
|
6
|
-
export declare const removeRotating: (board: PlaitBoard) => void;
|
package/utils/stroke.d.ts
DELETED
package/utils/text.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { PlaitBoard, PlaitElement } from '@plait/core';
|
|
2
|
-
import { Editor, Element } from 'slate';
|
|
3
|
-
import { TextManage } from '../text/text-manage';
|
|
4
|
-
import { Alignment, CustomText } from '../text/types';
|
|
5
|
-
export interface TextInterface {
|
|
6
|
-
getTextEditors: (board: PlaitBoard, elements?: PlaitElement[]) => Editor[] | undefined;
|
|
7
|
-
findFirstTextEditor: (board: PlaitBoard) => null;
|
|
8
|
-
getFirstTextEditor: (element: PlaitElement) => Editor;
|
|
9
|
-
getTextEditorsByElement: (element: PlaitElement) => Editor[];
|
|
10
|
-
getEditingTextEditor: (board: PlaitBoard, elements?: PlaitElement[]) => Editor | undefined;
|
|
11
|
-
}
|
|
12
|
-
export declare const getTextManages: (element: PlaitElement) => TextManage[];
|
|
13
|
-
export declare const getFirstTextManage: (element: PlaitElement) => TextManage;
|
|
14
|
-
export declare const getTextEditorsByElement: TextInterface['getTextEditorsByElement'];
|
|
15
|
-
export declare const getFirstTextEditor: TextInterface['getFirstTextEditor'];
|
|
16
|
-
export declare const findFirstTextEditor: TextInterface['findFirstTextEditor'];
|
|
17
|
-
export declare const getElementsText: (elements: PlaitElement[]) => string;
|
|
18
|
-
export declare const getTextEditors: TextInterface['getTextEditors'];
|
|
19
|
-
export declare const getEditingTextEditor: TextInterface['getEditingTextEditor'];
|
|
20
|
-
export declare const buildText: (text: string | Element, align?: Alignment, properties?: Partial<CustomText>) => import("slate").BaseElement | {
|
|
21
|
-
children: {
|
|
22
|
-
bold?: boolean | undefined;
|
|
23
|
-
italic?: boolean | undefined;
|
|
24
|
-
strike?: boolean | undefined;
|
|
25
|
-
code?: boolean | undefined;
|
|
26
|
-
text: string;
|
|
27
|
-
underlined?: boolean | undefined;
|
|
28
|
-
color?: string | undefined;
|
|
29
|
-
"font-size"?: string | undefined;
|
|
30
|
-
}[];
|
|
31
|
-
type: string;
|
|
32
|
-
};
|
|
33
|
-
export declare const getLineHeightByFontSize: (fontSize: number) => number;
|
package/utils/vector.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Point, Vector } from '@plait/core';
|
|
2
|
-
export declare function getUnitVectorByPointAndPoint(point1: Point, point2: Point): Point;
|
|
3
|
-
export declare function getPointByVectorComponent(point: Point, vector: Vector, component: number): Point;
|
|
4
|
-
export declare function getPointByVectorDirectionComponent(point: Point, unitVector: Vector, directionComponent: number, isHorizontal: boolean): Point;
|
|
5
|
-
export declare function rotateVectorAnti90(vector: Vector): Vector;
|
|
6
|
-
export declare function rotateVector(vector: Vector, angle: number): Vector;
|