@excalidraw/common 0.18.0-9ba0f5d → 0.18.0-a9ca16e

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 (128) hide show
  1. package/dist/dev/index.js +315 -21
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/debug.d.ts +21 -0
  5. package/dist/types/common/src/appEventBus.d.ts +27 -0
  6. package/dist/types/common/src/colors.d.ts +13 -13
  7. package/dist/types/common/src/constants.d.ts +4 -0
  8. package/dist/types/common/src/index.d.ts +3 -0
  9. package/dist/types/common/src/utils.d.ts +4 -7
  10. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  11. package/dist/types/element/src/Scene.d.ts +2 -0
  12. package/dist/types/element/src/arrowheads.d.ts +3 -0
  13. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  14. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  15. package/dist/types/element/src/binding.d.ts +13 -8
  16. package/dist/types/element/src/bounds.d.ts +1 -1
  17. package/dist/types/element/src/collision.d.ts +4 -3
  18. package/dist/types/element/src/distribute.d.ts +2 -1
  19. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  20. package/dist/types/element/src/index.d.ts +3 -0
  21. package/dist/types/element/src/linearElementEditor.d.ts +5 -0
  22. package/dist/types/element/src/mutateElement.d.ts +2 -0
  23. package/dist/types/element/src/selection.d.ts +6 -2
  24. package/dist/types/element/src/textElement.d.ts +1 -1
  25. package/dist/types/element/src/textWrapping.d.ts +26 -0
  26. package/dist/types/element/src/types.d.ts +5 -2
  27. package/dist/types/element/src/utils.d.ts +5 -3
  28. package/dist/types/element/src/zindex.d.ts +1 -1
  29. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +38 -35
  30. package/dist/types/excalidraw/actions/actionBoundText.d.ts +27 -25
  31. package/dist/types/excalidraw/actions/actionCanvas.d.ts +216 -204
  32. package/dist/types/excalidraw/actions/actionClipboard.d.ts +26 -24
  33. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
  34. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +42 -37
  35. package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
  36. package/dist/types/excalidraw/actions/actionElementLock.d.ts +26 -24
  37. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
  38. package/dist/types/excalidraw/actions/actionExport.d.ts +114 -386
  39. package/dist/types/excalidraw/actions/actionFrame.d.ts +52 -48
  40. package/dist/types/excalidraw/actions/actionGroup.d.ts +29 -27
  41. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
  42. package/dist/types/excalidraw/actions/actionLink.d.ts +13 -12
  43. package/dist/types/excalidraw/actions/actionMenu.d.ts +9 -12
  44. package/dist/types/excalidraw/actions/actionProperties.d.ts +29 -27
  45. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +14 -13
  46. package/dist/types/excalidraw/actions/actionStyles.d.ts +13 -11
  47. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  48. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
  49. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +13 -12
  50. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
  51. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +13 -12
  52. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +9 -12
  53. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +13 -12
  54. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +13 -12
  55. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +13 -12
  56. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  57. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  58. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  59. package/dist/types/excalidraw/appState.d.ts +29 -27
  60. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  61. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  62. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  63. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  64. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  65. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  66. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  67. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  68. package/dist/types/excalidraw/clipboard.d.ts +8 -9
  69. package/dist/types/excalidraw/components/App.d.ts +53 -13
  70. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  71. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  72. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  73. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  74. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  75. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  76. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +2 -6
  77. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +2 -1
  78. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  79. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +11 -7
  80. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  81. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  82. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  83. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
  84. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  85. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +4 -0
  86. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  87. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  88. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  89. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  90. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -16
  91. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  92. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -12
  93. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  94. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
  95. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  96. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  97. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  98. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  99. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  100. package/dist/types/excalidraw/components/icons.d.ts +23 -9
  101. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
  102. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -14
  103. package/dist/types/excalidraw/components/shapes.d.ts +74 -1
  104. package/dist/types/excalidraw/data/blob.d.ts +167 -166
  105. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  106. package/dist/types/excalidraw/data/index.d.ts +2 -3
  107. package/dist/types/excalidraw/data/json.d.ts +94 -85
  108. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  109. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  110. package/dist/types/excalidraw/types.d.ts +93 -16
  111. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  112. package/dist/types/math/src/point.d.ts +7 -2
  113. package/dist/types/math/src/types.d.ts +25 -1
  114. package/package.json +1 -1
  115. package/dist/types/excalidraw/charts.d.ts +0 -27
  116. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  117. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  118. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  119. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  120. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  121. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  122. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  123. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  124. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  125. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  126. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  127. package/dist/types/excalidraw/index.d.ts +0 -46
  128. package/dist/types/excalidraw/polyfill.d.ts +0 -2
