@excalidraw/math 0.18.0-91c7748 → 0.18.0-9ba0f5d

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 (217) hide show
  1. package/dist/dev/index.js +167 -168
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +1 -1
  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 +19 -27
  7. package/dist/types/common/src/editorInterface.d.ts +34 -0
  8. package/dist/types/common/src/font-metadata.d.ts +1 -3
  9. package/dist/types/common/src/index.d.ts +2 -0
  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 +49 -35
  13. package/dist/types/element/src/Scene.d.ts +3 -3
  14. package/dist/types/element/src/binding.d.ts +58 -44
  15. package/dist/types/element/src/bounds.d.ts +2 -10
  16. package/dist/types/element/src/collision.d.ts +6 -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 +5 -1
  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 -3
  25. package/dist/types/element/src/linearElementEditor.d.ts +16 -20
  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 +1 -7
  29. package/dist/types/element/src/resizeElements.d.ts +10 -10
  30. package/dist/types/element/src/resizeTest.d.ts +6 -5
  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 +8 -27
  36. package/dist/types/element/src/typeChecks.d.ts +4 -7
  37. package/dist/types/element/src/types.d.ts +7 -11
  38. package/dist/types/element/src/utils.d.ts +5 -2
  39. package/dist/types/element/src/zindex.d.ts +7 -1
  40. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +138 -184
  41. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
  42. package/dist/types/excalidraw/actions/actionBoundText.d.ts +67 -98
  43. package/dist/types/excalidraw/actions/actionCanvas.d.ts +401 -771
  44. package/dist/types/excalidraw/actions/actionClipboard.d.ts +103 -879
  45. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +32 -48
  46. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +107 -159
  47. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  48. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
  49. package/dist/types/excalidraw/actions/actionElementLink.d.ts +47 -65
  50. package/dist/types/excalidraw/actions/actionElementLock.d.ts +66 -97
  51. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +49 -65
  52. package/dist/types/excalidraw/actions/actionExport.d.ts +144 -1113
  53. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -396
  54. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  55. package/dist/types/excalidraw/actions/actionFrame.d.ts +213 -312
  56. package/dist/types/excalidraw/actions/actionGroup.d.ts +70 -109
  57. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +122 -178
  58. package/dist/types/excalidraw/actions/actionLink.d.ts +49 -65
  59. package/dist/types/excalidraw/actions/actionMenu.d.ts +42 -428
  60. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -361
  61. package/dist/types/excalidraw/actions/actionProperties.d.ts +127 -2510
  62. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +35 -55
  63. package/dist/types/excalidraw/actions/actionStyles.d.ts +32 -48
  64. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  65. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +49 -65
  66. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +49 -65
  67. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +41 -59
  68. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  69. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +48 -64
  70. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +49 -65
  71. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +49 -65
  72. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  73. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  74. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  75. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  76. package/dist/types/excalidraw/appState.d.ts +20 -16
  77. package/dist/types/excalidraw/clipboard.d.ts +7 -31
  78. package/dist/types/excalidraw/components/Actions.d.ts +14 -4
  79. package/dist/types/excalidraw/components/App.d.ts +58 -59
  80. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  81. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  82. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +1 -3
  83. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  84. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  85. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  86. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
  87. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  88. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  89. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -3
  90. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  91. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  92. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  93. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  94. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  95. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  96. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -2
  97. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  98. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  99. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +2 -1
  100. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  101. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  102. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  103. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  104. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  105. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  106. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  107. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  108. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  109. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  110. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  111. package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
  112. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  113. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  114. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  115. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  116. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  117. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  118. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  119. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  120. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  121. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  122. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  123. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  124. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  125. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  126. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  127. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  128. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  129. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  130. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  131. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +27 -0
  132. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  133. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +26 -0
  134. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  135. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  136. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  137. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  138. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +4 -25
  139. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +2 -2
  140. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  141. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  142. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  143. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  144. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +2 -3
  145. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  146. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +8 -0
  147. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  148. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  149. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  150. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  151. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +91 -0
  152. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  153. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  154. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  155. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  156. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  157. package/dist/types/excalidraw/components/Toast.d.ts +3 -3
  158. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  159. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  160. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
  161. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -32
  162. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +6 -5
  163. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  164. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +10 -18
  165. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +3 -3
  166. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
  167. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  168. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  169. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  170. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  171. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  172. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  173. package/dist/types/excalidraw/components/icons.d.ts +21 -13
  174. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +4 -3
  175. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -2
  176. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +25 -30
  177. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
  178. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
  179. package/dist/types/excalidraw/data/blob.d.ts +323 -5
  180. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  181. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  182. package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
  183. package/dist/types/excalidraw/data/index.d.ts +3 -3
  184. package/dist/types/excalidraw/data/json.d.ts +159 -2
  185. package/dist/types/excalidraw/data/library.d.ts +24 -9
  186. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  187. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  188. package/dist/types/excalidraw/errors.d.ts +14 -0
  189. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  190. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  191. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  192. package/dist/types/excalidraw/i18n.d.ts +2 -2
  193. package/dist/types/excalidraw/index.d.ts +6 -7
  194. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  195. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
  196. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
  197. package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
  198. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  199. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  200. package/dist/types/excalidraw/scene/types.d.ts +22 -5
  201. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  202. package/dist/types/excalidraw/snapping.d.ts +5 -5
  203. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  204. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  205. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  206. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  207. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  208. package/dist/types/excalidraw/types.d.ts +29 -22
  209. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
  210. package/dist/types/math/src/polygon.d.ts +2 -2
  211. package/dist/types/math/src/range.d.ts +1 -3
  212. package/dist/types/math/src/segment.d.ts +3 -3
  213. package/dist/types/utils/src/bbox.d.ts +1 -1
  214. package/dist/types/utils/src/export.d.ts +5 -5
  215. package/dist/types/utils/src/shape.d.ts +6 -6
  216. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  217. package/package.json +2 -2
