@wildmio/excalidraw 0.18.0-custom.1 → 0.18.0-custom.2
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/dist/dev/chunk-4FKPNSAF.js +25438 -0
- package/dist/dev/chunk-4FKPNSAF.js.map +7 -0
- package/dist/dev/{chunk-WCM2OLWY.js → chunk-DJHLEOOZ.js} +5 -5
- package/dist/dev/{chunk-WCM2OLWY.js.map → chunk-DJHLEOOZ.js.map} +1 -1
- package/dist/dev/data/{image-OLRMF3PX.js → image-ZNW3236J.js} +2 -2
- package/dist/dev/index.css +1 -3
- package/dist/dev/index.css.map +2 -2
- package/dist/dev/index.js +2594 -4777
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{de-DE-HE4SJIAA.js → de-DE-ZRDYEPMS.js} +7 -7
- package/dist/dev/locales/de-DE-ZRDYEPMS.js.map +7 -0
- package/dist/dev/locales/{es-ES-EDA76ZAF.js → es-ES-VLQBB7FJ.js} +3 -3
- package/dist/dev/locales/es-ES-VLQBB7FJ.js.map +7 -0
- package/dist/dev/locales/{fr-FR-Z3SBW42Y.js → fr-FR-A72LKGCO.js} +2 -2
- package/dist/dev/locales/{fr-FR-Z3SBW42Y.js.map → fr-FR-A72LKGCO.js.map} +1 -1
- package/dist/dev/locales/{it-IT-HD26UZNF.js → it-IT-X34PIOJ2.js} +2 -2
- package/dist/dev/locales/{it-IT-HD26UZNF.js.map → it-IT-X34PIOJ2.js.map} +1 -1
- package/dist/dev/locales/{nl-NL-RCSOXLW3.js → nl-NL-XGZJ7V2V.js} +226 -226
- package/dist/dev/locales/nl-NL-XGZJ7V2V.js.map +7 -0
- package/dist/dev/locales/{percentages-TR7IWPFY.js → percentages-OGWD7R2K.js} +2 -2
- package/dist/dev/locales/{sk-SK-G2J6PSCB.js → sk-SK-RWC6UWGY.js} +49 -49
- package/dist/dev/locales/sk-SK-RWC6UWGY.js.map +7 -0
- package/dist/dev/locales/{vi-VN-XF3AYKJ7.js → vi-VN-KBZAVWP5.js} +3 -3
- package/dist/dev/locales/{vi-VN-XF3AYKJ7.js.map → vi-VN-KBZAVWP5.js.map} +1 -1
- package/dist/prod/chunk-AJI3LATG.js +1 -0
- package/dist/prod/chunk-B42KGT6Z.js +33 -0
- package/dist/prod/data/image-T7X6V6XU.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +18 -25
- package/dist/prod/locales/{de-DE-KU2ABQRN.js → de-DE-G3JVZ4MQ.js} +2 -2
- package/dist/prod/locales/{es-ES-MXQVAWTQ.js → es-ES-ART7BI3G.js} +2 -2
- package/dist/prod/locales/{fr-FR-PJOMXPCV.js → fr-FR-XEFNCM4I.js} +1 -1
- package/dist/prod/locales/{it-IT-DQZT3VFE.js → it-IT-GIGIGIBJ.js} +3 -3
- package/dist/prod/locales/nl-NL-R4C4SUIG.js +13 -0
- package/dist/prod/locales/percentages-OL6W367U.js +1 -0
- package/dist/prod/locales/sk-SK-MC7UOHQO.js +7 -0
- package/dist/prod/locales/{vi-VN-I6Q2YS4S.js → vi-VN-K34TWHF7.js} +1 -1
- package/dist/types/common/src/colors.d.ts +4 -1
- package/dist/types/common/src/constants.d.ts +0 -1
- package/dist/types/common/src/utils.d.ts +11 -7
- package/dist/types/element/src/Scene.d.ts +3 -3
- package/dist/types/element/src/renderElement.d.ts +0 -6
- package/dist/types/element/src/shape.d.ts +5 -4
- package/dist/types/excalidraw/actions/actionExport.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +7 -4
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
- package/dist/types/excalidraw/data/blob.d.ts +314 -2
- package/dist/types/excalidraw/data/json.d.ts +157 -1
- package/dist/types/excalidraw/data/restore.d.ts +22 -16
- package/dist/types/excalidraw/index.d.ts +1 -2
- package/dist/types/excalidraw/scene/Renderer.d.ts +2 -1
- package/dist/types/excalidraw/scene/types.d.ts +7 -2
- package/dist/types/math/src/range.d.ts +1 -3
- package/package.json +4 -4
- package/dist/dev/chunk-7GZZDIRR.js +0 -5474
- package/dist/dev/chunk-7GZZDIRR.js.map +0 -7
- package/dist/dev/locales/de-DE-HE4SJIAA.js.map +0 -7
- package/dist/dev/locales/es-ES-EDA76ZAF.js.map +0 -7
- package/dist/dev/locales/nl-NL-RCSOXLW3.js.map +0 -7
- package/dist/dev/locales/sk-SK-G2J6PSCB.js.map +0 -7
- package/dist/prod/chunk-FXQN3L2S.js +0 -4
- package/dist/prod/chunk-Q7BNPSJU.js +0 -1
- package/dist/prod/data/image-ZQDS3QL7.js +0 -1
- package/dist/prod/locales/nl-NL-AVTAYVB7.js +0 -7
- package/dist/prod/locales/percentages-FZSTHYWV.js +0 -1
- package/dist/prod/locales/sk-SK-2KAMKFW5.js +0 -7
- /package/dist/dev/data/{image-OLRMF3PX.js.map → image-ZNW3236J.js.map} +0 -0
- /package/dist/dev/locales/{percentages-TR7IWPFY.js.map → percentages-OGWD7R2K.js.map} +0 -0
|
@@ -18,7 +18,163 @@ localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | nu
|
|
|
18
18
|
/** FileSystemHandle. Defaults to `blob.handle` if defined, otherwise null. */
|
|
19
19
|
fileHandle?: FileSystemHandle | null) => Promise<{
|
|
20
20
|
type: "application/vnd.excalidraw+json";
|
|
21
|
-
data:
|
|
21
|
+
data: {
|
|
22
|
+
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
23
|
+
appState: {
|
|
24
|
+
viewBackgroundColor: string;
|
|
25
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
26
|
+
frameRendering: {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
name: boolean;
|
|
29
|
+
outline: boolean;
|
|
30
|
+
clip: boolean;
|
|
31
|
+
};
|
|
32
|
+
name: string | null;
|
|
33
|
+
zoom: import("../types").Zoom;
|
|
34
|
+
scrollX: number;
|
|
35
|
+
scrollY: number;
|
|
36
|
+
hideAnnotations: boolean;
|
|
37
|
+
viewModeEnabled: boolean;
|
|
38
|
+
openDialog: null | {
|
|
39
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
40
|
+
} | {
|
|
41
|
+
name: "ttd";
|
|
42
|
+
tab: "text-to-diagram" | "mermaid";
|
|
43
|
+
} | {
|
|
44
|
+
name: "commandPalette";
|
|
45
|
+
} | {
|
|
46
|
+
name: "settings";
|
|
47
|
+
} | {
|
|
48
|
+
name: "elementLinkSelector";
|
|
49
|
+
sourceElementId: ExcalidrawElement["id"];
|
|
50
|
+
};
|
|
51
|
+
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
52
|
+
selectedElementIds: Readonly<{
|
|
53
|
+
[id: string]: true;
|
|
54
|
+
}>;
|
|
55
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
56
|
+
activeEmbeddable: {
|
|
57
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
58
|
+
state: "hover" | "active";
|
|
59
|
+
} | null;
|
|
60
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
61
|
+
selectedGroupIds: {
|
|
62
|
+
[groupId: string]: boolean;
|
|
63
|
+
};
|
|
64
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
65
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
66
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
67
|
+
isBindingEnabled: boolean;
|
|
68
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
69
|
+
isRotating: boolean;
|
|
70
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
71
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
72
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
73
|
+
zenModeEnabled: boolean;
|
|
74
|
+
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
75
|
+
isCropping: boolean;
|
|
76
|
+
croppingElementId: ExcalidrawElement["id"] | null;
|
|
77
|
+
searchMatches: Readonly<{
|
|
78
|
+
focusedId: ExcalidrawElement["id"] | null;
|
|
79
|
+
matches: readonly import("../types").SearchMatch[];
|
|
80
|
+
}> | null;
|
|
81
|
+
activeLockedId: string | null;
|
|
82
|
+
hoveredElementIds: Readonly<{
|
|
83
|
+
[id: string]: true;
|
|
84
|
+
}>;
|
|
85
|
+
shouldCacheIgnoreZoom: boolean;
|
|
86
|
+
exportScale: number;
|
|
87
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
88
|
+
gridSize: number;
|
|
89
|
+
contextMenu: {
|
|
90
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
91
|
+
top: number;
|
|
92
|
+
left: number;
|
|
93
|
+
} | null;
|
|
94
|
+
showWelcomeScreen: boolean;
|
|
95
|
+
isLoading: boolean;
|
|
96
|
+
errorMessage: React.ReactNode;
|
|
97
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
98
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
99
|
+
editingFrame: string | null;
|
|
100
|
+
activeTool: {
|
|
101
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
102
|
+
locked: boolean;
|
|
103
|
+
fromSelection: boolean;
|
|
104
|
+
} & import("../types").ActiveTool;
|
|
105
|
+
preferredSelectionTool: {
|
|
106
|
+
type: "selection" | "lasso";
|
|
107
|
+
initialized: boolean;
|
|
108
|
+
};
|
|
109
|
+
penMode: boolean;
|
|
110
|
+
penDetected: boolean;
|
|
111
|
+
exportBackground: boolean;
|
|
112
|
+
exportEmbedScene: boolean;
|
|
113
|
+
exportWithDarkMode: boolean;
|
|
114
|
+
currentItemStrokeColor: string;
|
|
115
|
+
currentItemBackgroundColor: string;
|
|
116
|
+
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
117
|
+
currentItemStrokeWidth: number;
|
|
118
|
+
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
119
|
+
currentItemRoughness: number;
|
|
120
|
+
currentItemOpacity: number;
|
|
121
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
122
|
+
currentItemFontSize: number;
|
|
123
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
124
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
125
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
126
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
127
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
128
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
129
|
+
cursorButton: "up" | "down";
|
|
130
|
+
scrolledOutside: boolean;
|
|
131
|
+
isResizing: boolean;
|
|
132
|
+
openMenu: "canvas" | null;
|
|
133
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
134
|
+
openSidebar: {
|
|
135
|
+
name: import("../types").SidebarName;
|
|
136
|
+
tab?: import("../types").SidebarTabName;
|
|
137
|
+
} | null;
|
|
138
|
+
defaultSidebarDockedPreference: boolean;
|
|
139
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
140
|
+
previousSelectedElementIds: {
|
|
141
|
+
[id: string]: true;
|
|
142
|
+
};
|
|
143
|
+
selectedElementsAreBeingDragged: boolean;
|
|
144
|
+
toast: {
|
|
145
|
+
message: string;
|
|
146
|
+
closable?: boolean;
|
|
147
|
+
duration?: number;
|
|
148
|
+
} | null;
|
|
149
|
+
gridStep: number;
|
|
150
|
+
gridModeEnabled: boolean;
|
|
151
|
+
fileHandle: FileSystemHandle | null;
|
|
152
|
+
stats: {
|
|
153
|
+
open: boolean;
|
|
154
|
+
panels: number;
|
|
155
|
+
};
|
|
156
|
+
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
157
|
+
pasteDialog: {
|
|
158
|
+
shown: false;
|
|
159
|
+
data: null;
|
|
160
|
+
} | {
|
|
161
|
+
shown: true;
|
|
162
|
+
data: import("../charts").Spreadsheet;
|
|
163
|
+
};
|
|
164
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
165
|
+
originSnapOffset: {
|
|
166
|
+
x: number;
|
|
167
|
+
y: number;
|
|
168
|
+
} | null;
|
|
169
|
+
objectsSnapModeEnabled: boolean;
|
|
170
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
171
|
+
followedBy: Set<import("../types").SocketId>;
|
|
172
|
+
lockedMultiSelections: {
|
|
173
|
+
[groupId: string]: true;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
files: import("../types").BinaryFiles;
|
|
177
|
+
};
|
|
22
178
|
} | {
|
|
23
179
|
type: "application/vnd.excalidrawlib+json";
|
|
24
180
|
data: ImportedLibraryData;
|
|
@@ -27,7 +183,163 @@ export declare const loadFromBlob: (blob: Blob,
|
|
|
27
183
|
/** @see restore.localAppState */
|
|
28
184
|
localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
|
|
29
185
|
/** FileSystemHandle. Defaults to `blob.handle` if defined, otherwise null. */
|
|
30
|
-
fileHandle?: FileSystemHandle | null) => Promise<
|
|
186
|
+
fileHandle?: FileSystemHandle | null) => Promise<{
|
|
187
|
+
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
188
|
+
appState: {
|
|
189
|
+
viewBackgroundColor: string;
|
|
190
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
191
|
+
frameRendering: {
|
|
192
|
+
enabled: boolean;
|
|
193
|
+
name: boolean;
|
|
194
|
+
outline: boolean;
|
|
195
|
+
clip: boolean;
|
|
196
|
+
};
|
|
197
|
+
name: string | null;
|
|
198
|
+
zoom: import("../types").Zoom;
|
|
199
|
+
scrollX: number;
|
|
200
|
+
scrollY: number;
|
|
201
|
+
hideAnnotations: boolean;
|
|
202
|
+
viewModeEnabled: boolean;
|
|
203
|
+
openDialog: null | {
|
|
204
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
205
|
+
} | {
|
|
206
|
+
name: "ttd";
|
|
207
|
+
tab: "text-to-diagram" | "mermaid";
|
|
208
|
+
} | {
|
|
209
|
+
name: "commandPalette";
|
|
210
|
+
} | {
|
|
211
|
+
name: "settings";
|
|
212
|
+
} | {
|
|
213
|
+
name: "elementLinkSelector";
|
|
214
|
+
sourceElementId: ExcalidrawElement["id"];
|
|
215
|
+
};
|
|
216
|
+
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
217
|
+
selectedElementIds: Readonly<{
|
|
218
|
+
[id: string]: true;
|
|
219
|
+
}>;
|
|
220
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
221
|
+
activeEmbeddable: {
|
|
222
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
223
|
+
state: "hover" | "active";
|
|
224
|
+
} | null;
|
|
225
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
226
|
+
selectedGroupIds: {
|
|
227
|
+
[groupId: string]: boolean;
|
|
228
|
+
};
|
|
229
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
230
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
231
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
232
|
+
isBindingEnabled: boolean;
|
|
233
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
234
|
+
isRotating: boolean;
|
|
235
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
236
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
237
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
238
|
+
zenModeEnabled: boolean;
|
|
239
|
+
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
240
|
+
isCropping: boolean;
|
|
241
|
+
croppingElementId: ExcalidrawElement["id"] | null;
|
|
242
|
+
searchMatches: Readonly<{
|
|
243
|
+
focusedId: ExcalidrawElement["id"] | null;
|
|
244
|
+
matches: readonly import("../types").SearchMatch[];
|
|
245
|
+
}> | null;
|
|
246
|
+
activeLockedId: string | null;
|
|
247
|
+
hoveredElementIds: Readonly<{
|
|
248
|
+
[id: string]: true;
|
|
249
|
+
}>;
|
|
250
|
+
shouldCacheIgnoreZoom: boolean;
|
|
251
|
+
exportScale: number;
|
|
252
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
253
|
+
gridSize: number;
|
|
254
|
+
contextMenu: {
|
|
255
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
256
|
+
top: number;
|
|
257
|
+
left: number;
|
|
258
|
+
} | null;
|
|
259
|
+
showWelcomeScreen: boolean;
|
|
260
|
+
isLoading: boolean;
|
|
261
|
+
errorMessage: React.ReactNode;
|
|
262
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
263
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
264
|
+
editingFrame: string | null;
|
|
265
|
+
activeTool: {
|
|
266
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
267
|
+
locked: boolean;
|
|
268
|
+
fromSelection: boolean;
|
|
269
|
+
} & import("../types").ActiveTool;
|
|
270
|
+
preferredSelectionTool: {
|
|
271
|
+
type: "selection" | "lasso";
|
|
272
|
+
initialized: boolean;
|
|
273
|
+
};
|
|
274
|
+
penMode: boolean;
|
|
275
|
+
penDetected: boolean;
|
|
276
|
+
exportBackground: boolean;
|
|
277
|
+
exportEmbedScene: boolean;
|
|
278
|
+
exportWithDarkMode: boolean;
|
|
279
|
+
currentItemStrokeColor: string;
|
|
280
|
+
currentItemBackgroundColor: string;
|
|
281
|
+
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
282
|
+
currentItemStrokeWidth: number;
|
|
283
|
+
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
284
|
+
currentItemRoughness: number;
|
|
285
|
+
currentItemOpacity: number;
|
|
286
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
287
|
+
currentItemFontSize: number;
|
|
288
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
289
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
290
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
291
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
292
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
293
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
294
|
+
cursorButton: "up" | "down";
|
|
295
|
+
scrolledOutside: boolean;
|
|
296
|
+
isResizing: boolean;
|
|
297
|
+
openMenu: "canvas" | null;
|
|
298
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
299
|
+
openSidebar: {
|
|
300
|
+
name: import("../types").SidebarName;
|
|
301
|
+
tab?: import("../types").SidebarTabName;
|
|
302
|
+
} | null;
|
|
303
|
+
defaultSidebarDockedPreference: boolean;
|
|
304
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
305
|
+
previousSelectedElementIds: {
|
|
306
|
+
[id: string]: true;
|
|
307
|
+
};
|
|
308
|
+
selectedElementsAreBeingDragged: boolean;
|
|
309
|
+
toast: {
|
|
310
|
+
message: string;
|
|
311
|
+
closable?: boolean;
|
|
312
|
+
duration?: number;
|
|
313
|
+
} | null;
|
|
314
|
+
gridStep: number;
|
|
315
|
+
gridModeEnabled: boolean;
|
|
316
|
+
fileHandle: FileSystemHandle | null;
|
|
317
|
+
stats: {
|
|
318
|
+
open: boolean;
|
|
319
|
+
panels: number;
|
|
320
|
+
};
|
|
321
|
+
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
322
|
+
pasteDialog: {
|
|
323
|
+
shown: false;
|
|
324
|
+
data: null;
|
|
325
|
+
} | {
|
|
326
|
+
shown: true;
|
|
327
|
+
data: import("../charts").Spreadsheet;
|
|
328
|
+
};
|
|
329
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
330
|
+
originSnapOffset: {
|
|
331
|
+
x: number;
|
|
332
|
+
y: number;
|
|
333
|
+
} | null;
|
|
334
|
+
objectsSnapModeEnabled: boolean;
|
|
335
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
336
|
+
followedBy: Set<import("../types").SocketId>;
|
|
337
|
+
lockedMultiSelections: {
|
|
338
|
+
[groupId: string]: true;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
files: import("../types").BinaryFiles;
|
|
342
|
+
}>;
|
|
31
343
|
export declare const parseLibraryJSON: (json: string, defaultStatus?: LibraryItem["status"]) => LibraryItem[];
|
|
32
344
|
export declare const loadLibraryFromBlob: (blob: Blob, defaultStatus?: LibraryItem["status"]) => Promise<LibraryItem[]>;
|
|
33
345
|
export declare const canvasToBlob: (canvas: HTMLCanvasElement | Promise<HTMLCanvasElement>) => Promise<Blob>;
|
|
@@ -7,7 +7,163 @@ export declare const saveAsJSON: (elements: readonly ExcalidrawElement[], appSta
|
|
|
7
7
|
name?: string) => Promise<{
|
|
8
8
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
9
9
|
}>;
|
|
10
|
-
export declare const loadFromJSON: (localAppState: AppState, localElements: readonly ExcalidrawElement[] | null) => Promise<
|
|
10
|
+
export declare const loadFromJSON: (localAppState: AppState, localElements: readonly ExcalidrawElement[] | null) => Promise<{
|
|
11
|
+
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
12
|
+
appState: {
|
|
13
|
+
viewBackgroundColor: string;
|
|
14
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
15
|
+
frameRendering: {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
name: boolean;
|
|
18
|
+
outline: boolean;
|
|
19
|
+
clip: boolean;
|
|
20
|
+
};
|
|
21
|
+
name: string | null;
|
|
22
|
+
zoom: import("../types").Zoom;
|
|
23
|
+
scrollX: number;
|
|
24
|
+
scrollY: number;
|
|
25
|
+
hideAnnotations: boolean;
|
|
26
|
+
viewModeEnabled: boolean;
|
|
27
|
+
openDialog: null | {
|
|
28
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
29
|
+
} | {
|
|
30
|
+
name: "ttd";
|
|
31
|
+
tab: "text-to-diagram" | "mermaid";
|
|
32
|
+
} | {
|
|
33
|
+
name: "commandPalette";
|
|
34
|
+
} | {
|
|
35
|
+
name: "settings";
|
|
36
|
+
} | {
|
|
37
|
+
name: "elementLinkSelector";
|
|
38
|
+
sourceElementId: ExcalidrawElement["id"];
|
|
39
|
+
};
|
|
40
|
+
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
41
|
+
selectedElementIds: Readonly<{
|
|
42
|
+
[id: string]: true;
|
|
43
|
+
}>;
|
|
44
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
45
|
+
activeEmbeddable: {
|
|
46
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
47
|
+
state: "hover" | "active";
|
|
48
|
+
} | null;
|
|
49
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
50
|
+
selectedGroupIds: {
|
|
51
|
+
[groupId: string]: boolean;
|
|
52
|
+
};
|
|
53
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
54
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
55
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
56
|
+
isBindingEnabled: boolean;
|
|
57
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
58
|
+
isRotating: boolean;
|
|
59
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
60
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
61
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
62
|
+
zenModeEnabled: boolean;
|
|
63
|
+
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
64
|
+
isCropping: boolean;
|
|
65
|
+
croppingElementId: ExcalidrawElement["id"] | null;
|
|
66
|
+
searchMatches: Readonly<{
|
|
67
|
+
focusedId: ExcalidrawElement["id"] | null;
|
|
68
|
+
matches: readonly import("../types").SearchMatch[];
|
|
69
|
+
}> | null;
|
|
70
|
+
activeLockedId: string | null;
|
|
71
|
+
hoveredElementIds: Readonly<{
|
|
72
|
+
[id: string]: true;
|
|
73
|
+
}>;
|
|
74
|
+
shouldCacheIgnoreZoom: boolean;
|
|
75
|
+
exportScale: number;
|
|
76
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
77
|
+
gridSize: number;
|
|
78
|
+
contextMenu: {
|
|
79
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
80
|
+
top: number;
|
|
81
|
+
left: number;
|
|
82
|
+
} | null;
|
|
83
|
+
showWelcomeScreen: boolean;
|
|
84
|
+
isLoading: boolean;
|
|
85
|
+
errorMessage: React.ReactNode;
|
|
86
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
87
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
88
|
+
editingFrame: string | null;
|
|
89
|
+
activeTool: {
|
|
90
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
91
|
+
locked: boolean;
|
|
92
|
+
fromSelection: boolean;
|
|
93
|
+
} & import("../types").ActiveTool;
|
|
94
|
+
preferredSelectionTool: {
|
|
95
|
+
type: "selection" | "lasso";
|
|
96
|
+
initialized: boolean;
|
|
97
|
+
};
|
|
98
|
+
penMode: boolean;
|
|
99
|
+
penDetected: boolean;
|
|
100
|
+
exportBackground: boolean;
|
|
101
|
+
exportEmbedScene: boolean;
|
|
102
|
+
exportWithDarkMode: boolean;
|
|
103
|
+
currentItemStrokeColor: string;
|
|
104
|
+
currentItemBackgroundColor: string;
|
|
105
|
+
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
106
|
+
currentItemStrokeWidth: number;
|
|
107
|
+
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
108
|
+
currentItemRoughness: number;
|
|
109
|
+
currentItemOpacity: number;
|
|
110
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
111
|
+
currentItemFontSize: number;
|
|
112
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
113
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
114
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
115
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
116
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
117
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
118
|
+
cursorButton: "up" | "down";
|
|
119
|
+
scrolledOutside: boolean;
|
|
120
|
+
isResizing: boolean;
|
|
121
|
+
openMenu: "canvas" | null;
|
|
122
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
123
|
+
openSidebar: {
|
|
124
|
+
name: import("../types").SidebarName;
|
|
125
|
+
tab?: import("../types").SidebarTabName;
|
|
126
|
+
} | null;
|
|
127
|
+
defaultSidebarDockedPreference: boolean;
|
|
128
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
129
|
+
previousSelectedElementIds: {
|
|
130
|
+
[id: string]: true;
|
|
131
|
+
};
|
|
132
|
+
selectedElementsAreBeingDragged: boolean;
|
|
133
|
+
toast: {
|
|
134
|
+
message: string;
|
|
135
|
+
closable?: boolean;
|
|
136
|
+
duration?: number;
|
|
137
|
+
} | null;
|
|
138
|
+
gridStep: number;
|
|
139
|
+
gridModeEnabled: boolean;
|
|
140
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
141
|
+
stats: {
|
|
142
|
+
open: boolean;
|
|
143
|
+
panels: number;
|
|
144
|
+
};
|
|
145
|
+
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
146
|
+
pasteDialog: {
|
|
147
|
+
shown: false;
|
|
148
|
+
data: null;
|
|
149
|
+
} | {
|
|
150
|
+
shown: true;
|
|
151
|
+
data: import("../charts").Spreadsheet;
|
|
152
|
+
};
|
|
153
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
154
|
+
originSnapOffset: {
|
|
155
|
+
x: number;
|
|
156
|
+
y: number;
|
|
157
|
+
} | null;
|
|
158
|
+
objectsSnapModeEnabled: boolean;
|
|
159
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
160
|
+
followedBy: Set<import("../types").SocketId>;
|
|
161
|
+
lockedMultiSelections: {
|
|
162
|
+
[groupId: string]: true;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
files: BinaryFiles;
|
|
166
|
+
}>;
|
|
11
167
|
export declare const isValidExcalidrawData: (data?: {
|
|
12
168
|
type?: any;
|
|
13
169
|
elements?: any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CombineBrandsIfNeeded } from "@excalidraw/common";
|
|
1
2
|
import type { ElementsMap, ElementsMapOrArray, ExcalidrawElement, ExcalidrawSelectionElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
3
|
import type { AppState, BinaryFiles, LibraryItem } from "../types";
|
|
3
4
|
import type { ImportedDataState } from "./types";
|
|
@@ -8,28 +9,33 @@ export type RestoredDataState = {
|
|
|
8
9
|
appState: RestoredAppState;
|
|
9
10
|
files: BinaryFiles;
|
|
10
11
|
};
|
|
11
|
-
export declare const restoreElement: (
|
|
12
|
+
export declare const restoreElement: (
|
|
13
|
+
/** element to be restored */
|
|
14
|
+
element: Exclude<ExcalidrawElement, ExcalidrawSelectionElement>,
|
|
15
|
+
/** all elements to be restored */
|
|
16
|
+
targetElementsMap: Readonly<ElementsMap>,
|
|
17
|
+
/** used for additional context */
|
|
18
|
+
existingElementsMap: Readonly<ElementsMap> | null | undefined, opts?: {
|
|
12
19
|
deleteInvisibleElements?: boolean;
|
|
13
20
|
}) => typeof element | null;
|
|
14
|
-
export declare const restoreElements: (targetElements:
|
|
15
|
-
/**
|
|
16
|
-
|
|
21
|
+
export declare const restoreElements: <T extends ExcalidrawElement>(targetElements: readonly T[] | undefined | null,
|
|
22
|
+
/** used for additional context (e.g. repairing arrow bindings) */
|
|
23
|
+
existingElements: Readonly<ElementsMapOrArray> | null | undefined, opts?: {
|
|
17
24
|
refreshDimensions?: boolean;
|
|
18
25
|
repairBindings?: boolean;
|
|
19
26
|
deleteInvisibleElements?: boolean;
|
|
20
|
-
} | undefined) => OrderedExcalidrawElement
|
|
21
|
-
export declare const restoreAppState: (appState: ImportedDataState["appState"], localAppState: Partial<AppState> | null | undefined) => RestoredAppState;
|
|
22
|
-
export declare const restore: (data: Pick<ImportedDataState, "appState" | "elements" | "files"> | null,
|
|
27
|
+
} | undefined) => CombineBrandsIfNeeded<T, OrderedExcalidrawElement>;
|
|
23
28
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
29
|
+
* When replacing elements that may exist locally, this bumps their versions
|
|
30
|
+
* to the local version + 1. Mainly for later reconciliation to work properly.
|
|
31
|
+
*
|
|
32
|
+
* See https://github.com/excalidraw/excalidraw/issues/3795
|
|
33
|
+
*
|
|
34
|
+
* Generally use this on editor boundaries (importing from file etc.), though
|
|
35
|
+
* it does not apply universally (e.g. we don't want to do this for collab
|
|
36
|
+
* updates).
|
|
28
37
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
repairBindings?: boolean;
|
|
32
|
-
deleteInvisibleElements?: boolean;
|
|
33
|
-
}) => RestoredDataState;
|
|
38
|
+
export declare const bumpElementVersions: <T extends ExcalidrawElement>(targetElements: readonly T[], localElements: Readonly<ElementsMapOrArray> | null | undefined) => T[];
|
|
39
|
+
export declare const restoreAppState: (appState: ImportedDataState["appState"], localAppState: Partial<AppState> | null | undefined) => RestoredAppState;
|
|
34
40
|
export declare const restoreLibraryItems: (libraryItems: ImportedDataState["libraryItems"], defaultStatus: LibraryItem["status"]) => LibraryItem[];
|
|
35
41
|
export {};
|
|
@@ -12,12 +12,11 @@ export { getSceneVersion, hashElementsVersion, hashString, getNonDeletedElements
|
|
|
12
12
|
export { getTextFromElements } from "@excalidraw/element";
|
|
13
13
|
export { isInvisiblySmallElement } from "@excalidraw/element";
|
|
14
14
|
export { defaultLang, useI18n, languages } from "./i18n";
|
|
15
|
-
export {
|
|
15
|
+
export { restoreAppState, restoreElement, restoreElements, restoreLibraryItems, } from "./data/restore";
|
|
16
16
|
export { reconcileElements } from "./data/reconcile";
|
|
17
17
|
export { exportToCanvas, exportToBlob, exportToSvg, exportToClipboard, } from "@excalidraw/utils/export";
|
|
18
18
|
export { serializeAsJSON, serializeLibraryAsJSON } from "./data/json";
|
|
19
19
|
export { loadFromBlob, loadSceneOrLibraryFromBlob, loadLibraryFromBlob, } from "./data/blob";
|
|
20
|
-
export { getFreeDrawSvgPath } from "@excalidraw/element";
|
|
21
20
|
export { mergeLibraryItems, getLibraryItemsHash } from "./data/library";
|
|
22
21
|
export { isLinearElement } from "@excalidraw/element";
|
|
23
22
|
export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS, DEFAULT_LASER_COLOR, UserIdleState, normalizeLink, sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, getFormFactor, } from "@excalidraw/common";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
2
|
import type { Scene } from "@excalidraw/element";
|
|
3
|
+
import type { RenderableElementsMap } from "./types";
|
|
3
4
|
import type { AppState } from "../types";
|
|
4
5
|
export declare class Renderer {
|
|
5
6
|
private scene;
|
|
@@ -21,7 +22,7 @@ export declare class Renderer {
|
|
|
21
22
|
sceneNonce: ReturnType<InstanceType<typeof Scene>["getSceneNonce"]>;
|
|
22
23
|
hideAnnotations: AppState["hideAnnotations"];
|
|
23
24
|
}) => {
|
|
24
|
-
elementsMap:
|
|
25
|
+
elementsMap: RenderableElementsMap;
|
|
25
26
|
visibleElements: readonly NonDeletedExcalidrawElement[];
|
|
26
27
|
}) & {
|
|
27
28
|
clear: () => void;
|
|
@@ -15,6 +15,7 @@ export type StaticCanvasRenderConfig = {
|
|
|
15
15
|
embedsValidationStatus: EmbedsValidationStatus;
|
|
16
16
|
elementsPendingErasure: ElementsPendingErasure;
|
|
17
17
|
pendingFlowchartNodes: PendingExcalidrawElements | null;
|
|
18
|
+
theme: AppState["theme"];
|
|
18
19
|
};
|
|
19
20
|
export type SVGRenderConfig = {
|
|
20
21
|
offsetX: number;
|
|
@@ -32,6 +33,7 @@ export type SVGRenderConfig = {
|
|
|
32
33
|
* @default true
|
|
33
34
|
*/
|
|
34
35
|
reuseImages: boolean;
|
|
36
|
+
theme: AppState["theme"];
|
|
35
37
|
};
|
|
36
38
|
export type InteractiveCanvasRenderConfig = {
|
|
37
39
|
remoteSelectedElementIds: Map<ExcalidrawElement["id"], SocketId[]>;
|
|
@@ -115,14 +117,17 @@ export type ScrollBars = {
|
|
|
115
117
|
deltaMultiplier: number;
|
|
116
118
|
} | null;
|
|
117
119
|
};
|
|
118
|
-
export type
|
|
120
|
+
export type SVGPathString = string & {
|
|
121
|
+
__brand: "SVGPathString";
|
|
122
|
+
};
|
|
123
|
+
export type ElementShape = Drawable | Drawable[] | Path2D | (Drawable | SVGPathString)[] | null;
|
|
119
124
|
export type ElementShapes = {
|
|
120
125
|
rectangle: Drawable;
|
|
121
126
|
ellipse: Drawable;
|
|
122
127
|
diamond: Drawable;
|
|
123
128
|
iframe: Drawable;
|
|
124
129
|
embeddable: Drawable;
|
|
125
|
-
freedraw: Drawable |
|
|
130
|
+
freedraw: (Drawable | SVGPathString)[];
|
|
126
131
|
arrow: Drawable[];
|
|
127
132
|
line: Drawable[];
|
|
128
133
|
text: null;
|
|
@@ -13,9 +13,7 @@ export declare function rangeInclusive(start: number, end: number): InclusiveRan
|
|
|
13
13
|
* @param pair The number pair to convert to an inclusive range
|
|
14
14
|
* @returns The new inclusive range
|
|
15
15
|
*/
|
|
16
|
-
export declare function rangeInclusiveFromPair(pair: [start: number, end: number]):
|
|
17
|
-
_brand: "excalimath_degree";
|
|
18
|
-
};
|
|
16
|
+
export declare function rangeInclusiveFromPair(pair: [start: number, end: number]): InclusiveRange;
|
|
19
17
|
/**
|
|
20
18
|
* Given two ranges, return if the two ranges overlap with each other e.g.
|
|
21
19
|
* [1, 3] overlaps with [2, 4] while [1, 3] does not overlap with [4, 5].
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildmio/excalidraw",
|
|
3
|
-
"version": "0.18.0-custom.
|
|
3
|
+
"version": "0.18.0-custom.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/excalidraw/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -79,10 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@braintree/sanitize-url": "6.0.2",
|
|
82
|
-
"@excalidraw/common": "0.18.0",
|
|
83
|
-
"@excalidraw/element": "0.18.0",
|
|
84
82
|
"@excalidraw/laser-pointer": "1.3.1",
|
|
85
|
-
"@excalidraw/math": "0.18.0",
|
|
86
83
|
"@excalidraw/mermaid-to-excalidraw": "1.1.3",
|
|
87
84
|
"@excalidraw/random-username": "1.1.0",
|
|
88
85
|
"@radix-ui/react-popover": "1.1.6",
|
|
@@ -114,6 +111,9 @@
|
|
|
114
111
|
"tunnel-rat": "0.1.2"
|
|
115
112
|
},
|
|
116
113
|
"devDependencies": {
|
|
114
|
+
"@excalidraw/common": "0.18.0",
|
|
115
|
+
"@excalidraw/element": "0.18.0",
|
|
116
|
+
"@excalidraw/math": "0.18.0",
|
|
117
117
|
"@size-limit/preset-big-lib": "9.0.0",
|
|
118
118
|
"@testing-library/dom": "10.4.0",
|
|
119
119
|
"@testing-library/jest-dom": "6.6.3",
|