@zsviczian/excalidraw 0.13.0-obsidian-1 → 0.14.0-obsidian

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 (88) hide show
  1. package/README.md +418 -20
  2. package/dist/excalidraw.development.js +571 -1154
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -102
  5. package/package.json +1 -1
  6. package/types/actions/actionAddToLibrary.d.ts +21 -9
  7. package/types/actions/actionAlign.d.ts +6 -18
  8. package/types/actions/actionBoundText.d.ts +9 -5
  9. package/types/actions/actionCanvas.d.ts +83 -55
  10. package/types/actions/actionClipboard.d.ts +63 -16
  11. package/types/actions/actionDeleteSelected.d.ts +31 -12
  12. package/types/actions/actionDistribute.d.ts +2 -6
  13. package/types/actions/actionDuplicateSelection.d.ts +1 -3
  14. package/types/actions/actionExport.d.ts +79 -58
  15. package/types/actions/actionFinalize.d.ts +15 -9
  16. package/types/actions/actionFlip.d.ts +2 -2
  17. package/types/actions/actionGroup.d.ts +4 -8
  18. package/types/actions/actionLinearEditor.d.ts +8 -4
  19. package/types/actions/actionMenu.d.ts +24 -17
  20. package/types/actions/actionNavigate.d.ts +2 -3
  21. package/types/actions/actionProperties.d.ts +106 -80
  22. package/types/actions/actionStyles.d.ts +7 -3
  23. package/types/actions/actionToggleGridMode.d.ts +9 -3
  24. package/types/actions/actionToggleLock.d.ts +7 -3
  25. package/types/actions/actionToggleStats.d.ts +8 -3
  26. package/types/actions/actionToggleViewMode.d.ts +9 -3
  27. package/types/actions/actionToggleZenMode.d.ts +9 -3
  28. package/types/actions/actionZindex.d.ts +4 -12
  29. package/types/actions/manager.d.ts +2 -1
  30. package/types/actions/types.d.ts +6 -5
  31. package/types/appState.d.ts +8 -9
  32. package/types/clipboard.d.ts +6 -1
  33. package/types/components/App.d.ts +8 -51
  34. package/types/components/Button.d.ts +15 -0
  35. package/types/components/CollabButton.d.ts +1 -2
  36. package/types/components/ContextMenu.d.ts +8 -21
  37. package/types/components/JSONExportDialog.d.ts +3 -1
  38. package/types/components/LayerUI.d.ts +2 -3
  39. package/types/components/LibraryMenuHeaderContent.d.ts +23 -0
  40. package/types/components/MobileMenu.d.ts +4 -6
  41. package/types/components/UserList.d.ts +0 -2
  42. package/types/components/dropdownMenu/DropdownMenu.d.ts +64 -0
  43. package/types/components/dropdownMenu/DropdownMenuContent.d.ts +11 -0
  44. package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
  45. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +13 -0
  46. package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
  47. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -0
  48. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +12 -0
  49. package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
  50. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +9 -0
  51. package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
  52. package/types/components/footer/Footer.d.ts +13 -0
  53. package/types/components/footer/FooterCenter.d.ts +8 -0
  54. package/types/components/icons.d.ts +1 -1
  55. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +10 -0
  56. package/types/components/main-menu/DefaultItems.d.ts +44 -0
  57. package/types/components/main-menu/MainMenu.d.ts +55 -0
  58. package/types/components/mainMenu/DefaultItems.d.ts +44 -0
  59. package/types/components/mainMenu/MainMenu.d.ts +63 -0
  60. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +58 -0
  61. package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
  62. package/types/components/welcome-screen/WelcomeScreen.d.ts +85 -0
  63. package/types/constants.d.ts +6 -7
  64. package/types/element/Hyperlink.d.ts +9 -7
  65. package/types/element/bounds.d.ts +3 -2
  66. package/types/element/linearElementEditor.d.ts +38 -6
  67. package/types/element/newElement.d.ts +2 -2
  68. package/types/element/resizeElements.d.ts +0 -1
  69. package/types/element/textElement.d.ts +24 -2
  70. package/types/element/textWysiwyg.d.ts +6 -1
  71. package/types/element/transformHandles.d.ts +2 -3
  72. package/types/element/typeChecks.d.ts +10 -1
  73. package/types/element/types.d.ts +11 -4
  74. package/types/excalidraw-app/data/index.d.ts +13 -9
  75. package/types/excalidraw-app/data/localStorage.d.ts +13 -9
  76. package/types/keys.d.ts +2 -0
  77. package/types/math.d.ts +2 -1
  78. package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
  79. package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
  80. package/types/packages/excalidraw/index.d.ts +10 -0
  81. package/types/renderer/easingFunctions.d.ts +6 -0
  82. package/types/renderer/renderElement.d.ts +4 -3
  83. package/types/scene/Fonts.d.ts +21 -0
  84. package/types/scene/Scene.d.ts +15 -0
  85. package/types/scene/comparisons.d.ts +2 -3
  86. package/types/scene/index.d.ts +1 -1
  87. package/types/types.d.ts +43 -22
  88. package/types/utils.d.ts +17 -0
