@zsviczian/excalidraw 0.17.6-15 → 0.17.6-16
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/package.json
CHANGED
|
@@ -156,10 +156,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
156
156
|
cancel(): void;
|
|
157
157
|
} | null;
|
|
158
158
|
onUp: ((event: PointerEvent) => void) | null;
|
|
159
|
-
/**
|
|
160
|
-
* Returns gridSize taking into account `gridModeEnabled`.
|
|
161
|
-
* If disabled, returns null.
|
|
162
|
-
*/
|
|
163
159
|
onKeyDown: ((event: KeyboardEvent) => void) | null;
|
|
164
160
|
onKeyUp: ((event: KeyboardEvent) => void) | null;
|
|
165
161
|
};
|
|
@@ -224,10 +220,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
224
220
|
cancel(): void;
|
|
225
221
|
} | null;
|
|
226
222
|
onUp: ((event: PointerEvent) => void) | null;
|
|
227
|
-
/**
|
|
228
|
-
* Returns gridSize taking into account `gridModeEnabled`.
|
|
229
|
-
* If disabled, returns null.
|
|
230
|
-
*/
|
|
231
223
|
onKeyDown: ((event: KeyboardEvent) => void) | null;
|
|
232
224
|
onKeyUp: ((event: KeyboardEvent) => void) | null;
|
|
233
225
|
};
|
|
@@ -364,6 +356,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
364
356
|
/** use when changing scrollX/scrollY/zoom based on user interaction */
|
|
365
357
|
private translateCanvas;
|
|
366
358
|
zoomToFit: (target?: readonly ExcalidrawElement[], maxZoom?: number, margin?: number) => void;
|
|
359
|
+
getColorAtScenePoint: ({ sceneX, sceneY }: {
|
|
360
|
+
sceneX: number;
|
|
361
|
+
sceneY: number;
|
|
362
|
+
}) => string | null;
|
|
367
363
|
startLineEditor: (el: ExcalidrawLinearElement, selectedPointsIndices?: number[] | null) => void;
|
|
368
364
|
updateContainerSize: (containers: NonDeletedExcalidrawElement[]) => void;
|
|
369
365
|
setToast: (toast: {
|
|
@@ -470,7 +470,7 @@ export interface ExcalidrawProps {
|
|
|
470
470
|
handleKeyboardGlobally?: boolean;
|
|
471
471
|
onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
|
|
472
472
|
autoFocus?: boolean;
|
|
473
|
-
onBeforeTextEdit?: (textElement: ExcalidrawTextElement) => string;
|
|
473
|
+
onBeforeTextEdit?: (textElement: ExcalidrawTextElement, isExistingElement: boolean) => string;
|
|
474
474
|
onBeforeTextSubmit?: (textElement: ExcalidrawTextElement, nextText: string, //wrapped
|
|
475
475
|
nextOriginalText: string, isDeleted: boolean) => {
|
|
476
476
|
updatedNextOriginalText: string;
|
|
@@ -651,6 +651,7 @@ export interface ExcalidrawImperativeAPI {
|
|
|
651
651
|
clear: InstanceType<typeof App>["resetHistory"];
|
|
652
652
|
};
|
|
653
653
|
zoomToFit: InstanceType<typeof App>["zoomToFit"];
|
|
654
|
+
getColorAtScenePoint: InstanceType<typeof App>["getColorAtScenePoint"];
|
|
654
655
|
startLineEditor: InstanceType<typeof App>["startLineEditor"];
|
|
655
656
|
getSceneElements: InstanceType<typeof App>["getSceneElements"];
|
|
656
657
|
getAppState: () => InstanceType<typeof App>["state"];
|