@dwelle/excalidraw 0.4.0-cfd6fb7 → 0.4.0-e1bdbb6

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 (107) hide show
  1. package/CHANGELOG.md +100 -756
  2. package/README.md +85 -25
  3. package/dist/excalidraw-assets/Assistant-Bold.woff2 +0 -0
  4. package/dist/excalidraw-assets/Assistant-Medium.woff2 +0 -0
  5. package/dist/excalidraw-assets/Assistant-Regular.woff2 +0 -0
  6. package/dist/excalidraw-assets/Assistant-SemiBold.woff2 +0 -0
  7. package/dist/excalidraw-assets/vendor-2002fe1b8862917b36c1.js +2 -0
  8. package/dist/excalidraw-assets/{vendor-52b1f3361986b6c6a4fe.js.LICENSE.txt → vendor-2002fe1b8862917b36c1.js.LICENSE.txt} +0 -0
  9. package/dist/excalidraw-assets-dev/Assistant-Bold.woff2 +0 -0
  10. package/dist/excalidraw-assets-dev/Assistant-Medium.woff2 +0 -0
  11. package/dist/excalidraw-assets-dev/Assistant-Regular.woff2 +0 -0
  12. package/dist/excalidraw-assets-dev/Assistant-SemiBold.woff2 +0 -0
  13. package/dist/excalidraw-assets-dev/{vendor-c0592035c3911af79359.js → vendor-e6df8519da951026ff69.js} +1 -1
  14. package/dist/excalidraw.development.js +441 -203
  15. package/dist/excalidraw.production.min.js +1 -1
  16. package/dist/excalidraw.production.min.js.LICENSE.txt +1 -8
  17. package/package.json +1 -1
  18. package/types/actions/actionAddToLibrary.d.ts +15 -12
  19. package/types/actions/actionAlign.d.ts +18 -6
  20. package/types/actions/actionBoundText.d.ts +5 -4
  21. package/types/actions/actionCanvas.d.ts +62 -40
  22. package/types/actions/actionClipboard.d.ts +26 -21
  23. package/types/actions/actionDeleteSelected.d.ts +19 -14
  24. package/types/actions/actionDistribute.d.ts +6 -2
  25. package/types/actions/actionDuplicateSelection.d.ts +3 -1
  26. package/types/actions/actionExport.d.ts +71 -46
  27. package/types/actions/actionFinalize.d.ts +13 -9
  28. package/types/actions/actionGroup.d.ts +6 -2
  29. package/types/actions/actionLinearEditor.d.ts +115 -0
  30. package/types/actions/actionMenu.d.ts +24 -15
  31. package/types/actions/actionNavigate.d.ts +3 -1
  32. package/types/actions/actionProperties.d.ts +104 -65
  33. package/types/actions/actionStyles.d.ts +5 -4
  34. package/types/actions/actionToggleGridMode.d.ts +5 -4
  35. package/types/actions/actionToggleLock.d.ts +5 -4
  36. package/types/actions/actionToggleStats.d.ts +5 -4
  37. package/types/actions/actionToggleViewMode.d.ts +5 -4
  38. package/types/actions/actionToggleZenMode.d.ts +5 -4
  39. package/types/actions/actionZindex.d.ts +12 -4
  40. package/types/actions/index.d.ts +1 -0
  41. package/types/actions/manager.d.ts +1 -1
  42. package/types/actions/shortcuts.d.ts +1 -1
  43. package/types/actions/types.d.ts +4 -2
  44. package/types/appState.d.ts +6 -5
  45. package/types/clients.d.ts +1 -1
  46. package/types/components/Actions.d.ts +13 -0
  47. package/types/components/App.d.ts +52 -1
  48. package/types/components/Avatar.d.ts +1 -1
  49. package/types/components/CollabButton.d.ts +2 -3
  50. package/types/components/DialogActionButton.d.ts +10 -0
  51. package/types/components/Footer.d.ts +10 -0
  52. package/types/components/HelpButton.d.ts +8 -0
  53. package/types/components/HintViewer.d.ts +3 -2
  54. package/types/components/HomeButton.d.ts +5 -0
  55. package/types/components/ImageExportDialog.d.ts +3 -1
  56. package/types/components/InitializeApp.d.ts +2 -0
  57. package/types/components/JSONExportDialog.d.ts +2 -2
  58. package/types/components/LayerUI.d.ts +6 -4
  59. package/types/components/LibraryButton.d.ts +1 -0
  60. package/types/components/LibraryMenu.d.ts +14 -5
  61. package/types/components/LibraryMenuBrowseButton.d.ts +7 -0
  62. package/types/components/LibraryMenuHeaderContent.d.ts +12 -0
  63. package/types/components/LibraryMenuItems.d.ts +5 -14
  64. package/types/components/LibraryUnit.d.ts +2 -3
  65. package/types/components/LoadingMessage.d.ts +2 -0
  66. package/types/components/MenuItem.d.ts +11 -0
  67. package/types/components/MenuUtils.d.ts +1 -0
  68. package/types/components/MobileMenu.d.ts +10 -9
  69. package/types/components/Sidebar/Sidebar.d.ts +73 -0
  70. package/types/components/Sidebar/SidebarHeader.d.ts +20 -0
  71. package/types/components/Sidebar/common.d.ts +16 -0
  72. package/types/components/Stats.d.ts +1 -1
  73. package/types/components/UserList.d.ts +0 -1
  74. package/types/components/WelcomeScreen.d.ts +10 -0
  75. package/types/components/WelcomeScreenDecor.d.ts +6 -0
  76. package/types/components/hoc/withUpstreamOverride.d.ts +10 -0
  77. package/types/components/icons.d.ts +81 -122
  78. package/types/constants.d.ts +15 -7
  79. package/types/data/blob.d.ts +1 -1
  80. package/types/data/restore.d.ts +1 -1
  81. package/types/data/types.d.ts +16 -1
  82. package/types/element/Hyperlink.d.ts +8 -5
  83. package/types/element/image.d.ts +1 -1
  84. package/types/element/index.d.ts +1 -1
  85. package/types/element/linearElementEditor.d.ts +24 -11
  86. package/types/element/newElement.d.ts +14 -1
  87. package/types/element/textElement.d.ts +6 -2
  88. package/types/element/transformHandles.d.ts +1 -1
  89. package/types/element/types.d.ts +2 -2
  90. package/types/hooks/useOutsideClick.d.ts +2 -0
  91. package/types/keys.d.ts +13 -3
  92. package/types/math.d.ts +8 -1
  93. package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-52b1f3361986b6c6a4fe.d.ts → vendor-2002fe1b8862917b36c1.d.ts} +0 -0
  94. package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-c0592035c3911af79359.d.ts → vendor-e6df8519da951026ff69.d.ts} +0 -0
  95. package/types/packages/excalidraw/example/App.d.ts +2 -1
  96. package/types/packages/excalidraw/example/sidebar/{Sidebar.d.ts → ExampleSidebar.d.ts} +1 -1
  97. package/types/packages/excalidraw/index.d.ts +2 -1
  98. package/types/packages/utils.d.ts +4 -1
  99. package/types/renderer/renderScene.d.ts +1 -1
  100. package/types/scene/types.d.ts +1 -0
  101. package/types/shapes.d.ts +27 -3
  102. package/types/types.d.ts +32 -14
  103. package/dist/excalidraw-assets/vendor-52b1f3361986b6c6a4fe.js +0 -2
  104. package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +0 -9
  105. package/types/components/Card.d.ts +0 -7
  106. package/types/components/HelpIcon.d.ts +0 -8
  107. package/types/components/SidebarLockButton.d.ts +0 -8
