@excalidraw/excalidraw 0.17.0-c7ee46e → 0.17.0-dd220bc
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-0aa6bd65c58be7c84e9c.js} +2 -2
- package/dist/excalidraw-with-preact.development.js +223 -58
- package/dist/excalidraw-with-preact.production.min.js +1 -1
- package/dist/excalidraw.development.js +223 -58
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +30 -3
- package/types/actions/actionBoundText.d.ts +20 -2
- package/types/actions/actionCanvas.d.ts +110 -11
- package/types/actions/actionClipboard.d.ts +70 -7
- package/types/actions/actionDeleteSelected.d.ts +30 -3
- package/types/actions/actionElementLock.d.ts +20 -2
- package/types/actions/actionExport.d.ts +80 -8
- package/types/actions/actionFinalize.d.ts +20 -2
- package/types/actions/actionFrame.d.ts +30 -3
- package/types/actions/actionGroup.d.ts +20 -2
- package/types/actions/actionLinearEditor.d.ts +10 -1
- package/types/actions/actionMenu.d.ts +23 -3
- package/types/actions/actionProperties.d.ts +130 -13
- package/types/actions/actionSelectAll.d.ts +10 -1
- package/types/actions/actionStyles.d.ts +10 -1
- package/types/actions/actionToggleGridMode.d.ts +10 -1
- package/types/actions/actionToggleObjectsSnapMode.d.ts +10 -1
- package/types/actions/actionToggleStats.d.ts +10 -1
- package/types/actions/actionToggleViewMode.d.ts +10 -1
- package/types/actions/actionToggleZenMode.d.ts +10 -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/MagicSettings.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 +14 -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 +10 -1
- package/types/element/embeddable.d.ts +10 -1
- package/types/element/linearElementEditor.d.ts +10 -1
- package/types/packages/excalidraw/index.d.ts +2 -0
- package/types/types.d.ts +11 -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-0aa6bd65c58be7c84e9c.d.ts} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface TTDDialogPanelProps {
|
|
3
|
+
label: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
panelAction?: {
|
|
6
|
+
label: string;
|
|
7
|
+
action: () => void;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
panelActionDisabled?: boolean;
|
|
11
|
+
onTextSubmitInProgess?: boolean;
|
|
12
|
+
renderTopRight?: () => ReactNode;
|
|
13
|
+
renderBottomRight?: () => ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const TTDDialogPanel: ({ label, children, panelAction, panelActionDisabled, onTextSubmitInProgess, renderTopRight, renderBottomRight, }: TTDDialogPanelProps) => JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const TTDDialogTabTrigger: {
|
|
2
|
+
({ children, tab, onSelect, ...rest }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
tab: string;
|
|
5
|
+
onSelect?: React.ReactEventHandler<HTMLButtonElement> | undefined;
|
|
6
|
+
} & Omit<import("react").HTMLAttributes<HTMLButtonElement>, "onSelect">): JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
declare const TTDDialogTabs: {
|
|
3
|
+
(props: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
} & ({
|
|
6
|
+
dialog: "ttd";
|
|
7
|
+
tab: "text-to-diagram" | "mermaid";
|
|
8
|
+
} | {
|
|
9
|
+
dialog: "settings";
|
|
10
|
+
tab: "text-to-diagram" | "diagram-to-code";
|
|
11
|
+
})): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export default TTDDialogTabs;
|
|
@@ -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
|
+
mermaidDefinition: 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, mermaidDefinition, 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,16 @@ 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: "settings";
|
|
96
|
+
source: "settings" | "tool" | "generation";
|
|
97
|
+
tab: "text-to-diagram" | "diagram-to-code";
|
|
98
|
+
} | {
|
|
99
|
+
name: "ttd";
|
|
100
|
+
tab: "mermaid" | "text-to-diagram";
|
|
101
|
+
} | null;
|
|
93
102
|
defaultSidebarDockedPreference: boolean;
|
|
94
103
|
lastPointerDownWith: import("./types").PointerType;
|
|
95
104
|
selectedElementIds: Readonly<{
|
|
@@ -82,7 +82,16 @@ 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: "settings";
|
|
89
|
+
source: "settings" | "tool" | "generation";
|
|
90
|
+
tab: "text-to-diagram" | "diagram-to-code";
|
|
91
|
+
} | {
|
|
92
|
+
name: "ttd";
|
|
93
|
+
tab: "mermaid" | "text-to-diagram";
|
|
94
|
+
} | null;
|
|
86
95
|
defaultSidebarDockedPreference: boolean;
|
|
87
96
|
lastPointerDownWith: import("./types").PointerType;
|
|
88
97
|
selectedElementIds: Readonly<{
|
|
@@ -192,7 +192,16 @@ 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: "settings";
|
|
199
|
+
source: "settings" | "tool" | "generation";
|
|
200
|
+
tab: "text-to-diagram" | "diagram-to-code";
|
|
201
|
+
} | {
|
|
202
|
+
name: "ttd";
|
|
203
|
+
tab: "mermaid" | "text-to-diagram";
|
|
204
|
+
} | null;
|
|
196
205
|
defaultSidebarDockedPreference: boolean;
|
|
197
206
|
lastPointerDownWith: import("./types").PointerType;
|
|
198
207
|
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,16 @@ 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: "settings";
|
|
189
|
+
source: "tool" | "generation" | "settings";
|
|
190
|
+
tab: "text-to-diagram" | "diagram-to-code";
|
|
191
|
+
} | {
|
|
192
|
+
name: "ttd";
|
|
193
|
+
tab: "text-to-diagram" | "mermaid";
|
|
194
|
+
};
|
|
186
195
|
/**
|
|
187
196
|
* Reflects user preference for whether the default sidebar should be docked.
|
|
188
197
|
*
|
|
@@ -401,7 +410,7 @@ export type AppClassProperties = {
|
|
|
401
410
|
setActiveTool: App["setActiveTool"];
|
|
402
411
|
setOpenDialog: App["setOpenDialog"];
|
|
403
412
|
insertEmbeddableElement: App["insertEmbeddableElement"];
|
|
404
|
-
|
|
413
|
+
onMagicframeToolSelect: App["onMagicframeToolSelect"];
|
|
405
414
|
};
|
|
406
415
|
export type PointerDownState = Readonly<{
|
|
407
416
|
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
|