@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.
Files changed (122) hide show
  1. package/README.md +1 -1
  2. package/dist/excalidraw.development.js +339 -361
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -32
  5. package/dist/styles.development.css +2976 -2982
  6. package/dist/styles.production.css +23 -23
  7. package/package.json +1 -1
  8. package/types/excalidraw/actions/actionCanvas.d.ts +7 -7
  9. package/types/excalidraw/actions/actionDeleteSelected.d.ts +1 -1
  10. package/types/excalidraw/actions/actionExport.d.ts +8 -8
  11. package/types/excalidraw/actions/actionFrame.d.ts +51 -51
  12. package/types/excalidraw/actions/actionHistory.d.ts +1 -1
  13. package/types/excalidraw/actions/actionProperties.d.ts +2 -2
  14. package/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
  15. package/types/excalidraw/actions/manager.d.ts +1 -1
  16. package/types/excalidraw/actions/types.d.ts +2 -2
  17. package/types/excalidraw/animated-trail.d.ts +1 -1
  18. package/types/excalidraw/appState.d.ts +8 -8
  19. package/types/excalidraw/clipboard.d.ts +6 -6
  20. package/types/excalidraw/components/Actions.d.ts +2 -2
  21. package/types/excalidraw/components/App.d.ts +7 -7
  22. package/types/excalidraw/components/Avatar.d.ts +1 -1
  23. package/types/excalidraw/components/ButtonIcon.d.ts +1 -1
  24. package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +3 -3
  25. package/types/excalidraw/components/ColorPicker/Picker.d.ts +1 -1
  26. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  27. package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  28. package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
  29. package/types/excalidraw/components/ConfirmDialog.d.ts +1 -1
  30. package/types/excalidraw/components/ContextMenu.d.ts +2 -2
  31. package/types/excalidraw/components/DefaultSidebar.d.ts +1 -1
  32. package/types/excalidraw/components/DialogActionButton.d.ts +1 -1
  33. package/types/excalidraw/components/ElementLinkDialog.d.ts +2 -2
  34. package/types/excalidraw/components/EyeDropper.d.ts +1 -1
  35. package/types/excalidraw/components/FixedSideContainer.d.ts +1 -1
  36. package/types/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
  37. package/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
  38. package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +2 -2
  39. package/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
  40. package/types/excalidraw/components/HintViewer.d.ts +1 -1
  41. package/types/excalidraw/components/IconPicker.d.ts +1 -1
  42. package/types/excalidraw/components/ImageExportDialog.d.ts +2 -2
  43. package/types/excalidraw/components/InitializeApp.d.ts +1 -1
  44. package/types/excalidraw/components/Island.d.ts +1 -1
  45. package/types/excalidraw/components/JSONExportDialog.d.ts +2 -2
  46. package/types/excalidraw/components/LayerUI.d.ts +2 -2
  47. package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -1
  48. package/types/excalidraw/components/LibraryMenuItems.d.ts +1 -1
  49. package/types/excalidraw/components/LibraryMenuSection.d.ts +2 -2
  50. package/types/excalidraw/components/LibraryUnit.d.ts +1 -1
  51. package/types/excalidraw/components/MagicButton.d.ts +1 -1
  52. package/types/excalidraw/components/MobileMenu.d.ts +2 -2
  53. package/types/excalidraw/components/PasteChartDialog.d.ts +1 -1
  54. package/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  55. package/types/excalidraw/components/PublishLibrary.d.ts +1 -1
  56. package/types/excalidraw/components/SVGLayer.d.ts +1 -1
  57. package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
  58. package/types/excalidraw/components/Sidebar/common.d.ts +1 -1
  59. package/types/excalidraw/components/Stack.d.ts +1 -1
  60. package/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  61. package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  62. package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  63. package/types/excalidraw/components/Stats/index.d.ts +1 -1
  64. package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -1
  65. package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  66. package/types/excalidraw/components/TTDDialog/common.d.ts +2 -2
  67. package/types/excalidraw/components/TextField.d.ts +1 -1
  68. package/types/excalidraw/components/Toast.d.ts +1 -1
  69. package/types/excalidraw/components/ToolButton.d.ts +2 -2
  70. package/types/excalidraw/components/Tooltip.d.ts +1 -1
  71. package/types/excalidraw/components/UserList.d.ts +1 -1
  72. package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -3
  73. package/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -1
  74. package/types/excalidraw/components/canvases/StaticCanvas.d.ts +3 -3
  75. package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +1 -1
  76. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +1 -1
  77. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
  78. package/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
  79. package/types/excalidraw/constants.d.ts +3 -3
  80. package/types/excalidraw/context/tunnels.d.ts +1 -1
  81. package/types/excalidraw/data/blob.d.ts +1 -1
  82. package/types/excalidraw/data/filesystem.d.ts +1 -1
  83. package/types/excalidraw/data/index.d.ts +1 -1
  84. package/types/excalidraw/data/library.d.ts +2 -2
  85. package/types/excalidraw/data/types.d.ts +2 -2
  86. package/types/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
  87. package/types/excalidraw/element/binding.d.ts +5 -5
  88. package/types/excalidraw/element/bounds.d.ts +2 -2
  89. package/types/excalidraw/element/collision.d.ts +2 -2
  90. package/types/excalidraw/element/dragElements.d.ts +1 -1
  91. package/types/excalidraw/element/elbowArrow.d.ts +2 -2
  92. package/types/excalidraw/element/embeddable.d.ts +1 -1
  93. package/types/excalidraw/element/linearElementEditor.d.ts +4 -4
  94. package/types/excalidraw/element/resizeElements.d.ts +3 -3
  95. package/types/excalidraw/element/resizeTest.d.ts +3 -3
  96. package/types/excalidraw/element/showSelectedShapeActions.d.ts +1 -1
  97. package/types/excalidraw/element/textElement.d.ts +1 -1
  98. package/types/excalidraw/element/transformHandles.d.ts +5 -5
  99. package/types/excalidraw/element/utils.d.ts +1 -1
  100. package/types/excalidraw/frame.d.ts +3 -3
  101. package/types/excalidraw/history.d.ts +1 -1
  102. package/types/excalidraw/index.d.ts +4 -4
  103. package/types/excalidraw/laser-trails.d.ts +1 -1
  104. package/types/excalidraw/renderer/helpers.d.ts +1 -1
  105. package/types/excalidraw/renderer/renderElement.d.ts +1 -1
  106. package/types/excalidraw/renderer/staticSvgScene.d.ts +1 -1
  107. package/types/excalidraw/scene/Renderer.d.ts +1 -1
  108. package/types/excalidraw/scene/Scene.d.ts +2 -2
  109. package/types/excalidraw/scene/Shape.d.ts +2 -2
  110. package/types/excalidraw/scene/ShapeCache.d.ts +3 -3
  111. package/types/excalidraw/scene/scroll.d.ts +1 -1
  112. package/types/excalidraw/scene/scrollbars.d.ts +1 -1
  113. package/types/excalidraw/scene/types.d.ts +3 -3
  114. package/types/excalidraw/shapes.d.ts +1 -1
  115. package/types/excalidraw/snapping.d.ts +1 -1
  116. package/types/excalidraw/store.d.ts +1 -1
  117. package/types/excalidraw/types.d.ts +12 -12
  118. package/types/excalidraw/visualdebug.d.ts +1 -1
  119. package/types/utils/collision.d.ts +3 -3
  120. package/types/utils/export.d.ts +2 -2
  121. package/types/utils/geometry/shape.d.ts +1 -1
  122. 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 React from "react";
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,5 +1,5 @@
1
- import type { ReactNode } from "react";
2
1
  import "./DialogActionButton.scss";