@@ -1,399 +1,13 @@
1
- /// <reference types="react" />
2
- import { LinearElementEditor } from "@excalidraw/element";
3
- import type { LocalPoint } from "@excalidraw/math";
4
- import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted } from "@excalidraw/element/types";
1
+ import type { ExcalidrawElement } from "@excalidraw/element/types";
5
2
  import type { AppState } from "../types";
6
- export declare const actionFinalize: {
7
- name: "finalize";
8
- label: string;
9
- trackEvent: false;
10
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, data: any, app: import("../types").AppClassProperties) => {
11
- elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
12
- appState: {
13
- selectedLinearElement: {
14
- selectedPointsIndices: null;
15
- elementId: string & {
16
- _brand: "excalidrawLinearElementId";
17
- };
18
- pointerDownState: Readonly<{
19
- prevSelectedPointsIndices: readonly number[] | null;
20
- lastClickedPoint: number;
21
- lastClickedIsEndPoint: boolean;
22
- origin: Readonly<{
23
- x: number;
24
- y: number;
25
- }> | null;
26
- segmentMidpoint: {
27
- value: import("@excalidraw/math").GlobalPoint | null;
28
- index: number | null;
29
- added: boolean;
30
- };
31
- }>;
32
- isDragging: boolean;
33
- lastUncommittedPoint: LocalPoint | null;
34
- pointerOffset: Readonly<{
35
- x: number;
36
- y: number;
37
- }>;
38
- startBindingElement: import("@excalidraw/element/types").ExcalidrawBindableElement | "keep" | null;
39
- endBindingElement: import("@excalidraw/element/types").ExcalidrawBindableElement | "keep" | null;
40
- hoverPointIndex: number;
41
- segmentMidPointHoveredCoords: import("@excalidraw/math").GlobalPoint | null;
42
- elbowed: boolean;
43
- customLineAngle: number | null;
44
- isEditing: boolean;
45
- };
46
- suggestedBindings: never[];
47
- };
48
- captureUpdate: "IMMEDIATELY";
49
- } | {
50
- elements: import("@excalidraw/element/types").OrderedExcalidrawElement[] | undefined;
51
- appState: {
52
- cursorButton: "up";
53
- selectedLinearElement: LinearElementEditor;
54
- contextMenu: {
55
- items: import("../components/ContextMenu").ContextMenuItems;
56
- top: number;
57
- left: number;
58
- } | null;
59
- showWelcomeScreen: boolean;
60
- isLoading: boolean;
61
- errorMessage: import("react").ReactNode;
62
- activeEmbeddable: {
63
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
64
- state: "active" | "hover";
65
- } | null;
66
- newElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
67
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
68
- multiElement: NonDeleted<ExcalidrawLinearElement> | null;
69
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
70
- isBindingEnabled: boolean;
71
- startBoundElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
72
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
73
- frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
74
- frameRendering: {
75
- enabled: boolean;
76
- name: boolean;
77
- outline: boolean;
78
- clip: boolean;
79
- };
80
- editingFrame: string | null;
81
- elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
82
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
83
- activeTool: {
84
- lastActiveTool: import("../types").ActiveTool | null;
85
- locked: boolean;
86
- fromSelection: boolean;
87
- } & import("../types").ActiveTool;
88
- penMode: boolean;
89
- penDetected: boolean;
90
- exportBackground: boolean;
91
- exportEmbedScene: boolean;
92
- exportWithDarkMode: boolean;
93
- exportScale: number;
94
- currentItemStrokeColor: string;
95
- currentItemBackgroundColor: string;
96
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
97
- currentItemStrokeWidth: number;
98
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
99
- currentItemRoughness: number;
100
- currentItemOpacity: number;
101
- currentItemFontFamily: number;
102
- currentItemFontSize: number;
103
- currentItemTextAlign: string;
104
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
105
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
106
- currentHoveredFontFamily: number | null;
107
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
108
- currentItemArrowType: "round" | "sharp" | "elbow";
109
- viewBackgroundColor: string;
110
- scrollX: number;
111
- scrollY: number;
112
- scrolledOutside: boolean;
113
- name: string | null;
114
- isResizing: boolean;
115
- isRotating: boolean;
116
- zoom: Readonly<{
117
- value: import("../types").NormalizedZoomValue;
118
- }>;
119
- openMenu: "canvas" | "shape" | null;
120
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
121
- openSidebar: {
122
- name: string;
123
- tab?: string | undefined;
124
- } | null;
125
- openDialog: {
126
- name: "imageExport" | "help" | "jsonExport";
127
- } | {
128
- name: "ttd";
129
- tab: "mermaid" | "text-to-diagram";
130
- } | {
131
- name: "commandPalette";
132
- } | {
133
- name: "elementLinkSelector";
134
- sourceElementId: string;
135
- } | null;
136
- defaultSidebarDockedPreference: boolean;
137
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
138
- selectedElementIds: Readonly<{
139
- [id: string]: true;
140
- }>;
141
- hoveredElementIds: Readonly<{
142
- [id: string]: true;
143
- }>;
144
- previousSelectedElementIds: {
145
- [id: string]: true;
146
- };
147
- selectedElementsAreBeingDragged: boolean;
148
- shouldCacheIgnoreZoom: boolean;
149
- toast: {
150
- message: string;
151
- closable?: boolean | undefined;
152
- duration?: number | undefined;
153
- } | null;
154
- zenModeEnabled: boolean;
155
- theme: import("@excalidraw/element/types").Theme;
156
- gridSize: number;
157
- gridStep: number;
158
- gridModeEnabled: boolean;
159
- viewModeEnabled: boolean;
160
- selectedGroupIds: {
161
- [groupId: string]: boolean;
162
- };
163
- editingGroupId: string | null;
164
- width: number;
165
- height: number;
166
- offsetTop: number;
167
- offsetLeft: number;
168
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
169
- collaborators: Map<import("../types").SocketId, Readonly<{
170
- pointer?: import("../types").CollaboratorPointer | undefined;
171
- button?: "up" | "down" | undefined;
172
- selectedElementIds?: Readonly<{
173
- [id: string]: true;
174
- }> | undefined;
175
- username?: string | null | undefined;
176
- userState?: import("@excalidraw/common").UserIdleState | undefined;
177
- color?: {
178
- background: string;
179
- stroke: string;
180
- } | undefined;
181
- avatarUrl?: string | undefined;
182
- id?: string | undefined;
183
- socketId?: import("../types").SocketId | undefined;
184
- isCurrentUser?: boolean | undefined;
185
- isInCall?: boolean | undefined;
186
- isSpeaking?: boolean | undefined;
187
- isMuted?: boolean | undefined;
188
- }>>;
189
- stats: {
190
- open: boolean;
191
- panels: number;
192
- };
193
- currentChartType: import("@excalidraw/element/types").ChartType;
194
- pasteDialog: {
195
- shown: false;
196
- data: null;
197
- } | {
198
- shown: true;
199
- data: import("../charts").Spreadsheet;
200
- };
201
- showHyperlinkPopup: false | "editor" | "info";
202
- snapLines: readonly import("../snapping").SnapLine[];
203
- originSnapOffset: {
204
- x: number;
205
- y: number;
206
- } | null;
207
- objectsSnapModeEnabled: boolean;
208
- userToFollow: import("../types").UserToFollow | null;
209
- followedBy: Set<import("../types").SocketId>;
210
- isCropping: boolean;
211
- croppingElementId: string | null;
212
- searchMatches: Readonly<{
213
- focusedId: string | null;
214
- matches: readonly import("../types").SearchMatch[];
215
- }> | null;
216
- activeLockedId: string | null;
217
- lockedMultiSelections: {
218
- [groupId: string]: true;
219
- };
220
- stylesPanelMode: "compact" | "full";
221
- };
222
- captureUpdate: "IMMEDIATELY";
223
- } | {
224
- elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
225
- appState: {
226
- cursorButton: "up";
227
- activeTool: {
228
- lastActiveTool: import("../types").ActiveTool | null;
229
- locked: boolean;
230
- fromSelection: boolean;
231
- } & import("../types").ActiveTool;
232
- activeEmbeddable: null;
233
- newElement: null;
234
- selectionElement: null;
235
- multiElement: null;
236
- editingTextElement: null;
237
- startBoundElement: null;
238
- suggestedBindings: never[];
239
- selectedElementIds: Readonly<{
240
- [id: string]: true;
241
- }>;
242
- selectedLinearElement: LinearElementEditor | null;
243
- contextMenu: {
244
- items: import("../components/ContextMenu").ContextMenuItems;
245
- top: number;
246
- left: number;
247
- } | null;
248
- showWelcomeScreen: boolean;
249
- isLoading: boolean;
250
- errorMessage: import("react").ReactNode;
251
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
252
- isBindingEnabled: boolean;
253
- frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
254
- frameRendering: {
255
- enabled: boolean;
256
- name: boolean;
257
- outline: boolean;
258
- clip: boolean;
259
- };
260
- editingFrame: string | null;
261
- elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
262
- penMode: boolean;
263
- penDetected: boolean;
264
- exportBackground: boolean;
265
- exportEmbedScene: boolean;
266
- exportWithDarkMode: boolean;
267
- exportScale: number;
268
- currentItemStrokeColor: string;
269
- currentItemBackgroundColor: string;
270
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
271
- currentItemStrokeWidth: number;
272
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
273
- currentItemRoughness: number;
274
- currentItemOpacity: number;
275
- currentItemFontFamily: number;
276
- currentItemFontSize: number;
277
- currentItemTextAlign: string;
278
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
279
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
280
- currentHoveredFontFamily: number | null;
281
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
282
- currentItemArrowType: "round" | "sharp" | "elbow";
283
- viewBackgroundColor: string;
284
- scrollX: number;
285
- scrollY: number;
286
- scrolledOutside: boolean;
287
- name: string | null;
288
- isResizing: boolean;
289
- isRotating: boolean;
290
- zoom: Readonly<{
291
- value: import("../types").NormalizedZoomValue;
292
- }>;
293
- openMenu: "canvas" | "shape" | null;
294
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
295
- openSidebar: {
296
- name: string;
297
- tab?: string | undefined;
298
- } | null;
299
- openDialog: {
300
- name: "imageExport" | "help" | "jsonExport";
301
- } | {
302
- name: "ttd";
303
- tab: "mermaid" | "text-to-diagram";
304
- } | {
305
- name: "commandPalette";
306
- } | {
307
- name: "elementLinkSelector";
308
- sourceElementId: string;
309
- } | null;
310
- defaultSidebarDockedPreference: boolean;
311
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
312
- hoveredElementIds: Readonly<{
313
- [id: string]: true;
314
- }>;
315
- previousSelectedElementIds: {
316
- [id: string]: true;
317
- };
318
- selectedElementsAreBeingDragged: boolean;
319
- shouldCacheIgnoreZoom: boolean;
320
- toast: {
321
- message: string;
322
- closable?: boolean | undefined;
323
- duration?: number | undefined;
324
- } | null;
325
- zenModeEnabled: boolean;
326
- theme: import("@excalidraw/element/types").Theme;
327
- gridSize: number;
328
- gridStep: number;
329
- gridModeEnabled: boolean;
330
- viewModeEnabled: boolean;
331
- selectedGroupIds: {
332
- [groupId: string]: boolean;
333
- };
334
- editingGroupId: string | null;
335
- width: number;
336
- height: number;
337
- offsetTop: number;
338
- offsetLeft: number;
339
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
340
- collaborators: Map<import("../types").SocketId, Readonly<{
341
- pointer?: import("../types").CollaboratorPointer | undefined;
342
- button?: "up" | "down" | undefined;
343
- selectedElementIds?: Readonly<{
344
- [id: string]: true;
345
- }> | undefined;
346
- username?: string | null | undefined;
347
- userState?: import("@excalidraw/common").UserIdleState | undefined;
348
- color?: {
349
- background: string;
350
- stroke: string;
351
- } | undefined;
352
- avatarUrl?: string | undefined;
353
- id?: string | undefined;
354
- socketId?: import("../types").SocketId | undefined;
355
- isCurrentUser?: boolean | undefined;
356
- isInCall?: boolean | undefined;
357
- isSpeaking?: boolean | undefined;
358
- isMuted?: boolean | undefined;
359
- }>>;
360
- stats: {
361
- open: boolean;
362
- panels: number;
363
- };
364
- currentChartType: import("@excalidraw/element/types").ChartType;
365
- pasteDialog: {
366
- shown: false;
367
- data: null;
368
- } | {
369
- shown: true;
370
- data: import("../charts").Spreadsheet;
371
- };
372
- showHyperlinkPopup: false | "editor" | "info";
373
- snapLines: readonly import("../snapping").SnapLine[];
374
- originSnapOffset: {
375
- x: number;
376
- y: number;
377
- } | null;
378
- objectsSnapModeEnabled: boolean;
379
- userToFollow: import("../types").UserToFollow | null;
380
- followedBy: Set<import("../types").SocketId>;
381
- isCropping: boolean;
382
- croppingElementId: string | null;
383
- searchMatches: Readonly<{
384
- focusedId: string | null;
385
- matches: readonly import("../types").SearchMatch[];
386
- }> | null;
387
- activeLockedId: string | null;
388
- lockedMultiSelections: {
389
- [groupId: string]: true;
390
- };
391
- stylesPanelMode: "compact" | "full";
392
- };
393
- captureUpdate: "IMMEDIATELY";
3
+ type FormData = {
4
+ event: PointerEvent;
5
+ sceneCoords: {
6
+ x: number;
7
+ y: number;
394
8
  };
395
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
396
- PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
397
- } & {
398
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
399
9
  };
10
+ export declare const actionFinalize: import("./types").Action<FormData> & {
11
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
12
+ };
13
+ export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
3
2
  import type { AppClassProperties, AppState } from "../types";
4
3
  export declare const actionFlipHorizontal: {
@@ -8,7 +7,7 @@ export declare const actionFlipHorizontal: {
8
7
  trackEvent: {
9
8
  category: "element";
10
9
  };
11
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
10
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
12
11
  elements: ExcalidrawElement[];
13
12
  appState: Readonly<AppState>;
14
13
  captureUpdate: "IMMEDIATELY";
@@ -24,7 +23,7 @@ export declare const actionFlipVertical: {
24
23
  trackEvent: {
25
24
  category: "element";
26
25
  };
27
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
26
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
28
27
  elements: ExcalidrawElement[];
29
28
  appState: Readonly<AppState>;
30
29
  captureUpdate: "IMMEDIATELY";