summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2023-11-24 16:38:03 +0100
committerMartin Haug <mhaug@live.de>2023-11-24 16:38:03 +0100
commit2f795b5c07171affa0709195a9dae3ed5c0afbeb (patch)
tree560cbef69dffb7d802a7371c7fdc88e7caf02052
parent1756718bab3055597723a9b433419ff07e6b7f02 (diff)
Bump Hayagriva
Fix #2572
-rw-r--r--Cargo.lock130
-rw-r--r--Cargo.toml2
-rw-r--r--crates/typst/src/model/bibliography.rs8
-rw-r--r--tests/ref/meta/bibliography-full.pngbin147030 -> 149965 bytes
-rw-r--r--tests/ref/meta/bibliography-ordering.pngbin155039 -> 155470 bytes
-rw-r--r--tests/ref/meta/bibliography.pngbin118033 -> 119754 bytes
-rw-r--r--tests/ref/meta/cite-footnote.pngbin47295 -> 47687 bytes
-rw-r--r--tests/ref/meta/cite-form.pngbin29107 -> 32970 bytes
-rw-r--r--tests/ref/meta/cite-group.pngbin16597 -> 15233 bytes
-rw-r--r--tests/ref/text/linebreak-obj.pngbin45427 -> 58271 bytes
-rw-r--r--tests/typ/meta/bibliography-full.typ2
11 files changed, 16 insertions, 126 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 8279a484..11a04e66 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10,17 +10,6 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "ahash"
-version = "0.7.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd"
-dependencies = [
- "getrandom",
- "once_cell",
- "version_check",
-]
-
-[[package]]
-name = "ahash"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a"
@@ -145,9 +134,9 @@ checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
[[package]]
name = "biblatex"
-version = "0.8.1"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e41df82f0d1c4919d946bb0c7c3d179b6071246243d308a1bdee6cfecee3bc7"
+checksum = "88be3c837773ba281f5fd6674c1c82565c62726abe3d76707da6fb9d434cc392"
dependencies = [
"numerals",
"paste",
@@ -214,28 +203,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
[[package]]
-name = "bytecheck"
-version = "0.6.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627"
-dependencies = [
- "bytecheck_derive",
- "ptr_meta",
- "simdutf8",
-]
-
-[[package]]
-name = "bytecheck_derive"
-version = "0.6.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
-[[package]]
name = "bytemuck"
version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -321,9 +288,9 @@ dependencies = [
[[package]]
name = "citationberg"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c857faf24e89710f105b623c174508070a9e11e056a749f251ca4c56f59ad88"
+checksum = "c15a0bf8014b266d11f20451dc9202d8d26180ffd8b094d73ecbe74d821f01fb"
dependencies = [
"quick-xml 0.28.2",
"serde",
@@ -822,9 +789,6 @@ name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
-dependencies = [
- "ahash 0.7.7",
-]
[[package]]
name = "hashbrown"
@@ -832,7 +796,7 @@ version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
dependencies = [
- "ahash 0.8.6",
+ "ahash",
]
[[package]]
@@ -843,9 +807,9 @@ checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
[[package]]
name = "hayagriva"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5af3d464a6b5ae882f15fe1da4e696fd96b77fee78ded933e0ad81d1d87cbc5"
+checksum = "ce91abe74c9f37ac2997dd4a09680d1e5ce1fe3bf5bd1b10ea47f8c893e46656"
dependencies = [
"biblatex",
"ciborium",
@@ -853,7 +817,6 @@ dependencies = [
"indexmap 2.0.2",
"numerals",
"paste",
- "rkyv",
"serde",
"serde_yaml 0.9.27",
"thiserror",
@@ -1150,7 +1113,7 @@ version = "0.11.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c50453ec3a6555fad17b1cd1a80d16af5bc7cb35094f64e429fd46549018c6a3"
dependencies = [
- "ahash 0.8.6",
+ "ahash",
"clap",
"crossbeam-channel",
"crossbeam-utils",
@@ -1282,7 +1245,7 @@ version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4644821e1c3d7a560fe13d842d13f587c07348a1a05d3a797152d41c90c56df2"
dependencies = [
- "ahash 0.8.6",
+ "ahash",
"dashmap",
"hashbrown 0.13.2",
]
@@ -1728,26 +1691,6 @@ dependencies = [
]
[[package]]
-name = "ptr_meta"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1"
-dependencies = [
- "ptr_meta_derive",
-]
-
-[[package]]
-name = "ptr_meta_derive"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
-[[package]]
name = "pulldown-cmark"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1927,15 +1870,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
-name = "rend"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd"
-dependencies = [
- "bytecheck",
-]
-
-[[package]]
name = "resvg"
version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1976,34 +1910,6 @@ dependencies = [
]
[[package]]
-name = "rkyv"
-version = "0.7.42"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58"
-dependencies = [
- "bitvec",
- "bytecheck",
- "hashbrown 0.12.3",
- "ptr_meta",
- "rend",
- "rkyv_derive",
- "seahash",
- "tinyvec",
- "uuid",
-]
-
-[[package]]
-name = "rkyv_derive"
-version = "0.7.42"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
-[[package]]
name = "roff"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2137,12 +2043,6 @@ dependencies = [
]
[[package]]
-name = "seahash"
-version = "4.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b"
-
-[[package]]
name = "self-replace"
version = "1.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2240,12 +2140,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
-name = "simdutf8"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a"
-
-[[package]]
name = "simplecss"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3162,12 +3056,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
-name = "uuid"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc"
-
-[[package]]
name = "valuable"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 3edde258..f2d280f3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,7 +43,7 @@ ecow = { version = "0.2", features = ["serde"] }
env_proxy = "0.4"
flate2 = "1"
fontdb = { version = "0.15", default-features = false }
-hayagriva = "0.4"
+hayagriva = "0.5"
heck = "0.4"
hypher = "0.1.4"
iai = { git = "https://github.com/typst/iai", rev = "3f0f927" }
diff --git a/crates/typst/src/model/bibliography.rs b/crates/typst/src/model/bibliography.rs
index 5c260300..f6e189e1 100644
--- a/crates/typst/src/model/bibliography.rs
+++ b/crates/typst/src/model/bibliography.rs
@@ -8,6 +8,7 @@ use std::sync::Arc;
use comemo::{Prehashed, Tracked};
use ecow::{eco_format, EcoString, EcoVec};
+use hayagriva::archive::ArchivedStyle;
use hayagriva::io::BibLaTeXError;
use hayagriva::{
citationberg, BibliographyDriver, BibliographyRequest, CitationItem, CitationRequest,
@@ -486,7 +487,7 @@ impl CslStyle {
/// Load a built-in CSL style.
#[comemo::memoize]
pub fn from_name(name: &str) -> StrResult<Self> {
- match hayagriva::archive::style_by_name(name) {
+ match hayagriva::archive::ArchivedStyle::by_name(name).map(ArchivedStyle::get) {
Some(citationberg::Style::Independent(style)) => Ok(Self {
name: Some(name.into()),
style: Arc::new(Prehashed::new(style)),
@@ -517,8 +518,9 @@ impl Reflect for CslStyle {
#[comemo::memoize]
fn input() -> CastInfo {
let ty = std::iter::once(CastInfo::Type(Type::of::<Str>()));
- let options = hayagriva::archive::styles()
- .map(|style| CastInfo::Value(style.name.into_value(), style.full_name));
+ let options = hayagriva::archive::ArchivedStyle::all().iter().map(|name| {
+ CastInfo::Value(name.names()[0].into_value(), name.display_name())
+ });
CastInfo::Union(ty.chain(options).collect())
}
diff --git a/tests/ref/meta/bibliography-full.png b/tests/ref/meta/bibliography-full.png
index 39173896..2ccccf54 100644
--- a/tests/ref/meta/bibliography-full.png
+++ b/tests/ref/meta/bibliography-full.png
Binary files differ
diff --git a/tests/ref/meta/bibliography-ordering.png b/tests/ref/meta/bibliography-ordering.png
index d1be5ddf..e221e5df 100644
--- a/tests/ref/meta/bibliography-ordering.png
+++ b/tests/ref/meta/bibliography-ordering.png
Binary files differ
diff --git a/tests/ref/meta/bibliography.png b/tests/ref/meta/bibliography.png
index ed3dd667..3b855fdd 100644
--- a/tests/ref/meta/bibliography.png
+++ b/tests/ref/meta/bibliography.png
Binary files differ
diff --git a/tests/ref/meta/cite-footnote.png b/tests/ref/meta/cite-footnote.png
index bd027cc2..4fabdaad 100644
--- a/tests/ref/meta/cite-footnote.png
+++ b/tests/ref/meta/cite-footnote.png
Binary files differ
diff --git a/tests/ref/meta/cite-form.png b/tests/ref/meta/cite-form.png
index 7394b89e..8adeac92 100644
--- a/tests/ref/meta/cite-form.png
+++ b/tests/ref/meta/cite-form.png
Binary files differ
diff --git a/tests/ref/meta/cite-group.png b/tests/ref/meta/cite-group.png
index ade98093..8d02a903 100644
--- a/tests/ref/meta/cite-group.png
+++ b/tests/ref/meta/cite-group.png
Binary files differ
diff --git a/tests/ref/text/linebreak-obj.png b/tests/ref/text/linebreak-obj.png
index 665bfa00..b5c75d91 100644
--- a/tests/ref/text/linebreak-obj.png
+++ b/tests/ref/text/linebreak-obj.png
Binary files differ
diff --git a/tests/typ/meta/bibliography-full.typ b/tests/typ/meta/bibliography-full.typ
index 0adc0b85..f67909b4 100644
--- a/tests/typ/meta/bibliography-full.typ
+++ b/tests/typ/meta/bibliography-full.typ
@@ -1,5 +1,5 @@
// Test the full bibliography.
---
-#set page(paper: "a6")
+#set page(paper: "a6", height: 160mm)
#bibliography("/files/works.bib", full: true)