@zsviczian/excalidraw 0.17.1-obsidian-21 → 0.17.1-obsidian-23
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 +50 -39
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/styles.development.css +10 -13
- package/dist/styles.production.css +3 -3
- package/package.json +1 -1
- package/types/excalidraw/actions/actionAlign.d.ts +2 -2
- package/types/excalidraw/actions/actionBoundText.d.ts +3 -3
- package/types/excalidraw/actions/actionCanvas.d.ts +3 -3
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +2 -2
- package/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/types/excalidraw/actions/actionElementLock.d.ts +1 -1
- package/types/excalidraw/actions/actionExport.d.ts +1 -1
- package/types/excalidraw/actions/actionFinalize.d.ts +1 -1
- package/types/excalidraw/actions/actionFlip.d.ts +2 -2
- package/types/excalidraw/actions/actionFrame.d.ts +2 -2
- package/types/excalidraw/actions/actionGroup.d.ts +2 -2
- package/types/excalidraw/actions/actionHistory.d.ts +3 -3
- package/types/excalidraw/actions/actionLinearEditor.d.ts +4 -2
- package/types/excalidraw/actions/actionNavigate.d.ts +1 -1
- package/types/excalidraw/actions/actionProperties.d.ts +2 -2
- package/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +17 -0
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
- package/types/excalidraw/actions/actionZindex.d.ts +4 -0
- package/types/excalidraw/actions/manager.d.ts +3 -3
- package/types/excalidraw/actions/register.d.ts +1 -1
- package/types/excalidraw/actions/shortcuts.d.ts +2 -2
- package/types/excalidraw/actions/types.d.ts +6 -6
- package/types/excalidraw/align.d.ts +1 -1
- package/types/excalidraw/animated-trail.d.ts +2 -2
- package/types/excalidraw/appState.d.ts +1 -1
- package/types/excalidraw/change.d.ts +4 -4
- package/types/excalidraw/charts.d.ts +1 -1
- package/types/excalidraw/clients.d.ts +2 -2
- package/types/excalidraw/clipboard.d.ts +3 -3
- package/types/excalidraw/colors.d.ts +1 -1
- package/types/excalidraw/components/Actions.d.ts +3 -3
- package/types/excalidraw/components/App.d.ts +8 -8
- package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +4 -4
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +3 -3
- package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/PickerHeading.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +2 -2
- package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
- package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
- package/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -1
- package/types/excalidraw/components/CommandPalette/types.d.ts +3 -3
- package/types/excalidraw/components/ConfirmDialog.d.ts +1 -1
- package/types/excalidraw/components/ContextMenu.d.ts +2 -2
- package/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
- package/types/excalidraw/components/DefaultSidebar.d.ts +2 -2
- package/types/excalidraw/components/DialogActionButton.d.ts +1 -1
- package/types/excalidraw/components/EyeDropper.d.ts +2 -2
- package/types/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
- package/types/excalidraw/components/HintViewer.d.ts +1 -1
- package/types/excalidraw/components/ImageExportDialog.d.ts +1 -1
- package/types/excalidraw/components/InitializeApp.d.ts +2 -2
- package/types/excalidraw/components/JSONExportDialog.d.ts +3 -3
- package/types/excalidraw/components/LayerUI.d.ts +4 -4
- package/types/excalidraw/components/LibraryMenu.d.ts +2 -2
- package/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +1 -1
- package/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
- package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +2 -2
- package/types/excalidraw/components/LibraryMenuItems.d.ts +1 -1
- package/types/excalidraw/components/LibraryMenuSection.d.ts +5 -4
- package/types/excalidraw/components/LibraryUnit.d.ts +2 -2
- package/types/excalidraw/components/LoadingMessage.d.ts +1 -1
- package/types/excalidraw/components/MobileMenu.d.ts +3 -3
- package/types/excalidraw/components/Modal.d.ts +1 -1
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/types/excalidraw/components/PasteChartDialog.d.ts +1 -1
- package/types/excalidraw/components/PublishLibrary.d.ts +1 -1
- package/types/excalidraw/components/SVGLayer.d.ts +1 -1
- package/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -1
- package/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -1
- package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
- package/types/excalidraw/components/Sidebar/common.d.ts +1 -1
- package/types/excalidraw/components/Stats.d.ts +2 -2
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -2
- package/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/common.d.ts +4 -4
- package/types/excalidraw/components/TextField.d.ts +1 -1
- package/types/excalidraw/components/Toast.d.ts +1 -1
- package/types/excalidraw/components/ToolButton.d.ts +3 -2
- package/types/excalidraw/components/Trans.d.ts +1 -1
- package/types/excalidraw/components/UserList.d.ts +1 -1
- package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -1
- package/types/excalidraw/components/canvases/StaticCanvas.d.ts +2 -2
- package/types/excalidraw/components/footer/Footer.d.ts +2 -2
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
- package/types/excalidraw/components/hyperlink/helpers.d.ts +3 -3
- package/types/excalidraw/components/icons.d.ts +3 -2
- package/types/excalidraw/constants.d.ts +2 -2
- package/types/excalidraw/context/ui-appState.d.ts +1 -1
- package/types/excalidraw/cursor.d.ts +1 -1
- package/types/excalidraw/data/EditorLocalStorage.d.ts +2 -2
- package/types/excalidraw/data/blob.d.ts +5 -5
- package/types/excalidraw/data/filesystem.d.ts +2 -1
- package/types/excalidraw/data/index.d.ts +4 -4
- package/types/excalidraw/data/json.d.ts +3 -3
- package/types/excalidraw/data/library.d.ts +3 -3
- package/types/excalidraw/data/magic.d.ts +3 -3
- package/types/excalidraw/data/reconcile.d.ts +3 -3
- package/types/excalidraw/data/resave.d.ts +2 -2
- package/types/excalidraw/data/restore.d.ts +3 -3
- package/types/excalidraw/data/transform.d.ts +3 -3
- package/types/excalidraw/data/types.d.ts +3 -3
- package/types/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
- package/types/excalidraw/element/binding.d.ts +3 -3
- package/types/excalidraw/element/bounds.d.ts +3 -3
- package/types/excalidraw/element/collision.d.ts +3 -3
- package/types/excalidraw/element/containerCache.d.ts +1 -1
- package/types/excalidraw/element/dragElements.d.ts +3 -3
- package/types/excalidraw/element/embeddable.d.ts +3 -3
- package/types/excalidraw/element/image.d.ts +2 -2
- package/types/excalidraw/element/index.d.ts +2 -2
- package/types/excalidraw/element/linearElementEditor.d.ts +5 -5
- package/types/excalidraw/element/mutateElement.d.ts +3 -3
- package/types/excalidraw/element/newElement.d.ts +3 -10
- package/types/excalidraw/element/resizeElements.d.ts +3 -3
- package/types/excalidraw/element/resizeTest.d.ts +4 -4
- package/types/excalidraw/element/showSelectedShapeActions.d.ts +2 -2
- package/types/excalidraw/element/sizeHelpers.d.ts +2 -2
- package/types/excalidraw/element/sortElements.d.ts +1 -1
- package/types/excalidraw/element/textElement.d.ts +4 -4
- package/types/excalidraw/element/textWysiwyg.d.ts +10 -5
- package/types/excalidraw/element/transformHandles.d.ts +3 -3
- package/types/excalidraw/element/typeChecks.d.ts +3 -3
- package/types/excalidraw/element/types.d.ts +11 -4
- package/types/excalidraw/emitter.d.ts +1 -1
- package/types/excalidraw/fractionalIndex.d.ts +1 -1
- package/types/excalidraw/frame.d.ts +3 -3
- package/types/excalidraw/gatransforms.d.ts +1 -1
- package/types/excalidraw/gesture.d.ts +1 -1
- package/types/excalidraw/groups.d.ts +3 -3
- package/types/excalidraw/history.d.ts +4 -4
- package/types/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/types/excalidraw/i18n.d.ts +1 -1
- package/types/excalidraw/index.d.ts +3 -1
- package/types/excalidraw/jotai.d.ts +1 -1
- package/types/excalidraw/laser-trails.d.ts +3 -2
- package/types/excalidraw/math.d.ts +2 -2
- package/types/excalidraw/points.d.ts +1 -1
- package/types/excalidraw/queue.d.ts +1 -1
- package/types/excalidraw/renderer/helpers.d.ts +2 -2
- package/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
- package/types/excalidraw/renderer/renderElement.d.ts +3 -3
- package/types/excalidraw/renderer/renderSnaps.d.ts +1 -1
- package/types/excalidraw/renderer/staticScene.d.ts +1 -1
- package/types/excalidraw/renderer/staticSvgScene.d.ts +4 -4
- package/types/excalidraw/scene/Fonts.d.ts +2 -4
- package/types/excalidraw/scene/Renderer.d.ts +4 -4
- package/types/excalidraw/scene/Scene.d.ts +13 -7
- package/types/excalidraw/scene/Shape.d.ts +1 -1
- package/types/excalidraw/scene/ShapeCache.d.ts +4 -4
- package/types/excalidraw/scene/comparisons.d.ts +2 -2
- package/types/excalidraw/scene/export.d.ts +2 -2
- package/types/excalidraw/scene/scroll.d.ts +2 -2
- package/types/excalidraw/scene/scrollbars.d.ts +3 -3
- package/types/excalidraw/scene/selection.d.ts +2 -2
- package/types/excalidraw/scene/types.d.ts +4 -4
- package/types/excalidraw/scene/zoom.d.ts +1 -1
- package/types/excalidraw/snapping.d.ts +4 -4
- package/types/excalidraw/store.d.ts +2 -2
- package/types/excalidraw/types.d.ts +22 -18
- package/types/excalidraw/utils.d.ts +4 -4
- package/types/excalidraw/zindex.d.ts +2 -2
- package/types/utils/bbox.d.ts +2 -2
- package/types/utils/collision.d.ts +1 -1
- package/types/utils/export.d.ts +2 -2
- package/types/utils/geometry/geometry.d.ts +1 -1
- package/types/utils/geometry/shape.d.ts +1 -1
- package/types/utils/withinBounds.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppClassProperties, AppState, UIAppState } from "../types";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppClassProperties, AppState, UIAppState } from "../types";
|
|
3
3
|
export declare const actionAlignTop: {
|
|
4
4
|
name: "alignTop";
|
|
5
5
|
label: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
2
|
-
import { AppState } from "../types";
|
|
3
|
-
import { Mutable } from "../utility-types";
|
|
1
|
+
import type { ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
2
|
+
import type { AppState } from "../types";
|
|
3
|
+
import type { Mutable } from "../utility-types";
|
|
4
4
|
export declare const actionUnbindText: {
|
|
5
5
|
name: "unbindText";
|
|
6
6
|
label: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppClassProperties, AppState, NormalizedZoomValue } from "../types";
|
|
3
|
-
import { SceneBounds } from "../element/bounds";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppClassProperties, AppState, NormalizedZoomValue } from "../types";
|
|
3
|
+
import type { SceneBounds } from "../element/bounds";
|
|
4
4
|
export declare const actionChangeViewBackgroundColor: {
|
|
5
5
|
name: "changeViewBackgroundColor";
|
|
6
6
|
label: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppState } from "../types";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppState } from "../types";
|
|
3
3
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
4
4
|
export declare const actionDeleteSelected: {
|
|
5
5
|
name: "deleteSelectedElements";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppClassProperties, AppState } from "../types";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
3
3
|
export declare const distributeHorizontally: {
|
|
4
4
|
name: "distributeHorizontally";
|
|
5
5
|
label: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppState } from "../types";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppState } from "../types";
|
|
3
3
|
export declare const actionDuplicateSelection: {
|
|
4
4
|
name: "duplicateSelection";
|
|
5
5
|
label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
2
|
export declare const actionToggleElementLock: {
|
|
3
3
|
name: "toggleElementLock";
|
|
4
4
|
label: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppClassProperties, AppState } from "../types";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
3
3
|
export declare const actionFlipHorizontal: {
|
|
4
4
|
name: "flipHorizontal";
|
|
5
5
|
label: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppClassProperties, AppState } from "../types";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
3
3
|
export declare const actionSelectAllElementsInFrame: {
|
|
4
4
|
name: "selectAllElementsInFrame";
|
|
5
5
|
label: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppClassProperties, AppState } from "../types";
|
|
1
|
+
import type { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
3
3
|
export declare const actionGroup: {
|
|
4
4
|
name: "group";
|
|
5
5
|
label: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Action } from "./types";
|
|
2
|
-
import { History } from "../history";
|
|
3
|
-
import { Store } from "../store";
|
|
1
|
+
import type { Action } from "./types";
|
|
2
|
+
import type { History } from "../history";
|
|
3
|
+
import type { Store } from "../store";
|
|
4
4
|
type ActionCreator = (history: History, store: Store) => Action;
|
|
5
5
|
export declare const createUndoAction: ActionCreator;
|
|
6
6
|
export declare const createRedoAction: ActionCreator;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
2
|
-
import { ExcalidrawLinearElement } from "../element/types";
|
|
2
|
+
import type { ExcalidrawLinearElement } from "../element/types";
|
|
3
3
|
export declare const actionToggleLinearEditor: {
|
|
4
4
|
name: "toggleLinearEditor";
|
|
5
5
|
category: string;
|
|
6
|
-
label: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.lineEditor.
|
|
6
|
+
label: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.lineEditor.editArrow" | "labels.lineEditor.edit";
|
|
7
|
+
keywords: string[];
|
|
7
8
|
trackEvent: {
|
|
8
9
|
category: "element";
|
|
9
10
|
};
|
|
@@ -196,6 +197,7 @@ export declare const actionToggleLinearEditor: {
|
|
|
196
197
|
};
|
|
197
198
|
storeAction: import("../store").StoreActionType;
|
|
198
199
|
};
|
|
200
|
+
PanelComponent: ({ appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
199
201
|
} & {
|
|
200
202
|
keyTest?: undefined;
|
|
201
203
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AppClassProperties, AppState, Primitive } from "../types";
|
|
2
|
-
import { Arrowhead, ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
1
|
+
import type { AppClassProperties, AppState, Primitive } from "../types";
|
|
2
|
+
import type { Arrowhead, ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
3
3
|
export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: ExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
|
|
4
4
|
export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], appState: AppState, getAttribute: (element: ExcalidrawElement) => T, isRelevantElement: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
|
|
5
5
|
export declare const actionChangeStrokeColor: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AppClassProperties } from "../types";
|
|
2
|
+
export declare const actionTextAutoResize: {
|
|
3
|
+
name: "autoResize";
|
|
4
|
+
label: string;
|
|
5
|
+
icon: null;
|
|
6
|
+
trackEvent: {
|
|
7
|
+
category: "element";
|
|
8
|
+
};
|
|
9
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
10
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: AppClassProperties) => {
|
|
11
|
+
appState: Readonly<import("../types").AppState>;
|
|
12
|
+
elements: import("../element/types").OrderedExcalidrawElement[];
|
|
13
|
+
storeAction: import("../store").StoreActionType;
|
|
14
|
+
};
|
|
15
|
+
} & {
|
|
16
|
+
keyTest?: undefined;
|
|
17
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const actionSendBackward: {
|
|
2
2
|
name: "sendBackward";
|
|
3
3
|
label: string;
|
|
4
|
+
keywords: string[];
|
|
4
5
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
trackEvent: {
|
|
6
7
|
category: "element";
|
|
@@ -19,6 +20,7 @@ export declare const actionSendBackward: {
|
|
|
19
20
|
export declare const actionBringForward: {
|
|
20
21
|
name: "bringForward";
|
|
21
22
|
label: string;
|
|
23
|
+
keywords: string[];
|
|
22
24
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
23
25
|
trackEvent: {
|
|
24
26
|
category: "element";
|
|
@@ -37,6 +39,7 @@ export declare const actionBringForward: {
|
|
|
37
39
|
export declare const actionSendToBack: {
|
|
38
40
|
name: "sendToBack";
|
|
39
41
|
label: string;
|
|
42
|
+
keywords: string[];
|
|
40
43
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
41
44
|
trackEvent: {
|
|
42
45
|
category: "element";
|
|
@@ -54,6 +57,7 @@ export declare const actionSendToBack: {
|
|
|
54
57
|
export declare const actionBringToFront: {
|
|
55
58
|
name: "bringToFront";
|
|
56
59
|
label: string;
|
|
60
|
+
keywords: string[];
|
|
57
61
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
58
62
|
trackEvent: {
|
|
59
63
|
category: "element";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
|
|
3
|
-
import { OrderedExcalidrawElement } from "../element/types";
|
|
4
|
-
import { AppClassProperties, AppState } from "../types";
|
|
2
|
+
import type { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
|
|
3
|
+
import type { OrderedExcalidrawElement } from "../element/types";
|
|
4
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
5
5
|
export declare class ActionManager {
|
|
6
6
|
actions: Record<ActionName, Action>;
|
|
7
7
|
updater: (actionResult: ActionResult | Promise<ActionResult>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Action } from "./types";
|
|
1
|
+
import type { Action } from "./types";
|
|
2
2
|
export declare let actions: readonly Action[];
|
|
3
3
|
export declare const register: <T extends Action>(action: T) => T & {
|
|
4
4
|
keyTest?: (unknown extends T["keyTest"] ? never : T["keyTest"]) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SubtypeOf } from "../utility-types";
|
|
2
|
-
import { ActionName } from "./types";
|
|
1
|
+
import type { SubtypeOf } from "../utility-types";
|
|
2
|
+
import type { ActionName } from "./types";
|
|
3
3
|
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "copyAsSvg" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts"> | "saveScene" | "imageExport" | "commandPalette";
|
|
4
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
|
|
4
|
-
import { MarkOptional } from "../utility-types";
|
|
5
|
-
import { StoreActionType } from "../store";
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
|
|
3
|
+
import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
|
|
4
|
+
import type { MarkOptional } from "../utility-types";
|
|
5
|
+
import type { StoreActionType } from "../store";
|
|
6
6
|
export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
|
|
7
7
|
/** if false, the action should be prevented */
|
|
8
8
|
export type ActionResult = {
|
|
@@ -15,7 +15,7 @@ export type ActionResult = {
|
|
|
15
15
|
type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
16
16
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
17
17
|
export type ActionFilterFn = (action: Action) => void;
|
|
18
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette";
|
|
18
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize";
|
|
19
19
|
export type PanelComponentProps = {
|
|
20
20
|
elements: readonly ExcalidrawElement[];
|
|
21
21
|
appState: AppState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LaserPointerOptions } from "@zsviczian/laser-pointer";
|
|
2
|
-
import { AnimationFrameHandler } from "./animation-frame-handler";
|
|
1
|
+
import type { LaserPointerOptions } from "@zsviczian/laser-pointer";
|
|
2
|
+
import type { AnimationFrameHandler } from "./animation-frame-handler";
|
|
3
3
|
import type App from "./components/App";
|
|
4
4
|
export interface Trail {
|
|
5
5
|
start(container: SVGSVGElement): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppState, NormalizedZoomValue } from "./types";
|
|
1
|
+
import type { AppState, NormalizedZoomValue } from "./types";
|
|
2
2
|
export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
3
3
|
export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
|
|
4
4
|
zenModeEnabled?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElementUpdate } from "./element/mutateElement";
|
|
2
|
-
import { OrderedExcalidrawElement, SceneElementsMap } from "./element/types";
|
|
3
|
-
import { AppState, ObservedAppState } from "./types";
|
|
4
|
-
import { ValueOf } from "./utility-types";
|
|
1
|
+
import type { ElementUpdate } from "./element/mutateElement";
|
|
2
|
+
import type { OrderedExcalidrawElement, SceneElementsMap } from "./element/types";
|
|
3
|
+
import type { AppState, ObservedAppState } from "./types";
|
|
4
|
+
import type { ValueOf } from "./utility-types";
|
|
5
5
|
/**
|
|
6
6
|
* Represents the difference between two objects of the same type.
|
|
7
7
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InteractiveCanvasRenderConfig } from "./scene/types";
|
|
2
|
-
import { Collaborator, InteractiveCanvasAppState, SocketId } from "./types";
|
|
1
|
+
import type { InteractiveCanvasRenderConfig } from "./scene/types";
|
|
2
|
+
import type { Collaborator, InteractiveCanvasAppState, SocketId } from "./types";
|
|
3
3
|
export declare const getClientColor: (socketId: SocketId, collaborator: Collaborator | undefined) => string;
|
|
4
4
|
/**
|
|
5
5
|
* returns first char, capitalized
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExcalidrawElement, NonDeletedExcalidrawElement } from "./element/types";
|
|
2
|
-
import { BinaryFiles } from "./types";
|
|
3
|
-
import { Spreadsheet } from "./charts";
|
|
1
|
+
import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "./element/types";
|
|
2
|
+
import type { BinaryFiles } from "./types";
|
|
3
|
+
import type { Spreadsheet } from "./charts";
|
|
4
4
|
import { ALLOWED_PASTE_MIME_TYPES } from "./constants";
|
|
5
5
|
export type PastedMixedContent = {
|
|
6
6
|
type: "text" | "imageUrl";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import oc from "open-color";
|
|
2
|
-
import { Merge } from "./utility-types";
|
|
2
|
+
import type { Merge } from "./utility-types";
|
|
3
3
|
export type ColorPickerColor = Exclude<keyof oc, "indigo" | "lime"> | "transparent" | "bronze";
|
|
4
4
|
export type ColorTuple = readonly [string, string, string, string, string];
|
|
5
5
|
export type ColorPalette = Merge<Record<ColorPickerColor, ColorTuple>, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ActionManager } from "../actions/manager";
|
|
2
|
-
import { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "../element/types";
|
|
3
|
-
import { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
|
|
1
|
+
import type { ActionManager } from "../actions/manager";
|
|
2
|
+
import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "../element/types";
|
|
3
|
+
import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
|
|
4
4
|
import "./Actions.scss";
|
|
5
5
|
export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
6
6
|
export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { RoughCanvas } from "roughjs/bin/canvas";
|
|
2
|
+
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
3
3
|
import { ActionManager } from "../actions/manager";
|
|
4
|
-
import { EXPORT_IMAGE_TYPES } from "../constants";
|
|
5
|
-
import { ExportedElements } from "../data";
|
|
4
|
+
import type { EXPORT_IMAGE_TYPES } from "../constants";
|
|
5
|
+
import type { ExportedElements } from "../data";
|
|
6
6
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
7
|
-
import { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "../element/types";
|
|
7
|
+
import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "../element/types";
|
|
8
8
|
import { History } from "../history";
|
|
9
9
|
import Scene from "../scene/Scene";
|
|
10
|
-
import { GeometricShape } from "../../utils/geometry/shape";
|
|
11
|
-
import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload } from "../types";
|
|
12
|
-
import { FileSystemHandle } from "../data/filesystem";
|
|
10
|
+
import type { GeometricShape } from "../../utils/geometry/shape";
|
|
11
|
+
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload } from "../types";
|
|
12
|
+
import type { FileSystemHandle } from "../data/filesystem";
|
|
13
13
|
import { Renderer } from "../scene/Renderer";
|
|
14
14
|
import { Emitter } from "../emitter";
|
|
15
15
|
import { Store } from "../store";
|
|
@@ -359,7 +359,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
359
359
|
/** @default StoreAction.CAPTURE */
|
|
360
360
|
storeAction?: SceneData["storeAction"];
|
|
361
361
|
}) => void;
|
|
362
|
-
private
|
|
362
|
+
private triggerRender;
|
|
363
363
|
/**
|
|
364
364
|
* @returns whether the menu was toggled on or off
|
|
365
365
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../../element/types";
|
|
2
|
-
import { AppState } from "../../types";
|
|
3
|
-
import { ColorPickerType } from "./colorPickerUtils";
|
|
4
|
-
import { ColorTuple, ColorPaletteCustom } from "../../colors";
|
|
1
|
+
import type { ExcalidrawElement } from "../../element/types";
|
|
2
|
+
import type { AppState } from "../../types";
|
|
3
|
+
import type { ColorPickerType } from "./colorPickerUtils";
|
|
4
|
+
import type { ColorTuple, ColorPaletteCustom } from "../../colors";
|
|
5
5
|
import "./ColorPicker.scss";
|
|
6
6
|
export declare const getColor: (color: string) => string | null;
|
|
7
7
|
interface ColorPickerProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ExcalidrawElement } from "../../element/types";
|
|
3
|
-
import { ColorPickerType } from "./colorPickerUtils";
|
|
4
|
-
import { ColorPaletteCustom } from "../../colors";
|
|
2
|
+
import type { ExcalidrawElement } from "../../element/types";
|
|
3
|
+
import type { ColorPickerType } from "./colorPickerUtils";
|
|
4
|
+
import type { ColorPaletteCustom } from "../../colors";
|
|
5
5
|
interface PickerProps {
|
|
6
6
|
color: string;
|
|
7
7
|
onChange: (color: string) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../../element/types";
|
|
2
|
-
import { ColorPickerColor, ColorPaletteCustom } from "../../colors";
|
|
1
|
+
import type { ExcalidrawElement } from "../../element/types";
|
|
2
|
+
import type { ColorPickerColor, ColorPaletteCustom } from "../../colors";
|
|
3
3
|
export declare const getColorNameAndShadeFromColor: ({ palette, color, }: {
|
|
4
4
|
palette: ColorPaletteCustom;
|
|
5
5
|
color: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColorPaletteCustom } from "../../colors";
|
|
2
|
-
import { ActiveColorPickerSectionAtomType } from "./colorPickerUtils";
|
|
1
|
+
import type { ColorPaletteCustom } from "../../colors";
|
|
2
|
+
import type { ActiveColorPickerSectionAtomType } from "./colorPickerUtils";
|
|
3
3
|
interface ColorPickerKeyNavHandlerProps {
|
|
4
4
|
event: React.KeyboardEvent;
|
|
5
5
|
activeColorPickerSection: ActiveColorPickerSectionAtomType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CommandPaletteItem } from "./types";
|
|
1
|
+
import type { CommandPaletteItem } from "./types";
|
|
2
2
|
export declare const toggleTheme: CommandPaletteItem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ActionManager } from "../../actions/manager";
|
|
2
|
-
import { Action } from "../../actions/types";
|
|
3
|
-
import { UIAppState } from "../../types";
|
|
1
|
+
import type { ActionManager } from "../../actions/manager";
|
|
2
|
+
import type { Action } from "../../actions/types";
|
|
3
|
+
import type { UIAppState } from "../../types";
|
|
4
4
|
export type CommandPaletteItem = {
|
|
5
5
|
label: string;
|
|
6
6
|
/** additional keywords to match against
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./ContextMenu.scss";
|
|
2
|
-
import { Action } from "../actions/types";
|
|
3
|
-
import { ActionManager } from "../actions/manager";
|
|
2
|
+
import type { Action } from "../actions/types";
|
|
3
|
+
import type { ActionManager } from "../actions/manager";
|
|
4
4
|
import React from "react";
|
|
5
5
|
export type ContextMenuItem = typeof CONTEXT_MENU_SEPARATOR | Action;
|
|
6
6
|
export type ContextMenuItems = (ContextMenuItem | false | null | undefined)[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MarkOptional } from "../utility-types";
|
|
2
|
-
import { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
|
|
1
|
+
import type { MarkOptional } from "../utility-types";
|
|
2
|
+
import type { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
|
|
3
3
|
export declare const DefaultSidebar: import("react").FC<Omit<MarkOptional<Omit<{
|
|
4
4
|
name: string;
|
|
5
5
|
children: import("react").ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./EyeDropper.scss";
|
|
2
|
-
import { ColorPickerType } from "./ColorPicker/colorPickerUtils";
|
|
3
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { ColorPickerType } from "./ColorPicker/colorPickerUtils";
|
|
3
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
4
4
|
export type EyeDropperProperties = {
|
|
5
5
|
keepOpenOnAlt: boolean;
|
|
6
6
|
swapPreviewOnAlt?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ActionManager } from "../actions/manager";
|
|
2
2
|
import type { AppClassProperties, BinaryFiles, UIAppState } from "../types";
|
|
3
|
-
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
3
|
+
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
4
4
|
import "./ImageExportDialog.scss";
|
|
5
5
|
export declare const ErrorCanvasPreview: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const ImageExportDialog: ({ elements, appState, files, actionManager, onExportImage, onCloseRequest, name, }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Language } from "../i18n";
|
|
3
|
-
import { Theme } from "../element/types";
|
|
2
|
+
import type { Language } from "../i18n";
|
|
3
|
+
import type { Theme } from "../element/types";
|
|
4
4
|
interface Props {
|
|
5
5
|
langCode: Language["code"];
|
|
6
6
|
children: React.ReactElement;
|