@zsviczian/excalidraw 0.18.0-1 → 0.18.0-2
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/README.md +1 -1
- package/dist/excalidraw.development.js +339 -361
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -32
- package/dist/styles.development.css +2976 -2982
- package/dist/styles.production.css +23 -23
- package/package.json +1 -1
- package/types/excalidraw/actions/actionCanvas.d.ts +7 -7
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +1 -1
- package/types/excalidraw/actions/actionExport.d.ts +8 -8
- package/types/excalidraw/actions/actionFrame.d.ts +51 -51
- package/types/excalidraw/actions/actionHistory.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/manager.d.ts +1 -1
- package/types/excalidraw/actions/types.d.ts +2 -2
- package/types/excalidraw/animated-trail.d.ts +1 -1
- package/types/excalidraw/appState.d.ts +8 -8
- package/types/excalidraw/clipboard.d.ts +6 -6
- package/types/excalidraw/components/Actions.d.ts +2 -2
- package/types/excalidraw/components/App.d.ts +7 -7
- package/types/excalidraw/components/Avatar.d.ts +1 -1
- package/types/excalidraw/components/ButtonIcon.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +3 -3
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
- package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
- package/types/excalidraw/components/ConfirmDialog.d.ts +1 -1
- package/types/excalidraw/components/ContextMenu.d.ts +2 -2
- package/types/excalidraw/components/DefaultSidebar.d.ts +1 -1
- package/types/excalidraw/components/DialogActionButton.d.ts +1 -1
- package/types/excalidraw/components/ElementLinkDialog.d.ts +2 -2
- package/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/types/excalidraw/components/FixedSideContainer.d.ts +1 -1
- package/types/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
- package/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
- package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +2 -2
- package/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
- package/types/excalidraw/components/HintViewer.d.ts +1 -1
- package/types/excalidraw/components/IconPicker.d.ts +1 -1
- package/types/excalidraw/components/ImageExportDialog.d.ts +2 -2
- package/types/excalidraw/components/InitializeApp.d.ts +1 -1
- package/types/excalidraw/components/Island.d.ts +1 -1
- package/types/excalidraw/components/JSONExportDialog.d.ts +2 -2
- package/types/excalidraw/components/LayerUI.d.ts +2 -2
- package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -1
- package/types/excalidraw/components/LibraryMenuItems.d.ts +1 -1
- package/types/excalidraw/components/LibraryMenuSection.d.ts +2 -2
- package/types/excalidraw/components/LibraryUnit.d.ts +1 -1
- package/types/excalidraw/components/MagicButton.d.ts +1 -1
- package/types/excalidraw/components/MobileMenu.d.ts +2 -2
- package/types/excalidraw/components/PasteChartDialog.d.ts +1 -1
- package/types/excalidraw/components/PropertiesPopover.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/SidebarTrigger.d.ts +1 -1
- package/types/excalidraw/components/Sidebar/common.d.ts +1 -1
- package/types/excalidraw/components/Stack.d.ts +1 -1
- package/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
- package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
- package/types/excalidraw/components/Stats/index.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/common.d.ts +2 -2
- 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 +2 -2
- package/types/excalidraw/components/Tooltip.d.ts +1 -1
- package/types/excalidraw/components/UserList.d.ts +1 -1
- package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -3
- package/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -1
- package/types/excalidraw/components/canvases/StaticCanvas.d.ts +3 -3
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +1 -1
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
- package/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
- package/types/excalidraw/constants.d.ts +3 -3
- package/types/excalidraw/context/tunnels.d.ts +1 -1
- package/types/excalidraw/data/blob.d.ts +1 -1
- package/types/excalidraw/data/filesystem.d.ts +1 -1
- package/types/excalidraw/data/index.d.ts +1 -1
- package/types/excalidraw/data/library.d.ts +2 -2
- package/types/excalidraw/data/types.d.ts +2 -2
- package/types/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
- package/types/excalidraw/element/binding.d.ts +5 -5
- package/types/excalidraw/element/bounds.d.ts +2 -2
- package/types/excalidraw/element/collision.d.ts +2 -2
- package/types/excalidraw/element/dragElements.d.ts +1 -1
- package/types/excalidraw/element/elbowArrow.d.ts +2 -2
- package/types/excalidraw/element/embeddable.d.ts +1 -1
- package/types/excalidraw/element/linearElementEditor.d.ts +4 -4
- package/types/excalidraw/element/resizeElements.d.ts +3 -3
- package/types/excalidraw/element/resizeTest.d.ts +3 -3
- package/types/excalidraw/element/showSelectedShapeActions.d.ts +1 -1
- package/types/excalidraw/element/textElement.d.ts +1 -1
- package/types/excalidraw/element/transformHandles.d.ts +5 -5
- package/types/excalidraw/element/utils.d.ts +1 -1
- package/types/excalidraw/frame.d.ts +3 -3
- package/types/excalidraw/history.d.ts +1 -1
- package/types/excalidraw/index.d.ts +4 -4
- package/types/excalidraw/laser-trails.d.ts +1 -1
- package/types/excalidraw/renderer/helpers.d.ts +1 -1
- package/types/excalidraw/renderer/renderElement.d.ts +1 -1
- package/types/excalidraw/renderer/staticSvgScene.d.ts +1 -1
- package/types/excalidraw/scene/Renderer.d.ts +1 -1
- package/types/excalidraw/scene/Scene.d.ts +2 -2
- package/types/excalidraw/scene/Shape.d.ts +2 -2
- package/types/excalidraw/scene/ShapeCache.d.ts +3 -3
- package/types/excalidraw/scene/scroll.d.ts +1 -1
- package/types/excalidraw/scene/scrollbars.d.ts +1 -1
- package/types/excalidraw/scene/types.d.ts +3 -3
- package/types/excalidraw/shapes.d.ts +1 -1
- package/types/excalidraw/snapping.d.ts +1 -1
- package/types/excalidraw/store.d.ts +1 -1
- package/types/excalidraw/types.d.ts +12 -12
- package/types/excalidraw/visualdebug.d.ts +1 -1
- package/types/utils/collision.d.ts +3 -3
- package/types/utils/export.d.ts +2 -2
- package/types/utils/geometry/shape.d.ts +1 -1
- package/types/utils/withinBounds.d.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import "./ContextMenu.scss";
|
|
2
|
-
import type { Action } from "../actions/types";
|
|
3
3
|
import type { ActionManager } from "../actions/manager";
|
|
4
|
-
import
|
|
4
|
+
import type { Action } from "../actions/types";
|
|
5
5
|
export type ContextMenuItem = typeof CONTEXT_MENU_SEPARATOR | Action;
|
|
6
6
|
export type ContextMenuItems = (ContextMenuItem | false | null | undefined)[];
|
|
7
7
|
type ContextMenuProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import "../components/dropdownMenu/DropdownMenu.scss";
|
|
1
2
|
import type { MarkOptional } from "../utility-types";
|
|
2
3
|
import type { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
|
|
3
|
-
import "../components/dropdownMenu/DropdownMenu.scss";
|
|
4
4
|
export declare const DefaultSidebar: import("react").FC<Omit<MarkOptional<Omit<{
|
|
5
5
|
name: string;
|
|
6
6
|
children: import("react").ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AppProps, UIAppState } from "../types";
|
|
2
|
-
import type { ElementsMap, ExcalidrawElement } from "../element/types";
|
|
3
1
|
import "./ElementLinkDialog.scss";
|
|
2
|
+
import type { ElementsMap, ExcalidrawElement } from "../element/types";
|
|
3
|
+
import type { AppProps, UIAppState } from "../types";
|
|
4
4
|
declare const ElementLinkDialog: ({ sourceElementId, onClose, elementsMap, appState, generateLinkForSelection, }: {
|
|
5
5
|
sourceElementId: ExcalidrawElement["id"];
|
|
6
6
|
elementsMap: ElementsMap;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./EyeDropper.scss";
|
|
2
|
-
import type { ColorPickerType } from "./ColorPicker/colorPickerUtils";
|
|
3
2
|
import type { ExcalidrawElement } from "../element/types";
|
|
3
|
+
import type { ColorPickerType } from "./ColorPicker/colorPickerUtils";
|
|
4
4
|
export type EyeDropperProperties = {
|
|
5
5
|
keepOpenOnAlt: boolean;
|
|
6
6
|
swapPreviewOnAlt?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { FontFamilyValues } from "../../element/types";
|
|
3
2
|
import "./FontPicker.scss";
|
|
3
|
+
import type { FontFamilyValues } from "../../element/types";
|
|
4
4
|
export declare const DEFAULT_FONTS: {
|
|
5
5
|
value: number;
|
|
6
6
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { JSX } from "react";
|
|
2
1
|
import React from "react";
|
|
3
|
-
import { DropDownMenuItemBadgeType } from "../dropdownMenu/DropdownMenuItem";
|
|
4
2
|
import { type FontFamilyValues } from "../../element/types";
|
|
3
|
+
import { DropDownMenuItemBadgeType } from "../dropdownMenu/DropdownMenuItem";
|
|
5
4
|
import type { ValueOf } from "../../utility-types";
|
|
5
|
+
import type { JSX } from "react";
|
|
6
6
|
export interface FontDescriptor {
|
|
7
7
|
value: number;
|
|
8
8
|
icon: JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Node } from "../../utils";
|
|
2
1
|
import { type FontDescriptor } from "./FontPickerList";
|
|
2
|
+
import type { Node } from "../../utils";
|
|
3
3
|
interface FontPickerKeyNavHandlerProps {
|
|
4
4
|
event: React.KeyboardEvent<HTMLDivElement>;
|
|
5
5
|
inputRef: React.RefObject<HTMLInputElement | null>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import "./ImageExportDialog.scss";
|
|
1
2
|
import type { ActionManager } from "../actions/manager";
|
|
2
|
-
import type { AppClassProperties, BinaryFiles, UIAppState } from "../types";
|
|
3
3
|
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
4
|
-
import "
|
|
4
|
+
import type { AppClassProperties, BinaryFiles, UIAppState } from "../types";
|
|
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, }: {
|
|
7
7
|
appState: UIAppState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
3
|
-
import type { ExportOpts, BinaryFiles, UIAppState } from "../types";
|
|
4
2
|
import "./ExportDialog.scss";
|
|
5
3
|
import type { ActionManager } from "../actions/manager";
|
|
4
|
+
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
5
|
+
import type { ExportOpts, BinaryFiles, UIAppState } from "../types";
|
|
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,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import "./LayerUI.scss";
|
|
3
|
+
import "./Toolbar.scss";
|
|
2
4
|
import type { ActionManager } from "../actions/manager";
|
|
3
5
|
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
4
6
|
import type { Language } from "../i18n";
|
|
5
7
|
import type { AppProps, AppState, ExcalidrawProps, BinaryFiles, UIAppState, AppClassProperties } from "../types";
|
|
6
|
-
import "./LayerUI.scss";
|
|
7
|
-
import "./Toolbar.scss";
|
|
8
8
|
interface LayerUIProps {
|
|
9
9
|
actionManager: ActionManager;
|
|
10
10
|
appState: UIAppState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LibraryItem, UIAppState } from "../types";
|
|
2
1
|
import type Library from "../data/library";
|
|
2
|
+
import type { LibraryItem, UIAppState } from "../types";
|
|
3
3
|
export declare const LibraryDropdownMenuButton: React.FC<{
|
|
4
4
|
setAppState: React.Component<any, UIAppState>["setState"];
|
|
5
5
|
selectedItems: LibraryItem["id"][];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExcalidrawProps, LibraryItem, LibraryItems, UIAppState } from "../types";
|
|
2
1
|
import "./LibraryMenuItems.scss";
|
|
2
|
+
import type { ExcalidrawProps, LibraryItem, LibraryItems, UIAppState } from "../types";
|
|
3
3
|
export default function LibraryMenuItems({ isLoading, libraryItems, onAddToLibrary, onInsertLibraryItems, pendingElements, theme, id, libraryReturnUrl, onSelectItems, selectedItems, }: {
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
libraryItems: LibraryItems;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
1
|
import React from "react";
|
|
3
|
-
import type { LibraryItem } from "../types";
|
|
4
2
|
import type { ExcalidrawElement, NonDeleted } from "../element/types";
|
|
5
3
|
import type { SvgCache } from "../hooks/useLibraryItemSvg";
|
|
4
|
+
import type { LibraryItem } from "../types";
|
|
5
|
+
import type { ReactNode } from "react";
|
|
6
6
|
type LibraryOrPendingItem = (LibraryItem | /* pending library item */ {
|
|
7
7
|
id: null;
|
|
8
8
|
elements: readonly NonDeleted<ExcalidrawElement>[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LibraryItem } from "../types";
|
|
2
1
|
import "./LibraryUnit.scss";
|
|
2
|
+
import type { LibraryItem } from "../types";
|
|
3
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;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { JSX } from "react";
|
|
2
1
|
import React from "react";
|
|
3
|
-
import type { AppClassProperties, AppProps, AppState, Device, ExcalidrawProps, UIAppState } from "../types";
|
|
4
2
|
import type { ActionManager } from "../actions/manager";
|
|
5
3
|
import type { NonDeletedExcalidrawElement } from "../element/types";
|
|
4
|
+
import type { AppClassProperties, AppProps, AppState, Device, ExcalidrawProps, UIAppState } from "../types";
|
|
5
|
+
import type { JSX } from "react";
|
|
6
6
|
type MobileMenuProps = {
|
|
7
7
|
appState: UIAppState;
|
|
8
8
|
actionManager: ActionManager;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { UIAppState } from "../types";
|
|
3
2
|
import "./PasteChartDialog.scss";
|
|
3
|
+
import type { UIAppState } from "../types";
|
|
4
4
|
export declare const PasteChartDialog: ({ setAppState, appState, onClose, }: {
|
|
5
5
|
appState: UIAppState;
|
|
6
6
|
onClose: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LibraryItems, UIAppState } from "../types";
|
|
2
1
|
import "./PublishLibrary.scss";
|
|
2
|
+
import type { LibraryItems, UIAppState } from "../types";
|
|
3
3
|
declare const PublishLibrary: ({ onClose, libraryItems, appState, onSuccess, onError, updateItemsInStorage, onRemove, }: {
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
libraryItems: LibraryItems;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SidebarTriggerProps } from "./common";
|
|
2
1
|
import "./SidebarTrigger.scss";
|
|
2
|
+
import type { SidebarTriggerProps } from "./common";
|
|
3
3
|
export declare const SidebarTrigger: {
|
|
4
4
|
({ name, tab, icon, title, children, onToggle, className, style, }: SidebarTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./DragInput.scss";
|
|
2
2
|
import type { StatsInputProperty } from "./utils";
|
|
3
|
+
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
3
4
|
import type Scene from "../../scene/Scene";
|
|
4
|
-
import "./DragInput.scss";
|
|
5
5
|
import type { AppState } from "../../types";
|
|
6
6
|
export type DragInputCallbackType<P extends StatsInputProperty, E = ExcalidrawElement> = (props: {
|
|
7
7
|
accumulatedChange: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { AtomicUnit } from "./utils";
|
|
1
2
|
import type { ExcalidrawElement, NonDeletedSceneElementsMap } from "../../element/types";
|
|
2
3
|
import type Scene from "../../scene/Scene";
|
|
3
4
|
import type { AppState } from "../../types";
|
|
4
|
-
import type { AtomicUnit } from "./utils";
|
|
5
5
|
interface MultiDimensionProps {
|
|
6
6
|
property: "width" | "height";
|
|
7
7
|
elements: readonly ExcalidrawElement[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { AtomicUnit } from "./utils";
|
|
1
2
|
import type { ElementsMap, ExcalidrawElement } from "../../element/types";
|
|
2
3
|
import type Scene from "../../scene/Scene";
|
|
3
|
-
import type { AtomicUnit } from "./utils";
|
|
4
4
|
import type { AppState } from "../../types";
|
|
5
5
|
interface MultiPositionProps {
|
|
6
6
|
property: "x" | "y";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import "./Stats.scss";
|
|
1
2
|
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
2
3
|
import type { AppClassProperties, AppState, ExcalidrawProps } from "../../types";
|
|
3
|
-
import "./Stats.scss";
|
|
4
4
|
interface StatsProps {
|
|
5
5
|
app: AppClassProperties;
|
|
6
6
|
onClose: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
2
1
|
import "./MermaidToExcalidraw.scss";
|
|
3
2
|
import type { MermaidToExcalidrawLibProps } from "./common";
|
|
3
|
+
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
4
4
|
declare const MermaidToExcalidraw: ({ mermaidToExcalidrawLib, selectedElements, }: {
|
|
5
5
|
mermaidToExcalidrawLib: MermaidToExcalidrawLibProps;
|
|
6
6
|
selectedElements: readonly NonDeletedExcalidrawElement[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MermaidConfig } from "@
|
|
2
|
-
import type { MermaidToExcalidrawResult } from "@
|
|
1
|
+
import type { MermaidConfig } from "@excalidraw/mermaid-to-excalidraw";
|
|
2
|
+
import type { MermaidToExcalidrawResult } from "@excalidraw/mermaid-to-excalidraw/dist/interfaces";
|
|
3
3
|
import type { NonDeletedExcalidrawElement } from "../../element/types";
|
|
4
4
|
import type { AppClassProperties, BinaryFiles } from "../../types";
|
|
5
5
|
export interface MermaidToExcalidrawLibProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./ToolIcon.scss";
|
|
2
|
-
import type { CSSProperties } from "react";
|
|
3
1
|
import React from "react";
|
|
2
|
+
import "./ToolIcon.scss";
|
|
4
3
|
import type { PointerType } from "../element/types";
|
|
4
|
+
import type { CSSProperties } from "react";
|
|
5
5
|
export type ToolButtonSize = "small" | "medium";
|
|
6
6
|
type ToolButtonBaseProps = {
|
|
7
7
|
icon?: React.ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { DOMAttributes } from "react";
|
|
3
|
-
import type { Device, InteractiveCanvasAppState } from "../../types";
|
|
4
|
-
import type { RenderableElementsMap, RenderInteractiveSceneCallback } from "../../scene/types";
|
|
5
2
|
import type { NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "../../element/types";
|
|
3
|
+
import type { RenderableElementsMap, RenderInteractiveSceneCallback } from "../../scene/types";
|
|
4
|
+
import type { Device, InteractiveCanvasAppState } from "../../types";
|
|
5
|
+
import type { DOMAttributes } from "react";
|
|
6
6
|
type InteractiveCanvasProps = {
|
|
7
7
|
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
8
8
|
canvas: HTMLCanvasElement | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NonDeletedSceneElementsMap } from "../../element/types";
|
|
2
|
-
import type { AppState } from "../../types";
|
|
3
2
|
import type { RenderableElementsMap, StaticCanvasRenderConfig } from "../../scene/types";
|
|
3
|
+
import type { AppState } from "../../types";
|
|
4
4
|
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
5
5
|
interface NewElementCanvasProps {
|
|
6
6
|
appState: AppState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
3
|
-
import type { StaticCanvasAppState } from "../../types";
|
|
4
|
-
import type { RenderableElementsMap, StaticCanvasRenderConfig } from "../../scene/types";
|
|
5
2
|
import type { NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "../../element/types";
|
|
3
|
+
import type { RenderableElementsMap, StaticCanvasRenderConfig } from "../../scene/types";
|
|
4
|
+
import type { StaticCanvasAppState } from "../../types";
|
|
5
|
+
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
6
6
|
type StaticCanvasProps = {
|
|
7
7
|
canvas: HTMLCanvasElement;
|
|
8
8
|
rc: RoughCanvas;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { JSX } from "react";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import type { ValueOf } from "../../utility-types";
|
|
3
|
+
import type { JSX } from "react";
|
|
4
4
|
declare const DropdownMenuItem: {
|
|
5
5
|
({ icon, value, order, children, shortcut, className, hovered, selected, textStyle, onSelect, onClick, ...rest }: {
|
|
6
6
|
icon?: JSX.Element | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AppState, ExcalidrawProps, UIAppState } from "../../types";
|
|
2
|
-
import type { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "../../element/types";
|
|
3
1
|
import "./Hyperlink.scss";
|
|
2
|
+
import type { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "../../element/types";
|
|
3
|
+
import type { AppState, ExcalidrawProps, UIAppState } from "../../types";
|
|
4
4
|
export declare const Hyperlink: ({ element, elementsMap, setAppState, onLinkOpen, setToast, updateEmbedValidationStatus, }: {
|
|
5
5
|
element: NonDeletedExcalidrawElement;
|
|
6
6
|
elementsMap: ElementsMap;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AppProps, AppState } from "./types";
|
|
2
1
|
import type { ExcalidrawElement, FontFamilyValues } from "./element/types";
|
|
2
|
+
import type { AppProps, AppState } from "./types";
|
|
3
3
|
export declare const isDarwin: boolean;
|
|
4
4
|
export declare const isWindows: boolean;
|
|
5
5
|
export declare const isAndroid: boolean;
|
|
@@ -199,7 +199,7 @@ export declare const EXPORT_DATA_TYPES: {
|
|
|
199
199
|
export declare const EXPORT_SOURCE: string;
|
|
200
200
|
export declare const IMAGE_RENDER_TIMEOUT = 500;
|
|
201
201
|
export declare const TAP_TWICE_TIMEOUT = 300;
|
|
202
|
-
export declare const TOUCH_CTX_MENU_TIMEOUT =
|
|
202
|
+
export declare const TOUCH_CTX_MENU_TIMEOUT = 500;
|
|
203
203
|
export declare const TITLE_TIMEOUT = 10000;
|
|
204
204
|
export declare const VERSION_TIMEOUT = 30000;
|
|
205
205
|
export declare const SCROLL_TIMEOUT = 100;
|
|
@@ -286,7 +286,7 @@ export declare const DEFAULT_SIDEBAR: {
|
|
|
286
286
|
readonly name: "default";
|
|
287
287
|
readonly defaultTab: "library";
|
|
288
288
|
};
|
|
289
|
-
export declare const LIBRARY_DISABLED_TYPES: Set<"
|
|
289
|
+
export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "iframe" | "image">;
|
|
290
290
|
export declare const TOOL_TYPE: {
|
|
291
291
|
readonly selection: "selection";
|
|
292
292
|
readonly rectangle: "rectangle";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IMAGE_MIME_TYPES, MIME_TYPES } from "../constants";
|
|
2
|
+
import type { FileSystemHandle } from "./filesystem";
|
|
2
3
|
import type { ExcalidrawElement, FileId } from "../element/types";
|
|
3
4
|
import type { AppState, DataURL, LibraryItem } from "../types";
|
|
4
5
|
import type { ValueOf } from "../utility-types";
|
|
5
|
-
import type { FileSystemHandle } from "./filesystem";
|
|
6
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FileSystemHandle } from "browser-fs-access";
|
|
2
1
|
import { supported as nativeFileSystemSupported } from "browser-fs-access";
|
|
3
2
|
import { MIME_TYPES } from "../constants";
|
|
3
|
+
import type { FileSystemHandle } from "browser-fs-access";
|
|
4
4
|
type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">;
|
|
5
5
|
export declare const fileOpen: <M extends boolean | undefined = false>(opts: {
|
|
6
6
|
extensions?: FILE_EXTENSION[] | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { FileSystemHandle } from "./filesystem";
|
|
1
2
|
import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "../element/types";
|
|
2
3
|
import type { ExportType } from "../scene/types";
|
|
3
4
|
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 type { LibraryItems, ExcalidrawImperativeAPI, LibraryItemsSource, LibraryItems_anyVersion } from "../types";
|
|
2
1
|
import type App from "../components/App";
|
|
3
2
|
import type { ExcalidrawElement } from "../element/types";
|
|
3
|
+
import type { LibraryItems, ExcalidrawImperativeAPI, LibraryItemsSource, LibraryItems_anyVersion } from "../types";
|
|
4
4
|
import type { MaybePromise } from "../utility-types";
|
|
5
5
|
export type LibraryPersistedData = {
|
|
6
6
|
libraryItems: LibraryItems;
|
|
@@ -77,7 +77,7 @@ declare class Library {
|
|
|
77
77
|
merge?: boolean | undefined;
|
|
78
78
|
prompt?: boolean | undefined;
|
|
79
79
|
openLibraryMenu?: boolean | undefined;
|
|
80
|
-
defaultStatus?: "
|
|
80
|
+
defaultStatus?: "unpublished" | "published" | undefined;
|
|
81
81
|
}) => Promise<LibraryItems>;
|
|
82
82
|
setLibrary: (libraryItems: LibraryItems | Promise<LibraryItems> | ((latestLibraryItems: LibraryItems) => LibraryItems | Promise<LibraryItems>)) => Promise<LibraryItems>;
|
|
83
83
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ExcalidrawElement } from "../element/types";
|
|
2
|
-
import type { AppState, BinaryFiles, LibraryItems, LibraryItems_anyVersion } from "../types";
|
|
3
1
|
import type { cleanAppStateForExport } from "../appState";
|
|
4
2
|
import type { VERSIONS } from "../constants";
|
|
3
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
4
|
+
import type { AppState, BinaryFiles, LibraryItems, LibraryItems_anyVersion } from "../types";
|
|
5
5
|
export interface ExportedDataState {
|
|
6
6
|
type: string;
|
|
7
7
|
version: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ElementsMap, NonDeletedExcalidrawElement } from "./types";
|
|
2
1
|
import "./ElementCanvasButtons.scss";
|
|
2
|
+
import type { ElementsMap, NonDeletedExcalidrawElement } from "./types";
|
|
3
3
|
export declare const ElementCanvasButtons: ({ children, element, elementsMap, }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
element: NonDeletedExcalidrawElement;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { LocalPoint } from "@excalidraw/math";
|
|
3
|
+
import { type Heading } from "./heading";
|
|
2
4
|
import type { Bounds } from "./bounds";
|
|
3
|
-
import type { AppState } from "../types";
|
|
4
5
|
import type { ElementUpdate } from "./mutateElement";
|
|
6
|
+
import type { ExcalidrawBindableElement, ExcalidrawElement, NonDeleted, ExcalidrawLinearElement, NonDeletedExcalidrawElement, ElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, ExcalidrawElbowArrowElement, FixedPoint, SceneElementsMap } from "./types";
|
|
5
7
|
import type Scene from "../scene/Scene";
|
|
6
|
-
import {
|
|
7
|
-
import type { LocalPoint } from "@excalidraw/math";
|
|
8
|
-
import { type GlobalPoint } from "@excalidraw/math";
|
|
8
|
+
import type { AppState } from "../types";
|
|
9
9
|
export type SuggestedBinding = NonDeleted<ExcalidrawBindableElement> | SuggestedPointBinding;
|
|
10
10
|
export type SuggestedPointBinding = [
|
|
11
11
|
NonDeleted<ExcalidrawLinearElement>,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Degrees, GlobalPoint, LineSegment } from "@excalidraw/math";
|
|
2
|
+
import type { AppState } from "../types";
|
|
1
3
|
import type { ExcalidrawElement, ExcalidrawLinearElement, Arrowhead, ExcalidrawFreeDrawElement, NonDeleted, ElementsMap } from "./types";
|
|
2
4
|
import type { Drawable, Op } from "roughjs/bin/core";
|
|
3
|
-
import type { AppState } from "../types";
|
|
4
|
-
import type { Degrees, GlobalPoint, LineSegment } from "@excalidraw/math";
|
|
5
5
|
export type RectangleBox = {
|
|
6
6
|
x: number;
|
|
7
7
|
y: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { GlobalPoint, LineSegment, LocalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { GeometricShape } from "@excalidraw/utils/geometry/shape";
|
|
1
3
|
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
2
4
|
import type { FrameNameBounds } from "../types";
|
|
3
|
-
import type { GeometricShape } from "@excalidraw/utils/geometry/shape";
|
|
4
|
-
import type { GlobalPoint, LineSegment, LocalPoint } from "@excalidraw/math";
|
|
5
5
|
export declare const shouldTestInside: (element: ExcalidrawElement) => boolean;
|
|
6
6
|
export type HitTestArgs<Point extends GlobalPoint | LocalPoint> = {
|
|
7
7
|
x: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NonDeletedExcalidrawElement } from "./types";
|
|
2
|
-
import type { AppState, NormalizedZoomValue, NullableGridSize, PointerDownState } from "../types";
|
|
3
2
|
import type Scene from "../scene/Scene";
|
|
3
|
+
import type { AppState, NormalizedZoomValue, NullableGridSize, PointerDownState } from "../types";
|
|
4
4
|
export declare const dragSelectedElements: (pointerDownState: PointerDownState, _selectedElements: NonDeletedExcalidrawElement[], offset: {
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|