@excalidraw/excalidraw 0.17.0-c7ee46e → 0.17.0-fe75f29
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/CHANGELOG.md +6 -0
- package/dist/excalidraw-assets/locales/{gl-ES-json-95041caf90ef2a7e8a53.js → gl-ES-json-d11c7966c3c2f95756e0.js} +1 -1
- package/dist/excalidraw-assets-dev/{vendor-37ba5d021227533892ee.js → vendor-2466bf62a35e940e8f28.js} +2 -2
- package/dist/excalidraw-with-preact.development.js +221 -56
- package/dist/excalidraw-with-preact.production.min.js +1 -1
- package/dist/excalidraw.development.js +221 -56
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +27 -3
- package/types/actions/actionBoundText.d.ts +18 -2
- package/types/actions/actionCanvas.d.ts +99 -11
- package/types/actions/actionClipboard.d.ts +63 -7
- package/types/actions/actionDeleteSelected.d.ts +27 -3
- package/types/actions/actionElementLock.d.ts +18 -2
- package/types/actions/actionExport.d.ts +72 -8
- package/types/actions/actionFinalize.d.ts +18 -2
- package/types/actions/actionFrame.d.ts +27 -3
- package/types/actions/actionGroup.d.ts +18 -2
- package/types/actions/actionLinearEditor.d.ts +9 -1
- package/types/actions/actionMenu.d.ts +21 -3
- package/types/actions/actionProperties.d.ts +117 -13
- package/types/actions/actionSelectAll.d.ts +9 -1
- package/types/actions/actionStyles.d.ts +9 -1
- package/types/actions/actionToggleGridMode.d.ts +9 -1
- package/types/actions/actionToggleObjectsSnapMode.d.ts +9 -1
- package/types/actions/actionToggleStats.d.ts +9 -1
- package/types/actions/actionToggleViewMode.d.ts +9 -1
- package/types/actions/actionToggleZenMode.d.ts +9 -1
- package/types/components/App.d.ts +1 -1
- package/types/components/Button.d.ts +1 -1
- package/types/components/InlineIcon.d.ts +3 -0
- package/types/components/LayerUI.d.ts +1 -1
- package/types/components/Paragraph.d.ts +4 -0
- package/types/components/TTDDialog/MermaidToExcalidraw.d.ts +6 -0
- package/types/components/TTDDialog/TTDDialog.d.ts +29 -0
- package/types/components/TTDDialog/TTDDialogInput.d.ts +9 -0
- package/types/components/TTDDialog/TTDDialogOutput.d.ts +7 -0
- package/types/components/TTDDialog/TTDDialogPanel.d.ts +16 -0
- package/types/components/TTDDialog/TTDDialogPanels.d.ts +4 -0
- package/types/components/TTDDialog/TTDDialogTab.d.ts +7 -0
- package/types/components/TTDDialog/TTDDialogTabTrigger.d.ts +8 -0
- package/types/components/TTDDialog/TTDDialogTabTriggers.d.ts +6 -0
- package/types/components/TTDDialog/TTDDialogTabs.d.ts +9 -0
- package/types/components/TTDDialog/TTDDialogTrigger.d.ts +8 -0
- package/types/components/TTDDialog/common.d.ts +33 -0
- package/types/components/TextField.d.ts +1 -1
- package/types/components/dropdownMenu/DropdownMenu.d.ts +6 -0
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -0
- package/types/components/icons.d.ts +1 -0
- package/types/components/main-menu/MainMenu.d.ts +6 -0
- package/types/context/tunnels.d.ts +1 -0
- package/types/element/Hyperlink.d.ts +9 -1
- package/types/element/embeddable.d.ts +9 -1
- package/types/element/linearElementEditor.d.ts +9 -1
- package/types/packages/excalidraw/index.d.ts +2 -0
- package/types/types.d.ts +10 -2
- package/types/utils.d.ts +1 -0
- package/types/components/MermaidToExcalidraw.d.ts +0 -3
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{gl-ES-json-95041caf90ef2a7e8a53.d.ts → gl-ES-json-d11c7966c3c2f95756e0.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-37ba5d021227533892ee.d.ts → vendor-2466bf62a35e940e8f28.d.ts} +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MermaidOptions } from "@excalidraw/mermaid-to-excalidraw";
|
|
2
|
+
import { MermaidToExcalidrawResult } from "@excalidraw/mermaid-to-excalidraw/dist/interfaces";
|
|
3
|
+
import { NonDeletedExcalidrawElement } from "../../element/types";
|
|
4
|
+
import { AppClassProperties, BinaryFiles } from "../../types";
|
|
5
|
+
export interface MermaidToExcalidrawLibProps {
|
|
6
|
+
loaded: boolean;
|
|
7
|
+
api: Promise<{
|
|
8
|
+
parseMermaidToExcalidraw: (definition: string, options: MermaidOptions) => Promise<MermaidToExcalidrawResult>;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
interface ConvertMermaidToExcalidrawFormatProps {
|
|
12
|
+
canvasRef: React.RefObject<HTMLDivElement>;
|
|
13
|
+
mermaidToExcalidrawLib: MermaidToExcalidrawLibProps;
|
|
14
|
+
text: string;
|
|
15
|
+
setError: (error: Error | null) => void;
|
|
16
|
+
data: React.MutableRefObject<{
|
|
17
|
+
elements: readonly NonDeletedExcalidrawElement[];
|
|
18
|
+
files: BinaryFiles | null;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
export declare const convertMermaidToExcalidraw: ({ canvasRef, mermaidToExcalidrawLib, text, setError, data, }: ConvertMermaidToExcalidrawFormatProps) => Promise<void>;
|
|
22
|
+
export declare const LOCAL_STORAGE_KEY_MERMAID_TO_EXCALIDRAW = "mermaid-to-excalidraw";
|
|
23
|
+
export declare const saveMermaidDataToStorage: (data: string) => void;
|
|
24
|
+
export declare const insertToEditor: ({ app, data, text, shouldSaveMermaidDataToStorage, }: {
|
|
25
|
+
app: AppClassProperties;
|
|
26
|
+
data: React.MutableRefObject<{
|
|
27
|
+
elements: readonly NonDeletedExcalidrawElement[];
|
|
28
|
+
files: BinaryFiles | null;
|
|
29
|
+
}>;
|
|
30
|
+
text?: string | undefined;
|
|
31
|
+
shouldSaveMermaidDataToStorage?: boolean | undefined;
|
|
32
|
+
}) => void;
|
|
33
|
+
export {};
|
|
@@ -10,7 +10,7 @@ type TextFieldProps = {
|
|
|
10
10
|
selectOnRender?: boolean;
|
|
11
11
|
label?: string;
|
|
12
12
|
placeholder?: string;
|
|
13
|
-
|
|
13
|
+
isRedacted?: boolean;
|
|
14
14
|
};
|
|
15
15
|
export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
16
16
|
export {};
|
|
@@ -34,6 +34,12 @@ declare const DropdownMenu: {
|
|
|
34
34
|
className?: string | undefined;
|
|
35
35
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): JSX.Element;
|
|
36
36
|
displayName: string;
|
|
37
|
+
Badge: {
|
|
38
|
+
({ children, }: {
|
|
39
|
+
children: React.ReactNode;
|
|
40
|
+
}): JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
37
43
|
};
|
|
38
44
|
ItemLink: {
|
|
39
45
|
({ icon, shortcut, href, children, onSelect, className, selected, ...rest }: {
|
|
@@ -9,5 +9,17 @@ declare const DropdownMenuItem: {
|
|
|
9
9
|
className?: string | undefined;
|
|
10
10
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
|
+
Badge: {
|
|
13
|
+
({ children, }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}): JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const DropDownMenuItemBadge: {
|
|
20
|
+
({ children, }: {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}): JSX.Element;
|
|
23
|
+
displayName: string;
|
|
12
24
|
};
|
|
13
25
|
export default DropdownMenuItem;
|
|
@@ -158,4 +158,5 @@ export declare const OpenAIIcon: JSX.Element;
|
|
|
158
158
|
export declare const fullscreenIcon: JSX.Element;
|
|
159
159
|
export declare const eyeIcon: JSX.Element;
|
|
160
160
|
export declare const eyeClosedIcon: JSX.Element;
|
|
161
|
+
export declare const brainIcon: JSX.Element;
|
|
161
162
|
export {};
|
|
@@ -28,6 +28,12 @@ declare const MainMenu: React.FC<{
|
|
|
28
28
|
className?: string | undefined;
|
|
29
29
|
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect">): JSX.Element;
|
|
30
30
|
displayName: string;
|
|
31
|
+
Badge: {
|
|
32
|
+
({ children, }: {
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
}): JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
31
37
|
};
|
|
32
38
|
ItemLink: {
|
|
33
39
|
({ icon, shortcut, href, children, onSelect, className, selected, ...rest }: {
|
|
@@ -11,6 +11,7 @@ type TunnelsContextValue = {
|
|
|
11
11
|
DefaultSidebarTriggerTunnel: Tunnel;
|
|
12
12
|
DefaultSidebarTabTriggersTunnel: Tunnel;
|
|
13
13
|
OverwriteConfirmDialogTunnel: Tunnel;
|
|
14
|
+
TTDDialogTriggerTunnel: Tunnel;
|
|
14
15
|
jotaiScope: symbol;
|
|
15
16
|
};
|
|
16
17
|
export declare const TunnelsContext: React.Context<TunnelsContextValue>;
|
|
@@ -89,7 +89,15 @@ export declare const actionLink: {
|
|
|
89
89
|
name: string;
|
|
90
90
|
tab?: string | undefined;
|
|
91
91
|
} | null;
|
|
92
|
-
openDialog:
|
|
92
|
+
openDialog: {
|
|
93
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
94
|
+
} | {
|
|
95
|
+
name: "magicSettings";
|
|
96
|
+
source: "tool" | "generation" | "settings";
|
|
97
|
+
} | {
|
|
98
|
+
name: "ttd";
|
|
99
|
+
tab: string;
|
|
100
|
+
} | null;
|
|
93
101
|
defaultSidebarDockedPreference: boolean;
|
|
94
102
|
lastPointerDownWith: import("./types").PointerType;
|
|
95
103
|
selectedElementIds: Readonly<{
|
|
@@ -82,7 +82,15 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
82
82
|
name: string;
|
|
83
83
|
tab?: string | undefined;
|
|
84
84
|
} | null;
|
|
85
|
-
openDialog:
|
|
85
|
+
openDialog: {
|
|
86
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
87
|
+
} | {
|
|
88
|
+
name: "magicSettings";
|
|
89
|
+
source: "tool" | "generation" | "settings";
|
|
90
|
+
} | {
|
|
91
|
+
name: "ttd";
|
|
92
|
+
tab: string;
|
|
93
|
+
} | null;
|
|
86
94
|
defaultSidebarDockedPreference: boolean;
|
|
87
95
|
lastPointerDownWith: import("./types").PointerType;
|
|
88
96
|
selectedElementIds: Readonly<{
|
|
@@ -192,7 +192,15 @@ export declare class LinearElementEditor {
|
|
|
192
192
|
name: string;
|
|
193
193
|
tab?: string | undefined;
|
|
194
194
|
} | null;
|
|
195
|
-
openDialog:
|
|
195
|
+
openDialog: {
|
|
196
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
197
|
+
} | {
|
|
198
|
+
name: "magicSettings";
|
|
199
|
+
source: "tool" | "generation" | "settings";
|
|
200
|
+
} | {
|
|
201
|
+
name: "ttd";
|
|
202
|
+
tab: string;
|
|
203
|
+
} | null;
|
|
196
204
|
defaultSidebarDockedPreference: boolean;
|
|
197
205
|
lastPointerDownWith: import("./types").PointerType;
|
|
198
206
|
selectedElementIds: Readonly<{
|
|
@@ -24,6 +24,8 @@ export { useDevice } from "../../components/App";
|
|
|
24
24
|
export { WelcomeScreen };
|
|
25
25
|
export { LiveCollaborationTrigger };
|
|
26
26
|
export { DefaultSidebar } from "../../components/DefaultSidebar";
|
|
27
|
+
export { TTDDialog } from "../../components/TTDDialog/TTDDialog";
|
|
28
|
+
export { TTDDialogTrigger } from "../../components/TTDDialog/TTDDialogTrigger";
|
|
27
29
|
export { normalizeLink } from "../../data/url";
|
|
28
30
|
export { convertToExcalidrawElements } from "../../data/transform";
|
|
29
31
|
export { getCommonBounds } from "../../element/bounds";
|
package/types/types.d.ts
CHANGED
|
@@ -182,7 +182,15 @@ export interface AppState {
|
|
|
182
182
|
name: SidebarName;
|
|
183
183
|
tab?: SidebarTabName;
|
|
184
184
|
} | null;
|
|
185
|
-
openDialog:
|
|
185
|
+
openDialog: null | {
|
|
186
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
187
|
+
} | {
|
|
188
|
+
name: "magicSettings";
|
|
189
|
+
source: "tool" | "generation" | "settings";
|
|
190
|
+
} | {
|
|
191
|
+
name: "ttd";
|
|
192
|
+
tab: string;
|
|
193
|
+
};
|
|
186
194
|
/**
|
|
187
195
|
* Reflects user preference for whether the default sidebar should be docked.
|
|
188
196
|
*
|
|
@@ -401,7 +409,7 @@ export type AppClassProperties = {
|
|
|
401
409
|
setActiveTool: App["setActiveTool"];
|
|
402
410
|
setOpenDialog: App["setOpenDialog"];
|
|
403
411
|
insertEmbeddableElement: App["insertEmbeddableElement"];
|
|
404
|
-
|
|
412
|
+
onMagicframeToolSelect: App["onMagicframeToolSelect"];
|
|
405
413
|
};
|
|
406
414
|
export type PointerDownState = Readonly<{
|
|
407
415
|
origin: Readonly<{
|
package/types/utils.d.ts
CHANGED
|
@@ -201,3 +201,4 @@ export declare const isRenderThrottlingEnabled: () => boolean;
|
|
|
201
201
|
/** Checks if value is inside given collection. Useful for type-safety. */
|
|
202
202
|
export declare const isMemberOf: <T extends string>(collection: Set<T> | Record<T, any> | Map<T, any> | readonly T[], value: string) => value is T;
|
|
203
203
|
export declare const cloneJSON: <T>(obj: T) => T;
|
|
204
|
+
export declare const isFiniteNumber: (value: any) => value is number;
|
|
File without changes
|