@@ -1,17 +1,17 @@
1
- import type { Theme } from "@excalidraw/element/types";
1
+ import type { ExcalidrawElement, Theme } from "@excalidraw/element/types";
2
2
  import "../components/ToolIcon.scss";
3
- import type { AppState } from "../types";
3
+ import type { AppClassProperties, AppState, BinaryFiles, ExcalidrawProps } from "../types";
4
4
  export declare const actionChangeProjectName: import("./types").Action<string | null> & {
5
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
5
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
6
6
  };
7
7
  export declare const actionChangeExportScale: import("./types").Action<number> & {
8
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
8
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
9
9
  };
10
10
  export declare const actionChangeExportBackground: import("./types").Action<boolean> & {
11
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
11
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
12
12
  };
13
13
  export declare const actionChangeExportEmbedScene: import("./types").Action<boolean> & {
14
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
14
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
15
15
  };
16
16
  export declare const actionSaveToActiveFile: {
17
17
  name: "saveToActiveFile";
@@ -20,166 +20,22 @@ export declare const actionSaveToActiveFile: {
20
20
  trackEvent: {
21
21
  category: "export";
22
22
  };
23
- predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
24
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: import("../types").AppClassProperties) => Promise<{
25
- captureUpdate: "EVENTUALLY";
23
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: ExcalidrawProps, app: AppClassProperties) => boolean;
24
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: AppClassProperties) => Promise<false | {
25
+ captureUpdate: "NEVER";
26
26
  appState: {
27
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
27
+ fileHandle: FileSystemFileHandle | null;
28
28
  toast: {
29
29
  message: string;
30
- } | null;
31
- contextMenu: {
32
- items: import("../components/ContextMenu").ContextMenuItems;
33
- top: number;
34
- left: number;
35
- } | null;
36
- showWelcomeScreen: boolean;
37
- isLoading: boolean;
38
- errorMessage: React.ReactNode;
39
- activeEmbeddable: {
40
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
41
- state: "hover" | "active";
42
- } | null;
43
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
44
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
45
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
46
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
47
- isBindingEnabled: boolean;
48
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
49
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
50
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
51
- frameRendering: {
52
- enabled: boolean;
53
- name: boolean;
54
- outline: boolean;
55
- clip: boolean;
56
- };
57
- editingFrame: string | null;
58
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
59
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
60
- activeTool: {
61
- lastActiveTool: import("../types").ActiveTool | null;
62
- locked: boolean;
63
- fromSelection: boolean;
64
- } & import("../types").ActiveTool;
65
- preferredSelectionTool: {
66
- type: "selection" | "lasso";
67
- initialized: boolean;
68
- };
69
- penMode: boolean;
70
- penDetected: boolean;
71
- exportBackground: boolean;
72
- exportEmbedScene: boolean;
73
- exportWithDarkMode: boolean;
74
- exportScale: number;
75
- currentItemStrokeColor: string;
76
- currentItemBackgroundColor: string;
77
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
78
- currentItemStrokeWidth: number;
79
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
80
- currentItemRoughness: number;
81
- currentItemOpacity: number;
82
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
83
- currentItemFontSize: number;
84
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
85
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
86
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
87
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
88
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
89
- currentItemArrowType: "sharp" | "round" | "elbow";
90
- viewBackgroundColor: string;
91
- scrollX: number;
92
- scrollY: number;
93
- cursorButton: "up" | "down";
94
- scrolledOutside: boolean;
95
- name: string | null;
96
- isResizing: boolean;
97
- isRotating: boolean;
98
- zoom: import("../types").Zoom;
99
- openMenu: "canvas" | null;
100
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
101
- openSidebar: {
102
- name: import("../types").SidebarName;
103
- tab?: import("../types").SidebarTabName;
104
- } | null;
105
- openDialog: null | {
106
- name: "imageExport" | "help" | "jsonExport";
107
- } | {
108
- name: "ttd";
109
- tab: "text-to-diagram" | "mermaid";
110
- } | {
111
- name: "commandPalette";
112
- } | {
113
- name: "settings";
114
- } | {
115
- name: "elementLinkSelector";
116
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
117
- };
118
- defaultSidebarDockedPreference: boolean;
119
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
120
- selectedElementIds: Readonly<{
121
- [id: string]: true;
122
- }>;
123
- hoveredElementIds: Readonly<{
124
- [id: string]: true;
125
- }>;
126
- previousSelectedElementIds: {
127
- [id: string]: true;
30
+ duration: number;
128
31
  };
129
- selectedElementsAreBeingDragged: boolean;
130
- shouldCacheIgnoreZoom: boolean;
131
- zenModeEnabled: boolean;
132
- theme: Theme;
133
- gridSize: number;
134
- gridStep: number;
135
- gridModeEnabled: boolean;
136
- viewModeEnabled: boolean;
137
- selectedGroupIds: {
138
- [groupId: string]: boolean;
139
- };
140
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
141
- width: number;
142
- height: number;
143
- offsetTop: number;
144
- offsetLeft: number;
145
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
146
- stats: {
147
- open: boolean;
148
- panels: number;
149
- };
150
- currentChartType: import("@excalidraw/element/types").ChartType;
151
- pasteDialog: {
152
- shown: false;
153
- data: null;
154
- } | {
155
- shown: true;
156
- data: import("../charts").Spreadsheet;
157
- };
158
- showHyperlinkPopup: false | "info" | "editor";
159
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
160
- snapLines: readonly import("../snapping").SnapLine[];
161
- originSnapOffset: {
162
- x: number;
163
- y: number;
164
- } | null;
165
- objectsSnapModeEnabled: boolean;
166
- userToFollow: import("../types").UserToFollow | null;
167
- followedBy: Set<import("../types").SocketId>;
168
- isCropping: boolean;
169
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
170
- searchMatches: Readonly<{
171
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
172
- matches: readonly import("../types").SearchMatch[];
173
- }> | null;
174
- activeLockedId: string | null;
175
- lockedMultiSelections: {
176
- [groupId: string]: true;
177
- };
178
- bindMode: import("@excalidraw/element/types").BindMode;
179
32
  };
180
33
  } | {
181
- captureUpdate: "EVENTUALLY";
182
- appState?: undefined;
34
+ captureUpdate: "NEVER";
35
+ appState: {
36
+ toast: null;
37
+ fileHandle?: undefined;
38
+ };
183
39
  }>;
