diff --git a/Dockerfile b/Dockerfile index 7ea84bc..302b410 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ FROM rust:alpine AS backend-builder WORKDIR /app RUN apk add --no-cache musl-dev openssl-dev openssl-libs-static pkgconfig git RUN git clone https://github.com/typst/typst.git typst \ - && git -C typst checkout 44b3f78ed37fedea75e911dde2269ef86c45316f + && git -C typst checkout 9dfd3a08500b7896045f907433cf7b4b02434fad COPY server/Cargo.* server/ COPY server/src server/src WORKDIR /app/server diff --git a/README.md b/README.md index c349c6a..747a7b1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # TypstDrive [![Version](https://img.shields.io/badge/version-1.5.0-blue.svg)](https://github.com/sirblobby/typstdrive) -[![Typst Version](https://img.shields.io/badge/Typst-0.14.2-239dad?logo=typst&logoColor=white)](https://typst.app/) +[![Typst Version](https://img.shields.io/badge/Typst-0.15.1-239dad?logo=typst&logoColor=white)](https://typst.app/) [![Rust](https://img.shields.io/badge/Rust-1.82+-orange?logo=rust&logoColor=white)](https://www.rust-lang.org/) [![SvelteKit](https://img.shields.io/badge/SvelteKit-5-ff3e00?logo=svelte)](https://kit.svelte.dev/) [![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-06B6D4?logo=tailwindcss&logoColor=white)](https://tailwindcss.com/) diff --git a/package.json b/package.json index fc64a0e..cb9cacc 100644 --- a/package.json +++ b/package.json @@ -14,30 +14,30 @@ "devDependencies": { "@sveltejs/adapter-auto": "^7.0.1", "@sveltejs/adapter-static": "^3.0.10", - "@sveltejs/kit": "^2.61.1", + "@sveltejs/kit": "^2.70.1", "@sveltejs/vite-plugin-svelte": "^6.2.4", "@tailwindcss/forms": "^0.5.11", - "@tailwindcss/typography": "^0.5.19", - "@tailwindcss/vite": "^4.3.0", - "svelte": "^5.56.0", - "svelte-check": "^4.4.8", - "tailwindcss": "^4.3.0", + "@tailwindcss/typography": "^0.5.20", + "@tailwindcss/vite": "^4.3.3", + "svelte": "^5.56.6", + "svelte-check": "^4.7.3", + "tailwindcss": "^4.3.3", "typescript": "^5.9.3", - "vite": "^7.3.3", + "vite": "^7.3.6", "vite-plugin-top-level-await": "^1.6.0", "vite-plugin-wasm": "^3.6.0" }, "dependencies": { - "@codemirror/autocomplete": "^6.20.2", - "@codemirror/commands": "^6.10.3", + "@codemirror/autocomplete": "^6.20.3", + "@codemirror/commands": "^6.10.4", "@codemirror/lang-rust": "^6.0.2", - "@codemirror/lint": "^6.9.6", - "@codemirror/lsp-client": "^6.2.4", - "@codemirror/legacy-modes": "^6.5.1", - "@codemirror/language": "^6.10.8", - "@codemirror/state": "^6.6.0", - "@codemirror/view": "^6.43.0", - "@iconify/svelte": "^5.2.1", + "@codemirror/lint": "^6.9.7", + "@codemirror/lsp-client": "^6.2.5", + "@codemirror/legacy-modes": "^6.5.3", + "@codemirror/language": "^6.12.4", + "@codemirror/state": "^6.7.1", + "@codemirror/view": "^6.43.6", + "@iconify/svelte": "^5.2.2", "chart.js": "^4.5.1", "codemirror": "^6.0.2", "codemirror-lang-typst": "^0.4.0", diff --git a/server/Cargo.toml b/server/Cargo.toml index 564ce71..2799fe1 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -20,7 +20,7 @@ argon2 = "0.5" futures-util = "0.3" ecow = "0.2" -typst = { version = "0.14.2", path = "../typst/crates/typst" } +typst = { version = "0.15.1", path = "../typst/crates/typst" } typst-kit = { path = "../typst/crates/typst-kit", features = ["system-downloader", "system-packages", "embedded-fonts"] } typst-pdf = { path = "../typst/crates/typst-pdf" } typst-render = { path = "../typst/crates/typst-render" } @@ -31,7 +31,7 @@ typst-layout = { path = "../typst/crates/typst-layout" } yrs = "0.18.8" yrs-axum = "0.8" -typst-assets = { version = "0.14.2", features = ["fonts"] } +typst-assets = { version = "0.15.1", features = ["fonts"] } tokio-stream = "0.1.18" tempfile = "3.27.0" sha2 = "0.10" diff --git a/server/src/compiler.rs b/server/src/compiler.rs index 3cddbb7..8fe83a5 100644 --- a/server/src/compiler.rs +++ b/server/src/compiler.rs @@ -3,7 +3,8 @@ use serde::Serialize; use std::collections::HashMap; use typst::diag::{SourceDiagnostic, Warned}; use typst::layout::{Frame, FrameItem}; -use typst_html::HtmlDocument; +use typst::utils::Scalar; +use typst_html::{HtmlDocument, HtmlOptions}; use typst_layout::PagedDocument; use typst_pdf::{pdf, PdfOptions}; use typst_render::{render, RenderOptions}; @@ -168,7 +169,7 @@ impl TypstCompiler { } => { if let Some(page) = doc.pages().first() { let options = RenderOptions { - pixel_per_pt: 2.0, + pixel_per_pt: Scalar::new(2.0), ..RenderOptions::default() }; let pixmap = render(page, &options); @@ -219,7 +220,7 @@ impl TypstCompiler { } }; - match typst_html::html(&document) { + match typst_html::html(&document, &HtmlOptions::default()) { Ok(html) => Ok(html), Err(errors) => { use typst::WorldExt; diff --git a/typst b/typst index 44b3f78..9dfd3a0 160000 --- a/typst +++ b/typst @@ -1 +1 @@ -Subproject commit 44b3f78ed37fedea75e911dde2269ef86c45316f +Subproject commit 9dfd3a08500b7896045f907433cf7b4b02434fad