@excalidraw/element 0.18.0-2874f9e → 0.18.0-2a82821

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 (144) hide show
  1. package/dist/dev/index.js +5228 -4610
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +19 -18
  4. package/dist/types/common/src/appEventBus.d.ts +27 -0
  5. package/dist/types/common/src/colors.d.ts +2 -2
  6. package/dist/types/common/src/constants.d.ts +9 -7
  7. package/dist/types/common/src/index.d.ts +2 -0
  8. package/dist/types/common/src/utils.d.ts +1 -3
  9. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  10. package/dist/types/element/src/Scene.d.ts +7 -3
  11. package/dist/types/element/src/arrowheads.d.ts +3 -0
  12. package/dist/types/element/src/binding.d.ts +3 -4
  13. package/dist/types/element/src/bounds.d.ts +22 -3
  14. package/dist/types/element/src/comparisons.d.ts +1 -0
  15. package/dist/types/element/src/duplicate.d.ts +1 -0
  16. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  17. package/dist/types/element/src/frame.d.ts +7 -6
  18. package/dist/types/element/src/index.d.ts +1 -0
  19. package/dist/types/element/src/linearElementEditor.d.ts +5 -2
  20. package/dist/types/element/src/mutateElement.d.ts +2 -0
  21. package/dist/types/element/src/newElement.d.ts +1 -0
  22. package/dist/types/element/src/selection.d.ts +7 -3
  23. package/dist/types/element/src/shape.d.ts +1 -1
  24. package/dist/types/element/src/textElement.d.ts +1 -1
  25. package/dist/types/element/src/textWrapping.d.ts +26 -0
  26. package/dist/types/element/src/typeChecks.d.ts +1 -0
  27. package/dist/types/element/src/types.d.ts +11 -2
  28. package/dist/types/element/src/utils.d.ts +2 -2
  29. package/dist/types/element/src/visualdebug.d.ts +1 -2
  30. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +35 -38
  31. package/dist/types/excalidraw/actions/actionBoundText.d.ts +25 -27
  32. package/dist/types/excalidraw/actions/actionCanvas.d.ts +144 -156
  33. package/dist/types/excalidraw/actions/actionClipboard.d.ts +24 -26
  34. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -13
  35. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +36 -39
  36. package/dist/types/excalidraw/actions/actionDeselect.d.ts +160 -0
  37. package/dist/types/excalidraw/actions/actionElementLink.d.ts +8 -13
  38. package/dist/types/excalidraw/actions/actionElementLock.d.ts +24 -26
  39. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +12 -13
  40. package/dist/types/excalidraw/actions/actionExport.d.ts +67 -349
  41. package/dist/types/excalidraw/actions/actionFrame.d.ts +49 -52
  42. package/dist/types/excalidraw/actions/actionGroup.d.ts +25 -27
  43. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +13 -13
  44. package/dist/types/excalidraw/actions/actionLink.d.ts +12 -13
  45. package/dist/types/excalidraw/actions/actionMenu.d.ts +8 -13
  46. package/dist/types/excalidraw/actions/actionProperties.d.ts +36 -29
  47. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +12 -13
  48. package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -12
  49. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  50. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +173 -0
  51. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +12 -13
  52. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +173 -0
  53. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -13
  54. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +8 -13
  55. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +12 -13
  56. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -13
  57. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -13
  58. package/dist/types/excalidraw/actions/index.d.ts +4 -1
  59. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  60. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  61. package/dist/types/excalidraw/appState.d.ts +6 -2
  62. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  63. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  64. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  65. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  66. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  67. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  68. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  69. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  70. package/dist/types/excalidraw/clipboard.d.ts +2 -5
  71. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  72. package/dist/types/excalidraw/components/App.d.ts +54 -14
  73. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  74. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  75. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  76. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
  77. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  78. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  79. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  80. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  81. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  82. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  83. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  84. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  85. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  86. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  87. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
  88. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  89. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  90. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  91. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
  92. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  93. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  94. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  95. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
  96. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  97. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  98. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  99. package/dist/types/excalidraw/components/icons.d.ts +19 -8
  100. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +9 -3
  101. package/dist/types/excalidraw/components/shapes.d.ts +7 -0
  102. package/dist/types/excalidraw/data/blob.d.ts +31 -34
  103. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  104. package/dist/types/excalidraw/data/index.d.ts +2 -3
  105. package/dist/types/excalidraw/data/json.d.ts +30 -23
  106. package/dist/types/excalidraw/data/library.d.ts +1 -1
  107. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  108. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  109. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  110. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  111. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  112. package/dist/types/excalidraw/renderer/animation.d.ts +4 -1
  113. package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
  114. package/dist/types/excalidraw/scene/index.d.ts +1 -1
  115. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  116. package/dist/types/excalidraw/types.d.ts +110 -18
  117. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  118. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  119. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  120. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  121. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  122. package/dist/types/laser-pointer/src/state.d.ts +35 -0
  123. package/dist/types/math/src/constants.d.ts +0 -1
  124. package/dist/types/math/src/curve.d.ts +4 -1
  125. package/dist/types/math/src/point.d.ts +2 -1
  126. package/dist/types/utils/src/index.d.ts +1 -2
  127. package/package.json +4 -3
  128. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  129. package/dist/types/excalidraw/charts.d.ts +0 -27
  130. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  131. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  132. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  133. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  134. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  135. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  136. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  137. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  138. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  139. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  140. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  141. package/dist/types/excalidraw/index.d.ts +0 -47
  142. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  143. package/dist/types/utils/src/bbox.d.ts +0 -9
  144. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,17 +1,17 @@
