diff options
Diffstat (limited to 'library/src/lib.rs')
| -rw-r--r-- | library/src/lib.rs | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/library/src/lib.rs b/library/src/lib.rs index 0f8346f0..0bd88501 100644 --- a/library/src/lib.rs +++ b/library/src/lib.rs @@ -1,6 +1,7 @@ //! Typst's standard library. #![allow(clippy::wildcard_in_or_patterns)] +#![allow(clippy::manual_range_contains)] #![allow(clippy::comparison_chain)] pub mod compute; @@ -15,7 +16,7 @@ pub mod visualize; use typst::diag::At; use typst::eval::{LangItems, Library, Module, Scope}; -use typst::geom::{Align, Color, Dir, GenAlign, Smart}; +use typst::geom::Smart; use typst::model::{Element, Styles}; use self::layout::LayoutRoot; @@ -41,40 +42,6 @@ fn global(math: Module) -> Module { symbols::define(&mut global); global.define("math", math); - // Colors. - global.define("black", Color::BLACK); - global.define("gray", Color::GRAY); - global.define("silver", Color::SILVER); - global.define("white", Color::WHITE); - global.define("navy", Color::NAVY); - global.define("blue", Color::BLUE); - global.define("aqua", Color::AQUA); - global.define("teal", Color::TEAL); - global.define("eastern", Color::EASTERN); - global.define("purple", Color::PURPLE); - global.define("fuchsia", Color::FUCHSIA); - global.define("maroon", Color::MAROON); - global.define("red", Color::RED); - global.define("orange", Color::ORANGE); - global.define("yellow", Color::YELLOW); - global.define("olive", Color::OLIVE); - global.define("green", Color::GREEN); - global.define("lime", Color::LIME); - - // Other constants. - global.define("ltr", Dir::LTR); - global.define("rtl", Dir::RTL); - global.define("ttb", Dir::TTB); - global.define("btt", Dir::BTT); - global.define("start", GenAlign::Start); - global.define("end", GenAlign::End); - global.define("left", GenAlign::Specific(Align::Left)); - global.define("center", GenAlign::Specific(Align::Center)); - global.define("right", GenAlign::Specific(Align::Right)); - global.define("top", GenAlign::Specific(Align::Top)); - global.define("horizon", GenAlign::Specific(Align::Horizon)); - global.define("bottom", GenAlign::Specific(Align::Bottom)); - Module::new("global").with_scope(global) } |
