Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

I: page transitions in interactive PDF (+ panel)

Brandon Thomas368767ee5d02
diff --git a/ROADMAP.md b/ROADMAP.md
index d099f1dff..488adbf63 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -95,6 +95,7 @@ DesignCraft aims at full Adobe InDesign parity — and to be better: faster, ope
- Video and sound (place .mp4/.mov/.webm/.mp3/.wav…, `media.options/get`, Media panel): media frames show a poster or placeholder on screen, in print and in PDF, and export as HTML5 `<video>`/`<audio>` in EPUB. No in-app playback or PDF rich media.
- Right-to-left text (World-Ready basics): right-to-left runs are shaped right to left, lines are reordered by the Unicode Bidirectional Algorithm (matched against the reference implementation), Paragraph Direction (`type.para {direction}`, Paragraph panel, IDML ParagraphDirection, EPUB `dir`). Kashida justification, caret movement in visual order and digit substitution aren't there yet.
- Interface language (Edit ▸ Interface Language, `app.language`): German, French, Spanish and Japanese menu titles, common menu items and panel names (our own translations); dialogs and the rest of the UI stay English.
+- Page transitions (`page.transition/transitions`, Page Transitions panel): twelve transition types with speed and direction per spread, written into exported PDFs as `/Trans` entries through an incremental update.
- Drag and drop text editing: drag selected text to move it (Alt copies) with its formatting (`text.release`).
- Image Import Options: place any page of a multi-page PDF (`file.place {pdfPage}`; the app asks which page), shown on screen and embedded as that page in PDF export.
- Define Lists: named numbered lists that continue across stories in page order (`list.define`, paragraph `listName` / `startAt`), round-tripped through IDML; `null` in `type.para` / `type.char` now removes an override.
diff --git a/crates/doc/src/build.rs b/crates/doc/src/build.rs
index c06d1d2ed..0b8f48b29 100644
--- a/crates/doc/src/build.rs
+++ b/crates/doc/src/build.rs
@@ -220,6 +220,7 @@ impl Document {
guides: vec![],
show_parent_items: true,
liquid: Default::default(),
+ transition: None,
}
}
diff --git a/crates/doc/src/page.rs b/crates/doc/src/page.rs
index 628aa6960..3cf2ff7cd 100644
--- a/crates/doc/src/page.rs
+++ b/crates/doc/src/page.rs
@@ -114,6 +114,76 @@ pub struct Page {
/// Liquid page rule: how objects follow when the page changes size.
#[serde(default, skip_serializing_if = "LiquidRule::is_off")]
pub liquid: LiquidRule,
+ /// Window › Interactive › Page Transitions (the spread's first page holds the spread's).
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub transition: Option<PageTransition>,
+}
+
+/// A page transition for interactive PDF.
+#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct PageTransition {
+ pub kind: TransitionKind,
+ /// Seconds.
+ #[serde(default = "one_second")]
+ pub duration: f64,
+ /// Horizontal (else vertical) for blinds, split; inward (else outward) for box, split.
+ #[serde(default)]
+ pub horizontal: bool,
+}
+
+fn one_second() -> f64 {
+ 1.0
+}
+
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub enum TransitionKind {
+ Blinds,
+ Box,
+ Comb,
+ Cover,
+ Dissolve,
+ Fade,
+ Push,
+ Split,
+ Uncover,
+ Wipe,
+ ZoomIn,
+ ZoomOut,
+}
+
+impl TransitionKind {
+ pub const ALL: [TransitionKind; 12] = [
+ TransitionKind::Blinds,
+ TransitionKind::Box,
+ TransitionKind::Comb,
+ TransitionKind::Cover,
+ TransitionKind::Dissolve,
+ TransitionKind::Fade,
+ TransitionKind::Push,
+ TransitionKind::Split,
+ TransitionKind::Uncover,
+ TransitionKind::Wipe,
+ TransitionKind::ZoomIn,
+ TransitionKind::ZoomOut,
+ ];
+ pub fn label(self) -> &'static str {
+ match self {
+ TransitionKind::Blinds => "Blinds",
+ TransitionKind::Box => "Box",
+ TransitionKind::Comb => "Comb",
+ TransitionKind::Cover => "Cover",
+ TransitionKind::Dissolve => "Dissolve",
+ TransitionKind::Fade => "Fade",
+ TransitionKind::Push => "Push",
+ TransitionKind::Split => "Split",
+ TransitionKind::Uncover => "Uncover",
+ TransitionKind::Wipe => "Wipe",
+ TransitionKind::ZoomIn => "Zoom In",
+ TransitionKind::ZoomOut => "Zoom Out",
+ }
+ }
}
/// Liquid Layout page rules.
@@ -273,6 +343,7 @@ mod tests {
guides: vec![],
show_parent_items: true,
liquid: Default::default(),
+ transition: None,
}
}
diff --git a/crates/engine/src/cmd/export.rs b/crates/engine/src/cmd/export.rs
index 94219622c..6bc6ba09e 100644
--- a/crates/engine/src/cmd/export.rs
+++ b/crates/engine/src/cmd/export.rs
@@ -247,6 +247,17 @@ fn export_pdf(s: &mut Session, p: &Value) -> Result<Value> {
let doc: &designcraft_doc::Document = flattened.as_ref().map_or(&st.doc, |f| &f.0);
let r = designcraft_pdf::export_pdf_with_report(doc, &s.cache, &opts).map_err(|e| EngineError::Other(e.to_string()))?;
let mut r = r;
+ // Page transitions (each spread's first page holds them).
+ let trans: Vec<Option<designcraft_doc::PageTransition>> = designcraft_pdf::sheet_spreads(doc, &opts)
+ .into_iter()
+ .map(|si| doc.spreads.get(si).and_then(|sp| sp.pages.first()).and_then(|pg| pg.transition))
+ .collect();
+ if trans.iter().any(Option::is_some) {
+ match designcraft_pdf::add_transitions(&r.bytes, &trans) {
+ Some(b) => r.bytes = b,
+ None => r.warnings.push("page transitions couldn't be added to this PDF".into()),
+ }
+ }
if let Some((_, n)) = &flattened
&& *n > 0
{
diff --git a/crates/engine/src/cmd/mod.rs b/crates/engine/src/cmd/mod.rs
index 002cff4ff..5b8a92fd7 100644
--- a/crates/engine/src/cmd/mod.rs
+++ b/crates/engine/src/cmd/mod.rs
@@ -47,6 +47,7 @@ mod style;
pub mod table;
pub mod text;
mod toc;
+mod transitions;
mod variables;
mod xml;
mod xref;
@@ -165,6 +166,7 @@ pub fn command_specs() -> &'static [CommandSpec] {
v.extend(xml::specs());
v.extend(strokes::specs());
v.extend(states::specs());
+ v.extend(transitions::specs());
v.extend(path_type::specs());
v.extend(qr::specs());
v.extend(select::specs());
diff --git a/crates/engine/src/cmd/transitions.rs b/crates/engine/src/cmd/transitions.rs
new file mode 100644
index 000000000..6cbbdceed
--- /dev/null
+++ b/crates/engine/src/cmd/transitions.rs
@@ -0,0 +1,105 @@
+//! Window › Interactive › Page Transitions: a transition per spread for interactive PDF.
+
+use std::sync::Arc;
+
+use designcraft_doc::{PageTransition, TransitionKind};
+use serde_json::{Value, json};
+
+use super::{CommandSpec, bad, cmd, has_doc};
+use crate::Result;
+
+fn spreads_of(d: &designcraft_doc::Document, p: &Value) -> Result<Vec<usize>> {
+ if p.get("all").and_then(Value::as_bool) == Some(true) {
+ return Ok((0..d.spreads.len()).collect());
+ }
+ if let Some(si) = p.get("spread").and_then(Value::as_u64) {
+ return Ok(vec![si as usize]);
+ }
+ let pages: Vec<usize> =
+ p.get("pages").and_then(Value::as_array).map(|a| a.iter().filter_map(Value::as_u64).map(|n| n as usize).collect()).unwrap_or_default();
+ if pages.is_empty() {
+ return Err(bad("page.transition", "give `pages` (1-based), `spread` or `all`"));
+ }
+ let mut v: Vec<usize> = pages.iter().filter_map(|n| n.checked_sub(1).and_then(|i| d.page_loc(i)).map(|(si, _)| si)).collect();
+ v.dedup();
+ Ok(v)
+}
+
+pub fn specs() -> Vec<CommandSpec> {
+ vec![
+ cmd!(
+ "page.transition",
+ "Page Transition",
+ [],
+ None,
+ "{pages?: [1-based] | spread? | all?: bool, kind: blinds|box|comb|cover|dissolve|fade|push|split|uncover|wipe|zoomIn|zoomOut|none, duration?: seconds (1), horizontal?: bool} — for interactive PDF",
+ has_doc,
+ |s, p| {
+ let kind = p.get("kind").and_then(Value::as_str).unwrap_or("none");
+ let t = if kind == "none" {
+ None
+ } else {
+ let k: TransitionKind =
+ serde_json::from_value(json!(kind)).map_err(|_| bad("page.transition", format!("unknown kind `{kind}`")))?;
+ Some(PageTransition {
+ kind: k,
+ duration: p.get("duration").and_then(Value::as_f64).unwrap_or(1.0).clamp(0.0, 60.0),
+ horizontal: p.get("horizontal").and_then(Value::as_bool).unwrap_or(false),
+ })
+ };
+ let list = spreads_of(&s.doc()?.doc, p)?;
+ s.edit(|d, _| {
+ for si in &list {
+ let sp = d.spreads.get_mut(*si).ok_or_else(|| bad("page.transition", format!("no spread {si}")))?;
+ if let Some(pg) = Arc::make_mut(sp).pages.first_mut() {
+ pg.transition = t;
+ }
+ }
+ Ok(json!({"spreads": list.len()}))
+ })
+ }
+ ),
+ cmd!(query "page.transitions", "Page Transitions", [], None, "{} → [{spread, kind, duration, horizontal}]", has_doc, |s, _| {
+ let d = &s.doc()?.doc;
+ Ok(Value::Array(
+ d.spreads
+ .iter()
+ .enumerate()
+ .filter_map(|(si, sp)| {
+ let t = sp.pages.first()?.transition?;
+ Some(json!({"spread": si, "kind": t.kind, "duration": t.duration, "horizontal": t.horizontal}))
+ })
+ .collect(),
+ ))
+ }),
+ ]
+}
+
+#[cfg(test)]
+mod tests {
+ use serde_json::json;
+
+ use crate::Session;
+
+ #[test]
+ fn transitions_go_into_the_pdf() {
+ let mut s = Session::new();
+ s.execute("file.new", &json!({"pages": 3})).unwrap();
+ s.execute("page.transition", &json!({"pages": [2], "kind": "wipe", "duration": 2})).unwrap();
+ assert_eq!(s.execute("page.transitions", &json!({})).unwrap()[0]["kind"], "wipe");
+ let r = s.execute("file.exportPdf", &json!({})).unwrap();
+ let bytes = super::super::file::base64_decode(r["base64"].as_str().unwrap());
+ let text = String::from_utf8_lossy(&bytes);
+ // Pages 2 and 3 share a spread, and the transition is the spread's.
+ assert_eq!(text.matches("/Trans<<").count(), 2);
+ assert!(text.contains("/S/Wipe") && text.contains("/D 2.00"));
+ // The updated file still reads, with all its pages.
+ assert_eq!(designcraft_render::pdf_page_count(&bytes), Some(3));
+ // Exported as spreads: one PDF page.
+ let r = s.execute("file.exportPdf", &json!({"spreads": true})).unwrap();
+ let bytes = super::super::file::base64_decode(r["base64"].as_str().unwrap());
+ assert_eq!(String::from_utf8_lossy(&bytes).matches("/Trans<<").count(), 1);
+ s.execute("page.transition", &json!({"all": true, "kind": "none"})).unwrap();
+ assert!(s.execute("page.transitions", &json!({})).unwrap().as_array().unwrap().is_empty());
+ }
+}
diff --git a/crates/idml/src/import.rs b/crates/idml/src/import.rs
index fa0141b24..066fdf9de 100644
--- a/crates/idml/src/import.rs
+++ b/crates/idml/src/import.rs
@@ -1654,6 +1654,7 @@ impl<'r> Importer<'r> {
guides: Vec::<Guide>::new(),
show_parent_items: show,
liquid: Default::default(),
+ transition: None,
});
}
let overrides: Vec<Vec<String>> =
diff --git a/crates/pdf/src/export.rs b/crates/pdf/src/export.rs
index c4c90c11a..64fabaed5 100644
--- a/crates/pdf/src/export.rs
+++ b/crates/pdf/src/export.rs
@@ -44,6 +44,11 @@ fn bleed_lr(side: PageSide, b: [f64; 4]) -> (f64, f64) {
if side == PageSide::Left { (b[3], b[2]) } else { (b[2], b[3]) }
}
+/// The spread each exported PDF page shows (in page order).
+pub fn sheet_spreads(doc: &Document, opts: &PdfOptions) -> Vec<usize> {
+ sheets(doc, opts).map(|v| v.iter().map(|s| s.spread).collect()).unwrap_or_default()
+}
+
fn sheets(doc: &Document, opts: &PdfOptions) -> Result<Vec<Sheet>> {
let count = doc.page_count();
let pages: Vec<usize> = match &opts.pages {
diff --git a/crates/pdf/src/lib.rs b/crates/pdf/src/lib.rs
index 53d567c3e..2a3d86c2c 100644
--- a/crates/pdf/src/lib.rs
+++ b/crates/pdf/src/lib.rs
@@ -30,7 +30,9 @@ mod links;
mod marks;
mod text;
-pub use export::{BookletKind, BookletOptions, booklet_pairs, export_booklet, export_pdf, export_pdf_with_report, merge_pdfs};
+mod transitions;
+pub use export::{BookletKind, BookletOptions, booklet_pairs, export_booklet, export_pdf, export_pdf_with_report, merge_pdfs, sheet_spreads};
+pub use transitions::add_transitions;
/// PDF standard to target.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
diff --git a/crates/pdf/src/transitions.rs b/crates/pdf/src/transitions.rs
new file mode 100644
index 000000000..aab042a11
--- /dev/null
+++ b/crates/pdf/src/transitions.rs
@@ -0,0 +1,100 @@
+//! Page transitions (`/Trans`) for interactive PDF. krilla doesn't write them, so they're added
+//! as an incremental update: each page with a transition is re-stated with a `/Trans` entry, with
+//! a new cross-reference section pointing back at the original.
+
+use designcraft_doc::{PageTransition, TransitionKind};
+
+/// The `/Trans` dictionary for a transition.
+fn trans_dict(t: &PageTransition) -> String {
+ use TransitionKind as K;
+ let dm = if t.horizontal { "/H" } else { "/V" };
+ let m = if t.horizontal { "/I" } else { "/O" };
+ let body = match t.kind {
+ K::Blinds => format!("/S/Blinds/Dm{dm}"),
+ K::Box => format!("/S/Box/M{m}"),
+ K::Comb => "/S/Glitter/Di 0".into(),
+ K::Cover => "/S/Cover/Di 0".into(),
+ K::Dissolve => "/S/Dissolve".into(),
+ K::Fade => "/S/Fade".into(),
+ K::Push => "/S/Push/Di 0".into(),
+ K::Split => format!("/S/Split/Dm{dm}/M{m}"),
+ K::Uncover => "/S/Uncover/Di 0".into(),
+ K::Wipe => "/S/Wipe/Di 0".into(),
+ K::ZoomIn => "/S/Fly/M/I/SS 0.01".into(),
+ K::ZoomOut => "/S/Fly/M/O/SS 0.01".into(),
+ };
+ format!("/Trans<</Type/Trans{body}/D {:.2}>>", t.duration.clamp(0.0, 60.0))
+}
+
+fn find(hay: &[u8], needle: &[u8], from: usize) -> Option<usize> {
+ hay.get(from..)?.windows(needle.len()).position(|w| w == needle).map(|i| i + from)
+}
+
+fn rfind(hay: &[u8], needle: &[u8]) -> Option<usize> {
+ hay.windows(needle.len()).rposition(|w| w == needle)
+}
+
+/// The integer after `key` in `s` (e.g. `/Size 14`, `/Root 13 0 R`).
+fn int_after(s: &str, key: &str) -> Option<usize> {
+ let i = s.find(key)? + key.len();
+ let rest = s[i..].trim_start();
+ let end = rest.find(|c: char| !c.is_ascii_digit()).unwrap_or(rest.len());
+ rest[..end].parse().ok()
+}
+
+/// Byte range of object `id`'s body (between `obj` and `endobj`).
+fn object(pdf: &[u8], id: usize) -> Option<std::ops::Range<usize>> {
+ let head = format!("\n{id} 0 obj");
+ let start = find(pdf, head.as_bytes(), 0)? + head.len();
+ let end = find(pdf, b"endobj", start)?;
+ Some(start..end)
+}
+
+/// Add transitions to the pages of `pdf` (index = PDF page). `None` when the file's structure
+/// isn't the simple kind this understands (classic xref table, a flat page tree).
+pub fn add_transitions(pdf: &[u8], trans: &[Option<PageTransition>]) -> Option<Vec<u8>> {
+ if trans.iter().all(Option::is_none) {
+ return Some(pdf.to_vec());
+ }
+ let t_at = rfind(pdf, b"trailer")?;
+ let trailer = String::from_utf8_lossy(&pdf[t_at..]).to_string();
+ let size = int_after(&trailer, "/Size")?;
+ let root = int_after(&trailer, "/Root")?;
+ let prev = int_after(&trailer, "startxref")?;
+ let info = int_after(&trailer, "/Info");
+ let id = trailer.find("/ID").and_then(|i| trailer[i..].find(']').map(|j| trailer[i..i + j + 1].to_string()));
+ let cat = String::from_utf8_lossy(&pdf[object(pdf, root)?]).to_string();
+ let pages_id = int_after(&cat, "/Pages")?;
+ let pages = String::from_utf8_lossy(&pdf[object(pdf, pages_id)?]).to_string();
+ let kids_at = pages.find("/Kids")?;
+ let kids_str = &pages[kids_at + 5..];
+ let kids_str = &kids_str[kids_str.find('[')? + 1..kids_str.find(']')?];
+ let nums: Vec<usize> = kids_str.split_whitespace().filter_map(|t| t.parse().ok()).collect();
+ let kids: Vec<usize> = nums.chunks(2).map(|c| c[0]).collect();
+ let mut out = pdf.to_vec();
+ if !out.ends_with(b"\n") {
+ out.push(b'\n');
+ }
+ let mut entries: Vec<(usize, usize)> = Vec::new();
+ for (i, t) in trans.iter().enumerate() {
+ let (Some(t), Some(&kid)) = (t, kids.get(i)) else { continue };
+ let body = String::from_utf8_lossy(&pdf[object(pdf, kid)?]).to_string();
+ if !body.contains("/Type/Page") && !body.contains("/Type /Page") {
+ return None;
+ }
+ let close = body.rfind(">>")?;
+ let new_body = format!("{}{}{}", &body[..close], trans_dict(t), &body[close..]);
+ entries.push((kid, out.len()));
+ out.extend_from_slice(format!("{kid} 0 obj{new_body}endobj\n").as_bytes());
+ }
+ let xref_at = out.len();
+ let mut x = String::from("xref\n");
+ for (kid, off) in &entries {
+ x.push_str(&format!("{kid} 1\n{off:010} 00000 n\r\n"));
+ }
+ let info = info.map(|i| format!("/Info {i} 0 R")).unwrap_or_default();
+ let id = id.unwrap_or_default();
+ x.push_str(&format!("trailer\n<</Size {size}/Root {root} 0 R{info}{id}/Prev {prev}>>\nstartxref\n{xref_at}\n%%EOF\n"));
+ out.extend_from_slice(x.as_bytes());
+ Some(out)
+}
diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs
index c69da3a15..80a36221d 100644
--- a/crates/ui-egui/src/dock.rs
+++ b/crates/ui-egui/src/dock.rs
@@ -42,6 +42,7 @@ pub const ICON_PANELS: &[(&str, &str, &str)] = &[
("buttons", "Buttons and Forms", "panel-articles"),
("liquid", "Liquid Layout", "panel-pages"),
("media", "Media", "panel-articles"),
+ ("transitions", "Page Transitions", "panel-pages"),
];
pub fn show(app: &mut DesignApp, ui: &mut egui::Ui) {
@@ -189,6 +190,7 @@ pub fn panel_body(app: &mut DesignApp, ui: &mut egui::Ui, id: &str) {
"buttons" => panels::interactive::buttons(app, ui),
"liquid" => panels::interactive::liquid(app, ui),
"media" => panels::interactive::media(app, ui),
+ "transitions" => panels::interactive::transitions(app, ui),
"table" => panels::table::show(app, ui),
_ => panels::properties::info_panel(app, ui),
}
diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs
index 243ba4b92..ec563ddbb 100644
--- a/crates/ui-egui/src/menus.rs
+++ b/crates/ui-egui/src/menus.rs
@@ -553,6 +553,7 @@ pub const MENUS: &[(&str, &[&str])] = &[
"ui:window.panel|Object States|{\"panel\": \"states\"}",
"ui:window.panel|Buttons and Forms|{\"panel\": \"buttons\"}",
"ui:window.panel|Media|{\"panel\": \"media\"}",
+ "ui:window.panel|Page Transitions|{\"panel\": \"transitions\"}",
"ui:window.panel|Liquid Layout|{\"panel\": \"liquid\"}",
"ui:window.panel|Tags|{\"panel\": \"tags\"}",
"ui:window.panel|Book|{\"panel\": \"book\"}",
diff --git a/crates/ui-egui/src/panels/interactive.rs b/crates/ui-egui/src/panels/interactive.rs
index 17d714a23..a9ec4ed2e 100644
--- a/crates/ui-egui/src/panels/interactive.rs
+++ b/crates/ui-egui/src/panels/interactive.rs
@@ -372,3 +372,48 @@ pub fn media(app: &mut DesignApp, ui: &mut egui::Ui) {
});
ui.label(egui::RichText::new("Plays in EPUB export; print and PDF show the poster.").size(10.5).color(t.text_dim));
}
+
+/// Page Transitions panel: the current spread's transition for interactive PDF.
+pub fn transitions(app: &mut DesignApp, ui: &mut egui::Ui) {
+ let t = Tokens::get(ui.ctx());
+ let Some(page) = crate::canvas::current_page(app) else { return };
+ let Some(d) = app.session.active().map(|d| d.doc.clone()) else { return };
+ let Some((si, _)) = d.page_loc(page) else { return };
+ let cur = d.spreads[si].pages.first().and_then(|p| p.transition);
+ use designcraft_doc::TransitionKind as K;
+ ui.label(egui::RichText::new(format!("Spread {}", si + 1)).strong());
+ let mut kind = cur.map(|c| c.kind);
+ egui::ComboBox::from_id_salt("transition_kind").selected_text(kind.map_or("None", K::label)).show_ui(ui, |ui| {
+ ui.selectable_value(&mut kind, None, "None");
+ for k in K::ALL {
+ ui.selectable_value(&mut kind, Some(k), k.label());
+ }
+ });
+ let mut duration = cur.map_or(1.0, |c| c.duration);
+ let mut horizontal = cur.is_some_and(|c| c.horizontal);
+ let mut changed = kind != cur.map(|c| c.kind);
+ if kind.is_some() {
+ ui.horizontal(|ui| {
+ ui.label("Speed");
+ changed |= ui.add(egui::DragValue::new(&mut duration).range(0.1..=10.0).speed(0.1).suffix(" s")).changed();
+ });
+ if matches!(kind, Some(K::Blinds | K::Box | K::Split)) {
+ changed |= ui.checkbox(&mut horizontal, if kind == Some(K::Box) { "Inward" } else { "Horizontal" }).changed();
+ }
+ }
+ let params = |all: bool| {
+ let k = kind.map_or(json!("none"), |k| json!(k));
+ if all {
+ json!({"all": true, "kind": k, "duration": duration, "horizontal": horizontal})
+ } else {
+ json!({"spread": si, "kind": k, "duration": duration, "horizontal": horizontal})
+ }
+ };
+ if changed {
+ let _ = app.run("page.transition", params(false));
+ }
+ if ui.button("Apply to All Spreads").clicked() {
+ let _ = app.run("page.transition", params(true));
+ }
+ ui.label(egui::RichText::new("Transitions play in interactive PDF (full-screen mode).").size(10.5).color(t.text_dim));
+}
diff --git a/docs/parity.md b/docs/parity.md
index 513a8088a..ce054580e 100644
--- a/docs/parity.md
+++ b/docs/parity.md
@@ -11,12 +11,12 @@ Each row of the InDesign feature catalogue is scored **D** (done), **P** (partia
|---|---|---|---|---|---|
| P0 | 102 | 99 | 3 | 0 | 99% |
| P1 | 97 | 92 | 5 | 0 | 97% |
-| P2 | 76 | 40 | 29 | 7 | 72% |
+| P2 | 76 | 41 | 29 | 6 | 73% |
| Area | Parity |
|---|---|
| Application shell & workspace | 92% |
-| Documents, pages, spreads | 94% |
+| Documents, pages, spreads | 96% |
| Layers | 95% |
| Frames, shapes & paths | 100% |
| Transform | 100% |
@@ -74,7 +74,7 @@ Open P0 items: Preferences, Vector/page formats (PDF/AI/SVG/EPS place), Export t
| Documents, pages, spreads | Primary text frame | P1 | D |
| Documents, pages, spreads | Parent pages | P0 | D |
| Documents, pages, spreads | Parent item overrides | P0 | D |
-| Documents, pages, spreads | Page transitions | P2 | M |
+| Documents, pages, spreads | Page transitions | P2 | D |
| Documents, pages, spreads | Spread view rotation | P2 | M |
| Documents, pages, spreads | Layout Adjustment | P2 | D |
| Documents, pages, spreads | Adjust Layout | P2 | D |