1
- import type { Theme } from "@excalidraw/element/types";
1
+ import type { ExcalidrawElement, Theme } from "@excalidraw/element/types";
2
2
  import "../components/ToolIcon.scss";
3
- import type { AppState } from "../types";
3
+ import type { AppClassProperties, AppState, BinaryFiles, ExcalidrawProps } from "../types";
4
4
  export declare const actionChangeProjectName: import("./types").Action<string | null> & {
5
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
5
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
6
6
  };
7
7
  export declare const actionChangeExportScale: import("./types").Action<number> & {
8
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
8
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
9
9
  };
10
10
  export declare const actionChangeExportBackground: import("./types").Action<boolean> & {
11
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
11
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
12
12
  };
13
13
  export declare const actionChangeExportEmbedScene: import("./types").Action<boolean> & {
14
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
14
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
15
15
  };
16
16
  export declare const actionSaveToActiveFile: {
17
17
  name: "saveToActiveFile";
@@ -20,169 +20,22 @@ export declare const actionSaveToActiveFile: {
20
20
  trackEvent: {
21
21
  category: "export";
22
22
  };
23
- predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
24
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: import("../types").AppClassProperties) => Promise<{
25
- captureUpdate: "EVENTUALLY";
23
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: ExcalidrawProps, app: AppClassProperties) => boolean;
24
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: AppClassProperties) => Promise<false | {
25
+ captureUpdate: "NEVER";
26
26
  appState: {
27
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
27
+ fileHandle: FileSystemFileHandle | null;
28
28
  toast: {
29
29
  message: string;
30
- } | null;
31
- contextMenu: {
32
- items: import("../components/ContextMenu").ContextMenuItems;
33
- top: number;
34
- left: number;
35
- } | null;
36
- showWelcomeScreen: boolean;
37
- isLoading: boolean;
38
- errorMessage: React.ReactNode;
39
- activeEmbeddable: {
40
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
41
- state: "hover" | "active";
42
- } | null;
43
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
44
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
45
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
46
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
47
- isBindingEnabled: boolean;
48
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
49
- suggestedBinding: {
50
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
51
- midPoint?: import("@excalidraw/math").GlobalPoint;
52
- } | null;
53
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
54
- frameRendering: {
55
- enabled: boolean;
56
- name: boolean;
57
- outline: boolean;
58
- clip: boolean;
30
+ duration: number;
59
31
  };
60
- editingFrame: string | null;
61
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
62
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
63
- activeTool: {
64
- lastActiveTool: import("../types").ActiveTool | null;
65
- locked: boolean;
66
- fromSelection: boolean;
67
- } & import("../types").ActiveTool;
68
- preferredSelectionTool: {
69
- type: "selection" | "lasso";
70
- initialized: boolean;
71
- };
72
- penMode: boolean;
73
- penDetected: boolean;
74
- exportBackground: boolean;
75
- exportEmbedScene: boolean;
76
- exportWithDarkMode: boolean;
77
- exportScale: number;
78
- currentItemStrokeColor: string;
79
- currentItemBackgroundColor: string;
80
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
81
- currentItemStrokeWidth: number;
82
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
83
- currentItemRoughness: number;
84
- currentItemOpacity: number;
85
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
86
- currentItemFontSize: number;
87
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
88
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
89
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
90
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
91
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
92
- currentItemArrowType: "sharp" | "round" | "elbow";
93
- viewBackgroundColor: string;
94
- scrollX: number;
95
- scrollY: number;
96
- cursorButton: "up" | "down";
97
- scrolledOutside: boolean;
98
- name: string | null;
99
- isResizing: boolean;
100
- isRotating: boolean;
101
- zoom: import("../types").Zoom;
102
- openMenu: "canvas" | null;
103
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
104
- openSidebar: {
105
- name: import("../types").SidebarName;
106
- tab?: import("../types").SidebarTabName;
107
- } | null;
108
- openDialog: null | {
109
- name: "imageExport" | "help" | "jsonExport";
110
- } | {
111
- name: "ttd";
112
- tab: "text-to-diagram" | "mermaid";
113
- } | {
114
- name: "commandPalette";
115
- } | {
116
- name: "settings";
117
- } | {
118
- name: "elementLinkSelector";
119
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
120
- };
121
- defaultSidebarDockedPreference: boolean;
122
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
123
- selectedElementIds: Readonly<{
124
- [id: string]: true;
125
- }>;
126
- hoveredElementIds: Readonly<{
127
- [id: string]: true;
128
- }>;
129
- previousSelectedElementIds: {
130
- [id: string]: true;
131
- };
132
- selectedElementsAreBeingDragged: boolean;
133
- shouldCacheIgnoreZoom: boolean;
134
- zenModeEnabled: boolean;
135
- theme: Theme;
136
- gridSize: number;
137
- gridStep: number;
138
- gridModeEnabled: boolean;
139
- viewModeEnabled: boolean;
140
- selectedGroupIds: {
141
- [groupId: string]: boolean;
142
- };
143
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
144
- width: number;
145
- height: number;
146
- offsetTop: number;
147
- offsetLeft: number;
148
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
149
- stats: {
150
- open: boolean;
151
- panels: number;
152
- };
153
- currentChartType: import("@excalidraw/element/types").ChartType;
154
- pasteDialog: {
155
- shown: false;
156
- data: null;
157
- } | {
158
- shown: true;
159
- data: import("../charts").Spreadsheet;
160
- };
161
- showHyperlinkPopup: false | "info" | "editor";
162
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
163
- snapLines: readonly import("../snapping").SnapLine[];
164
- originSnapOffset: {
165
- x: number;
166
- y: number;
167
- } | null;
168
- objectsSnapModeEnabled: boolean;
169
- userToFollow: import("../types").UserToFollow | null;
170
- followedBy: Set<import("../types").SocketId>;
171
- isCropping: boolean;
172
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
173
- searchMatches: Readonly<{
174
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
175
- matches: readonly import("../types").SearchMatch[];
176
- }> | null;
177
- activeLockedId: string | null;
178
- lockedMultiSelections: {
179
- [groupId: string]: true;
180
- };
181
- bindMode: import("@excalidraw/element/types").BindMode;
182
32
  };
183
33
  } | {
184
- captureUpdate: "EVENTUALLY";
185
- appState?: undefined;
34
+ captureUpdate: "NEVER";
35
+ appState: {
36
+ toast: null;
37
+ fileHandle?: undefined;
38
+ };
186
39
  }>;
