@zsviczian/excalidraw 0.17.1-obsidian-20 → 0.17.1-obsidian-22
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 +217 -96
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/styles.development.css +88 -63
- package/dist/styles.production.css +6 -6
- package/package.json +2 -1
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +4 -4
- package/types/excalidraw/actions/actionAlign.d.ts +22 -22
- package/types/excalidraw/actions/actionBoundText.d.ts +10 -10
- package/types/excalidraw/actions/actionCanvas.d.ts +68 -68
- package/types/excalidraw/actions/actionClipboard.d.ts +24 -24
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +10 -10
- package/types/excalidraw/actions/actionDistribute.d.ts +10 -10
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +7 -8
- package/types/excalidraw/actions/actionElementLock.d.ts +9 -9
- package/types/excalidraw/actions/actionExport.d.ts +33 -33
- package/types/excalidraw/actions/actionFinalize.d.ts +9 -9
- package/types/excalidraw/actions/actionFlip.d.ts +10 -10
- package/types/excalidraw/actions/actionFrame.d.ts +16 -204
- package/types/excalidraw/actions/actionGroup.d.ts +12 -388
- package/types/excalidraw/actions/actionHistory.d.ts +4 -3
- package/types/excalidraw/actions/actionLinearEditor.d.ts +6 -4
- package/types/excalidraw/actions/actionLink.d.ts +5 -5
- package/types/excalidraw/actions/actionMenu.d.ts +8 -8
- package/types/excalidraw/actions/actionNavigate.d.ts +4 -4
- package/types/excalidraw/actions/actionProperties.d.ts +34 -34
- package/types/excalidraw/actions/actionSelectAll.d.ts +5 -5
- package/types/excalidraw/actions/actionStyles.d.ts +9 -12
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +17 -0
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +7 -5
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleStats.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
- package/types/excalidraw/actions/actionZindex.d.ts +22 -19
- package/types/excalidraw/actions/manager.d.ts +5 -5
- 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 +8 -8
- package/types/excalidraw/align.d.ts +1 -1
- package/types/excalidraw/animated-trail.d.ts +2 -2
- package/types/excalidraw/appState.d.ts +5 -5
- package/types/excalidraw/change.d.ts +191 -0
- 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 +28 -14
- 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/RadioGroup.d.ts +2 -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 +4 -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 +3 -2
- package/types/excalidraw/components/canvases/StaticCanvas.d.ts +2 -2
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +17 -0
- 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 +6 -1
- package/types/excalidraw/components/main-menu/DefaultItems.d.ts +12 -2
- package/types/excalidraw/constants.d.ts +5 -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 +6 -0
- package/types/excalidraw/data/resave.d.ts +2 -2
- package/types/excalidraw/data/restore.d.ts +5 -5
- package/types/excalidraw/data/transform.d.ts +4 -4
- package/types/excalidraw/data/types.d.ts +3 -3
- package/types/excalidraw/data/url.d.ts +1 -0
- package/types/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
- package/types/excalidraw/element/binding.d.ts +52 -9
- package/types/excalidraw/element/bounds.d.ts +3 -4
- package/types/excalidraw/element/collision.d.ts +14 -19
- 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 +9 -6
- package/types/excalidraw/element/image.d.ts +2 -2
- package/types/excalidraw/element/index.d.ts +2 -3
- package/types/excalidraw/element/linearElementEditor.d.ts +12 -12
- package/types/excalidraw/element/mutateElement.d.ts +4 -5
- package/types/excalidraw/element/newElement.d.ts +4 -11
- package/types/excalidraw/element/resizeElements.d.ts +4 -4
- package/types/excalidraw/element/resizeTest.d.ts +7 -7
- 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 +5 -6
- package/types/excalidraw/element/textWysiwyg.d.ts +10 -5
- package/types/excalidraw/element/transformHandles.d.ts +24 -6
- package/types/excalidraw/element/typeChecks.d.ts +4 -4
- package/types/excalidraw/element/types.d.ts +33 -10
- package/types/excalidraw/emitter.d.ts +1 -1
- package/types/excalidraw/errors.d.ts +3 -0
- package/types/excalidraw/fractionalIndex.d.ts +40 -0
- package/types/excalidraw/frame.d.ts +4 -4
- package/types/excalidraw/gatransforms.d.ts +1 -1
- package/types/excalidraw/gesture.d.ts +1 -1
- package/types/excalidraw/groups.d.ts +5 -3
- package/types/excalidraw/history.d.ts +35 -47
- package/types/excalidraw/hooks/useEmitter.d.ts +2 -0
- package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/types/excalidraw/i18n.d.ts +1 -1
- package/types/excalidraw/index.d.ts +5 -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 +2 -2
- 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 +19 -12
- 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 +5 -4
- package/types/excalidraw/scene/zoom.d.ts +1 -1
- package/types/excalidraw/snapping.d.ts +4 -4
- package/types/excalidraw/store.d.ts +99 -0
- package/types/excalidraw/types.d.ts +38 -20
- package/types/excalidraw/utils.d.ts +11 -4
- package/types/excalidraw/webpack.prod.config.d.ts +1 -1
- package/types/excalidraw/zindex.d.ts +4 -4
- package/types/utils/bbox.d.ts +2 -2
- package/types/utils/collision.d.ts +4 -0
- package/types/utils/export.d.ts +4 -4
- package/types/utils/geometry/geometry.d.ts +71 -0
- package/types/utils/geometry/shape.d.ts +56 -0
- package/types/utils/withinBounds.d.ts +1 -1
|
@@ -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;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
3
|
-
import { ExportOpts, BinaryFiles, UIAppState } from "../types";
|
|
2
|
+
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
3
|
+
import type { ExportOpts, BinaryFiles, UIAppState } from "../types";
|
|
4
4
|
import "./ExportDialog.scss";
|
|
5
|
-
import { ActionManager } from "../actions/manager";
|
|
5
|
+
import type { ActionManager } from "../actions/manager";
|
|
6
6
|
export type ExportCB = (elements: readonly NonDeletedExcalidrawElement[], scale?: number) => void;
|
|
7
7
|
export declare const JSONExportDialog: ({ elements, appState, files, actionManager, exportOpts, canvas, setAppState, }: {
|
|
8
8
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ActionManager } from "../actions/manager";
|
|
3
|
-
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
4
|
-
import { Language } from "../i18n";
|
|
5
|
-
import { AppProps, AppState, ExcalidrawProps, BinaryFiles, UIAppState, AppClassProperties } from "../types";
|
|
2
|
+
import type { ActionManager } from "../actions/manager";
|
|
3
|
+
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
4
|
+
import type { Language } from "../i18n";
|
|
5
|
+
import type { AppProps, AppState, ExcalidrawProps, BinaryFiles, UIAppState, AppClassProperties } from "../types";
|
|
6
6
|
import "./LayerUI.scss";
|
|
7
7
|
import "./Toolbar.scss";
|
|
8
8
|
interface LayerUIProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Library from "../data/library";
|
|
3
|
-
import { LibraryItems, LibraryItem, ExcalidrawProps, UIAppState } from "../types";
|
|
2
|
+
import type Library from "../data/library";
|
|
3
|
+
import type { LibraryItems, LibraryItem, ExcalidrawProps, UIAppState } from "../types";
|
|
4
4
|
import "./LibraryMenu.scss";
|
|
5
5
|
export declare const isLibraryMenuOpenAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
6
6
|
init: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExcalidrawProps, UIAppState } from "../types";
|
|
1
|
+
import type { ExcalidrawProps, UIAppState } from "../types";
|
|
2
2
|
declare const LibraryMenuBrowseButton: ({ theme, id, libraryReturnUrl, }: {
|
|
3
3
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
4
4
|
theme: UIAppState["theme"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExcalidrawProps, UIAppState } from "../types";
|
|
1
|
+
import type { ExcalidrawProps, UIAppState } from "../types";
|
|
2
2
|
export declare const LibraryMenuControlButtons: ({ libraryReturnUrl, theme, id, style, children, className, }: {
|
|
3
3
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
4
4
|
theme: UIAppState["theme"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LibraryItem, UIAppState } from "../types";
|
|
2
|
-
import Library from "../data/library";
|
|
1
|
+
import type { LibraryItem, UIAppState } from "../types";
|
|
2
|
+
import type Library from "../data/library";
|
|
3
3
|
export declare const LibraryDropdownMenuButton: React.FC<{
|
|
4
4
|
setAppState: React.Component<any, UIAppState>["setState"];
|
|
5
5
|
selectedItems: LibraryItem["id"][];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExcalidrawProps, LibraryItem, LibraryItems, UIAppState } from "../types";
|
|
1
|
+
import type { ExcalidrawProps, LibraryItem, LibraryItems, UIAppState } from "../types";
|
|
2
2
|
import "./LibraryMenuItems.scss";
|
|
3
3
|
export default function LibraryMenuItems({ isLoading, libraryItems, onAddToLibrary, onInsertLibraryItems, pendingElements, theme, id, libraryReturnUrl, onSelectItems, selectedItems, }: {
|
|
4
4
|
isLoading: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { LibraryItem } from "../types";
|
|
4
|
+
import type { ExcalidrawElement, NonDeleted } from "../element/types";
|
|
5
|
+
import type { SvgCache } from "../hooks/useLibraryItemSvg";
|
|
5
6
|
type LibraryOrPendingItem = (LibraryItem | /* pending library item */ {
|
|
6
7
|
id: null;
|
|
7
8
|
elements: readonly NonDeleted<ExcalidrawElement>[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LibraryItem } from "../types";
|
|
1
|
+
import type { LibraryItem } from "../types";
|
|
2
2
|
import "./LibraryUnit.scss";
|
|
3
|
-
import { SvgCache } from "../hooks/useLibraryItemSvg";
|
|
3
|
+
import type { SvgCache } from "../hooks/useLibraryItemSvg";
|
|
4
4
|
export declare const LibraryUnit: import("react").MemoExoticComponent<({ id, elements, isPending, onClick, selected, onToggle, onDrag, svgCache, }: {
|
|
5
5
|
id: LibraryItem["id"] | /** for pending item */ null;
|
|
6
6
|
elements?: readonly import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AppClassProperties, AppProps, AppState, Device, ExcalidrawProps, UIAppState } from "../types";
|
|
3
|
-
import { ActionManager } from "../actions/manager";
|
|
4
|
-
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppClassProperties, AppProps, AppState, Device, ExcalidrawProps, UIAppState } from "../types";
|
|
3
|
+
import type { ActionManager } from "../actions/manager";
|
|
4
|
+
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
5
5
|
type MobileMenuProps = {
|
|
6
6
|
appState: UIAppState;
|
|
7
7
|
actionManager: ActionManager;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LibraryItems, UIAppState } from "../types";
|
|
1
|
+
import type { LibraryItems, UIAppState } from "../types";
|
|
2
2
|
import "./PublishLibrary.scss";
|
|
3
3
|
declare const PublishLibrary: ({ onClose, libraryItems, appState, onSuccess, onError, updateItemsInStorage, onRemove, }: {
|
|
4
4
|
onClose: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SidebarTriggerProps } from "./common";
|
|
1
|
+
import type { SidebarTriggerProps } from "./common";
|
|
2
2
|
import "./SidebarTrigger.scss";
|
|
3
3
|
export declare const SidebarTrigger: {
|
|
4
4
|
({ name, tab, icon, title, children, onToggle, className, style, }: SidebarTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
3
|
-
import { ExcalidrawProps, UIAppState } from "../types";
|
|
2
|
+
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
3
|
+
import type { ExcalidrawProps, UIAppState } from "../types";
|
|
4
4
|
import "./Stats.scss";
|
|
5
5
|
export declare const Stats: (props: {
|
|
6
6
|
appState: UIAppState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExcalidrawElement, NonDeletedExcalidrawElement } from "../../element/types";
|
|
1
|
+
import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "../../element/types";
|
|
2
2
|
import "./MermaidToExcalidraw.scss";
|
|
3
|
-
import { MermaidToExcalidrawLibProps } from "./common";
|
|
3
|
+
import type { MermaidToExcalidrawLibProps } from "./common";
|
|
4
4
|
import { MermaidOptions } from "@zsviczian/mermaid-to-excalidraw";
|
|
5
5
|
declare const MermaidToExcalidraw: ({ mermaidToExcalidrawLib, selectedElements, }: {
|
|
6
6
|
mermaidToExcalidrawLib: MermaidToExcalidrawLibProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MermaidOptions } from "@zsviczian/mermaid-to-excalidraw";
|
|
2
|
-
import { MermaidToExcalidrawResult } from "@zsviczian/mermaid-to-excalidraw/dist/interfaces";
|
|
3
|
-
import { NonDeletedExcalidrawElement } from "../../element/types";
|
|
4
|
-
import { AppClassProperties, BinaryFiles } from "../../types";
|
|
1
|
+
import type { MermaidOptions } from "@zsviczian/mermaid-to-excalidraw";
|
|
2
|
+
import type { MermaidToExcalidrawResult } from "@zsviczian/mermaid-to-excalidraw/dist/interfaces";
|
|
3
|
+
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
4
|
+
import type { AppClassProperties, BinaryFiles } from "../../types";
|
|
5
5
|
export interface MermaidToExcalidrawLibProps {
|
|
6
6
|
loaded: boolean;
|
|
7
7
|
api: Promise<{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "./ToolIcon.scss";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import type { PointerType } from "../element/types";
|
|
4
5
|
export type ToolButtonSize = "small" | "medium";
|
|
5
6
|
type ToolButtonBaseProps = {
|
|
6
7
|
icon?: React.ReactNode;
|
|
@@ -17,6 +18,7 @@ type ToolButtonBaseProps = {
|
|
|
17
18
|
hidden?: boolean;
|
|
18
19
|
visible?: boolean;
|
|
19
20
|
selected?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
20
22
|
className?: string;
|
|
21
23
|
style?: CSSProperties;
|
|
22
24
|
isLoading?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TranslationKeys } from "../i18n";
|
|
2
|
+
import type { TranslationKeys } from "../i18n";
|
|
3
3
|
declare const Trans: ({ i18nKey, children, ...props }: {
|
|
4
4
|
[key: string]: React.ReactNode | ((el: React.ReactNode) => React.ReactNode);
|
|
5
5
|
i18nKey: TranslationKeys;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { DOMAttributes } from "react";
|
|
3
|
-
import type { InteractiveCanvasAppState } from "../../types";
|
|
3
|
+
import type { Device, InteractiveCanvasAppState } from "../../types";
|
|
4
4
|
import type { RenderableElementsMap, RenderInteractiveSceneCallback } from "../../scene/types";
|
|
5
5
|
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
6
6
|
type InteractiveCanvasProps = {
|
|
@@ -9,10 +9,11 @@ type InteractiveCanvasProps = {
|
|
|
9
9
|
elementsMap: RenderableElementsMap;
|
|
10
10
|
visibleElements: readonly NonDeletedExcalidrawElement[];
|
|
11
11
|
selectedElements: readonly NonDeletedExcalidrawElement[];
|
|
12
|
-
|
|
12
|
+
sceneNonce: number | undefined;
|
|
13
13
|
selectionNonce: number | undefined;
|
|
14
14
|
scale: number;
|
|
15
15
|
appState: InteractiveCanvasAppState;
|
|
16
|
+
device: Device;
|
|
16
17
|
renderInteractiveSceneCallback: (data: RenderInteractiveSceneCallback) => void;
|
|
17
18
|
handleCanvasRef: (canvas: HTMLCanvasElement | null) => void;
|
|
18
19
|
onContextMenu: Exclude<DOMAttributes<HTMLCanvasElement | HTMLDivElement>["onContextMenu"], undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { RoughCanvas } from "roughjs/bin/canvas";
|
|
2
|
+
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
3
3
|
import type { StaticCanvasAppState } from "../../types";
|
|
4
4
|
import type { RenderableElementsMap, StaticCanvasRenderConfig } from "../../scene/types";
|
|
5
5
|
import type { NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "../../element/types";
|
|
@@ -9,7 +9,7 @@ type StaticCanvasProps = {
|
|
|
9
9
|
elementsMap: RenderableElementsMap;
|
|
10
10
|
allElementsMap: NonDeletedSceneElementsMap;
|
|
11
11
|
visibleElements: readonly NonDeletedExcalidrawElement[];
|
|
12
|
-
|
|
12
|
+
sceneNonce: number | undefined;
|
|
13
13
|
selectionNonce: number | undefined;
|
|
14
14
|
scale: number;
|
|
15
15
|
appState: StaticCanvasAppState;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type Props<T> = {
|
|
2
|
+
value: T;
|
|
3
|
+
shortcut?: string;
|
|
4
|
+
choices: {
|
|
5
|
+
value: T;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
}[];
|
|
9
|
+
onChange: (value: T) => void;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
declare const DropdownMenuItemContentRadio: {
|
|
14
|
+
<T>({ value, shortcut, onChange, choices, children, name, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
export default DropdownMenuItemContentRadio;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionManager } from "../../actions/manager";
|
|
2
|
-
import { UIAppState } from "../../types";
|
|
1
|
+
import type { ActionManager } from "../../actions/manager";
|
|
2
|
+
import type { UIAppState } from "../../types";
|
|
3
3
|
declare const Footer: {
|
|
4
4
|
({ appState, actionManager, showExitZenModeBtn, renderWelcomeScreen, }: {
|
|
5
5
|
appState: UIAppState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AppState, ExcalidrawProps, UIAppState } from "../../types";
|
|
2
|
-
import { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "../../element/types";
|
|
1
|
+
import type { AppState, ExcalidrawProps, UIAppState } from "../../types";
|
|
2
|
+
import type { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "../../element/types";
|
|
3
3
|
import "./Hyperlink.scss";
|
|
4
4
|
export declare const Hyperlink: ({ element, elementsMap, setAppState, onLinkOpen, setToast, updateEmbedValidationStatus, }: {
|
|
5
5
|
element: NonDeletedExcalidrawElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Bounds } from "../../element/bounds";
|
|
2
|
-
import { ElementsMap, NonDeletedExcalidrawElement } from "../../element/types";
|
|
3
|
-
import { AppState, UIAppState } from "../../types";
|
|
1
|
+
import type { Bounds } from "../../element/bounds";
|
|
2
|
+
import type { ElementsMap, NonDeletedExcalidrawElement } from "../../element/types";
|
|
3
|
+
import type { AppState, UIAppState } from "../../types";
|
|
4
4
|
export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
|
|
5
5
|
export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: number, appState: Pick<UIAppState, "zoom">) => Bounds;
|
|
6
6
|
export declare const isPointHittingLinkIcon: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: readonly [number, number]) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Theme } from "../element/types";
|
|
2
|
+
import type { Theme } from "../element/types";
|
|
3
3
|
export declare const iconFillColor: (theme: Theme) => string;
|
|
4
4
|
type Opts = {
|
|
5
5
|
width?: number;
|
|
@@ -196,4 +196,9 @@ export declare const svgIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
196
196
|
export declare const pngIcon: import("react/jsx-runtime").JSX.Element;
|
|
197
197
|
export declare const magnetIcon: import("react/jsx-runtime").JSX.Element;
|
|
198
198
|
export declare const coffeeIcon: import("react/jsx-runtime").JSX.Element;
|
|
199
|
+
export declare const DeviceDesktopIcon: import("react/jsx-runtime").JSX.Element;
|
|
200
|
+
export declare const loginIcon: import("react/jsx-runtime").JSX.Element;
|
|
201
|
+
export declare const youtubeIcon: import("react/jsx-runtime").JSX.Element;
|
|
202
|
+
export declare const gridIcon: import("react/jsx-runtime").JSX.Element;
|
|
203
|
+
export declare const lineEditorIcon: import("react/jsx-runtime").JSX.Element;
|
|
199
204
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Theme } from "../../element/types";
|
|
1
2
|
import "./DefaultItems.scss";
|
|
2
3
|
export declare const LoadScene: {
|
|
3
4
|
(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -12,7 +13,9 @@ export declare const SaveAsImage: {
|
|
|
12
13
|
displayName: string;
|
|
13
14
|
};
|
|
14
15
|
export declare const CommandPalette: {
|
|
15
|
-
(
|
|
16
|
+
(opts?: {
|
|
17
|
+
className?: string;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
19
|
displayName: string;
|
|
17
20
|
};
|
|
18
21
|
export declare const Help: {
|
|
@@ -24,7 +27,14 @@ export declare const ClearCanvas: {
|
|
|
24
27
|
displayName: string;
|
|
25
28
|
};
|
|
26
29
|
export declare const ToggleTheme: {
|
|
27
|
-
(
|
|
30
|
+
(props: {
|
|
31
|
+
allowSystemTheme: true;
|
|
32
|
+
theme: Theme | "system";
|
|
33
|
+
onSelect: (theme: Theme | "system") => void;
|
|
34
|
+
} | {
|
|
35
|
+
allowSystemTheme?: false | undefined;
|
|
36
|
+
onSelect?: ((theme: Theme) => void) | undefined;
|
|
37
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
28
38
|
displayName: string;
|
|
29
39
|
};
|
|
30
40
|
export declare const ChangeCanvasBackground: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AppProps } from "./types";
|
|
2
|
-
import { ExcalidrawElement, FontFamilyValues } from "./element/types";
|
|
1
|
+
import type { AppProps } from "./types";
|
|
2
|
+
import type { ExcalidrawElement, FontFamilyValues } from "./element/types";
|
|
3
3
|
export declare const isDarwin: boolean;
|
|
4
4
|
export declare const isWindows: boolean;
|
|
5
5
|
export declare const isAndroid: boolean;
|
|
@@ -124,6 +124,8 @@ export declare const DEFAULT_TEXT_ALIGN = "left";
|
|
|
124
124
|
export declare const DEFAULT_VERTICAL_ALIGN = "top";
|
|
125
125
|
export declare const DEFAULT_VERSION = "{version}";
|
|
126
126
|
export declare const DEFAULT_TRANSFORM_HANDLE_SPACING = 2;
|
|
127
|
+
export declare const SIDE_RESIZING_THRESHOLD: number;
|
|
128
|
+
export declare const DEFAULT_COLLISION_THRESHOLD: number;
|
|
127
129
|
export declare const COLOR_WHITE = "#ffffff";
|
|
128
130
|
export declare const COLOR_CHARCOAL_BLACK = "#1e1e1e";
|
|
129
131
|
export declare const COLOR_VOICE_CALL = "#a2f1a6";
|
|
@@ -178,6 +180,7 @@ export declare const VERSION_TIMEOUT = 30000;
|
|
|
178
180
|
export declare const SCROLL_TIMEOUT = 100;
|
|
179
181
|
export declare const ZOOM_STEP = 0.05;
|
|
180
182
|
export declare const MIN_ZOOM = 0.1;
|
|
183
|
+
export declare const MAX_ZOOM = 30;
|
|
181
184
|
export declare const HYPERLINK_TOOLTIP_DELAY = 300;
|
|
182
185
|
export declare const IDLE_THRESHOLD = 60000;
|
|
183
186
|
export declare const ACTIVE_THRESHOLD = 3000;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppState } from "./types";
|
|
1
|
+
import type { AppState } from "./types";
|
|
2
2
|
export declare const resetCursor: (interactiveCanvas: HTMLCanvasElement | null) => void;
|
|
3
3
|
export declare const setCursor: (interactiveCanvas: HTMLCanvasElement | null, cursor: string) => void;
|
|
4
4
|
export declare const setEraserCursor: (interactiveCanvas: HTMLCanvasElement | null, theme: AppState["theme"]) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EDITOR_LS_KEYS } from "../constants";
|
|
2
|
-
import { JSONValue } from "../types";
|
|
1
|
+
import type { EDITOR_LS_KEYS } from "../constants";
|
|
2
|
+
import type { JSONValue } from "../types";
|
|
3
3
|
export declare class EditorLocalStorage {
|
|
4
4
|
static has(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): boolean;
|
|
5
5
|
static get<T extends JSONValue>(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): T | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IMAGE_MIME_TYPES, MIME_TYPES } from "../constants";
|
|
2
|
-
import { ExcalidrawElement, FileId } from "../element/types";
|
|
3
|
-
import { AppState, DataURL, LibraryItem } from "../types";
|
|
4
|
-
import { ValueOf } from "../utility-types";
|
|
5
|
-
import { FileSystemHandle } from "./filesystem";
|
|
6
|
-
import { ImportedLibraryData } from "./types";
|
|
2
|
+
import type { ExcalidrawElement, FileId } from "../element/types";
|
|
3
|
+
import type { AppState, DataURL, LibraryItem } from "../types";
|
|
4
|
+
import type { ValueOf } from "../utility-types";
|
|
5
|
+
import type { FileSystemHandle } from "./filesystem";
|
|
6
|
+
import type { ImportedLibraryData } from "./types";
|
|
7
7
|
export declare const getMimeType: (blob: Blob | string) => string;
|
|
8
8
|
export declare const getFileHandleType: (handle: FileSystemHandle | null) => string | null;
|
|
9
9
|
export declare const isImageFileHandleType: (type: string | null) => type is "png" | "svg";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FileSystemHandle
|
|
1
|
+
import type { FileSystemHandle } from "browser-fs-access";
|
|
2
|
+
import { supported as nativeFileSystemSupported } from "browser-fs-access";
|
|
2
3
|
import { MIME_TYPES } from "../constants";
|
|
3
4
|
type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">;
|
|
4
5
|
export declare const fileOpen: <M extends boolean | undefined = false>(opts: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "../element/types";
|
|
2
|
-
import { ExportType } from "../scene/types";
|
|
3
|
-
import { AppState, BinaryFiles } from "../types";
|
|
4
|
-
import { FileSystemHandle } from "./filesystem";
|
|
1
|
+
import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { ExportType } from "../scene/types";
|
|
3
|
+
import type { AppState, BinaryFiles } from "../types";
|
|
4
|
+
import type { FileSystemHandle } from "./filesystem";
|
|
5
5
|
export { loadFromBlob } from "./blob";
|
|
6
6
|
export { loadFromJSON, saveAsJSON } from "./json";
|
|
7
7
|
export type ExportedElements = readonly NonDeletedExcalidrawElement[] & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppState, BinaryFiles, LibraryItems } from "../types";
|
|
3
|
-
import { ImportedDataState, ImportedLibraryData } from "./types";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppState, BinaryFiles, LibraryItems } from "../types";
|
|
3
|
+
import type { ImportedDataState, ImportedLibraryData } from "./types";
|
|
4
4
|
export declare const serializeAsJSON: (elements: readonly ExcalidrawElement[], appState: Partial<AppState>, files: BinaryFiles, type: "local" | "database") => string;
|
|
5
5
|
export declare const saveAsJSON: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles, name?: string) => Promise<{
|
|
6
6
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { LibraryItems, ExcalidrawImperativeAPI, LibraryItemsSource, LibraryItems_anyVersion } from "../types";
|
|
1
|
+
import type { LibraryItems, ExcalidrawImperativeAPI, LibraryItemsSource, LibraryItems_anyVersion } from "../types";
|
|
2
2
|
import type App from "../components/App";
|
|
3
|
-
import { ExcalidrawElement } from "../element/types";
|
|
4
|
-
import { MaybePromise } from "../utility-types";
|
|
3
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
4
|
+
import type { MaybePromise } from "../utility-types";
|
|
5
5
|
export type LibraryPersistedData = {
|
|
6
6
|
libraryItems: LibraryItems;
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Theme } from "../element/types";
|
|
2
|
-
import { DataURL } from "../types";
|
|
3
|
-
import { OpenAIOutput } from "./ai/types";
|
|
1
|
+
import type { Theme } from "../element/types";
|
|
2
|
+
import type { DataURL } from "../types";
|
|
3
|
+
import type { OpenAIOutput } from "./ai/types";
|
|
4
4
|
export type MagicCacheData = {
|
|
5
5
|
status: "pending";
|
|
6
6
|
} | {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { OrderedExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppState } from "../types";
|
|
3
|
+
import type { MakeBrand } from "../utility-types";
|
|
4
|
+
export type ReconciledExcalidrawElement = OrderedExcalidrawElement & MakeBrand<"ReconciledElement">;
|
|
5
|
+
export type RemoteExcalidrawElement = OrderedExcalidrawElement & MakeBrand<"RemoteExcalidrawElement">;
|
|
6
|
+
export declare const reconcileElements: (localElements: readonly OrderedExcalidrawElement[], remoteElements: readonly RemoteExcalidrawElement[], localAppState: AppState) => ReconciledExcalidrawElement[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppState, BinaryFiles } from "../types";
|
|
1
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { AppState, BinaryFiles } from "../types";
|
|
3
3
|
export declare const resaveAsImageWithScene: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles, name: string) => Promise<{
|
|
4
4
|
fileHandle: import("browser-fs-access").FileSystemHandle;
|
|
5
5
|
}>;
|