1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00

feat: export reconciliation (#7917)

This commit is contained in:
Marcel Mraz 2024-04-22 16:27:57 +01:00 committed by GitHub
parent 015b46ab23
commit 1bd2b1fe55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 10 deletions

@ -27,6 +27,7 @@ import {
TTDDialog, TTDDialog,
TTDDialogTrigger, TTDDialogTrigger,
StoreAction, StoreAction,
reconcileElements,
} from "../packages/excalidraw"; } from "../packages/excalidraw";
import { import {
AppState, AppState,
@ -107,10 +108,7 @@ import { OverwriteConfirmDialog } from "../packages/excalidraw/components/Overwr
import Trans from "../packages/excalidraw/components/Trans"; import Trans from "../packages/excalidraw/components/Trans";
import { ShareDialog, shareDialogStateAtom } from "./share/ShareDialog"; import { ShareDialog, shareDialogStateAtom } from "./share/ShareDialog";
import CollabError, { collabErrorIndicatorAtom } from "./collab/CollabError"; import CollabError, { collabErrorIndicatorAtom } from "./collab/CollabError";
import { import type { RemoteExcalidrawElement } from "../packages/excalidraw/data/reconcile";
RemoteExcalidrawElement,
reconcileElements,
} from "../packages/excalidraw/data/reconcile";
import { import {
CommandPalette, CommandPalette,
DEFAULT_CATEGORIES, DEFAULT_CATEGORIES,

@ -17,6 +17,7 @@ import {
getSceneVersion, getSceneVersion,
restoreElements, restoreElements,
zoomToFitBounds, zoomToFitBounds,
reconcileElements,
} from "../../packages/excalidraw"; } from "../../packages/excalidraw";
import { Collaborator, Gesture } from "../../packages/excalidraw/types"; import { Collaborator, Gesture } from "../../packages/excalidraw/types";
import { import {
@ -80,10 +81,9 @@ import { Mutable, ValueOf } from "../../packages/excalidraw/utility-types";
import { getVisibleSceneBounds } from "../../packages/excalidraw/element/bounds"; import { getVisibleSceneBounds } from "../../packages/excalidraw/element/bounds";
import { withBatchedUpdates } from "../../packages/excalidraw/reactUtils"; import { withBatchedUpdates } from "../../packages/excalidraw/reactUtils";
import { collabErrorIndicatorAtom } from "./CollabError"; import { collabErrorIndicatorAtom } from "./CollabError";
import { import type {
ReconciledExcalidrawElement, ReconciledExcalidrawElement,
RemoteExcalidrawElement, RemoteExcalidrawElement,
reconcileElements,
} from "../../packages/excalidraw/data/reconcile"; } from "../../packages/excalidraw/data/reconcile";
export const collabAPIAtom = atom<CollabAPI | null>(null); export const collabAPIAtom = atom<CollabAPI | null>(null);

@ -1,3 +1,4 @@
import { reconcileElements } from "../../packages/excalidraw";
import { import {
ExcalidrawElement, ExcalidrawElement,
FileId, FileId,
@ -22,10 +23,7 @@ import { MIME_TYPES } from "../../packages/excalidraw/constants";
import { getSyncableElements, SyncableExcalidrawElement } from "."; import { getSyncableElements, SyncableExcalidrawElement } from ".";
import { ResolutionType } from "../../packages/excalidraw/utility-types"; import { ResolutionType } from "../../packages/excalidraw/utility-types";
import type { Socket } from "socket.io-client"; import type { Socket } from "socket.io-client";
import { import type { RemoteExcalidrawElement } from "../../packages/excalidraw/data/reconcile";
RemoteExcalidrawElement,
reconcileElements,
} from "../../packages/excalidraw/data/reconcile";
// private // private
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

@ -220,6 +220,8 @@ export {
restoreLibraryItems, restoreLibraryItems,
} from "./data/restore"; } from "./data/restore";
export { reconcileElements } from "./data/reconcile";
export { export {
exportToCanvas, exportToCanvas,
exportToBlob, exportToBlob,