Added Typst Spaces and Internal Packages

This commit is contained in:
2026-05-31 18:03:04 -04:00
parent c1fdb5a1b7
commit bbd7be86a5
26 changed files with 2873 additions and 114 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ use sha2::{Sha256, Digest};
use std::collections::HashMap;
use uuid::Uuid;
use crate::{api_keys::hash_key, AppState};
use crate::{api_keys::hash_key, compiler::ProjectInput, AppState};
#[derive(Deserialize)]
pub struct RenderRequest {
@@ -214,8 +214,8 @@ pub async fn render_handler(
// Compile
let compiler = state.compiler.lock().await;
let result = match payload.format.as_str() {
"pdf" => compiler.export_pdf(payload.code.clone(), files_map),
"png" => compiler.export_png(payload.code.clone(), files_map),
"pdf" => compiler.export_pdf(ProjectInput::single(payload.code.clone(), files_map)),
"png" => compiler.export_png(ProjectInput::single(payload.code.clone(), files_map)),
_ => unreachable!(),
};
drop(compiler);