@excalidraw/common 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 (143) hide show
  1. package/dist/dev/index.js +173 -25
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/appEventBus.d.ts +27 -0
  5. package/dist/types/common/src/colors.d.ts +14 -14
  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 +8 -4
  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/excalidraw/actions/actionAddToLibrary.d.ts +35 -38
  30. package/dist/types/excalidraw/actions/actionBoundText.d.ts +25 -27
  31. package/dist/types/excalidraw/actions/actionCanvas.d.ts +207 -219
  32. package/dist/types/excalidraw/actions/actionClipboard.d.ts +24 -26
  33. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -13
  34. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +37 -40
  35. package/dist/types/excalidraw/actions/actionDeselect.d.ts +160 -0
  36. package/dist/types/excalidraw/actions/actionElementLink.d.ts +8 -13
  37. package/dist/types/excalidraw/actions/actionElementLock.d.ts +24 -26
  38. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +12 -13
  39. package/dist/types/excalidraw/actions/actionExport.d.ts +112 -394
  40. package/dist/types/excalidraw/actions/actionFrame.d.ts +49 -52
  41. package/dist/types/excalidraw/actions/actionGroup.d.ts +27 -29
  42. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +13 -13
  43. package/dist/types/excalidraw/actions/actionLink.d.ts +12 -13
  44. package/dist/types/excalidraw/actions/actionMenu.d.ts +8 -13
  45. package/dist/types/excalidraw/actions/actionProperties.d.ts +37 -30
  46. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +13 -14
  47. package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -12
  48. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  49. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +173 -0
  50. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +12 -13
  51. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +173 -0
  52. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -13
  53. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +8 -13
  54. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +12 -13
  55. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -13
  56. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -13
  57. package/dist/types/excalidraw/actions/index.d.ts +4 -1
  58. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  59. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  60. package/dist/types/excalidraw/appState.d.ts +32 -28
  61. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  62. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  63. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  64. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  65. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  66. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  67. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  68. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  69. package/dist/types/excalidraw/clipboard.d.ts +4 -7
  70. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  71. package/dist/types/excalidraw/components/App.d.ts +54 -14
  72. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  73. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  74. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  75. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
  76. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  77. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  78. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  79. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  80. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  81. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  82. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  83. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  84. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  85. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  86. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
  87. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  88. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  89. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  90. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
  91. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  92. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  93. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  94. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
  95. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  96. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  97. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  98. package/dist/types/excalidraw/components/icons.d.ts +19 -8
  99. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +9 -3
  100. package/dist/types/excalidraw/components/shapes.d.ts +7 -0
  101. package/dist/types/excalidraw/data/blob.d.ts +163 -166
  102. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  103. package/dist/types/excalidraw/data/index.d.ts +2 -3
  104. package/dist/types/excalidraw/data/json.d.ts +92 -85
  105. package/dist/types/excalidraw/data/library.d.ts +1 -1
  106. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  107. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  108. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  109. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  110. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  111. package/dist/types/excalidraw/renderer/animation.d.ts +4 -1
  112. package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
  113. package/dist/types/excalidraw/scene/index.d.ts +1 -1
  114. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  115. package/dist/types/excalidraw/types.d.ts +110 -18
  116. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  117. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  118. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  119. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  120. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  121. package/dist/types/laser-pointer/src/state.d.ts +35 -0
  122. package/dist/types/math/src/constants.d.ts +0 -1
  123. package/dist/types/math/src/curve.d.ts +4 -1
  124. package/dist/types/math/src/point.d.ts +2 -1
  125. package/dist/types/utils/src/index.d.ts +1 -2
  126. package/package.json +1 -1
  127. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  128. package/dist/types/excalidraw/charts.d.ts +0 -27
  129. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  130. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  131. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  132. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  133. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  134. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  135. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  136. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  137. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  138. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  139. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  140. package/dist/types/excalidraw/index.d.ts +0 -47
  141. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  142. package/dist/types/utils/src/bbox.d.ts +0 -9
  143. 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;
59
- };
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;
30
+ duration: number;
152
31
  };
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,14 +49,52 @@ 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
  };
