diff --git a/src/components/TTDDialog/TTDDialog.tsx b/src/components/TTDDialog/TTDDialog.tsx index c1edb5aa8..d622d9e57 100644 --- a/src/components/TTDDialog/TTDDialog.tsx +++ b/src/components/TTDDialog/TTDDialog.tsx @@ -91,7 +91,24 @@ export const TTDDialogBase = withInternalFallback( - {t("labels.textToDrawing")} + + {t("labels.textToDrawing")} + + AI Beta + + Mermaid diff --git a/src/components/TTDDialog/TTDDialogTabs.tsx b/src/components/TTDDialog/TTDDialogTabs.tsx index 57c2ebdb8..30f49d454 100644 --- a/src/components/TTDDialog/TTDDialogTabs.tsx +++ b/src/components/TTDDialog/TTDDialogTabs.tsx @@ -49,7 +49,7 @@ const TTDDialogTabs = ( }); } else if ( props.dialog === "ttd" && - isMemberOf(["text-to-diagram", "mermaid"], tab) + isMemberOf(["text-to-diagram", "mermaid", "text-to-drawing"], tab) ) { setAppState({ openDialog: { name: props.dialog, tab }, diff --git a/src/components/TTDDialog/TTDDialogTrigger.tsx b/src/components/TTDDialog/TTDDialogTrigger.tsx index 4309776d5..eb120d454 100644 --- a/src/components/TTDDialog/TTDDialogTrigger.tsx +++ b/src/components/TTDDialog/TTDDialogTrigger.tsx @@ -13,7 +13,7 @@ export const TTDDialogTrigger = ({ }: { children?: ReactNode; icon?: JSX.Element; - tab?: string; + tab?: "mermaid" | "text-to-diagram" | "text-to-drawing"; }) => { const { TTDDialogTriggerTunnel } = useTunnels(); const setAppState = useExcalidrawSetAppState(); diff --git a/src/types.ts b/src/types.ts index ee1287b13..67cd0aa16 100644 --- a/src/types.ts +++ b/src/types.ts @@ -255,7 +255,7 @@ export interface AppState { | "settings"; // when AI settings dialog is explicitly invoked tab: "text-to-diagram" | "diagram-to-code"; } - | { name: "ttd"; tab: "text-to-diagram" | "mermaid" }; + | { name: "ttd"; tab: "text-to-diagram" | "mermaid" | "text-to-drawing" }; /** * Reflects user preference for whether the default sidebar should be docked. *