2
+ import type { ReactNode } from "react";
3
3
  interface DialogActionButtonProps {
4
4
  label: string;
5
5
  children?: 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,5 +1,5 @@
1
- import "./FixedSideContainer.scss";
2
1
  import React from "react";
2
+ import "./FixedSideContainer.scss";
3
3
  type FixedSideContainerProps = {
4
4
  children: React.ReactNode;
5
5
  side: "top" | "left" | "right";
@@ -1,5 +1,5 @@
1
- import type { UserToFollow } from "../../types";
2
1
  import "./FollowMode.scss";
2
+ import type { UserToFollow } from "../../types";
3
3
  interface FollowModeProps {
4
4
  width: number;
5
5
  height: number;
@@ -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,5 +1,5 @@
1
- import type { AppClassProperties, Device, UIAppState } from "../types";
2
1
  import "./HintViewer.scss";
2
+ import type { AppClassProperties, Device, UIAppState } from "../types";
3
3
  interface HintViewerProps {
4
4
  appState: UIAppState;
5
5
  isMobile: boolean;
@@ -1,5 +1,5 @@
1
- import type { JSX } from "react";
2
1
  import "./IconPicker.scss";
2
+ import type { JSX } from "react";
3
3
  export declare function IconPicker<T>({ value, label, options, onChange, group, numberOfOptionsToAlwaysShow, }: {
4
4
  label: string;
5
5
  value: T;
@@ -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 "./ImageExportDialog.scss";
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,6 +1,6 @@
1
1
  import React from "react";
2
- import type { Language } from "../i18n";
3
2
  import type { Theme } from "../element/types";
3
+ import type { Language } from "../i18n";
4
4
  interface Props {
5
5
  langCode: Language["code"];
6
6
  children: React.ReactElement;
@@ -1,5 +1,5 @@
1
- import "./Island.scss";
2
1
  import React from "react";
2
+ import "./Island.scss";
3
3
  type IslandProps = {
4
4
  children: React.ReactNode;
5
5
  padding?: number;
@@ -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,5 +1,5 @@
1
- import type { JSX } from "react";
2
1
  import "./ToolIcon.scss";
2
+ import type { JSX } from "react";
3
3
  export declare const ElementCanvasButton: (props: {
4
4
  title?: string;
5
5
  icon: JSX.Element;
@@ -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 React, { type ReactNode } from "react";
2
1
  import * as Popover from "@radix-ui/react-popover";
2
+ import React, { type ReactNode } from "react";
3
3
  interface PropertiesPopoverProps {
4
4
  className?: string;
5
5
  container: HTMLDivElement | null;
@@ -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 { Trail } from "../animated-trail";
2
1
  import "./SVGLayer.scss";
2
+ import type { Trail } from "../animated-trail";
3
3
  type SVGLayerProps = {
4
4
  trails: Trail[];
5
5
  };
@@ -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,6 +1,6 @@
1
- import type { JSX } from "react";
2
1
  import React from "react";
3
2
  import type { AppState, SidebarName, SidebarTabName } from "../../types";
3
+ import type { JSX } from "react";
4
4
  export type SidebarTriggerProps = {
5
5
  name: SidebarName;
6
6
  tab?: SidebarTabName;
@@ -1,5 +1,5 @@
1
- import "./Stack.scss";
2
1
  import React from "react";
2
+ import "./Stack.scss";
3
3
  type StackProps = {
4
4
  children: React.ReactNode;
5
5
  gap?: number;
@@ -1,7 +1,7 @@
1
- import type { ElementsMap, ExcalidrawElement } from "../../element/types";
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 { JSX } from "react";
2
1
  import type { ReactNode } from "react";
2
+ import type { JSX } from "react";
3
3
  export declare const TTDDialogTrigger: {
4
4
  ({ children, icon, }: {
5
5
  children?: ReactNode;
@@ -1,5 +1,5 @@
1
- import type { MermaidConfig } from "@zsviczian/mermaid-to-excalidraw";
2
- import type { MermaidToExcalidrawResult } from "@zsviczian/mermaid-to-excalidraw/dist/interfaces";
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,5 +1,5 @@
1
- import type { KeyboardEvent } from "react";
2
1
  import "./TextField.scss";
2
+ import type { KeyboardEvent } from "react";
3
3
  type TextFieldProps = {
4
4
  onChange?: (value: string) => void;
5
5
  onClick?: () => void;
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from "react";
2
1
  import "./Toast.scss";
2
+ import type { CSSProperties } from "react";
3
3
  export declare const Toast: ({ message, onClose, closable, duration, style, }: {
4
4
  message: string;
5
5
  onClose: () => void;
@@ -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,5 +1,5 @@
1
- import "./Tooltip.scss";
2
1
  import React from "react";
2
+ import "./Tooltip.scss";
3
3
  export declare const getTooltipDiv: () => HTMLDivElement;
4
4
  export declare const updateTooltipPosition: (tooltip: HTMLDivElement, item: {
5
5
  left: number;
@@ -1,5 +1,5 @@
1
- import "./UserList.scss";
2
1
  import React from "react";
2
+ import "./UserList.scss";
3
3
  import type { Collaborator, SocketId } from "../types";
4
4
  export type GoToCollaboratorComponentProps = {
5
5
  socketId: SocketId;
@@ -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,5 +1,5 @@
1
- import type { JSX } from "react";
2
1
  import React from "react";
2
+ import type { JSX } from "react";
3
3
  declare const DropdownMenuItemLink: {
4
4
  ({ icon, shortcut, href, children, onSelect, className, selected, rel, ...rest }: {
5
5
  href: string;
@@ -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 { Theme } from "../../element/types";
2
1
  import "./DefaultItems.scss";
2
+ import type { Theme } from "../../element/types";
3
3
  export declare const LoadScene: {
4
4
  (): import("react/jsx-runtime").JSX.Element | null;
5
5
  displayName: string;
@@ -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 = 2000;
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<"image" | "iframe" | "embeddable">;
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,6 +1,6 @@
1
+ import { createIsolation } from "jotai-scope";
1
2
  import React from "react";
2
3
  import tunnel from "tunnel-rat";
3
- import { createIsolation } from "jotai-scope";
4
4
  export type Tunnel = ReturnType<typeof tunnel>;
5
5
  type TunnelsContextValue = {
6
6
  MainMenuTunnel: Tunnel;
@@ -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?: "published" | "unpublished" | undefined;
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 type { ExcalidrawBindableElement, ExcalidrawElement, NonDeleted, ExcalidrawLinearElement, NonDeletedExcalidrawElement, ElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, ExcalidrawElbowArrowElement, FixedPoint, SceneElementsMap } from "./types";
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 { type Heading } from "./heading";
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;