diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-01 16:30:58 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-01 16:33:28 +0100 |
| commit | 6ab7760822ccd24b4ef126d4737d41f1be15fe19 (patch) | |
| tree | 49905f91d292ceefe4f9878ead43f117c4b1fec0 /library | |
| parent | ab841188e3d2687ee8f436336e6fde337985a83e (diff) | |
Split up `model` module
Diffstat (limited to 'library')
| -rw-r--r-- | library/src/compute/calc.rs | 2 | ||||
| -rw-r--r-- | library/src/compute/construct.rs | 2 | ||||
| -rw-r--r-- | library/src/compute/foundations.rs | 2 | ||||
| -rw-r--r-- | library/src/lib.rs | 3 | ||||
| -rw-r--r-- | library/src/math/accent.rs | 2 | ||||
| -rw-r--r-- | library/src/math/mod.rs | 6 | ||||
| -rw-r--r-- | library/src/math/op.rs | 2 | ||||
| -rw-r--r-- | library/src/prelude.rs | 12 | ||||
| -rw-r--r-- | library/src/symbols/emoji.rs | 2 | ||||
| -rw-r--r-- | library/src/symbols/sym.rs | 2 |
10 files changed, 20 insertions, 15 deletions
diff --git a/library/src/compute/calc.rs b/library/src/compute/calc.rs index 8eae1185..9ebce84c 100644 --- a/library/src/compute/calc.rs +++ b/library/src/compute/calc.rs @@ -1,7 +1,7 @@ use std::cmp::Ordering; use std::ops::Rem; -use typst::model::{Module, Scope}; +use typst::eval::{Module, Scope}; use crate::prelude::*; diff --git a/library/src/compute/construct.rs b/library/src/compute/construct.rs index b6f2de8f..8355e20f 100644 --- a/library/src/compute/construct.rs +++ b/library/src/compute/construct.rs @@ -1,7 +1,7 @@ use std::str::FromStr; use ecow::EcoVec; -use typst::model::Regex; +use typst::eval::Regex; use crate::prelude::*; diff --git a/library/src/compute/foundations.rs b/library/src/compute/foundations.rs index ccf7a165..1619fb60 100644 --- a/library/src/compute/foundations.rs +++ b/library/src/compute/foundations.rs @@ -137,5 +137,5 @@ pub fn assert(args: &mut Args) -> SourceResult<Value> { #[func] pub fn eval(vm: &Vm, args: &mut Args) -> SourceResult<Value> { let Spanned { v: text, span } = args.expect::<Spanned<String>>("source")?; - typst::model::eval_code_str(vm.world(), &text, span) + typst::eval::eval_code_str(vm.world(), &text, span) } diff --git a/library/src/lib.rs b/library/src/lib.rs index 31da5b71..0759f73f 100644 --- a/library/src/lib.rs +++ b/library/src/lib.rs @@ -10,8 +10,9 @@ pub mod symbols; pub mod text; pub mod visualize; +use typst::eval::{LangItems, Library, Module, Scope}; use typst::geom::{Align, Color, Dir, GenAlign}; -use typst::model::{LangItems, Library, Module, Node, NodeId, Scope, StyleMap}; +use typst::model::{Node, NodeId, StyleMap}; use self::layout::LayoutRoot; diff --git a/library/src/math/accent.rs b/library/src/math/accent.rs index aa6d0523..9c474eee 100644 --- a/library/src/math/accent.rs +++ b/library/src/math/accent.rs @@ -1,4 +1,4 @@ -use typst::model::combining_accent; +use typst::eval::combining_accent; use super::*; diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index c455d106..d73b1769 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -29,9 +29,9 @@ pub use self::style::*; pub use self::underover::*; use ttf_parser::{GlyphId, Rect}; -use typst::font::Font; -use typst::font::FontWeight; -use typst::model::{Guard, Module, Scope, SequenceNode, StyledNode}; +use typst::eval::{Module, Scope}; +use typst::font::{Font, FontWeight}; +use typst::model::{Guard, SequenceNode, StyledNode}; use unicode_math_class::MathClass; use self::ctx::*; diff --git a/library/src/math/op.rs b/library/src/math/op.rs index 772013bd..4eb9c48c 100644 --- a/library/src/math/op.rs +++ b/library/src/math/op.rs @@ -1,4 +1,4 @@ -use typst::model::Scope; +use typst::eval::Scope; use super::*; diff --git a/library/src/prelude.rs b/library/src/prelude.rs index 22458a55..a406e586 100644 --- a/library/src/prelude.rs +++ b/library/src/prelude.rs @@ -14,13 +14,17 @@ pub use typst::diag::{bail, error, At, SourceResult, StrResult}; #[doc(no_inline)] pub use typst::doc::*; #[doc(no_inline)] +pub use typst::eval::{ + array, castable, dict, format_str, func, Args, Array, AutoValue, Cast, CastInfo, + Dict, Func, NoneValue, Str, Symbol, Value, Vm, +}; +#[doc(no_inline)] pub use typst::geom::*; #[doc(no_inline)] pub use typst::model::{ - array, capability, capable, castable, dict, format_str, func, node, Args, Array, - AutoValue, Cast, CastInfo, Content, Dict, Finalize, Fold, Func, Introspector, Label, - Node, NodeId, NoneValue, Prepare, Resolve, Selector, Show, StabilityProvider, Str, - StyleChain, StyleMap, StyleVec, Symbol, Unlabellable, Value, Vm, Vt, + capability, capable, node, Content, Finalize, Fold, Introspector, Label, Node, + NodeId, Prepare, Resolve, Selector, Show, StabilityProvider, StyleChain, StyleMap, + StyleVec, Unlabellable, Vt, }; #[doc(no_inline)] pub use typst::syntax::{Span, Spanned}; diff --git a/library/src/symbols/emoji.rs b/library/src/symbols/emoji.rs index efde0e76..07c7004b 100644 --- a/library/src/symbols/emoji.rs +++ b/library/src/symbols/emoji.rs @@ -1,4 +1,4 @@ -use typst::model::{symbols, Module, Scope, Symbol}; +use typst::eval::{symbols, Module, Scope, Symbol}; /// A module with all emoji. pub fn emoji() -> Module { diff --git a/library/src/symbols/sym.rs b/library/src/symbols/sym.rs index 6a6ca758..90c89fc3 100644 --- a/library/src/symbols/sym.rs +++ b/library/src/symbols/sym.rs @@ -1,4 +1,4 @@ -use typst::model::{symbols, Module, Scope, Symbol}; +use typst::eval::{symbols, Module, Scope, Symbol}; /// A module with all general symbols. pub fn sym() -> Module { |
