@myoc/common 0.19.510 → 0.19.511

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 (61) hide show
  1. package/dist/dev/index.js +4 -27
  2. package/dist/dev/index.js.map +2 -2
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/constants.d.ts +1 -16
  5. package/dist/types/excalidraw/actions/actionBoundText.d.ts +0 -4
  6. package/dist/types/excalidraw/actions/actionCanvas.d.ts +0 -22
  7. package/dist/types/excalidraw/actions/actionClipboard.d.ts +0 -4
  8. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +0 -2
  9. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +0 -6
  10. package/dist/types/excalidraw/actions/actionDeselect.d.ts +0 -2
  11. package/dist/types/excalidraw/actions/actionElementLock.d.ts +0 -4
  12. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -2
  13. package/dist/types/excalidraw/actions/actionExport.d.ts +0 -4
  14. package/dist/types/excalidraw/actions/actionFrame.d.ts +0 -8
  15. package/dist/types/excalidraw/actions/actionGroup.d.ts +0 -4
  16. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +0 -4
  17. package/dist/types/excalidraw/actions/actionLink.d.ts +0 -2
  18. package/dist/types/excalidraw/actions/actionProperties.d.ts +0 -4
  19. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +0 -2
  20. package/dist/types/excalidraw/actions/actionStyles.d.ts +0 -2
  21. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +0 -2
  22. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +0 -2
  23. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +0 -2
  24. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +0 -2
  25. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +0 -2
  26. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +0 -2
  27. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +0 -2
  28. package/dist/types/excalidraw/actions/index.d.ts +0 -1
  29. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  30. package/dist/types/excalidraw/actions/types.d.ts +2 -2
  31. package/dist/types/excalidraw/components/App.d.ts +2 -4
  32. package/dist/types/excalidraw/components/MobileToolBar.d.ts +3 -1
  33. package/dist/types/excalidraw/components/icons.d.ts +0 -1
  34. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +0 -6
  35. package/dist/types/excalidraw/data/blob.d.ts +3 -184
  36. package/dist/types/excalidraw/data/json.d.ts +2 -7
  37. package/dist/types/excalidraw/data/restore.d.ts +1 -2
  38. package/dist/types/excalidraw/data/types.d.ts +1 -16
  39. package/dist/types/excalidraw/types.d.ts +3 -30
  40. package/package.json +1 -1
  41. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +0 -512
  42. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +0 -19
  43. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +0 -19
  44. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +0 -2
  45. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +0 -24
  46. package/dist/types/excalidraw/components/ConfirmDialog.d.ts +0 -10
  47. package/dist/types/excalidraw/components/LibraryMenu.d.ts +0 -10
  48. package/dist/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +0 -7
  49. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +0 -9
  50. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +0 -17
  51. package/dist/types/excalidraw/components/LibraryMenuItems.d.ts +0 -14
  52. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +0 -23
  53. package/dist/types/excalidraw/components/LibraryUnit.d.ts +0 -14
  54. package/dist/types/excalidraw/components/PublishLibrary.d.ts +0 -17
  55. package/dist/types/excalidraw/data/EditorLocalStorage.d.ts +0 -8
  56. package/dist/types/excalidraw/data/library.d.ts +0 -127
  57. package/dist/types/excalidraw/deburr.d.ts +0 -1
  58. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +0 -11
  59. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +0 -1
  60. package/dist/types/excalidraw/hooks/useStableCallback.d.ts +0 -4
  61. package/dist/types/excalidraw/hooks/useTransition.d.ts +0 -2
@@ -9,7 +9,6 @@ import type { Action } from "./actions/types";
9
9
  import type { Spreadsheet } from "./charts";
10
10
  import type { ClipboardData } from "./clipboard";
11
11
  import type App from "./components/App";
12
- import type Library from "./data/library";
13
12
  import type { ContextMenuItems } from "./components/ContextMenu";
14
13
  import type { SnapLine } from "./snapping";
15
14
  import type { ImportedDataState } from "./data/types";
@@ -322,8 +321,6 @@ export interface AppState {
322
321
  } | null;
