mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Move utility types in common
This commit is contained in:
parent
0a7e9c51d6
commit
e1ea33836e
46 changed files with 76 additions and 50 deletions
|
@ -11,6 +11,8 @@ import { clearElementsForExport } from "@excalidraw/element";
|
|||
|
||||
import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
|
||||
|
||||
import type { ValueOf } from "@excalidraw/common/utility-types";
|
||||
|
||||
import { cleanAppStateForExport } from "../appState";
|
||||
|
||||
import { CanvasError, ImageSceneDataError } from "../errors";
|
||||
|
@ -25,7 +27,6 @@ import { restore, restoreLibraryItems } from "./restore";
|
|||
import type { FileSystemHandle } from "./filesystem";
|
||||
|
||||
import type { AppState, DataURL, LibraryItem } from "../types";
|
||||
import type { ValueOf } from "../utility-types";
|
||||
import type { ImportedLibraryData } from "./types";
|
||||
|
||||
const parseFileContents = async (blob: Blob | File): Promise<string> => {
|
||||
|
|
|
@ -21,6 +21,8 @@ import { getCommonBoundingBox } from "@excalidraw/element/bounds";
|
|||
|
||||
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
||||
|
||||
import type { MaybePromise } from "@excalidraw/common/utility-types";
|
||||
|
||||
import { atom, editorJotaiStore } from "../editor-jotai";
|
||||
|
||||
import { Emitter } from "../emitter";
|
||||
|
@ -41,7 +43,6 @@ import type {
|
|||
LibraryItemsSource,
|
||||
LibraryItems_anyVersion,
|
||||
} from "../types";
|
||||
import type { MaybePromise } from "../utility-types";
|
||||
|
||||
/**
|
||||
* format: hostname or hostname/pathname
|
||||
|
|
|
@ -10,8 +10,9 @@ import {
|
|||
|
||||
import type { OrderedExcalidrawElement } from "@excalidraw/element/types";
|
||||
|
||||
import type { MakeBrand } from "@excalidraw/common/utility-types";
|
||||
|
||||
import type { AppState } from "../types";
|
||||
import type { MakeBrand } from "../utility-types";
|
||||
|
||||
export type ReconciledExcalidrawElement = OrderedExcalidrawElement &
|
||||
MakeBrand<"ReconciledElement">;
|
||||
|
|
|
@ -61,6 +61,8 @@ import type {
|
|||
StrokeRoundness,
|
||||
} from "@excalidraw/element/types";
|
||||
|
||||
import type { MarkOptional, Mutable } from "@excalidraw/common/utility-types";
|
||||
|
||||
import { getDefaultAppState } from "../appState";
|
||||
|
||||
import { getLineHeight } from "../fonts/FontMetadata";
|
||||
|
@ -71,7 +73,6 @@ import {
|
|||
} from "../scene";
|
||||
|
||||
import type { AppState, BinaryFiles, LibraryItem } from "../types";
|
||||
import type { MarkOptional, Mutable } from "../utility-types";
|
||||
import type { ImportedDataState, LegacyAppState } from "./types";
|
||||
|
||||
type RestoredAppState = Omit<
|
||||
|
|
|
@ -59,9 +59,9 @@ import type {
|
|||
VerticalAlign,
|
||||
} from "@excalidraw/element/types";
|
||||
|
||||
import { getLineHeight } from "../fonts/FontMetadata";
|
||||
import type { MarkOptional } from "@excalidraw/common/utility-types";
|
||||
|
||||
import type { MarkOptional } from "../utility-types";
|
||||
import { getLineHeight } from "../fonts/FontMetadata";
|
||||
|
||||
export type ValidLinearElement = {
|
||||
type: "arrow" | "line";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue