@excalidraw/excalidraw 0.15.2-6546-21ca391 → 0.15.2-6546-a6b389c

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-21ca391",
3
+ "version": "0.15.2-6546-a6b389c",
4
4
  "main": "main.js",
5
5
  "types": "types/packages/excalidraw/index.d.ts",
6
6
  "files": [
@@ -52,22 +52,23 @@ export type ValidContainer = {
52
52
  verticalAlign?: VerticalAlign;
53
53
  } & MarkOptional<ElementConstructorOpts, "x" | "y">;
54
54
  } & ElementConstructorOpts;
55
+ export type ExcalidrawProgrammaticElement = Extract<ExcalidrawElement, ExcalidrawSelectionElement | ExcalidrawFreeDrawElement | ExcalidrawFrameElement> | ({
56
+ type: Extract<ExcalidrawLinearElement["type"], "line">;
57
+ x: number;
58
+ y: number;
59
+ } & Partial<ExcalidrawLinearElement>) | ValidContainer | ValidLinearElement | ({
60
+ type: "text";
61
+ text: string;
62
+ x: number;
63
+ y: number;
64
+ id?: ExcalidrawTextElement["id"];
65
+ } & Partial<ExcalidrawTextElement>) | ({
66
+ type: Extract<ExcalidrawImageElement["type"], "image">;
67
+ x: number;
68
+ y: number;
69
+ } & Partial<ExcalidrawImageElement>);
55
70
  export interface ExcalidrawProgrammaticAPI {
56
- elements?: readonly (Extract<ExcalidrawElement, ExcalidrawSelectionElement | ExcalidrawFreeDrawElement | ExcalidrawFrameElement> | ({
57
- type: Extract<ExcalidrawLinearElement["type"], "line">;
58
- x: number;
59
- y: number;
60
- } & Partial<ExcalidrawLinearElement>) | ValidContainer | ValidLinearElement | ({
61
- type: "text";
62
- text: string;
63
- x: number;
64
- y: number;
65
- id?: ExcalidrawTextElement["id"];
66
- } & Partial<ExcalidrawTextElement>) | ({
67
- type: Extract<ExcalidrawImageElement["type"], "image">;
68
- x: number;
69
- y: number;
70
- } & Partial<ExcalidrawImageElement>))[] | null;
71
+ elements?: readonly ExcalidrawProgrammaticElement[] | null;
71
72
  }
72
73
  export declare const ELEMENTS_SUPPORTING_PROGRAMMATIC_API: string[];
73
74
  export declare const convertToExcalidrawElements: (elements: ExcalidrawProgrammaticAPI["elements"]) => ExcalidrawElement[];
@@ -1,29 +1,5 @@
1
1
  declare const _default: {
2
- elements: readonly (import("../../../element/types").ExcalidrawSelectionElement | import("../../../element/types").ExcalidrawFrameElement | import("../../../element/types").ExcalidrawFreeDrawElement | import("../../../data/transform").ValidLinearElement | ({
3
- type: "rectangle" | "diamond" | "ellipse";
4
- id?: string | undefined;
5
- label?: ({
6
- text: string;
7
- fontSize?: number | undefined;
8
- fontFamily?: number | undefined;
9
- textAlign?: string | undefined;
10
- verticalAlign?: string | undefined;
11
- } & Omit<import("../../../element/newElement").ElementConstructorOpts, "x" | "y"> & Partial<Pick<import("../../../element/newElement").ElementConstructorOpts, "x" | "y">>) | undefined;
12
- } & Omit<Omit<import("../../../element/types").ExcalidrawGenericElement, "id" | "isDeleted" | "updated" | "type">, "link" | "strokeColor" | "backgroundColor" | "fillStyle" | "strokeWidth" | "strokeStyle" | "roundness" | "roughness" | "opacity" | "width" | "height" | "angle" | "seed" | "version" | "versionNonce" | "groupIds" | "frameId" | "boundElements" | "locked"> & Partial<Pick<Omit<import("../../../element/types").ExcalidrawGenericElement, "id" | "isDeleted" | "updated" | "type">, "link" | "strokeColor" | "backgroundColor" | "fillStyle" | "strokeWidth" | "strokeStyle" | "roundness" | "roughness" | "opacity" | "width" | "height" | "angle" | "seed" | "version" | "versionNonce" | "groupIds" | "frameId" | "boundElements" | "locked">>) | ({
13
- type: "line";
14
- x: number;
15
- y: number;
16
- } & Partial<import("../../../element/types").ExcalidrawLinearElement>) | ({
17
- type: "text";
18
- text: string;
19
- x: number;
20
- y: number;
21
- id?: string | undefined;
22
- } & Partial<import("../../../element/types").ExcalidrawTextElement>) | ({
23
- type: "image";
24
- x: number;
25
- y: number;
26
- } & Partial<import("../../../element/types").ExcalidrawImageElement>))[];
2
+ elements: readonly import("../../../data/transform").ExcalidrawProgrammaticElement[];
27
3
  appState: {
28
4
  viewBackgroundColor: string;
29
5
  currentItemFontFamily: number;