323
322
  openDialog: null | {
324
323
  name: "imageExport" | "help" | "jsonExport";
325
- } | {
326
- name: "commandPalette";
327
324
  } | {
328
325
  name: "settings";
329
326
  } | {
@@ -446,26 +443,7 @@ export declare class GestureEvent extends UIEvent {
446
443
  readonly rotation: number;
447
444
  readonly scale: number;
448
445
  }
449
- /** @deprecated legacy: do not use outside of migration paths */
450
- export type LibraryItem_v1 = readonly NonDeleted<ExcalidrawElement>[];
451
- /** @deprecated legacy: do not use outside of migration paths */
452
- type LibraryItems_v1 = readonly LibraryItem_v1[];
453
- /** v2 library item */
454
- export type LibraryItem = {
455
- id: string;
456
- status: "published" | "unpublished";
457
- elements: readonly NonDeleted<ExcalidrawElement>[];
458
- /** timestamp in epoch (ms) */
459
- created: number;
460
- name?: string;
461
- error?: string;
462
- };
463
- export type LibraryItems = readonly LibraryItem[];
464
- export type LibraryItems_anyVersion = LibraryItems | LibraryItems_v1;
465
- export type LibraryItemsSource = ((currentLibraryItems: LibraryItems) => MaybePromise<LibraryItems_anyVersion | Blob>) | MaybePromise<LibraryItems_anyVersion | Blob>;
466
- export type ExcalidrawInitialDataState = Merge<ImportedDataState, {
467
- libraryItems?: MaybePromise<Required<ImportedDataState>["libraryItems"]>;
468
- }>;
446
+ export type ExcalidrawInitialDataState = ImportedDataState;
469
447
  export type OnUserFollowedPayload = {
470
448
  userToFollow: UserToFollow;
471
449
  action: "FOLLOW" | "UNFOLLOW";
@@ -521,8 +499,7 @@ export interface ExcalidrawProps {
521
499
  * Called when element(s) are duplicated so you can listen or modify as
522
500
  * needed.
523
501
  *
524
- * Called when duplicating via mouse-drag, keyboard, paste, library insert
525
- * etc.
502
+ * Called when duplicating via mouse-drag, keyboard, paste, etc.
526
503
  *
527
504
  * Returned elements will be used in place of the next elements
528
505
  * (you should return all elements, including deleted, and not mutate
@@ -538,7 +515,6 @@ export interface ExcalidrawProps {
538
515
  zenModeEnabled?: boolean;
539
516
  gridModeEnabled?: boolean;
540
517
  objectsSnapModeEnabled?: boolean;
541
- libraryReturnUrl?: string;
542
518
  theme?: Theme;
543
519
  name?: string;
544
520
  renderCustomStats?: (elements: readonly NonDeletedExcalidrawElement[], appState: UIAppState) => JSX.Element;
@@ -547,7 +523,6 @@ export interface ExcalidrawProps {
547
523
  UIOptions?: Partial<UIOptions>;
548
524
  detectScroll?: boolean;
549
525
  handleKeyboardGlobally?: boolean;
550
- onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
551
526
  autoFocus?: boolean;
552
527
  compressImageFile: CompressImageFile;
553
528
  generateIdForFile?: (file: File) => string | Promise<string>;
@@ -647,7 +622,6 @@ export type AppClassProperties = {
647
622
  /** static canvas */
648
623
  canvas: HTMLCanvasElement;
649
624
  focusContainer(): void;
650
- library: Library;
651
625
  imageCache: Map<FileId, {
652
626
  image: HTMLImageElement | Promise<HTMLImageElement>;
653
627
  mimeType: ValueOf<typeof IMAGE_MIME_TYPES>;
@@ -665,7 +639,7 @@ export type AppClassProperties = {
665
639
  scrollToViewport: App["scrollToViewport"];
666
640
  scrollToContent: App["scrollToContent"];
667
641
  addFiles: App["addFiles"];
668
- addElementsFromPasteOrLibrary: App["addElementsFromPasteOrLibrary"];
642
+ addElementsFromPaste: App["addElementsFromPaste"];
669
643
  togglePenMode: App["togglePenMode"];
670
644
  toggleLock: App["toggleLock"];
671
645
  setActiveTool: App["setActiveTool"];
@@ -764,7 +738,6 @@ export interface ExcalidrawImperativeAPI {
764
738
  updateScene: InstanceType<typeof App>["updateScene"];
765
739
  applyDeltas: InstanceType<typeof App>["applyDeltas"];
766
740
  mutateElement: InstanceType<typeof App>["mutateElement"];
767
- updateLibrary: InstanceType<typeof Library>["updateLibrary"];
768
741
  resetScene: InstanceType<typeof App>["resetScene"];
769
742
  getSceneElementsIncludingDeleted: InstanceType<typeof App>["getSceneElementsIncludingDeleted"];
770
743
  getSceneElementsMapIncludingDeleted: InstanceType<typeof App>["getSceneElementsMapIncludingDeleted"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myoc/common",
3
- "version": "0.19.510",
3
+ "version": "0.19.511",
4
4
  "type": "module",
5
5
  "types": "./dist/types/common/src/index.d.ts",
6
6
  "main": "./dist/prod/index.js",
@@ -1,512 +0,0 @@
1
- export declare const actionAddToLibrary: {
2
- name: "addToLibrary";
3
- trackEvent: {
4
- category: "element";
5
- };
6
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => Promise<{
7
- captureUpdate: "EVENTUALLY";
8
- appState: {
9
- toast: {
10
- message: string;
11
- };
12
- contextMenu: {
13
- items: import("../components/ContextMenu").ContextMenuItems;
14
- top: number;
15
- left: number;
16
- } | null;
17
- showWelcomeScreen: boolean;
18
- isLoading: boolean;
19
- myocSimplifiedMode: boolean;
20
- dontResizeLimitMBs: number;
21
- hideMainMenus: boolean;
22
- wheelZoomsOnDefault?: boolean;
23
- arrangeConfiguration: {
24
- algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
25
- gap: number;
26
- };
27
- normaliseConfiguration: {
28
- mode: import("../types").NormaliseMode;
29
- metric: import("../types").NormaliseMetric;
30
- };
31
- errorMessage: React.ReactNode;
32
- activeEmbeddable: {
33
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
34
- state: "hover" | "active";
35
- } | null;
36
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
37
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
38
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
39
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
40
- isBindingEnabled: boolean;
41
- boxSelectionMode: import("../types").BoxSelectionMode;
42
- bindingPreference: "enabled" | "disabled";
43
- isMidpointSnappingEnabled: boolean;
44
- suggestedBinding: {
45
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
46
- midPoint?: import("@excalidraw/math").GlobalPoint;
47
- } | null;
48
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
49
- frameRendering: {
50
- enabled: boolean;
51
- name: boolean;
52
- outline: boolean;
53
- clip: boolean;
54
- };
55
- editingFrame: string | null;
56
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
57
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
58
- activeTool: {
59
- lastActiveTool: import("../types").ActiveTool | null;
60
- locked: boolean;
61
- fromSelection: boolean;
62
- } & import("../types").ActiveTool;
63
- preferredSelectionTool: {
64
- type: "selection" | "lasso";
65
- initialized: boolean;
66
- };
67
- penMode: boolean;
68
- penDetected: boolean;
69
- exportBackground: boolean;
70
- exportEmbedScene: boolean;
71
- exportWithDarkMode: boolean;
72
- exportScale: number;
73
- currentItemStrokeColor: string;
74
- currentItemBackgroundColor: string;
75
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
76
- currentItemStrokeWidth: number;
77
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
78
- currentItemRoughness: number;
79
- currentItemOpacity: number;
80
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
81
- currentItemFontSize: number;
82
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
83
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
84
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
85
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
86
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
87
- currentItemArrowType: "sharp" | "round" | "elbow";
88
- viewBackgroundColor: string;
89
- scrollX: number;
90
- scrollY: number;
91
- cursorButton: "up" | "down";
92
- scrolledOutside: boolean;
93
- name: string | null;
94
- isResizing: boolean;
95
- isRotating: boolean;
96
- zoom: import("../types").Zoom;
97
- openMenu: "canvas" | null;
98
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
99
- openSidebar: {
100
- name: import("../types").SidebarName;
101
- tab?: import("../types").SidebarTabName;
102
- } | null;
103
- openDialog: null | {
104
- name: "imageExport" | "help" | "jsonExport";
105
- } | {
106
- name: "commandPalette";
107
- } | {
108
- name: "settings";
109
- } | {
110
- name: "elementLinkSelector";
111
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
112
- } | {
113
- name: "charts";
114
- data: import("../charts").Spreadsheet;
115
- rawText: string;
116
- };
117
- defaultSidebarDockedPreference: boolean;
118
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
119
- selectedElementIds: Readonly<{
120
- [id: string]: true;
121
- }>;
122
- hoveredElementIds: Readonly<{
123
- [id: string]: true;
124
- }>;
125
- previousSelectedElementIds: {
126
- [id: string]: true;
127
- };
128
- selectedElementsAreBeingDragged: boolean;
129
- shouldCacheIgnoreZoom: boolean;
130
- zenModeEnabled: boolean;
131
- theme: import("@excalidraw/element/types").Theme;
132
- gridSize: number;
133
- gridStep: number;
134
- gridModeEnabled: boolean;
135
- viewModeEnabled: boolean;
136
- selectedGroupIds: {
137
- [groupId: string]: boolean;
138
- };
139
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
140
- width: number;
141
- height: number;
142
- offsetTop: number;
143
- offsetLeft: number;
144
- fileHandle: FileSystemFileHandle | null;
145
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
146
- stats: {
147
- open: boolean;
148
- panels: number;
149
- };
150
- showHyperlinkPopup: false | "info" | "editor";
151
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
152
- snapLines: readonly import("../snapping").SnapLine[];
153
- originSnapOffset: {
154
- x: number;
155
- y: number;
156
- } | null;
157
- objectsSnapModeEnabled: boolean;
158
- userToFollow: import("../types").UserToFollow | null;
159
- followedBy: Set<import("../types").SocketId>;
160
- isCropping: boolean;
161
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
162
- searchMatches: Readonly<{
163
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
164
- matches: readonly import("../types").SearchMatch[];
165
- }> | null;
166
- activeLockedId: string | null;
167
- lockedMultiSelections: {
168
- [groupId: string]: true;
169
- };
170
- bindMode: import("@excalidraw/element/types").BindMode;
171
- };
172
- } | {
173
- captureUpdate: "EVENTUALLY";
174
- appState: {
175
- errorMessage: any;
176
- contextMenu: {
177
- items: import("../components/ContextMenu").ContextMenuItems;
178
- top: number;
179
- left: number;
180
- } | null;
181
- showWelcomeScreen: boolean;
182
- isLoading: boolean;
183
- myocSimplifiedMode: boolean;
184
- dontResizeLimitMBs: number;
185
- hideMainMenus: boolean;
186
- wheelZoomsOnDefault?: boolean;
187
- arrangeConfiguration: {
188
- algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
189
- gap: number;
190
- };
191
- normaliseConfiguration: {
192
- mode: import("../types").NormaliseMode;
193
- metric: import("../types").NormaliseMetric;
194
- };
195
- activeEmbeddable: {
196
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
197
- state: "hover" | "active";
198
- } | null;
199
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
200
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
201
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
202
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
203
- isBindingEnabled: boolean;
204
- boxSelectionMode: import("../types").BoxSelectionMode;
205
- bindingPreference: "enabled" | "disabled";
206
- isMidpointSnappingEnabled: boolean;
207
- suggestedBinding: {
208
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
209
- midPoint?: import("@excalidraw/math").GlobalPoint;
210
- } | null;
211
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
212
- frameRendering: {
213
- enabled: boolean;
214
- name: boolean;
215
- outline: boolean;
216
- clip: boolean;
217
- };
218
- editingFrame: string | null;
219
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
220
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
221
- activeTool: {
222
- lastActiveTool: import("../types").ActiveTool | null;
223
- locked: boolean;
224
- fromSelection: boolean;
225
- } & import("../types").ActiveTool;
226
- preferredSelectionTool: {
227
- type: "selection" | "lasso";
228
- initialized: boolean;
229
- };
230
- penMode: boolean;
231
- penDetected: boolean;
232
- exportBackground: boolean;
233
- exportEmbedScene: boolean;
234
- exportWithDarkMode: boolean;
235
- exportScale: number;
236
- currentItemStrokeColor: string;
237
- currentItemBackgroundColor: string;
238
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
239
- currentItemStrokeWidth: number;
240
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
241
- currentItemRoughness: number;
242
- currentItemOpacity: number;
243
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
244
- currentItemFontSize: number;
245
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
246
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
247
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
248
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
249
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
250
- currentItemArrowType: "sharp" | "round" | "elbow";
251
- viewBackgroundColor: string;
252
- scrollX: number;
253
- scrollY: number;
254
- cursorButton: "up" | "down";
255
- scrolledOutside: boolean;
256
- name: string | null;
257
- isResizing: boolean;
258
- isRotating: boolean;
259
- zoom: import("../types").Zoom;
260
- openMenu: "canvas" | null;
261
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
262
- openSidebar: {
263
- name: import("../types").SidebarName;
264
- tab?: import("../types").SidebarTabName;
265
- } | null;
266
- openDialog: null | {
267
- name: "imageExport" | "help" | "jsonExport";
268
- } | {
269
- name: "commandPalette";
270
- } | {
271
- name: "settings";
272
- } | {
273
- name: "elementLinkSelector";
274
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
275
- } | {
276
- name: "charts";
277
- data: import("../charts").Spreadsheet;
278
- rawText: string;
279
- };
280
- defaultSidebarDockedPreference: boolean;
281
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
282
- selectedElementIds: Readonly<{
283
- [id: string]: true;
284
- }>;
285
- hoveredElementIds: Readonly<{
286
- [id: string]: true;
287
- }>;
288
- previousSelectedElementIds: {
289
- [id: string]: true;
290
- };
291
- selectedElementsAreBeingDragged: boolean;
292
- shouldCacheIgnoreZoom: boolean;
293
- toast: {
294
- message: React.ReactNode;
295
- closable?: boolean;
296
- duration?: number;
297
- } | null;
298
- zenModeEnabled: boolean;
299
- theme: import("@excalidraw/element/types").Theme;
300
- gridSize: number;
301
- gridStep: number;
302
- gridModeEnabled: boolean;
303
- viewModeEnabled: boolean;
304
- selectedGroupIds: {
305
- [groupId: string]: boolean;
306
- };
307
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
308
- width: number;
309
- height: number;
310
- offsetTop: number;
311
- offsetLeft: number;
312
- fileHandle: FileSystemFileHandle | null;
313
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
314
- stats: {
315
- open: boolean;
316
- panels: number;
317
- };
318
- showHyperlinkPopup: false | "info" | "editor";
319
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
320
- snapLines: readonly import("../snapping").SnapLine[];
321
- originSnapOffset: {
322
- x: number;
323
- y: number;
324
- } | null;
325
- objectsSnapModeEnabled: boolean;
326
- userToFollow: import("../types").UserToFollow | null;
327
- followedBy: Set<import("../types").SocketId>;
328
- isCropping: boolean;
329
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
330
- searchMatches: Readonly<{
331
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
332
- matches: readonly import("../types").SearchMatch[];
333
- }> | null;
334
- activeLockedId: string | null;
335
- lockedMultiSelections: {
336
- [groupId: string]: true;
337
- };
338
- bindMode: import("@excalidraw/element/types").BindMode;
339
- };
340
- }> | {
341
- captureUpdate: "EVENTUALLY";
342
- appState: {
343
- errorMessage: string;
344
- contextMenu: {
345
- items: import("../components/ContextMenu").ContextMenuItems;
346
- top: number;
347
- left: number;
348
- } | null;
349
- showWelcomeScreen: boolean;
350
- isLoading: boolean;
351
- myocSimplifiedMode: boolean;
352
- dontResizeLimitMBs: number;
353
- hideMainMenus: boolean;
354
- wheelZoomsOnDefault?: boolean;
355
- arrangeConfiguration: {
356
- algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
357
- gap: number;
358
- };
359
- normaliseConfiguration: {
360
- mode: import("../types").NormaliseMode;
361
- metric: import("../types").NormaliseMetric;
362
- };
363
- activeEmbeddable: {
364
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
365
- state: "hover" | "active";
366
- } | null;
367
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
368
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
369
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
370
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
371
- isBindingEnabled: boolean;
372
- boxSelectionMode: import("../types").BoxSelectionMode;
373
- bindingPreference: "enabled" | "disabled";
374
- isMidpointSnappingEnabled: boolean;
375
- suggestedBinding: {
376
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
377
- midPoint?: import("@excalidraw/math").GlobalPoint;
378
- } | null;
379
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
380
- frameRendering: {
381
- enabled: boolean;
382
- name: boolean;
383
- outline: boolean;
384
- clip: boolean;
385
- };
386
- editingFrame: string | null;
387
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
388
- editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
389
- activeTool: {
390
- lastActiveTool: import("../types").ActiveTool | null;
391
- locked: boolean;
392
- fromSelection: boolean;
393
- } & import("../types").ActiveTool;
394
- preferredSelectionTool: {
395
- type: "selection" | "lasso";
396
- initialized: boolean;
397
- };
398
- penMode: boolean;
399
- penDetected: boolean;
400
- exportBackground: boolean;
401
- exportEmbedScene: boolean;
402
- exportWithDarkMode: boolean;
403
- exportScale: number;
404
- currentItemStrokeColor: string;
405
- currentItemBackgroundColor: string;
406
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
407
- currentItemStrokeWidth: number;
408
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
409
- currentItemRoughness: number;
410
- currentItemOpacity: number;
411
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
412
- currentItemFontSize: number;
413
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
414
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
415
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
416
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
417
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
418
- currentItemArrowType: "sharp" | "round" | "elbow";
419
- viewBackgroundColor: string;
420
- scrollX: number;
421
- scrollY: number;
422
- cursorButton: "up" | "down";
423
- scrolledOutside: boolean;
424
- name: string | null;
425
- isResizing: boolean;
426
- isRotating: boolean;
427
- zoom: import("../types").Zoom;
428
- openMenu: "canvas" | null;
429
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
430
- openSidebar: {
431
- name: import("../types").SidebarName;
432
- tab?: import("../types").SidebarTabName;
433
- } | null;
434
- openDialog: null | {
435
- name: "imageExport" | "help" | "jsonExport";
436
- } | {
437
- name: "commandPalette";
438
- } | {
439
- name: "settings";
440
- } | {
441
- name: "elementLinkSelector";
442
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
443
- } | {
444
- name: "charts";
445
- data: import("../charts").Spreadsheet;
446
- rawText: string;
447
- };
448
- defaultSidebarDockedPreference: boolean;
449
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
450
- selectedElementIds: Readonly<{
451
- [id: string]: true;
452
- }>;
453
- hoveredElementIds: Readonly<{
454
- [id: string]: true;
455
- }>;
456
- previousSelectedElementIds: {
457
- [id: string]: true;
458
- };
459
- selectedElementsAreBeingDragged: boolean;
460
- shouldCacheIgnoreZoom: boolean;
461
- toast: {
462
- message: React.ReactNode;
463
- closable?: boolean;
464
- duration?: number;
465
- } | null;
466
- zenModeEnabled: boolean;
467
- theme: import("@excalidraw/element/types").Theme;
468
- gridSize: number;
469
- gridStep: number;
470
- gridModeEnabled: boolean;
471
- viewModeEnabled: boolean;
472
- selectedGroupIds: {
473
- [groupId: string]: boolean;
474
- };
475
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
476
- width: number;
477
- height: number;
478
- offsetTop: number;
479
- offsetLeft: number;
480
- fileHandle: FileSystemFileHandle | null;
481
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
482
- stats: {
483
- open: boolean;
484
- panels: number;
485
- };
486
- showHyperlinkPopup: false | "info" | "editor";
487
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
488
- snapLines: readonly import("../snapping").SnapLine[];
489
- originSnapOffset: {
490
- x: number;
491
- y: number;
492
- } | null;
493
- objectsSnapModeEnabled: boolean;
494
- userToFollow: import("../types").UserToFollow | null;
495
- followedBy: Set<import("../types").SocketId>;
496
- isCropping: boolean;
497
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
498
- searchMatches: Readonly<{
499
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
500
- matches: readonly import("../types").SearchMatch[];
501
- }> | null;
502
- activeLockedId: string | null;
503
- lockedMultiSelections: {
504
- [groupId: string]: true;
505
- };
506
- bindMode: import("@excalidraw/element/types").BindMode;
507
- };
508
- };
509
- label: string;
510
- } & {
511
- keyTest?: undefined;
512
- };
@@ -1,19 +0,0 @@
1
- import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- export declare const actionToggleShapeSwitch: {
3
- name: "toggleShapeSwitch";
4
- label: string;
5
- icon: () => null;
6
- viewMode: true;
7
- trackEvent: {
8
- category: "shape_switch";
9
- action: string;
10
- };
11
- keywords: string[];
12
- perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties): {
13
- captureUpdate: "NEVER";
14
- };
15
- checked: (appState: Readonly<import("../types").AppState>) => boolean;
16
- predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, props: import("../types").ExcalidrawProps) => boolean;
17
- } & {
18
- keyTest?: undefined;
19
- };
@@ -1,19 +0,0 @@
1
- import * as defaultItems from "./defaultCommandPaletteItems";
2
- import "./CommandPalette.scss";
3
- import type { CommandPaletteItem } from "./types";
4
- export declare const DEFAULT_CATEGORIES: {
5
- app: string;
6
- export: string;
7
- tools: string;
8
- editor: string;
9
- elements: string;
10
- links: string;
11
- library: string;
12
- };
13
- type CommandPaletteProps = {
14
- customCommandPaletteItems?: CommandPaletteItem[];
15
- };
16
- export declare const CommandPalette: ((props: CommandPaletteProps) => import("react/jsx-runtime").JSX.Element | null) & {
17
- defaultItems: typeof defaultItems;
18
- };
19
- export {};
@@ -1,2 +0,0 @@
1
- import type { CommandPaletteItem } from "./types";
2
- export declare const toggleTheme: CommandPaletteItem;