summaryrefslogtreecommitdiff
path: root/crates/typst-cli
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-12-02 13:37:33 +0100
committerLaurenz <laurmaedje@gmail.com>2024-12-04 10:12:07 +0100
commitf8f2ba6a5f8c8ca7dbb85cf17b73332a0c301c60 (patch)
treeb3bc754509fb3ab4c74493848fe96f116b7907ed /crates/typst-cli
parent76c24ee6e35715cd14bb892d7b6b8d775c680bf7 (diff)
Rename `Document` to `PagedDocument`
Diffstat (limited to 'crates/typst-cli')
-rw-r--r--crates/typst-cli/src/compile.rs9
-rw-r--r--crates/typst-cli/src/query.rs4
2 files changed, 6 insertions, 7 deletions
diff --git a/crates/typst-cli/src/compile.rs b/crates/typst-cli/src/compile.rs
index 74d818a5..c6d37ffe 100644
--- a/crates/typst-cli/src/compile.rs
+++ b/crates/typst-cli/src/compile.rs
@@ -12,8 +12,7 @@ use typst::diag::{
bail, At, Severity, SourceDiagnostic, SourceResult, StrResult, Warned,
};
use typst::foundations::{Datetime, Smart};
-use typst::layout::{Frame, Page, PageRanges};
-use typst::model::Document;
+use typst::layout::{Frame, Page, PageRanges, PagedDocument};
use typst::syntax::{FileId, Source, Span};
use typst::WorldExt;
use typst_pdf::{PdfOptions, PdfStandards};
@@ -171,7 +170,7 @@ pub fn compile_once(
/// Export into the target format.
fn export(
world: &mut SystemWorld,
- document: &Document,
+ document: &PagedDocument,
command: &CompileCommand,
watching: bool,
) -> SourceResult<()> {
@@ -189,7 +188,7 @@ fn export(
}
/// Export to a PDF.
-fn export_pdf(document: &Document, command: &CompileCommand) -> SourceResult<()> {
+fn export_pdf(document: &PagedDocument, command: &CompileCommand) -> SourceResult<()> {
let options = PdfOptions {
ident: Smart::Auto,
timestamp: convert_datetime(
@@ -229,7 +228,7 @@ enum ImageExportFormat {
/// Export to one or multiple images.
fn export_image(
world: &mut SystemWorld,
- document: &Document,
+ document: &PagedDocument,
command: &CompileCommand,
watching: bool,
fmt: ImageExportFormat,
diff --git a/crates/typst-cli/src/query.rs b/crates/typst-cli/src/query.rs
index 90d99a5a..947a6485 100644
--- a/crates/typst-cli/src/query.rs
+++ b/crates/typst-cli/src/query.rs
@@ -3,7 +3,7 @@ use ecow::{eco_format, EcoString};
use serde::Serialize;
use typst::diag::{bail, HintedStrResult, StrResult, Warned};
use typst::foundations::{Content, IntoValue, LocatableSelector, Scope};
-use typst::model::Document;
+use typst::layout::PagedDocument;
use typst::syntax::Span;
use typst::World;
use typst_eval::{eval_string, EvalMode};
@@ -53,7 +53,7 @@ pub fn query(command: &QueryCommand) -> HintedStrResult<()> {
fn retrieve(
world: &dyn World,
command: &QueryCommand,
- document: &Document,
+ document: &PagedDocument,
) -> HintedStrResult<Vec<Content>> {
let selector = eval_string(
&typst::ROUTINES,