61
+ };
62
+ } | {
63
+ captureUpdate: "NEVER";
64
+ appState: {
65
+ toast: null;
66
+ openDialog?: undefined;
67
+ fileHandle?: undefined;
68
+ };
69
+ }>;
70
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
71
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
72
+ } & {
73
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
74
+ };
75
+ export declare const actionLoadScene: {
76
+ name: "loadScene";
77
+ label: string;
78
+ trackEvent: {
79
+ category: "export";
80
+ };
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 | {
83
+ elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
84
+ appState: {
85
+ viewModeEnabled: boolean;
86
+ zenModeEnabled: boolean;
87
+ gridModeEnabled: boolean;
88
+ objectsSnapModeEnabled: boolean;
89
+ theme: Theme;
90
+ name: string | null;
91
+ currentItemArrowType: "sharp" | "round" | "elbow";
92
+ gridSize: number;
93
+ activeTool: {
94
+ lastActiveTool: import("../types").ActiveTool | null;
95
+ locked: boolean;
96
+ fromSelection: boolean;
97
+ } & import("../types").ActiveTool;
207
98
  contextMenu: {
208
99
  items: import("../components/ContextMenu").ContextMenuItems;
209
100
  top: number;
@@ -221,7 +112,9 @@ export declare const actionSaveFileToDisk: {
221
112
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
222
113
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
223
114
  isBindingEnabled: boolean;
224
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
115
+ boxSelectionMode: import("../types").BoxSelectionMode;
116
+ bindingPreference: "enabled" | "disabled";
117
+ isMidpointSnappingEnabled: boolean;
225
118
  suggestedBinding: {
226
119
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
227
120
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -234,13 +127,8 @@ export declare const actionSaveFileToDisk: {
234
127
  clip: boolean;
235
128
  };
236
129
  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;
130
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
131
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
244
132
  preferredSelectionTool: {
245
133
  type: "selection" | "lasso";
246
134
  initialized: boolean;
@@ -253,10 +141,11 @@ export declare const actionSaveFileToDisk: {
253
141
  exportScale: number;
254
142
  currentItemStrokeColor: string;
255
143
  currentItemBackgroundColor: string;
256
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
257
- currentItemStrokeWidth: number;
258
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
144
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
145
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
146
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
259
147
  currentItemRoughness: number;
148
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
260
149
  currentItemOpacity: number;
261
150
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
262
151
  currentItemFontSize: number;
@@ -265,13 +154,11 @@ export declare const actionSaveFileToDisk: {
265
154
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
266
155
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
267
156
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
268
- currentItemArrowType: "sharp" | "round" | "elbow";
269
157
  viewBackgroundColor: string;
270
158
  scrollX: number;
271
159
  scrollY: number;
272
160
  cursorButton: "up" | "down";
273
161
  scrolledOutside: boolean;
274
- name: string | null;
275
162
  isResizing: boolean;
276
163
  isRotating: boolean;
277
164
  zoom: import("../types").Zoom;
@@ -281,100 +168,6 @@ export declare const actionSaveFileToDisk: {
281
168
  name: import("../types").SidebarName;
282
169
  tab?: import("../types").SidebarTabName;
283
170
  } | 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
- };
346
- } | {
347
- captureUpdate: "EVENTUALLY";
348
- appState?: undefined;
349
- }>;
350
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
351
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
352
- } & {
353
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
354
- };
355
- export declare const actionLoadScene: {
356
- name: "loadScene";
357
- label: string;
358
- trackEvent: {
359
- category: "export";
360
- };
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 | {
363
- elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
364
- appState: {
365
- viewBackgroundColor: string;
366
- theme: Theme;
367
- frameRendering: {
368
- enabled: boolean;
369
- name: boolean;
370
- outline: boolean;
371
- clip: boolean;
372
- };
373
- name: string | null;
374
- zoom: import("../types").Zoom;
375
- scrollX: number;
376
- scrollY: number;
377
- viewModeEnabled: boolean;
378
171
  openDialog: null | {
379
172
  name: "imageExport" | "help" | "jsonExport";
380
173
  } | {
@@ -386,137 +179,63 @@ export declare const actionLoadScene: {
386
179
  name: "settings";
387
180
  } | {
388
181
  name: "elementLinkSelector";
389
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
182
+ sourceElementId: ExcalidrawElement["id"];
183
+ } | {
184
+ name: "charts";
185
+ data: import("../charts").Spreadsheet;
186
+ rawText: string;
390
187
  };
391
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
188
+ defaultSidebarDockedPreference: boolean;
189
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
392
190
  selectedElementIds: Readonly<{
393
191
  [id: string]: true;
394
192
  }>;
395
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
396
- activeTool: {
397
- lastActiveTool: import("../types").ActiveTool | null;
398
- locked: boolean;
399
- fromSelection: boolean;
400
- } & import("../types").ActiveTool;
401
- activeEmbeddable: {
402
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
403
- state: "hover" | "active";
404
- } | null;
405
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
406
- selectedGroupIds: {
407
- [groupId: string]: boolean;
408
- };
409
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
410
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
411
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
412
- isBindingEnabled: boolean;
413
- suggestedBinding: {
414
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
415
- midPoint?: import("@excalidraw/math").GlobalPoint;
416
- } | null;
417
- isRotating: boolean;
418
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
419
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
420
- snapLines: readonly import("../snapping").SnapLine[];
421
- zenModeEnabled: boolean;
422
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
423
- isCropping: boolean;
424
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
425
- searchMatches: Readonly<{
426
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
427
- matches: readonly import("../types").SearchMatch[];
428
- }> | null;
429
- activeLockedId: string | null;
430
193
  hoveredElementIds: Readonly<{
431
194
  [id: string]: true;
432
195
  }>;
433
- shouldCacheIgnoreZoom: boolean;
434
- exportScale: number;
435
- currentItemArrowType: "sharp" | "round" | "elbow";
436
- bindMode: import("@excalidraw/element/types").BindMode;
437
- gridSize: number;
438
- contextMenu: {
439
- items: import("../components/ContextMenu").ContextMenuItems;
440
- top: number;
441
- left: number;
442
- } | null;
443
- showWelcomeScreen: boolean;
444
- isLoading: boolean;
445
- errorMessage: React.ReactNode;
446
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
447
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
448
- editingFrame: string | null;
449
- preferredSelectionTool: {
450
- type: "selection" | "lasso";
451
- initialized: boolean;
452
- };
453
- penMode: boolean;
454
- penDetected: boolean;
455
- exportBackground: boolean;
456
- exportEmbedScene: boolean;
457
- exportWithDarkMode: boolean;
458
- currentItemStrokeColor: string;
459
- currentItemBackgroundColor: string;
460
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
461
- currentItemStrokeWidth: number;
462
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
463
- currentItemRoughness: number;
464
- currentItemOpacity: number;
465
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
466
- currentItemFontSize: number;
467
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
468
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
469
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
470
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
471
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
472
- cursorButton: "up" | "down";
473
- scrolledOutside: boolean;
474
- isResizing: boolean;
475
- openMenu: "canvas" | null;
476
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
477
- openSidebar: {
478
- name: import("../types").SidebarName;
479
- tab?: import("../types").SidebarTabName;
480
- } | null;
481
- defaultSidebarDockedPreference: boolean;
482
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
483
196
  previousSelectedElementIds: {
484
197
  [id: string]: true;
485
198
  };
486
199
  selectedElementsAreBeingDragged: boolean;
200
+ shouldCacheIgnoreZoom: boolean;
487
201
  toast: {
488
- message: string;
202
+ message: React.ReactNode;
489
203
  closable?: boolean;
490
204
  duration?: number;
491
205
  } | null;
492
206
  gridStep: number;
493
- gridModeEnabled: boolean;
494
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
207
+ selectedGroupIds: {
208
+ [groupId: string]: boolean;
209
+ };
210
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
211
+ fileHandle: FileSystemFileHandle | null;
212
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
495
213
  stats: {
496
214
  open: boolean;
497
215
  panels: number;
498
216
  };
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
217
  showHyperlinkPopup: false | "info" | "editor";
218
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
219
+ snapLines: readonly import("../snapping").SnapLine[];
508
220
  originSnapOffset: {
509
221
  x: number;
510
222
  y: number;
511
223
  } | null;
512
- objectsSnapModeEnabled: boolean;
513
224
  userToFollow: import("../types").UserToFollow | null;
514
225
  followedBy: Set<import("../types").SocketId>;
226
+ isCropping: boolean;
227
+ croppingElementId: ExcalidrawElement["id"] | null;
228
+ searchMatches: Readonly<{
229
+ focusedId: ExcalidrawElement["id"] | null;
230
+ matches: readonly import("../types").SearchMatch[];
231
+ }> | null;
232
+ activeLockedId: string | null;
515
233
  lockedMultiSelections: {
516
234
  [groupId: string]: true;
517
235
  };
236
+ bindMode: import("@excalidraw/element/types").BindMode;
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
  };