@zsviczian/excalidraw 0.18.0-22 → 0.18.0-24
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/dist/excalidraw.development.js +23 -23
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/common/src/constants.d.ts +1 -1
- package/types/common/src/points.d.ts +1 -1
- package/types/common/src/utils.d.ts +2 -2
- package/types/element/src/Scene.d.ts +1 -1
- package/types/element/src/binding.d.ts +4 -0
- package/types/element/src/bounds.d.ts +3 -1
- package/types/element/src/elbowArrow.d.ts +1 -1
- package/types/element/src/frame.d.ts +2 -2
- package/types/element/src/heading.d.ts +2 -2
- package/types/element/src/linearElementEditor.d.ts +1 -4
- package/types/element/src/resizeTest.d.ts +2 -2
- package/types/element/src/selection.d.ts +1 -1
- package/types/element/src/shape.d.ts +2 -2
- package/types/element/src/store.d.ts +1 -1
- package/types/element/src/transformHandles.d.ts +4 -4
- package/types/element/src/utils.d.ts +11 -5
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -6
- package/types/excalidraw/actions/actionAlign.d.ts +8 -8
- package/types/excalidraw/actions/actionBoundText.d.ts +4 -4
- package/types/excalidraw/actions/actionCanvas.d.ts +137 -137
- package/types/excalidraw/actions/actionClipboard.d.ts +17 -17
- package/types/excalidraw/actions/actionCropEditor.d.ts +2 -2
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +9 -9
- package/types/excalidraw/actions/actionDistribute.d.ts +4 -4
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/types/excalidraw/actions/actionElementLink.d.ts +2 -2
- package/types/excalidraw/actions/actionElementLock.d.ts +6 -6
- package/types/excalidraw/actions/actionEmbeddable.d.ts +2 -2
- package/types/excalidraw/actions/actionExport.d.ts +121 -121
- package/types/excalidraw/actions/actionFinalize.d.ts +8 -8
- package/types/excalidraw/actions/actionFlip.d.ts +4 -4
- package/types/excalidraw/actions/actionFrame.d.ts +61 -61
- package/types/excalidraw/actions/actionGroup.d.ts +10 -10
- package/types/excalidraw/actions/actionLinearEditor.d.ts +53 -53
- package/types/excalidraw/actions/actionLink.d.ts +3 -3
- package/types/excalidraw/actions/actionMenu.d.ts +8 -8
- package/types/excalidraw/actions/actionNavigate.d.ts +4 -4
- package/types/excalidraw/actions/actionProperties.d.ts +33 -33
- package/types/excalidraw/actions/actionSelectAll.d.ts +5 -5
- package/types/excalidraw/actions/actionStyles.d.ts +6 -6
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleStats.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
- package/types/excalidraw/actions/actionZindex.d.ts +8 -8
- package/types/excalidraw/appState.d.ts +21 -21
- package/types/excalidraw/components/App.d.ts +8 -4
- package/types/excalidraw/components/Stats/DragInput.d.ts +11 -1
- package/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/types/excalidraw/components/shapes.d.ts +1 -1
- package/types/excalidraw/data/blob.d.ts +1 -1
- package/types/excalidraw/data/library.d.ts +1 -1
- package/types/math/src/angle.d.ts +1 -1
- package/types/math/src/curve.d.ts +1 -1
- package/types/math/src/ellipse.d.ts +3 -3
- package/types/math/src/point.d.ts +2 -2
- package/types/math/src/polygon.d.ts +2 -2
- package/types/math/src/rectangle.d.ts +2 -0
- package/types/math/src/segment.d.ts +5 -5
- package/types/math/src/utils.d.ts +0 -2
- package/types/utils/src/shape.d.ts +12 -12
- package/types/excalidraw/visualdebug.d.ts +0 -41
|
@@ -30,13 +30,13 @@ export type GeometricShape<Point extends GlobalPoint | LocalPoint> = {
|
|
|
30
30
|
data: Polycurve<Point>;
|
|
31
31
|
};
|
|
32
32
|
type RectangularElement = ExcalidrawRectangleElement | ExcalidrawDiamondElement | ExcalidrawFrameLikeElement | ExcalidrawEmbeddableElement | ExcalidrawImageElement | ExcalidrawIframeElement | ExcalidrawTextElement | ExcalidrawSelectionElement;
|
|
33
|
-
export declare const getPolygonShape: <Point extends
|
|
34
|
-
export declare const getSelectionBoxShape: <Point extends
|
|
35
|
-
export declare const getEllipseShape: <Point extends
|
|
33
|
+
export declare const getPolygonShape: <Point extends GlobalPoint | LocalPoint>(element: RectangularElement) => GeometricShape<Point>;
|
|
34
|
+
export declare const getSelectionBoxShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap, padding?: number) => GeometricShape<Point>;
|
|
35
|
+
export declare const getEllipseShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawEllipseElement) => GeometricShape<Point>;
|
|
36
36
|
export declare const getCurvePathOps: (shape: Drawable) => Op[];
|
|
37
|
-
export declare const getCurveShape: <Point extends
|
|
38
|
-
export declare const getFreedrawShape: <Point extends
|
|
39
|
-
export declare const getClosedCurveShape: <Point extends
|
|
37
|
+
export declare const getCurveShape: <Point extends GlobalPoint | LocalPoint>(roughShape: Drawable, startingPoint: Point | undefined, angleInRadian: Radians, center: Point) => GeometricShape<Point>;
|
|
38
|
+
export declare const getFreedrawShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawFreeDrawElement, center: Point, isClosed?: boolean) => GeometricShape<Point>;
|
|
39
|
+
export declare const getClosedCurveShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawLinearElement, roughShape: Drawable, startingPoint: Point | undefined, angleInRadian: Radians, center: Point) => GeometricShape<Point>;
|
|
40
40
|
/**
|
|
41
41
|
* Determine intersection of a rectangular shaped element and a
|
|
42
42
|
* line segment.
|
|
@@ -46,13 +46,13 @@ export declare const getClosedCurveShape: <Point extends LocalPoint | GlobalPoin
|
|
|
46
46
|
* @param gap Optional value to inflate the shape before testing
|
|
47
47
|
* @returns An array of intersections
|
|
48
48
|
*/
|
|
49
|
-
export declare const segmentIntersectRectangleElement: <Point extends
|
|
50
|
-
export declare const pointOnEllipse: <Point extends
|
|
51
|
-
export declare const pointInEllipse: <Point extends
|
|
52
|
-
export declare const ellipseAxes: <Point extends
|
|
49
|
+
export declare const segmentIntersectRectangleElement: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawBindableElement, segment: LineSegment<Point>, gap?: number) => Point[];
|
|
50
|
+
export declare const pointOnEllipse: <Point extends GlobalPoint | LocalPoint>(point: Point, ellipse: Ellipse<Point>, threshold?: number) => boolean;
|
|
51
|
+
export declare const pointInEllipse: <Point extends GlobalPoint | LocalPoint>(p: Point, ellipse: Ellipse<Point>) => boolean;
|
|
52
|
+
export declare const ellipseAxes: <Point extends GlobalPoint | LocalPoint>(ellipse: Ellipse<Point>) => {
|
|
53
53
|
majorAxis: number;
|
|
54
54
|
minorAxis: number;
|
|
55
55
|
};
|
|
56
|
-
export declare const ellipseFocusToCenter: <Point extends
|
|
57
|
-
export declare const ellipseExtremes: <Point extends
|
|
56
|
+
export declare const ellipseFocusToCenter: <Point extends GlobalPoint | LocalPoint>(ellipse: Ellipse<Point>) => number;
|
|
57
|
+
export declare const ellipseExtremes: <Point extends GlobalPoint | LocalPoint>(ellipse: Ellipse<Point>) => import("@excalidraw/math").Vector[];
|
|
58
58
|
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
|
-
import type { Curve } from "@excalidraw/math";
|
|
3
|
-
import type { LineSegment } from "@excalidraw/utils";
|
|
4
|
-
import type { Bounds } from "@excalidraw/element";
|
|
5
|
-
declare global {
|
|
6
|
-
interface Window {
|
|
7
|
-
visualDebug?: {
|
|
8
|
-
data: DebugElement[][];
|
|
9
|
-
currentFrame?: number;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export type DebugElement = {
|
|
14
|
-
color: string;
|
|
15
|
-
data: LineSegment<GlobalPoint> | Curve<GlobalPoint>;
|
|
16
|
-
permanent: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare const debugDrawCubicBezier: (c: Curve<GlobalPoint>, opts?: {
|
|
19
|
-
color?: string;
|
|
20
|
-
permanent?: boolean;
|
|
21
|
-
}) => void;
|
|
22
|
-
export declare const debugDrawLine: (segment: LineSegment<GlobalPoint> | LineSegment<GlobalPoint>[], opts?: {
|
|
23
|
-
color?: string;
|
|
24
|
-
permanent?: boolean;
|
|
25
|
-
}) => void;
|
|
26
|
-
export declare const debugDrawPoint: (p: GlobalPoint, opts?: {
|
|
27
|
-
color?: string;
|
|
28
|
-
permanent?: boolean;
|
|
29
|
-
fuzzy?: boolean;
|
|
30
|
-
}) => void;
|
|
31
|
-
export declare const debugDrawBounds: (box: Bounds | Bounds[], opts?: {
|
|
32
|
-
color?: string;
|
|
33
|
-
permanent?: boolean;
|
|
34
|
-
}) => void;
|
|
35
|
-
export declare const debugDrawPoints: ({ x, y, points, }: {
|
|
36
|
-
x: number;
|
|
37
|
-
y: number;
|
|
38
|
-
points: LocalPoint[];
|
|
39
|
-
}, options?: any) => void;
|
|
40
|
-
export declare const debugCloseFrame: () => void;
|
|
41
|
-
export declare const debugClear: () => void;
|