@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
@@ -0,0 +1,10 @@
1
+ export declare const isMermaidParseSyntaxError: (message: string) => boolean;
2
+ export declare const isMermaidAutoFixableError: (message: string) => boolean;
3
+ export declare const isMermaidCaretLine: (line: string) => boolean;
4
+ export declare const getMermaidInactiveParticipant: (message: string) => string | null;
5
+ export declare const getMermaidErrorLineNumber: (message: string, sourceText?: string) => number | null;
6
+ export declare const getMermaidSyntaxErrorGuidance: (message: string, sourceText?: string) => {
7
+ summary: string;
8
+ likelyCauses: string[];
9
+ } | null;
10
+ export declare const formatMermaidParseErrorMessage: (message: string) => string;
@@ -1,9 +1,13 @@
1
1
  import "./Toast.scss";
2
- import type { CSSProperties } from "react";
3
- export declare const Toast: ({ message, onClose, closable, duration, style, }: {
4
- message: string;
2
+ import type { CSSProperties, ReactNode } from "react";
3
+ export declare const Toast: (({ message, onClose, closable, duration, style, }: {
4
+ message: ReactNode;
5
5
  onClose: () => void;
6
6
  closable?: boolean;
7
7
  duration?: number;
8
8
  style?: CSSProperties;
9
- }) => import("react/jsx-runtime").JSX.Element;
9
+ }) => import("react/jsx-runtime").JSX.Element) & {
10
+ ProgressBar: ({ progress }: {
11
+ progress: number;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ };
@@ -11,7 +11,7 @@ type InteractiveCanvasProps = {
11
11
  visibleElements: readonly NonDeletedExcalidrawElement[];
12
12
  selectedElements: readonly NonDeletedExcalidrawElement[];
13
13
  allElementsMap: NonDeletedSceneElementsMap;
14
- sceneNonce: number | undefined;
14
+ canvasNonce: string;
15
15
  selectionNonce: number | undefined;
16
16
  scale: number;
17
17
  appState: InteractiveCanvasAppState;
@@ -21,6 +21,7 @@ type InteractiveCanvasProps = {
21
21
  renderInteractiveSceneCallback: (data: RenderInteractiveSceneCallback) => void;
22
22
  handleCanvasRef: (canvas: HTMLCanvasElement | null) => void;
23
23
  onContextMenu: Exclude<DOMAttributes<HTMLCanvasElement | HTMLDivElement>["onContextMenu"], undefined>;
24
+ onClick: Exclude<DOMAttributes<HTMLCanvasElement>["onClick"], undefined>;
24
25
  onPointerMove: Exclude<DOMAttributes<HTMLCanvasElement>["onPointerMove"], undefined>;
25
26
  onPointerUp: Exclude<DOMAttributes<HTMLCanvasElement>["onPointerUp"], undefined>;
26
27
  onPointerCancel: Exclude<DOMAttributes<HTMLCanvasElement>["onPointerCancel"], undefined>;
@@ -4,6 +4,7 @@ import type { AppState } from "../../types";
4
4
  import type { RoughCanvas } from "roughjs/bin/canvas";
5
5
  interface NewElementCanvasProps {
6
6
  appState: AppState;
7
+ newElement: NonNullable<AppState["newElement"]>;
7
8
  elementsMap: RenderableElementsMap;
8
9
  allElementsMap: NonDeletedSceneElementsMap;
9
10
  scale: number;
@@ -9,7 +9,7 @@ type StaticCanvasProps = {
9
9
  elementsMap: RenderableElementsMap;
10
10
  allElementsMap: NonDeletedSceneElementsMap;
11
11
  visibleElements: readonly NonDeletedExcalidrawElement[];
12
- sceneNonce: number | undefined;
12
+ canvasNonce: string;
13
13
  selectionNonce: number | undefined;
14
14
  scale: number;
15
15
  appState: StaticCanvasAppState;
@@ -9,9 +9,10 @@ type Props<T> = {
9
9
  onChange: (value: T) => void;
10
10
  children: React.ReactNode;
11
11
  name: string;
12
+ icon?: React.ReactNode;
12
13
  };
13
14
  declare const DropdownMenuItemContentRadio: {
14
- <T>({ value, shortcut, onChange, choices, children, name, }: Props<T>): import("react/jsx-runtime").JSX.Element;
15
+ <T>({ value, shortcut, onChange, choices, children, name, icon, }: Props<T>): import("react/jsx-runtime").JSX.Element;
15
16
  displayName: string;
16
17
  };
17
18
  export default DropdownMenuItemContentRadio;
@@ -114,6 +114,8 @@ export declare const StrokeStyleDottedIcon: import("react/jsx-runtime").JSX.Elem
114
114
  export declare const SloppinessArchitectIcon: import("react/jsx-runtime").JSX.Element;
115
115
  export declare const SloppinessArtistIcon: import("react/jsx-runtime").JSX.Element;
116
116
  export declare const SloppinessCartoonistIcon: import("react/jsx-runtime").JSX.Element;
117
+ export declare const strokeVariabilityConstantIcon: import("react/jsx-runtime").JSX.Element;
118
+ export declare const strokeVariabilityVariableIcon: import("react/jsx-runtime").JSX.Element;
117
119
  export declare const EdgeSharpIcon: import("react/jsx-runtime").JSX.Element;
118
120
  export declare const EdgeRoundIcon: import("react/jsx-runtime").JSX.Element;
119
121
  export declare const ArrowheadNoneIcon: React.MemoExoticComponent<({ flip }: {
@@ -122,34 +124,43 @@ export declare const ArrowheadNoneIcon: React.MemoExoticComponent<({ flip }: {
122
124
  export declare const ArrowheadArrowIcon: React.MemoExoticComponent<({ flip }: {
123
125
  flip?: boolean;
124
126
  }) => import("react/jsx-runtime").JSX.Element>;
127
+ export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ flip }: {
128
+ flip?: boolean;
129
+ }) => import("react/jsx-runtime").JSX.Element>;
130
+ export declare const ArrowheadTriangleOutlineIcon: React.MemoExoticComponent<({ flip }: {
131
+ flip?: boolean;
132
+ }) => import("react/jsx-runtime").JSX.Element>;
125
133
  export declare const ArrowheadCircleIcon: React.MemoExoticComponent<({ flip }: {
126
134
  flip?: boolean;
127
135
  }) => import("react/jsx-runtime").JSX.Element>;
128
136
  export declare const ArrowheadCircleOutlineIcon: React.MemoExoticComponent<({ flip }: {
129
137
  flip?: boolean;
130
138
  }) => import("react/jsx-runtime").JSX.Element>;
131
- export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ flip }: {
139
+ export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }: {
132
140
  flip?: boolean;
133
141
  }) => import("react/jsx-runtime").JSX.Element>;
134
- export declare const ArrowheadTriangleIcon: React.MemoExoticComponent<({ flip }: {
142
+ export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
135
143
  flip?: boolean;
136
144
  }) => import("react/jsx-runtime").JSX.Element>;
137
- export declare const ArrowheadTriangleOutlineIcon: React.MemoExoticComponent<({ flip }: {
145
+ export declare const ArrowheadBarIcon: React.MemoExoticComponent<({ flip }: {
138
146
  flip?: boolean;
139
147
  }) => import("react/jsx-runtime").JSX.Element>;
140
- export declare const ArrowheadDiamondIcon: React.MemoExoticComponent<({ flip }: {
148
+ export declare const ArrowheadCardinalityOneIcon: React.MemoExoticComponent<({ flip }: {
141
149
  flip?: boolean;
142
150
  }) => import("react/jsx-runtime").JSX.Element>;
143
- export declare const ArrowheadDiamondOutlineIcon: React.MemoExoticComponent<({ flip }: {
151
+ export declare const ArrowheadCardinalityManyIcon: React.MemoExoticComponent<({ flip }: {
152
+ flip?: boolean;
153
+ }) => import("react/jsx-runtime").JSX.Element>;
154
+ export declare const ArrowheadCardinalityOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
144
155
  flip?: boolean;
145
156
  }) => import("react/jsx-runtime").JSX.Element>;
146
- export declare const ArrowheadCrowfootIcon: React.MemoExoticComponent<({ flip }: {
157
+ export declare const ArrowheadCardinalityExactlyOneIcon: React.MemoExoticComponent<({ flip }: {
147
158
  flip?: boolean;
148
159
  }) => import("react/jsx-runtime").JSX.Element>;
149
- export declare const ArrowheadCrowfootOneIcon: React.MemoExoticComponent<({ flip }: {
160
+ export declare const ArrowheadCardinalityZeroOrOneIcon: React.MemoExoticComponent<({ flip }: {
150
161
  flip?: boolean;
151
162
  }) => import("react/jsx-runtime").JSX.Element>;
152
- export declare const ArrowheadCrowfootOneOrManyIcon: React.MemoExoticComponent<({ flip }: {
163
+ export declare const ArrowheadCardinalityZeroOrManyIcon: React.MemoExoticComponent<({ flip }: {
153
164
  flip?: boolean;
154
165
  }) => import("react/jsx-runtime").JSX.Element>;
155
166
  export declare const FontSizeSmallIcon: import("react/jsx-runtime").JSX.Element;
@@ -35,11 +35,14 @@ export declare const ClearCanvas: {
35
35
  export declare const ToggleTheme: {
36
36
  (props: {
37
37
  allowSystemTheme: true;
38
+ /**
39
+ * Controls the theme of this UI component only.
40
+ * You should subscribe to `props.onThemeChange` and control the theme
41
+ * upstream.
42
+ */
38
43
  theme: Theme | "system";
39
- onSelect: (theme: Theme | "system") => void;
40
44
  } | {
41
- allowSystemTheme?: false;
42
- onSelect?: (theme: Theme) => void;
45
+ allowSystemTheme: false;
43
46
  }): import("react/jsx-runtime").JSX.Element | null;
44
47
  displayName: string;
45
48
  };
@@ -70,7 +73,10 @@ export declare const Preferences: {
70
73
  additionalItems?: React.ReactNode;
71
74
  }): import("react/jsx-runtime").JSX.Element;
72
75
  ToggleToolLock: () => import("react/jsx-runtime").JSX.Element;
76
+ BoxSelectionMode: () => import("react/jsx-runtime").JSX.Element;
73
77
  ToggleSnapMode: () => import("react/jsx-runtime").JSX.Element;
78
+ ToggleArrowBinding: () => import("react/jsx-runtime").JSX.Element;
79
+ ToggleMidpointSnapping: () => import("react/jsx-runtime").JSX.Element;
74
80
  ToggleGridMode: () => import("react/jsx-runtime").JSX.Element;
75
81
  ToggleZenMode: () => import("react/jsx-runtime").JSX.Element;
76
82
  ToggleViewMode: () => import("react/jsx-runtime").JSX.Element;
@@ -169,6 +169,13 @@ export declare const getToolbarTools: (app: AppClassProperties) => readonly [{
169
169
  readonly fillable: false;
170
170
  readonly toolbar: false;
171
171
  }] | readonly [{
172
+ readonly icon: import("react/jsx-runtime").JSX.Element;
173
+ readonly value: "hand";
174
+ readonly key: "h";
175
+ readonly numericKey: null;
176
+ readonly fillable: false;
177
+ readonly toolbar: true;
178
+ }, {
172
179
  readonly value: "lasso";
173
180
  readonly icon: import("react/jsx-runtime").JSX.Element;
174
181
  readonly key: "v";
@@ -2,12 +2,11 @@ import { IMAGE_MIME_TYPES, MIME_TYPES } from "@excalidraw/common";
2
2
  import type { ValueOf } from "@excalidraw/common/utility-types";
3
3
  import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
4
4
  import type { AppState, DataURL, LibraryItem } from "../types";
5
- import type { FileSystemHandle } from "browser-fs-access";
6
5
  import type { ImportedLibraryData } from "./types";
7
6
  export declare const getMimeType: (blob: Blob | string) => string;
8
- export declare const getFileHandleType: (handle: FileSystemHandle | null) => string | null;
7
+ export declare const getFileHandleType: (handle: FileSystemFileHandle | null) => string | null;
9
8
  export declare const isImageFileHandleType: (type: string | null) => type is "png" | "svg";
10
- export declare const isImageFileHandle: (handle: FileSystemHandle | null) => boolean;
9
+ export declare const isImageFileHandle: (handle: FileSystemFileHandle | null) => handle is FileSystemFileHandle;
11
10
  export declare const isSupportedImageFileType: (type: string | null | undefined) => boolean;
12
11
  export declare const isSupportedImageFile: (blob: Blob | null | undefined) => blob is Blob & {
13
12
  type: ValueOf<typeof IMAGE_MIME_TYPES>;
@@ -15,8 +14,8 @@ export declare const isSupportedImageFile: (blob: Blob | null | undefined) => bl
15
14
  export declare const loadSceneOrLibraryFromBlob: (blob: Blob | File,
16
15
  /** @see restore.localAppState */
17
16
  localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
18
- /** FileSystemHandle. Defaults to `blob.handle` if defined, otherwise null. */
19
- fileHandle?: FileSystemHandle | null) => Promise<{
17
+ /** FileSystemFileHandle. Defaults to `blob.handle` if defined, otherwise null. */
18
+ fileHandle?: FileSystemFileHandle | null) => Promise<{
20
19
  type: "application/vnd.excalidraw+json";
21
20
  data: {
22
21
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
@@ -46,6 +45,10 @@ fileHandle?: FileSystemHandle | null) => Promise<{
46
45
  } | {
47
46
  name: "elementLinkSelector";
48
47
  sourceElementId: ExcalidrawElement["id"];
48
+ } | {
49
+ name: "charts";
50
+ data: import("../charts").Spreadsheet;
51
+ rawText: string;
49
52
  };
50
53
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
51
54
  selectedElementIds: Readonly<{
@@ -69,6 +72,7 @@ fileHandle?: FileSystemHandle | null) => Promise<{
69
72
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
70
73
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
71
74
  isBindingEnabled: boolean;
75
+ isMidpointSnappingEnabled: boolean;
72
76
  suggestedBinding: {
73
77
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
74
78
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -78,7 +82,7 @@ fileHandle?: FileSystemHandle | null) => Promise<{
78
82
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
79
83
  snapLines: readonly import("../snapping").SnapLine[];
80
84
  zenModeEnabled: boolean;
81
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
85
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
82
86
  isCropping: boolean;
83
87
  croppingElementId: ExcalidrawElement["id"] | null;
84
88
  searchMatches: Readonly<{
@@ -103,7 +107,8 @@ fileHandle?: FileSystemHandle | null) => Promise<{
103
107
  isLoading: boolean;
104
108
  errorMessage: React.ReactNode;
105
109
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
106
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
110
+ boxSelectionMode: import("../types").BoxSelectionMode;
111
+ bindingPreference: "enabled" | "disabled";
107
112
  editingFrame: string | null;
108
113
  preferredSelectionTool: {
109
114
  type: "selection" | "lasso";
@@ -117,9 +122,10 @@ fileHandle?: FileSystemHandle | null) => Promise<{
117
122
  currentItemStrokeColor: string;
118
123
  currentItemBackgroundColor: string;
119
124
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
120
- currentItemStrokeWidth: number;
125
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
121
126
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
122
127
  currentItemRoughness: number;
128
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
123
129
  currentItemOpacity: number;
124
130
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
125
131
  currentItemFontSize: number;
@@ -144,25 +150,17 @@ fileHandle?: FileSystemHandle | null) => Promise<{
144
150
  };
145
151
  selectedElementsAreBeingDragged: boolean;
146
152
  toast: {
147
- message: string;
153
+ message: React.ReactNode;
148
154
  closable?: boolean;
149
155
  duration?: number;
150
156
  } | null;
151
157
  gridStep: number;
152
158
  gridModeEnabled: boolean;
153
- fileHandle: FileSystemHandle | null;
159
+ fileHandle: FileSystemFileHandle | null;
154
160
  stats: {
155
161
  open: boolean;
156
162
  panels: number;
157
163
  };
158
- currentChartType: import("@excalidraw/element/types").ChartType;
159
- pasteDialog: {
160
- shown: false;
161
- data: null;
162
- } | {
163
- shown: true;
164
- data: import("../charts").Spreadsheet;
165
- };
166
164
  showHyperlinkPopup: false | "info" | "editor";
167
165
  originSnapOffset: {
168
166
  x: number;
@@ -184,8 +182,8 @@ fileHandle?: FileSystemHandle | null) => Promise<{
184
182
  export declare const loadFromBlob: (blob: Blob,
185
183
  /** @see restore.localAppState */
186
184
  localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
187
- /** FileSystemHandle. Defaults to `blob.handle` if defined, otherwise null. */
188
- fileHandle?: FileSystemHandle | null) => Promise<{
185
+ /** FileSystemFileHandle. Defaults to `blob.handle` if defined, otherwise null. */
186
+ fileHandle?: FileSystemFileHandle | null) => Promise<{
189
187
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
190
188
  appState: {
191
189
  viewBackgroundColor: string;
@@ -213,6 +211,10 @@ fileHandle?: FileSystemHandle | null) => Promise<{
213
211
  } | {
214
212
  name: "elementLinkSelector";
215
213
  sourceElementId: ExcalidrawElement["id"];
214
+ } | {
215
+ name: "charts";
216
+ data: import("../charts").Spreadsheet;
217
+ rawText: string;
216
218
  };
217
219
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
218
220
  selectedElementIds: Readonly<{
@@ -236,6 +238,7 @@ fileHandle?: FileSystemHandle | null) => Promise<{
236
238
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
237
239
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
238
240
  isBindingEnabled: boolean;
241
+ isMidpointSnappingEnabled: boolean;
239
242
  suggestedBinding: {
240
243
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
241
244
  midPoint?: import("@excalidraw/math").GlobalPoint;
@@ -245,7 +248,7 @@ fileHandle?: FileSystemHandle | null) => Promise<{
245
248
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
246
249
  snapLines: readonly import("../snapping").SnapLine[];
247
250
  zenModeEnabled: boolean;
248
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
251
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
249
252
  isCropping: boolean;
250
253
  croppingElementId: ExcalidrawElement["id"] | null;
251
254
  searchMatches: Readonly<{
@@ -270,7 +273,8 @@ fileHandle?: FileSystemHandle | null) => Promise<{
270
273
  isLoading: boolean;
271
274
  errorMessage: React.ReactNode;
272
275
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
273
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
276
+ boxSelectionMode: import("../types").BoxSelectionMode;
277
+ bindingPreference: "enabled" | "disabled";
274
278
  editingFrame: string | null;
275
279
  preferredSelectionTool: {
276
280
  type: "selection" | "lasso";
@@ -284,9 +288,10 @@ fileHandle?: FileSystemHandle | null) => Promise<{
284
288
  currentItemStrokeColor: string;
285
289
  currentItemBackgroundColor: string;
286
290
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
287
- currentItemStrokeWidth: number;
291
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
288
292
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
289
293
  currentItemRoughness: number;
294
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
290
295
  currentItemOpacity: number;
291
296
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
292
297
  currentItemFontSize: number;
@@ -311,25 +316,17 @@ fileHandle?: FileSystemHandle | null) => Promise<{
311
316
  };
312
317
  selectedElementsAreBeingDragged: boolean;
313
318
  toast: {
314
- message: string;
319
+ message: React.ReactNode;
315
320
  closable?: boolean;
316
321
  duration?: number;
317
322
  } | null;
318
323
  gridStep: number;
319
324
  gridModeEnabled: boolean;
320
- fileHandle: FileSystemHandle | null;
325
+ fileHandle: FileSystemFileHandle | null;
321
326
  stats: {
322
327
  open: boolean;
323
328
  panels: number;
324
329
  };
325
- currentChartType: import("@excalidraw/element/types").ChartType;
326
- pasteDialog: {
327
- shown: false;
328
- data: null;
329
- } | {
330
- shown: true;
331
- data: import("../charts").Spreadsheet;
332
- };
333
330
  showHyperlinkPopup: false | "info" | "editor";
334
331
  originSnapOffset: {
335
332
  x: number;
@@ -364,7 +361,7 @@ export declare const SVGStringToFile: (SVGString: string, filename?: string) =>
364
361
  type: typeof MIME_TYPES.svg;
365
362
  };
366
363
  export declare const ImageURLToFile: (imageUrl: string, filename?: string) => Promise<File | undefined>;
367
- export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<FileSystemHandle | null>;
364
+ export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<FileSystemFileHandle | null>;
368
365
  export declare const createFile: (blob: File | Blob | ArrayBuffer, mimeType: string, name: string | undefined) => File;
369
366
  /** attempts to detect correct mimeType if none is set, or if an image
370
367
  * has an incorrect extension.
@@ -1,6 +1,5 @@
1
1
  import { supported as nativeFileSystemSupported } from "browser-fs-access";
2
2
  import { MIME_TYPES } from "@excalidraw/common";
3
- import type { FileSystemHandle } from "browser-fs-access";
4
3
  type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">;
5
4
  export declare const fileOpen: <M extends boolean | undefined = false>(opts: {
6
5
  extensions?: FILE_EXTENSION[];
@@ -14,8 +13,7 @@ export declare const fileSave: (blob: Blob | Promise<Blob>, opts: {
14
13
  extension: FILE_EXTENSION;
15
14
  mimeTypes?: string[];
16
15
  description: string;
17
- /** existing FileSystemHandle */
18
- fileHandle?: FileSystemHandle | null;
19
- }) => Promise<FileSystemHandle | null>;
16
+ /** existing FileSystemFileHandle */
17
+ fileHandle?: FileSystemFileHandle | null;
18
+ }) => Promise<FileSystemFileHandle | null>;
20
19
  export { nativeFileSystemSupported };
21
- export type { FileSystemHandle };
@@ -1,5 +1,4 @@
1
1
  import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
2
- import type { FileSystemHandle } from "./filesystem";
3
2
  import type { ExportType } from "../scene/types";
4
3
  import type { AppState, BinaryFiles } from "../types";
5
4
  export { loadFromBlob } from "./blob";
@@ -17,6 +16,6 @@ export declare const exportCanvas: (type: Omit<ExportType, "backend">, elements:
17
16
  viewBackgroundColor: string;
18
17
  /** filename, if applicable */
19
18
  name?: string;
20
- fileHandle?: FileSystemHandle | null;
19
+ fileHandle?: FileSystemFileHandle | null;
21
20
  exportingFrame: ExcalidrawFrameLikeElement | null;
22
- }) => Promise<FileSystemHandle | null | undefined>;
21
+ }) => Promise<FileSystemFileHandle | null | undefined>;
@@ -1,11 +1,19 @@
1
- import type { ExcalidrawElement } from "@excalidraw/element/types";
1
+ import type { ExcalidrawElement, NonDeleted } from "@excalidraw/element/types";
2
+ import type { MaybePromise } from "@excalidraw/common/utility-types";
2
3
  import type { AppState, BinaryFiles, LibraryItems } from "../types";
3
4
  import type { ImportedDataState, ImportedLibraryData } from "./types";
5
+ export type JSONExportData = {
6
+ elements: readonly NonDeleted<ExcalidrawElement>[];
7
+ appState: AppState;
8
+ files: BinaryFiles;
9
+ };
4
10
  export declare const serializeAsJSON: (elements: readonly ExcalidrawElement[], appState: Partial<AppState>, files: BinaryFiles, type: "local" | "database") => string;
5
- export declare const saveAsJSON: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles,
6
- /** filename */
7
- name?: string) => Promise<{
8
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
11
+ export declare const saveAsJSON: ({ data, filename, fileHandle, }: {
12
+ data: MaybePromise<JSONExportData>;
13
+ filename: string;
14
+ fileHandle: AppState["fileHandle"];
15
+ }) => Promise<{
16
+ fileHandle: FileSystemFileHandle | null;
9
17
  }>;
10
18
  export declare const loadFromJSON: (localAppState: AppState, localElements: readonly ExcalidrawElement[] | null) => Promise<{
11
19
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
@@ -35,12 +43,16 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
35
43
  } | {
36
44
  name: "elementLinkSelector";
37
45
  sourceElementId: ExcalidrawElement["id"];
46
+ } | {
47
+ name: "charts";
48
+ data: import("../charts").Spreadsheet;
49
+ rawText: string;
38
50
  };
39
51
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
40
52
  selectedElementIds: Readonly<{
41
53
  [id: string]: true;
42
54
  }>;
43
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
55
+ frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
44
56
  activeTool: {
45
57
  lastActiveTool: import("../types").ActiveTool | null;
46
58
  locked: boolean;
@@ -55,19 +67,20 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
55
67
  [groupId: string]: boolean;
56
68
  };
57
69
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
58
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
59
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
70
+ multiElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
71
+ newElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
60
72
  isBindingEnabled: boolean;
73
+ isMidpointSnappingEnabled: boolean;
61
74
  suggestedBinding: {
62
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
75
+ element: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
63
76
  midPoint?: import("@excalidraw/math").GlobalPoint;
64
77
  } | null;
65
78
  isRotating: boolean;
66
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
79
+ elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
67
80
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
68
81
  snapLines: readonly import("../snapping").SnapLine[];
69
82
  zenModeEnabled: boolean;
70
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
83
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
71
84
  isCropping: boolean;
72
85
  croppingElementId: ExcalidrawElement["id"] | null;
73
86
  searchMatches: Readonly<{
@@ -92,7 +105,8 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
92
105
  isLoading: boolean;
93
106
  errorMessage: React.ReactNode;
94
107
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
95
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
108
+ boxSelectionMode: import("../types").BoxSelectionMode;
109
+ bindingPreference: "enabled" | "disabled";
96
110
  editingFrame: string | null;
97
111
  preferredSelectionTool: {
98
112
  type: "selection" | "lasso";
@@ -106,9 +120,10 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
106
120
  currentItemStrokeColor: string;
107
121
  currentItemBackgroundColor: string;
108
122
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
109
- currentItemStrokeWidth: number;
123
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
110
124
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
111
125
  currentItemRoughness: number;
126
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
112
127
  currentItemOpacity: number;
113
128
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
114
129
  currentItemFontSize: number;
@@ -133,25 +148,17 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
133
148
  };
134
149
  selectedElementsAreBeingDragged: boolean;
135
150
  toast: {
136
- message: string;
151
+ message: React.ReactNode;
137
152
  closable?: boolean;
138
153
  duration?: number;
139
154
  } | null;
140
155
  gridStep: number;
141
156
  gridModeEnabled: boolean;
142
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
157
+ fileHandle: FileSystemFileHandle | null;
143
158
  stats: {
144
159
  open: boolean;
145
160
  panels: number;
146
161
  };
147
- currentChartType: import("@excalidraw/element/types").ChartType;
148
- pasteDialog: {
149
- shown: false;
150
- data: null;
151
- } | {
152
- shown: true;
153
- data: import("../charts").Spreadsheet;
154
- };
155
162
  showHyperlinkPopup: false | "info" | "editor";
156
163
  originSnapOffset: {
157
164
  x: number;
@@ -37,7 +37,7 @@ export interface LibraryMigrationAdapter {
37
37
  /** clears entire storage afterwards */
38
38
  clear(): MaybePromise<void>;
39
39
  }
40
- export declare const libraryItemsAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
40
+ export declare const libraryItemsAtom: import("jotai").PrimitiveAtom<{
41
41
  status: "loading" | "loaded";
42
42
  /** indicates whether library is initialized with library items (has gone
43
43
  * through at least one update). Used in UI. Specific to this atom only. */
@@ -1,5 +1,10 @@
1
+ import type { MaybePromise } from "@excalidraw/common/utility-types";
1
2
  import type { ExcalidrawElement } from "@excalidraw/element/types";
2
3
  import type { AppState, BinaryFiles } from "../types";
3
- export declare const resaveAsImageWithScene: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles, name: string) => Promise<{
4
- fileHandle: import("browser-fs-access").FileSystemHandle;
4
+ export declare const resaveAsImageWithScene: (data: MaybePromise<{
5
+ elements: readonly ExcalidrawElement[];
6
+ appState: AppState;
7
+ files: BinaryFiles;
8
+ }>, fileHandle: FileSystemFileHandle, filename: string) => Promise<{
9
+ fileHandle: FileSystemFileHandle;
5
10
  }>;
@@ -1,10 +1,9 @@
1
- import { AnimatedTrail } from "../animated-trail";
2
- import type { AnimationFrameHandler } from "../animation-frame-handler";
1
+ import { AnimatedTrail } from "../animatedTrail";
3
2
  import type App from "../components/App";
4
3
  export declare class EraserTrail extends AnimatedTrail {
5
4
  private elementsToErase;
6
5
  private groupsToErase;
7
- constructor(animationFrameHandler: AnimationFrameHandler, app: App);
6
+ constructor(app: App);
8
7
  startPath(x: number, y: number): void;
9
8
  addPointToPath(x: number, y: number, restore?: boolean): string[];
10
9
  private updateElementsToBeErased;
@@ -1,6 +1,6 @@
1
1
  import type { LibraryItem } from "../types";
2
2
  export type SvgCache = Map<LibraryItem["id"], SVGSVGElement>;
3
- export declare const libraryItemSvgsCache: import("jotai/vanilla/atom").PrimitiveAtom<SvgCache> & {
3
+ export declare const libraryItemSvgsCache: import("jotai").PrimitiveAtom<SvgCache> & {
4
4
  init: SvgCache;
5
5
  };
6
6
  export declare const useLibraryItemSvg: (id: LibraryItem["id"] | null, elements: LibraryItem["elements"] | undefined, svgCache: SvgCache, ref: React.RefObject<HTMLDivElement | null>) => SVGSVGElement | undefined;
@@ -1,20 +1,18 @@
1
- import { AnimatedTrail } from "./animated-trail";
2
- import type { Trail } from "./animated-trail";
3
- import type { AnimationFrameHandler } from "./animation-frame-handler";
1
+ import { AnimatedTrail } from "./animatedTrail";
2
+ import type { Trail } from "./animatedTrail";
4
3
  import type App from "./components/App";
5
4
  export declare class LaserTrails implements Trail {
6
- private animationFrameHandler;
7
5
  private app;
8
6
  localTrail: AnimatedTrail;
9
7
  private collabTrails;
10
8
  private container?;
11
- constructor(animationFrameHandler: AnimationFrameHandler, app: App);
9
+ constructor(app: App);
12
10
  private getTrailOptions;
13
11
  startPath(x: number, y: number): void;
14
12
  addPointToPath(x: number, y: number): void;
15
13
  endPath(): void;
16
14
  start(container: SVGSVGElement): void;
17
15
  stop(): void;
18
- onFrame(): void;
19
- private updateCollabTrails;
16
+ private stopCollabTrails;
17
+ updateCollabTrails(collaborators: App["state"]["collaborators"]): void;
20
18
  }
@@ -1,5 +1,4 @@
1
- import { type AnimationFrameHandler } from "../animation-frame-handler";
2
- import { AnimatedTrail } from "../animated-trail";
1
+ import { AnimatedTrail } from "../animatedTrail";
3
2
  import type App from "../components/App";
4
3
  export declare class LassoTrail extends AnimatedTrail {
5
4
  private intersectedElements;
@@ -7,7 +6,7 @@ export declare class LassoTrail extends AnimatedTrail {
7
6
  private elementsSegments;
8
7
  private canvasTranslate;
9
8
  private keepPreviousSelection;
10
- constructor(animationFrameHandler: AnimationFrameHandler, app: App);
9
+ constructor(app: App);
11
10
  startPath(x: number, y: number, keepPreviousSelection?: boolean): void;
12
11
  selectElementsFromIds: (ids: string[]) => void;
13
12
  addPointToPath: (x: number, y: number, keepPreviousSelection?: boolean) => void;