@excalidraw/excalidraw 0.15.2-6546-a6b389c → 0.15.2-6546-eae7ba2

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": "@excalidraw/excalidraw",
3
- "version": "0.15.2-6546-a6b389c",
3
+ "version": "0.15.2-6546-eae7ba2",
4
4
  "main": "main.js",
5
5
  "types": "types/packages/excalidraw/index.d.ts",
6
6
  "files": [
@@ -1,9 +1,10 @@
1
1
  import { ExcalidrawElement, NonDeletedExcalidrawElement } from "./element/types";
2
2
  import { BinaryFiles } from "./types";
3
3
  import { Spreadsheet } from "./charts";
4
+ import { ExcalidrawProgrammaticElement } from "./data/transform";
4
5
  export interface ClipboardData {
5
6
  spreadsheet?: Spreadsheet;
6
- elements?: readonly ExcalidrawElement[];
7
+ elements?: readonly (ExcalidrawElement | ExcalidrawProgrammaticElement)[];
7
8
  files?: BinaryFiles;
8
9
  text?: string;
9
10
  errorMessage?: string;
@@ -1,5 +1,5 @@
1
1
  import { ElementConstructorOpts } from "../element/newElement";
2
- import { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFreeDrawElement, ExcalidrawGenericElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawSelectionElement, ExcalidrawTextElement, FontFamilyValues, TextAlign, VerticalAlign } from "../element/types";
2
+ import { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFreeDrawElement, ExcalidrawGenericElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawSelectionElement, ExcalidrawTextElement, FileId, FontFamilyValues, TextAlign, VerticalAlign } from "../element/types";
3
3
  import { MarkOptional } from "../utility-types";
4
4
  export type ValidLinearElement = {
5
5
  type: "arrow" | "line";
@@ -66,6 +66,7 @@ export type ExcalidrawProgrammaticElement = Extract<ExcalidrawElement, Excalidra
66
66
  type: Extract<ExcalidrawImageElement["type"], "image">;
67
67
  x: number;
68
68
  y: number;
69
+ fileId: FileId;
69
70
  } & Partial<ExcalidrawImageElement>);
70
71
  export interface ExcalidrawProgrammaticAPI {
71
72
  elements?: readonly ExcalidrawProgrammaticElement[] | null;
@@ -26,3 +26,4 @@ export { WelcomeScreen };
26
26
  export { LiveCollaborationTrigger };
27
27
  export { DefaultSidebar } from "../../components/DefaultSidebar";
28
28
  export { normalizeLink } from "../../data/url";
29
+ export { convertToExcalidrawElements } from "../../data/transform";