diff --git a/pkgs/by-name/ty/typst-preview/Cargo.lock b/pkgs/by-name/ty/typst-preview/Cargo.lock index 257164ef986e..9cbb837c3305 100644 --- a/pkgs/by-name/ty/typst-preview/Cargo.lock +++ b/pkgs/by-name/ty/typst-preview/Cargo.lock @@ -54,9 +54,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.7" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -139,6 +139,24 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "await-tree" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626aa057fb6d254883c2750ef6bcbe6f6a5ce45daff839b538708411794f794d" +dependencies = [ + "coarsetime", + "derive_builder", + "flexstr", + "indextree", + "itertools", + "parking_lot", + "pin-project", + "tokio", + "tracing", + "weak-table", +] + [[package]] name = "az" version = "1.2.1" @@ -438,6 +456,17 @@ dependencies = [ "roff", ] +[[package]] +name = "coarsetime" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" +dependencies = [ + "libc", + "wasix", + "wasm-bindgen", +] + [[package]] name = "cobs" version = "0.2.3" @@ -604,14 +633,38 @@ dependencies = [ "memchr", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + [[package]] name = "darling" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", ] [[package]] @@ -628,17 +681,41 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core", + "darling_core 0.20.3", "quote", "syn 2.0.48", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.5.0" @@ -661,6 +738,37 @@ dependencies = [ "serde", ] +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + [[package]] name = "digest" version = "0.10.7" @@ -775,16 +883,26 @@ dependencies = [ ] [[package]] -name = "env_logger" -version = "0.10.1" +name = "env_filter" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" dependencies = [ - "humantime", - "is-terminal", "log", "regex", - "termcolor", +] + +[[package]] +name = "env_logger" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e7cf40684ae96ade6232ed84582f40ce0a66efcd43a5117aef610534f8e0b8" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", ] [[package]] @@ -856,6 +974,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "flexstr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d50aef14619d336a54fca5a592d952eb39037b1a1e7e6afd9f91c892ac7ef65" +dependencies = [ + "static_assertions", +] + [[package]] name = "float-cmp" version = "0.9.0" @@ -1095,7 +1222,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.11", "indexmap 2.1.0", "slab", "tokio", @@ -1174,6 +1301,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1181,7 +1319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.11", "pin-project-lite", ] @@ -1214,7 +1352,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.11", "http-body", "httparse", "httpdate", @@ -1234,7 +1372,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", + "http 0.2.11", "hyper", "rustls", "tokio", @@ -1497,6 +1635,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" +[[package]] +name = "indextree" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c40411d0e5c63ef1323c3d09ce5ec6d84d71531e18daed0743fccea279d7deb6" + [[package]] name = "inotify" version = "0.9.6" @@ -1544,17 +1688,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "is-terminal" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys 0.52.0", -] - [[package]] name = "is-wsl" version = "0.4.0" @@ -1565,6 +1698,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.10" @@ -1724,7 +1866,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", - "owning_ref", "scopeguard", ] @@ -1742,18 +1883,18 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memmap2" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" dependencies = [ "libc", ] [[package]] name = "memmap2" -version = "0.8.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -1981,15 +2122,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "owning_ref" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] - [[package]] name = "palette" version = "0.7.3" @@ -2066,6 +2198,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" +[[package]] +name = "pin-project" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "pin-project-lite" version = "0.2.13" @@ -2338,7 +2490,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.11", "http-body", "hyper", "hyper-rustls", @@ -2627,6 +2779,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "serde_spanned" version = "0.6.5" @@ -2671,7 +2834,7 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" dependencies = [ - "darling", + "darling 0.20.3", "proc-macro2", "quote", "syn 2.0.48", @@ -2813,6 +2976,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strict-num" version = "0.1.1" @@ -3130,9 +3299,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", @@ -3239,14 +3408,14 @@ checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.0.0", "httparse", "log", "rand", @@ -3334,9 +3503,10 @@ dependencies = [ [[package]] name = "typst-preview" -version = "0.10.5" +version = "0.10.8" dependencies = [ "anyhow", + "await-tree", "chrono", "clap", "clap_complete", @@ -3348,8 +3518,9 @@ dependencies = [ "env_logger", "futures", "hyper", + "indexmap 2.1.0", "log", - "memmap2 0.7.1", + "memmap2 0.9.4", "notify", "once_cell", "open", @@ -3387,8 +3558,8 @@ dependencies = [ [[package]] name = "typst-ts-compiler" -version = "0.4.2-rc5" -source = "git+https://github.com/Myriad-Dreamin/typst.ts?rev=54471328e55df43479ff56dc44920f803ccf1fe4#54471328e55df43479ff56dc44920f803ccf1fe4" +version = "0.4.2-rc6" +source = "git+https://github.com/Myriad-Dreamin/typst.ts?rev=98e3d3a42877b195f87223060882d55fd5aaa04a#98e3d3a42877b195f87223060882d55fd5aaa04a" dependencies = [ "append-only-vec", "base64", @@ -3425,8 +3596,8 @@ dependencies = [ [[package]] name = "typst-ts-core" -version = "0.4.2-rc5" -source = "git+https://github.com/Myriad-Dreamin/typst.ts?rev=54471328e55df43479ff56dc44920f803ccf1fe4#54471328e55df43479ff56dc44920f803ccf1fe4" +version = "0.4.2-rc6" +source = "git+https://github.com/Myriad-Dreamin/typst.ts?rev=98e3d3a42877b195f87223060882d55fd5aaa04a#98e3d3a42877b195f87223060882d55fd5aaa04a" dependencies = [ "base64", "base64-serde", @@ -3434,6 +3605,7 @@ dependencies = [ "byteorder", "comemo", "crossbeam-queue", + "dashmap", "ecow", "elsa", "flate2", @@ -3441,7 +3613,6 @@ dependencies = [ "hex", "log", "once_cell", - "owning_ref", "parking_lot", "path-clean", "rayon", @@ -3449,10 +3620,10 @@ dependencies = [ "rustc-hash", "serde", "serde_json", + "serde_repr", "serde_with", "sha2", "siphasher 1.0.0", - "svgtypes", "tiny-skia", "tiny-skia-path", "ttf-parser", @@ -3462,8 +3633,8 @@ dependencies = [ [[package]] name = "typst-ts-svg-exporter" -version = "0.4.2-rc5" -source = "git+https://github.com/Myriad-Dreamin/typst.ts?rev=54471328e55df43479ff56dc44920f803ccf1fe4#54471328e55df43479ff56dc44920f803ccf1fe4" +version = "0.4.2-rc6" +source = "git+https://github.com/Myriad-Dreamin/typst.ts?rev=98e3d3a42877b195f87223060882d55fd5aaa04a#98e3d3a42877b195f87223060882d55fd5aaa04a" dependencies = [ "base64", "comemo", @@ -3744,6 +3915,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasix" +version = "0.12.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" +dependencies = [ + "wasi", +] + [[package]] name = "wasm-bindgen" version = "0.2.90" @@ -3850,6 +4030,12 @@ dependencies = [ "indexmap-nostd", ] +[[package]] +name = "weak-table" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "323f4da9523e9a669e1eaf9c6e763892769b1d38c623913647bfdc1532fe4549" + [[package]] name = "web-sys" version = "0.3.67" diff --git a/pkgs/by-name/ty/typst-preview/dom.json b/pkgs/by-name/ty/typst-preview/dom.json index c3172208d400..38dfe78a9640 100644 --- a/pkgs/by-name/ty/typst-preview/dom.json +++ b/pkgs/by-name/ty/typst-preview/dom.json @@ -12,12 +12,12 @@ "link:local": "yarn link @myriaddreamin/typst.ts @myriaddreamin/typst-ts-renderer" }, "peerDependencies": { - "@myriaddreamin/typst-ts-renderer": "0.4.2-rc5", - "@myriaddreamin/typst.ts": "0.4.2-rc5" + "@myriaddreamin/typst-ts-renderer": "0.4.2-rc6", + "@myriaddreamin/typst.ts": "0.4.2-rc6" }, "devDependencies": { - "@myriaddreamin/typst-ts-renderer": "0.4.2-rc5", - "@myriaddreamin/typst.ts": "0.4.2-rc5", + "@myriaddreamin/typst-ts-renderer": "0.4.2-rc6", + "@myriaddreamin/typst.ts": "0.4.2-rc6", "typescript": "^5.0.2", "vite": "^4.3.9", "vite-plugin-singlefile": "^0.13.5", @@ -25,7 +25,7 @@ "vitest": "^0.32.2" }, "exports": { - ".": "./dist/esm/index.mjs", - "./*": "./dist/esm/*" + ".": "./src/index.mts", + "./*": "./src/*" } } diff --git a/pkgs/by-name/ty/typst-preview/frontend.json b/pkgs/by-name/ty/typst-preview/frontend.json index 365a04beeafd..4338a9c1b03c 100644 --- a/pkgs/by-name/ty/typst-preview/frontend.json +++ b/pkgs/by-name/ty/typst-preview/frontend.json @@ -12,13 +12,13 @@ "link:local": "yarn link @myriaddreamin/typst.ts @myriaddreamin/typst-ts-renderer" }, "dependencies": { - "@myriaddreamin/typst-ts-renderer": "0.4.2-rc5", - "@myriaddreamin/typst.ts": "0.4.2-rc5", + "@myriaddreamin/typst-ts-renderer": "0.4.2-rc6", + "@myriaddreamin/typst.ts": "0.4.2-rc6", "typst-dom": "file:../typst-dom", "rxjs": "^7.8.1" }, "devDependencies": { - "typescript": "^5.0.2", + "typescript": "^5.3.3", "vite": "^4.3.9", "vite-plugin-singlefile": "^0.13.5", "vite-plugin-wasm": "^3.2.2", diff --git a/pkgs/by-name/ty/typst-preview/package.nix b/pkgs/by-name/ty/typst-preview/package.nix index 0e5f12cdc4c3..68eae7b47f69 100644 --- a/pkgs/by-name/ty/typst-preview/package.nix +++ b/pkgs/by-name/ty/typst-preview/package.nix @@ -14,14 +14,20 @@ let # Keep the vscode "mgt19937.typst-preview" extension in sync when updating # this package at pkgs/applications/editors/vscode/extensions/default.nix - version = "0.10.5"; + version = "0.10.8"; src = fetchFromGitHub { owner = "Enter-tainer"; repo = "typst-preview"; rev = "v${version}"; - hash = "sha256-BebOwlY2hm/SGYCtmsQICbo1V8sbUMYVWSM773Qmh04="; + hash = "sha256-n3lrJpCe/+THYepiiWIlTEMSMZPX7Qiucbg1ouU1ZEs="; fetchSubmodules = true; + + postFetch = '' + cd $out + substituteInPlace addons/frontend/yarn.lock \ + --replace-fail '"typst-dom@link:../typst-dom"' '"typst-dom@file:../typst-dom"' + ''; }; frontendSrc = "${src}/addons/frontend"; @@ -35,7 +41,7 @@ let offlineCache = fetchYarnDeps { yarnLock = "${domSrc}/yarn.lock"; - hash = "sha256-SxOQ/RABUkiqE7dLaDS0kETGiir4SMWJ2w7i7zMEl7U="; + hash = "sha256-+xn2SmpYdAb1nZkTOURqR5teu3dx2AKaiGoa9AmPA7o="; }; buildPhase = '' @@ -61,7 +67,7 @@ let offlineCache = fetchYarnDeps { yarnLock = "${frontendSrc}/yarn.lock"; - hash = "sha256-6e3UNd8gIBnTtllpo/1AC1XzeZ88rdUiechoQfo5V1Y="; + hash = "sha256-o8zWMLt6WqYWhcC7rqSeue6TxN20lYIjGqMxLApy5l0="; }; packageResolutions = { inherit typst-dom; }; @@ -90,8 +96,7 @@ rustPlatform.buildRustPackage { lockFile = ./Cargo.lock; outputHashes = { "typst-0.10.0" = "sha256-/Oy4KigXu1E/S9myd+eigqlNvk5x+Ld9gTL9dtpoyqk="; - "typst-ts-compiler-0.4.2-rc5" = - "sha256-fhwTaAK19Nb7AKNJ9QBZgK1MO7g7s5AdSDqaBjLxT3w="; + "typst-ts-compiler-0.4.2-rc6" = "sha256-mDQDxqXp38+Omt7D7kO2cUAVzG+h3JOs4tBdrbHH/lA="; }; };