@myoc/element 0.19.5-ffbfd9327 → 0.19.502-d9d5eeb32
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/index.js +8839 -4706
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/index.js +42 -18
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/shapes.d.ts +2 -22
- package/package.json +3 -3
|
@@ -44,6 +44,7 @@ export * from "./resizeTest";
|
|
|
44
44
|
export * from "./Scene";
|
|
45
45
|
export * from "./selection";
|
|
46
46
|
export * from "./shape";
|
|
47
|
+
export * from "./shapes";
|
|
47
48
|
export * from "./showSelectedShapeActions";
|
|
48
49
|
export * from "./sizeHelpers";
|
|
49
50
|
export * from "./sortElements";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
2
|
import { type GeometricShape } from "@excalidraw/utils/shape";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { ExcalidrawElement, ElementsMap, NonDeleted, ExcalidrawLinearElement, NonDeletedSceneElementsMap } from "./types";
|
|
3
|
+
import type { AppClassProperties } from "@excalidraw/excalidraw/types";
|
|
4
|
+
import type { ExcalidrawElement, ElementsMap } from "./types";
|
|
6
5
|
export type ToolCategory = "manipulation" | "elements";
|
|
7
6
|
export declare const SHAPES: readonly [{
|
|
8
7
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -223,23 +222,4 @@ export declare const getToolbarTools: (app: AppClassProperties) => readonly [{
|
|
|
223
222
|
readonly myocSimplifiedMode: true;
|
|
224
223
|
})[]];
|
|
225
224
|
export declare const findShapeByKey: (key: string, app: AppClassProperties) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "lasso" | "eraser" | null;
|
|
226
|
-
/**
|
|
227
|
-
* get the pure geometric shape of an excalidraw elementw
|
|
228
|
-
* which is then used for hit detection
|
|
229
|
-
*/
|
|
230
|
-
export declare const getElementShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap) => GeometricShape<Point>;
|
|
231
225
|
export declare const getBoundTextShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap) => GeometricShape<Point> | null;
|
|
232
|
-
export declare const getControlPointsForBezierCurve: <P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, endPoint: P) => P[] | null;
|
|
233
|
-
export declare const getBezierXY: <P extends GlobalPoint | LocalPoint>(p0: P, p1: P, p2: P, p3: P, t: number) => P;
|
|
234
|
-
export declare const getBezierCurveLength: <P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, endPoint: P) => number;
|
|
235
|
-
export declare const mapIntervalToBezierT: <P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, endPoint: P, interval: number) => number;
|
|
236
|
-
/**
|
|
237
|
-
* Get the axis-aligned bounding box for a given element
|
|
238
|
-
*/
|
|
239
|
-
export declare const aabbForElement: (element: Readonly<ExcalidrawElement>, elementsMap: NonDeletedSceneElementsMap, offset?: [number, number, number, number]) => Bounds;
|
|
240
|
-
export declare const pointInsideBounds: <P extends GlobalPoint | LocalPoint>(p: P, bounds: Bounds) => boolean;
|
|
241
|
-
export declare const aabbsOverlapping: (a: Bounds, b: Bounds) => boolean;
|
|
242
|
-
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
243
|
-
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"],
|
|
244
|
-
/** supply if you want the loop detection to account for current zoom */
|
|
245
|
-
zoomValue?: Zoom["value"]) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myoc/element",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.502-d9d5eeb32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/element/src/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
66
|
+
"@excalidraw/common": "npm:@myoc/common@0.19.502-d9d5eeb32",
|
|
67
|
+
"@excalidraw/math": "npm:@myoc/math@0.19.502-d9d5eeb32"
|
|
68
68
|
}
|
|
69
69
|
}
|