@ -91,7 +91,24 @@ export const TTDDialogBase = withInternalFallback(
</div>
</TTDDialogTabTrigger>
<TTDDialogTabTrigger tab="text-to-drawing">
{t("labels.textToDrawing")}
<div style={{ display: "flex", alignItems: "center" }}>
<div
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
padding: "1px 6px",
marginLeft: "10px",
fontSize: 10,
borderRadius: "12px",
background: "pink",
color: "#000",
}}
>
AI Beta
<TTDDialogTabTrigger tab="mermaid">Mermaid</TTDDialogTabTrigger>
</TTDDialogTabTriggers>
@ -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 },
@ -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();
@ -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.
*