@zsviczian/excalidraw 0.18.0-53 → 0.18.0-55

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 (67) hide show
  1. package/dist/excalidraw.development.js +56 -56
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +2 -2
  4. package/types/common/src/commonObsidianUtils.d.ts +6 -0
  5. package/types/common/src/constants.d.ts +1 -0
  6. package/types/common/src/editorInterface.d.ts +1 -1
  7. package/types/common/src/index.d.ts +1 -0
  8. package/types/common/src/utils.d.ts +7 -2
  9. package/types/common/src/visualdebug.d.ts +1 -1
  10. package/types/element/src/binding.d.ts +55 -44
  11. package/types/element/src/collision.d.ts +6 -2
  12. package/types/element/src/index.d.ts +0 -3
  13. package/types/element/src/linearElementEditor.d.ts +15 -18
  14. package/types/element/src/renderElement.d.ts +1 -1
  15. package/types/element/src/typeChecks.d.ts +2 -3
  16. package/types/element/src/types.d.ts +7 -11
  17. package/types/element/src/utils.d.ts +2 -1
  18. package/types/element/src/zindex.d.ts +7 -1
  19. package/types/excalidraw/actions/actionAddToLibrary.d.ts +16 -7
  20. package/types/excalidraw/actions/actionAlign.d.ts +6 -6
  21. package/types/excalidraw/actions/actionBoundText.d.ts +13 -7
  22. package/types/excalidraw/actions/actionCanvas.d.ts +91 -286
  23. package/types/excalidraw/actions/actionClipboard.d.ts +34 -941
  24. package/types/excalidraw/actions/actionCropEditor.d.ts +6 -3
  25. package/types/excalidraw/actions/actionDeleteSelected.d.ts +23 -16
  26. package/types/excalidraw/actions/actionDistribute.d.ts +2 -2
  27. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
  28. package/types/excalidraw/actions/actionElementLink.d.ts +4 -3
  29. package/types/excalidraw/actions/actionElementLock.d.ts +11 -5
  30. package/types/excalidraw/actions/actionEmbeddable.d.ts +6 -3
  31. package/types/excalidraw/actions/actionExport.d.ts +43 -1149
  32. package/types/excalidraw/actions/actionFinalize.d.ts +10 -688
  33. package/types/excalidraw/actions/actionFlip.d.ts +2 -2
  34. package/types/excalidraw/actions/actionFrame.d.ts +26 -16
  35. package/types/excalidraw/actions/actionGroup.d.ts +12 -6
  36. package/types/excalidraw/actions/actionLinearEditor.d.ts +15 -16
  37. package/types/excalidraw/actions/actionLink.d.ts +5 -2
  38. package/types/excalidraw/actions/actionMenu.d.ts +3 -2
  39. package/types/excalidraw/actions/actionNavigate.d.ts +21 -445
  40. package/types/excalidraw/actions/actionProperties.d.ts +79 -2968
  41. package/types/excalidraw/actions/actionSelectAll.d.ts +6 -3
  42. package/types/excalidraw/actions/actionStyles.d.ts +7 -4
  43. package/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  44. package/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -2
  45. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
  46. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +3 -2
  47. package/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  48. package/types/excalidraw/actions/actionToggleStats.d.ts +5 -2
  49. package/types/excalidraw/actions/actionToggleViewMode.d.ts +6 -3
  50. package/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
  51. package/types/excalidraw/actions/actionTrayMenu.d.ts +5 -2
  52. package/types/excalidraw/actions/actionZindex.d.ts +2 -2
  53. package/types/excalidraw/actions/manager.d.ts +1 -1
  54. package/types/excalidraw/actions/register.d.ts +1 -1
  55. package/types/excalidraw/actions/types.d.ts +3 -3
  56. package/types/excalidraw/appState.d.ts +4 -3
  57. package/types/excalidraw/components/App.d.ts +7 -3
  58. package/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
  59. package/types/excalidraw/components/Stats/utils.d.ts +1 -1
  60. package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +1 -1
  61. package/types/excalidraw/data/restore.d.ts +3 -3
  62. package/types/excalidraw/index.d.ts +3 -3
  63. package/types/excalidraw/obsidianUtils.d.ts +0 -5
  64. package/types/excalidraw/renderer/helpers.d.ts +1 -5
  65. package/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
  66. package/types/excalidraw/scene/types.d.ts +4 -0
  67. package/types/excalidraw/types.d.ts +15 -5
@@ -45,6 +45,10 @@ export type InteractiveCanvasRenderConfig = {
45
45
  remotePointerUsernames: Map<SocketId, string>;
46
46
  remotePointerButton: Map<SocketId, string | undefined>;
47
47
  selectionColor: string;
48
+ lastViewportPosition: {
49
+ x: number;
50
+ y: number;
51
+ };
48
52
  renderScrollbars?: boolean;
49
53
  };
