@dwelle/excalidraw 0.3.75 → 0.3.76-react18
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 +13 -13
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/components/App.d.ts +78 -0
- package/types/components/Card.d.ts +1 -0
- package/types/components/CheckboxItem.d.ts +1 -0
- package/types/components/Section.d.ts +4 -5
- package/types/types.d.ts +1 -0
package/package.json
CHANGED
|
@@ -123,6 +123,84 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
125
|
}>, event: React.PointerEvent<HTMLCanvasElement>]>;
|
|
126
|
+
onPointerUpEmitter: Emitter<[activeTool: {
|
|
127
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
128
|
+
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
129
|
+
locked: boolean;
|
|
130
|
+
customType: null;
|
|
131
|
+
} | {
|
|
132
|
+
type: "custom";
|
|
133
|
+
customType: string;
|
|
134
|
+
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
135
|
+
locked: boolean;
|
|
136
|
+
}, pointerDownState: Readonly<{
|
|
137
|
+
origin: Readonly<{
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
}>;
|
|
141
|
+
originInGrid: Readonly<{
|
|
142
|
+
x: number;
|
|
143
|
+
y: number;
|
|
144
|
+
}>;
|
|
145
|
+
scrollbars: {
|
|
146
|
+
isOverEither: boolean;
|
|
147
|
+
isOverHorizontal: boolean;
|
|
148
|
+
isOverVertical: boolean;
|
|
149
|
+
};
|
|
150
|
+
lastCoords: {
|
|
151
|
+
x: number;
|
|
152
|
+
y: number;
|
|
153
|
+
};
|
|
154
|
+
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
155
|
+
resize: {
|
|
156
|
+
handleType: import("../element/transformHandles").MaybeTransformHandleType;
|
|
157
|
+
isResizing: boolean;
|
|
158
|
+
offset: {
|
|
159
|
+
x: number;
|
|
160
|
+
y: number;
|
|
161
|
+
};
|
|
162
|
+
arrowDirection: "end" | "origin";
|
|
163
|
+
center: {
|
|
164
|
+
x: number;
|
|
165
|
+
y: number;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
hit: {
|
|
169
|
+
element: NonDeleted<ExcalidrawElement> | null;
|
|
170
|
+
allHitElements: NonDeleted<ExcalidrawElement>[];
|
|
171
|
+
wasAddedToSelection: boolean;
|
|
172
|
+
hasBeenDuplicated: boolean;
|
|
173
|
+
hasHitCommonBoundingBoxOfSelectedElements: boolean;
|
|
174
|
+
hasHitElementInside: boolean;
|
|
175
|
+
};
|
|
176
|
+
withCmdOrCtrl: boolean;
|
|
177
|
+
drag: {
|
|
178
|
+
hasOccurred: boolean;
|
|
179
|
+
offset: {
|
|
180
|
+
x: number;
|
|
181
|
+
y: number;
|
|
182
|
+
} | null;
|
|
183
|
+
};
|
|
184
|
+
eventListeners: {
|
|
185
|
+
onMove: {
|
|
186
|
+
(...args: any[]): void;
|
|
187
|
+
flush(): void;
|
|
188
|
+
cancel(): void;
|
|
189
|
+
} | null;
|
|
190
|
+
onUp: ((event: PointerEvent) => void) | null;
|
|
191
|
+
onKeyDown: ((event: KeyboardEvent) => void) | null;
|
|
192
|
+
onKeyUp: ((event: KeyboardEvent) => void) | null;
|
|
193
|
+
};
|
|
194
|
+
boxSelection: {
|
|
195
|
+
hasOccurred: boolean;
|
|
196
|
+
};
|
|
197
|
+
elementIdsToErase: {
|
|
198
|
+
[key: string]: {
|
|
199
|
+
opacity: number;
|
|
200
|
+
erase: boolean;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
}>, event: PointerEvent]>;
|
|
126
204
|
constructor(props: AppProps);
|
|
127
205
|
private renderCanvas;
|
|
128
206
|
render(): JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
export declare const Section: React.FC<{
|
|
3
3
|
heading: string;
|
|
4
|
-
children
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {};
|
|
4
|
+
children?: React.ReactNode | ((heading: React.ReactNode) => React.ReactNode);
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
package/types/types.d.ts
CHANGED
|
@@ -381,6 +381,7 @@ export declare type ExcalidrawImperativeAPI = {
|
|
|
381
381
|
app: InstanceType<typeof App>;
|
|
382
382
|
onChange: (callback: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles) => void) => UnsubscribeCallback;
|
|
383
383
|
onPointerDown: (callback: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState, event: React.PointerEvent<HTMLCanvasElement>) => void) => UnsubscribeCallback;
|
|
384
|
+
onPointerUp: (callback: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState, event: PointerEvent) => void) => UnsubscribeCallback;
|
|
384
385
|
};
|
|
385
386
|
export declare type Device = Readonly<{
|
|
386
387
|
isSmScreen: boolean;
|