@excalidraw/excalidraw 0.18.0-c4c0649 → 0.18.0-c65b684e9
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/dev/chunk-65CT75SH.js +5668 -0
- package/dist/dev/chunk-65CT75SH.js.map +7 -0
- package/dist/dev/chunk-CP5DND7P.js +7 -0
- package/dist/dev/chunk-CP5DND7P.js.map +7 -0
- package/dist/dev/{chunk-JCUIYZXF.js → chunk-QF5FRM6O.js} +6 -2
- package/dist/dev/chunk-QF5FRM6O.js.map +7 -0
- package/dist/dev/data/{image-SLEZBMLG.js → image-G3ZXYWE6.js} +3 -3
- package/dist/dev/index.css +51 -20
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +6832 -4278
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-ZDTPSZNL.js → en-SMAPCEOQ.js} +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-A66AFZZU.js +7 -0
- package/dist/prod/{chunk-GCFVWREF.js → chunk-I4UNSFV6.js} +4 -4
- package/dist/prod/chunk-YZO7PSYQ.js +4 -0
- package/dist/prod/data/image-53OPA26C.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +25 -18
- package/dist/prod/locales/{en-MHZ26NAR.js → en-TYY6KWIJ.js} +1 -1
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/constants.d.ts +19 -3
- package/dist/types/common/src/utils.d.ts +3 -5
- package/dist/types/element/src/Scene.d.ts +1 -1
- package/dist/types/element/src/align.d.ts +2 -1
- package/dist/types/element/src/binding.d.ts +10 -7
- package/dist/types/element/src/bounds.d.ts +11 -3
- package/dist/types/element/src/collision.d.ts +18 -12
- package/dist/types/element/src/cropElement.d.ts +1 -1
- package/dist/types/element/src/delta.d.ts +37 -7
- package/dist/types/element/src/distance.d.ts +2 -2
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/fractionalIndex.d.ts +8 -2
- package/dist/types/element/src/frame.d.ts +2 -2
- package/dist/types/element/src/groups.d.ts +1 -0
- package/dist/types/element/src/index.d.ts +1 -3
- package/dist/types/element/src/linearElementEditor.d.ts +14 -23
- package/dist/types/element/src/mutateElement.d.ts +1 -1
- package/dist/types/element/src/newElement.d.ts +2 -1
- package/dist/types/element/src/resizeElements.d.ts +1 -0
- package/dist/types/element/src/selection.d.ts +1 -1
- package/dist/types/element/src/shape.d.ts +42 -0
- package/dist/types/element/src/sizeHelpers.d.ts +2 -1
- package/dist/types/element/src/store.d.ts +13 -8
- package/dist/types/element/src/transformHandles.d.ts +4 -4
- package/dist/types/element/src/typeChecks.d.ts +15 -1
- package/dist/types/element/src/types.d.ts +8 -3
- package/dist/types/element/src/utils.d.ts +16 -6
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +21 -15
- package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +14 -10
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +193 -154
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +50 -36
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +7 -5
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +27 -20
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +6 -4
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +29 -26
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +7 -5
- package/dist/types/excalidraw/actions/actionExport.d.ts +147 -129
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +65 -20
- package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionFrame.d.ts +78 -70
- package/dist/types/excalidraw/actions/actionGroup.d.ts +20 -16
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +533 -7
- package/dist/types/excalidraw/actions/actionLink.d.ts +8 -6
- package/dist/types/excalidraw/actions/actionMenu.d.ts +22 -16
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -10
- package/dist/types/excalidraw/actions/actionProperties.d.ts +119 -81
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -8
- package/dist/types/excalidraw/actions/actionStyles.d.ts +11 -9
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +9 -7
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +9 -7
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +8 -6
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +9 -7
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +9 -7
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +9 -7
- package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
- package/dist/types/excalidraw/actions/types.d.ts +2 -1
- package/dist/types/excalidraw/appState.d.ts +29 -20
- package/dist/types/excalidraw/components/Actions.d.ts +0 -4
- package/dist/types/excalidraw/components/App.d.ts +14 -16
- package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
- package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
- package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +11 -1
- package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -0
- package/dist/types/excalidraw/components/icons.d.ts +2 -0
- package/dist/types/excalidraw/components/shapes.d.ts +1 -1
- package/dist/types/excalidraw/data/blob.d.ts +1 -1
- package/dist/types/excalidraw/eraser/index.d.ts +0 -2
- package/dist/types/excalidraw/history.d.ts +21 -5
- package/dist/types/excalidraw/index.d.ts +1 -0
- package/dist/types/excalidraw/lasso/index.d.ts +1 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
- package/dist/types/excalidraw/renderer/helpers.d.ts +4 -4
- package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +0 -1
- package/dist/types/excalidraw/types.d.ts +11 -7
- package/dist/types/math/src/angle.d.ts +2 -0
- package/dist/types/math/src/constants.d.ts +3 -0
- package/dist/types/math/src/curve.d.ts +32 -0
- package/dist/types/math/src/index.d.ts +1 -0
- package/dist/types/math/src/point.d.ts +1 -1
- package/dist/types/math/src/rectangle.d.ts +2 -0
- package/dist/types/math/src/vector.d.ts +4 -2
- package/history.ts +108 -45
- package/package.json +12 -9
- package/dist/dev/chunk-HNRFOURL.js +0 -23482
- package/dist/dev/chunk-HNRFOURL.js.map +0 -7
- package/dist/dev/chunk-JCUIYZXF.js.map +0 -7
- package/dist/dev/chunk-VKWYDXFZ.js +0 -7
- package/dist/dev/chunk-VKWYDXFZ.js.map +0 -7
- package/dist/prod/chunk-G6SRO7HP.js +0 -7
- package/dist/prod/chunk-M3D5LUUK.js +0 -33
- package/dist/prod/data/image-PMKVN4IF.js +0 -1
- package/dist/types/element/src/Shape.d.ts +0 -17
- package/dist/types/element/src/ShapeCache.d.ts +0 -25
- package/dist/types/element/src/shapes.d.ts +0 -23
- package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/dist/types/excalidraw/visualdebug.d.ts +0 -41
- package/dist/types/utils/src/collision.d.ts +0 -8
- /package/dist/dev/data/{image-SLEZBMLG.js.map → image-G3ZXYWE6.js.map} +0 -0
- /package/dist/dev/locales/{en-ZDTPSZNL.js.map → en-SMAPCEOQ.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{nh as a,oh as b,ph as c}from"../chunk-M3D5LUUK.js";import"../chunk-G6SRO7HP.js";import"../chunk-SRAX5OIU.js";export{c as decodePngMetadata,b as encodePngMetadata,a as getTEXtChunk};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { EmbedsValidationStatus } from "@excalidraw/excalidraw/types";
|
|
2
|
-
import type { ExcalidrawElement, NonDeletedExcalidrawElement, ExcalidrawSelectionElement } from "./types";
|
|
3
|
-
import type { Drawable, Options } from "roughjs/bin/core";
|
|
4
|
-
import type { RoughGenerator } from "roughjs/bin/generator";
|
|
5
|
-
export declare const generateRoughOptions: (element: ExcalidrawElement, continuousPath?: boolean) => Options;
|
|
6
|
-
/**
|
|
7
|
-
* Generates the roughjs shape for given element.
|
|
8
|
-
*
|
|
9
|
-
* Low-level. Use `ShapeCache.generateElementShape` instead.
|
|
10
|
-
*
|
|
11
|
-
* @private
|
|
12
|
-
*/
|
|
13
|
-
export declare const _generateElementShape: (element: Exclude<NonDeletedExcalidrawElement, ExcalidrawSelectionElement>, generator: RoughGenerator, { isExporting, canvasBackgroundColor, embedsValidationStatus, }: {
|
|
14
|
-
isExporting: boolean;
|
|
15
|
-
canvasBackgroundColor: string;
|
|
16
|
-
embedsValidationStatus: EmbedsValidationStatus | null;
|
|
17
|
-
}) => Drawable | Drawable[] | null;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { AppState, EmbedsValidationStatus } from "@excalidraw/excalidraw/types";
|
|
2
|
-
import type { ElementShape, ElementShapes } from "@excalidraw/excalidraw/scene/types";
|
|
3
|
-
import type { ExcalidrawElement } from "./types";
|
|
4
|
-
import type { Drawable } from "roughjs/bin/core";
|
|
5
|
-
export declare class ShapeCache {
|
|
6
|
-
private static rg;
|
|
7
|
-
private static cache;
|
|
8
|
-
/**
|
|
9
|
-
* Retrieves shape from cache if available. Use this only if shape
|
|
10
|
-
* is optional and you have a fallback in case it's not cached.
|
|
11
|
-
*/
|
|
12
|
-
static get: <T extends ExcalidrawElement>(element: T) => T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] | undefined : ElementShape | undefined;
|
|
13
|
-
static set: <T extends ExcalidrawElement>(element: T, shape: T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] : Drawable) => WeakMap<ExcalidrawElement, ElementShape>;
|
|
14
|
-
static delete: (element: ExcalidrawElement) => boolean;
|
|
15
|
-
static destroy: () => void;
|
|
16
|
-
/**
|
|
17
|
-
* Generates & caches shape for element if not already cached, otherwise
|
|
18
|
-
* returns cached shape.
|
|
19
|
-
*/
|
|
20
|
-
static generateElementShape: <T extends import("./types").ExcalidrawRectangleElement | import("./types").ExcalidrawDiamondElement | import("./types").ExcalidrawEllipseElement | import("./types").ExcalidrawTextElement | import("./types").ExcalidrawLinearElement | import("./types").ExcalidrawArrowElement | import("./types").ExcalidrawFreeDrawElement | import("./types").ExcalidrawImageElement | import("./types").ExcalidrawFrameElement | import("./types").ExcalidrawMagicFrameElement | import("./types").ExcalidrawIframeElement | import("./types").ExcalidrawEmbeddableElement>(element: T, renderConfig: {
|
|
21
|
-
isExporting: boolean;
|
|
22
|
-
canvasBackgroundColor: AppState["viewBackgroundColor"];
|
|
23
|
-
embedsValidationStatus: EmbedsValidationStatus;
|
|
24
|
-
} | null) => ((T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] | undefined : ElementShape | undefined) & ({} | null)) | (T["type"] extends keyof ElementShapes ? ElementShapes[T["type"]] : Drawable | null);
|
|
25
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
|
-
import { type GeometricShape } from "@excalidraw/utils/shape";
|
|
3
|
-
import type { Zoom } from "@excalidraw/excalidraw/types";
|
|
4
|
-
import { type Bounds } from "./bounds";
|
|
5
|
-
import type { ElementsMap, ExcalidrawElement, ExcalidrawLinearElement, NonDeleted } from "./types";
|
|
6
|
-
/**
|
|
7
|
-
* get the pure geometric shape of an excalidraw elementw
|
|
8
|
-
* which is then used for hit detection
|
|
9
|
-
*/
|
|
10
|
-
export declare const getElementShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap) => GeometricShape<Point>;
|
|
11
|
-
export declare const getBoundTextShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap) => GeometricShape<Point> | null;
|
|
12
|
-
export declare const getControlPointsForBezierCurve: <P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, endPoint: P) => P[] | null;
|
|
13
|
-
export declare const getBezierXY: <P extends GlobalPoint | LocalPoint>(p0: P, p1: P, p2: P, p3: P, t: number) => P;
|
|
14
|
-
export declare const getBezierCurveLength: <P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, endPoint: P) => number;
|
|
15
|
-
export declare const mapIntervalToBezierT: <P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, endPoint: P, interval: number) => number;
|
|
16
|
-
/**
|
|
17
|
-
* Get the axis-aligned bounding box for a given element
|
|
18
|
-
*/
|
|
19
|
-
export declare const aabbForElement: (element: Readonly<ExcalidrawElement>, offset?: [number, number, number, number]) => Bounds;
|
|
20
|
-
export declare const pointInsideBounds: <P extends GlobalPoint | LocalPoint>(p: P, bounds: Bounds) => boolean;
|
|
21
|
-
export declare const aabbsOverlapping: (a: Bounds, b: Bounds) => boolean;
|
|
22
|
-
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
23
|
-
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"], zoomValue?: Zoom["value"]) => boolean;
|
|
@@ -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;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type GlobalPoint, type LocalPoint, type Polygon } from "@excalidraw/math";
|
|
2
|
-
import type { Curve } from "@excalidraw/math";
|
|
3
|
-
import type { Polyline, GeometricShape } from "./shape";
|
|
4
|
-
export declare const isPointOnShape: <Point extends GlobalPoint | LocalPoint>(point: Point, shape: GeometricShape<Point>, tolerance?: number) => boolean;
|
|
5
|
-
export declare const isPointInShape: <Point extends GlobalPoint | LocalPoint>(point: Point, shape: GeometricShape<Point>) => boolean;
|
|
6
|
-
export declare const isPointInBounds: <Point extends GlobalPoint | LocalPoint>(point: Point, bounds: Polygon<Point>) => boolean;
|
|
7
|
-
export declare const pointOnCurve: <Point extends GlobalPoint | LocalPoint>(point: Point, curve: Curve<Point>, threshold: number) => boolean;
|
|
8
|
-
export declare const pointOnPolyline: <Point extends GlobalPoint | LocalPoint>(point: Point, polyline: Polyline<Point>, threshold?: number) => boolean;
|
|
File without changes
|
|
File without changes
|