feat: rewrite d2c to not require token (#8269)

This commit is contained in:
David Luzar 2024-08-20 18:06:22 +02:00 committed by GitHub
parent fb4bb29aa5
commit b5d7f5b4ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 282 additions and 564 deletions

View file

@ -325,14 +325,6 @@ export interface AppState {
openDialog:
| null
| { name: "imageExport" | "help" | "jsonExport" }
| {
name: "settings";
source:
| "tool" // when magicframe tool is selected
| "generation" // when magicframe generate button is clicked
| "settings"; // when AI settings dialog is explicitly invoked
tab: "text-to-diagram" | "diagram-to-code";
}
| { name: "ttd"; tab: "text-to-diagram" | "mermaid" }
| { name: "commandPalette" };
/**
@ -655,6 +647,8 @@ export type AppClassProperties = {
dismissLinearEditor: App["dismissLinearEditor"];
flowChartCreator: App["flowChartCreator"];
getEffectiveGridSize: App["getEffectiveGridSize"];
setPlugins: App["setPlugins"];
plugins: App["plugins"];
};
export type PointerDownState = Readonly<{
@ -842,3 +836,8 @@ export type PendingExcalidrawElements = ExcalidrawElement[];
export type NullableGridSize =
| (AppState["gridSize"] & MakeBrand<"NullableGridSize">)
| null;
export type GenerateDiagramToCode = (props: {
frame: ExcalidrawMagicFrameElement;
children: readonly ExcalidrawElement[];
}) => MaybePromise<{ html: string }>;