184
40
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
185
41
  } & {
@@ -193,14 +49,52 @@ export declare const actionSaveFileToDisk: {
193
49
  trackEvent: {
194
50
  category: "export";
195
51
  };
196
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: import("../types").AppClassProperties) => Promise<{
197
- captureUpdate: "EVENTUALLY";
52
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: AppClassProperties) => Promise<false | {
53
+ captureUpdate: "NEVER";
198
54
  appState: {
199
55
  openDialog: null;
200
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
56
+ fileHandle: FileSystemFileHandle | null;
201
57
  toast: {
202
58
  message: string;
59
+ duration: number;
203
60
  };
61
+ };
62
+ } | {
63
+ captureUpdate: "NEVER";
64
+ appState: {
65
+ toast: null;
66
+ openDialog?: undefined;
67
+ fileHandle?: undefined;
68
+ };
69
+ }>;
70
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
71
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
72
+ } & {
73
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
74
+ };
75
+ export declare const actionLoadScene: {
76
+ name: "loadScene";
77
+ label: string;
78
+ trackEvent: {
79
+ category: "export";
80
+ };
81
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: ExcalidrawProps, app: AppClassProperties) => boolean;
82
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => Promise<false | {
83
+ elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
84
+ appState: {
85
+ viewModeEnabled: boolean;
86
+ zenModeEnabled: boolean;
87
+ gridModeEnabled: boolean;
88
+ objectsSnapModeEnabled: boolean;
89
+ theme: Theme;
90
+ name: string | null;
91
+ currentItemArrowType: "sharp" | "round" | "elbow";
92
+ gridSize: number;
93
+ activeTool: {
94
+ lastActiveTool: import("../types").ActiveTool | null;
95
+ locked: boolean;
96
+ fromSelection: boolean;
97
+ } & import("../types").ActiveTool;
204
98
  contextMenu: {
205
99
  items: import("../components/ContextMenu").ContextMenuItems;
206
100
  top: number;
@@ -218,8 +112,13 @@ export declare const actionSaveFileToDisk: {
218
112
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
219
113
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
220
114
  isBindingEnabled: boolean;
115
+ bindingPreference: "enabled" | "disabled";
116
+ isMidpointSnappingEnabled: boolean;
221
117
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
222
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
118
+ suggestedBinding: {
119
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
120
+ midPoint?: import("@excalidraw/math").GlobalPoint;
121
+ } | null;
223
122
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
224
123
  frameRendering: {
225
124
  enabled: boolean;
@@ -228,13 +127,8 @@ export declare const actionSaveFileToDisk: {
228
127
  clip: boolean;
229
128
  };
230
129
  editingFrame: string | null;
231
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
232
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
233
- activeTool: {
234
- lastActiveTool: import("../types").ActiveTool | null;
235
- locked: boolean;
236
- fromSelection: boolean;
237
- } & import("../types").ActiveTool;
130
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
131
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
238
132
  preferredSelectionTool: {
239
133
  type: "selection" | "lasso";
240
134
  initialized: boolean;
@@ -247,9 +141,9 @@ export declare const actionSaveFileToDisk: {
247
141
  exportScale: number;
248
142
  currentItemStrokeColor: string;
249
143
  currentItemBackgroundColor: string;
250
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
144
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
251
145
  currentItemStrokeWidth: number;
252
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
146
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
253
147
  currentItemRoughness: number;
254
148
  currentItemOpacity: number;
255
149
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
@@ -259,13 +153,11 @@ export declare const actionSaveFileToDisk: {
259
153
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
260
154
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
261
155
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
262
- currentItemArrowType: "sharp" | "round" | "elbow";
263
156
  viewBackgroundColor: string;
264
157
  scrollX: number;
265
158
  scrollY: number;
266
159
  cursorButton: "up" | "down";
267
160
  scrolledOutside: boolean;
268
- name: string | null;
269
161
  isResizing: boolean;
270
162
  isRotating: boolean;
271
163
  zoom: import("../types").Zoom;
@@ -275,100 +167,6 @@ export declare const actionSaveFileToDisk: {
275
167
  name: import("../types").SidebarName;
276
168
  tab?: import("../types").SidebarTabName;
277
169
  } | null;
278
- defaultSidebarDockedPreference: boolean;
279
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
280
- selectedElementIds: Readonly<{
281
- [id: string]: true;
282
- }>;
283
- hoveredElementIds: Readonly<{
284
- [id: string]: true;
285
- }>;
286
- previousSelectedElementIds: {
287
- [id: string]: true;
288
- };
289
- selectedElementsAreBeingDragged: boolean;
290
- shouldCacheIgnoreZoom: boolean;
291
- zenModeEnabled: boolean;
292
- theme: Theme;
293
- gridSize: number;
294
- gridStep: number;
295
- gridModeEnabled: boolean;
296
- viewModeEnabled: boolean;
297
- selectedGroupIds: {
298
- [groupId: string]: boolean;
299
- };
300
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
301
- width: number;
302
- height: number;
303
- offsetTop: number;
304
- offsetLeft: number;
305
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
306
- stats: {
307
- open: boolean;
308
- panels: number;
309
- };
310
- currentChartType: import("@excalidraw/element/types").ChartType;
311
- pasteDialog: {
312
- shown: false;
313
- data: null;
314
- } | {
315
- shown: true;
316
- data: import("../charts").Spreadsheet;
317
- };
318
- showHyperlinkPopup: false | "info" | "editor";
319
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
320
- snapLines: readonly import("../snapping").SnapLine[];
321
- originSnapOffset: {
322
- x: number;
323
- y: number;
324
- } | null;
325
- objectsSnapModeEnabled: boolean;
326
- userToFollow: import("../types").UserToFollow | null;
327
- followedBy: Set<import("../types").SocketId>;
328
- isCropping: boolean;
329
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
330
- searchMatches: Readonly<{
331
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
332
- matches: readonly import("../types").SearchMatch[];
333
- }> | null;
334
- activeLockedId: string | null;
335
- lockedMultiSelections: {
336
- [groupId: string]: true;
337
- };
338
- bindMode: import("@excalidraw/element/types").BindMode;
339
- };
340
- } | {
341
- captureUpdate: "EVENTUALLY";
342
- appState?: undefined;
343
- }>;
344
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
345
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
346
- } & {
347
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
348
- };
349
- export declare const actionLoadScene: {
350
- name: "loadScene";
351
- label: string;
352
- trackEvent: {
353
- category: "export";
354
- };
355
- predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
356
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => Promise<false | {
357
- elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
358
- appState: {
359
- viewBackgroundColor: string;
360
- theme: Theme;
361
- frameRendering: {
362
- enabled: boolean;
363
- name: boolean;
364
- outline: boolean;
365
- clip: boolean;
366
- };
367
- name: string | null;
368
- zoom: import("../types").Zoom;
369
- scrollX: number;
370
- scrollY: number;
371
- viewModeEnabled: boolean;
372
170
  openDialog: null | {
373
171
  name: "imageExport" | "help" | "jsonExport";
374
172
  } | {
@@ -380,134 +178,63 @@ export declare const actionLoadScene: {
380
178
  name: "settings";
381
179
  } | {
382
180
  name: "elementLinkSelector";
383
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
181
+ sourceElementId: ExcalidrawElement["id"];
182
+ } | {
183
+ name: "charts";
184
+ data: import("../charts").Spreadsheet;
185
+ rawText: string;
384
186
  };
385
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
187
+ defaultSidebarDockedPreference: boolean;
188
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
386
189
  selectedElementIds: Readonly<{
387
190
  [id: string]: true;
388
191
  }>;
389
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
390
- activeEmbeddable: {
391
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
392
- state: "hover" | "active";
393
- } | null;
394
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
395
- selectedGroupIds: {
396
- [groupId: string]: boolean;
397
- };
398
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
399
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
400
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
401
- isBindingEnabled: boolean;
402
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
403
- isRotating: boolean;
404
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
405
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
406
- snapLines: readonly import("../snapping").SnapLine[];
407
- zenModeEnabled: boolean;
408
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
409
- isCropping: boolean;
410
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
411
- searchMatches: Readonly<{
412
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
413
- matches: readonly import("../types").SearchMatch[];
414
- }> | null;
415
- activeLockedId: string | null;
416
192
  hoveredElementIds: Readonly<{
417
193
  [id: string]: true;
418
194
  }>;
419
- shouldCacheIgnoreZoom: boolean;
420
- exportScale: number;
421
- bindMode: import("@excalidraw/element/types").BindMode;
422
- gridSize: number;
423
- contextMenu: {
424
- items: import("../components/ContextMenu").ContextMenuItems;
425
- top: number;
426
- left: number;
427
- } | null;
428
- showWelcomeScreen: boolean;
429
- isLoading: boolean;
430
- errorMessage: React.ReactNode;
431
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
432
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
433
- editingFrame: string | null;
434
- activeTool: {
435
- lastActiveTool: import("../types").ActiveTool | null;
436
- locked: boolean;
437
- fromSelection: boolean;
438
- } & import("../types").ActiveTool;
439
- preferredSelectionTool: {
440
- type: "selection" | "lasso";
441
- initialized: boolean;
442
- };
443
- penMode: boolean;
444
- penDetected: boolean;
445
- exportBackground: boolean;
446
- exportEmbedScene: boolean;
447
- exportWithDarkMode: boolean;
448
- currentItemStrokeColor: string;
449
- currentItemBackgroundColor: string;
450
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
451
- currentItemStrokeWidth: number;
452
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
453
- currentItemRoughness: number;
454
- currentItemOpacity: number;
455
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
456
- currentItemFontSize: number;
457
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
458
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
459
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
460
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
461
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
462
- currentItemArrowType: "sharp" | "round" | "elbow";
463
- cursorButton: "up" | "down";
464
- scrolledOutside: boolean;
465
- isResizing: boolean;
466
- openMenu: "canvas" | null;
467
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
468
- openSidebar: {
469
- name: import("../types").SidebarName;
470
- tab?: import("../types").SidebarTabName;
471
- } | null;
472
- defaultSidebarDockedPreference: boolean;
473
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
474
195
  previousSelectedElementIds: {
475
196
  [id: string]: true;
476
197
  };
477
198
  selectedElementsAreBeingDragged: boolean;
199
+ shouldCacheIgnoreZoom: boolean;
478
200
  toast: {
479
- message: string;
201
+ message: React.ReactNode;
480
202
  closable?: boolean;
481
203
  duration?: number;
482
204
  } | null;
483
205
  gridStep: number;
484
- gridModeEnabled: boolean;
485
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
206
+ selectedGroupIds: {
207
+ [groupId: string]: boolean;
208
+ };
209
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
210
+ fileHandle: FileSystemFileHandle | null;
211
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
486
212
  stats: {
487
213
  open: boolean;
488
214
  panels: number;
489
215
  };
490
- currentChartType: import("@excalidraw/element/types").ChartType;
491
- pasteDialog: {
492
- shown: false;
493
- data: null;
494
- } | {
495
- shown: true;
496
- data: import("../charts").Spreadsheet;
497
- };
498
216
  showHyperlinkPopup: false | "info" | "editor";
217
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
218
+ snapLines: readonly import("../snapping").SnapLine[];
499
219
  originSnapOffset: {
500
220
  x: number;
501
221
  y: number;
502
222
  } | null;
503
- objectsSnapModeEnabled: boolean;
504
223
  userToFollow: import("../types").UserToFollow | null;
505
224
  followedBy: Set<import("../types").SocketId>;
225
+ isCropping: boolean;
226
+ croppingElementId: ExcalidrawElement["id"] | null;
227
+ searchMatches: Readonly<{
228
+ focusedId: ExcalidrawElement["id"] | null;
229
+ matches: readonly import("../types").SearchMatch[];
230
+ }> | null;
231
+ activeLockedId: string | null;
506
232
  lockedMultiSelections: {
507
233
  [groupId: string]: true;
508
234
  };
235
+ bindMode: import("@excalidraw/element/types").BindMode;
509
236
  };
510
- files: import("../types").BinaryFiles;
237
+ files: BinaryFiles;
511
238
  captureUpdate: "IMMEDIATELY";
512
239
  } | {
513
240
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
@@ -529,8 +256,13 @@ export declare const actionLoadScene: {
529
256
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
530
257
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
531
258
  isBindingEnabled: boolean;
259
+ bindingPreference: "enabled" | "disabled";
260
+ isMidpointSnappingEnabled: boolean;
532
261
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
533
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
262
+ suggestedBinding: {
263
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
264
+ midPoint?: import("@excalidraw/math").GlobalPoint;
265
+ } | null;
534
266
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
535
267
  frameRendering: {
536
268
  enabled: boolean;
@@ -539,8 +271,8 @@ export declare const actionLoadScene: {
539
271
  clip: boolean;
540
272
  };
541
273
  editingFrame: string | null;
542
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
543
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
274
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
275
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
544
276
  activeTool: {
545
277
  lastActiveTool: import("../types").ActiveTool | null;
546
278
  locked: boolean;
@@ -558,9 +290,9 @@ export declare const actionLoadScene: {
558
290
  exportScale: number;
559
291
  currentItemStrokeColor: string;
560
292
  currentItemBackgroundColor: string;
561
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
293
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
562
294
  currentItemStrokeWidth: number;
563
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
295
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
564
296
  currentItemRoughness: number;
565
297
  currentItemOpacity: number;
566
298
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
@@ -597,7 +329,11 @@ export declare const actionLoadScene: {
597
329
  name: "settings";
598
330
  } | {
599
331
  name: "elementLinkSelector";
600
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
332
+ sourceElementId: ExcalidrawElement["id"];
333
+ } | {
334
+ name: "charts";
335
+ data: import("../charts").Spreadsheet;
336
+ rawText: string;
601
337
  };
602
338
  defaultSidebarDockedPreference: boolean;
603
339
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -613,7 +349,7 @@ export declare const actionLoadScene: {
613
349
  selectedElementsAreBeingDragged: boolean;
614
350
  shouldCacheIgnoreZoom: boolean;
615
351
  toast: {
616
- message: string;
352
+ message: React.ReactNode;
617
353
  closable?: boolean;
618
354
  duration?: number;
619
355
  } | null;
@@ -631,20 +367,12 @@ export declare const actionLoadScene: {
631
367
  height: number;
632
368
  offsetTop: number;
633
369
  offsetLeft: number;
634
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
370
+ fileHandle: FileSystemFileHandle | null;
635
371
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
636
372
  stats: {
637
373
  open: boolean;
638
374
  panels: number;
639
375
  };
640
- currentChartType: import("@excalidraw/element/types").ChartType;
641
- pasteDialog: {
642
- shown: false;
643
- data: null;
644
- } | {
645
- shown: true;
646
- data: import("../charts").Spreadsheet;
647
- };
648
376
  showHyperlinkPopup: false | "info" | "editor";
649
377
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
650
378
  snapLines: readonly import("../snapping").SnapLine[];
@@ -656,9 +384,9 @@ export declare const actionLoadScene: {
656
384
  userToFollow: import("../types").UserToFollow | null;
657
385
  followedBy: Set<import("../types").SocketId>;
658
386
  isCropping: boolean;
659
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
387
+ croppingElementId: ExcalidrawElement["id"] | null;
660
388
  searchMatches: Readonly<{
661
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
389
+ focusedId: ExcalidrawElement["id"] | null;
662
390
  matches: readonly import("../types").SearchMatch[];
663
391
  }> | null;
664
392
  activeLockedId: string | null;
@@ -667,7 +395,7 @@ export declare const actionLoadScene: {
667
395
  };
668
396
  bindMode: import("@excalidraw/element/types").BindMode;
669
397
  };
670
- files: import("../types").BinaryFiles;
398
+ files: BinaryFiles;
671
399
  captureUpdate: "EVENTUALLY";
672
400
  }>;
673
401
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -675,5 +403,5 @@ export declare const actionLoadScene: {
675
403
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
676
404
  };
677
405
  export declare const actionExportWithDarkMode: import("./types").Action<boolean> & {
678
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
406
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
679
407
  };