feat(export): add book-to-Typst source generator

This commit is contained in:
pj committed 2026-06-20 12:42:04 -04:00
1 parent e21db2be5d
commit f939674794
2 files changed
+127

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { invoke } from "@tauri-apps/api/core";
export interface ImageInput {
path: string;
data: string;
}
export async function compilePdf(source: string, images: ImageInput[] = []): Promise<Uint8Array> {
const buffer = await invoke<ArrayBuffer>("compile_pdf", { source, images });
return new Uint8Array(buffer);
}