@excalidraw/excalidraw 0.15.2-6546-5841e6a → 0.15.2-7bf4de5
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/excalidraw-assets/locales/{de-DE-json-b03af65bb5eff6d7023b.js → de-DE-json-4050a2f4d10ce9ba2556.js} +1 -1
- package/dist/excalidraw-assets/locales/{el-GR-json-ca506c54e42e135959b0.js → el-GR-json-3c7e45960a069039165d.js} +1 -1
- package/dist/excalidraw-assets/locales/id-ID-json-4b165066b85ef8e73f84.js +1 -0
- package/dist/excalidraw-assets/locales/it-IT-json-482ec692b8ab359f7deb.js +1 -0
- package/dist/excalidraw-assets/locales/km-KH-json-621814e1e27548a5d3d0.js +1 -0
- package/dist/excalidraw-assets/locales/{ko-KR-json-d347255ddd5b17936d70.js → ko-KR-json-12c3f447f773085f9c2d.js} +1 -1
- package/dist/excalidraw-assets/locales/ku-TR-json-f207f47386f21115f012.js +1 -0
- package/dist/excalidraw-assets/locales/{nb-NO-json-fa893095b70cefc2f7e2.js → nb-NO-json-916932aaf93f186f7518.js} +1 -1
- package/dist/excalidraw-assets/locales/{pt-BR-json-fc4b878ac107c23255dd.js → pt-BR-json-8db8024c93d59622ac28.js} +1 -1
- package/dist/excalidraw-assets/locales/{pt-PT-json-47032f63e88e79dd73f2.js → pt-PT-json-66e01bca60abd8cc18c1.js} +1 -1
- package/dist/excalidraw-assets/locales/{ro-RO-json-cbce5205231a582024d7.js → ro-RO-json-1b5c748776b284870595.js} +1 -1
- package/dist/excalidraw-assets/locales/{ru-RU-json-99829b1ba9d5093b157b.js → ru-RU-json-ec7bf71dadfbb8504c34.js} +1 -1
- package/dist/excalidraw-assets/locales/{sk-SK-json-48d5acc83691a9e45243.js → sk-SK-json-08d2a7f31812fa1dda56.js} +1 -1
- package/dist/excalidraw-assets/locales/{sl-SI-json-2d3159666a9b694373e0.js → sl-SI-json-b3306d9804c23ee589c9.js} +1 -1
- package/dist/excalidraw-assets/locales/{sv-SE-json-81f406cec5a178dfc603.js → sv-SE-json-76f73b2f91a335951e59.js} +1 -1
- package/dist/excalidraw-assets/locales/{zh-CN-json-a4a9d3ae663b3dadfc4a.js → zh-CN-json-d4314ad82ce9e6ef7492.js} +1 -1
- package/dist/excalidraw-assets/locales/{zh-TW-json-666cdd14005847709d40.js → zh-TW-json-57ae53d76ba67416c6a1.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{de-DE-json-a7a0a7a8f371bc7ba5c0.js → de-DE-json-afda4ef5b8836be8cc9f.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{el-GR-json-f4a6ef403e57a5227a3a.js → el-GR-json-2274fe4deead6b64552d.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/id-ID-json-e7fc777529b21cb19221.js +22 -0
- package/dist/excalidraw-assets-dev/locales/it-IT-json-693318f639c2fb2dcafe.js +22 -0
- package/dist/excalidraw-assets-dev/locales/km-KH-json-d50e4e939ba65c556acc.js +22 -0
- package/dist/excalidraw-assets-dev/locales/{ko-KR-json-2d7d04482b8f94ac8f65.js → ko-KR-json-c10db000dc9531037e63.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/ku-TR-json-0f48476053944dd48c33.js +22 -0
- package/dist/excalidraw-assets-dev/locales/{nb-NO-json-06218da2a78c0389ca45.js → nb-NO-json-44f33d8288084d0c5cd2.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{pt-BR-json-cc1554e6671be344e008.js → pt-BR-json-65c3c99a0f2b7b20ac5a.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{pt-PT-json-0b332e1305fa14c732d0.js → pt-PT-json-8c0679d41abb9c045cf9.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{ro-RO-json-672a25ac3a7165011576.js → ro-RO-json-a6eb98c09f52a24df011.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{ru-RU-json-e88fc7d0b0022da65cd7.js → ru-RU-json-59b86dc559aee03fa6f9.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{sk-SK-json-0b543a434ec1a4cc2831.js → sk-SK-json-070630d5b8666cc385f5.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{sl-SI-json-3e7849fcb1fe7ed8e146.js → sl-SI-json-d9bdaef5881b5ea102e9.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{sv-SE-json-e594c928d13f0183f9bc.js → sv-SE-json-e9171127c102a366d2d4.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{zh-CN-json-8682588312662adaa170.js → zh-CN-json-e62fb6fca498ba7798b4.js} +1 -1
- package/dist/excalidraw-assets-dev/locales/{zh-TW-json-b4ebc4c389ccf204d77e.js → zh-TW-json-b9dd2a464ad3b323b9e7.js} +1 -1
- package/dist/excalidraw.development.js +204 -50
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionExport.d.ts +1 -1
- package/types/actions/actionFlip.d.ts +2 -4
- package/types/actions/manager.d.ts +1 -1
- package/types/components/Dialog.d.ts +2 -2
- package/types/components/FilledButton.d.ts +16 -0
- package/types/components/ImageExportDialog.d.ts +3 -4
- package/types/components/LibraryMenu.d.ts +2 -2
- package/types/components/LibraryMenuItems.d.ts +4 -5
- package/types/components/LibraryMenuSection.d.ts +22 -0
- package/types/components/LibraryUnit.d.ts +7 -3
- package/types/components/ProjectName.d.ts +1 -0
- package/types/components/RadioGroup.d.ts +12 -0
- package/types/components/Spinner.d.ts +2 -1
- package/types/components/Stack.d.ts +3 -2
- package/types/components/Switch.d.ts +9 -0
- package/types/components/icons.d.ts +6 -0
- package/types/data/library.d.ts +2 -0
- package/types/data/restore.d.ts +1 -10
- package/types/data/types.d.ts +2 -47
- package/types/element/binding.d.ts +0 -1
- package/types/element/newElement.d.ts +5 -9
- package/types/element/resizeElements.d.ts +1 -0
- package/types/element/textElement.d.ts +3 -4
- package/types/hooks/useLibraryItemSvg.d.ts +31 -0
- package/types/hooks/useScrollPosition.d.ts +2 -0
- package/types/hooks/useTransition.d.ts +2 -0
- package/types/packages/excalidraw/example/initialData.d.ts +16 -90
- package/dist/excalidraw-assets/locales/id-ID-json-d1156d23b30643d02794.js +0 -1
- package/dist/excalidraw-assets/locales/it-IT-json-304768049d19d44f8b7c.js +0 -1
- package/dist/excalidraw-assets/locales/km-KH-json-93e08aa0ef1c18f9abe6.js +0 -1
- package/dist/excalidraw-assets/locales/ku-TR-json-1ce02dc10f8f18a3e609.js +0 -1
- package/dist/excalidraw-assets-dev/locales/id-ID-json-40f01633ae6046a20158.js +0 -22
- package/dist/excalidraw-assets-dev/locales/it-IT-json-395bb09586a95a3c7a0c.js +0 -22
- package/dist/excalidraw-assets-dev/locales/km-KH-json-5f033ad55694d12c770d.js +0 -22
- package/dist/excalidraw-assets-dev/locales/ku-TR-json-0dfab20d9c6ac0da2776.js +0 -22
- package/types/data/transform.d.ts +0 -4
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{de-DE-json-b03af65bb5eff6d7023b.d.ts → de-DE-json-4050a2f4d10ce9ba2556.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{el-GR-json-ca506c54e42e135959b0.d.ts → el-GR-json-3c7e45960a069039165d.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{id-ID-json-d1156d23b30643d02794.d.ts → id-ID-json-4b165066b85ef8e73f84.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{it-IT-json-304768049d19d44f8b7c.d.ts → it-IT-json-482ec692b8ab359f7deb.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{km-KH-json-93e08aa0ef1c18f9abe6.d.ts → km-KH-json-621814e1e27548a5d3d0.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ko-KR-json-d347255ddd5b17936d70.d.ts → ko-KR-json-12c3f447f773085f9c2d.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ku-TR-json-1ce02dc10f8f18a3e609.d.ts → ku-TR-json-f207f47386f21115f012.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{nb-NO-json-fa893095b70cefc2f7e2.d.ts → nb-NO-json-916932aaf93f186f7518.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pt-BR-json-fc4b878ac107c23255dd.d.ts → pt-BR-json-8db8024c93d59622ac28.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pt-PT-json-47032f63e88e79dd73f2.d.ts → pt-PT-json-66e01bca60abd8cc18c1.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ro-RO-json-cbce5205231a582024d7.d.ts → ro-RO-json-1b5c748776b284870595.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ru-RU-json-99829b1ba9d5093b157b.d.ts → ru-RU-json-ec7bf71dadfbb8504c34.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{sk-SK-json-48d5acc83691a9e45243.d.ts → sk-SK-json-08d2a7f31812fa1dda56.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{sl-SI-json-2d3159666a9b694373e0.d.ts → sl-SI-json-b3306d9804c23ee589c9.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{sv-SE-json-81f406cec5a178dfc603.d.ts → sv-SE-json-76f73b2f91a335951e59.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{zh-CN-json-a4a9d3ae663b3dadfc4a.d.ts → zh-CN-json-d4314ad82ce9e6ef7492.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{zh-TW-json-666cdd14005847709d40.d.ts → zh-TW-json-57ae53d76ba67416c6a1.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{de-DE-json-a7a0a7a8f371bc7ba5c0.d.ts → de-DE-json-afda4ef5b8836be8cc9f.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{el-GR-json-f4a6ef403e57a5227a3a.d.ts → el-GR-json-2274fe4deead6b64552d.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{id-ID-json-40f01633ae6046a20158.d.ts → id-ID-json-e7fc777529b21cb19221.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{it-IT-json-395bb09586a95a3c7a0c.d.ts → it-IT-json-693318f639c2fb2dcafe.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{km-KH-json-5f033ad55694d12c770d.d.ts → km-KH-json-d50e4e939ba65c556acc.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ko-KR-json-2d7d04482b8f94ac8f65.d.ts → ko-KR-json-c10db000dc9531037e63.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ku-TR-json-0dfab20d9c6ac0da2776.d.ts → ku-TR-json-0f48476053944dd48c33.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{nb-NO-json-06218da2a78c0389ca45.d.ts → nb-NO-json-44f33d8288084d0c5cd2.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{pt-BR-json-cc1554e6671be344e008.d.ts → pt-BR-json-65c3c99a0f2b7b20ac5a.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{pt-PT-json-0b332e1305fa14c732d0.d.ts → pt-PT-json-8c0679d41abb9c045cf9.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ro-RO-json-672a25ac3a7165011576.d.ts → ro-RO-json-a6eb98c09f52a24df011.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ru-RU-json-e88fc7d0b0022da65cd7.d.ts → ru-RU-json-59b86dc559aee03fa6f9.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{sk-SK-json-0b543a434ec1a4cc2831.d.ts → sk-SK-json-070630d5b8666cc385f5.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{sl-SI-json-3e7849fcb1fe7ed8e146.d.ts → sl-SI-json-d9bdaef5881b5ea102e9.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{sv-SE-json-e594c928d13f0183f9bc.d.ts → sv-SE-json-e9171127c102a366d2d4.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{zh-CN-json-8682588312662adaa170.d.ts → zh-CN-json-e62fb6fca498ba7798b4.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{zh-TW-json-b4ebc4c389ccf204d77e.d.ts → zh-TW-json-b9dd2a464ad3b323b9e7.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -112,7 +112,7 @@ export declare const actionChangeProjectName: {
|
|
|
112
112
|
};
|
|
113
113
|
commitToHistory: false;
|
|
114
114
|
};
|
|
115
|
-
PanelComponent: ({ appState, updateData, appProps }: import("./types").PanelComponentProps) => JSX.Element;
|
|
115
|
+
PanelComponent: ({ appState, updateData, appProps, data }: import("./types").PanelComponentProps) => JSX.Element;
|
|
116
116
|
} & {
|
|
117
117
|
keyTest?: undefined;
|
|
118
118
|
};
|
|
@@ -7,13 +7,12 @@ export declare const actionFlipHorizontal: {
|
|
|
7
7
|
category: "element";
|
|
8
8
|
};
|
|
9
9
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
10
|
-
elements:
|
|
10
|
+
elements: ExcalidrawElement[];
|
|
11
11
|
appState: Readonly<AppState>;
|
|
12
12
|
commitToHistory: true;
|
|
13
13
|
};
|
|
14
14
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
15
15
|
contextItemLabel: string;
|
|
16
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
17
16
|
} & {
|
|
18
17
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
19
18
|
};
|
|
@@ -23,13 +22,12 @@ export declare const actionFlipVertical: {
|
|
|
23
22
|
category: "element";
|
|
24
23
|
};
|
|
25
24
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
26
|
-
elements:
|
|
25
|
+
elements: ExcalidrawElement[];
|
|
27
26
|
appState: Readonly<AppState>;
|
|
28
27
|
commitToHistory: true;
|
|
29
28
|
};
|
|
30
29
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
31
30
|
contextItemLabel: string;
|
|
32
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
33
31
|
} & {
|
|
34
32
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
35
33
|
};
|
|
@@ -12,7 +12,7 @@ export declare class ActionManager {
|
|
|
12
12
|
registerAction(action: Action): void;
|
|
13
13
|
registerAll(actions: readonly Action[]): void;
|
|
14
14
|
handleKeyDown(event: React.KeyboardEvent | KeyboardEvent): boolean;
|
|
15
|
-
executeAction(action: Action, source?: ActionSource): void;
|
|
15
|
+
executeAction(action: Action, source?: ActionSource, value?: any): void;
|
|
16
16
|
/**
|
|
17
17
|
* @param data additional data sent to the PanelComponent
|
|
18
18
|
*/
|
|
@@ -4,9 +4,9 @@ import { AppState } from "../types";
|
|
|
4
4
|
export interface DialogProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
-
|
|
7
|
+
size?: "small" | "regular" | "wide";
|
|
8
8
|
onCloseRequest(): void;
|
|
9
|
-
title: React.ReactNode;
|
|
9
|
+
title: React.ReactNode | false;
|
|
10
10
|
autofocus?: boolean;
|
|
11
11
|
theme?: AppState["theme"];
|
|
12
12
|
closeOnClickOutside?: boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./FilledButton.scss";
|
|
3
|
+
export type ButtonVariant = "filled" | "outlined" | "icon";
|
|
4
|
+
export type ButtonColor = "primary" | "danger";
|
|
5
|
+
export type ButtonSize = "medium" | "large";
|
|
6
|
+
export type FilledButtonProps = {
|
|
7
|
+
label: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
variant?: ButtonVariant;
|
|
11
|
+
color?: ButtonColor;
|
|
12
|
+
size?: ButtonSize;
|
|
13
|
+
className?: string;
|
|
14
|
+
startIcon?: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export declare const FilledButton: React.ForwardRefExoticComponent<FilledButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import type { ActionManager } from "../actions/manager";
|
|
2
|
+
import type { AppClassProperties, BinaryFiles, UIAppState } from "../types";
|
|
1
3
|
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
2
|
-
import
|
|
3
|
-
import { ActionManager } from "../actions/manager";
|
|
4
|
-
import "./ExportDialog.scss";
|
|
4
|
+
import "./ImageExportDialog.scss";
|
|
5
5
|
export declare const ErrorCanvasPreview: () => JSX.Element;
|
|
6
|
-
export type ExportCB = (elements: readonly NonDeletedExcalidrawElement[], scale?: number) => void;
|
|
7
6
|
export declare const ImageExportDialog: ({ elements, appState, files, actionManager, onExportImage, onCloseRequest, }: {
|
|
8
7
|
appState: UIAppState;
|
|
9
8
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
@@ -25,7 +25,7 @@ export declare const isLibraryMenuOpenAtom: import("jotai").Atom<boolean> & {
|
|
|
25
25
|
} & {
|
|
26
26
|
init: boolean;
|
|
27
27
|
};
|
|
28
|
-
export declare const LibraryMenuContent: ({ onInsertLibraryItems, pendingElements, onAddToLibrary, setAppState, libraryReturnUrl, library, id,
|
|
28
|
+
export declare const LibraryMenuContent: ({ onInsertLibraryItems, pendingElements, onAddToLibrary, setAppState, libraryReturnUrl, library, id, theme, selectedItems, onSelectItems, }: {
|
|
29
29
|
pendingElements: LibraryItem["elements"];
|
|
30
30
|
onInsertLibraryItems: (libraryItems: LibraryItems) => void;
|
|
31
31
|
onAddToLibrary: () => void;
|
|
@@ -33,7 +33,7 @@ export declare const LibraryMenuContent: ({ onInsertLibraryItems, pendingElement
|
|
|
33
33
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
34
34
|
library: Library;
|
|
35
35
|
id: string;
|
|
36
|
-
|
|
36
|
+
theme: UIAppState["theme"];
|
|
37
37
|
selectedItems: LibraryItem["id"][];
|
|
38
38
|
onSelectItems: (id: LibraryItem["id"][]) => void;
|
|
39
39
|
}) => JSX.Element;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ExcalidrawProps, LibraryItem, LibraryItems, UIAppState } from "../types";
|
|
2
2
|
import "./LibraryMenuItems.scss";
|
|
3
|
-
|
|
3
|
+
export default function LibraryMenuItems({ isLoading, libraryItems, onAddToLibrary, onInsertLibraryItems, pendingElements, theme, id, libraryReturnUrl, onSelectItems, selectedItems, }: {
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
libraryItems: LibraryItems;
|
|
6
6
|
pendingElements: LibraryItem["elements"];
|
|
7
7
|
onInsertLibraryItems: (libraryItems: LibraryItems) => void;
|
|
8
8
|
onAddToLibrary: (elements: LibraryItem["elements"]) => void;
|
|
9
|
-
selectedItems: LibraryItem["id"][];
|
|
10
|
-
onSelectItems: (id: LibraryItem["id"][]) => void;
|
|
11
9
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
12
10
|
theme: UIAppState["theme"];
|
|
13
11
|
id: string;
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
selectedItems: LibraryItem["id"][];
|
|
13
|
+
onSelectItems: (id: LibraryItem["id"][]) => void;
|
|
14
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { LibraryItem } from "../types";
|
|
3
|
+
import { ExcalidrawElement, NonDeleted } from "../element/types";
|
|
4
|
+
import { SvgCache } from "../hooks/useLibraryItemSvg";
|
|
5
|
+
type LibraryOrPendingItem = (LibraryItem | /* pending library item */ {
|
|
6
|
+
id: null;
|
|
7
|
+
elements: readonly NonDeleted<ExcalidrawElement>[];
|
|
8
|
+
})[];
|
|
9
|
+
interface Props {
|
|
10
|
+
items: LibraryOrPendingItem;
|
|
11
|
+
onClick: (id: LibraryItem["id"] | null) => void;
|
|
12
|
+
onItemSelectToggle: (id: LibraryItem["id"], event: React.MouseEvent) => void;
|
|
13
|
+
onItemDrag: (id: LibraryItem["id"], event: React.DragEvent) => void;
|
|
14
|
+
isItemSelected: (id: LibraryItem["id"] | null) => boolean;
|
|
15
|
+
svgCache: SvgCache;
|
|
16
|
+
itemsRenderedPerBatch: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const LibraryMenuSectionGrid: ({ children, }: {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}) => JSX.Element;
|
|
21
|
+
export declare const LibraryMenuSection: React.MemoExoticComponent<({ items, onItemSelectToggle, onItemDrag, isItemSelected, onClick, svgCache, itemsRenderedPerBatch, }: Props) => JSX.Element>;
|
|
22
|
+
export {};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { LibraryItem } from "../types";
|
|
2
3
|
import "./LibraryUnit.scss";
|
|
3
|
-
|
|
4
|
+
import { SvgCache } from "../hooks/useLibraryItemSvg";
|
|
5
|
+
export declare const LibraryUnit: import("react").MemoExoticComponent<({ id, elements, isPending, onClick, selected, onToggle, onDrag, svgCache, }: {
|
|
4
6
|
id: LibraryItem["id"] | /** for pending item */ null;
|
|
5
7
|
elements?: readonly import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | undefined;
|
|
6
8
|
isPending?: boolean | undefined;
|
|
7
|
-
onClick: () => void;
|
|
9
|
+
onClick: (id: LibraryItem["id"] | null) => void;
|
|
8
10
|
selected: boolean;
|
|
9
11
|
onToggle: (id: string, event: React.MouseEvent) => void;
|
|
10
12
|
onDrag: (id: string, event: React.DragEvent) => void;
|
|
11
|
-
|
|
13
|
+
svgCache: SvgCache;
|
|
14
|
+
}) => JSX.Element>;
|
|
15
|
+
export declare const EmptyLibraryUnit: () => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./RadioGroup.scss";
|
|
2
|
+
export type RadioGroupChoice<T> = {
|
|
3
|
+
value: T;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export type RadioGroupProps<T> = {
|
|
7
|
+
choices: RadioGroupChoice<T>[];
|
|
8
|
+
value: T;
|
|
9
|
+
onChange: (value: T) => void;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const RadioGroup: <T>({ onChange, value, choices, name, }: RadioGroupProps<T>) => JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "./Spinner.scss";
|
|
2
|
-
declare const Spinner: ({ size, circleWidth, }: {
|
|
2
|
+
declare const Spinner: ({ size, circleWidth, synchronized, }: {
|
|
3
3
|
size?: string | number | undefined;
|
|
4
4
|
circleWidth?: number | undefined;
|
|
5
|
+
synchronized?: boolean | undefined;
|
|
5
6
|
}) => JSX.Element;
|
|
6
7
|
export default Spinner;
|
|
@@ -7,9 +7,10 @@ type StackProps = {
|
|
|
7
7
|
justifyContent?: "center" | "space-around" | "space-between";
|
|
8
8
|
className?: string | boolean;
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
|
+
ref: React.RefObject<HTMLDivElement>;
|
|
10
11
|
};
|
|
11
12
|
declare const _default: {
|
|
12
|
-
Row:
|
|
13
|
-
Col:
|
|
13
|
+
Row: React.ForwardRefExoticComponent<Pick<StackProps, "style" | "className" | "children" | "gap" | "justifyContent" | "align"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Col: React.ForwardRefExoticComponent<Pick<StackProps, "style" | "className" | "children" | "gap" | "justifyContent" | "align"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
15
|
};
|
|
15
16
|
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./Switch.scss";
|
|
2
|
+
export type SwitchProps = {
|
|
3
|
+
name: string;
|
|
4
|
+
checked: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
onChange: (value: boolean) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const Switch: ({ title, name, checked, onChange, disabled, }: SwitchProps) => JSX.Element;
|
|
@@ -138,4 +138,10 @@ export declare const TextAlignMiddleIcon: React.MemoExoticComponent<({ theme }:
|
|
|
138
138
|
export declare const publishIcon: JSX.Element;
|
|
139
139
|
export declare const eraser: JSX.Element;
|
|
140
140
|
export declare const handIcon: JSX.Element;
|
|
141
|
+
export declare const downloadIcon: JSX.Element;
|
|
142
|
+
export declare const copyIcon: JSX.Element;
|
|
143
|
+
export declare const helpIcon: JSX.Element;
|
|
144
|
+
export declare const playerPlayIcon: JSX.Element;
|
|
145
|
+
export declare const playerStopFilledIcon: JSX.Element;
|
|
146
|
+
export declare const tablerCheckIcon: JSX.Element;
|
|
141
147
|
export {};
|
package/types/data/library.d.ts
CHANGED
|
@@ -70,6 +70,8 @@ declare class Library {
|
|
|
70
70
|
private updateQueue;
|
|
71
71
|
private getLastUpdateTask;
|
|
72
72
|
private notifyListeners;
|
|
73
|
+
/** call on excalidraw instance unmount */
|
|
74
|
+
destroy: () => void;
|
|
73
75
|
resetLibrary: () => Promise<LibraryItems>;
|
|
74
76
|
/**
|
|
75
77
|
* @returns latest cloned libraryItems. Awaits all in-progress updates first.
|
package/types/data/restore.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExcalidrawElement
|
|
1
|
+
import { ExcalidrawElement } from "../element/types";
|
|
2
2
|
import { AppState, BinaryFiles, LibraryItem } from "../types";
|
|
3
3
|
import { ImportedDataState } from "./types";
|
|
4
4
|
type RestoredAppState = Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
@@ -8,15 +8,6 @@ export type RestoredDataState = {
|
|
|
8
8
|
appState: RestoredAppState;
|
|
9
9
|
files: BinaryFiles;
|
|
10
10
|
};
|
|
11
|
-
export declare const restoreElementWithProperties: <T extends Required<Omit<ExcalidrawElement, "customData">> & {
|
|
12
|
-
customData?: ExcalidrawElement["customData"];
|
|
13
|
-
/** @deprecated */
|
|
14
|
-
boundElementIds?: readonly string[] | undefined;
|
|
15
|
-
/** @deprecated */
|
|
16
|
-
strokeSharpness?: StrokeRoundness | undefined;
|
|
17
|
-
/** metadata that may be present in elements during collaboration */
|
|
18
|
-
__precedingElement__?: string | undefined;
|
|
19
|
-
}, K extends Pick<T, Exclude<keyof T, "link" | "id" | "x" | "y" | "strokeColor" | "backgroundColor" | "fillStyle" | "strokeWidth" | "strokeStyle" | "roundness" | "roughness" | "opacity" | "width" | "height" | "angle" | "seed" | "version" | "versionNonce" | "isDeleted" | "groupIds" | "boundElements" | "updated" | "locked" | "customData" | "type">>>(element: T, extra: Pick<T, keyof K> & Partial<Pick<ExcalidrawElement, "x" | "y" | "type">>) => T;
|
|
20
11
|
export declare const restoreElements: (elements: ImportedDataState["elements"], localElements: readonly ExcalidrawElement[] | null | undefined, opts?: {
|
|
21
12
|
refreshDimensions?: boolean;
|
|
22
13
|
repairBindings?: boolean;
|
package/types/data/types.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExcalidrawElement } from "../element/types";
|
|
2
2
|
import { AppState, BinaryFiles, LibraryItems, LibraryItems_anyVersion } from "../types";
|
|
3
3
|
import type { cleanAppStateForExport } from "../appState";
|
|
4
4
|
import { VERSIONS } from "../constants";
|
|
5
|
-
import { MarkOptional } from "../utility-types";
|
|
6
|
-
import { ElementConstructorOpts } from "../element/newElement";
|
|
7
5
|
export interface ExportedDataState {
|
|
8
6
|
type: string;
|
|
9
7
|
version: number;
|
|
@@ -27,50 +25,7 @@ export interface ImportedDataState {
|
|
|
27
25
|
type?: string;
|
|
28
26
|
version?: number;
|
|
29
27
|
source?: string;
|
|
30
|
-
elements?: readonly
|
|
31
|
-
type: Exclude<ExcalidrawGenericElement["type"], "selection">;
|
|
32
|
-
id?: ExcalidrawGenericElement["id"];
|
|
33
|
-
label?: {
|
|
34
|
-
text: string;
|
|
35
|
-
fontSize?: number;
|
|
36
|
-
fontFamily?: FontFamilyValues;
|
|
37
|
-
textAlign?: TextAlign;
|
|
38
|
-
verticalAlign?: VerticalAlign;
|
|
39
|
-
} & MarkOptional<ElementConstructorOpts, "x" | "y">;
|
|
40
|
-
} & ElementConstructorOpts) | ({
|
|
41
|
-
type: "text";
|
|
42
|
-
text: string;
|
|
43
|
-
x: number;
|
|
44
|
-
y: number;
|
|
45
|
-
id?: ExcalidrawTextElement["id"];
|
|
46
|
-
} & Partial<ExcalidrawTextElement>) | ({
|
|
47
|
-
type: ExcalidrawLinearElement["type"];
|
|
48
|
-
x: number;
|
|
49
|
-
y: number;
|
|
50
|
-
label?: {
|
|
51
|
-
text: string;
|
|
52
|
-
fontSize?: number;
|
|
53
|
-
fontFamily?: FontFamilyValues;
|
|
54
|
-
textAlign?: TextAlign;
|
|
55
|
-
verticalAlign?: VerticalAlign;
|
|
56
|
-
} & MarkOptional<ElementConstructorOpts, "x" | "y">;
|
|
57
|
-
end?: ({
|
|
58
|
-
type: Exclude<ExcalidrawBindableElement["type"], "image" | "selection" | "text">;
|
|
59
|
-
id?: ExcalidrawGenericElement["id"];
|
|
60
|
-
} | ({
|
|
61
|
-
type: "text";
|
|
62
|
-
text: string;
|
|
63
|
-
id?: ExcalidrawTextElement["id"];
|
|
64
|
-
} & Partial<ExcalidrawTextElement>)) & MarkOptional<ElementConstructorOpts, "x" | "y">;
|
|
65
|
-
start?: ({
|
|
66
|
-
type: Exclude<ExcalidrawBindableElement["type"], "image" | "selection" | "text">;
|
|
67
|
-
id?: ExcalidrawGenericElement["id"];
|
|
68
|
-
} | ({
|
|
69
|
-
type: "text";
|
|
70
|
-
text: string;
|
|
71
|
-
id?: ExcalidrawTextElement["id"];
|
|
72
|
-
} & Partial<ExcalidrawTextElement>)) & MarkOptional<ElementConstructorOpts, "x" | "y">;
|
|
73
|
-
} & Partial<ExcalidrawLinearElement>))[] | null;
|
|
28
|
+
elements?: readonly ExcalidrawElement[] | null;
|
|
74
29
|
appState?: Readonly<Partial<AppState & {
|
|
75
30
|
[T in keyof LegacyAppState]: LegacyAppState[T][0];
|
|
76
31
|
}>> | null;
|
|
@@ -15,7 +15,6 @@ export declare const maybeBindLinearElement: (linearElement: NonDeleted<Excalidr
|
|
|
15
15
|
x: number;
|
|
16
16
|
y: number;
|
|
17
17
|
}) => void;
|
|
18
|
-
export declare const bindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end") => void;
|
|
19
18
|
export declare const isLinearElementSimpleAndAlreadyBound: (linearElement: NonDeleted<ExcalidrawLinearElement>, alreadyBoundToId: ExcalidrawBindableElement["id"] | undefined, bindableElement: ExcalidrawBindableElement) => boolean;
|
|
20
19
|
export declare const unbindLinearElements: (elements: NonDeleted<ExcalidrawElement>[]) => void;
|
|
21
20
|
export declare const getHoveredElementForBinding: (pointerCoords: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExcalidrawElement, ExcalidrawImageElement, ExcalidrawTextElement, ExcalidrawLinearElement, ExcalidrawGenericElement, NonDeleted, TextAlign, GroupId, VerticalAlign, Arrowhead, ExcalidrawFreeDrawElement, FontFamilyValues, ExcalidrawTextContainer } from "../element/types";
|
|
2
2
|
import { AppState } from "../types";
|
|
3
3
|
import { MarkOptional, Mutable } from "../utility-types";
|
|
4
|
-
|
|
4
|
+
type ElementConstructorOpts = MarkOptional<Omit<ExcalidrawGenericElement, "id" | "type" | "isDeleted" | "updated">, "width" | "height" | "angle" | "groupIds" | "boundElements" | "seed" | "version" | "versionNonce" | "link" | "strokeStyle" | "fillStyle" | "strokeColor" | "backgroundColor" | "roughness" | "strokeWidth" | "roundness" | "locked" | "opacity">;
|
|
5
5
|
export declare const newElement: (opts: {
|
|
6
6
|
type: ExcalidrawGenericElement["type"];
|
|
7
7
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawGenericElement>;
|
|
@@ -11,7 +11,7 @@ export declare const newTextElement: (opts: {
|
|
|
11
11
|
fontFamily?: FontFamilyValues;
|
|
12
12
|
textAlign?: TextAlign;
|
|
13
13
|
verticalAlign?: VerticalAlign;
|
|
14
|
-
containerId?: ExcalidrawTextContainer["id"]
|
|
14
|
+
containerId?: ExcalidrawTextContainer["id"];
|
|
15
15
|
lineHeight?: ExcalidrawTextElement["lineHeight"];
|
|
16
16
|
strokeWidth?: ExcalidrawTextElement["strokeWidth"];
|
|
17
17
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawTextElement>;
|
|
@@ -35,8 +35,8 @@ export declare const newFreeDrawElement: (opts: {
|
|
|
35
35
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawFreeDrawElement>;
|
|
36
36
|
export declare const newLinearElement: (opts: {
|
|
37
37
|
type: ExcalidrawLinearElement["type"];
|
|
38
|
-
startArrowhead
|
|
39
|
-
endArrowhead
|
|
38
|
+
startArrowhead: Arrowhead | null;
|
|
39
|
+
endArrowhead: Arrowhead | null;
|
|
40
40
|
points?: ExcalidrawLinearElement["points"];
|
|
41
41
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawLinearElement>;
|
|
42
42
|
export declare const newImageElement: (opts: {
|
|
@@ -55,11 +55,6 @@ export declare const newImageElement: (opts: {
|
|
|
55
55
|
* Typed arrays and other non-null objects.
|
|
56
56
|
*/
|
|
57
57
|
export declare const deepCopyElement: <T extends ExcalidrawElement>(val: T) => Mutable<T>;
|
|
58
|
-
/**
|
|
59
|
-
* utility wrapper to generate new id. In test env it reuses the old + postfix
|
|
60
|
-
* for test assertions.
|
|
61
|
-
*/
|
|
62
|
-
export declare const regenerateId: (previousId: string | null) => string;
|
|
63
58
|
/**
|
|
64
59
|
* Duplicate an element, often used in the alt-drag operation.
|
|
65
60
|
* Note that this method has gotten a bit complicated since the
|
|
@@ -89,3 +84,4 @@ export declare const duplicateElements: (elements: readonly ExcalidrawElement[],
|
|
|
89
84
|
/** NOTE also updates version flags and `updated` */
|
|
90
85
|
randomizeSeed: boolean;
|
|
91
86
|
}) => ExcalidrawElement[];
|
|
87
|
+
export {};
|
|
@@ -4,5 +4,6 @@ import { PointerDownState } from "../types";
|
|
|
4
4
|
export declare const normalizeAngle: (angle: number) => number;
|
|
5
5
|
export declare const transformElements: (pointerDownState: PointerDownState, transformHandleType: MaybeTransformHandleType, selectedElements: readonly NonDeletedExcalidrawElement[], resizeArrowDirection: "origin" | "end", shouldRotateWithDiscreteAngle: boolean, shouldResizeFromCenter: boolean, shouldMaintainAspectRatio: boolean, pointerX: number, pointerY: number, centerX: number, centerY: number) => boolean;
|
|
6
6
|
export declare const resizeSingleElement: (originalElements: PointerDownState["originalElements"], shouldMaintainAspectRatio: boolean, element: NonDeletedExcalidrawElement, transformHandleDirection: TransformHandleDirection, shouldResizeFromCenter: boolean, pointerX: number, pointerY: number) => void;
|
|
7
|
+
export declare const resizeMultipleElements: (pointerDownState: PointerDownState, selectedElements: readonly NonDeletedExcalidrawElement[], transformHandleType: "nw" | "ne" | "sw" | "se", shouldResizeFromCenter: boolean, pointerX: number, pointerY: number) => void;
|
|
7
8
|
export declare const getResizeOffsetXY: (transformHandleType: MaybeTransformHandleType, selectedElements: NonDeletedExcalidrawElement[], x: number, y: number) => [number, number];
|
|
8
9
|
export declare const getResizeArrowDirection: (transformHandleType: MaybeTransformHandleType, element: NonDeleted<ExcalidrawLinearElement>) => "origin" | "end";
|
|
@@ -68,10 +68,8 @@ export declare const getBoundTextElementPosition: (container: ExcalidrawElement,
|
|
|
68
68
|
export declare const shouldAllowVerticalAlign: (selectedElements: NonDeletedExcalidrawElement[]) => boolean;
|
|
69
69
|
export declare const suppportsHorizontalAlign: (selectedElements: NonDeletedExcalidrawElement[]) => boolean;
|
|
70
70
|
export declare const getTextBindableContainerAtPosition: (elements: readonly ExcalidrawElement[], appState: AppState, x: number, y: number) => ExcalidrawTextContainer | null;
|
|
71
|
-
|
|
72
|
-
export declare const isValidTextContainer: (element:
|
|
73
|
-
type: ExcalidrawElement["type"];
|
|
74
|
-
}) => boolean;
|
|
71
|
+
declare const VALID_CONTAINER_TYPES: Set<string>;
|
|
72
|
+
export declare const isValidTextContainer: (element: ExcalidrawElement) => boolean;
|
|
75
73
|
export declare const computeContainerDimensionForBoundText: (dimension: number, containerType: ExtractSetType<typeof VALID_CONTAINER_TYPES>) => number;
|
|
76
74
|
export declare const getBoundTextMaxWidth: (container: ExcalidrawElement) => number;
|
|
77
75
|
export declare const getBoundTextMaxHeight: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer) => number;
|
|
@@ -79,3 +77,4 @@ export declare const isMeasureTextSupported: () => boolean;
|
|
|
79
77
|
export declare const getDefaultLineHeight: (fontFamily: FontFamilyValues) => number & {
|
|
80
78
|
_brand: "unitlessLineHeight";
|
|
81
79
|
};
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LibraryItem } from "../types";
|
|
2
|
+
export type SvgCache = Map<LibraryItem["id"], SVGSVGElement>;
|
|
3
|
+
export declare const libraryItemSvgsCache: import("jotai").Atom<SvgCache> & {
|
|
4
|
+
write: (get: {
|
|
5
|
+
<Value>(atom: import("jotai").Atom<Value | Promise<Value>>): Value;
|
|
6
|
+
<Value_1>(atom: import("jotai").Atom<Promise<Value_1>>): Value_1;
|
|
7
|
+
<Value_2>(atom: import("jotai").Atom<Value_2>): Value_2 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_2;
|
|
8
|
+
} & {
|
|
9
|
+
<Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>, options: {
|
|
10
|
+
unstable_promise: true;
|
|
11
|
+
}): Value_3 | Promise<Value_3>;
|
|
12
|
+
<Value_4>(atom: import("jotai").Atom<Promise<Value_4>>, options: {
|
|
13
|
+
unstable_promise: true;
|
|
14
|
+
}): Value_4 | Promise<Value_4>;
|
|
15
|
+
<Value_5>(atom: import("jotai").Atom<Value_5>, options: {
|
|
16
|
+
unstable_promise: true;
|
|
17
|
+
}): (Value_5 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_5) | Promise<Value_5 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_5>;
|
|
18
|
+
}, set: {
|
|
19
|
+
<Value_6, Result extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_6, undefined, Result>): Result;
|
|
20
|
+
<Value_7, Update, Result_1 extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_7, Update, Result_1>, update: Update): Result_1;
|
|
21
|
+
}, update: SvgCache | ((prev: SvgCache) => SvgCache)) => void;
|
|
22
|
+
onMount?: (<S extends (update: SvgCache | ((prev: SvgCache) => SvgCache)) => void>(setAtom: S) => void | (() => void)) | undefined;
|
|
23
|
+
} & {
|
|
24
|
+
init: SvgCache;
|
|
25
|
+
};
|
|
26
|
+
export declare const useLibraryItemSvg: (id: LibraryItem["id"] | null, elements: LibraryItem["elements"] | undefined, svgCache: SvgCache) => SVGSVGElement | undefined;
|
|
27
|
+
export declare const useLibraryCache: () => {
|
|
28
|
+
clearLibraryCache: () => void;
|
|
29
|
+
deleteItemsFromLibraryCache: (items: LibraryItem["id"][]) => void;
|
|
30
|
+
svgCache: SvgCache;
|
|
31
|
+
};
|
|
@@ -1,98 +1,26 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
2
|
const elements: ({
|
|
3
3
|
type: string;
|
|
4
|
+
version: number;
|
|
5
|
+
versionNonce: number;
|
|
6
|
+
isDeleted: boolean;
|
|
7
|
+
id: string;
|
|
8
|
+
fillStyle: string;
|
|
9
|
+
strokeWidth: number;
|
|
10
|
+
strokeStyle: string;
|
|
11
|
+
roughness: number;
|
|
12
|
+
opacity: number;
|
|
13
|
+
angle: number;
|
|
4
14
|
x: number;
|
|
5
15
|
y: number;
|
|
6
|
-
|
|
7
|
-
backgroundColor?: undefined;
|
|
8
|
-
label?: undefined;
|
|
9
|
-
start?: undefined;
|
|
10
|
-
end?: undefined;
|
|
11
|
-
fileId?: undefined;
|
|
12
|
-
width?: undefined;
|
|
13
|
-
height?: undefined;
|
|
14
|
-
angle?: undefined;
|
|
15
|
-
strokeColor?: undefined;
|
|
16
|
-
fillStyle?: undefined;
|
|
17
|
-
strokeStyle?: undefined;
|
|
18
|
-
roughness?: undefined;
|
|
19
|
-
opacity?: undefined;
|
|
20
|
-
groupIds?: undefined;
|
|
21
|
-
strokeSharpness?: undefined;
|
|
22
|
-
seed?: undefined;
|
|
23
|
-
version?: undefined;
|
|
24
|
-
versionNonce?: undefined;
|
|
25
|
-
isDeleted?: undefined;
|
|
26
|
-
boundElements?: undefined;
|
|
27
|
-
updated?: undefined;
|
|
28
|
-
link?: undefined;
|
|
29
|
-
status?: undefined;
|
|
30
|
-
scale?: undefined;
|
|
31
|
-
} | {
|
|
32
|
-
type: string;
|
|
33
|
-
x: number;
|
|
34
|
-
y: number;
|
|
16
|
+
strokeColor: string;
|
|
35
17
|
backgroundColor: string;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
fontSize: number;
|
|
41
|
-
};
|
|
42
|
-
start?: undefined;
|
|
43
|
-
end?: undefined;
|
|
44
|
-
fileId?: undefined;
|
|
45
|
-
width?: undefined;
|
|
46
|
-
height?: undefined;
|
|
47
|
-
angle?: undefined;
|
|
48
|
-
strokeColor?: undefined;
|
|
49
|
-
fillStyle?: undefined;
|
|
50
|
-
strokeStyle?: undefined;
|
|
51
|
-
roughness?: undefined;
|
|
52
|
-
opacity?: undefined;
|
|
53
|
-
groupIds?: undefined;
|
|
54
|
-
strokeSharpness?: undefined;
|
|
55
|
-
seed?: undefined;
|
|
56
|
-
version?: undefined;
|
|
57
|
-
versionNonce?: undefined;
|
|
58
|
-
isDeleted?: undefined;
|
|
59
|
-
boundElements?: undefined;
|
|
60
|
-
updated?: undefined;
|
|
61
|
-
link?: undefined;
|
|
62
|
-
status?: undefined;
|
|
63
|
-
scale?: undefined;
|
|
64
|
-
} | {
|
|
65
|
-
type: string;
|
|
66
|
-
x: number;
|
|
67
|
-
y: number;
|
|
68
|
-
label: {
|
|
69
|
-
text: string;
|
|
70
|
-
strokeColor?: undefined;
|
|
71
|
-
fontSize?: undefined;
|
|
72
|
-
};
|
|
73
|
-
start: {
|
|
74
|
-
type: string;
|
|
75
|
-
};
|
|
76
|
-
end: {
|
|
77
|
-
type: string;
|
|
78
|
-
};
|
|
79
|
-
strokeWidth?: undefined;
|
|
80
|
-
backgroundColor?: undefined;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
seed: number;
|
|
21
|
+
groupIds: never[];
|
|
81
22
|
fileId?: undefined;
|
|
82
|
-
width?: undefined;
|
|
83
|
-
height?: undefined;
|
|
84
|
-
angle?: undefined;
|
|
85
|
-
strokeColor?: undefined;
|
|
86
|
-
fillStyle?: undefined;
|
|
87
|
-
strokeStyle?: undefined;
|
|
88
|
-
roughness?: undefined;
|
|
89
|
-
opacity?: undefined;
|
|
90
|
-
groupIds?: undefined;
|
|
91
23
|
strokeSharpness?: undefined;
|
|
92
|
-
seed?: undefined;
|
|
93
|
-
version?: undefined;
|
|
94
|
-
versionNonce?: undefined;
|
|
95
|
-
isDeleted?: undefined;
|
|
96
24
|
boundElements?: undefined;
|
|
97
25
|
updated?: undefined;
|
|
98
26
|
link?: undefined;
|
|
@@ -124,9 +52,7 @@ declare namespace _default {
|
|
|
124
52
|
link: null;
|
|
125
53
|
status: string;
|
|
126
54
|
scale: number[];
|
|
127
|
-
|
|
128
|
-
start?: undefined;
|
|
129
|
-
end?: undefined;
|
|
55
|
+
id?: undefined;
|
|
130
56
|
})[];
|
|
131
57
|
namespace appState {
|
|
132
58
|
const viewBackgroundColor: string;
|