@zsviczian/excalidraw 0.18.0-62 → 0.18.0-63

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zsviczian/excalidraw",
3
- "version": "0.18.0-62",
3
+ "version": "0.18.0-63",
4
4
  "main": "main.js",
5
5
  "module": "./dist/prod/index.js",
6
6
  "source": "./index.tsx",
@@ -384,6 +384,7 @@ declare class App extends React.Component<AppProps, AppState> {
384
384
  sceneY: number;
385
385
  }) => string | null;
386
386
  startLineEditor: (el: ExcalidrawLinearElement, selectedPointsIndices?: number[] | null) => void;
387
+ refreshAllArrows: () => void;
387
388
  updateContainerSize: (containers: NonDeletedExcalidrawElement[]) => void;
388
389
  setToast: (toast: {
389
390
  message: string;
@@ -1,4 +1,4 @@
1
- import type { ElementsMap, ExcalidrawElement, ExcalidrawSelectionElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
1
+ import type { ElementsMap, ElementsMapOrArray, ExcalidrawElement, ExcalidrawSelectionElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
2
2
  import type { AppState, BinaryFiles, LibraryItem } from "../types";
3
3
  import type { ImportedDataState } from "./types";
4
4
  type RestoredAppState = Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
@@ -8,12 +8,12 @@ export type RestoredDataState = {
8
8
  appState: RestoredAppState;
9
9
  files: BinaryFiles;
10
10
  };
11
- export declare const restoreElement: (element: Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, elementsMap: Readonly<ElementsMap>, opts?: {
11
+ export declare const restoreElement: (element: Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, targetElementsMap: Readonly<ElementsMap>, localElementsMap: Readonly<ElementsMap> | null | undefined, opts?: {
12
12
  deleteInvisibleElements?: boolean;
13
13
  }) => typeof element | null;
14
14
  export declare const restoreElements: (targetElements: ImportedDataState["elements"],
15
15
  /** NOTE doesn't serve for reconciliation */
16
- localElements: readonly ExcalidrawElement[] | null | undefined, opts?: {
16
+ localElements: Readonly<ElementsMapOrArray> | null | undefined, opts?: {
17
17
  refreshDimensions?: boolean;
18
18
  repairBindings?: boolean;
19
19
  deleteInvisibleElements?: boolean;
@@ -1,4 +1,5 @@
1
- import { type GlobalPoint } from "@excalidraw/math/types";
1
+ import type { Scene, Store } from "@excalidraw/element";
2
+ import type { GlobalPoint } from "@excalidraw/math";
2
3
  import type { FontMetadata } from "@excalidraw/common";
3
4
  import type { ElementsMap, ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
4
5
  import type { AppClassProperties, AppState } from "./types";
@@ -39,3 +40,4 @@ export declare const t2: (key: string) => string;
39
40
  export declare const shouldDisableZoom: (appState: AppState) => boolean;
40
41
  export declare const isFullPanelMode: (app: AppClassProperties) => boolean;
41
42
  export declare const isContextMenuDisabled: () => boolean;
43
+ export declare const refreshAllArrows: (scene: Scene, store: Store) => void;
@@ -724,6 +724,7 @@ export interface ExcalidrawImperativeAPI {
724
724
  isTrayModeEnabled: InstanceType<typeof App>["isTrayModeEnabled"];
725
725
  getColorAtScenePoint: InstanceType<typeof App>["getColorAtScenePoint"];
726
726
  startLineEditor: InstanceType<typeof App>["startLineEditor"];
727
+ refreshAllArrows: InstanceType<typeof App>["refreshAllArrows"];
727
728
  getSceneElements: InstanceType<typeof App>["getSceneElements"];
728
729
  getAppState: () => InstanceType<typeof App>["state"];
729
730
  getFiles: () => InstanceType<typeof App>["files"];