diff --git a/Cargo.lock b/Cargo.lock index da0c361f..1ad1b1a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3027,8 +3027,7 @@ dependencies = [ [[package]] name = "reflexo" version = "0.6.1-rc2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49bb801abf7897f79246c3ad6f24a209946068cfcd7b5023a87b4e193c379036" +source = "git+https://github.com/Myriad-Dreamin/typst.ts/?rev=3eeb078e2a21caf8256585e4f533df1810c33a09#3eeb078e2a21caf8256585e4f533df1810c33a09" dependencies = [ "base64", "bitvec", @@ -3054,8 +3053,7 @@ dependencies = [ [[package]] name = "reflexo-typst" version = "0.6.1-rc2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52aec9144a211331de8a5c3049f6208a011ec237aea942a44d5fad348c85dcbc" +source = "git+https://github.com/Myriad-Dreamin/typst.ts/?rev=3eeb078e2a21caf8256585e4f533df1810c33a09#3eeb078e2a21caf8256585e4f533df1810c33a09" dependencies = [ "codespan-reporting", "comemo", @@ -3087,8 +3085,7 @@ dependencies = [ [[package]] name = "reflexo-typst2vec" version = "0.6.1-rc2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf52ed5c3ebb05573ee1b866726f42307de567eeb9bd26575f44e2bae52addc" +source = "git+https://github.com/Myriad-Dreamin/typst.ts/?rev=3eeb078e2a21caf8256585e4f533df1810c33a09#3eeb078e2a21caf8256585e4f533df1810c33a09" dependencies = [ "bitvec", "comemo", @@ -3114,8 +3111,7 @@ dependencies = [ [[package]] name = "reflexo-vec2svg" version = "0.6.1-rc2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee562f404dbb724c33361281eb5fca8f30fa7a50184c8d4fcfa9e336eda79c3c" +source = "git+https://github.com/Myriad-Dreamin/typst.ts/?rev=3eeb078e2a21caf8256585e4f533df1810c33a09#3eeb078e2a21caf8256585e4f533df1810c33a09" dependencies = [ "base64", "comemo", @@ -4360,7 +4356,7 @@ dependencies = [ [[package]] name = "tinymist-derive" -version = "0.13.16" +version = "0.13.24-rc1" dependencies = [ "quote", "syn 2.0.104", @@ -4368,7 +4364,7 @@ dependencies = [ [[package]] name = "tinymist-l10n" -version = "0.13.16" +version = "0.13.24-rc1" dependencies = [ "anyhow", "clap", @@ -4396,7 +4392,7 @@ dependencies = [ [[package]] name = "tinymist-package" -version = "0.13.16" +version = "0.13.24-rc1" dependencies = [ "base64", "comemo", @@ -4447,7 +4443,7 @@ dependencies = [ [[package]] name = "tinymist-project" -version = "0.13.16" +version = "0.13.24-rc1" dependencies = [ "anyhow", "clap", @@ -4542,7 +4538,7 @@ dependencies = [ [[package]] name = "tinymist-std" -version = "0.13.16" +version = "0.13.24-rc1" dependencies = [ "anyhow", "base64", @@ -4579,7 +4575,7 @@ dependencies = [ [[package]] name = "tinymist-task" -version = "0.13.16" +version = "0.13.24-rc1" dependencies = [ "anyhow", "clap", @@ -4625,7 +4621,7 @@ dependencies = [ [[package]] name = "tinymist-vfs" -version = "0.13.16" +version = "0.13.24-rc1" dependencies = [ "comemo", "ecow", @@ -4643,7 +4639,7 @@ dependencies = [ [[package]] name = "tinymist-world" -version = "0.13.16" +version = "0.13.24-rc1" dependencies = [ "anyhow", "chrono", @@ -5232,7 +5228,7 @@ dependencies = [ [[package]] name = "typst-shim" -version = "0.13.16" +version = "0.13.24-rc1" dependencies = [ "cfg-if", "comemo", diff --git a/Cargo.toml b/Cargo.toml index 7a13cc7a..d6602850 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -189,15 +189,15 @@ insta-cmd = "0.6.0" # Our Own Crates tinymist-assets = { version = "=0.13.24-rc1" } -tinymist-derive = { path = "./crates/tinymist-derive/", version = "0.13.16" } -tinymist-l10n = { path = "./crates/tinymist-l10n/", version = "0.13.16" } -tinymist-package = { path = "./crates/tinymist-package/", version = "0.13.16" } -tinymist-std = { path = "./crates/tinymist-std/", version = "0.13.16", default-features = false } -tinymist-vfs = { path = "./crates/tinymist-vfs/", version = "0.13.16", default-features = false } -tinymist-world = { path = "./crates/tinymist-world/", version = "0.13.16", default-features = false } -tinymist-project = { path = "./crates/tinymist-project/", version = "0.13.16" } -tinymist-task = { path = "./crates/tinymist-task/", version = "0.13.16" } -typst-shim = { path = "./crates/typst-shim", version = "0.13.16" } +tinymist-derive = { path = "./crates/tinymist-derive/", version = "0.13.24-rc1" } +tinymist-l10n = { path = "./crates/tinymist-l10n/", version = "0.13.24-rc1" } +tinymist-package = { path = "./crates/tinymist-package/", version = "0.13.24-rc1" } +tinymist-std = { path = "./crates/tinymist-std/", version = "0.13.24-rc1", default-features = false } +tinymist-vfs = { path = "./crates/tinymist-vfs/", version = "0.13.24-rc1", default-features = false } +tinymist-world = { path = "./crates/tinymist-world/", version = "0.13.24-rc1", default-features = false } +tinymist-project = { path = "./crates/tinymist-project/", version = "0.13.24-rc1" } +tinymist-task = { path = "./crates/tinymist-task/", version = "0.13.24-rc1" } +typst-shim = { path = "./crates/typst-shim", version = "0.13.24-rc1" } tinymist-tests = { path = "./crates/tinymist-tests/" } @@ -299,9 +299,9 @@ typst-eval = { git = "https://github.com/Myriad-Dreamin/typst.git", tag = "tinym # These patches use a different version of `reflexo`. # # A regular build MUST use `tag` or `rev` to specify the version of the patched crate to ensure stability. -# reflexo = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "721308ad79ee5c529a65da17239a58dca7b5453c" } -# reflexo-typst = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "721308ad79ee5c529a65da17239a58dca7b5453c" } -# reflexo-vec2svg = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "721308ad79ee5c529a65da17239a58dca7b5453c" } +reflexo = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "3eeb078e2a21caf8256585e4f533df1810c33a09" } +reflexo-typst = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "3eeb078e2a21caf8256585e4f533df1810c33a09" } +reflexo-vec2svg = { git = "https://github.com/Myriad-Dreamin/typst.ts/", rev = "3eeb078e2a21caf8256585e4f533df1810c33a09" } # These patches use local `reflexo` for development. # reflexo = { path = "../typst.ts/crates/reflexo/" } diff --git a/crates/tinymist-derive/Cargo.toml b/crates/tinymist-derive/Cargo.toml index f4e0237c..b164cde5 100644 --- a/crates/tinymist-derive/Cargo.toml +++ b/crates/tinymist-derive/Cargo.toml @@ -4,7 +4,7 @@ description = "Provides derive for tinymist." categories = ["compilers"] keywords = ["typst"] # group: world -version = "0.13.16" +version = "0.13.24-rc1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/tinymist-l10n/Cargo.toml b/crates/tinymist-l10n/Cargo.toml index dd6595aa..d54f88e5 100644 --- a/crates/tinymist-l10n/Cargo.toml +++ b/crates/tinymist-l10n/Cargo.toml @@ -4,7 +4,7 @@ description = "Localization support for tinymist and typst." categories = ["compilers", "command-line-utilities"] keywords = ["language", "typst"] # group: world -version = "0.13.16" +version = "0.13.24-rc1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/tinymist-package/Cargo.toml b/crates/tinymist-package/Cargo.toml index 3a05f8ed..08fca6d7 100644 --- a/crates/tinymist-package/Cargo.toml +++ b/crates/tinymist-package/Cargo.toml @@ -4,7 +4,7 @@ description = "Tinymist package support for Typst." categories = ["compilers"] keywords = ["api", "language", "typst"] # group: world -version = "0.13.16" +version = "0.13.24-rc1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/tinymist-project/Cargo.toml b/crates/tinymist-project/Cargo.toml index 95578f57..0b49373a 100644 --- a/crates/tinymist-project/Cargo.toml +++ b/crates/tinymist-project/Cargo.toml @@ -4,7 +4,7 @@ description = "Project model of typst for tinymist." categories = ["compilers"] keywords = ["language", "typst"] # group: world -version = "0.13.16" +version = "0.13.24-rc1" authors.workspace = true license.workspace = true edition.workspace = true @@ -43,7 +43,7 @@ no-content-hint = ["tinymist-task/no-content-hint"] lsp = ["toml"] # "system", -system = ["tinymist-std/system", "tinymist-world/system"] +system = ["tinymist-std/system", "tinymist-world/system", "toml"] web = ["tinymist-std/web", "tinymist-world/web"] [lints] diff --git a/crates/tinymist-project/src/compiler.rs b/crates/tinymist-project/src/compiler.rs index d99fed3a..eb75b0d9 100644 --- a/crates/tinymist-project/src/compiler.rs +++ b/crates/tinymist-project/src/compiler.rs @@ -785,10 +785,10 @@ impl ProjectInsState { /// Compile the document once if there is any reason and the entry is /// active. (this is used for experimenting typst.node compilations) #[must_use] - pub fn may_compile2( + pub fn may_compile2<'a>( &mut self, - compute: impl FnOnce(&Arc>), - ) -> Option Arc>> { + compute: impl FnOnce(&Arc>) + 'a, + ) -> Option Arc> + 'a> { if !self.reason.any() || self.verse.entry_state().is_inactive() { return None; } diff --git a/crates/tinymist-project/src/lib.rs b/crates/tinymist-project/src/lib.rs index fc54d1cd..c4ff79f9 100644 --- a/crates/tinymist-project/src/lib.rs +++ b/crates/tinymist-project/src/lib.rs @@ -3,10 +3,9 @@ mod args; mod compiler; mod entry; +mod lock; mod model; -#[cfg(feature = "lsp")] -mod lock; #[cfg(feature = "lsp")] mod lsp; #[cfg(feature = "system")] diff --git a/crates/tinymist-project/src/lock/system.rs b/crates/tinymist-project/src/lock/system.rs index 19c067e3..1acccf9c 100644 --- a/crates/tinymist-project/src/lock/system.rs +++ b/crates/tinymist-project/src/lock/system.rs @@ -11,7 +11,7 @@ use typst::World; use typst::diag::EcoString; use crate::model::{ApplyProjectTask, Id, ProjectInput, ProjectRoute, ResourcePath}; -use crate::{LOCK_FILENAME, LOCK_VERSION, LockFile, LockFileCompat, LspWorld, ProjectPathMaterial}; +use crate::{LOCK_FILENAME, LOCK_VERSION, LockFile, LockFileCompat, ProjectPathMaterial}; impl LockFile { /// Gets the input by the id. @@ -261,7 +261,8 @@ pub struct LockFileUpdate { impl LockFileUpdate { /// Compiles the lock file. - pub fn compiled(&mut self, world: &LspWorld, ctx: CtxPath) -> Option { + #[cfg(feature = "lsp")] + pub fn compiled(&mut self, world: &crate::LspWorld, ctx: CtxPath) -> Option { let id = Id::from_world(world, ctx)?; let root = ResourcePath::from_user_sys(Path::new("."), ctx); diff --git a/crates/tinymist-std/Cargo.toml b/crates/tinymist-std/Cargo.toml index bc694afd..4ece1bde 100644 --- a/crates/tinymist-std/Cargo.toml +++ b/crates/tinymist-std/Cargo.toml @@ -2,7 +2,7 @@ name = "tinymist-std" description = "Additional functions wrapping Rust's standard library." # group: world -version = "0.13.16" +version = "0.13.24-rc1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/tinymist-task/Cargo.toml b/crates/tinymist-task/Cargo.toml index 0fb79eb1..d58cbfee 100644 --- a/crates/tinymist-task/Cargo.toml +++ b/crates/tinymist-task/Cargo.toml @@ -4,7 +4,7 @@ description = "Task model of typst for tinymist." categories = ["compilers"] keywords = ["language", "typst"] # group: world -version = "0.13.16" +version = "0.13.24-rc1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/tinymist-vfs/Cargo.toml b/crates/tinymist-vfs/Cargo.toml index a702a925..660c04a3 100644 --- a/crates/tinymist-vfs/Cargo.toml +++ b/crates/tinymist-vfs/Cargo.toml @@ -2,7 +2,7 @@ name = "tinymist-vfs" description = "Vfs for tinymist." # group: world -version = "0.13.16" +version = "0.13.24-rc1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/tinymist-world/Cargo.toml b/crates/tinymist-world/Cargo.toml index 526b376d..f8934831 100644 --- a/crates/tinymist-world/Cargo.toml +++ b/crates/tinymist-world/Cargo.toml @@ -4,7 +4,7 @@ description = "Typst's World implementation for tinymist." categories = ["compilers"] keywords = ["language", "typst"] # group: world -version = "0.13.16" +version = "0.13.24-rc1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/tinymist-world/src/font/web/mod.rs b/crates/tinymist-world/src/font/web/mod.rs index bc5fd1f7..bd25611a 100644 --- a/crates/tinymist-world/src/font/web/mod.rs +++ b/crates/tinymist-world/src/font/web/mod.rs @@ -427,7 +427,7 @@ impl BrowserFontSearcher { for font_data in typst_assets::fonts() { let buffer = Bytes::new(font_data); - self.fonts.extend( + self.base.fonts.extend( Font::iter(buffer) .map(|font| (font.info().clone(), FontSlot::new_loaded(Some(font)))), ); diff --git a/crates/typst-shim/Cargo.toml b/crates/typst-shim/Cargo.toml index fe1159c1..373ecba5 100644 --- a/crates/typst-shim/Cargo.toml +++ b/crates/typst-shim/Cargo.toml @@ -3,7 +3,7 @@ name = "typst-shim" description = "A compatibility layer for Typst release and mainline versions." authors = ["The Typst Project Developers"] # group: world -version = "0.13.16" +version = "0.13.24-rc1" edition.workspace = true license.workspace = true homepage.workspace = true