@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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ExcalidrawLinearElement } from "@excalidraw/element/types";
3
2
  export declare const actionToggleLinearEditor: {
4
3
  name: "toggleLinearEditor";
@@ -13,31 +12,31 @@ export declare const actionToggleLinearEditor: {
13
12
  appState: {
14
13
  selectedLinearElement: {
15
14
  isEditing: boolean;
16
- elementId: string & {
15
+ elementId: import("@excalidraw/element/types").ExcalidrawElement["id"] & {
17
16
  _brand: "excalidrawLinearElementId";
18
17
  };
19
18
  selectedPointsIndices: readonly number[] | null;
20
19
  initialState: Readonly<{
21
20
  prevSelectedPointsIndices: readonly number[] | null;
22
21
  lastClickedPoint: number;
23
- origin: Readonly<import("../../math/src").GlobalPoint> | null;
22
+ origin: Readonly<import("@excalidraw/math").GlobalPoint> | null;
24
23
  segmentMidpoint: {
25
- value: import("../../math/src").GlobalPoint | null;
24
+ value: import("@excalidraw/math").GlobalPoint | null;
26
25
  index: number | null;
27
26
  added: boolean;
28
27
  };
29
28
  arrowStartIsInside: boolean;
30
- altFocusPoint: Readonly<import("../../math/src").GlobalPoint> | null;
29
+ altFocusPoint: Readonly<import("@excalidraw/math").GlobalPoint> | null;
31
30
  }>;
32
31
  isDragging: boolean;
33
- lastUncommittedPoint: import("../../math/src").LocalPoint | null;
34
- lastCommittedPoint: import("../../math/src").LocalPoint | null;
32
+ lastUncommittedPoint: import("@excalidraw/math").LocalPoint | null;
33
+ lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
35
34
  pointerOffset: Readonly<{
36
35
  x: number;
37
36
  y: number;
38
37
  }>;
39
38
  hoverPointIndex: number;
40
- segmentMidPointHoveredCoords: import("../../math/src").GlobalPoint | null;
39
+ segmentMidPointHoveredCoords: import("@excalidraw/math").GlobalPoint | null;
41
40
  elbowed: boolean;
42
41
  customLineAngle: number | null;
43
42
  pointerDownState: never;
@@ -49,10 +48,10 @@ export declare const actionToggleLinearEditor: {
49
48
  } | null;
50
49
  showWelcomeScreen: boolean;
51
50
  isLoading: boolean;
52
- errorMessage: import("react").ReactNode;
51
+ errorMessage: React.ReactNode;
53
52
  activeEmbeddable: {
54
53
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
55
- state: "active" | "hover";
54
+ state: "hover" | "active";
56
55
  } | null;
57
56
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
58
57
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
@@ -88,19 +87,19 @@ export declare const actionToggleLinearEditor: {
88
87
  exportScale: number;
89
88
  currentItemStrokeColor: string;
90
89
  currentItemBackgroundColor: string;
91
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
90
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
92
91
  currentItemStrokeWidth: number;
93
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
92
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
94
93
  currentItemRoughness: number;
95
94
  currentItemOpacity: number;
96
- currentItemFontFamily: number;
95
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
97
96
  currentItemFontSize: number;
98
- currentItemTextAlign: string;
97
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
99
98
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
100
99
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
101
- currentHoveredFontFamily: number | null;
100
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
102
101
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
103
- currentItemArrowType: "round" | "sharp" | "elbow";
102
+ currentItemArrowType: "sharp" | "round" | "elbow";
104
103
  viewBackgroundColor: string;
105
104
  scrollX: number;
106
105
  scrollY: number;
@@ -109,28 +108,26 @@ export declare const actionToggleLinearEditor: {
109
108
  name: string | null;
110
109
  isResizing: boolean;
111
110
  isRotating: boolean;
112
- zoom: Readonly<{
113
- value: import("../types").NormalizedZoomValue;
114
- }>;
111
+ zoom: import("../types").Zoom;
115
112
  openMenu: "canvas" | null;
116
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
113
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
117
114
  openSidebar: {
118
- name: string;
119
- tab?: string | undefined;
115
+ name: import("../types").SidebarName;
116
+ tab?: import("../types").SidebarTabName;
120
117
  } | null;
121
- openDialog: {
118
+ openDialog: null | {
122
119
  name: "imageExport" | "help" | "jsonExport";
123
120
  } | {
124
121
  name: "ttd";
125
- tab: "mermaid" | "text-to-diagram";
122
+ tab: "text-to-diagram" | "mermaid";
126
123
  } | {
127
124
  name: "commandPalette";
128
125
  } | {
129
126
  name: "settings";
130
127
  } | {
131
128
  name: "elementLinkSelector";
132
- sourceElementId: string;
133
- } | null;
129
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
130
+ };
134
131
  defaultSidebarDockedPreference: boolean;
135
132
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
136
133
  selectedElementIds: Readonly<{
@@ -146,8 +143,8 @@ export declare const actionToggleLinearEditor: {
146
143
  shouldCacheIgnoreZoom: boolean;
147
144
  toast: {
148
145
  message: string;
149
- closable?: boolean | undefined;
150
- duration?: number | undefined;
146
+ closable?: boolean;
147
+ duration?: number;
151
148
  } | null;
152
149
  zenModeEnabled: boolean;
153
150
  theme: import("@excalidraw/element/types").Theme;
@@ -158,32 +155,13 @@ export declare const actionToggleLinearEditor: {
158
155
  selectedGroupIds: {
159
156
  [groupId: string]: boolean;
160
157
  };
161
- editingGroupId: string | null;
158
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
162
159
  width: number;
163
160
  height: number;
164
161
  offsetTop: number;
165
162
  offsetLeft: number;
166
163
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
167
- collaborators: Map<import("../types").SocketId, Readonly<{
168
- pointer?: import("../types").CollaboratorPointer | undefined;
169
- button?: "up" | "down" | undefined;
170
- selectedElementIds?: Readonly<{
171
- [id: string]: true;
172
- }> | undefined;
173
- username?: string | null | undefined;
174
- userState?: import("@excalidraw/common").UserIdleState | undefined;
175
- color?: {
176
- background: string;
177
- stroke: string;
178
- } | undefined;
179
- avatarUrl?: string | undefined;
180
- id?: string | undefined;
181
- socketId?: import("../types").SocketId | undefined;
182
- isCurrentUser?: boolean | undefined;
183
- isInCall?: boolean | undefined;
184
- isSpeaking?: boolean | undefined;
185
- isMuted?: boolean | undefined;
186
- }>>;
164
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
187
165
  stats: {
188
166
  open: boolean;
189
167
  panels: number;
@@ -206,9 +184,9 @@ export declare const actionToggleLinearEditor: {
206
184
  userToFollow: import("../types").UserToFollow | null;
207
185
  followedBy: Set<import("../types").SocketId>;
208
186
  isCropping: boolean;
209
- croppingElementId: string | null;
187
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
210
188
  searchMatches: Readonly<{
211
- focusedId: string | null;
189
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
212
190
  matches: readonly import("../types").SearchMatch[];
213
191
  }> | null;
214
192
  activeLockedId: string | null;
@@ -243,43 +221,34 @@ export declare const actionTogglePolygon: {
243
221
  fillStyle: import("@excalidraw/element/types").FillStyle;
244
222
  strokeWidth: number;
245
223
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
246
- roundness: {
224
+ roundness: null | {
247
225
  type: import("@excalidraw/element/types").RoundnessType;
248
- value?: number | undefined;
249
- } | null;
226
+ value?: number;
227
+ };
250
228
  roughness: number;
251
229
  opacity: number;
252
230
  width: number;
253
231
  height: number;
254
- angle: import("../../math/src").Radians;
232
+ angle: import("@excalidraw/math").Radians;
255
233
  seed: number;
256
234
  version: number;
257
235
  versionNonce: number;
258
236
  index: import("@excalidraw/element/types").FractionalIndex | null;
259
237
  isDeleted: boolean;
260
- groupIds: readonly string[];
238
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
261
239
  frameId: string | null;
262
- boundElements: readonly Readonly<{
263
- id: string;
264
- type: "text" | "arrow";
265
- }>[] | null;
240
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
266
241
  updated: number;
267
242
  link: string | null;
268
243
  locked: boolean;
269
- customData?: Record<string, any> | undefined;
244
+ customData?: Record<string, any>;
270
245
  }> & Readonly<{
271
- type: "text";
272
- fontSize: number;
273
- fontFamily: number;
274
- text: string;
275
- textAlign: string;
276
- verticalAlign: string;
277
- containerId: string | null;
278
- originalText: string;
279
- autoResize: boolean;
280
- lineHeight: number & {
281
- _brand: "unitlessLineHeight";
282
- };
246
+ type: "line" | "arrow";
247
+ points: readonly import("@excalidraw/math").LocalPoint[];
248
+ startBinding: import("@excalidraw/element/types").FixedPointBinding | null;
249
+ endBinding: import("@excalidraw/element/types").FixedPointBinding | null;
250
+ startArrowhead: import("@excalidraw/element/types").Arrowhead | null;
251
+ endArrowhead: import("@excalidraw/element/types").Arrowhead | null;
283
252
  }> & {
284
253
  index: import("@excalidraw/element/types").FractionalIndex;
285
254
  }) | (Readonly<{
@@ -291,32 +260,29 @@ export declare const actionTogglePolygon: {
291
260
  fillStyle: import("@excalidraw/element/types").FillStyle;
292
261
  strokeWidth: number;
293
262
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
294
- roundness: {
263
+ roundness: null | {
295
264
  type: import("@excalidraw/element/types").RoundnessType;
296
- value?: number | undefined;
297
- } | null;
265
+ value?: number;
266
+ };
298
267
  roughness: number;
299
268
  opacity: number;
300
269
  width: number;
301
270
  height: number;
302
- angle: import("../../math/src").Radians;
271
+ angle: import("@excalidraw/math").Radians;
303
272
  seed: number;
304
273
  version: number;
305
274
  versionNonce: number;
306
275
  index: import("@excalidraw/element/types").FractionalIndex | null;
307
276
  isDeleted: boolean;
308
- groupIds: readonly string[];
277
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
309
278
  frameId: string | null;
310
- boundElements: readonly Readonly<{
311
- id: string;
312
- type: "text" | "arrow";
313
- }>[] | null;
279
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
314
280
  updated: number;
315
281
  link: string | null;
316
282
  locked: boolean;
317
- customData?: Record<string, any> | undefined;
283
+ customData?: Record<string, any>;
318
284
  }> & {
319
- type: "rectangle";
285
+ type: "selection";
320
286
  } & {
321
287
  index: import("@excalidraw/element/types").FractionalIndex;
322
288
  }) | (Readonly<{
@@ -328,32 +294,29 @@ export declare const actionTogglePolygon: {
328
294
  fillStyle: import("@excalidraw/element/types").FillStyle;
329
295
  strokeWidth: number;
330
296
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
331
- roundness: {
297
+ roundness: null | {
332
298
  type: import("@excalidraw/element/types").RoundnessType;
333
- value?: number | undefined;
334
- } | null;
299
+ value?: number;
300
+ };
335
301
  roughness: number;
336
302
  opacity: number;
337
303
  width: number;
338
304
  height: number;
339
- angle: import("../../math/src").Radians;
305
+ angle: import("@excalidraw/math").Radians;
340
306
  seed: number;
341
307
  version: number;
342
308
  versionNonce: number;
343
309
  index: import("@excalidraw/element/types").FractionalIndex | null;
344
310
  isDeleted: boolean;
345
- groupIds: readonly string[];
311
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
346
312
  frameId: string | null;
347
- boundElements: readonly Readonly<{
348
- id: string;
349
- type: "text" | "arrow";
350
- }>[] | null;
313
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
351
314
  updated: number;
352
315
  link: string | null;
353
316
  locked: boolean;
354
- customData?: Record<string, any> | undefined;
317
+ customData?: Record<string, any>;
355
318
  }> & {
356
- type: "diamond";
319
+ type: "rectangle";
357
320
  } & {
358
321
  index: import("@excalidraw/element/types").FractionalIndex;
359
322
  }) | (Readonly<{
@@ -365,33 +328,29 @@ export declare const actionTogglePolygon: {
365
328
  fillStyle: import("@excalidraw/element/types").FillStyle;
366
329
  strokeWidth: number;
367
330
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
368
- roundness: {
331
+ roundness: null | {
369
332
  type: import("@excalidraw/element/types").RoundnessType;
370
- value?: number | undefined;
371
- } | null;
333
+ value?: number;
334
+ };
372
335
  roughness: number;
373
336
  opacity: number;
374
337
  width: number;
375
338
  height: number;
376
- angle: import("../../math/src").Radians;
339
+ angle: import("@excalidraw/math").Radians;
377
340
  seed: number;
378
341
  version: number;
379
342
  versionNonce: number;
380
343
  index: import("@excalidraw/element/types").FractionalIndex | null;
381
344
  isDeleted: boolean;
382
- groupIds: readonly string[];
345
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
383
346
  frameId: string | null;
384
- boundElements: readonly Readonly<{
385
- id: string;
386
- type: "text" | "arrow";
387
- }>[] | null;
347
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
388
348
  updated: number;
389
349
  link: string | null;
390
350
  locked: boolean;
391
- customData?: Record<string, any> | undefined;
351
+ customData?: Record<string, any>;
392
352
  }> & {
393
- type: "frame";
394
- name: string | null;
353
+ type: "diamond";
395
354
  } & {
396
355
  index: import("@excalidraw/element/types").FractionalIndex;
397
356
  }) | (Readonly<{
@@ -403,33 +362,29 @@ export declare const actionTogglePolygon: {
403
362
  fillStyle: import("@excalidraw/element/types").FillStyle;
404
363
  strokeWidth: number;
405
364
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
406
- roundness: {
365
+ roundness: null | {
407
366
  type: import("@excalidraw/element/types").RoundnessType;
408
- value?: number | undefined;
409
- } | null;
367
+ value?: number;
368
+ };
410
369
  roughness: number;
411
370
  opacity: number;
412
371
  width: number;
413
372
  height: number;
414
- angle: import("../../math/src").Radians;
373
+ angle: import("@excalidraw/math").Radians;
415
374
  seed: number;
416
375
  version: number;
417
376
  versionNonce: number;
418
377
  index: import("@excalidraw/element/types").FractionalIndex | null;
419
378
  isDeleted: boolean;
420
- groupIds: readonly string[];
379
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
421
380
  frameId: string | null;
422
- boundElements: readonly Readonly<{
423
- id: string;
424
- type: "text" | "arrow";
425
- }>[] | null;
381
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
426
382
  updated: number;
427
383
  link: string | null;
428
384
  locked: boolean;
429
- customData?: Record<string, any> | undefined;
385
+ customData?: Record<string, any>;
430
386
  }> & {
431
- type: "magicframe";
432
- name: string | null;
387
+ type: "ellipse";
433
388
  } & {
434
389
  index: import("@excalidraw/element/types").FractionalIndex;
435
390
  }) | (Readonly<{
@@ -441,30 +396,27 @@ export declare const actionTogglePolygon: {
441
396
  fillStyle: import("@excalidraw/element/types").FillStyle;
442
397
  strokeWidth: number;
443
398
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
444
- roundness: {
399
+ roundness: null | {
445
400
  type: import("@excalidraw/element/types").RoundnessType;
446
- value?: number | undefined;
447
- } | null;
401
+ value?: number;
402
+ };
448
403
  roughness: number;
449
404
  opacity: number;
450
405
  width: number;
451
406
  height: number;
452
- angle: import("../../math/src").Radians;
407
+ angle: import("@excalidraw/math").Radians;
453
408
  seed: number;
454
409
  version: number;
455
410
  versionNonce: number;
456
411
  index: import("@excalidraw/element/types").FractionalIndex | null;
457
412
  isDeleted: boolean;
458
- groupIds: readonly string[];
413
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
459
414
  frameId: string | null;
460
- boundElements: readonly Readonly<{
461
- id: string;
462
- type: "text" | "arrow";
463
- }>[] | null;
415
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
464
416
  updated: number;
465
417
  link: string | null;
466
418
  locked: boolean;
467
- customData?: Record<string, any> | undefined;
419
+ customData?: Record<string, any>;
468
420
  }> & Readonly<{
469
421
  type: "embeddable";
470
422
  }> & {
@@ -478,36 +430,32 @@ export declare const actionTogglePolygon: {
478
430
  fillStyle: import("@excalidraw/element/types").FillStyle;
479
431
  strokeWidth: number;
480
432
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
481
- roundness: {
433
+ roundness: null | {
482
434
  type: import("@excalidraw/element/types").RoundnessType;
483
- value?: number | undefined;
484
- } | null;
435
+ value?: number;
436
+ };
485
437
  roughness: number;
486
438
  opacity: number;
487
439
  width: number;
488
440
  height: number;
489
- angle: import("../../math/src").Radians;
441
+ angle: import("@excalidraw/math").Radians;
490
442
  seed: number;
491
443
  version: number;
492
444
  versionNonce: number;
493
445
  index: import("@excalidraw/element/types").FractionalIndex | null;
494
446
  isDeleted: boolean;
495
- groupIds: readonly string[];
447
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
496
448
  frameId: string | null;
497
- boundElements: readonly Readonly<{
498
- id: string;
499
- type: "text" | "arrow";
500
- }>[] | null;
449
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
501
450
  updated: number;
502
451
  link: string | null;
503
452
  locked: boolean;
504
- customData?: Record<string, any> | undefined;
453
+ customData?: Record<string, any>;
505
454
  }> & Readonly<{
506
- type: "image";
507
- fileId: import("@excalidraw/element/types").FileId | null;
508
- status: "pending" | "saved" | "error";
509
- scale: [number, number];
510
- crop: import("@excalidraw/element/types").ImageCrop | null;
455
+ type: "iframe";
456
+ customData?: {
457
+ generationData?: import("@excalidraw/element/types").MagicGenerationData;
458
+ };
511
459
  }> & {
512
460
  index: import("@excalidraw/element/types").FractionalIndex;
513
461
  }) | (Readonly<{
@@ -519,35 +467,33 @@ export declare const actionTogglePolygon: {
519
467
  fillStyle: import("@excalidraw/element/types").FillStyle;
520
468
  strokeWidth: number;
521
469
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
522
- roundness: {
470
+ roundness: null | {
523
471
  type: import("@excalidraw/element/types").RoundnessType;
524
- value?: number | undefined;
525
- } | null;
472
+ value?: number;
473
+ };
526
474
  roughness: number;
527
475
  opacity: number;
528
476
  width: number;
529
477
  height: number;
530
- angle: import("../../math/src").Radians;
478
+ angle: import("@excalidraw/math").Radians;
531
479
  seed: number;
532
480
  version: number;
533
481
  versionNonce: number;
534
482
  index: import("@excalidraw/element/types").FractionalIndex | null;
535
483
  isDeleted: boolean;
536
- groupIds: readonly string[];
484
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
537
485
  frameId: string | null;
538
- boundElements: readonly Readonly<{
539
- id: string;
540
- type: "text" | "arrow";
541
- }>[] | null;
486
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
542
487
  updated: number;
543
488
  link: string | null;
544
489
  locked: boolean;
545
- customData?: Record<string, any> | undefined;
490
+ customData?: Record<string, any>;
546
491
  }> & Readonly<{
547
- type: "iframe";
548
- customData?: {
549
- generationData?: import("@excalidraw/element/types").MagicGenerationData | undefined;
550
- } | undefined;
492
+ type: "image";
493
+ fileId: import("@excalidraw/element/types").FileId | null;
494
+ status: "pending" | "saved" | "error";
495
+ scale: [number, number];
496
+ crop: import("@excalidraw/element/types").ImageCrop | null;
551
497
  }> & {
552
498
  index: import("@excalidraw/element/types").FractionalIndex;
553
499
  }) | (Readonly<{
@@ -559,32 +505,30 @@ export declare const actionTogglePolygon: {
559
505
  fillStyle: import("@excalidraw/element/types").FillStyle;
560
506
  strokeWidth: number;
561
507
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
562
- roundness: {
508
+ roundness: null | {
563
509
  type: import("@excalidraw/element/types").RoundnessType;
564
- value?: number | undefined;
565
- } | null;
510
+ value?: number;
511
+ };
566
512
  roughness: number;
567
513
  opacity: number;
568
514
  width: number;
569
515
  height: number;
570
- angle: import("../../math/src").Radians;
516
+ angle: import("@excalidraw/math").Radians;
571
517
  seed: number;
572
518
  version: number;
573
519
  versionNonce: number;
574
520
  index: import("@excalidraw/element/types").FractionalIndex | null;
575
521
  isDeleted: boolean;
576
- groupIds: readonly string[];
522
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
577
523
  frameId: string | null;
578
- boundElements: readonly Readonly<{
579
- id: string;
580
- type: "text" | "arrow";
581
- }>[] | null;
524
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
582
525
  updated: number;
583
526
  link: string | null;
584
527
  locked: boolean;
585
- customData?: Record<string, any> | undefined;
528
+ customData?: Record<string, any>;
586
529
  }> & {
587
- type: "selection";
530
+ type: "frame";
531
+ name: string | null;
588
532
  } & {
589
533
  index: import("@excalidraw/element/types").FractionalIndex;
590
534
  }) | (Readonly<{
@@ -596,32 +540,30 @@ export declare const actionTogglePolygon: {
596
540
  fillStyle: import("@excalidraw/element/types").FillStyle;
597
541
  strokeWidth: number;
598
542
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
599
- roundness: {
543
+ roundness: null | {
600
544
  type: import("@excalidraw/element/types").RoundnessType;
601
- value?: number | undefined;
602
- } | null;
545
+ value?: number;
546
+ };
603
547
  roughness: number;
604
548
  opacity: number;
605
549
  width: number;
606
550
  height: number;
607
- angle: import("../../math/src").Radians;
551
+ angle: import("@excalidraw/math").Radians;
608
552
  seed: number;
609
553
  version: number;
610
554
  versionNonce: number;
611
555
  index: import("@excalidraw/element/types").FractionalIndex | null;
612
556
  isDeleted: boolean;
613
- groupIds: readonly string[];
557
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
614
558
  frameId: string | null;
615
- boundElements: readonly Readonly<{
616
- id: string;
617
- type: "text" | "arrow";
618
- }>[] | null;
559
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
619
560
  updated: number;
620
561
  link: string | null;
621
562
  locked: boolean;
622
- customData?: Record<string, any> | undefined;
563
+ customData?: Record<string, any>;
623
564
  }> & {
624
- type: "ellipse";
565
+ type: "magicframe";
566
+ name: string | null;
625
567
  } & {
626
568
  index: import("@excalidraw/element/types").FractionalIndex;
627
569
  }) | (Readonly<{
@@ -633,37 +575,40 @@ export declare const actionTogglePolygon: {
633
575
  fillStyle: import("@excalidraw/element/types").FillStyle;
634
576
  strokeWidth: number;
635
577
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
636
- roundness: {
578
+ roundness: null | {
637
579
  type: import("@excalidraw/element/types").RoundnessType;
638
- value?: number | undefined;
639
- } | null;
580
+ value?: number;
581
+ };
640
582
  roughness: number;
641
583
  opacity: number;
642
584
  width: number;
643
585
  height: number;
644
- angle: import("../../math/src").Radians;
586
+ angle: import("@excalidraw/math").Radians;
645
587
  seed: number;
646
588
  version: number;
647
589
  versionNonce: number;
648
590
  index: import("@excalidraw/element/types").FractionalIndex | null;
649
591
  isDeleted: boolean;
650
- groupIds: readonly string[];
592
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
651
593
  frameId: string | null;
652
- boundElements: readonly Readonly<{
653
- id: string;
654
- type: "text" | "arrow";
655
- }>[] | null;
594
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
656
595
  updated: number;
657
596
  link: string | null;
658
597
  locked: boolean;
659
- customData?: Record<string, any> | undefined;
598
+ customData?: Record<string, any>;
660
599
  }> & Readonly<{
661
- type: "line" | "arrow";
662
- points: readonly import("../../math/src").LocalPoint[];
663
- startBinding: import("@excalidraw/element/types").FixedPointBinding | null;
664
- endBinding: import("@excalidraw/element/types").FixedPointBinding | null;
665
- startArrowhead: import("@excalidraw/element/types").Arrowhead | null;
666
- endArrowhead: import("@excalidraw/element/types").Arrowhead | null;
600
+ type: "text";
601
+ fontSize: number;
602
+ fontFamily: import("@excalidraw/element/types").FontFamilyValues;
603
+ text: string;
604
+ textAlign: import("@excalidraw/element/types").TextAlign;
605
+ verticalAlign: import("@excalidraw/element/types").VerticalAlign;
606
+ containerId: import("@excalidraw/element/types").ExcalidrawGenericElement["id"] | null;
607
+ originalText: string;
608
+ autoResize: boolean;
609
+ lineHeight: number & {
610
+ _brand: "unitlessLineHeight";
611
+ };
667
612
  }> & {
668
613
  index: import("@excalidraw/element/types").FractionalIndex;
669
614
  }) | (Readonly<{
@@ -675,33 +620,30 @@ export declare const actionTogglePolygon: {
675
620
  fillStyle: import("@excalidraw/element/types").FillStyle;
676
621
  strokeWidth: number;
677
622
  strokeStyle: import("@excalidraw/element/types").StrokeStyle;
678
- roundness: {
623
+ roundness: null | {
679
624
  type: import("@excalidraw/element/types").RoundnessType;
680
- value?: number | undefined;
681
- } | null;
625
+ value?: number;
626
+ };
682
627
  roughness: number;
683
628
  opacity: number;
684
629
  width: number;
685
630
  height: number;
686
- angle: import("../../math/src").Radians;
631
+ angle: import("@excalidraw/math").Radians;
687
632
  seed: number;
688
633
  version: number;
689
634
  versionNonce: number;
690
635
  index: import("@excalidraw/element/types").FractionalIndex | null;
691
636
  isDeleted: boolean;
692
- groupIds: readonly string[];
637
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
693
638
  frameId: string | null;
694
- boundElements: readonly Readonly<{
695
- id: string;
696
- type: "text" | "arrow";
697
- }>[] | null;
639
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
698
640
  updated: number;
699
641
  link: string | null;
700
642
  locked: boolean;
701
- customData?: Record<string, any> | undefined;
643
+ customData?: Record<string, any>;
702
644
  }> & Readonly<{
703
645
  type: "freedraw";
704
- points: readonly import("../../math/src").LocalPoint[];
646
+ points: readonly import("@excalidraw/math").LocalPoint[];
705
647
  pressures: readonly number[];
706
648
  simulatePressure: boolean;
707
649
  }> & {