@@ -1,13 +1,12 @@
1
1
  import React from "react";
2
2
  import { ActionManager } from "../actions/manager";
3
- import { NonDeletedExcalidrawElement } from "../element/types";
3
+ import { NonDeletedExcalidrawElement, Theme } from "../element/types";
4
4
  import { Language } from "../i18n";
5
5
  import { AppProps, AppState, ExcalidrawProps, BinaryFiles } from "../types";
6
6
  import Library from "../data/library";
7
7
  import "./LayerUI.scss";
8
8
  import "./Toolbar.scss";
9
9
  interface LayerUIProps {
10
- onHomeButtonClick?: () => void;
11
10
  actionManager: ActionManager;
12
11
  appState: AppState;
13
12
  files: BinaryFiles;
@@ -19,12 +18,12 @@ interface LayerUIProps {
19
18
  onPenModeToggle: () => void;
20
19
  onInsertElements: (elements: readonly NonDeletedExcalidrawElement[]) => void;
21
20
  showExitZenModeBtn: boolean;
22
- showThemeBtn: boolean;
23
21
  langCode: Language["code"];
24
22
  isCollaborating: boolean;
25
23
  renderTopRightUI?: ExcalidrawProps["renderTopRightUI"];
26
24
  renderCustomFooter?: ExcalidrawProps["renderFooter"];
27
25
  renderCustomStats?: ExcalidrawProps["renderCustomStats"];
26
+ renderCustomSidebar?: ExcalidrawProps["renderSidebar"];
28
27
  libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
29
28
  UIOptions: AppProps["UIOptions"];
30
29
  focusContainer: () => void;
@@ -33,6 +32,9 @@ interface LayerUIProps {
33
32
  onImageAction: (data: {
34
33
  insertOnCanvasDirectly: boolean;
35
34
  }) => void;
35
+ renderWelcomeScreen: boolean;
36
+ onHomeButtonClick: () => void;
37
+ onThemeToggle: (theme: Theme) => void;
36
38
  }
37
- declare const _default: React.MemoExoticComponent<({ onHomeButtonClick, actionManager, appState, files, setAppState, elements, canvas, onCollabButtonClick, onLockToggle, onPenModeToggle, onInsertElements, showExitZenModeBtn, showThemeBtn, isCollaborating, renderTopRightUI, renderCustomFooter, renderCustomStats, libraryReturnUrl, UIOptions, focusContainer, library, id, onImageAction, }: LayerUIProps) => JSX.Element>;
39
+ declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onCollabButtonClick, onLockToggle, onPenModeToggle, onInsertElements, showExitZenModeBtn, isCollaborating, renderTopRightUI, renderCustomFooter, renderCustomStats, renderCustomSidebar, libraryReturnUrl, UIOptions, focusContainer, library, id, onImageAction, renderWelcomeScreen, onHomeButtonClick, onThemeToggle, }: LayerUIProps) => JSX.Element>;
38
40
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { AppState } from "../types";
3
+ import "./LibraryButton.scss";
3
4
  export declare const LibraryButton: React.FC<{
4
5
  appState: AppState;
5
6
  setAppState: React.Component<any, AppState>["setState"];
@@ -1,16 +1,25 @@
1
+ /// <reference types="react" />
1
2
  import Library from "../data/library";
2
- import { LibraryItems, LibraryItem, AppState, BinaryFiles, ExcalidrawProps } from "../types";
3
+ import { LibraryItems, LibraryItem, AppState, ExcalidrawProps } from "../types";
3
4
  import "./LibraryMenu.scss";
4
- export declare const LibraryMenu: ({ onClose, onInsertLibraryItems, pendingElements, onAddToLibrary, setAppState, files, libraryReturnUrl, focusContainer, library, id, appState, }: {
5
+ import { NonDeletedExcalidrawElement } from "../element/types";
6
+ export declare const LibraryMenuContent: ({ onInsertLibraryItems, pendingElements, onAddToLibrary, setAppState, libraryReturnUrl, library, id, appState, selectedItems, onSelectItems, }: {
5
7
  pendingElements: LibraryItem["elements"];
6
- onClose: () => void;
7
8
  onInsertLibraryItems: (libraryItems: LibraryItems) => void;
8
9
  onAddToLibrary: () => void;
9
- files: BinaryFiles;
10
10
  setAppState: React.Component<any, AppState>["setState"];
11
11
  libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
12
- focusContainer: () => void;
13
12
  library: Library;
14
13
  id: string;
15
14
  appState: AppState;
15
+ selectedItems: LibraryItem["id"][];
16
+ onSelectItems: (id: LibraryItem["id"][]) => void;
16
17
  }) => JSX.Element;
18
+ export declare const LibraryMenu: React.FC<{
19
+ appState: AppState;
20
+ onInsertElements: (elements: readonly NonDeletedExcalidrawElement[]) => void;
21
+ libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
22
+ focusContainer: () => void;
23
+ library: Library;
24
+ id: string;
25
+ }>;
@@ -0,0 +1,7 @@
1
+ import { AppState, ExcalidrawProps } from "../types";
2
+ declare const LibraryMenuBrowseButton: ({ theme, id, libraryReturnUrl, }: {
3
+ libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
4
+ theme: AppState["theme"];
5
+ id: string;
6
+ }) => JSX.Element;
7
+ export default LibraryMenuBrowseButton;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import Library from "../data/library";
3
+ import { AppState, LibraryItem } from "../types";
4
+ export declare const LibraryMenuHeader: React.FC<{
5
+ setAppState: React.Component<any, AppState>["setState"];
6
+ selectedItems: LibraryItem["id"][];
7
+ library: Library;
8
+ onRemoveFromLibrary: () => void;
9
+ resetLibrary: () => void;
10
+ onSelectItems: (items: LibraryItem["id"][]) => void;
11
+ appState: AppState;
12
+ }>;
@@ -1,24 +1,15 @@
1
- import React from "react";
2
- import Library from "../data/library";
3
- import { AppState, BinaryFiles, ExcalidrawProps, LibraryItem, LibraryItems } from "../types";
1
+ import { AppState, ExcalidrawProps, LibraryItem, LibraryItems } from "../types";
4
2
  import "./LibraryMenuItems.scss";
5
- declare const LibraryMenuItems: ({ isLoading, libraryItems, onRemoveFromLibrary, onAddToLibrary, onInsertLibraryItems, pendingElements, theme, setAppState, appState, libraryReturnUrl, library, files, id, selectedItems, onSelectItems, onPublish, resetLibrary, }: {
3
+ declare const LibraryMenuItems: ({ isLoading, libraryItems, onAddToLibrary, onInsertLibraryItems, pendingElements, selectedItems, onSelectItems, theme, id, libraryReturnUrl, }: {
6
4
  isLoading: boolean;
7
5
  libraryItems: LibraryItems;
8
6
  pendingElements: LibraryItem["elements"];
9
- onRemoveFromLibrary: () => void;
10
7
  onInsertLibraryItems: (libraryItems: LibraryItems) => void;
11
8
  onAddToLibrary: (elements: LibraryItem["elements"]) => void;
12
- theme: AppState["theme"];
13
- files: BinaryFiles;
14
- setAppState: React.Component<any, AppState>["setState"];
15
- appState: AppState;
16
- libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
17
- library: Library;
18
- id: string;
19
9
  selectedItems: LibraryItem["id"][];
20
10
  onSelectItems: (id: LibraryItem["id"][]) => void;
21
- onPublish: () => void;
22
- resetLibrary: () => void;
11
+ libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
12
+ theme: AppState["theme"];
13
+ id: string;
23
14
  }) => JSX.Element;
24
15
  export default LibraryMenuItems;
@@ -1,9 +1,8 @@
1
- import { BinaryFiles, LibraryItem } from "../types";
1
+ import { LibraryItem } from "../types";
2
2
  import "./LibraryUnit.scss";
3
- export declare const LibraryUnit: ({ id, elements, files, isPending, onClick, selected, onToggle, onDrag, }: {
3
+ export declare const LibraryUnit: ({ id, elements, isPending, onClick, selected, onToggle, onDrag, }: {
4
4
  id: LibraryItem["id"] | /** for pending item */ null;
5
5
  elements?: readonly import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | undefined;
6
- files: BinaryFiles;
7
6
  isPending?: boolean | undefined;
8
7
  onClick: () => void;
9
8
  selected: boolean;
@@ -1,4 +1,6 @@
1
1
  /// <reference types="react" />
2
+ import { Theme } from "../element/types";
2
3
  export declare const LoadingMessage: React.FC<{
3
4
  delay?: number;
5
+ theme?: Theme;
4
6
  }>;
@@ -0,0 +1,11 @@
1
+ import "./Menu.scss";
2
+ interface MenuProps {
3
+ icon: JSX.Element;
4
+ onClick: () => void;
5
+ label: string;
6
+ dataTestId: string;
7
+ shortcut?: string;
8
+ isCollaborating?: boolean;
9
+ }
10
+ declare const MenuItem: ({ icon, onClick, label, dataTestId, shortcut, isCollaborating, }: MenuProps) => JSX.Element;
11
+ export default MenuItem;
@@ -0,0 +1 @@
1
+ export declare const Separator: () => JSX.Element;
@@ -1,29 +1,30 @@
1
1
  import React from "react";
2
- import { AppProps, AppState } from "../types";
2
+ import { AppState, Device, ExcalidrawProps } from "../types";
3
3
  import { ActionManager } from "../actions/manager";
4
- import { NonDeletedExcalidrawElement } from "../element/types";
4
+ import { NonDeletedExcalidrawElement, Theme } from "../element/types";
5
5
  declare type MobileMenuProps = {
6
- onHomeButtonClick?: () => void;
7
6
  appState: AppState;
8
7
  actionManager: ActionManager;
9
8
  renderJSONExportDialog: () => React.ReactNode;
10
9
  renderImageExportDialog: () => React.ReactNode;
11
10
  setAppState: React.Component<any, AppState>["setState"];
12
11
  elements: readonly NonDeletedExcalidrawElement[];
13
- libraryMenu: JSX.Element | null;
14
12
  onCollabButtonClick?: () => void;
15
13
  onLockToggle: () => void;
16
14
  onPenModeToggle: () => void;
17
15
  canvas: HTMLCanvasElement | null;
18
16
  isCollaborating: boolean;
19
17
  renderCustomFooter?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
20
- showThemeBtn: boolean;
21
18
  onImageAction: (data: {
22
19
  insertOnCanvasDirectly: boolean;
23
20
  }) => void;
24
- renderTopRightUI?: (isMobile: boolean, appState: AppState, canvas: HTMLCanvasElement | null) => JSX.Element | null;
25
- renderStats: () => JSX.Element | null;
26
- UIOptions: AppProps["UIOptions"];
21
+ renderTopRightUI?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
22
+ renderCustomStats?: ExcalidrawProps["renderCustomStats"];
23
+ renderSidebars: () => JSX.Element | null;
24
+ device: Device;
25
+ renderWelcomeScreen?: boolean;
26
+ onHomeButtonClick: () => void;
27
+ onThemeToggle: (theme: Theme) => void;
27
28
  };
28
- export declare const MobileMenu: ({ onHomeButtonClick, appState, elements, libraryMenu, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, showThemeBtn, onImageAction, renderTopRightUI, renderStats, UIOptions, }: MobileMenuProps) => JSX.Element;
29
+ export declare const MobileMenu: ({ appState, elements, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, onImageAction, renderTopRightUI, renderCustomStats, renderSidebars, device, renderWelcomeScreen, onHomeButtonClick, onThemeToggle, }: MobileMenuProps) => JSX.Element;
29
30
  export {};
@@ -0,0 +1,73 @@
1
+ /// <reference types="react" />
2
+ import "./Sidebar.scss";
3
+ /** using a counter instead of boolean to handle race conditions where
4
+ * the host app may render (mount/unmount) multiple different sidebar */
5
+ export declare const hostSidebarCountersAtom: import("jotai").Atom<{
6
+ rendered: number;
7
+ docked: number;
8
+ }> & {
9
+ write: (get: {
10
+ <Value>(atom: import("jotai").Atom<Value | Promise<Value>>): Value;
11
+ <Value_1>(atom: import("jotai").Atom<Promise<Value_1>>): Value_1;
12
+ <Value_2>(atom: import("jotai").Atom<Value_2>): Value_2 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_2;
13
+ } & {
14
+ <Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>, options: {
15
+ unstable_promise: true;
16
+ }): Value_3 | Promise<Value_3>;
17
+ <Value_4>(atom: import("jotai").Atom<Promise<Value_4>>, options: {
18
+ unstable_promise: true;
19
+ }): Value_4 | Promise<Value_4>;
20
+ <Value_5>(atom: import("jotai").Atom<Value_5>, options: {
21
+ unstable_promise: true;
22
+ }): (Value_5 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_5) | Promise<Value_5 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_5>;
23
+ }, set: {
24
+ <Value_6, Result extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_6, undefined, Result>): Result;
25
+ <Value_7, Update, Result_1 extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_7, Update, Result_1>, update: Update): Result_1;
26
+ }, update: {
27
+ rendered: number;
28
+ docked: number;
29
+ } | ((prev: {
30
+ rendered: number;
31
+ docked: number;
32
+ }) => {
33
+ rendered: number;
34
+ docked: number;
35
+ })) => void;
36
+ onMount?: (<S extends (update: {
37
+ rendered: number;
38
+ docked: number;
39
+ } | ((prev: {
40
+ rendered: number;
41
+ docked: number;
42
+ }) => {
43
+ rendered: number;
44
+ docked: number;
45
+ })) => void>(setAtom: S) => void | (() => void)) | undefined;
46
+ } & {
47
+ init: {
48
+ rendered: number;
49
+ docked: number;
50
+ };
51
+ };
52
+ export declare const Sidebar: import("react").ForwardRefExoticComponent<{
53
+ children: import("react").ReactNode;
54
+ onClose?: (() => boolean | void) | undefined;
55
+ onDock?: ((docked: boolean) => void) | undefined;
56
+ docked?: boolean | undefined;
57
+ initialDockedState?: boolean | undefined;
58
+ dockable?: boolean | undefined;
59
+ className?: string | undefined;
60
+ } & {
61
+ /** @private internal */
62
+ __isInternal?: boolean | undefined;
63
+ } & import("react").RefAttributes<HTMLDivElement>> & {
64
+ Header: {
65
+ (props: {
66
+ children?: import("react").ReactNode;
67
+ className?: string | undefined;
68
+ } & {
69
+ __isFallback?: boolean | undefined;
70
+ }): JSX.Element | null;
71
+ displayName: string;
72
+ };
73
+ };
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ export declare const SidebarDockButton: (props: {
3
+ checked: boolean;
4
+ onChange?(): void;
5
+ }) => JSX.Element;
6
+ /** @private */
7
+ export declare const SidebarHeaderComponents: {
8
+ Context: import("react").FC<{
9
+ children: import("react").ReactNode;
10
+ }>;
11
+ Component: {
12
+ (props: {
13
+ children?: React.ReactNode;
14
+ className?: string | undefined;
15
+ } & {
16
+ __isFallback?: boolean | undefined;
17
+ }): JSX.Element | null;
18
+ displayName: string;
19
+ };
20
+ };
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ export declare type SidebarProps<P = {}> = {
3
+ children: React.ReactNode;
4
+ /**
5
+ * Called on sidebar close (either by user action or by the editor).
6
+ */
7
+ onClose?: () => void | boolean;
8
+ /** if not supplied, sidebar won't be dockable */
9
+ onDock?: (docked: boolean) => void;
10
+ docked?: boolean;
11
+ initialDockedState?: boolean;
12
+ dockable?: boolean;
13
+ className?: string;
14
+ } & P;
15
+ export declare type SidebarPropsContextValue = Pick<SidebarProps, "onClose" | "onDock" | "docked" | "dockable">;
16
+ export declare const SidebarPropsContext: React.Context<SidebarPropsContextValue>;
@@ -8,4 +8,4 @@ export declare const Stats: (props: {
8
8
  elements: readonly NonDeletedExcalidrawElement[];
9
9
  onClose: () => void;
10
10
  renderCustomStats: ExcalidrawProps["renderCustomStats"];
11
- }) => JSX.Element | null;
11
+ }) => JSX.Element;
@@ -7,5 +7,4 @@ export declare const UserList: React.FC<{
7
7
  mobile?: boolean;
8
8
  collaborators: AppState["collaborators"];
9
9
  actionManager: ActionManager;
10
- layout: "vertical" | "horizontal";
11
10
  }>;
@@ -0,0 +1,10 @@
1
+ import { ActionManager } from "../actions/manager";
2
+ import { AppState } from "../types";
3
+ import { AppProps } from "../types";
4
+ import "./WelcomeScreen.scss";
5
+ declare const WelcomeScreen: ({ appState, actionManager, onCollabButtonClick, }: {
6
+ appState: AppState;
7
+ actionManager: ActionManager;
8
+ onCollabButtonClick: AppProps["onCollabButtonClick"];
9
+ }) => JSX.Element;
10
+ export default WelcomeScreen;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from "react";
2
+ declare const WelcomeScreenDecor: ({ children, shouldRender, }: {
3
+ children: ReactNode;
4
+ shouldRender: boolean;
5
+ }) => JSX.Element | null;
6
+ export default WelcomeScreenDecor;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export declare const withUpstreamOverride: <P>(Component: React.ComponentType<P>) => readonly [React.FC<{
3
+ children: React.ReactNode;
4
+ }>, {
5
+ (props: P & {
6
+ /** @private internal */
7
+ __isFallback?: boolean | undefined;
8
+ }): JSX.Element | null;
9
+ displayName: string;
10
+ }];
@@ -6,68 +6,77 @@ declare type Opts = {
6
6
  mirror?: true;
7
7
  } & React.SVGProps<SVGSVGElement>;
8
8
  export declare const createIcon: (d: string | React.ReactNode, opts?: number | Opts) => JSX.Element;
9
+ export declare const HomeIcon: JSX.Element;
10
+ export declare const LibraryIcon: JSX.Element;
11
+ export declare const PlusIcon: JSX.Element;
12
+ export declare const DotsIcon: JSX.Element;
13
+ export declare const PinIcon: JSX.Element;
14
+ export declare const UnlockedIcon: JSX.Element;
15
+ export declare const LockedIcon: JSX.Element;
16
+ export declare const WelcomeScreenMenuArrow: JSX.Element;
17
+ export declare const WelcomeScreenHelpArrow: JSX.Element;
18
+ export declare const WelcomeScreenTopToolbarArrow: JSX.Element;
19
+ export declare const ExcalLogo: JSX.Element;
20
+ export declare const SelectionIcon: JSX.Element;
21
+ export declare const RectangleIcon: JSX.Element;
22
+ export declare const DiamondIcon: JSX.Element;
23
+ export declare const EllipseIcon: JSX.Element;
24
+ export declare const ArrowIcon: JSX.Element;
25
+ export declare const LineIcon: JSX.Element;
26
+ export declare const PenModeIcon: JSX.Element;
27
+ export declare const FreedrawIcon: JSX.Element;
28
+ export declare const TextIcon: JSX.Element;
29
+ export declare const ImageIcon: JSX.Element;
30
+ export declare const EraserIcon: JSX.Element;
31
+ export declare const ZoomInIcon: JSX.Element;
32
+ export declare const ZoomOutIcon: JSX.Element;
33
+ export declare const TrashIcon: JSX.Element;
34
+ export declare const DuplicateIcon: JSX.Element;
35
+ export declare const MoonIcon: JSX.Element;
36
+ export declare const SunIcon: JSX.Element;
37
+ export declare const HamburgerMenuIcon: JSX.Element;
38
+ export declare const ExportIcon: JSX.Element;
39
+ export declare const HelpIcon: JSX.Element;
40
+ export declare const ExternalLinkIcon: JSX.Element;
41
+ export declare const GithubIcon: JSX.Element;
42
+ export declare const DiscordIcon: JSX.Element;
43
+ export declare const TwitterIcon: JSX.Element;
9
44
  export declare const checkIcon: JSX.Element;
10
- export declare const link: JSX.Element;
45
+ export declare const LinkIcon: JSX.Element;
11
46
  export declare const save: JSX.Element;
12
47
  export declare const saveAs: JSX.Element;
13
- export declare const load: JSX.Element;
48
+ export declare const LoadIcon: JSX.Element;
14
49
  export declare const clipboard: JSX.Element;
15
- export declare const trash: JSX.Element;
16
50
  export declare const palette: JSX.Element;
17
- export declare const exportFile: JSX.Element;
18
- export declare const exportImage: JSX.Element;
51
+ export declare const ExportImageIcon: JSX.Element;
19
52
  export declare const exportToFileIcon: JSX.Element;
20
53
  export declare const zoomIn: JSX.Element;
21
54
  export declare const zoomOut: JSX.Element;
22
55
  export declare const done: JSX.Element;
23
56
  export declare const menu: JSX.Element;
24
- export declare const undo: JSX.Element;
25
- export declare const redo: JSX.Element;
57
+ export declare const UndoIcon: JSX.Element;
58
+ export declare const RedoIcon: JSX.Element;
26
59
  export declare const questionCircle: JSX.Element;
27
60
  export declare const share: JSX.Element;
28
61
  export declare const shareIOS: JSX.Element;
29
62
  export declare const shareWindows: JSX.Element;
30
63
  export declare const resetZoom: JSX.Element;
31
- export declare const BringForwardIcon: React.MemoExoticComponent<({ theme }: {
32
- theme: Theme;
33
- }) => JSX.Element>;
34
- export declare const SendBackwardIcon: React.MemoExoticComponent<({ theme }: {
35
- theme: Theme;
36
- }) => JSX.Element>;
37
- export declare const BringToFrontIcon: React.MemoExoticComponent<({ theme }: {
38
- theme: Theme;
39
- }) => JSX.Element>;
40
- export declare const SendToBackIcon: React.MemoExoticComponent<({ theme }: {
41
- theme: Theme;
42
- }) => JSX.Element>;
43
- export declare const AlignTopIcon: React.MemoExoticComponent<({ theme }: {
44
- theme: Theme;
45
- }) => JSX.Element>;
46
- export declare const AlignBottomIcon: React.MemoExoticComponent<({ theme }: {
47
- theme: Theme;
48
- }) => JSX.Element>;
49
- export declare const AlignLeftIcon: React.MemoExoticComponent<({ theme }: {
50
- theme: Theme;
51
- }) => JSX.Element>;
52
- export declare const AlignRightIcon: React.MemoExoticComponent<({ theme }: {
53
- theme: Theme;
54
- }) => JSX.Element>;
55
- export declare const DistributeHorizontallyIcon: React.MemoExoticComponent<({ theme }: {
56
- theme: Theme;
57
- }) => JSX.Element>;
58
- export declare const DistributeVerticallyIcon: React.MemoExoticComponent<({ theme }: {
59
- theme: Theme;
60
- }) => JSX.Element>;
61
- export declare const CenterVerticallyIcon: React.MemoExoticComponent<({ theme }: {
62
- theme: Theme;
63
- }) => JSX.Element>;
64
- export declare const CenterHorizontallyIcon: React.MemoExoticComponent<({ theme }: {
65
- theme: Theme;
66
- }) => JSX.Element>;
67
- export declare const users: JSX.Element;
64
+ export declare const BringForwardIcon: JSX.Element;
65
+ export declare const SendBackwardIcon: JSX.Element;
66
+ export declare const BringToFrontIcon: JSX.Element;
67
+ export declare const SendToBackIcon: JSX.Element;
68
+ export declare const AlignTopIcon: JSX.Element;
69
+ export declare const AlignBottomIcon: JSX.Element;
70
+ export declare const AlignLeftIcon: JSX.Element;
71
+ export declare const AlignRightIcon: JSX.Element;
72
+ export declare const DistributeHorizontallyIcon: JSX.Element;
73
+ export declare const DistributeVerticallyIcon: JSX.Element;
74
+ export declare const CenterVerticallyIcon: JSX.Element;
75
+ export declare const CenterHorizontallyIcon: JSX.Element;
76
+ export declare const UsersIcon: JSX.Element;
68
77
  export declare const start: JSX.Element;
69
78
  export declare const stop: JSX.Element;
70
- export declare const close: JSX.Element;
79
+ export declare const CloseIcon: JSX.Element;
71
80
  export declare const back: JSX.Element;
72
81
  export declare const clone: JSX.Element;
73
82
  export declare const shield: JSX.Element;
@@ -78,92 +87,44 @@ export declare const GroupIcon: React.MemoExoticComponent<({ theme }: {
78
87
  export declare const UngroupIcon: React.MemoExoticComponent<({ theme }: {
79
88
  theme: Theme;
80
89
  }) => JSX.Element>;
81
- export declare const FillHachureIcon: React.MemoExoticComponent<({ theme }: {
82
- theme: Theme;
83
- }) => JSX.Element>;
84
- export declare const FillCrossHatchIcon: React.MemoExoticComponent<({ theme }: {
85
- theme: Theme;
86
- }) => JSX.Element>;
87
- export declare const FillSolidIcon: React.MemoExoticComponent<({ theme }: {
88
- theme: Theme;
89
- }) => JSX.Element>;
90
- export declare const StrokeWidthIcon: React.MemoExoticComponent<({ theme, strokeWidth }: {
91
- theme: Theme;
92
- strokeWidth: number;
93
- }) => JSX.Element>;
90
+ export declare const FillHachureIcon: JSX.Element;
91
+ export declare const FillCrossHatchIcon: JSX.Element;
92
+ export declare const FillSolidIcon: JSX.Element;
93
+ export declare const StrokeWidthBaseIcon: JSX.Element;
94
+ export declare const StrokeWidthBoldIcon: JSX.Element;
95
+ export declare const StrokeWidthExtraBoldIcon: JSX.Element;
94
96
  export declare const StrokeStyleSolidIcon: React.MemoExoticComponent<({ theme }: {
95
97
  theme: Theme;
96
98
  }) => JSX.Element>;
97
- export declare const StrokeStyleDashedIcon: React.MemoExoticComponent<({ theme }: {
98
- theme: Theme;
99
- }) => JSX.Element>;
100
- export declare const StrokeStyleDottedIcon: React.MemoExoticComponent<({ theme }: {
101
- theme: Theme;
102
- }) => JSX.Element>;
103
- export declare const SloppinessArchitectIcon: React.MemoExoticComponent<({ theme }: {
104
- theme: Theme;
105
- }) => JSX.Element>;
106
- export declare const SloppinessArtistIcon: React.MemoExoticComponent<({ theme }: {
107
- theme: Theme;
108
- }) => JSX.Element>;
109
- export declare const SloppinessCartoonistIcon: React.MemoExoticComponent<({ theme }: {
110
- theme: Theme;
111
- }) => JSX.Element>;
112
- export declare const EdgeSharpIcon: React.MemoExoticComponent<({ theme }: {
113
- theme: Theme;
114
- }) => JSX.Element>;
115
- export declare const EdgeRoundIcon: React.MemoExoticComponent<({ theme }: {
116
- theme: Theme;
117
- }) => JSX.Element>;
118
- export declare const ArrowheadNoneIcon: React.MemoExoticComponent<({ theme }: {
119
- theme: Theme;
120
- }) => JSX.Element>;
121
- export declare const ArrowheadArrowIcon: React.MemoExoticComponent<({ theme, flip }: {
122
- theme: Theme;
99
+ export declare const StrokeStyleDashedIcon: JSX.Element;
100
+ export declare const StrokeStyleDottedIcon: JSX.Element;
101
+ export declare const SloppinessArchitectIcon: JSX.Element;
102
+ export declare const SloppinessArtistIcon: JSX.Element;
103
+ export declare const SloppinessCartoonistIcon: JSX.Element;
104
+ export declare const EdgeSharpIcon: JSX.Element;
105
+ export declare const EdgeRoundIcon: JSX.Element;
106
+ export declare const ArrowheadNoneIcon: JSX.Element;
107
+ export declare const ArrowheadArrowIcon: React.MemoExoticComponent<({ flip }: {
123
108
  flip?: boolean | undefined;
124
109
  }) => JSX.Element>;
125
- export declare const ArrowheadDotIcon: React.MemoExoticComponent<({ theme, flip }: {
126
- theme: Theme;
110
+ export declare const ArrowheadDotIcon: React.MemoExoticComponent<({ flip }: {
127
111
  flip?: boolean | undefined;
128
112
  }) => JSX.Element>;
129
- export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ theme, flip }: {
130
- theme: Theme;
113
+ export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ flip }: {
131
114
  flip?: boolean | undefined;
132
115
  }) => JSX.Element>;
133
- export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ theme, flip }: {
134
- theme: Theme;
116
+ export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ flip }: {
135
117
  flip?: boolean | undefined;
136
118
  }) => JSX.Element>;
137
- export declare const FontSizeSmallIcon: React.MemoExoticComponent<({ theme }: {
138
- theme: Theme;
139
- }) => JSX.Element>;
140
- export declare const FontSizeMediumIcon: React.MemoExoticComponent<({ theme }: {
141
- theme: Theme;
142
- }) => JSX.Element>;
143
- export declare const FontSizeLargeIcon: React.MemoExoticComponent<({ theme }: {
144
- theme: Theme;
145
- }) => JSX.Element>;
146
- export declare const FontSizeExtraLargeIcon: React.MemoExoticComponent<({ theme }: {
147
- theme: Theme;
148
- }) => JSX.Element>;
149
- export declare const FontFamilyHandDrawnIcon: React.MemoExoticComponent<({ theme }: {
150
- theme: Theme;
151
- }) => JSX.Element>;
152
- export declare const FontFamilyNormalIcon: React.MemoExoticComponent<({ theme }: {
153
- theme: Theme;
154
- }) => JSX.Element>;
155
- export declare const FontFamilyCodeIcon: React.MemoExoticComponent<({ theme }: {
156
- theme: Theme;
157
- }) => JSX.Element>;
158
- export declare const TextAlignLeftIcon: React.MemoExoticComponent<({ theme }: {
159
- theme: Theme;
160
- }) => JSX.Element>;
161
- export declare const TextAlignCenterIcon: React.MemoExoticComponent<({ theme }: {
162
- theme: Theme;
163
- }) => JSX.Element>;
164
- export declare const TextAlignRightIcon: React.MemoExoticComponent<({ theme }: {
165
- theme: Theme;
166
- }) => JSX.Element>;
119
+ export declare const FontSizeSmallIcon: JSX.Element;
120
+ export declare const FontSizeMediumIcon: JSX.Element;
121
+ export declare const FontSizeLargeIcon: JSX.Element;
122
+ export declare const FontSizeExtraLargeIcon: JSX.Element;
123
+ export declare const FontFamilyNormalIcon: JSX.Element;
124
+ export declare const FontFamilyCodeIcon: JSX.Element;
125
+ export declare const TextAlignLeftIcon: JSX.Element;
126
+ export declare const TextAlignCenterIcon: JSX.Element;
127
+ export declare const TextAlignRightIcon: JSX.Element;
167
128
  export declare const TextAlignTopIcon: React.MemoExoticComponent<({ theme }: {
168
129
  theme: Theme;
169
130
  }) => JSX.Element>;
@@ -174,7 +135,5 @@ export declare const TextAlignMiddleIcon: React.MemoExoticComponent<({ theme }:
174
135
  theme: Theme;
175
136
  }) => JSX.Element>;
176
137
  export declare const publishIcon: JSX.Element;
177
- export declare const editIcon: JSX.Element;
178
138
  export declare const eraser: JSX.Element;
179
- export declare const home: JSX.Element;
180
139
  export {};