@@ -0,0 +1,64 @@
1
+ import React from "react";
2
+ import "./DropdownMenu.scss";
3
+ declare const DropdownMenu: {
4
+ ({ children, open, }: {
5
+ children?: React.ReactNode;
6
+ open: boolean;
7
+ }): JSX.Element;
8
+ Trigger: {
9
+ ({ className, children, onToggle, }: {
10
+ className?: string | undefined;
11
+ children: React.ReactNode;
12
+ onToggle: () => void;
13
+ }): JSX.Element;
14
+ displayName: string;
15
+ };
16
+ Content: {
17
+ ({ children, onClickOutside, className, style, }: {
18
+ children?: React.ReactNode;
19
+ onClickOutside?: (() => void) | undefined;
20
+ className?: string | undefined;
21
+ style?: React.CSSProperties | undefined;
22
+ }): JSX.Element;
23
+ displayName: string;
24
+ };
25
+ Item: {
26
+ ({ icon, onSelect, children, shortcut, className, ...rest }: {
27
+ icon?: JSX.Element | undefined;
28
+ onSelect: () => void;
29
+ children: React.ReactNode;
30
+ shortcut?: string | undefined;
31
+ className?: string | undefined;
32
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
33
+ displayName: string;
34
+ };
35
+ ItemLink: {
36
+ ({ icon, shortcut, href, children, className, ...rest }: {
37
+ icon?: JSX.Element | undefined;
38
+ children: React.ReactNode;
39
+ shortcut?: string | undefined;
40
+ className?: string | undefined;
41
+ href: string;
42
+ } & React.AnchorHTMLAttributes<HTMLAnchorElement>): JSX.Element;
43
+ displayName: string;
44
+ };
45
+ ItemCustom: ({ children, className, ...rest }: {
46
+ children: React.ReactNode;
47
+ className?: string | undefined;
48
+ } & React.HTMLAttributes<HTMLDivElement>) => JSX.Element;
49
+ Group: {
50
+ ({ children, className, style, title, }: {
51
+ children: React.ReactNode;
52
+ className?: string | undefined;
53
+ style?: React.CSSProperties | undefined;
54
+ title?: string | undefined;
55
+ }): JSX.Element;
56
+ displayName: string;
57
+ };
58
+ Separator: {
59
+ (): JSX.Element;
60
+ displayName: string;
61
+ };
62
+ displayName: string;
63
+ };
64
+ export default DropdownMenu;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ declare const MenuContent: {
3
+ ({ children, onClickOutside, className, style, }: {
4
+ children?: React.ReactNode;
5
+ onClickOutside?: (() => void) | undefined;
6
+ className?: string | undefined;
7
+ style?: import("react").CSSProperties | undefined;
8
+ }): JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export default MenuContent;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ declare const MenuGroup: {
3
+ ({ children, className, style, title, }: {
4
+ children: React.ReactNode;
5
+ className?: string | undefined;
6
+ style?: React.CSSProperties | undefined;
7
+ title?: string | undefined;
8
+ }): JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export default MenuGroup;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export declare const getDrodownMenuItemClassName: (className?: string) => string;
3
+ declare const DropdownMenuItem: {
4
+ ({ icon, onSelect, children, shortcut, className, ...rest }: {
5
+ icon?: JSX.Element | undefined;
6
+ onSelect: () => void;
7
+ children: React.ReactNode;
8
+ shortcut?: string | undefined;
9
+ className?: string | undefined;
10
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
11
+ displayName: string;
12
+ };
13
+ export default DropdownMenuItem;
@@ -0,0 +1,6 @@
1
+ declare const MenuItemContent: ({ icon, shortcut, children, }: {
2
+ icon?: JSX.Element | undefined;
3
+ shortcut?: string | undefined;
4
+ children: React.ReactNode;
5
+ }) => JSX.Element;
6
+ export default MenuItemContent;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ declare const DropdownMenuItemCustom: ({ children, className, ...rest }: {
3
+ children: React.ReactNode;
4
+ className?: string | undefined;
5
+ } & React.HTMLAttributes<HTMLDivElement>) => JSX.Element;
6
+ export default DropdownMenuItemCustom;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ declare const DropdownMenuItemLink: {
3
+ ({ icon, shortcut, href, children, className, ...rest }: {
4
+ icon?: JSX.Element | undefined;
5
+ children: React.ReactNode;
6
+ shortcut?: string | undefined;
7
+ className?: string | undefined;
8
+ href: string;
9
+ } & React.AnchorHTMLAttributes<HTMLAnchorElement>): JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export default DropdownMenuItemLink;
@@ -0,0 +1,5 @@
1
+ declare const MenuSeparator: {
2
+ (): JSX.Element;
3
+ displayName: string;
4
+ };
5
+ export default MenuSeparator;
@@ -0,0 +1,9 @@
1
+ declare const MenuTrigger: {
2
+ ({ className, children, onToggle, }: {
3
+ className?: string | undefined;
4
+ children: React.ReactNode;
5
+ onToggle: () => void;
6
+ }): JSX.Element;
7
+ displayName: string;
8
+ };
9
+ export default MenuTrigger;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const getMenuTriggerComponent: (children: React.ReactNode) => string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null;
3
+ export declare const getMenuContentComponent: (children: React.ReactNode) => string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | null;
@@ -0,0 +1,13 @@
1
+ import { ActionManager } from "../../actions/manager";
2
+ import { AppState, UIChildrenComponents, UIWelcomeScreenComponents } from "../../types";
3
+ declare const Footer: {
4
+ ({ appState, actionManager, showExitZenModeBtn, footerCenter, welcomeScreenHelp, }: {
5
+ appState: AppState;
6
+ actionManager: ActionManager;
7
+ showExitZenModeBtn: boolean;
8
+ footerCenter: UIChildrenComponents["FooterCenter"];
9
+ welcomeScreenHelp: UIWelcomeScreenComponents["HelpHint"];
10
+ }): JSX.Element;
11
+ displayName: string;
12
+ };
13
+ export default Footer;
@@ -0,0 +1,8 @@
1
+ import "./FooterCenter.scss";
2
+ declare const FooterCenter: {
3
+ ({ children }: {
4
+ children?: React.ReactNode;
5
+ }): JSX.Element;
6
+ displayName: string;
7
+ };
8
+ export default FooterCenter;
@@ -73,7 +73,7 @@ export declare const DistributeHorizontallyIcon: JSX.Element;
73
73
  export declare const DistributeVerticallyIcon: JSX.Element;
74
74
  export declare const CenterVerticallyIcon: JSX.Element;
75
75
  export declare const CenterHorizontallyIcon: JSX.Element;
76
- export declare const UsersIcon: JSX.Element;
76
+ export declare const usersIcon: JSX.Element;
77
77
  export declare const start: JSX.Element;
78
78
  export declare const stop: JSX.Element;
79
79
  export declare const CloseIcon: JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import "./LiveCollaborationTrigger.scss";
3
+ declare const LiveCollaborationTrigger: {
4
+ ({ isCollaborating, onSelect, ...rest }: {
5
+ isCollaborating: boolean;
6
+ onSelect: () => void;
7
+ } & import("react").ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
8
+ displayName: string;
9
+ };
10
+ export default LiveCollaborationTrigger;
@@ -0,0 +1,44 @@
1
+ import "./DefaultItems.scss";
2
+ export declare const LoadScene: {
3
+ (): JSX.Element | null;
4
+ displayName: string;
5
+ };
6
+ export declare const SaveToActiveFile: {
7
+ (): JSX.Element | null;
8
+ displayName: string;
9
+ };
10
+ export declare const SaveAsImage: {
11
+ (): JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export declare const Help: {
15
+ (): JSX.Element;
16
+ displayName: string;
17
+ };
18
+ export declare const ClearCanvas: {
19
+ (): JSX.Element | null;
20
+ displayName: string;
21
+ };
22
+ export declare const ToggleTheme: {
23
+ (): JSX.Element | null;
24
+ displayName: string;
25
+ };
26
+ export declare const ChangeCanvasBackground: {
27
+ (): JSX.Element | null;
28
+ displayName: string;
29
+ };
30
+ export declare const Export: {
31
+ (): JSX.Element;
32
+ displayName: string;
33
+ };
34
+ export declare const Socials: {
35
+ (): JSX.Element;
36
+ displayName: string;
37
+ };
38
+ export declare const LiveCollaborationTrigger: {
39
+ ({ onSelect, isCollaborating, }: {
40
+ onSelect: () => void;
41
+ isCollaborating: boolean;
42
+ }): JSX.Element;
43
+ displayName: string;
44
+ };
@@ -0,0 +1,55 @@
1
+ import React from "react";
2
+ import * as DefaultItems from "./DefaultItems";
3
+ declare const MainMenu: {
4
+ ({ children }: {
5
+ children?: React.ReactNode;
6
+ }): JSX.Element;
7
+ Trigger: {
8
+ ({ className, children, onToggle, }: {
9
+ className?: string | undefined;
10
+ children: React.ReactNode;
11
+ onToggle: () => void;
12
+ }): JSX.Element;
13
+ displayName: string;
14
+ };
15
+ Item: {
16
+ ({ icon, onSelect, children, shortcut, className, ...rest }: {
17
+ icon?: JSX.Element | undefined;
18
+ onSelect: () => void;
19
+ children: React.ReactNode;
20
+ shortcut?: string | undefined;
21
+ className?: string | undefined;
22
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
23
+ displayName: string;
24
+ };
25
+ ItemLink: {
26
+ ({ icon, shortcut, href, children, className, ...rest }: {
27
+ icon?: JSX.Element | undefined;
28
+ children: React.ReactNode;
29
+ shortcut?: string | undefined;
30
+ className?: string | undefined;
31
+ href: string;
32
+ } & React.AnchorHTMLAttributes<HTMLAnchorElement>): JSX.Element;
33
+ displayName: string;
34
+ };
35
+ ItemCustom: ({ children, className, ...rest }: {
36
+ children: React.ReactNode;
37
+ className?: string | undefined;
38
+ } & React.HTMLAttributes<HTMLDivElement>) => JSX.Element;
39
+ Group: {
40
+ ({ children, className, style, title, }: {
41
+ children: React.ReactNode;
42
+ className?: string | undefined;
43
+ style?: React.CSSProperties | undefined;
44
+ title?: string | undefined;
45
+ }): JSX.Element;
46
+ displayName: string;
47
+ };
48
+ Separator: {
49
+ (): JSX.Element;
50
+ displayName: string;
51
+ };
52
+ DefaultItems: typeof DefaultItems;
53
+ displayName: string;
54
+ };
55
+ export default MainMenu;
@@ -0,0 +1,44 @@
1
+ import "./DefaultItems.scss";
2
+ export declare const LoadScene: {
3
+ (): JSX.Element | null;
4
+ displayName: string;
5
+ };
6
+ export declare const SaveToActiveFile: {
7
+ (): JSX.Element | null;
8
+ displayName: string;
9
+ };
10
+ export declare const SaveAsImage: {
11
+ (): JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export declare const Help: {
15
+ (): JSX.Element;
16
+ displayName: string;
17
+ };
18
+ export declare const ClearCanvas: {
19
+ (): JSX.Element | null;
20
+ displayName: string;
21
+ };
22
+ export declare const ToggleTheme: {
23
+ (): JSX.Element | null;
24
+ displayName: string;
25
+ };
26
+ export declare const ChangeCanvasBackground: {
27
+ (): JSX.Element | null;
28
+ displayName: string;
29
+ };
30
+ export declare const Export: {
31
+ (): JSX.Element;
32
+ displayName: string;
33
+ };
34
+ export declare const Socials: {
35
+ (): JSX.Element;
36
+ displayName: string;
37
+ };
38
+ export declare const LiveCollaboration: {
39
+ ({ onSelect, isCollaborating, }: {
40
+ onSelect: () => void;
41
+ isCollaborating: boolean;
42
+ }): JSX.Element;
43
+ displayName: string;
44
+ };
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import * as DefaultItems from "./DefaultItems";
3
+ declare const MainMenu: {
4
+ ({ children }: {
5
+ children?: React.ReactNode;
6
+ }): JSX.Element;
7
+ Trigger: {
8
+ ({ className, children, onToggle, }: {
9
+ className?: string | undefined;
10
+ children: React.ReactNode;
11
+ onToggle: () => void;
12
+ }): JSX.Element;
13
+ displayName: string;
14
+ };
15
+ Item: {
16
+ ({ icon, onSelect, children, dataTestId, shortcut, className, style, ariaLabel, }: {
17
+ icon?: JSX.Element | undefined;
18
+ onSelect: () => void;
19
+ children: React.ReactNode;
20
+ dataTestId?: string | undefined;
21
+ shortcut?: string | undefined;
22
+ className?: string | undefined;
23
+ style?: React.CSSProperties | undefined;
24
+ ariaLabel?: string | undefined;
25
+ }): JSX.Element;
26
+ displayName: string;
27
+ };
28
+ ItemLink: {
29
+ ({ icon, dataTestId, shortcut, href, children, className, style, ariaLabel, }: {
30
+ icon?: JSX.Element | undefined;
31
+ children: React.ReactNode;
32
+ dataTestId?: string | undefined;
33
+ shortcut?: string | undefined;
34
+ className?: string | undefined;
35
+ href: string;
36
+ style?: React.CSSProperties | undefined;
37
+ ariaLabel?: string | undefined;
38
+ }): JSX.Element;
39
+ displayName: string;
40
+ };
41
+ ItemCustom: ({ children, className, style, dataTestId, }: {
42
+ children: React.ReactNode;
43
+ className?: string | undefined;
44
+ style?: React.CSSProperties | undefined;
45
+ dataTestId?: string | undefined;
46
+ }) => JSX.Element;
47
+ Group: {
48
+ ({ children, className, style, title, }: {
49
+ children: React.ReactNode;
50
+ className?: string | undefined;
51
+ style?: React.CSSProperties | undefined;
52
+ title?: string | undefined;
53
+ }): JSX.Element;
54
+ displayName: string;
55
+ };
56
+ Separator: {
57
+ (): JSX.Element;
58
+ displayName: string;
59
+ };
60
+ DefaultItems: typeof DefaultItems;
61
+ displayName: string;
62
+ };
63
+ export default MainMenu;
@@ -0,0 +1,58 @@
1
+ /// <reference types="react" />
2
+ declare const Center: {
3
+ ({ children }: {
4
+ children?: React.ReactNode;
5
+ }): JSX.Element;
6
+ displayName: string;
7
+ Logo: {
8
+ ({ children }: {
9
+ children?: React.ReactNode;
10
+ }): JSX.Element;
11
+ displayName: string;
12
+ };
13
+ Heading: {
14
+ ({ children }: {
15
+ children: React.ReactNode;
16
+ }): JSX.Element;
17
+ displayName: string;
18
+ };
19
+ Menu: {
20
+ ({ children }: {
21
+ children?: React.ReactNode;
22
+ }): JSX.Element;
23
+ displayName: string;
24
+ };
25
+ MenuItem: {
26
+ ({ onSelect, children, icon, shortcut, className, ...props }: {
27
+ onSelect: () => void;
28
+ children: React.ReactNode;
29
+ icon?: JSX.Element | undefined;
30
+ shortcut?: string | null | undefined;
31
+ } & import("react").ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
32
+ displayName: string;
33
+ };
34
+ MenuItemLink: {
35
+ ({ children, href, icon, shortcut, className, ...props }: {
36
+ children: React.ReactNode;
37
+ href: string;
38
+ icon?: JSX.Element | undefined;
39
+ shortcut?: string | null | undefined;
40
+ } & import("react").AnchorHTMLAttributes<HTMLAnchorElement>): JSX.Element;
41
+ displayName: string;
42
+ };
43
+ MenuItemHelp: {
44
+ (): JSX.Element;
45
+ displayName: string;
46
+ };
47
+ MenuItemLoadScene: {
48
+ (): JSX.Element | null;
49
+ displayName: string;
50
+ };
51
+ MenuItemLiveCollaborationTrigger: {
52
+ ({ onSelect, }: {
53
+ onSelect: () => any;
54
+ }): JSX.Element;
55
+ displayName: string;
56
+ };
57
+ };
58
+ export { Center };
@@ -0,0 +1,19 @@
1
+ declare const MenuHint: {
2
+ ({ children }: {
3
+ children?: React.ReactNode;
4
+ }): JSX.Element;
5
+ displayName: string;
6
+ };
7
+ declare const ToolbarHint: {
8
+ ({ children }: {
9
+ children?: React.ReactNode;
10
+ }): JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const HelpHint: {
14
+ ({ children }: {
15
+ children?: React.ReactNode;
16
+ }): JSX.Element;
17
+ displayName: string;
18
+ };
19
+ export { HelpHint, MenuHint, ToolbarHint };
@@ -0,0 +1,85 @@
1
+ /// <reference types="react" />
2
+ import "./WelcomeScreen.scss";
3
+ declare const WelcomeScreen: {
4
+ (props: {
5
+ children: React.ReactNode;
6
+ }): null;
7
+ displayName: string;
8
+ Center: {
9
+ ({ children }: {
10
+ children?: import("react").ReactNode;
11
+ }): JSX.Element;
12
+ displayName: string;
13
+ Logo: {
14
+ ({ children }: {
15
+ children?: import("react").ReactNode;
16
+ }): JSX.Element;
17
+ displayName: string;
18
+ };
19
+ Heading: {
20
+ ({ children }: {
21
+ children: import("react").ReactNode;
22
+ }): JSX.Element;
23
+ displayName: string;
24
+ };
25
+ Menu: {
26
+ ({ children }: {
27
+ children?: import("react").ReactNode;
28
+ }): JSX.Element;
29
+ displayName: string;
30
+ };
31
+ MenuItem: {
32
+ ({ onSelect, children, icon, shortcut, className, ...props }: {
33
+ onSelect: () => void;
34
+ children: import("react").ReactNode;
35
+ icon?: JSX.Element | undefined;
36
+ shortcut?: string | null | undefined;
37
+ } & import("react").ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
38
+ displayName: string;
39
+ };
40
+ MenuItemLink: {
41
+ ({ children, href, icon, shortcut, className, ...props }: {
42
+ children: import("react").ReactNode;
43
+ href: string;
44
+ icon?: JSX.Element | undefined;
45
+ shortcut?: string | null | undefined;
46
+ } & import("react").AnchorHTMLAttributes<HTMLAnchorElement>): JSX.Element;
47
+ displayName: string;
48
+ };
49
+ MenuItemHelp: {
50
+ (): JSX.Element;
51
+ displayName: string;
52
+ };
53
+ MenuItemLoadScene: {
54
+ (): JSX.Element | null;
55
+ displayName: string;
56
+ };
57
+ MenuItemLiveCollaborationTrigger: {
58
+ ({ onSelect, }: {
59
+ onSelect: () => any;
60
+ }): JSX.Element;
61
+ displayName: string;
62
+ };
63
+ };
64
+ Hints: {
65
+ MenuHint: {
66
+ ({ children }: {
67
+ children?: import("react").ReactNode;
68
+ }): JSX.Element;
69
+ displayName: string;
70
+ };
71
+ ToolbarHint: {
72
+ ({ children }: {
73
+ children?: import("react").ReactNode;
74
+ }): JSX.Element;
75
+ displayName: string;
76
+ };
77
+ HelpHint: {
78
+ ({ children }: {
79
+ children?: import("react").ReactNode;
80
+ }): JSX.Element;
81
+ displayName: string;
82
+ };
83
+ };
84
+ };
85
+ export default WelcomeScreen;
@@ -109,11 +109,6 @@ export declare const MIN_ZOOM = 0.1;
109
109
  export declare const HYPERLINK_TOOLTIP_DELAY = 300;
110
110
  export declare const IDLE_THRESHOLD = 60000;
111
111
  export declare const ACTIVE_THRESHOLD = 3000;
112
- export declare const MODES: {
113
- VIEW: string;
114
- ZEN: string;
115
- GRID: string;
116
- };
117
112
  export declare const THEME_FILTER: any;
118
113
  export declare const URL_QUERY_KEYS: {
119
114
  readonly addLibrary: "addLibrary";
@@ -152,8 +147,12 @@ export declare const TEXT_ALIGN: {
152
147
  RIGHT: string;
153
148
  };
154
149
  export declare const ELEMENT_READY_TO_ERASE_OPACITY = 20;
155
- export declare const COOKIES: {
156
- readonly AUTH_STATE_COOKIE: "excplus-auth";
150
+ export declare const DEFAULT_PROPORTIONAL_RADIUS = 0.25;
151
+ export declare const DEFAULT_ADAPTIVE_RADIUS = 32;
152
+ export declare const ROUNDNESS: {
153
+ readonly LEGACY: 1;
154
+ readonly PROPORTIONAL_RADIUS: 2;
155
+ readonly ADAPTIVE_RADIUS: 3;
157
156
  };
158
157
  /** key containt id of precedeing elemnt id we use in reconciliation during
159
158
  * collaboration */
@@ -18,6 +18,11 @@ export declare const actionLink: {
18
18
  appState: {
19
19
  showHyperlinkPopup: "editor";
20
20
  openMenu: null;
21
+ contextMenu: {
22
+ items: import("../components/ContextMenu").ContextMenuItems;
23
+ top: number;
24
+ left: number;
25
+ } | null;
21
26
  showWelcomeScreen: boolean;
22
27
  isLoading: boolean;
23
28
  errorMessage: string | null;
@@ -57,10 +62,9 @@ export declare const actionLink: {
57
62
  currentItemFontFamily: number;
58
63
  currentItemFontSize: number;
59
64
  currentItemTextAlign: string;
60
- currentItemStrokeSharpness: import("./types").StrokeSharpness;
61
65
  currentItemStartArrowhead: import("./types").Arrowhead | null;
62
66
  currentItemEndArrowhead: import("./types").Arrowhead | null;
63
- currentItemLinearStrokeSharpness: import("./types").StrokeSharpness;
67
+ currentItemRoundness: import("./types").StrokeRoundness;
64
68
  viewBackgroundColor: string;
65
69
  scrollX: number;
66
70
  scrollY: number;
@@ -74,7 +78,7 @@ export declare const actionLink: {
74
78
  }>;
75
79
  openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
76
80
  openSidebar: "library" | "customSidebar" | null;
77
- openDialog: "imageExport" | "help" | null;
81
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
78
82
  isSidebarDocked: boolean;
79
83
  lastPointerDownWith: import("./types").PointerType;
80
84
  selectedElementIds: {
@@ -130,10 +134,8 @@ export declare const actionLink: {
130
134
  };
131
135
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
132
136
  contextItemLabel: (elements: readonly import("./types").ExcalidrawElement[], appState: Readonly<AppState>) => "labels.link.edit" | "labels.link.create";
133
- contextItemPredicate: (elements: readonly import("./types").ExcalidrawElement[], appState: AppState) => boolean;
134
- PanelComponent: ({ elements, appState, updateData }: import("../actions/types").PanelComponentProps & {
135
- isInHamburgerMenu: boolean;
136
- }) => JSX.Element;
137
+ predicate: (elements: readonly import("./types").ExcalidrawElement[], appState: AppState) => boolean;
138
+ PanelComponent: ({ elements, appState, updateData }: import("../actions/types").PanelComponentProps) => JSX.Element;
137
139
  } & {
138
140
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
139
141
  };
@@ -1,15 +1,16 @@
1
1
  import { ExcalidrawElement, ExcalidrawLinearElement, Arrowhead, NonDeleted } from "./types";
2
2
  import { Drawable, Op } from "roughjs/bin/core";
3
3
  export declare type Bounds = readonly [number, number, number, number];
4
- export declare const getElementAbsoluteCoords: (element: ExcalidrawElement) => Bounds;
4
+ export declare const getElementAbsoluteCoords: (element: ExcalidrawElement, includeBoundText?: boolean) => [number, number, number, number, number, number];
5
5
  export declare const pointRelativeTo: (element: ExcalidrawElement, absoluteCoords: readonly [number, number]) => readonly [number, number];
6
6
  export declare const getDiamondPoints: (element: ExcalidrawElement) => number[];
7
7
  export declare const getCurvePathOps: (shape: Drawable) => Op[];
8
+ export declare const getMinMaxXYFromCurvePathOps: (ops: Op[], transformXY?: ((x: number, y: number) => [number, number]) | undefined) => [number, number, number, number];
8
9
  export declare const getArrowheadPoints: (element: ExcalidrawLinearElement, shape: Drawable[], position: "start" | "end", arrowhead: Arrowhead) => number[] | null;
9
10
  export declare const getElementBounds: (element: ExcalidrawElement) => [number, number, number, number];
10
11
  export declare const getCommonBounds: (elements: readonly ExcalidrawElement[]) => [number, number, number, number];
11
12
  export declare const getResizedElementAbsoluteCoords: (element: ExcalidrawElement, nextWidth: number, nextHeight: number, normalizePoints: boolean) => [number, number, number, number];
12
- export declare const getElementPointsCoords: (element: ExcalidrawLinearElement, points: readonly (readonly [number, number])[], sharpness: ExcalidrawElement["strokeSharpness"]) => [number, number, number, number];
13
+ export declare const getElementPointsCoords: (element: ExcalidrawLinearElement, points: readonly (readonly [number, number])[]) => [number, number, number, number];
13
14
  export declare const getClosestElementBounds: (elements: readonly ExcalidrawElement[], from: {
14
15
  x: number;
15
16
  y: number;