@excalidraw/common 0.18.0-c141960 → 0.18.0-c158187

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 (175) hide show
  1. package/dist/dev/index.js +1070 -10
  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 +5 -2
  6. package/dist/types/common/src/constants.d.ts +14 -12
  7. package/dist/types/common/src/font-metadata.d.ts +1 -3
  8. package/dist/types/common/src/index.d.ts +1 -0
  9. package/dist/types/common/src/keys.d.ts +1 -1
  10. package/dist/types/common/src/utility-types.d.ts +0 -1
  11. package/dist/types/common/src/utils.d.ts +44 -34
  12. package/dist/types/common/src/visualdebug.d.ts +1 -1
  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 +0 -1
  77. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +7 -4
  78. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  79. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  80. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +0 -1
  81. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  82. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  83. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  84. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  85. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  86. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  87. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -1
  88. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  89. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  90. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  91. package/dist/types/excalidraw/components/InlineIcon.d.ts +2 -2
  92. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  93. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  94. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  95. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  96. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -1
  97. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  98. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  99. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  100. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  101. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  102. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  103. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  104. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  105. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  106. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  107. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  108. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  109. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  110. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  111. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  112. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  113. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +1 -2
  114. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +0 -1
  115. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  116. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  117. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  118. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  119. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +2 -3
  120. package/dist/types/excalidraw/components/Toast.d.ts +3 -3
  121. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  122. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +28 -32
  123. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +5 -5
  124. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  125. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +10 -18
  126. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +3 -3
  127. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
  128. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  129. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  130. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  131. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  132. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  133. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  134. package/dist/types/excalidraw/components/icons.d.ts +11 -11
  135. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +2 -13
  136. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -2
  137. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +26 -28
  138. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  139. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
  140. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
  141. package/dist/types/excalidraw/data/blob.d.ts +321 -3
  142. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  143. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  144. package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
  145. package/dist/types/excalidraw/data/index.d.ts +3 -3
  146. package/dist/types/excalidraw/data/json.d.ts +159 -2
  147. package/dist/types/excalidraw/data/library.d.ts +24 -9
  148. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  149. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  150. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +1 -2
  151. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  152. package/dist/types/excalidraw/i18n.d.ts +2 -2
  153. package/dist/types/excalidraw/index.d.ts +2 -4
  154. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -4
  155. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -6
  156. package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
  157. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  158. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  159. package/dist/types/excalidraw/scene/types.d.ts +7 -2
  160. package/dist/types/excalidraw/snapping.d.ts +5 -5
  161. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  162. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  163. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  164. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  165. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  166. package/dist/types/excalidraw/types.d.ts +1 -1
  167. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
  168. package/dist/types/math/src/polygon.d.ts +2 -2
  169. package/dist/types/math/src/range.d.ts +1 -3
  170. package/dist/types/math/src/segment.d.ts +3 -3
  171. package/dist/types/utils/src/bbox.d.ts +1 -1
  172. package/dist/types/utils/src/export.d.ts +5 -5
  173. package/dist/types/utils/src/shape.d.ts +6 -6
  174. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  175. package/package.json +7 -1
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  export declare const actionLink: {
3
2
  name: "hyperlink";
4
- label: (elements: readonly import("../../element/src/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.create";
3
+ label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.create";
5
4
  icon: import("react/jsx-runtime").JSX.Element;
6
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => false | {
7
- elements: readonly import("../../element/src/types").OrderedExcalidrawElement[];
5
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => false | {
6
+ elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
8
7
  appState: {
9
8
  showHyperlinkPopup: "editor";
10
9
  openMenu: null;
@@ -15,19 +14,19 @@ export declare const actionLink: {
15
14
  } | null;
16
15
  showWelcomeScreen: boolean;
17
16
  isLoading: boolean;
18
- errorMessage: import("react").ReactNode;
17
+ errorMessage: React.ReactNode;
19
18
  activeEmbeddable: {
20
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
21
- state: "active" | "hover";
19
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
20
+ state: "hover" | "active";
22
21
  } | null;
23
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
24
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
25
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
26
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
22
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
23
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
24
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
25
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
27
26
  isBindingEnabled: boolean;
28
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
29
- suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
30
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
27
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
28
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
29
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
31
30
  frameRendering: {
32
31
  enabled: boolean;
33
32
  name: boolean;
@@ -35,8 +34,8 @@ export declare const actionLink: {
35
34
  clip: boolean;
36
35
  };
37
36
  editingFrame: string | null;
38
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
39
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
37
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
38
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
40
39
  activeTool: {
41
40
  lastActiveTool: import("../types").ActiveTool | null;
42
41
  locked: boolean;
@@ -54,19 +53,19 @@ export declare const actionLink: {
54
53
  exportScale: number;
55
54
  currentItemStrokeColor: string;
56
55
  currentItemBackgroundColor: string;
57
- currentItemFillStyle: import("../../element/src/types").FillStyle;
56
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
58
57
  currentItemStrokeWidth: number;
59
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
58
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
60
59
  currentItemRoughness: number;
61
60
  currentItemOpacity: number;
62
- currentItemFontFamily: number;
61
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
63
62
  currentItemFontSize: number;
64
- currentItemTextAlign: string;
65
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
66
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
67
- currentHoveredFontFamily: number | null;
68
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
69
- currentItemArrowType: "round" | "sharp" | "elbow";
63
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
64
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
65
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
66
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
67
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
68
+ currentItemArrowType: "sharp" | "round" | "elbow";
70
69
  viewBackgroundColor: string;
71
70
  scrollX: number;
72
71
  scrollY: number;
@@ -75,29 +74,27 @@ export declare const actionLink: {
75
74
  name: string | null;
76
75
  isResizing: boolean;
77
76
  isRotating: boolean;
78
- zoom: Readonly<{
79
- value: import("../types").NormalizedZoomValue;
80
- }>;
81
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
77
+ zoom: import("../types").Zoom;
78
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
82
79
  openSidebar: {
83
- name: string;
84
- tab?: string | undefined;
80
+ name: import("../types").SidebarName;
81
+ tab?: import("../types").SidebarTabName;
85
82
  } | null;
86
- openDialog: {
83
+ openDialog: null | {
87
84
  name: "imageExport" | "help" | "jsonExport";
88
85
  } | {
89
86
  name: "ttd";
90
- tab: "mermaid" | "text-to-diagram";
87
+ tab: "text-to-diagram" | "mermaid";
91
88
  } | {
92
89
  name: "commandPalette";
93
90
  } | {
94
91
  name: "settings";
95
92
  } | {
96
93
  name: "elementLinkSelector";
97
- sourceElementId: string;
98
- } | null;
94
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
95
+ };
99
96
  defaultSidebarDockedPreference: boolean;
100
- lastPointerDownWith: import("../../element/src/types").PointerType;
97
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
101
98
  selectedElementIds: Readonly<{
102
99
  [id: string]: true;
103
100
  }>;
@@ -111,11 +108,11 @@ export declare const actionLink: {
111
108
  shouldCacheIgnoreZoom: boolean;
112
109
  toast: {
113
110
  message: string;
114
- closable?: boolean | undefined;
115
- duration?: number | undefined;
111
+ closable?: boolean;
112
+ duration?: number;
116
113
  } | null;
117
114
  zenModeEnabled: boolean;
118
- theme: import("../../element/src/types").Theme;
115
+ theme: import("@excalidraw/element/types").Theme;
119
116
  gridSize: number;
120
117
  gridStep: number;
121
118
  gridModeEnabled: boolean;
@@ -123,37 +120,18 @@ export declare const actionLink: {
123
120
  selectedGroupIds: {
124
121
  [groupId: string]: boolean;
125
122
  };
126
- editingGroupId: string | null;
123
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
127
124
  width: number;
128
125
  height: number;
129
126
  offsetTop: number;
130
127
  offsetLeft: number;
131
128
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
132
- collaborators: Map<import("../types").SocketId, Readonly<{
133
- pointer?: import("../types").CollaboratorPointer | undefined;
134
- button?: "up" | "down" | undefined;
135
- selectedElementIds?: Readonly<{
136
- [id: string]: true;
137
- }> | undefined;
138
- username?: string | null | undefined;
139
- userState?: import("@excalidraw/common").UserIdleState | undefined;
140
- color?: {
141
- background: string;
142
- stroke: string;
143
- } | undefined;
144
- avatarUrl?: string | undefined;
145
- id?: string | undefined;
146
- socketId?: import("../types").SocketId | undefined;
147
- isCurrentUser?: boolean | undefined;
148
- isInCall?: boolean | undefined;
149
- isSpeaking?: boolean | undefined;
150
- isMuted?: boolean | undefined;
151
- }>>;
129
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
152
130
  stats: {
153
131
  open: boolean;
154
132
  panels: number;
155
133
  };
156
- currentChartType: import("../../element/src/types").ChartType;
134
+ currentChartType: import("@excalidraw/element/types").ChartType;
157
135
  pasteDialog: {
158
136
  shown: false;
159
137
  data: null;
@@ -171,16 +149,16 @@ export declare const actionLink: {
171
149
  userToFollow: import("../types").UserToFollow | null;
172
150
  followedBy: Set<import("../types").SocketId>;
173
151
  isCropping: boolean;
174
- croppingElementId: string | null;
152
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
175
153
  searchMatches: Readonly<{
176
- focusedId: string | null;
154
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
177
155
  matches: readonly import("../types").SearchMatch[];
178
156
  }> | null;
179
157
  activeLockedId: string | null;
180
158
  lockedMultiSelections: {
181
159
  [groupId: string]: true;
182
160
  };
183
- bindMode: import("../../element/src/types").BindMode;
161
+ bindMode: import("@excalidraw/element/types").BindMode;
184
162
  };
185
163
  captureUpdate: "IMMEDIATELY";
186
164
  };
@@ -189,7 +167,7 @@ export declare const actionLink: {
189
167
  action: string;
190
168
  };
191
169
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
192
- predicate: (elements: readonly import("../../element/src/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
170
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
193
171
  PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
194
172
  } & {
195
173
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const actionShortcuts: {
3
2
  name: "toggleShortcuts";
4
3
  label: string;
@@ -8,7 +7,7 @@ export declare const actionShortcuts: {
8
7
  category: "menu";
9
8
  action: string;
10
9
  };
11
- perform: (_elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, { focusContainer }: import("../types").AppClassProperties) => {
10
+ perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, { focusContainer }: import("../types").AppClassProperties) => {
12
11
  appState: {
13
12
  openDialog: {
14
13
  name: "help";
@@ -22,19 +21,19 @@ export declare const actionShortcuts: {
22
21
  } | null;
23
22
  showWelcomeScreen: boolean;
24
23
  isLoading: boolean;
25
- errorMessage: import("react").ReactNode;
24
+ errorMessage: React.ReactNode;
26
25
  activeEmbeddable: {
27
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
28
- state: "active" | "hover";
26
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
27
+ state: "hover" | "active";
29
28
  } | null;
30
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
31
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
32
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
33
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
29
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
30
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
32
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
34
33
  isBindingEnabled: boolean;
35
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
36
- suggestedBinding: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
37
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
34
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
+ suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
36
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
38
37
  frameRendering: {
39
38
  enabled: boolean;
40
39
  name: boolean;
@@ -42,8 +41,8 @@ export declare const actionShortcuts: {
42
41
  clip: boolean;
43
42
  };
44
43
  editingFrame: string | null;
45
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
46
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
44
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
45
+ editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
47
46
  activeTool: {
48
47
  lastActiveTool: import("../types").ActiveTool | null;
49
48
  locked: boolean;
@@ -61,19 +60,19 @@ export declare const actionShortcuts: {
61
60
  exportScale: number;
62
61
  currentItemStrokeColor: string;
63
62
  currentItemBackgroundColor: string;
64
- currentItemFillStyle: import("../../element/src/types").FillStyle;
63
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
65
64
  currentItemStrokeWidth: number;
66
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
65
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
67
66
  currentItemRoughness: number;
68
67
  currentItemOpacity: number;
69
- currentItemFontFamily: number;
68
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
70
69
  currentItemFontSize: number;
71
- currentItemTextAlign: string;
72
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
73
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
74
- currentHoveredFontFamily: number | null;
75
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
76
- currentItemArrowType: "round" | "sharp" | "elbow";
70
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
71
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
72
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
73
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
74
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
75
+ currentItemArrowType: "sharp" | "round" | "elbow";
77
76
  viewBackgroundColor: string;
78
77
  scrollX: number;
79
78
  scrollY: number;
@@ -82,15 +81,13 @@ export declare const actionShortcuts: {
82
81
  name: string | null;
83
82
  isResizing: boolean;
84
83
  isRotating: boolean;
85
- zoom: Readonly<{
86
- value: import("../types").NormalizedZoomValue;
87
- }>;
84
+ zoom: import("../types").Zoom;
88
85
  openSidebar: {
89
- name: string;
90
- tab?: string | undefined;
86
+ name: import("../types").SidebarName;
87
+ tab?: import("../types").SidebarTabName;
91
88
  } | null;
92
89
  defaultSidebarDockedPreference: boolean;
93
- lastPointerDownWith: import("../../element/src/types").PointerType;
90
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
94
91
  selectedElementIds: Readonly<{
95
92
  [id: string]: true;
96
93
  }>;
@@ -104,11 +101,11 @@ export declare const actionShortcuts: {
104
101
  shouldCacheIgnoreZoom: boolean;
105
102
  toast: {
106
103
  message: string;
107
- closable?: boolean | undefined;
108
- duration?: number | undefined;
104
+ closable?: boolean;
105
+ duration?: number;
109
106
  } | null;
110
107
  zenModeEnabled: boolean;
111
- theme: import("../../element/src/types").Theme;
108
+ theme: import("@excalidraw/element/types").Theme;
112
109
  gridSize: number;
113
110
  gridStep: number;
114
111
  gridModeEnabled: boolean;
@@ -116,37 +113,18 @@ export declare const actionShortcuts: {
116
113
  selectedGroupIds: {
117
114
  [groupId: string]: boolean;
118
115
  };
119
- editingGroupId: string | null;
116
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
120
117
  width: number;
121
118
  height: number;
122
119
  offsetTop: number;
123
120
  offsetLeft: number;
124
121
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
125
- collaborators: Map<import("../types").SocketId, Readonly<{
126
- pointer?: import("../types").CollaboratorPointer | undefined;
127
- button?: "up" | "down" | undefined;
128
- selectedElementIds?: Readonly<{
129
- [id: string]: true;
130
- }> | undefined;
131
- username?: string | null | undefined;
132
- userState?: import("@excalidraw/common").UserIdleState | undefined;
133
- color?: {
134
- background: string;
135
- stroke: string;
136
- } | undefined;
137
- avatarUrl?: string | undefined;
138
- id?: string | undefined;
139
- socketId?: import("../types").SocketId | undefined;
140
- isCurrentUser?: boolean | undefined;
141
- isInCall?: boolean | undefined;
142
- isSpeaking?: boolean | undefined;
143
- isMuted?: boolean | undefined;
144
- }>>;
122
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
145
123
  stats: {
146
124
  open: boolean;
147
125
  panels: number;
148
126
  };
149
- currentChartType: import("../../element/src/types").ChartType;
127
+ currentChartType: import("@excalidraw/element/types").ChartType;
150
128
  pasteDialog: {
151
129
  shown: false;
152
130
  data: null;
@@ -165,16 +143,16 @@ export declare const actionShortcuts: {
165
143
  userToFollow: import("../types").UserToFollow | null;
166
144
  followedBy: Set<import("../types").SocketId>;
167
145
  isCropping: boolean;
168
- croppingElementId: string | null;
146
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
169
147
  searchMatches: Readonly<{
170
- focusedId: string | null;
148
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
171
149
  matches: readonly import("../types").SearchMatch[];
172
150
  }> | null;
173
151
  activeLockedId: string | null;
174
152
  lockedMultiSelections: {
175
153
  [groupId: string]: true;
176
154
  };
177
- bindMode: import("../../element/src/types").BindMode;
155
+ bindMode: import("@excalidraw/element/types").BindMode;
178
156
  };
179
157
  captureUpdate: "EVENTUALLY";
180
158
  };
@@ -1,23 +1,20 @@
1
- /// <reference types="react" />
2
1
  export declare const actionGoToCollaborator: import("./types").Action<Readonly<{
3
- pointer?: import("../types").CollaboratorPointer | undefined;
4
- button?: "up" | "down" | undefined;
5
- selectedElementIds?: Readonly<{
6
- [id: string]: true;
7
- }> | undefined;
8
- username?: string | null | undefined;
9
- userState?: import("@excalidraw/common").UserIdleState | undefined;
2
+ pointer?: import("../types").CollaboratorPointer;
3
+ button?: "up" | "down";
4
+ selectedElementIds?: import("../types").AppState["selectedElementIds"];
5
+ username?: string | null;
6
+ userState?: import("@excalidraw/common").UserIdleState;
10
7
  color?: {
11
8
  background: string;
12
9
  stroke: string;
13
- } | undefined;
14
- avatarUrl?: string | undefined;
15
- id?: string | undefined;
16
- socketId?: import("../types").SocketId | undefined;
17
- isCurrentUser?: boolean | undefined;
18
- isInCall?: boolean | undefined;
19
- isSpeaking?: boolean | undefined;
20
- isMuted?: boolean | undefined;
10
+ };
11
+ avatarUrl?: string;
12
+ id?: string;
13
+ socketId?: import("../types").SocketId;
14
+ isCurrentUser?: boolean;
15
+ isInCall?: boolean;
16
+ isSpeaking?: boolean;
17
+ isMuted?: boolean;
21
18
  }>> & {
22
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly import("../../element/src/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
19
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
23
20
  };