@myoc/excalidraw 0.18.3 → 0.18.5
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-3K6YEH7O.js → chunk-626MKRIR.js} +2 -2
- package/dist/dev/{chunk-S4MA4GYT.js → chunk-XKDJIA35.js} +23 -6
- package/dist/dev/chunk-XKDJIA35.js.map +7 -0
- package/dist/dev/data/{image-I5I3FC2R.js → image-M4KEBNT4.js} +3 -3
- package/dist/dev/index.css +23 -7
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +827 -743
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-ECENQK44.js → chunk-44FCZ7FO.js} +1 -1
- package/dist/prod/{chunk-7TL427PR.js → chunk-RT42IMT3.js} +16 -14
- package/dist/prod/data/image-NV63W4US.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +15 -15
- 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 +2 -0
- package/dist/types/common/src/utils.d.ts +1 -0
- package/dist/types/element/src/textElement.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionSmartZoom.d.ts +2 -2
- package/dist/types/excalidraw/components/App.d.ts +3 -3
- package/dist/types/excalidraw/eraser/index.d.ts +14 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +1 -2
- package/dist/types/math/src/types.d.ts +1 -0
- package/package.json +1 -1
- package/dist/dev/chunk-S4MA4GYT.js.map +0 -7
- package/dist/prod/data/image-TMH4UP47.js +0 -1
- /package/dist/dev/{chunk-3K6YEH7O.js.map → chunk-626MKRIR.js.map} +0 -0
- /package/dist/dev/data/{image-I5I3FC2R.js.map → image-M4KEBNT4.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-LS7FJGPW.js";import"./chunk-
|
|
1
|
+
import{a,b,c,d}from"./chunk-LS7FJGPW.js";import"./chunk-44FCZ7FO.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,c as t}from"./chunk-LS7FJGPW.js";import"./chunk-
|
|
1
|
+
import{a as r,c as t}from"./chunk-LS7FJGPW.js";import"./chunk-44FCZ7FO.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
|
|
@@ -82,6 +82,7 @@ export declare const YOUTUBE_STATES: {
|
|
|
82
82
|
export declare const ENV: {
|
|
83
83
|
TEST: string;
|
|
84
84
|
DEVELOPMENT: string;
|
|
85
|
+
PRODUCTION: string;
|
|
85
86
|
};
|
|
86
87
|
export declare const CLASSES: {
|
|
87
88
|
SHAPE_ACTIONS_MENU: string;
|
|
@@ -224,6 +225,7 @@ export declare const DEFAULT_EXPORT_PADDING = 10;
|
|
|
224
225
|
export declare const DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT = 1440;
|
|
225
226
|
export declare const MAX_ALLOWED_FILE_BYTES: number;
|
|
226
227
|
export declare const SVG_NS = "http://www.w3.org/2000/svg";
|
|
228
|
+
export declare const SVG_DOCUMENT_PREAMBLE = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n";
|
|
227
229
|
export declare const ENCRYPTION_KEY_BITS = 128;
|
|
228
230
|
export declare const VERSIONS: {
|
|
229
231
|
readonly excalidraw: 2;
|
|
@@ -180,6 +180,7 @@ export type Node<T> = T & {
|
|
|
180
180
|
export declare const arrayToList: <T>(array: readonly T[]) => Node<T>[];
|
|
181
181
|
export declare const isTestEnv: () => boolean;
|
|
182
182
|
export declare const isDevEnv: () => boolean;
|
|
183
|
+
export declare const isProdEnv: () => boolean;
|
|
183
184
|
export declare const isServerEnv: () => boolean;
|
|
184
185
|
export declare const wrapEvent: <T extends Event>(name: EVENT, nativeEvent: T) => CustomEvent<{
|
|
185
186
|
nativeEvent: T;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
2
|
import type { ExtractSetType } from "@excalidraw/common/utility-types";
|
|
3
|
+
import type { Radians } from "../../math/src";
|
|
3
4
|
import type { MaybeTransformHandleType } from "./transformHandles";
|
|
4
5
|
import type { ElementsMap, ExcalidrawElement, ExcalidrawElementType, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeletedExcalidrawElement } from "./types";
|
|
5
6
|
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null, elementsMap: ElementsMap, informMutation?: boolean) => void;
|
|
@@ -19,7 +20,7 @@ export declare const getContainerCoords: (container: NonDeletedExcalidrawElement
|
|
|
19
20
|
x: number;
|
|
20
21
|
y: number;
|
|
21
22
|
};
|
|
22
|
-
export declare const getTextElementAngle: (textElement: ExcalidrawTextElement, container: ExcalidrawTextContainer | null) =>
|
|
23
|
+
export declare const getTextElementAngle: (textElement: ExcalidrawTextElement, container: ExcalidrawTextContainer | null) => 0 | Radians;
|
|
23
24
|
export declare const getBoundTextElementPosition: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
24
25
|
x: number;
|
|
25
26
|
y: number;
|
|
@@ -3,7 +3,7 @@ export declare const actionSmartZoom: {
|
|
|
3
3
|
name: "smartZoom";
|
|
4
4
|
label: string;
|
|
5
5
|
trackEvent: {
|
|
6
|
-
category: "
|
|
6
|
+
category: "toolbar";
|
|
7
7
|
};
|
|
8
8
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
viewMode: true;
|
|
@@ -11,7 +11,7 @@ export declare const actionSmartZoom: {
|
|
|
11
11
|
captureUpdate: "NEVER";
|
|
12
12
|
};
|
|
13
13
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
14
|
-
PanelComponent: ({
|
|
14
|
+
PanelComponent: ({ data, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
} & {
|
|
16
16
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
17
17
|
};
|
|
@@ -11,9 +11,9 @@ import { Fonts } from "../fonts";
|
|
|
11
11
|
import { Renderer } from "../scene/Renderer";
|
|
12
12
|
import { Emitter } from "../emitter";
|
|
13
13
|
import { Store } from "../store";
|
|
14
|
-
import { AnimatedTrail } from "../animated-trail";
|
|
15
14
|
import { LaserTrails } from "../laser-trails";
|
|
16
15
|
import { LassoTrail } from "../lasso";
|
|
16
|
+
import { EraserTrail } from "../eraser";
|
|
17
17
|
import type { ExportedElements } from "../data";
|
|
18
18
|
import type { FileSystemHandle } from "../data/filesystem";
|
|
19
19
|
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
|
|
@@ -97,7 +97,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
97
97
|
};
|
|
98
98
|
animationFrameHandler: AnimationFrameHandler;
|
|
99
99
|
laserTrails: LaserTrails;
|
|
100
|
-
eraserTrail:
|
|
100
|
+
eraserTrail: EraserTrail;
|
|
101
101
|
lassoTrail: LassoTrail;
|
|
102
102
|
onChangeEmitter: Emitter<[elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles]>;
|
|
103
103
|
onPointerDownEmitter: Emitter<[activeTool: {
|
|
@@ -433,7 +433,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
433
433
|
private getTextElementAtPosition;
|
|
434
434
|
private getElementAtPosition;
|
|
435
435
|
private getElementsAtPosition;
|
|
436
|
-
|
|
436
|
+
getElementHitThreshold(): number;
|
|
437
437
|
private hitElement;
|
|
438
438
|
private getTextBindableContainerAtPosition;
|
|
439
439
|
private startTextEditing;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnimatedTrail } from "../animated-trail";
|
|
2
|
+
import type { AnimationFrameHandler } from "../animation-frame-handler";
|
|
3
|
+
import type App from "../components/App";
|
|
4
|
+
export declare class EraserTrail extends AnimatedTrail {
|
|
5
|
+
private elementsToErase;
|
|
6
|
+
private groupsToErase;
|
|
7
|
+
private segmentsCache;
|
|
8
|
+
private geometricShapesCache;
|
|
9
|
+
constructor(animationFrameHandler: AnimationFrameHandler, app: App);
|
|
10
|
+
startPath(x: number, y: number): void;
|
|
11
|
+
addPointToPath(x: number, y: number, restore?: boolean): string[];
|
|
12
|
+
private updateElementsToBeErased;
|
|
13
|
+
endPath(): void;
|
|
14
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ElementsSegmentsMap, GlobalPoint } from "@excalidraw/math/types";
|
|
2
2
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
3
|
-
export type ElementsSegmentsMap = Map<string, LineSegment<GlobalPoint>[]>;
|
|
4
3
|
export declare const getLassoSelectedElementIds: (input: {
|
|
5
4
|
lassoPath: GlobalPoint[];
|
|
6
5
|
elements: readonly ExcalidrawElement[];
|