@excalidraw/common 0.18.0-51ad895 → 0.18.0-6135548

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 (198) hide show
  1. package/dist/dev/index.js +1128 -302
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/bounds.d.ts +10 -0
  5. package/dist/types/common/src/colors.d.ts +59 -39
  6. package/dist/types/common/src/constants.d.ts +14 -12
  7. package/dist/types/common/src/editorInterface.d.ts +1 -1
  8. package/dist/types/common/src/font-metadata.d.ts +1 -3
  9. package/dist/types/common/src/index.d.ts +1 -1
  10. package/dist/types/common/src/keys.d.ts +1 -1
  11. package/dist/types/common/src/utility-types.d.ts +0 -1
  12. package/dist/types/common/src/utils.d.ts +44 -35
  13. package/dist/types/element/src/Scene.d.ts +4 -4
  14. package/dist/types/element/src/binding.d.ts +6 -4
  15. package/dist/types/element/src/bounds.d.ts +2 -10
  16. package/dist/types/element/src/collision.d.ts +2 -2
  17. package/dist/types/element/src/comparisons.d.ts +7 -7
  18. package/dist/types/element/src/dragElements.d.ts +3 -3
  19. package/dist/types/element/src/duplicate.d.ts +3 -3
  20. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  21. package/dist/types/element/src/frame.d.ts +7 -3
  22. package/dist/types/element/src/heading.d.ts +2 -1
  23. package/dist/types/element/src/image.d.ts +1 -11
  24. package/dist/types/element/src/index.d.ts +1 -0
  25. package/dist/types/element/src/linearElementEditor.d.ts +1 -2
  26. package/dist/types/element/src/mutateElement.d.ts +3 -1
  27. package/dist/types/element/src/newElement.d.ts +6 -6
  28. package/dist/types/element/src/renderElement.d.ts +0 -6
  29. package/dist/types/element/src/resizeElements.d.ts +10 -10
  30. package/dist/types/element/src/resizeTest.d.ts +1 -1
  31. package/dist/types/element/src/selection.d.ts +3 -7
  32. package/dist/types/element/src/shape.d.ts +8 -7
  33. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  34. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
  35. package/dist/types/element/src/transformHandles.d.ts +3 -23
  36. package/dist/types/element/src/typeChecks.d.ts +2 -4
  37. package/dist/types/element/src/utils.d.ts +3 -1
  38. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +114 -178
  39. package/dist/types/excalidraw/actions/actionAlign.d.ts +0 -1
  40. package/dist/types/excalidraw/actions/actionBoundText.d.ts +44 -87
  41. package/dist/types/excalidraw/actions/actionCanvas.d.ts +263 -510
  42. package/dist/types/excalidraw/actions/actionClipboard.d.ts +85 -128
  43. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +21 -43
  44. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +74 -142
  45. package/dist/types/excalidraw/actions/actionDistribute.d.ts +0 -1
  46. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -3
  47. package/dist/types/excalidraw/actions/actionElementLink.d.ts +41 -63
  48. package/dist/types/excalidraw/actions/actionElementLock.d.ts +45 -88
  49. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +41 -63
  50. package/dist/types/excalidraw/actions/actionExport.d.ts +85 -170
  51. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -2
  52. package/dist/types/excalidraw/actions/actionFlip.d.ts +0 -1
  53. package/dist/types/excalidraw/actions/actionFrame.d.ts +208 -329
  54. package/dist/types/excalidraw/actions/actionGroup.d.ts +48 -99
  55. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +149 -207
  56. package/dist/types/excalidraw/actions/actionLink.d.ts +43 -65
  57. package/dist/types/excalidraw/actions/actionMenu.d.ts +35 -57
  58. package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -17
  59. package/dist/types/excalidraw/actions/actionProperties.d.ts +59 -102
  60. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +24 -50
  61. package/dist/types/excalidraw/actions/actionStyles.d.ts +20 -42
  62. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  63. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +41 -63
  64. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +41 -63
  65. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +35 -57
  66. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +40 -62
  67. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +41 -63
  68. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +41 -63
  69. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  70. package/dist/types/excalidraw/actions/manager.d.ts +1 -1
  71. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  72. package/dist/types/excalidraw/appState.d.ts +12 -12
  73. package/dist/types/excalidraw/clipboard.d.ts +7 -31
  74. package/dist/types/excalidraw/components/Actions.d.ts +1 -1
  75. package/dist/types/excalidraw/components/App.d.ts +32 -40
  76. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  77. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  78. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  79. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
  80. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  81. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +0 -1
  82. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  83. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  84. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  85. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  86. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  87. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  88. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -1
  89. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  90. package/dist/types/excalidraw/components/FilledButton.d.ts +1 -0
  91. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  92. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  93. package/dist/types/excalidraw/components/InlineIcon.d.ts +2 -2
  94. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  95. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  96. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  97. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  98. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -1
  99. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  100. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  101. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  102. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  103. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  104. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  105. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  106. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  107. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  108. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  109. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  110. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  111. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  112. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  113. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  114. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  115. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  116. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +27 -0
  117. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  118. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +26 -0
  119. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  120. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  121. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  122. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  123. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +4 -25
  124. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +2 -2
  125. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  126. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  127. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  128. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  129. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  130. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  131. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +8 -0
  132. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  133. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  134. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  135. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  136. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +91 -0
  137. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  138. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  139. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  140. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  141. package/dist/types/excalidraw/components/Toast.d.ts +3 -3
  142. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  143. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -33
  144. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +5 -5
  145. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  146. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +12 -19
  147. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  148. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
  149. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  150. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  151. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  152. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  153. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  154. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  155. package/dist/types/excalidraw/components/icons.d.ts +16 -12
  156. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +2 -13
  157. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -2
  158. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +26 -29
  159. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  160. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
  161. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
  162. package/dist/types/excalidraw/data/blob.d.ts +321 -3
  163. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  164. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  165. package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
  166. package/dist/types/excalidraw/data/index.d.ts +3 -3
  167. package/dist/types/excalidraw/data/json.d.ts +159 -2
  168. package/dist/types/excalidraw/data/library.d.ts +24 -9
  169. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  170. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  171. package/dist/types/excalidraw/errors.d.ts +14 -0
  172. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +1 -2
  173. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  174. package/dist/types/excalidraw/i18n.d.ts +2 -2
  175. package/dist/types/excalidraw/index.d.ts +4 -4
  176. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -4
  177. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -6
  178. package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
  179. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  180. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  181. package/dist/types/excalidraw/scene/types.d.ts +7 -2
  182. package/dist/types/excalidraw/snapping.d.ts +5 -5
  183. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  184. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  185. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  186. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  187. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  188. package/dist/types/excalidraw/types.d.ts +1 -2
  189. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
  190. package/dist/types/math/src/polygon.d.ts +2 -2
  191. package/dist/types/math/src/range.d.ts +1 -3
  192. package/dist/types/math/src/segment.d.ts +3 -3
  193. package/dist/types/utils/src/bbox.d.ts +1 -1
  194. package/dist/types/utils/src/export.d.ts +5 -5
  195. package/dist/types/utils/src/shape.d.ts +6 -6
  196. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  197. package/package.json +7 -1
  198. package/dist/types/common/src/visualdebug.d.ts +0 -41
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  export declare const actionAddToLibrary: {
3
2
  name: "addToLibrary";
4
3
  trackEvent: {
5
4
  category: "element";
6
5
  };
7
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => Promise<{
6
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => Promise<{
8
7
  captureUpdate: "EVENTUALLY";
9
8
  appState: {
10
9
  toast: {
@@ -17,19 +16,19 @@ export declare const actionAddToLibrary: {
17
16
  } | null;
18
17
  showWelcomeScreen: boolean;
19
18
  isLoading: boolean;
20
- errorMessage: import("react").ReactNode;
19
+ errorMessage: React.ReactNode;
21
20
  activeEmbeddable: {
22
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
23
- state: "active" | "hover";
21
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
22
+ state: "hover" | "active";
24
23
  } | null;
25
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
26
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
27
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
28
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
24
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
25
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
26
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
27
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
28
  isBindingEnabled: boolean;
30
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
31
- suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
32
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
29
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
30
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
33
32
  frameRendering: {
34
33
  enabled: boolean;
35
34
  name: boolean;
@@ -37,8 +36,8 @@ export declare const actionAddToLibrary: {
37
36
  clip: boolean;
38
37
  };
39
38
  editingFrame: string | null;
40
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
41
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
39
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
40
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
42
41
  activeTool: {
43
42
  lastActiveTool: import("../types").ActiveTool | null;
44
43
  locked: boolean;
@@ -56,19 +55,19 @@ export declare const actionAddToLibrary: {
56
55
  exportScale: number;
57
56
  currentItemStrokeColor: string;
58
57
  currentItemBackgroundColor: string;
59
- currentItemFillStyle: import("../../element/src/types").FillStyle;
58
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
60
59
  currentItemStrokeWidth: number;
61
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
60
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
62
61
  currentItemRoughness: number;
63
62
  currentItemOpacity: number;
64
- currentItemFontFamily: number;
63
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
65
64
  currentItemFontSize: number;
66
- currentItemTextAlign: string;
67
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
68
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
69
- currentHoveredFontFamily: number | null;
70
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
71
- currentItemArrowType: "round" | "sharp" | "elbow";
65
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
66
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
67
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
68
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
69
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
70
+ currentItemArrowType: "sharp" | "round" | "elbow";
72
71
  viewBackgroundColor: string;
73
72
  scrollX: number;
74
73
  scrollY: number;
@@ -77,30 +76,28 @@ export declare const actionAddToLibrary: {
77
76
  name: string | null;
78
77
  isResizing: boolean;
79
78
  isRotating: boolean;
80
- zoom: Readonly<{
81
- value: import("../types").NormalizedZoomValue;
82
- }>;
79
+ zoom: import("../types").Zoom;
83
80
  openMenu: "canvas" | null;
84
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
81
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
85
82
  openSidebar: {
86
- name: string;
87
- tab?: string | undefined;
83
+ name: import("../types").SidebarName;
84
+ tab?: import("../types").SidebarTabName;
88
85
  } | null;
89
- openDialog: {
86
+ openDialog: null | {
90
87
  name: "imageExport" | "help" | "jsonExport";
91
88
  } | {
92
89
  name: "ttd";
93
- tab: "mermaid" | "text-to-diagram";
90
+ tab: "text-to-diagram" | "mermaid";
94
91
  } | {
95
92
  name: "commandPalette";
96
93
  } | {
97
94
  name: "settings";
98
95
  } | {
99
96
  name: "elementLinkSelector";
100
- sourceElementId: string;
101
- } | null;
97
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
98
+ };
102
99
  defaultSidebarDockedPreference: boolean;
103
- lastPointerDownWith: import("../../element/src/types").PointerType;
100
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
104
101
  selectedElementIds: Readonly<{
105
102
  [id: string]: true;
106
103
  }>;
@@ -113,7 +110,7 @@ export declare const actionAddToLibrary: {
113
110
  selectedElementsAreBeingDragged: boolean;
114
111
  shouldCacheIgnoreZoom: boolean;
115
112
  zenModeEnabled: boolean;
116
- theme: import("../../element/src/types").Theme;
113
+ theme: import("@excalidraw/element/types").Theme;
117
114
  gridSize: number;
118
115
  gridStep: number;
119
116
  gridModeEnabled: boolean;
@@ -121,37 +118,18 @@ export declare const actionAddToLibrary: {
121
118
  selectedGroupIds: {
122
119
  [groupId: string]: boolean;
123
120
  };
124
- editingGroupId: string | null;
121
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
125
122
  width: number;
126
123
  height: number;
127
124
  offsetTop: number;
128
125
  offsetLeft: number;
129
126
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
130
- collaborators: Map<import("../types").SocketId, Readonly<{
131
- pointer?: import("../types").CollaboratorPointer | undefined;
132
- button?: "up" | "down" | undefined;
133
- selectedElementIds?: Readonly<{
134
- [id: string]: true;
135
- }> | undefined;
136
- username?: string | null | undefined;
137
- userState?: import("@excalidraw/common").UserIdleState | undefined;
138
- color?: {
139
- background: string;
140
- stroke: string;
141
- } | undefined;
142
- avatarUrl?: string | undefined;
143
- id?: string | undefined;
144
- socketId?: import("../types").SocketId | undefined;
145
- isCurrentUser?: boolean | undefined;
146
- isInCall?: boolean | undefined;
147
- isSpeaking?: boolean | undefined;
148
- isMuted?: boolean | undefined;
149
- }>>;
127
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
150
128
  stats: {
151
129
  open: boolean;
152
130
  panels: number;
153
131
  };
154
- currentChartType: import("../../element/src/types").ChartType;
132
+ currentChartType: import("@excalidraw/element/types").ChartType;
155
133
  pasteDialog: {
156
134
  shown: false;
157
135
  data: null;
@@ -170,16 +148,16 @@ export declare const actionAddToLibrary: {
170
148
  userToFollow: import("../types").UserToFollow | null;
171
149
  followedBy: Set<import("../types").SocketId>;
172
150
  isCropping: boolean;
173
- croppingElementId: string | null;
151
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
174
152
  searchMatches: Readonly<{
175
- focusedId: string | null;
153
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
176
154
  matches: readonly import("../types").SearchMatch[];
177
155
  }> | null;
178
156
  activeLockedId: string | null;
179
157
  lockedMultiSelections: {
180
158
  [groupId: string]: true;
181
159
  };
182
- bindMode: import("../../element/src/types").BindMode;
160
+ bindMode: import("@excalidraw/element/types").BindMode;
183
161
  };
184
162
  } | {
185
163
  captureUpdate: "EVENTUALLY";
@@ -193,17 +171,17 @@ export declare const actionAddToLibrary: {
193
171
  showWelcomeScreen: boolean;
194
172
  isLoading: boolean;
195
173
  activeEmbeddable: {
196
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
197
- state: "active" | "hover";
174
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
175
+ state: "hover" | "active";
198
176
  } | null;
199
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
200
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
201
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
202
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
177
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
178
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
179
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
180
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
203
181
  isBindingEnabled: boolean;
204
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
205
- suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
206
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
182
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
183
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
184
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
207
185
  frameRendering: {
208
186
  enabled: boolean;
209
187
  name: boolean;
@@ -211,8 +189,8 @@ export declare const actionAddToLibrary: {
211
189
  clip: boolean;
212
190
  };
213
191
  editingFrame: string | null;
214
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
215
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
192
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
193
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
216
194
  activeTool: {
217
195
  lastActiveTool: import("../types").ActiveTool | null;
218
196
  locked: boolean;
@@ -230,19 +208,19 @@ export declare const actionAddToLibrary: {
230
208
  exportScale: number;
231
209
  currentItemStrokeColor: string;
232
210
  currentItemBackgroundColor: string;
233
- currentItemFillStyle: import("../../element/src/types").FillStyle;
211
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
234
212
  currentItemStrokeWidth: number;
235
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
213
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
236
214
  currentItemRoughness: number;
237
215
  currentItemOpacity: number;
238
- currentItemFontFamily: number;
216
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
239
217
  currentItemFontSize: number;
240
- currentItemTextAlign: string;
241
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
242
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
243
- currentHoveredFontFamily: number | null;
244
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
245
- currentItemArrowType: "round" | "sharp" | "elbow";
218
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
219
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
220
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
221
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
222
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
223
+ currentItemArrowType: "sharp" | "round" | "elbow";
246
224
  viewBackgroundColor: string;
247
225
  scrollX: number;
248
226
  scrollY: number;
@@ -251,30 +229,28 @@ export declare const actionAddToLibrary: {
251
229
  name: string | null;
252
230
  isResizing: boolean;
253
231
  isRotating: boolean;
254
- zoom: Readonly<{
255
- value: import("../types").NormalizedZoomValue;
256
- }>;
232
+ zoom: import("../types").Zoom;
257
233
  openMenu: "canvas" | null;
258
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
234
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
259
235
  openSidebar: {
260
- name: string;
261
- tab?: string | undefined;
236
+ name: import("../types").SidebarName;
237
+ tab?: import("../types").SidebarTabName;
262
238
  } | null;
263
- openDialog: {
239
+ openDialog: null | {
264
240
  name: "imageExport" | "help" | "jsonExport";
265
241
  } | {
266
242
  name: "ttd";
267
- tab: "mermaid" | "text-to-diagram";
243
+ tab: "text-to-diagram" | "mermaid";
268
244
  } | {
269
245
  name: "commandPalette";
270
246
  } | {
271
247
  name: "settings";
272
248
  } | {
273
249
  name: "elementLinkSelector";
274
- sourceElementId: string;
275
- } | null;
250
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
251
+ };
276
252
  defaultSidebarDockedPreference: boolean;
277
- lastPointerDownWith: import("../../element/src/types").PointerType;
253
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
278
254
  selectedElementIds: Readonly<{
279
255
  [id: string]: true;
280
256
  }>;
@@ -288,11 +264,11 @@ export declare const actionAddToLibrary: {
288
264
  shouldCacheIgnoreZoom: boolean;
289
265
  toast: {
290
266
  message: string;
291
- closable?: boolean | undefined;
292
- duration?: number | undefined;
267
+ closable?: boolean;
268
+ duration?: number;
293
269
  } | null;
294
270
  zenModeEnabled: boolean;
295
- theme: import("../../element/src/types").Theme;
271
+ theme: import("@excalidraw/element/types").Theme;
296
272
  gridSize: number;
297
273
  gridStep: number;
298
274
  gridModeEnabled: boolean;
@@ -300,37 +276,18 @@ export declare const actionAddToLibrary: {
300
276
  selectedGroupIds: {
301
277
  [groupId: string]: boolean;
302
278
  };
303
- editingGroupId: string | null;
279
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
304
280
  width: number;
305
281
  height: number;
306
282
  offsetTop: number;
307
283
  offsetLeft: number;
308
284
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
309
- collaborators: Map<import("../types").SocketId, Readonly<{
310
- pointer?: import("../types").CollaboratorPointer | undefined;
311
- button?: "up" | "down" | undefined;
312
- selectedElementIds?: Readonly<{
313
- [id: string]: true;
314
- }> | undefined;
315
- username?: string | null | undefined;
316
- userState?: import("@excalidraw/common").UserIdleState | undefined;
317
- color?: {
318
- background: string;
319
- stroke: string;
320
- } | undefined;
321
- avatarUrl?: string | undefined;
322
- id?: string | undefined;
323
- socketId?: import("../types").SocketId | undefined;
324
- isCurrentUser?: boolean | undefined;
325
- isInCall?: boolean | undefined;
326
- isSpeaking?: boolean | undefined;
327
- isMuted?: boolean | undefined;
328
- }>>;
285
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
329
286
  stats: {
330
287
  open: boolean;
331
288
  panels: number;
332
289
  };
333
- currentChartType: import("../../element/src/types").ChartType;
290
+ currentChartType: import("@excalidraw/element/types").ChartType;
334
291
  pasteDialog: {
335
292
  shown: false;
336
293
  data: null;
@@ -349,16 +306,16 @@ export declare const actionAddToLibrary: {
349
306
  userToFollow: import("../types").UserToFollow | null;
350
307
  followedBy: Set<import("../types").SocketId>;
351
308
  isCropping: boolean;
352
- croppingElementId: string | null;
309
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
353
310
  searchMatches: Readonly<{
354
- focusedId: string | null;
311
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
355
312
  matches: readonly import("../types").SearchMatch[];
356
313
  }> | null;
357
314
  activeLockedId: string | null;
358
315
  lockedMultiSelections: {
359
316
  [groupId: string]: true;
360
317
  };
361
- bindMode: import("../../element/src/types").BindMode;
318
+ bindMode: import("@excalidraw/element/types").BindMode;
362
319
  };
363
320
  }> | {
364
321
  captureUpdate: "EVENTUALLY";
@@ -372,17 +329,17 @@ export declare const actionAddToLibrary: {
372
329
  showWelcomeScreen: boolean;
373
330
  isLoading: boolean;
374
331
  activeEmbeddable: {
375
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
376
- state: "active" | "hover";
332
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
333
+ state: "hover" | "active";
377
334
  } | null;
378
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
379
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
380
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
381
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
335
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
336
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
337
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
338
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
382
339
  isBindingEnabled: boolean;
383
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
384
- suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
385
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
340
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
341
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
342
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
386
343
  frameRendering: {
387
344
  enabled: boolean;
388
345
  name: boolean;
@@ -390,8 +347,8 @@ export declare const actionAddToLibrary: {
390
347
  clip: boolean;
391
348
  };
392
349
  editingFrame: string | null;
393
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
394
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
350
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
351
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
395
352
  activeTool: {
396
353
  lastActiveTool: import("../types").ActiveTool | null;
397
354
  locked: boolean;
@@ -409,19 +366,19 @@ export declare const actionAddToLibrary: {
409
366
  exportScale: number;
410
367
  currentItemStrokeColor: string;
411
368
  currentItemBackgroundColor: string;
412
- currentItemFillStyle: import("../../element/src/types").FillStyle;
369
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
413
370
  currentItemStrokeWidth: number;
414
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
371
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
415
372
  currentItemRoughness: number;
416
373
  currentItemOpacity: number;
417
- currentItemFontFamily: number;
374
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
418
375
  currentItemFontSize: number;
419
- currentItemTextAlign: string;
420
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
421
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
422
- currentHoveredFontFamily: number | null;
423
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
424
- currentItemArrowType: "round" | "sharp" | "elbow";
376
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
377
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
378
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
379
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
380
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
381
+ currentItemArrowType: "sharp" | "round" | "elbow";
425
382
  viewBackgroundColor: string;
426
383
  scrollX: number;
427
384
  scrollY: number;
@@ -430,30 +387,28 @@ export declare const actionAddToLibrary: {
430
387
  name: string | null;
431
388
  isResizing: boolean;
432
389
  isRotating: boolean;
433
- zoom: Readonly<{
434
- value: import("../types").NormalizedZoomValue;
435
- }>;
390
+ zoom: import("../types").Zoom;
436
391
  openMenu: "canvas" | null;
437
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
392
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
438
393
  openSidebar: {
439
- name: string;
440
- tab?: string | undefined;
394
+ name: import("../types").SidebarName;
395
+ tab?: import("../types").SidebarTabName;
441
396
  } | null;
442
- openDialog: {
397
+ openDialog: null | {
443
398
  name: "imageExport" | "help" | "jsonExport";
444
399
  } | {
445
400
  name: "ttd";
446
- tab: "mermaid" | "text-to-diagram";
401
+ tab: "text-to-diagram" | "mermaid";
447
402
  } | {
448
403
  name: "commandPalette";
449
404
  } | {
450
405
  name: "settings";
451
406
  } | {
452
407
  name: "elementLinkSelector";
453
- sourceElementId: string;
454
- } | null;
408
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
409
+ };
455
410
  defaultSidebarDockedPreference: boolean;
456
- lastPointerDownWith: import("../../element/src/types").PointerType;
411
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
457
412
  selectedElementIds: Readonly<{
458
413
  [id: string]: true;
459
414
  }>;
@@ -467,11 +422,11 @@ export declare const actionAddToLibrary: {
467
422
  shouldCacheIgnoreZoom: boolean;
468
423
  toast: {
469
424
  message: string;
470
- closable?: boolean | undefined;
471
- duration?: number | undefined;
425
+ closable?: boolean;
426
+ duration?: number;
472
427
  } | null;
473
428
  zenModeEnabled: boolean;
474
- theme: import("../../element/src/types").Theme;
429
+ theme: import("@excalidraw/element/types").Theme;
475
430
  gridSize: number;
476
431
  gridStep: number;
477
432
  gridModeEnabled: boolean;
@@ -479,37 +434,18 @@ export declare const actionAddToLibrary: {
479
434
  selectedGroupIds: {
480
435
  [groupId: string]: boolean;
481
436
  };
482
- editingGroupId: string | null;
437
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
483
438
  width: number;
484
439
  height: number;
485
440
  offsetTop: number;
486
441
  offsetLeft: number;
487
442
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
488
- collaborators: Map<import("../types").SocketId, Readonly<{
489
- pointer?: import("../types").CollaboratorPointer | undefined;
490
- button?: "up" | "down" | undefined;
491
- selectedElementIds?: Readonly<{
492
- [id: string]: true;
493
- }> | undefined;
494
- username?: string | null | undefined;
495
- userState?: import("@excalidraw/common").UserIdleState | undefined;
496
- color?: {
497
- background: string;
498
- stroke: string;
499
- } | undefined;
500
- avatarUrl?: string | undefined;
501
- id?: string | undefined;
502
- socketId?: import("../types").SocketId | undefined;
503
- isCurrentUser?: boolean | undefined;
504
- isInCall?: boolean | undefined;
505
- isSpeaking?: boolean | undefined;
506
- isMuted?: boolean | undefined;
507
- }>>;
443
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
508
444
  stats: {
509
445
  open: boolean;
510
446
  panels: number;
511
447
  };
512
- currentChartType: import("../../element/src/types").ChartType;
448
+ currentChartType: import("@excalidraw/element/types").ChartType;
513
449
  pasteDialog: {
514
450
  shown: false;
515
451
  data: null;
@@ -528,16 +464,16 @@ export declare const actionAddToLibrary: {
528
464
  userToFollow: import("../types").UserToFollow | null;
529
465
  followedBy: Set<import("../types").SocketId>;
530
466
  isCropping: boolean;
531
- croppingElementId: string | null;
467
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
532
468
  searchMatches: Readonly<{
533
- focusedId: string | null;
469
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
534
470
  matches: readonly import("../types").SearchMatch[];
535
471
  }> | null;
536
472
  activeLockedId: string | null;
537
473
  lockedMultiSelections: {
538
474
  [groupId: string]: true;
539
475
  };
540
- bindMode: import("../../element/src/types").BindMode;
476
+ bindMode: import("@excalidraw/element/types").BindMode;
541
477
  };
542
478
  };
543
479
  label: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
3
2
  import type { AppClassProperties, AppState, UIAppState } from "../types";
4
3
  export declare const alignActionsPredicate: (appState: UIAppState, app: AppClassProperties) => boolean;