187
40
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
188
41
  } & {
@@ -196,156 +49,23 @@ export declare const actionSaveFileToDisk: {
196
49
  trackEvent: {
197
50
  category: "export";
198
51
  };
199
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: import("../types").AppClassProperties) => Promise<{
200
- captureUpdate: "EVENTUALLY";
52
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: AppClassProperties) => Promise<false | {
53
+ captureUpdate: "NEVER";
201
54
  appState: {
202
55
  openDialog: null;
203
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
56
+ fileHandle: FileSystemFileHandle | null;
204
57
  toast: {
205
58
  message: string;
59
+ duration: number;
206
60
  };
207
- contextMenu: {
208
- items: import("../components/ContextMenu").ContextMenuItems;
209
- top: number;
210
- left: number;
211
- } | null;
212
- showWelcomeScreen: boolean;
213
- isLoading: boolean;
214
- errorMessage: React.ReactNode;
215
- activeEmbeddable: {
216
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
217
- state: "hover" | "active";
218
- } | null;
219
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
220
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
221
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
222
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
223
- isBindingEnabled: boolean;
224
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
225
- suggestedBinding: {
226
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
227
- midPoint?: import("@excalidraw/math").GlobalPoint;
228
- } | null;
229
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
230
- frameRendering: {
231
- enabled: boolean;
232
- name: boolean;
233
- outline: boolean;
234
- clip: boolean;
235
- };
236
- editingFrame: string | null;
237
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
238
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
239
- activeTool: {
240
- lastActiveTool: import("../types").ActiveTool | null;
241
- locked: boolean;
242
- fromSelection: boolean;
243
- } & import("../types").ActiveTool;
244
- preferredSelectionTool: {
245
- type: "selection" | "lasso";
246
- initialized: boolean;
247
- };
248
- penMode: boolean;
249
- penDetected: boolean;
250
- exportBackground: boolean;
251
- exportEmbedScene: boolean;
252
- exportWithDarkMode: boolean;
253
- exportScale: number;
254
- currentItemStrokeColor: string;
255
- currentItemBackgroundColor: string;
256
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
257
- currentItemStrokeWidth: number;
258
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
259
- currentItemRoughness: number;
260
- currentItemOpacity: number;
261
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
262
- currentItemFontSize: number;
263
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
264
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
265
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
266
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
267
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
268
- currentItemArrowType: "sharp" | "round" | "elbow";
269
- viewBackgroundColor: string;
270
- scrollX: number;
271
- scrollY: number;
272
- cursorButton: "up" | "down";
273
- scrolledOutside: boolean;
274
- name: string | null;
275
- isResizing: boolean;
276
- isRotating: boolean;
277
- zoom: import("../types").Zoom;
278
- openMenu: "canvas" | null;
279
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
280
- openSidebar: {
281
- name: import("../types").SidebarName;
282
- tab?: import("../types").SidebarTabName;
283
- } | null;
284
- defaultSidebarDockedPreference: boolean;
285
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
286
- selectedElementIds: Readonly<{
287
- [id: string]: true;
288
- }>;
289
- hoveredElementIds: Readonly<{
290
- [id: string]: true;
291
- }>;
292
- previousSelectedElementIds: {
293
- [id: string]: true;
294
- };
295
- selectedElementsAreBeingDragged: boolean;
296
- shouldCacheIgnoreZoom: boolean;
297
- zenModeEnabled: boolean;
298
- theme: Theme;
299
- gridSize: number;
300
- gridStep: number;
301
- gridModeEnabled: boolean;
302
- viewModeEnabled: boolean;
303
- selectedGroupIds: {
304
- [groupId: string]: boolean;
305
- };
306
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
307
- width: number;
308
- height: number;
309
- offsetTop: number;
310
- offsetLeft: number;
311
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
312
- stats: {
313
- open: boolean;
314
- panels: number;
315
- };
316
- currentChartType: import("@excalidraw/element/types").ChartType;
317
- pasteDialog: {
318
- shown: false;
319
- data: null;
320
- } | {
321
- shown: true;
322
- data: import("../charts").Spreadsheet;
323
- };
324
- showHyperlinkPopup: false | "info" | "editor";
325
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
326
- snapLines: readonly import("../snapping").SnapLine[];
327
- originSnapOffset: {
328
- x: number;
329
- y: number;
330
- } | null;
331
- objectsSnapModeEnabled: boolean;
332
- userToFollow: import("../types").UserToFollow | null;
333
- followedBy: Set<import("../types").SocketId>;
334
- isCropping: boolean;
335
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
336
- searchMatches: Readonly<{
337
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
338
- matches: readonly import("../types").SearchMatch[];
339
- }> | null;
340
- activeLockedId: string | null;
341
- lockedMultiSelections: {
342
- [groupId: string]: true;
343
- };
344
- bindMode: import("@excalidraw/element/types").BindMode;
345
61
  };
346
62
  } | {
347
- captureUpdate: "EVENTUALLY";
348
- appState?: undefined;
63
+ captureUpdate: "NEVER";
64
+ appState: {
65
+ toast: null;
66
+ openDialog?: undefined;
67
+ fileHandle?: undefined;
68
+ };
349
69
  }>;
350
70
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
351
71
  PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -358,8 +78,8 @@ export declare const actionLoadScene: {
358
78
  trackEvent: {
359
79
  category: "export";
360
80
  };
361
- predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
362
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => Promise<false | {
81
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: ExcalidrawProps, app: AppClassProperties) => boolean;
82
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => Promise<false | {
363
83
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
364
84
  appState: {
365
85
  viewBackgroundColor: string;
@@ -386,7 +106,11 @@ export declare const actionLoadScene: {
386
106
  name: "settings";
387
107
  } | {
388
108
  name: "elementLinkSelector";
389
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
109
+ sourceElementId: ExcalidrawElement["id"];
110
+ } | {
111
+ name: "charts";
112
+ data: import("../charts").Spreadsheet;
113
+ rawText: string;
390
114
  };
391
115
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
392
116
  selectedElementIds: Readonly<{
@@ -410,20 +134,21 @@ export declare const actionLoadScene: {
410
134
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
411
135
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
412
136
  isBindingEnabled: boolean;
137
+ isMidpointSnappingEnabled: boolean;
413
138
  suggestedBinding: {
414
139
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
415
140
  midPoint?: import("@excalidraw/math").GlobalPoint;
416
141
  } | null;
417
142
  isRotating: boolean;
418
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
143
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
419
144
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
420
145
  snapLines: readonly import("../snapping").SnapLine[];
421
146
  zenModeEnabled: boolean;
422
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
147
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
423
148
  isCropping: boolean;
424
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
149
+ croppingElementId: ExcalidrawElement["id"] | null;
425
150
  searchMatches: Readonly<{
426
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
151
+ focusedId: ExcalidrawElement["id"] | null;
427
152
  matches: readonly import("../types").SearchMatch[];
428
153
  }> | null;
429
154
  activeLockedId: string | null;
@@ -444,7 +169,8 @@ export declare const actionLoadScene: {
444
169
  isLoading: boolean;
445
170
  errorMessage: React.ReactNode;
446
171
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
447
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
172
+ boxSelectionMode: import("../types").BoxSelectionMode;
173
+ bindingPreference: "enabled" | "disabled";
448
174
  editingFrame: string | null;
449
175
  preferredSelectionTool: {
450
176
  type: "selection" | "lasso";
@@ -457,10 +183,11 @@ export declare const actionLoadScene: {
457
183
  exportWithDarkMode: boolean;
458
184
  currentItemStrokeColor: string;
459
185
  currentItemBackgroundColor: string;
460
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
461
- currentItemStrokeWidth: number;
462
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
186
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
187
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
188
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
463
189
  currentItemRoughness: number;
190
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
464
191
  currentItemOpacity: number;
465
192
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
466
193
  currentItemFontSize: number;
@@ -485,25 +212,17 @@ export declare const actionLoadScene: {
485
212
  };
486
213
  selectedElementsAreBeingDragged: boolean;
487
214
  toast: {
488
- message: string;
215
+ message: React.ReactNode;
489
216
  closable?: boolean;
490
217
  duration?: number;
491
218
  } | null;
492
219
  gridStep: number;
493
220
  gridModeEnabled: boolean;
494
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
221
+ fileHandle: FileSystemFileHandle | null;
495
222
  stats: {
496
223
  open: boolean;
497
224
  panels: number;
498
225
  };
499
- currentChartType: import("@excalidraw/element/types").ChartType;
500
- pasteDialog: {
501
- shown: false;
502
- data: null;
503
- } | {
504
- shown: true;
505
- data: import("../charts").Spreadsheet;
506
- };
507
226
  showHyperlinkPopup: false | "info" | "editor";
508
227
  originSnapOffset: {
509
228
  x: number;
@@ -516,7 +235,7 @@ export declare const actionLoadScene: {
516
235
  [groupId: string]: true;
517
236
  };
518
237
  };
519
- files: import("../types").BinaryFiles;
238
+ files: BinaryFiles;
520
239
  captureUpdate: "IMMEDIATELY";
521
240
  } | {
522
241
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
@@ -538,7 +257,9 @@ export declare const actionLoadScene: {
538
257
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
539
258
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
540
259
  isBindingEnabled: boolean;
541
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
260
+ boxSelectionMode: import("../types").BoxSelectionMode;
261
+ bindingPreference: "enabled" | "disabled";
262
+ isMidpointSnappingEnabled: boolean;
542
263
  suggestedBinding: {
543
264
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
544
265
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -551,8 +272,8 @@ export declare const actionLoadScene: {
551
272
  clip: boolean;
552
273
  };
553
274
  editingFrame: string | null;
554
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
555
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
275
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
276
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
556
277
  activeTool: {
557
278
  lastActiveTool: import("../types").ActiveTool | null;
558
279
  locked: boolean;
@@ -570,10 +291,11 @@ export declare const actionLoadScene: {
570
291
  exportScale: number;
571
292
  currentItemStrokeColor: string;
572
293
  currentItemBackgroundColor: string;
573
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
574
- currentItemStrokeWidth: number;
575
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
294
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
295
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
296
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
576
297
  currentItemRoughness: number;
298
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
577
299
  currentItemOpacity: number;
578
300
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
579
301
  currentItemFontSize: number;
@@ -609,7 +331,11 @@ export declare const actionLoadScene: {
609
331
  name: "settings";
610
332
  } | {
611
333
  name: "elementLinkSelector";
612
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
334
+ sourceElementId: ExcalidrawElement["id"];
335
+ } | {
336
+ name: "charts";
337
+ data: import("../charts").Spreadsheet;
338
+ rawText: string;
613
339
  };
614
340
  defaultSidebarDockedPreference: boolean;
615
341
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -625,7 +351,7 @@ export declare const actionLoadScene: {
625
351
  selectedElementsAreBeingDragged: boolean;
626
352
  shouldCacheIgnoreZoom: boolean;
627
353
  toast: {
628
- message: string;
354
+ message: React.ReactNode;
629
355
  closable?: boolean;
630
356
  duration?: number;
631
357
  } | null;
@@ -643,20 +369,12 @@ export declare const actionLoadScene: {
643
369
  height: number;
644
370
  offsetTop: number;
645
371
  offsetLeft: number;
646
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
372
+ fileHandle: FileSystemFileHandle | null;
647
373
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
648
374
  stats: {
649
375
  open: boolean;
650
376
  panels: number;
651
377
  };
652
- currentChartType: import("@excalidraw/element/types").ChartType;
653
- pasteDialog: {
654
- shown: false;
655
- data: null;
656
- } | {
657
- shown: true;
658
- data: import("../charts").Spreadsheet;
659
- };
660
378
  showHyperlinkPopup: false | "info" | "editor";
661
379
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
662
380
  snapLines: readonly import("../snapping").SnapLine[];
@@ -668,9 +386,9 @@ export declare const actionLoadScene: {
668
386
  userToFollow: import("../types").UserToFollow | null;
669
387
  followedBy: Set<import("../types").SocketId>;
670
388
  isCropping: boolean;
671
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
389
+ croppingElementId: ExcalidrawElement["id"] | null;
672
390
  searchMatches: Readonly<{
673
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
391
+ focusedId: ExcalidrawElement["id"] | null;
674
392
  matches: readonly import("../types").SearchMatch[];
675
393
  }> | null;
676
394
  activeLockedId: string | null;
@@ -679,7 +397,7 @@ export declare const actionLoadScene: {
679
397
  };
680
398
  bindMode: import("@excalidraw/element/types").BindMode;
681
399
  };
682
- files: import("../types").BinaryFiles;
400
+ files: BinaryFiles;
683
401
  captureUpdate: "EVENTUALLY";
684
402
  }>;
685
403
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -687,5 +405,5 @@ export declare const actionLoadScene: {
687
405
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
688
406
  };
689
407
  export declare const actionExportWithDarkMode: import("./types").Action<boolean> & {
690
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
408
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
691
409
  };