50
54
  export type RenderInteractiveSceneCallback = {
@@ -1,8 +1,7 @@
1
1
  import type { IMAGE_MIME_TYPES, UserIdleState, throttleRAF, MIME_TYPES, ColorPaletteCustom, EditorInterface } from "@excalidraw/common";
2
- import type { SuggestedBinding } from "@excalidraw/element";
3
2
  import type { LinearElementEditor } from "@excalidraw/element";
4
3
  import type { MaybeTransformHandleType } from "@excalidraw/element";
5
- import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, ExcalidrawTextElement, FileId, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement } from "@excalidraw/element/types";
4
+ import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, ExcalidrawTextElement, FileId, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement, BindMode } from "@excalidraw/element/types";
6
5
  import type { Merge, MaybePromise, ValueOf, MakeBrand } from "@excalidraw/common/utility-types";
7
6
  import type { CaptureUpdateActionType, DurableIncrement, EphemeralIncrement } from "@excalidraw/element";
8
7
  import type { Action } from "./actions/types";
@@ -129,6 +128,7 @@ export type StaticCanvasAppState = Readonly<_CommonCanvasAppState & {
129
128
  frameColor: AppState["frameColor"];
130
129
  currentHoveredFontFamily: AppState["currentHoveredFontFamily"];
131
130
  hoveredElementIds: AppState["hoveredElementIds"];
131
+ suggestedBinding: AppState["suggestedBinding"];
132
132
  croppingElementId: AppState["croppingElementId"];
133
133
  }>;
134
134
  export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
@@ -137,8 +137,9 @@ export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
137
137
  selectedGroupIds: AppState["selectedGroupIds"];
138
138
  selectedLinearElement: AppState["selectedLinearElement"];
139
139
  multiElement: AppState["multiElement"];
140
+ newElement: AppState["newElement"];
140
141
  isBindingEnabled: AppState["isBindingEnabled"];
141
- suggestedBindings: AppState["suggestedBindings"];
142
+ suggestedBinding: AppState["suggestedBinding"];
142
143
  isRotating: AppState["isRotating"];
143
144
  elementsToHighlight: AppState["elementsToHighlight"];
144
145
  collaborators: AppState["collaborators"];
@@ -152,6 +153,11 @@ export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
152
153
  croppingElementId: AppState["croppingElementId"];
153
154
  searchMatches: AppState["searchMatches"];
154
155
  activeLockedId: AppState["activeLockedId"];
156
+ hoveredElementIds: AppState["hoveredElementIds"];
157
+ frameRendering: AppState["frameRendering"];
158
+ frameColor: AppState["frameColor"];
159
+ shouldCacheIgnoreZoom: AppState["shouldCacheIgnoreZoom"];
160
+ exportScale: AppState["exportScale"];
155
161
  }>;
156
162
  export type ObservedAppState = ObservedStandaloneAppState & ObservedElementsAppState;
157
163
  export type ObservedStandaloneAppState = {
@@ -205,7 +211,7 @@ export interface AppState {
205
211
  selectionElement: NonDeletedExcalidrawElement | null;
206
212
  isBindingEnabled: boolean;
207
213
  startBoundElement: NonDeleted<ExcalidrawBindableElement> | null;
208
- suggestedBindings: SuggestedBinding[];
214
+ suggestedBinding: NonDeleted<ExcalidrawBindableElement> | null;
209
215
  frameToHighlight: NonDeleted<ExcalidrawFrameLikeElement> | null;
210
216
  frameRendering: {
211
217
  enabled: boolean;
@@ -278,6 +284,8 @@ export interface AppState {
278
284
  tab: "text-to-diagram" | "mermaid";
279
285
  } | {
280
286
  name: "commandPalette";
287
+ } | {
288
+ name: "settings";
281
289
  } | {
282
290
  name: "elementLinkSelector";
283
291
  sourceElementId: ExcalidrawElement["id"];
@@ -401,6 +409,7 @@ export interface AppState {
401
409
  lockedMultiSelections: {
402
410
  [groupId: string]: true;
403
411
  };
412
+ bindMode: BindMode;
404
413
  }
405
414
  export type SearchMatch = {
406
415
  id: string;
@@ -413,7 +422,7 @@ export type SearchMatch = {
413
422
  showOnCanvas: boolean;
414
423
  }[];
415
424
  };
416
- export type UIAppState = Omit<AppState, "suggestedBindings" | "startBoundElement" | "cursorButton" | "scrollX" | "scrollY">;
425
+ export type UIAppState = Omit<AppState, "startBoundElement" | "cursorButton" | "scrollX" | "scrollY">;
417
426
  export type NormalizedZoomValue = number & {
418
427
  _brand: "normalizedZoom";
419
428
  };
@@ -632,6 +641,7 @@ export type AppClassProperties = {
632
641
  onPointerUpEmitter: App["onPointerUpEmitter"];
633
642
  updateEditorAtom: App["updateEditorAtom"];
634
643
  onPointerDownEmitter: App["onPointerDownEmitter"];
644
+ bindModeHandler: App["bindModeHandler"];
635
645
  };
636
646
  export type PointerDownState = Readonly<{
637
647
  origin: Readonly<{